develop/api/rocdecode.h Source File#
rocdecode.h
Go to the documentation of this file.
95 } rocDecVideoCodec;
115 /**************************************************************************************************************/
120 /**************************************************************************************************************/
126 } rocDecVideoChromaFormat;
140 rocDecodeStatus_Error_Concealed = 9, // Decode is completed with an error and error is concealed
144 /**************************************************************************************************************/
148 /**************************************************************************************************************/
165 /**************************************************************************************************************/
169 /**************************************************************************************************************/
206 /*********************************************************************************************************/
211 /*********************************************************************************************************/
380 uint32_t is_first_field : 1; // indicate whether the current field is the first field for field picture
1682 /*****************************************************************************************************/
1686 /*****************************************************************************************************/
1687 extern rocDecStatus ROCDECAPI rocDecCreateDecoder(rocDecDecoderHandle *decoder_handle, RocDecoderCreateInfo *decoder_create_info);
1689 /*****************************************************************************************************/
1693 /*****************************************************************************************************/
1696 /**********************************************************************************************************************/
1703 /**********************************************************************************************************************/
1706 /*****************************************************************************************************/
1711 /*****************************************************************************************************/
1712 extern rocDecStatus ROCDECAPI rocDecDecodeFrame(rocDecDecoderHandle decoder_handle, RocdecPicParams *pic_params);
1714 /************************************************************************************************************/
1720 /************************************************************************************************************/
1721 extern rocDecStatus ROCDECAPI rocDecGetDecodeStatus(rocDecDecoderHandle decoder_handle, int pic_idx, RocdecDecodeStatus *decode_status);
1723 /*********************************************************************************************************/
1728 /*********************************************************************************************************/
1729 extern rocDecStatus ROCDECAPI rocDecReconfigureDecoder(rocDecDecoderHandle decoder_handle, RocdecReconfigureDecoderInfo *reconfig_params);
1731 /************************************************************************************************************************/
1739 /************************************************************************************************************************/
1740 extern rocDecStatus ROCDECAPI rocDecGetVideoFrame(rocDecDecoderHandle decoder_handle, int pic_idx,
1744 /*****************************************************************************************************/
1748 /*****************************************************************************************************/
rocDecStatus ROCDECAPI rocDecCreateDecoder(rocDecDecoderHandle *decoder_handle, RocDecoderCreateInfo *decoder_create_info)
rocDecStatus ROCDECAPI rocDecReconfigureDecoder(rocDecDecoderHandle decoder_handle, RocdecReconfigureDecoderInfo *reconfig_params)
int poc
picture order count. ! in HEVC, POCs for top and bottom fields of same picture should take different ...
Definition: rocdecode.h:283
rocDecStatus ROCDECAPI rocDecDecodeFrame(rocDecDecoderHandle decoder_handle, RocdecPicParams *pic_params)
rocDecStatus ROCDECAPI rocDecDestroyDecoder(rocDecDecoderHandle decoder_handle)
const char *ROCDECAPI rocDecGetErrorName(rocDecStatus rocdec_status)
rocDecStatus ROCDECAPI rocDecGetDecodeStatus(rocDecDecoderHandle decoder_handle, int pic_idx, RocdecDecodeStatus *decode_status)
struct _RocdecAv1SegmentationStruct RocdecAv1SegmentationStruct
Segmentation Information for AV1.
@ rocDecVideoSurfaceFormat_YUV444_16Bit
Definition: rocdecode.h:108
@ rocDecVideoSurfaceFormat_YUV420_16Bit
Definition: rocdecode.h:111
struct _RocdecAv1FilmGrainStruct RocdecAv1FilmGrainStruct
Film Grain Information for AV1.
struct _RocdecVp9SegmentParameter RocdecVp9SegmentParameter
VP9 Segmentation Parameter Data Structure This structure is configured to be the same as VA-API VASeg...
Definition: rocdecode.h:170
struct _RocDecoderCreateInfo::@1 target_rect
rocDecVideoChromaFormat chroma_format
Definition: rocdecode.h:177
rocDecVideoSurfaceFormat output_format
Definition: rocdecode.h:192
struct _RocDecoderCreateInfo::@0 display_rect
Definition: rocdecode.h:1178
union _RocdecAV1PicParams::@29 loop_restoration_fields
loop restoration parameters
int8_t u_ac_delta_q
U AC delta from Y AC value range [-64..63].
Definition: rocdecode.h:1446
uint8_t filter_level_u
chroma loop filter levels. value range [0..63].
Definition: rocdecode.h:1399
int ref_frame_map[8]
Surface indices of reference frames in DPB.
Definition: rocdecode.h:1289
uint8_t tile_cols
tile structure When uniform_tile_spacing_flag == 1, width_in_sbs_minus_1[] and height_in_sbs_minus_1[...
Definition: rocdecode.h:1321
uint8_t matrix_coefficients
corresponds to AV1 spec variable of the same name.
Definition: rocdecode.h:1197
uint8_t sharpness_level
flags for reference pictures same syntax and semantic as those in AV1 code
Definition: rocdecode.h:1407
int8_t u_dc_delta_q
U DC delta from Y AC value range [-64..63].
Definition: rocdecode.h:1442
uint16_t qm_y
qm level value range [0..15] Invalid if using_qmatrix equals 0.
Definition: rocdecode.h:1465
int8_t ref_deltas[8]
The adjustment needed for the filter level based on the chosen reference frame. value range [-64....
Definition: rocdecode.h:1421
uint8_t bit_depth_idx
bit depth index value range [0..2] 0 - bit depth 8; 1 - bit depth 10; 2 - bit depth 12;
Definition: rocdecode.h:1194
uint32_t tx_mode
read_tx_mode value range [0..2]
Definition: rocdecode.h:1494
uint16_t frame_width_minus1
Picture resolution minus 1 Picture original resolution. If SuperRes is enabled, this is the upscaled ...
Definition: rocdecode.h:1270
uint8_t anchor_frames_num
number of anchor frames for large scale tile This parameter gives the number of entries of anchor_fra...
Definition: rocdecode.h:1243
int8_t v_ac_delta_q
V AC delta from Y AC value range [-64..63].
Definition: rocdecode.h:1454
int8_t v_dc_delta_q
V DC delta from Y AC value range [-64..63].
Definition: rocdecode.h:1450
uint8_t reserved
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:1412
uint8_t primary_ref_frame
primary reference frame index Index into ref_frame_idx[], specifying which reference frame contains p...
Definition: rocdecode.h:1310
uint32_t enable_interintra_compound
Definition: rocdecode.h:1207
int current_frame
Picture level information.
Definition: rocdecode.h:1231
uint8_t cdef_damping_minus_3
CDEF parameters.
Definition: rocdecode.h:1512
uint8_t ref_frame_idx[7]
Reference frame indices.
Definition: rocdecode.h:1301
uint8_t filter_level[2]
luma loop filter levels. value range [0..63].
Definition: rocdecode.h:1394
uint16_t reserved
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:1470
uint32_t delta_q_present_flag
delta_q parameters
Definition: rocdecode.h:1479
uint16_t output_frame_width_in_tiles_minus_1
Output frame buffer size in unit of tiles Valid only when large_scale_tile equals 1....
Definition: rocdecode.h:1277
uint32_t large_scale_tile
indicate if current frame in large scale tile mode
Definition: rocdecode.h:1372
int8_t mode_deltas[2]
The adjustment needed for the filter level based on the chosen mode. value range [-64....
Definition: rocdecode.h:1427
uint8_t superres_scale_denominator
Supper resolution scale denominator. When use_superres=1, superres_scale_denominator must be in the r...
Definition: rocdecode.h:1384
uint32_t frame_type
Frame Type: 0: KEY_FRAME; 1: INTER_FRAME; 2: INTRA_ONLY_FRAME; 3: SWITCH_FRAME For SWITCH_FRAME,...
Definition: rocdecode.h:1355
uint32_t delta_lf_multi
CONFIG_LOOPFILTER_LEVEL.
Definition: rocdecode.h:1489
uint32_t delta_lf_present_flag
delta_lf parameters
Definition: rocdecode.h:1484
struct _RocdecAV1PicParams::@25::@31 bits
flags for current picture same syntax and semantic as those in AV1 code
int8_t y_dc_delta_q
Y DC delta from Y AC value range [-64..63].
Definition: rocdecode.h:1438
int current_display_picture
display buffer of current picture Used for film grain applied decoded picture. Valid only when apply_...
Definition: rocdecode.h:1237
uint8_t interp_filter
Interpolation filter. value range [0..4].
Definition: rocdecode.h:1389
int * anchor_frames_list
anchor frame list for large scale tile For large scale tile applications, the anchor frames could com...
Definition: rocdecode.h:1263
uint16_t tile_count_minus_1
number of tiles minus 1 in large scale tile list Same as AV1 semantic element. Valid only when large_...
Definition: rocdecode.h:1336
uint32_t reserved
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:1221
uint32_t apply_grain
Specify whether or not film grain is applied on current frame. If set to 0, all the rest parameters s...
Definition: rocdecode.h:1099
uint32_t reserved
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:1108
int16_t feature_data[8][8]
Segmentation parameters for current frame. feature_data[segment_id][feature_id] where segment_id has ...
Definition: rocdecode.h:1077
uint32_t reserved
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:1051
uint8_t feature_mask[8]
indicates if a feature is enabled or not. Each bit field itself is the feature_id....
Definition: rocdecode.h:1084
Definition: rocdecode.h:1570
uint8_t anchor_frame_idx
anchor frame index for large scale tile. index into an array AnchorFrames of the frames that the tile...
Definition: rocdecode.h:1597
uint32_t slice_data_size
The byte count of current tile in the bitstream buffer, starting from first byte of the buffer....
Definition: rocdecode.h:1576
uint16_t tile_idx_in_tile_list
tile index in the tile list. Valid only when large_scale_tile is enabled. Driver uses this field to d...
Definition: rocdecode.h:1603
uint32_t reserved[4]
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:1606
Definition: rocdecode.h:1154
RocdecAv1TransformationType wmtype
Specify the type of warped motion.
Definition: rocdecode.h:1156
int32_t wmmat[8]
Specify warp motion parameters wm.wmmat[] corresponds to gm_params[][] in spec. Details in AV1 spec s...
Definition: rocdecode.h:1163
uint32_t reserved[4]
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:1169
Definition: rocdecode.h:515
uint8_t scaling_list_8x8[2][64]
8x8 scaling list, in raster scan order.
Definition: rocdecode.h:519
uint32_t reserved[4]
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:521
uint8_t scaling_list_4x4[6][16]
4x4 scaling list, in raster scan order.
Definition: rocdecode.h:517
Definition: rocdecode.h:406
Definition: rocdecode.h:253
Definition: rocdecode.h:465
uint16_t slice_data_bit_offset
Bit offset from NAL Header Unit to the begining of slice_data().
Definition: rocdecode.h:479
Definition: rocdecode.h:149
Definition: rocdecode.h:212
Definition: rocdecode.h:740
uint8_t scaling_list_8x8[6][64]
8x8 scaling, correspongs i = 1, MatrixID is in the range of 0 to 5, inclusive. And j is in the range ...
Definition: rocdecode.h:752
uint8_t scaling_list_4x4[6][16]
4x4 scaling, correspongs i = 0, MatrixID is in the range of 0 to 5, inclusive. And j is in the range ...
Definition: rocdecode.h:746
uint8_t scaling_list_dc_32x32[2]
DC values of the 32x32 scaling lists, corresponds to HEVC spec syntax scaling_list_dc_coef_minus8[ si...
Definition: rocdecode.h:778
uint8_t scaling_list_16x16[6][64]
16x16 scaling, correspongs i = 2, MatrixID is in the range of 0 to 5, inclusive. And j is in the rang...
Definition: rocdecode.h:758
uint8_t scaling_list_dc_16x16[6]
DC values of the 16x16 scaling lists, corresponds to HEVC spec syntax scaling_list_dc_coef_minus8[ si...
Definition: rocdecode.h:771
uint8_t scaling_list_32x32[2][64]
32x32 scaling, correspongs i = 3, MatrixID is in the range of 0 to 1, inclusive. And j is in the rang...
Definition: rocdecode.h:764
Definition: rocdecode.h:530
uint16_t column_width_minus1[19]
Definition: rocdecode.h:590
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: rocdecode.h:639
uint8_t sps_max_dec_pic_buffering_minus1
Definition: rocdecode.h:566
uint32_t no_pic_reordering_flag
Definition: rocdecode.h:557
uint32_t lists_modification_present_flag
Definition: rocdecode.h:596
uint8_t log2_max_pic_order_cnt_lsb_minus4
Definition: rocdecode.h:621
Definition: rocdecode.h:276
Definition: rocdecode.h:649
uint32_t slice_segment_address
Definition: rocdecode.h:670
uint32_t slice_data_flag
Slice data buffer flags. See VA_SLICE_DATA_FLAG_XXX.
Definition: rocdecode.h:657
uint8_t five_minus_max_num_merge_cand
Definition: rocdecode.h:721
uint32_t slice_data_offset
The offset to the NAL unit header for this slice.
Definition: rocdecode.h:655
uint32_t slice_data_size
Number of bytes in the slice data buffer for this slice counting from and including NAL unit header.
Definition: rocdecode.h:653
int8_t delta_luma_weight_l1[15]
Definition: rocdecode.h:715
uint16_t slice_data_num_emu_prevn_bytes
Number of emulation prevention bytes in slice header.
Definition: rocdecode.h:725
uint8_t ref_pic_list[2][15]
index into ReferenceFrames[] ref_pic_list[0][] corresponds to RefPicList0[] of HEVC variable....
Definition: rocdecode.h:676
uint32_t dependent_slice_segment_flag
Definition: rocdecode.h:683
uint32_t slice_data_byte_offset
Byte offset from NAL unit header to the begining of slice_data().
Definition: rocdecode.h:668
Definition: rocdecode.h:333
Definition: rocdecode.h:360
Definition: rocdecode.h:343
Definition: rocdecode.h:1616
union _RocdecPicParams::@37 slice_params
Variable size array. The user should allocate one slice param struct for each slice.
Definition: rocdecode.h:1667
Definition: rocdecode.h:224
struct _RocdecReconfigureDecoderInfo::@3 target_rect
uint32_t num_decode_surfaces
Definition: rocdecode.h:229
struct _RocdecReconfigureDecoderInfo::@2 display_rect
Definition: rocdecode.h:395
Definition: rocdecode.h:788
uint32_t reference_frames[8]
Surface indices of reference frames in DPB.
Definition: rocdecode.h:806
uint32_t last_ref_frame_sign_bias
Sign Bias of the LAST reference frame. It corresponds to ref_frame_sign_bias[LAST_FRAME] in VP9 code.
Definition: rocdecode.h:843
uint32_t segmentation_update_map
corresponds to variable update_mb_segmentation_map in VP9 code.
Definition: rocdecode.h:833
uint16_t frame_width
picture width Picture original resolution. The value may not be multiple of 8.
Definition: rocdecode.h:792
uint8_t profile
VP9 Profile definition value range [0..3].
Definition: rocdecode.h:912
uint8_t log2_tile_rows
number of tile rows specified by (1 << log2_tile_rows). It corresponds the variable with same name in...
Definition: rocdecode.h:882
uint32_t golden_ref_frame
Index of reference_frames[] and points to the GOLDERN reference frame. It corresponds to active_ref_i...
Definition: rocdecode.h:848
uint32_t last_ref_frame
Index of reference_frames[] and points to the LAST reference frame. It corresponds to active_ref_idx[...
Definition: rocdecode.h:839
uint32_t segmentation_temporal_update
corresponds to variable temporal_update in VP9 code.
Definition: rocdecode.h:829
uint8_t mb_segment_tree_probs[7]
Definition: rocdecode.h:906
uint32_t alt_ref_frame_sign_bias
Sign Bias of the ALTERNATE reference frame. Corresponds to ref_frame_sign_bias[ALTREF_FRAME] in VP9 c...
Definition: rocdecode.h:861
uint8_t log2_tile_columns
number of tile columns specified by (1 << log2_tile_columns). It corresponds the variable with same n...
Definition: rocdecode.h:886
uint32_t alt_ref_frame
Index of reference_frames[] and points to the ALTERNATE reference frame. Corresponds to active_ref_id...
Definition: rocdecode.h:857
uint32_t lossless_flag
Lossless Mode LosslessFlag = base_qindex == 0 && y_dc_delta_q == 0 && uv_dc_delta_q == 0 && uv_ac_del...
Definition: rocdecode.h:870
uint32_t subsampling_x
flags for current picture same syntax and semantic as those in VP9 code
Definition: rocdecode.h:813
uint32_t va_reserved[8]
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:920
uint32_t golden_ref_frame_sign_bias
Sign Bias of the GOLDERN reference frame. Corresponds to ref_frame_sign_bias[GOLDERN_FRAME] in VP9 co...
Definition: rocdecode.h:852
uint8_t bit_depth
VP9 bit depth per sample same for both luma and chroma samples.
Definition: rocdecode.h:917
uint8_t frame_header_length_in_bytes
Number of bytes taken up by the uncompressed frame header, which corresponds to byte length of functi...
Definition: rocdecode.h:895
uint16_t first_partition_size
The byte count of compressed header the bitstream buffer, which corresponds to syntax first_partition...
Definition: rocdecode.h:900
uint16_t frame_height
picture height Picture original resolution. The value may not be multiple of 8.
Definition: rocdecode.h:796
VP9 Segmentation Parameter Data Structure This structure is configured to be the same as VA-API VASeg...
Definition: rocdecode.h:928
uint8_t filter_level[4][2]
Specifies the filter level information per segment. The value corresponds to variable lfi->lvl[seg][r...
Definition: rocdecode.h:959
int16_t luma_dc_quant_scale
Specifies per segment Luma DC quantization scale. Corresponding to y_dequant[qindex][0] in vp9_mb_ini...
Definition: rocdecode.h:969
uint32_t va_reserved[4]
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:982
uint16_t segment_reference
Specifies per segment reference indication. 0: reserved 1: Last ref 2: golden 3: altref Value can be ...
Definition: rocdecode.h:945
int16_t chroma_dc_quant_scale
Specifies per segment Chroma DC quantization scale. Corresponding to uv_dequant[qindex][0] in vp9_mb_...
Definition: rocdecode.h:979
int16_t luma_ac_quant_scale
Specifies per segment Luma AC quantization scale. Corresponding to y_dequant[qindex][1] in vp9_mb_ini...
Definition: rocdecode.h:964
uint16_t segment_reference_skipped
Indicates if per segment skip feature is enabled. Corresponding to variable feature_enabled when j ==...
Definition: rocdecode.h:950
int16_t chroma_ac_quant_scale
Specifies per segment Chroma AC quantization scale. Corresponding to uv_dequant[qindex][1] in vp9_mb_...
Definition: rocdecode.h:974
uint16_t segment_reference_enabled
Indicates if per segment reference frame indicator is enabled. Corresponding to variable feature_enab...
Definition: rocdecode.h:936
Definition: rocdecode.h:992
uint32_t slice_data_size
The byte count of current frame in the bitstream buffer, starting from first byte of the buffer....
Definition: rocdecode.h:998
RocdecVp9SegmentParameter seg_param[8]
per segment information
Definition: rocdecode.h:1011
uint32_t va_reserved[4]
Reserved bytes for future use, must be zero.
Definition: rocdecode.h:1014