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

Side by Side Diff: media/filters/h264_parser.h

Issue 177583002: VAVDA: Switch to using max_num_reorder_frames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // This file contains an implementation of an H264 Annex-B video stream parser. 5 // This file contains an implementation of an H264 Annex-B video stream parser.
6 6
7 #ifndef MEDIA_FILTERS_H264_PARSER_H_ 7 #ifndef MEDIA_FILTERS_H264_PARSER_H_
8 #define MEDIA_FILTERS_H264_PARSER_H_ 8 #define MEDIA_FILTERS_H264_PARSER_H_
9 9
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 enum { 47 enum {
48 kH264ScalingList4x4Length = 16, 48 kH264ScalingList4x4Length = 16,
49 kH264ScalingList8x8Length = 64, 49 kH264ScalingList8x8Length = 64,
50 }; 50 };
51 51
52 struct MEDIA_EXPORT H264SPS { 52 struct MEDIA_EXPORT H264SPS {
53 H264SPS(); 53 H264SPS();
54 54
55 int profile_idc; 55 int profile_idc;
56 int constraint_setx_flag; 56 bool constraint_setx_flag[6];
Ami GONE FROM CHROMIUM 2014/02/25 09:45:37 This is C++ so bool is int8_t so bool[] is a prett
Pawel Osciak 2014/02/26 06:02:15 So this was actually used to store all six flags (
Ami GONE FROM CHROMIUM 2014/02/26 17:15:58 In the spec the bits are packed. Using a bool[] _
57 int level_idc; 57 int level_idc;
58 int seq_parameter_set_id; 58 int seq_parameter_set_id;
59 59
60 int chroma_format_idc; 60 int chroma_format_idc;
61 bool separate_colour_plane_flag; 61 bool separate_colour_plane_flag;
62 int bit_depth_luma_minus8; 62 int bit_depth_luma_minus8;
63 int bit_depth_chroma_minus8; 63 int bit_depth_chroma_minus8;
64 bool qpprime_y_zero_transform_bypass_flag; 64 bool qpprime_y_zero_transform_bypass_flag;
65 65
66 bool seq_scaling_matrix_present_flag; 66 bool seq_scaling_matrix_present_flag;
(...skipping 14 matching lines...) Expand all
81 int pic_width_in_mbs_minus1; 81 int pic_width_in_mbs_minus1;
82 int pic_height_in_map_units_minus1; 82 int pic_height_in_map_units_minus1;
83 bool frame_mbs_only_flag; 83 bool frame_mbs_only_flag;
84 bool mb_adaptive_frame_field_flag; 84 bool mb_adaptive_frame_field_flag;
85 bool direct_8x8_inference_flag; 85 bool direct_8x8_inference_flag;
86 bool frame_cropping_flag; 86 bool frame_cropping_flag;
87 int frame_crop_left_offset; 87 int frame_crop_left_offset;
88 int frame_crop_right_offset; 88 int frame_crop_right_offset;
89 int frame_crop_top_offset; 89 int frame_crop_top_offset;
90 int frame_crop_bottom_offset; 90 int frame_crop_bottom_offset;
91
91 bool vui_parameters_present_flag; 92 bool vui_parameters_present_flag;
92 int chroma_array_type;
93 int sar_width; // Set to 0 when not specified. 93 int sar_width; // Set to 0 when not specified.
94 int sar_height; // Set to 0 when not specified. 94 int sar_height; // Set to 0 when not specified.
95 bool bitstream_restriction_flag;
96 int max_num_reorder_frames;
97 int max_dec_frame_buffering;
98
99 int chroma_array_type;
95 }; 100 };
96 101
97 struct MEDIA_EXPORT H264PPS { 102 struct MEDIA_EXPORT H264PPS {
98 H264PPS(); 103 H264PPS();
99 104
100 int pic_parameter_set_id; 105 int pic_parameter_set_id;
101 int seq_parameter_set_id; 106 int seq_parameter_set_id;
102 bool entropy_coding_mode_flag; 107 bool entropy_coding_mode_flag;
103 bool bottom_field_pic_order_in_frame_present_flag; 108 bool bottom_field_pic_order_in_frame_present_flag;
104 int num_slice_groups_minus1; 109 int num_slice_groups_minus1;
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 Result ReadUE(int* val); 342 Result ReadUE(int* val);
338 343
339 // Read one signed exp-Golomb code from the stream and return in |*val|. 344 // Read one signed exp-Golomb code from the stream and return in |*val|.
340 Result ReadSE(int* val); 345 Result ReadSE(int* val);
341 346
342 // Parse scaling lists (see spec). 347 // Parse scaling lists (see spec).
343 Result ParseScalingList(int size, int* scaling_list, bool* use_default); 348 Result ParseScalingList(int size, int* scaling_list, bool* use_default);
344 Result ParseSPSScalingLists(H264SPS* sps); 349 Result ParseSPSScalingLists(H264SPS* sps);
345 Result ParsePPSScalingLists(const H264SPS& sps, H264PPS* pps); 350 Result ParsePPSScalingLists(const H264SPS& sps, H264PPS* pps);
346 351
352 // Parse optional VUI parameters in SPS (see spec).
353 Result ParseVUIParameters(H264SPS* sps);
354 // Set |hrd_parameters_present| to true only if they are present.
355 Result ParseAndIgnoreHRDParameters(bool* hrd_parameters_present);
356
347 // Parse reference picture lists' modifications (see spec). 357 // Parse reference picture lists' modifications (see spec).
348 Result ParseRefPicListModifications(H264SliceHeader* shdr); 358 Result ParseRefPicListModifications(H264SliceHeader* shdr);
349 Result ParseRefPicListModification(int num_ref_idx_active_minus1, 359 Result ParseRefPicListModification(int num_ref_idx_active_minus1,
350 H264ModificationOfPicNum* ref_list_mods); 360 H264ModificationOfPicNum* ref_list_mods);
351 361
352 // Parse prediction weight table (see spec). 362 // Parse prediction weight table (see spec).
353 Result ParsePredWeightTable(const H264SPS& sps, H264SliceHeader* shdr); 363 Result ParsePredWeightTable(const H264SPS& sps, H264SliceHeader* shdr);
354 364
355 // Parse weighting factors (see spec). 365 // Parse weighting factors (see spec).
356 Result ParseWeightingFactors(int num_ref_idx_active_minus1, 366 Result ParseWeightingFactors(int num_ref_idx_active_minus1,
(...skipping 18 matching lines...) Expand all
375 typedef std::map<int, H264PPS*> PPSById; 385 typedef std::map<int, H264PPS*> PPSById;
376 SPSById active_SPSes_; 386 SPSById active_SPSes_;
377 PPSById active_PPSes_; 387 PPSById active_PPSes_;
378 388
379 DISALLOW_COPY_AND_ASSIGN(H264Parser); 389 DISALLOW_COPY_AND_ASSIGN(H264Parser);
380 }; 390 };
381 391
382 } // namespace media 392 } // namespace media
383 393
384 #endif // MEDIA_FILTERS_H264_PARSER_H_ 394 #endif // MEDIA_FILTERS_H264_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698