OLD | NEW |
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 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 int first_mb_in_slice; | 242 int first_mb_in_slice; |
243 int slice_type; | 243 int slice_type; |
244 int pic_parameter_set_id; | 244 int pic_parameter_set_id; |
245 int colour_plane_id; // TODO(posciak): use this! http://crbug.com/139878 | 245 int colour_plane_id; // TODO(posciak): use this! http://crbug.com/139878 |
246 int frame_num; | 246 int frame_num; |
247 bool field_pic_flag; | 247 bool field_pic_flag; |
248 bool bottom_field_flag; | 248 bool bottom_field_flag; |
249 int idr_pic_id; | 249 int idr_pic_id; |
250 int pic_order_cnt_lsb; | 250 int pic_order_cnt_lsb; |
251 int delta_pic_order_cnt_bottom; | 251 int delta_pic_order_cnt_bottom; |
252 int delta_pic_order_cnt0; | 252 int delta_pic_order_cnt[2]; |
253 int delta_pic_order_cnt1; | |
254 int redundant_pic_cnt; | 253 int redundant_pic_cnt; |
255 bool direct_spatial_mv_pred_flag; | 254 bool direct_spatial_mv_pred_flag; |
256 | 255 |
257 bool num_ref_idx_active_override_flag; | 256 bool num_ref_idx_active_override_flag; |
258 int num_ref_idx_l0_active_minus1; | 257 int num_ref_idx_l0_active_minus1; |
259 int num_ref_idx_l1_active_minus1; | 258 int num_ref_idx_l1_active_minus1; |
260 bool ref_pic_list_modification_flag_l0; | 259 bool ref_pic_list_modification_flag_l0; |
261 bool ref_pic_list_modification_flag_l1; | 260 bool ref_pic_list_modification_flag_l1; |
262 H264ModificationOfPicNum ref_list_l0_modifications[kRefListModSize]; | 261 H264ModificationOfPicNum ref_list_l0_modifications[kRefListModSize]; |
263 H264ModificationOfPicNum ref_list_l1_modifications[kRefListModSize]; | 262 H264ModificationOfPicNum ref_list_l1_modifications[kRefListModSize]; |
(...skipping 15 matching lines...) Expand all Loading... |
279 bool adaptive_ref_pic_marking_mode_flag; | 278 bool adaptive_ref_pic_marking_mode_flag; |
280 H264DecRefPicMarking ref_pic_marking[kRefListSize]; | 279 H264DecRefPicMarking ref_pic_marking[kRefListSize]; |
281 | 280 |
282 int cabac_init_idc; | 281 int cabac_init_idc; |
283 int slice_qp_delta; | 282 int slice_qp_delta; |
284 bool sp_for_switch_flag; | 283 bool sp_for_switch_flag; |
285 int slice_qs_delta; | 284 int slice_qs_delta; |
286 int disable_deblocking_filter_idc; | 285 int disable_deblocking_filter_idc; |
287 int slice_alpha_c0_offset_div2; | 286 int slice_alpha_c0_offset_div2; |
288 int slice_beta_offset_div2; | 287 int slice_beta_offset_div2; |
289 | |
290 // Calculated. | |
291 // Size in bits of dec_ref_pic_marking() syntax element. | |
292 size_t dec_ref_pic_marking_bit_size; | |
293 size_t pic_order_cnt_bit_size; | |
294 }; | 288 }; |
295 | 289 |
296 struct H264SEIRecoveryPoint { | 290 struct H264SEIRecoveryPoint { |
297 int recovery_frame_cnt; | 291 int recovery_frame_cnt; |
298 bool exact_match_flag; | 292 bool exact_match_flag; |
299 bool broken_link_flag; | 293 bool broken_link_flag; |
300 int changing_slice_group_idc; | 294 int changing_slice_group_idc; |
301 }; | 295 }; |
302 | 296 |
303 struct MEDIA_EXPORT H264SEIMessage { | 297 struct MEDIA_EXPORT H264SEIMessage { |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 // Ranges of encrypted bytes in the buffer passed to | 458 // Ranges of encrypted bytes in the buffer passed to |
465 // SetEncryptedStream(). | 459 // SetEncryptedStream(). |
466 Ranges<const uint8*> encrypted_ranges_; | 460 Ranges<const uint8*> encrypted_ranges_; |
467 | 461 |
468 DISALLOW_COPY_AND_ASSIGN(H264Parser); | 462 DISALLOW_COPY_AND_ASSIGN(H264Parser); |
469 }; | 463 }; |
470 | 464 |
471 } // namespace media | 465 } // namespace media |
472 | 466 |
473 #endif // MEDIA_FILTERS_H264_PARSER_H_ | 467 #endif // MEDIA_FILTERS_H264_PARSER_H_ |
OLD | NEW |