VA-API 2.22.0
Loading...
Searching...
No Matches
va_enc_mpeg2.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2012 Intel Corporation. All Rights Reserved.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the
6 * "Software"), to deal in the Software without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sub license, and/or sell copies of the Software, and to
9 * permit persons to whom the Software is furnished to do so, subject to
10 * the following conditions:
11 *
12 * The above copyright notice and this permission notice (including the
13 * next paragraph) shall be included in all copies or substantial portions
14 * of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
19 * IN NO EVENT SHALL INTEL AND/OR ITS SUPPLIERS BE LIABLE FOR
20 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 */
24
31
32#ifndef _VA_ENC_MPEG2_H_
33#define _VA_ENC_MPEG2_H_
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
44
50
73
90typedef struct _VAEncSequenceParameterBufferMPEG2 {
92 uint32_t intra_period;
94 uint32_t ip_period;
135
136 union {
137 struct {
143 uint32_t chroma_format : 2;
145 uint32_t low_delay : 1;
150 } bits;
151 uint32_t value;
152 } sequence_extension;
153
156
157 union {
158 struct {
160 uint32_t time_code : 25;
162 uint32_t closed_gop : 1;
164 uint32_t broken_link : 1;
165 } bits;
166 uint32_t value;
167 } gop_header;
168
172
189typedef struct _VAEncPictureParameterBufferMPEG2 {
213 VAEncPictureType picture_type;
217 uint32_t vbv_delay;
219 uint8_t f_code[2][2];
220 union {
221 struct {
223 uint32_t intra_dc_precision : 2;
225 uint32_t picture_structure : 2;
227 uint32_t top_field_first : 1;
233 uint32_t q_scale_type : 1;
235 uint32_t intra_vlc_format : 1;
237 uint32_t alternate_scan : 1;
239 uint32_t repeat_first_field : 1;
241 uint32_t progressive_frame : 1;
244 } bits;
245 uint32_t value;
246 } picture_coding_extension;
247
248 /* \brief Parameters for composite display
249 *
250 * Valid only when omposite_display_flag is 1
251 */
252 union {
253 struct {
255 uint32_t v_axis : 1;
257 uint32_t field_sequence : 3;
259 uint32_t sub_carrier : 1;
261 uint32_t burst_amplitude : 7;
263 uint32_t sub_carrier_phase : 8;
264 } bits;
265 uint32_t value;
266 } composite_display;
267
271
276typedef struct _VAEncSliceParameterBufferMPEG2 {
285
289
290typedef struct _VAEncMiscParameterExtensionDataSeqDisplayMPEG2 {
292 uint8_t extension_start_code_identifier;
294 uint8_t video_format;
295 uint8_t colour_description;
296 uint8_t colour_primaries;
297 uint8_t transfer_characteristics;
298 uint8_t matrix_coefficients;
299 uint16_t display_horizontal_size;
300 uint16_t display_vertical_size;
301} VAEncMiscParameterExtensionDataSeqDisplayMPEG2;
303
304#ifdef __cplusplus
305}
306#endif
307
308#endif /* _VA_ENC_MPEG2_H_ */
#define VA_PADDING_LOW
Definition va.h:360
VAGenericID VABufferID
Definition va.h:2019
@ VAEncPackedHeaderPicture
Packed picture header.
Definition va.h:2400
@ VAEncPackedHeaderSequence
Packed sequence header.
Definition va.h:2398
@ VAEncPackedHeaderSlice
Packed slice header.
Definition va.h:2402
VAIQMatrixBufferMPEG2 VAQMatrixBufferMPEG2
MPEG-2 Quantization Matrix Buffer.
Definition va_enc_mpeg2.h:49
VAEncPackedHeaderTypeMPEG2
Packed header types specific to MPEG-2 encoding.
Definition va_enc_mpeg2.h:56
@ VAEncPackedHeaderMPEG2_PPS
Packed Picture Parameter Set (PPS).
Definition va_enc_mpeg2.h:66
@ VAEncPackedHeaderMPEG2_SPS
Packed Sequence Parameter Set (SPS).
Definition va_enc_mpeg2.h:61
@ VAEncPackedHeaderMPEG2_Slice
Packed slice header.
Definition va_enc_mpeg2.h:71
Picture parameter for MPEG-2 encoding.
Definition va_enc_mpeg2.h:189
VABufferID coded_buf
Output encoded bitstream.
Definition va_enc_mpeg2.h:203
uint32_t intra_vlc_format
Same as the element in Picture coding extension.
Definition va_enc_mpeg2.h:235
uint32_t q_scale_type
Same as the element in Picture coding extension.
Definition va_enc_mpeg2.h:233
uint32_t alternate_scan
Same as the element in Picture coding extension.
Definition va_enc_mpeg2.h:237
VASurfaceID forward_reference_picture
Forward reference picture.
Definition va_enc_mpeg2.h:191
VASurfaceID backward_reference_picture
Backward reference picture.
Definition va_enc_mpeg2.h:193
uint32_t va_reserved[VA_PADDING_LOW]
Reserved bytes for future use, must be zero.
Definition va_enc_mpeg2.h:269
uint32_t frame_pred_frame_dct
Same as the element in Picture coding extension.
Definition va_enc_mpeg2.h:229
uint32_t concealment_motion_vectors
Same as the element in Picture coding extension.
Definition va_enc_mpeg2.h:231
uint32_t temporal_reference
Same as the element in picture_header()
Definition va_enc_mpeg2.h:215
uint32_t sub_carrier_phase
Same as the element in Picture coding extension.
Definition va_enc_mpeg2.h:263
VASurfaceID reconstructed_picture
Reconstructed(decoded) picture.
Definition va_enc_mpeg2.h:195
uint32_t vbv_delay
Same as the element in picture_header()
Definition va_enc_mpeg2.h:217
uint32_t picture_structure
Same as the element in Picture coding extension.
Definition va_enc_mpeg2.h:225
uint8_t last_picture
Flag to indicate the picture is the last one or not.
Definition va_enc_mpeg2.h:211
uint32_t composite_display_flag
Same as the element in Picture coding extension.
Definition va_enc_mpeg2.h:243
uint32_t burst_amplitude
Same as the element in Picture coding extension.
Definition va_enc_mpeg2.h:261
VAEncPictureType picture_type
Picture type.
Definition va_enc_mpeg2.h:213
uint32_t field_sequence
Same as the element in Picture coding extension.
Definition va_enc_mpeg2.h:257
uint32_t top_field_first
Same as the element in Picture coding extension.
Definition va_enc_mpeg2.h:227
uint32_t repeat_first_field
Same as the element in Picture coding extension.
Definition va_enc_mpeg2.h:239
uint32_t sub_carrier
Same as the element in Picture coding extension.
Definition va_enc_mpeg2.h:259
uint32_t progressive_frame
Same as the element in Picture coding extension.
Definition va_enc_mpeg2.h:241
uint8_t f_code[2][2]
Same as the element in Picture coding extension.
Definition va_enc_mpeg2.h:219
uint32_t intra_dc_precision
Same as the element in Picture coding extension.
Definition va_enc_mpeg2.h:223
uint32_t v_axis
Same as the element in Picture coding extension.
Definition va_enc_mpeg2.h:255
Sequence parameter for MPEG-2 encoding.
Definition va_enc_mpeg2.h:90
uint32_t intra_period
Period between I frames.
Definition va_enc_mpeg2.h:92
float frame_rate
Frame rate.
Definition va_enc_mpeg2.h:130
uint32_t va_reserved[VA_PADDING_LOW]
Reserved bytes for future use, must be zero.
Definition va_enc_mpeg2.h:170
uint32_t frame_rate_extension_d
Same as the element in Sequence extension()
Definition va_enc_mpeg2.h:149
uint32_t vbv_buffer_size
Define the size of VBV.
Definition va_enc_mpeg2.h:134
uint32_t time_code
Time code.
Definition va_enc_mpeg2.h:160
uint32_t progressive_sequence
Same as the element in Sequence extension()
Definition va_enc_mpeg2.h:141
uint32_t broken_link
SAme as the element in GOP header.
Definition va_enc_mpeg2.h:164
uint32_t frame_rate_extension_n
Same as the element in Sequence extension()
Definition va_enc_mpeg2.h:147
uint32_t chroma_format
Same as the element in Sequence extension()
Definition va_enc_mpeg2.h:143
uint32_t profile_and_level_indication
Same as the element in Sequence extension()
Definition va_enc_mpeg2.h:139
uint32_t bits_per_second
Initial bitrate set for this sequence in CBR or VBR modes.
Definition va_enc_mpeg2.h:122
uint32_t closed_gop
Same as the element in GOP header.
Definition va_enc_mpeg2.h:162
uint16_t aspect_ratio_information
Same as the element in sequence_header()
Definition va_enc_mpeg2.h:132
uint16_t picture_width
Picture width.
Definition va_enc_mpeg2.h:102
uint32_t ip_period
Period between I/P frames.
Definition va_enc_mpeg2.h:94
uint16_t picture_height
Picture height.
Definition va_enc_mpeg2.h:110
uint32_t new_gop_header
Flag to indicate the following GOP header are being updated.
Definition va_enc_mpeg2.h:155
uint32_t low_delay
Same as the element in Sequence extension()
Definition va_enc_mpeg2.h:145
Slice parameter for MPEG-2 encoding.
Definition va_enc_mpeg2.h:276
int32_t quantiser_scale_code
Same as the element in slice()
Definition va_enc_mpeg2.h:282
uint32_t num_macroblocks
Number of macroblocks in this slice.
Definition va_enc_mpeg2.h:280
uint32_t va_reserved[VA_PADDING_LOW]
Reserved bytes for future use, must be zero.
Definition va_enc_mpeg2.h:287
uint32_t macroblock_address
Starting MB address for this slice.
Definition va_enc_mpeg2.h:278
int32_t is_intra_slice
Flag to indicate intra slice.
Definition va_enc_mpeg2.h:284
Definition va.h:3152