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

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

Issue 10825270: h264 parser: fix setting default l1 ref list size for non-B frames. (Closed) Base URL: https://git.chromium.org/git/chromium/src@master
Patch Set: Created 8 years, 4 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 "content/common/gpu/media/h264_parser.h" 5 #include "content/common/gpu/media/h264_parser.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 10
(...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 READ_BOOL_OR_RETURN(&shdr->direct_spatial_mv_pred_flag); 1004 READ_BOOL_OR_RETURN(&shdr->direct_spatial_mv_pred_flag);
1005 1005
1006 if (shdr->IsPSlice() || shdr->IsSPSlice() || shdr->IsBSlice()) { 1006 if (shdr->IsPSlice() || shdr->IsSPSlice() || shdr->IsBSlice()) {
1007 READ_BOOL_OR_RETURN(&shdr->num_ref_idx_active_override_flag); 1007 READ_BOOL_OR_RETURN(&shdr->num_ref_idx_active_override_flag);
1008 if (shdr->num_ref_idx_active_override_flag) { 1008 if (shdr->num_ref_idx_active_override_flag) {
1009 READ_UE_OR_RETURN(&shdr->num_ref_idx_l0_active_minus1); 1009 READ_UE_OR_RETURN(&shdr->num_ref_idx_l0_active_minus1);
1010 if (shdr->IsBSlice()) 1010 if (shdr->IsBSlice())
1011 READ_UE_OR_RETURN(&shdr->num_ref_idx_l1_active_minus1); 1011 READ_UE_OR_RETURN(&shdr->num_ref_idx_l1_active_minus1);
1012 } else { 1012 } else {
1013 shdr->num_ref_idx_l0_active_minus1 = 1013 shdr->num_ref_idx_l0_active_minus1 =
1014 pps->num_ref_idx_l0_default_active_minus1; 1014 pps->num_ref_idx_l0_default_active_minus1;
1015 shdr->num_ref_idx_l1_active_minus1 = 1015 if (shdr->IsBSlice()) {
1016 shdr->num_ref_idx_l1_active_minus1 =
1016 pps->num_ref_idx_l1_default_active_minus1; 1017 pps->num_ref_idx_l1_default_active_minus1;
1018 }
1017 } 1019 }
1018 } 1020 }
1019 if (shdr->field_pic_flag) { 1021 if (shdr->field_pic_flag) {
1020 TRUE_OR_RETURN(shdr->num_ref_idx_l0_active_minus1 < 32); 1022 TRUE_OR_RETURN(shdr->num_ref_idx_l0_active_minus1 < 32);
1021 TRUE_OR_RETURN(shdr->num_ref_idx_l1_active_minus1 < 32); 1023 TRUE_OR_RETURN(shdr->num_ref_idx_l1_active_minus1 < 32);
1022 } else { 1024 } else {
1023 TRUE_OR_RETURN(shdr->num_ref_idx_l0_active_minus1 < 16); 1025 TRUE_OR_RETURN(shdr->num_ref_idx_l0_active_minus1 < 16);
1024 TRUE_OR_RETURN(shdr->num_ref_idx_l1_active_minus1 < 16); 1026 TRUE_OR_RETURN(shdr->num_ref_idx_l1_active_minus1 < 16);
1025 } 1027 }
1026 1028
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
1115 1117
1116 default: 1118 default:
1117 DVLOG(4) << "Unsupported SEI message"; 1119 DVLOG(4) << "Unsupported SEI message";
1118 break; 1120 break;
1119 } 1121 }
1120 1122
1121 return kOk; 1123 return kOk;
1122 } 1124 }
1123 1125
1124 } // namespace content 1126 } // 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