Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: content/common/gpu/media/vaapi_h264_decoder.cc

Issue 791923003: replace COMPILE_ASSERT with static_assert in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixups Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/child/web_url_loader_impl.cc ('k') | content/common/input/web_input_event_traits.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/child/web_url_loader_impl.cc ('k') | content/common/input/web_input_event_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698