OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <algorithm> | 5 #include <algorithm> |
6 #include <limits> | 6 #include <limits> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/numerics/safe_conversions.h" | 10 #include "base/numerics/safe_conversions.h" |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 } | 525 } |
526 | 526 |
527 curr_pic_->long_term_reference_flag = slice_hdr->long_term_reference_flag; | 527 curr_pic_->long_term_reference_flag = slice_hdr->long_term_reference_flag; |
528 curr_pic_->adaptive_ref_pic_marking_mode_flag = | 528 curr_pic_->adaptive_ref_pic_marking_mode_flag = |
529 slice_hdr->adaptive_ref_pic_marking_mode_flag; | 529 slice_hdr->adaptive_ref_pic_marking_mode_flag; |
530 | 530 |
531 // If the slice header indicates we will have to perform reference marking | 531 // If the slice header indicates we will have to perform reference marking |
532 // process after this picture is decoded, store required data for that | 532 // process after this picture is decoded, store required data for that |
533 // purpose. | 533 // purpose. |
534 if (slice_hdr->adaptive_ref_pic_marking_mode_flag) { | 534 if (slice_hdr->adaptive_ref_pic_marking_mode_flag) { |
535 COMPILE_ASSERT(sizeof(curr_pic_->ref_pic_marking) == | 535 static_assert(sizeof(curr_pic_->ref_pic_marking) == |
536 sizeof(slice_hdr->ref_pic_marking), | 536 sizeof(slice_hdr->ref_pic_marking), |
537 ref_pic_marking_array_sizes_do_not_match); | 537 "ref_pic_marking array sizes do not match"); |
538 memcpy(curr_pic_->ref_pic_marking, slice_hdr->ref_pic_marking, | 538 memcpy(curr_pic_->ref_pic_marking, slice_hdr->ref_pic_marking, |
539 sizeof(curr_pic_->ref_pic_marking)); | 539 sizeof(curr_pic_->ref_pic_marking)); |
540 } | 540 } |
541 | 541 |
542 return true; | 542 return true; |
543 } | 543 } |
544 | 544 |
545 bool VaapiH264Decoder::CalculatePicOrderCounts( | 545 bool VaapiH264Decoder::CalculatePicOrderCounts( |
546 media::H264SliceHeader* slice_hdr) { | 546 media::H264SliceHeader* slice_hdr) { |
547 DCHECK_NE(curr_sps_id_, -1); | 547 DCHECK_NE(curr_sps_id_, -1); |
(...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1691 break; | 1691 break; |
1692 } | 1692 } |
1693 } | 1693 } |
1694 } | 1694 } |
1695 | 1695 |
1696 size_t VaapiH264Decoder::GetRequiredNumOfPictures() { | 1696 size_t VaapiH264Decoder::GetRequiredNumOfPictures() { |
1697 return dpb_.max_num_pics() + kPicsInPipeline; | 1697 return dpb_.max_num_pics() + kPicsInPipeline; |
1698 } | 1698 } |
1699 | 1699 |
1700 } // namespace content | 1700 } // namespace content |
OLD | NEW |