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

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

Issue 859803004: [content/common] replacing left out COMPILE_ASSERT with static_assert (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | no next file » | 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/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 return false; 116 return false;
117 117
118 curr_pic_->long_term_reference_flag = slice_hdr->long_term_reference_flag; 118 curr_pic_->long_term_reference_flag = slice_hdr->long_term_reference_flag;
119 curr_pic_->adaptive_ref_pic_marking_mode_flag = 119 curr_pic_->adaptive_ref_pic_marking_mode_flag =
120 slice_hdr->adaptive_ref_pic_marking_mode_flag; 120 slice_hdr->adaptive_ref_pic_marking_mode_flag;
121 121
122 // If the slice header indicates we will have to perform reference marking 122 // If the slice header indicates we will have to perform reference marking
123 // process after this picture is decoded, store required data for that 123 // process after this picture is decoded, store required data for that
124 // purpose. 124 // purpose.
125 if (slice_hdr->adaptive_ref_pic_marking_mode_flag) { 125 if (slice_hdr->adaptive_ref_pic_marking_mode_flag) {
126 COMPILE_ASSERT(sizeof(curr_pic_->ref_pic_marking) == 126 static_assert(sizeof(curr_pic_->ref_pic_marking) ==
127 sizeof(slice_hdr->ref_pic_marking), 127 sizeof(slice_hdr->ref_pic_marking),
128 ref_pic_marking_array_sizes_do_not_match); 128 "Array sizes of ref pic marking do not match.");
129 memcpy(curr_pic_->ref_pic_marking, slice_hdr->ref_pic_marking, 129 memcpy(curr_pic_->ref_pic_marking, slice_hdr->ref_pic_marking,
130 sizeof(curr_pic_->ref_pic_marking)); 130 sizeof(curr_pic_->ref_pic_marking));
131 } 131 }
132 132
133 return true; 133 return true;
134 } 134 }
135 135
136 bool H264Decoder::CalculatePicOrderCounts(media::H264SliceHeader* slice_hdr) { 136 bool H264Decoder::CalculatePicOrderCounts(media::H264SliceHeader* slice_hdr) {
137 DCHECK_NE(curr_sps_id_, -1); 137 DCHECK_NE(curr_sps_id_, -1);
138 const media::H264SPS* sps = parser_.GetSPS(curr_sps_id_); 138 const media::H264SPS* sps = parser_.GetSPS(curr_sps_id_);
(...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after
1266 DVLOG(4) << "Dropping nalu"; 1266 DVLOG(4) << "Dropping nalu";
1267 curr_nalu_.reset(); 1267 curr_nalu_.reset();
1268 } 1268 }
1269 } 1269 }
1270 1270
1271 size_t H264Decoder::GetRequiredNumOfPictures() const { 1271 size_t H264Decoder::GetRequiredNumOfPictures() const {
1272 return dpb_.max_num_pics() + kPicsInPipeline; 1272 return dpb_.max_num_pics() + kPicsInPipeline;
1273 } 1273 }
1274 1274
1275 } // namespace content 1275 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698