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

Side by Side 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 unified diff | 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 »
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 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 sps->chroma_array_type = 0; 620 sps->chroma_array_type = 0;
621 else 621 else
622 sps->chroma_array_type = sps->chroma_format_idc; 622 sps->chroma_array_type = sps->chroma_format_idc;
623 623
624 READ_UE_OR_RETURN(&sps->log2_max_frame_num_minus4); 624 READ_UE_OR_RETURN(&sps->log2_max_frame_num_minus4);
625 TRUE_OR_RETURN(sps->log2_max_frame_num_minus4 < 13); 625 TRUE_OR_RETURN(sps->log2_max_frame_num_minus4 < 13);
626 626
627 READ_UE_OR_RETURN(&sps->pic_order_cnt_type); 627 READ_UE_OR_RETURN(&sps->pic_order_cnt_type);
628 TRUE_OR_RETURN(sps->pic_order_cnt_type < 3); 628 TRUE_OR_RETURN(sps->pic_order_cnt_type < 3);
629 629
630 sps->expected_delta_per_pic_order_cnt_cycle = 0;
630 if (sps->pic_order_cnt_type == 0) { 631 if (sps->pic_order_cnt_type == 0) {
631 READ_UE_OR_RETURN(&sps->log2_max_pic_order_cnt_lsb_minus4); 632 READ_UE_OR_RETURN(&sps->log2_max_pic_order_cnt_lsb_minus4);
632 TRUE_OR_RETURN(sps->log2_max_pic_order_cnt_lsb_minus4 < 13); 633 TRUE_OR_RETURN(sps->log2_max_pic_order_cnt_lsb_minus4 < 13);
633 } else if (sps->pic_order_cnt_type == 1) { 634 } else if (sps->pic_order_cnt_type == 1) {
634 READ_BOOL_OR_RETURN(&sps->delta_pic_order_always_zero_flag); 635 READ_BOOL_OR_RETURN(&sps->delta_pic_order_always_zero_flag);
635 READ_SE_OR_RETURN(&sps->offset_for_non_ref_pic); 636 READ_SE_OR_RETURN(&sps->offset_for_non_ref_pic);
636 READ_SE_OR_RETURN(&sps->offset_for_top_to_bottom_field); 637 READ_SE_OR_RETURN(&sps->offset_for_top_to_bottom_field);
637 READ_UE_OR_RETURN(&sps->num_ref_frames_in_pic_order_cnt_cycle); 638 READ_UE_OR_RETURN(&sps->num_ref_frames_in_pic_order_cnt_cycle);
638 for (int i = 0; i < sps->num_ref_frames_in_pic_order_cnt_cycle; ++i) 639 TRUE_OR_RETURN(sps->num_ref_frames_in_pic_order_cnt_cycle < 255);
640
641 for (int i = 0; i < sps->num_ref_frames_in_pic_order_cnt_cycle; ++i) {
639 READ_SE_OR_RETURN(&sps->offset_for_ref_frame[i]); 642 READ_SE_OR_RETURN(&sps->offset_for_ref_frame[i]);
643 sps->expected_delta_per_pic_order_cnt_cycle +=
644 sps->offset_for_ref_frame[i];
645 }
640 } 646 }
641 647
642 READ_UE_OR_RETURN(&sps->max_num_ref_frames); 648 READ_UE_OR_RETURN(&sps->max_num_ref_frames);
643 READ_BOOL_OR_RETURN(&sps->gaps_in_frame_num_value_allowed_flag); 649 READ_BOOL_OR_RETURN(&sps->gaps_in_frame_num_value_allowed_flag);
644 650
645 if (sps->gaps_in_frame_num_value_allowed_flag) 651 if (sps->gaps_in_frame_num_value_allowed_flag)
646 return kUnsupportedStream; 652 return kUnsupportedStream;
647 653
648 READ_UE_OR_RETURN(&sps->pic_width_in_mbs_minus1); 654 READ_UE_OR_RETURN(&sps->pic_width_in_mbs_minus1);
649 READ_UE_OR_RETURN(&sps->pic_height_in_map_units_minus1); 655 READ_UE_OR_RETURN(&sps->pic_height_in_map_units_minus1);
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 1123
1118 default: 1124 default:
1119 DVLOG(4) << "Unsupported SEI message"; 1125 DVLOG(4) << "Unsupported SEI message";
1120 break; 1126 break;
1121 } 1127 }
1122 1128
1123 return kOk; 1129 return kOk;
1124 } 1130 }
1125 1131
1126 } // namespace content 1132 } // namespace content
OLDNEW
« 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