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/h264_parser.cc

Issue 10837058: Make H264BitReader ignore trailing zero bytes and stop bit. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add back tests after merge from master. Created 8 years, 3 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/common/gpu/media/h264_bit_reader_unittest.cc ('k') | 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 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 IN_RANGE_OR_RETURN(pps->pic_init_qs_minus26, -26, 25); 723 IN_RANGE_OR_RETURN(pps->pic_init_qs_minus26, -26, 25);
724 724
725 READ_SE_OR_RETURN(&pps->chroma_qp_index_offset); 725 READ_SE_OR_RETURN(&pps->chroma_qp_index_offset);
726 IN_RANGE_OR_RETURN(pps->chroma_qp_index_offset, -12, 12); 726 IN_RANGE_OR_RETURN(pps->chroma_qp_index_offset, -12, 12);
727 pps->second_chroma_qp_index_offset = pps->chroma_qp_index_offset; 727 pps->second_chroma_qp_index_offset = pps->chroma_qp_index_offset;
728 728
729 READ_BOOL_OR_RETURN(&pps->deblocking_filter_control_present_flag); 729 READ_BOOL_OR_RETURN(&pps->deblocking_filter_control_present_flag);
730 READ_BOOL_OR_RETURN(&pps->constrained_intra_pred_flag); 730 READ_BOOL_OR_RETURN(&pps->constrained_intra_pred_flag);
731 READ_BOOL_OR_RETURN(&pps->redundant_pic_cnt_present_flag); 731 READ_BOOL_OR_RETURN(&pps->redundant_pic_cnt_present_flag);
732 732
733 if (br_.HasMoreRBSPData()) { 733 int temp;
734 READ_BOOL_OR_RETURN(&pps->transform_8x8_mode_flag); 734 if (br_.ReadBits(1, &temp)) {
735 pps->transform_8x8_mode_flag = temp;
735 READ_BOOL_OR_RETURN(&pps->pic_scaling_matrix_present_flag); 736 READ_BOOL_OR_RETURN(&pps->pic_scaling_matrix_present_flag);
736 737
737 if (pps->pic_scaling_matrix_present_flag) { 738 if (pps->pic_scaling_matrix_present_flag) {
738 DVLOG(4) << "Picture scaling matrix present"; 739 DVLOG(4) << "Picture scaling matrix present";
739 res = ParsePPSScalingLists(*sps, pps.get()); 740 res = ParsePPSScalingLists(*sps, pps.get());
740 if (res != kOk) 741 if (res != kOk)
741 return res; 742 return res;
742 } 743 }
743 744
744 READ_SE_OR_RETURN(&pps->second_chroma_qp_index_offset); 745 READ_SE_OR_RETURN(&pps->second_chroma_qp_index_offset);
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
1123 1124
1124 default: 1125 default:
1125 DVLOG(4) << "Unsupported SEI message"; 1126 DVLOG(4) << "Unsupported SEI message";
1126 break; 1127 break;
1127 } 1128 }
1128 1129
1129 return kOk; 1130 return kOk;
1130 } 1131 }
1131 1132
1132 } // namespace content 1133 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/h264_bit_reader_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698