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_cnt[2]; | 252 int delta_pic_order_cnt0; |
| 253 int delta_pic_order_cnt1; |
253 int redundant_pic_cnt; | 254 int redundant_pic_cnt; |
254 bool direct_spatial_mv_pred_flag; | 255 bool direct_spatial_mv_pred_flag; |
255 | 256 |
256 bool num_ref_idx_active_override_flag; | 257 bool num_ref_idx_active_override_flag; |
257 int num_ref_idx_l0_active_minus1; | 258 int num_ref_idx_l0_active_minus1; |
258 int num_ref_idx_l1_active_minus1; | 259 int num_ref_idx_l1_active_minus1; |
259 bool ref_pic_list_modification_flag_l0; | 260 bool ref_pic_list_modification_flag_l0; |
260 bool ref_pic_list_modification_flag_l1; | 261 bool ref_pic_list_modification_flag_l1; |
261 H264ModificationOfPicNum ref_list_l0_modifications[kRefListModSize]; | 262 H264ModificationOfPicNum ref_list_l0_modifications[kRefListModSize]; |
262 H264ModificationOfPicNum ref_list_l1_modifications[kRefListModSize]; | 263 H264ModificationOfPicNum ref_list_l1_modifications[kRefListModSize]; |
(...skipping 15 matching lines...) Expand all Loading... |
278 bool adaptive_ref_pic_marking_mode_flag; | 279 bool adaptive_ref_pic_marking_mode_flag; |
279 H264DecRefPicMarking ref_pic_marking[kRefListSize]; | 280 H264DecRefPicMarking ref_pic_marking[kRefListSize]; |
280 | 281 |
281 int cabac_init_idc; | 282 int cabac_init_idc; |
282 int slice_qp_delta; | 283 int slice_qp_delta; |
283 bool sp_for_switch_flag; | 284 bool sp_for_switch_flag; |
284 int slice_qs_delta; | 285 int slice_qs_delta; |
285 int disable_deblocking_filter_idc; | 286 int disable_deblocking_filter_idc; |
286 int slice_alpha_c0_offset_div2; | 287 int slice_alpha_c0_offset_div2; |
287 int slice_beta_offset_div2; | 288 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; |
288 }; | 294 }; |
289 | 295 |
290 struct H264SEIRecoveryPoint { | 296 struct H264SEIRecoveryPoint { |
291 int recovery_frame_cnt; | 297 int recovery_frame_cnt; |
292 bool exact_match_flag; | 298 bool exact_match_flag; |
293 bool broken_link_flag; | 299 bool broken_link_flag; |
294 int changing_slice_group_idc; | 300 int changing_slice_group_idc; |
295 }; | 301 }; |
296 | 302 |
297 struct MEDIA_EXPORT H264SEIMessage { | 303 struct MEDIA_EXPORT H264SEIMessage { |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 // Ranges of encrypted bytes in the buffer passed to | 464 // Ranges of encrypted bytes in the buffer passed to |
459 // SetEncryptedStream(). | 465 // SetEncryptedStream(). |
460 Ranges<const uint8*> encrypted_ranges_; | 466 Ranges<const uint8*> encrypted_ranges_; |
461 | 467 |
462 DISALLOW_COPY_AND_ASSIGN(H264Parser); | 468 DISALLOW_COPY_AND_ASSIGN(H264Parser); |
463 }; | 469 }; |
464 | 470 |
465 } // namespace media | 471 } // namespace media |
466 | 472 |
467 #endif // MEDIA_FILTERS_H264_PARSER_H_ | 473 #endif // MEDIA_FILTERS_H264_PARSER_H_ |
OLD | NEW |