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

Unified Diff: content/common/gpu/media/h264_parser.cc

Issue 10821043: VAVDA: Fix Baseline profile handling in H264 parser. (Closed) Base URL: https://git.chromium.org/git/chromium/src@master
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/h264_parser.cc
diff --git a/content/common/gpu/media/h264_parser.cc b/content/common/gpu/media/h264_parser.cc
index ace3dabed033c7991c6d747c35c8226b530a0541..b6bc6d1b64b0a9cf7144cf1b4c4ee60443f01d97 100644
--- a/content/common/gpu/media/h264_parser.cc
+++ b/content/common/gpu/media/h264_parser.cc
@@ -654,9 +654,14 @@ H264Parser::Result H264Parser::ParsePPSScalingLists(const H264SPS& sps,
}
static void FillDefaultSeqScalingLists(H264SPS* sps) {
- // Assumes ints in arrays.
- memset(sps->scaling_list4x4, 16, sizeof(sps->scaling_list4x4));
Ami GONE FROM CHROMIUM 2012/07/26 19:32:12 This is pretty awesome; were we setting each int t
Pawel Osciak 2012/07/26 19:48:49 No, we were casting this to chars later on. But di
- memset(sps->scaling_list8x8, 16, sizeof(sps->scaling_list8x8));
+ for (int i = 0; i < 6; ++i)
+ for (int j = 0; j < kH264ScalingList4x4Length; ++j)
+ sps->scaling_list4x4[i][j] = 16;
+
+ for (int i = 0; i < 6; ++i)
+ for (int j = 0; j < kH264ScalingList8x8Length; ++j)
+ sps->scaling_list8x8[i][j] = 16;
+
}
H264Parser::Result H264Parser::ParseSPS(int* sps_id) {
@@ -686,11 +691,6 @@ H264Parser::Result H264Parser::ParseSPS(int* sps_id) {
if (sps->chroma_format_idc == 3)
READ_BOOL_OR_RETURN(&sps->separate_colour_plane_flag);
- if (sps->separate_colour_plane_flag)
- sps->chroma_array_type = 0;
- else
- sps->chroma_array_type = sps->chroma_format_idc;
-
READ_UE_OR_RETURN(&sps->bit_depth_luma_minus8);
TRUE_OR_RETURN(sps->bit_depth_luma_minus8 < 7);
@@ -708,8 +708,16 @@ H264Parser::Result H264Parser::ParseSPS(int* sps_id) {
} else {
FillDefaultSeqScalingLists(sps.get());
}
+ } else {
+ sps->chroma_format_idc = 1;
+ FillDefaultSeqScalingLists(sps.get());
}
+ if (sps->separate_colour_plane_flag)
+ sps->chroma_array_type = 0;
+ else
+ sps->chroma_array_type = sps->chroma_format_idc;
+
READ_UE_OR_RETURN(&sps->log2_max_frame_num_minus4);
TRUE_OR_RETURN(sps->log2_max_frame_num_minus4 < 13);
@@ -807,6 +815,7 @@ H264Parser::Result H264Parser::ParsePPS(int* pps_id) {
READ_SE_OR_RETURN(&pps->chroma_qp_index_offset);
IN_RANGE_OR_RETURN(pps->chroma_qp_index_offset, -12, 12);
+ pps->second_chroma_qp_index_offset = pps->chroma_qp_index_offset;
READ_BOOL_OR_RETURN(&pps->deblocking_filter_control_present_flag);
READ_BOOL_OR_RETURN(&pps->constrained_intra_pred_flag);
« 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