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

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

Issue 10874023: VAVDA: Add support for POC type 1 and 2 (Closed) Base URL: https://git.chromium.org/git/chromium/src@git-svn
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/gpu/media/h264_parser.h ('k') | content/common/gpu/media/vaapi_h264_decoder.h » ('j') | 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 6f61dedf57f2c937bf44e0eacf3e2b1aebdb38c7..d25a8021cdb2daec756b9aa662c16f4b82ab0d19 100644
--- a/content/common/gpu/media/h264_parser.cc
+++ b/content/common/gpu/media/h264_parser.cc
@@ -627,6 +627,7 @@ H264Parser::Result H264Parser::ParseSPS(int* sps_id) {
READ_UE_OR_RETURN(&sps->pic_order_cnt_type);
TRUE_OR_RETURN(sps->pic_order_cnt_type < 3);
+ sps->expected_delta_per_pic_order_cnt_cycle = 0;
if (sps->pic_order_cnt_type == 0) {
READ_UE_OR_RETURN(&sps->log2_max_pic_order_cnt_lsb_minus4);
TRUE_OR_RETURN(sps->log2_max_pic_order_cnt_lsb_minus4 < 13);
@@ -635,8 +636,13 @@ H264Parser::Result H264Parser::ParseSPS(int* sps_id) {
READ_SE_OR_RETURN(&sps->offset_for_non_ref_pic);
READ_SE_OR_RETURN(&sps->offset_for_top_to_bottom_field);
READ_UE_OR_RETURN(&sps->num_ref_frames_in_pic_order_cnt_cycle);
- for (int i = 0; i < sps->num_ref_frames_in_pic_order_cnt_cycle; ++i)
+ TRUE_OR_RETURN(sps->num_ref_frames_in_pic_order_cnt_cycle < 255);
+
+ for (int i = 0; i < sps->num_ref_frames_in_pic_order_cnt_cycle; ++i) {
READ_SE_OR_RETURN(&sps->offset_for_ref_frame[i]);
+ sps->expected_delta_per_pic_order_cnt_cycle +=
+ sps->offset_for_ref_frame[i];
+ }
}
READ_UE_OR_RETURN(&sps->max_num_ref_frames);
« no previous file with comments | « content/common/gpu/media/h264_parser.h ('k') | content/common/gpu/media/vaapi_h264_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698