VA-API  2.13.0.pre1
va_dec_hevc.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 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 
32 #ifndef VA_DEC_HEVC_H
33 #define VA_DEC_HEVC_H
34 
35 #include <stdint.h>
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
57 typedef struct _VAPictureParameterBufferHEVC
58 {
65  VAPictureHEVC ReferenceFrames[15];
70 
71 
72  union
73  {
74  struct
75  {
77  uint32_t chroma_format_idc : 2;
78  uint32_t separate_colour_plane_flag : 1;
79  uint32_t pcm_enabled_flag : 1;
80  uint32_t scaling_list_enabled_flag : 1;
81  uint32_t transform_skip_enabled_flag : 1;
82  uint32_t amp_enabled_flag : 1;
83  uint32_t strong_intra_smoothing_enabled_flag : 1;
84  uint32_t sign_data_hiding_enabled_flag : 1;
85  uint32_t constrained_intra_pred_flag : 1;
86  uint32_t cu_qp_delta_enabled_flag : 1;
87  uint32_t weighted_pred_flag : 1;
88  uint32_t weighted_bipred_flag : 1;
89  uint32_t transquant_bypass_enabled_flag : 1;
90  uint32_t tiles_enabled_flag : 1;
91  uint32_t entropy_coding_sync_enabled_flag : 1;
92  uint32_t pps_loop_filter_across_slices_enabled_flag : 1;
93  uint32_t loop_filter_across_tiles_enabled_flag : 1;
94  uint32_t pcm_loop_filter_disabled_flag : 1;
96  uint32_t NoPicReorderingFlag : 1;
98  uint32_t NoBiPredFlag : 1;
99 
100  uint32_t ReservedBits : 11;
101  } bits;
102  uint32_t value;
103  } pic_fields;
104 
108  uint8_t bit_depth_luma_minus8;
109  uint8_t bit_depth_chroma_minus8;
110  uint8_t pcm_sample_bit_depth_luma_minus1;
111  uint8_t pcm_sample_bit_depth_chroma_minus1;
112  uint8_t log2_min_luma_coding_block_size_minus3;
113  uint8_t log2_diff_max_min_luma_coding_block_size;
114  uint8_t log2_min_transform_block_size_minus2;
115  uint8_t log2_diff_max_min_transform_block_size;
116  uint8_t log2_min_pcm_luma_coding_block_size_minus3;
117  uint8_t log2_diff_max_min_pcm_luma_coding_block_size;
118  uint8_t max_transform_hierarchy_depth_intra;
119  uint8_t max_transform_hierarchy_depth_inter;
120  int8_t init_qp_minus26;
121  uint8_t diff_cu_qp_delta_depth;
122  int8_t pps_cb_qp_offset;
123  int8_t pps_cr_qp_offset;
124  uint8_t log2_parallel_merge_level_minus2;
125  uint8_t num_tile_columns_minus1;
126  uint8_t num_tile_rows_minus1;
131  uint16_t column_width_minus1[19];
132  uint16_t row_height_minus1[21];
133 
142  union
143  {
144  struct
145  {
148  uint32_t long_term_ref_pics_present_flag : 1;
149  uint32_t sps_temporal_mvp_enabled_flag : 1;
150  uint32_t cabac_init_present_flag : 1;
151  uint32_t output_flag_present_flag : 1;
152  uint32_t dependent_slice_segments_enabled_flag : 1;
153  uint32_t pps_slice_chroma_qp_offsets_present_flag : 1;
154  uint32_t sample_adaptive_offset_enabled_flag : 1;
155  uint32_t deblocking_filter_override_enabled_flag : 1;
156  uint32_t pps_disable_deblocking_filter_flag : 1;
157  uint32_t slice_segment_header_extension_present_flag : 1;
158 
160  uint32_t RapPicFlag : 1;
162  uint32_t IdrPicFlag : 1;
164  uint32_t IntraPicFlag : 1;
165 
166  uint32_t ReservedBits : 18;
167  } bits;
168  uint32_t value;
169  } slice_parsing_fields;
170 
173  uint8_t num_short_term_ref_pic_sets;
174  uint8_t num_long_term_ref_pic_sps;
175  uint8_t num_ref_idx_l0_default_active_minus1;
176  uint8_t num_ref_idx_l1_default_active_minus1;
177  int8_t pps_beta_offset_div2;
178  int8_t pps_tc_offset_div2;
179  uint8_t num_extra_slice_header_bits;
180 
191  uint32_t st_rps_bits;
192 
194  uint32_t va_reserved[VA_PADDING_MEDIUM];
196 
209 typedef struct _VAPictureParameterBufferHEVCRext
210 {
211  union
212  {
213  struct
214  {
220  uint32_t transform_skip_context_enabled_flag : 1;
221  uint32_t implicit_rdpcm_enabled_flag : 1;
222  uint32_t explicit_rdpcm_enabled_flag : 1;
223  uint32_t extended_precision_processing_flag : 1;
224  uint32_t intra_smoothing_disabled_flag : 1;
225  uint32_t high_precision_offsets_enabled_flag : 1;
226  uint32_t persistent_rice_adaptation_enabled_flag : 1;
227  uint32_t cabac_bypass_alignment_enabled_flag : 1;
228  uint32_t cross_component_prediction_enabled_flag : 1;
229  uint32_t chroma_qp_offset_list_enabled_flag : 1;
230 
232  uint32_t reserved : 21;
233  } bits;
234  uint32_t value;
235  } range_extension_pic_fields;
236 
242  uint8_t chroma_qp_offset_list_len_minus1;
243  uint8_t log2_sao_offset_scale_luma;
244  uint8_t log2_sao_offset_scale_chroma;
245  uint8_t log2_max_transform_skip_block_size_minus2;
246  int8_t cb_qp_offset_list[6];
247  int8_t cr_qp_offset_list[6];
249 
263 typedef struct _VAPictureParameterBufferHEVCScc
264 {
265  union
266  {
267  struct
268  {
273  /* indicates if intra block copy (IBC) is enabled or not. */
275  /* indicates if Palette Mode is enabled or not. */
276  uint32_t palette_mode_enabled_flag : 1;
277  /* controls the presence and inference of the use_integer_mv_flag syntax
278  * in slice segment header that specifies the resolution of motion
279  * vectors for inter prediction.
280  */
281  uint32_t motion_vector_resolution_control_idc : 2;
282  /* specifies that the intra boundary filtering process is
283  * disabled or not for intra prediction.
284  */
285  uint32_t intra_boundary_filtering_disabled_flag : 1;
286  /* specifies that an adaptive colour transform may be applied
287  * to the residual in the decoding process.
288  */
289  uint32_t residual_adaptive_colour_transform_enabled_flag : 1;
290 
291  /* specifies that slice_act_y_qp_offset, slice_act_cb_qp_offset,
292  * slice_act_cr_qp_offset are present in the slice header
293  */
294  uint32_t pps_slice_act_qp_offsets_present_flag : 1;
295 
297  uint32_t reserved : 25;
298  } bits;
299  uint32_t value;
300  } screen_content_pic_fields;
301 
302  /* specifies the maximum allowed palette size. */
303  uint8_t palette_max_size;
304  /* Correspond to HEVC syntax elements of the same names.
305  * It specifies the difference between the maximum allowed palette
306  * predictor size and the maximum allowed palette size.
307  * App needs to enforce that the variable PaletteMaxPredictorSize,
308  * which is derived as follows:
309  * PaletteMaxPredictorSize = palette_max_size + delta_palette_max_predictor_size
310  * should have a value range of [0..128].
311  */
312  uint8_t delta_palette_max_predictor_size;
324  uint16_t predictor_palette_entries[3][128];
325  /* are used to determine the offsets that are applied to the
326  * quantization parameter values for the luma, Cb and Cr
327  * components, respectively.
328  */
329  int8_t pps_act_y_qp_offset_plus5;
330  int8_t pps_act_cb_qp_offset_plus5;
331  int8_t pps_act_cr_qp_offset_plus3;
333 
342 typedef struct _VAPictureParameterBufferHEVCExtension
343 {
347 
351 
356 
370 typedef struct _VASliceParameterBufferHEVC
371 {
379  uint32_t slice_data_size;
383  uint32_t slice_data_flag;
402  uint8_t RefPicList[2][15];
403  union
404  {
405  uint32_t value;
406  struct
407  {
409  uint32_t LastSliceOfPic : 1;
413  uint32_t slice_type : 2;
415  uint32_t color_plane_id : 2;
417  uint32_t slice_sao_luma_flag : 1;
419  uint32_t slice_sao_chroma_flag : 1;
421  uint32_t mvd_l1_zero_flag : 1;
423  uint32_t cabac_init_flag : 1;
432  uint32_t reserved : 18;
433  } fields;
434  } LongSliceFlags;
435 
467  int8_t delta_luma_weight_l0[15];
469  int8_t luma_offset_l0[15];
471  int8_t delta_chroma_weight_l0[15][2];
473  int8_t ChromaOffsetL0[15][2];
475  int8_t delta_luma_weight_l1[15];
477  int8_t luma_offset_l1[15];
479  int8_t delta_chroma_weight_l1[15][2];
481  int8_t ChromaOffsetL1[15][2];
493  uint32_t va_reserved[VA_PADDING_LOW - 2];
495 
513 typedef struct _VASliceParameterBufferHEVCRext
514 {
515  /* below four parameters are used to replace data types of the
516  * corresponding parameters of those in \# VASliceParameterBufferHEVC.
517  */
518  int16_t luma_offset_l0[15];
519  int16_t ChromaOffsetL0[15][2];
520  int16_t luma_offset_l1[15];
521  int16_t ChromaOffsetL1[15][2];
522 
523  union
524  {
525  struct
526  {
527  uint32_t cu_chroma_qp_offset_enabled_flag : 1;
528  uint32_t use_integer_mv_flag : 1;
530  uint32_t reserved : 30;
531  } bits;
532  uint32_t value;
533  } slice_ext_flags;
534 
539  int8_t slice_act_cb_qp_offset;
540  int8_t slice_act_cr_qp_offset;
542 
561 typedef struct _VASliceParameterBufferHEVCExtension
562 {
565 
569 
580 typedef struct _VAIQMatrixBufferHEVC
581 {
591  uint8_t ScalingList4x4[6][16];
597  uint8_t ScalingList8x8[6][64];
603  uint8_t ScalingList16x16[6][64];
609  uint8_t ScalingList32x32[2][64];
616  uint8_t ScalingListDC16x16[6];
623  uint8_t ScalingListDC32x32[2];
624 
626  uint32_t va_reserved[VA_PADDING_LOW];
628 
629 
632 #ifdef __cplusplus
633 }
634 #endif
635 
636 #endif /* VA_DEC_HEVC_H */
uint16_t entry_offset_to_subset_array
Definition: va_dec_hevc.h:487
uint32_t chroma_format_idc
Definition: va_dec_hevc.h:77
uint32_t slice_temporal_mvp_enabled_flag
Definition: va_dec_hevc.h:425
uint16_t num_entry_point_offsets
Definition: va_dec_hevc.h:485
HEVC Decoding Picture Parameter Buffer Structure for Screen Content extension.
Definition: va_dec_hevc.h:263
HEVC Decoding Picture Parameter Buffer Structure for Range Extension.
Definition: va_dec_hevc.h:209
uint32_t lists_modification_present_flag
Definition: va_dec_hevc.h:147
uint32_t pps_curr_pic_ref_enabled_flag
HEVC Scc extension flags The following flags bears the same syntax and semantics as those defined in ...
Definition: va_dec_hevc.h:274
uint16_t pic_height_in_luma_samples
picture height, shall be integer multiple of minimum CB size.
Definition: va_dec_hevc.h:69
uint32_t slice_sao_chroma_flag
Definition: va_dec_hevc.h:419
uint8_t luma_log2_weight_denom
Definition: va_dec_hevc.h:463
uint32_t slice_segment_address
Definition: va_dec_hevc.h:396
uint8_t predictor_palette_size
Size of initial palette predictor. It is derived from pps_num_palette_predictor_initializer or sps_nu...
Definition: va_dec_hevc.h:318
uint8_t five_minus_max_num_merge_cand
Definition: va_dec_hevc.h:483
uint32_t reserved
Reserved bytes for future use, must be zero.
Definition: va_dec_hevc.h:232
VAPictureHEVC CurrPic
buffer description of decoded current picture only VA_PICTURE_HEVC_FIELD_PIC and VA_PICTURE_HEVC_BOTT...
Definition: va_dec_hevc.h:63
VAPictureParameterBufferHEVCRext rext
HEVC range extension picture parameters data structure.
Definition: va_dec_hevc.h:350
HEVC Inverse Quantization Matrix Buffer Structure.
Definition: va_dec_hevc.h:580
uint32_t collocated_from_l0_flag
Definition: va_dec_hevc.h:429
uint32_t slice_deblocking_filter_disabled_flag
Definition: va_dec_hevc.h:427
uint32_t slice_data_size
Number of bytes in the slice data buffer for this slice counting from and including NAL unit header...
Definition: va_dec_hevc.h:379
int8_t slice_beta_offset_div2
Definition: va_dec_hevc.h:459
uint32_t NoBiPredFlag
Definition: va_dec_hevc.h:98
HEVC Extented Slice Parameter Buffer Structure For Long Format.
Definition: va_dec_hevc.h:513
uint32_t NoPicReorderingFlag
Definition: va_dec_hevc.h:96
uint32_t mvd_l1_zero_flag
Definition: va_dec_hevc.h:421
uint32_t slice_sao_luma_flag
Definition: va_dec_hevc.h:417
int8_t slice_cb_qp_offset
Definition: va_dec_hevc.h:455
int8_t slice_qp_delta
Definition: va_dec_hevc.h:453
uint32_t slice_type
Definition: va_dec_hevc.h:413
HEVC Slice Parameter Buffer Structure For Long Format.
Definition: va_dec_hevc.h:370
int8_t slice_cr_qp_offset
Definition: va_dec_hevc.h:457
HEVC Decoding Picture Parameter Buffer Structure.
Definition: va_dec_hevc.h:57
uint32_t reserved
Reserved bytes for future use, must be zero.
Definition: va_dec_hevc.h:297
VAPictureParameterBufferHEVC base
basic HEVC picture parameters data structure
Definition: va_dec_hevc.h:346
uint32_t reserved
Reserved bytes for future use, must be zero.
Definition: va_dec_hevc.h:530
uint32_t color_plane_id
Definition: va_dec_hevc.h:415
uint32_t slice_data_offset
The offset to the NAL unit header for this slice.
Definition: va_dec_hevc.h:381
uint32_t cabac_init_flag
Definition: va_dec_hevc.h:423
uint8_t num_ref_idx_l0_active_minus1
Definition: va_dec_hevc.h:446
int8_t slice_tc_offset_div2
Definition: va_dec_hevc.h:461
VAPictureParameterBufferHEVCScc scc
HEVC screen content picture parameters data structure.
Definition: va_dec_hevc.h:354
uint8_t diff_cu_chroma_qp_offset_depth
HEVC range extension flags The following flags bears the same syntax and semantics as those defined i...
Definition: va_dec_hevc.h:241
uint16_t pic_width_in_luma_samples
picture width, shall be integer multiple of minimum CB size.
Definition: va_dec_hevc.h:67
VASliceParameterBufferHEVC base
baseline HEVC slice parameters data structure
Definition: va_dec_hevc.h:564
uint32_t slice_loop_filter_across_slices_enabled_flag
Definition: va_dec_hevc.h:431
uint32_t IntraPicFlag
Definition: va_dec_hevc.h:164
uint8_t collocated_ref_idx
Definition: va_dec_hevc.h:441
HEVC Decoding Picture Parameter Buffer Structure including Extensions.
Definition: va_dec_hevc.h:342
uint32_t LastSliceOfPic
Definition: va_dec_hevc.h:409
#define VA_PADDING_LOW
Definition: va.h:358
uint16_t slice_data_num_emu_prevn_bytes
Number of emulation prevention bytes in slice header.
Definition: va_dec_hevc.h:489
uint32_t st_rps_bits
number of bits that structure short_term_ref_pic_set( num_short_term_ref_pic_sets ) takes in slice se...
Definition: va_dec_hevc.h:191
uint32_t dependent_slice_segment_flag
Definition: va_dec_hevc.h:411
uint32_t transform_skip_rotation_enabled_flag
HEVC range extension flags The following flags bears the same syntax and semantics as those defined i...
Definition: va_dec_hevc.h:219
uint32_t IdrPicFlag
Definition: va_dec_hevc.h:162
int8_t slice_act_y_qp_offset
Screen Content Extension parameters. data range [-12..12].
Definition: va_dec_hevc.h:538
uint8_t num_ref_idx_l1_active_minus1
Definition: va_dec_hevc.h:451
Description of picture properties of those in DPB surfaces.
Definition: va.h:5143
uint32_t RapPicFlag
Definition: va_dec_hevc.h:160
uint8_t log2_max_pic_order_cnt_lsb_minus4
Definition: va_dec_hevc.h:172
VASliceParameterBufferHEVCRext rext
extented HEVC slice parameters data structure
Definition: va_dec_hevc.h:567
uint32_t slice_data_flag
Slice data buffer flags. See VA_SLICE_DATA_FLAG_XXX.
Definition: va_dec_hevc.h:383
int8_t delta_chroma_log2_weight_denom
Definition: va_dec_hevc.h:465
uint8_t sps_max_dec_pic_buffering_minus1
DPB size for current temporal layer.
Definition: va_dec_hevc.h:107
uint32_t slice_data_byte_offset
Byte offset from NAL unit header to the begining of slice_data().
Definition: va_dec_hevc.h:394
HEVC Decoding Slice Parameter Buffer Structure For Long Format including Extensions.
Definition: va_dec_hevc.h:561