FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cbs_mpeg2.h
Go to the documentation of this file.
1 /*
2  * This file is part of FFmpeg.
3  *
4  * FFmpeg is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * FFmpeg is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with FFmpeg; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #ifndef AVCODEC_CBS_MPEG2_H
20 #define AVCODEC_CBS_MPEG2_H
21 
22 #include <stddef.h>
23 #include <stdint.h>
24 
25 
26 enum {
36 };
37 
38 #define MPEG2_START_IS_SLICE(type) \
39  ((type) >= MPEG2_START_SLICE_MIN && \
40  (type) <= MPEG2_START_SLICE_MAX)
41 
42 enum {
54 };
55 
56 
57 typedef struct MPEG2RawSequenceHeader {
59 
64  uint32_t bit_rate_value;
67 
73 
74 typedef struct MPEG2RawUserData {
76 
80 
81 typedef struct MPEG2RawSequenceExtension {
93 
96 
101 
105 
108 
109  uint32_t time_code;
113 
114 typedef struct MPEG2RawPictureHeader {
116 
119  uint16_t vbv_delay;
120 
125 
128 
131 
143 
151 
162 
167 
168 typedef struct MPEG2RawExtensionData {
171 
172  union {
178  } data;
180 
181 typedef struct MPEG2RawSliceHeader {
183 
186 
188 
193 
195 
199 
200 typedef struct MPEG2RawSlice {
202 
204  size_t data_size;
206 } MPEG2RawSlice;
207 
208 
210  // Elements stored in headers which are required for other decoding.
211  uint16_t horizontal_size;
212  uint16_t vertical_size;
217 
218  // Write buffer.
222 
223 
224 #endif /* AVCODEC_CBS_MPEG2_H */
uint8_t full_pel_backward_vector
Definition: cbs_mpeg2.h:123
MPEG2RawPictureDisplayExtension picture_display
Definition: cbs_mpeg2.h:177
uint8_t load_non_intra_quantiser_matrix
Definition: cbs_mpeg2.h:70
uint8_t picture_start_code
Definition: cbs_mpeg2.h:115
uint8_t extension_start_code_identifier
Definition: cbs_mpeg2.h:170
uint8_t number_of_frame_centre_offsets
Definition: cbs_mpeg2.h:216
uint8_t * data
Definition: cbs_mpeg2.h:203
MPEG2RawSequenceExtension sequence
Definition: cbs_mpeg2.h:173
uint16_t vertical_size_value
Definition: cbs_mpeg2.h:61
uint8_t
uint8_t load_intra_quantiser_matrix
Definition: cbs_mpeg2.h:68
uint8_t priority_breakpoint
Definition: cbs_mpeg2.h:185
MPEG2RawQuantMatrixExtension quant_matrix
Definition: cbs_mpeg2.h:175
uint8_t slice_vertical_position
Definition: cbs_mpeg2.h:182
size_t extra_information_length
Definition: cbs_mpeg2.h:196
uint8_t non_intra_quantiser_matrix[64]
Definition: cbs_mpeg2.h:71
uint8_t constrained_parameters_flag
Definition: cbs_mpeg2.h:66
MPEG2RawPictureCodingExtension picture_coding
Definition: cbs_mpeg2.h:176
uint8_t quantiser_scale_code
Definition: cbs_mpeg2.h:187
uint8_t slice_vertical_position_extension
Definition: cbs_mpeg2.h:184
uint8_t intra_quantiser_matrix[64]
Definition: cbs_mpeg2.h:69
uint8_t intra_quantiser_matrix[64]
Definition: cbs_mpeg2.h:154
uint16_t frame_centre_vertical_offset[3]
Definition: cbs_mpeg2.h:165
uint8_t * extra_information
Definition: cbs_mpeg2.h:197
uint8_t non_intra_quantiser_matrix[64]
Definition: cbs_mpeg2.h:156
uint8_t load_chroma_non_intra_quantiser_matrix
Definition: cbs_mpeg2.h:159
uint16_t frame_centre_horizontal_offset[3]
Definition: cbs_mpeg2.h:164
uint8_t extra_bit_slice
Definition: cbs_mpeg2.h:194
uint8_t load_non_intra_quantiser_matrix
Definition: cbs_mpeg2.h:155
uint8_t horizontal_size_extension
Definition: cbs_mpeg2.h:85
uint8_t * user_data
Definition: cbs_mpeg2.h:77
int data_bit_start
Definition: cbs_mpeg2.h:205
uint8_t chroma_intra_quantiser_matrix[64]
Definition: cbs_mpeg2.h:158
union MPEG2RawExtensionData::@62 data
uint8_t load_chroma_intra_quantiser_matrix
Definition: cbs_mpeg2.h:157
MPEG2RawSequenceDisplayExtension sequence_display
Definition: cbs_mpeg2.h:174
uint8_t full_pel_forward_vector
Definition: cbs_mpeg2.h:121
uint8_t frame_rate_extension_n
Definition: cbs_mpeg2.h:90
uint8_t vbv_buffer_size_extension
Definition: cbs_mpeg2.h:88
uint8_t sequence_header_code
Definition: cbs_mpeg2.h:58
uint8_t frame_rate_extension_d
Definition: cbs_mpeg2.h:91
uint8_t extension_start_code
Definition: cbs_mpeg2.h:169
uint16_t horizontal_size_value
Definition: cbs_mpeg2.h:60
size_t user_data_length
Definition: cbs_mpeg2.h:78
uint16_t temporal_reference
Definition: cbs_mpeg2.h:117
uint8_t aspect_ratio_information
Definition: cbs_mpeg2.h:62
uint8_t extra_bit_picture
Definition: cbs_mpeg2.h:126
uint8_t slice_picture_id
Definition: cbs_mpeg2.h:192
uint8_t picture_coding_type
Definition: cbs_mpeg2.h:118
uint8_t chroma_non_intra_quantiser_matrix[64]
Definition: cbs_mpeg2.h:160
MPEG2RawSliceHeader header
Definition: cbs_mpeg2.h:201
uint16_t vbv_buffer_size_value
Definition: cbs_mpeg2.h:65
uint32_t bit_rate_value
Definition: cbs_mpeg2.h:64
uint8_t slice_extension_flag
Definition: cbs_mpeg2.h:189
uint8_t user_data_start_code
Definition: cbs_mpeg2.h:75
uint8_t profile_and_level_indication
Definition: cbs_mpeg2.h:82
uint8_t vertical_size_extension
Definition: cbs_mpeg2.h:86
size_t data_size
Definition: cbs_mpeg2.h:204
uint8_t slice_picture_id_enable
Definition: cbs_mpeg2.h:191