rocprofiler-sdk/rocdecode/details/rocdecode.h File Reference

rocprofiler-sdk/rocdecode/details/rocdecode.h File Reference#

Rocprofiler SDK Developer API: rocprofiler-sdk/rocdecode/details/rocdecode.h File Reference
Rocprofiler SDK Developer API 0.6.0
ROCm Profiling API and tools
rocdecode.h File Reference

The AMD rocDecode Library. More...

#include "hip/hip_runtime.h"
#include <rocprofiler-sdk/rocdecode/details/rocdecode_version.h>
+ Include dependency graph for rocdecode.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  RocdecDecodeCaps
 This structure is used in rocDecGetDecoderCaps API. More...
 
struct  RocDecoderCreateInfo
 This structure is used in rocDecCreateDecoder API. More...
 
struct  RocdecDecodeStatus
 Struct for reporting decode status. This structure is used in RocdecGetDecodeStatus API. More...
 
struct  RocdecReconfigureDecoderInfo
 Struct for decoder reset This structure is used in rocDecReconfigureDecoder() API. More...
 
struct  RocdecAvcPicture
 AVC/H.264 Picture Entry This structure is used in RocdecAvcPicParams structure. More...
 
struct  RocdecHevcPicture
 HEVC Picture Entry This structure is used in RocdecHevcPicParams structure. More...
 
struct  RocdecJPEGPicParams
 JPEG picture parameters This structure is used in RocdecPicParams structure. More...
 
struct  RocdecMpeg2QMatrix
 MPEG2 QMatrix This structure is used in _RocdecMpeg2PicParams structure. More...
 
struct  RocdecMpeg2PicParams
 MPEG2 picture parameters This structure is used in RocdecMpeg2PicParams structure. More...
 
struct  RocdecVc1PicParams
 JPEG picture parameters This structure is used in RocdecVc1PicParams structure. More...
 
struct  RocdecAvcPicParams
 AVC picture parameters This structure is used in RocdecAvcPicParams structure This structure is configured to be the same as VA-API VAPictureParameterBufferH264 structure. More...
 
struct  RocdecAvcSliceParams
 AVC slice parameter buffer This structure is configured to be the same as VA-API VASliceParameterBufferH264 structure. More...
 
struct  RocdecAvcIQMatrix
 AVC Inverse Quantization Matrix This structure is configured to be the same as VA-API VAIQMatrixBufferH264 structure. More...
 
struct  RocdecHevcPicParams
 HEVC picture parameters This structure is used in RocdecHevcPicParams structure. More...
 
struct  RocdecHevcSliceParams
 HEVC slice parameters This structure is used in RocdecPicParams structure. More...
 
struct  RocdecHevcIQMatrix
 HEVC IQMatrix This structure is sent once per frame, and only when scaling_list_enabled_flag = 1. When sps_scaling_list_data_present_flag = 0, app still needs to send in this structure with default matrix values. This structure is used in RocdecHevcQMatrix structure. More...
 
struct  RocdecVp9PicParams
 VP9 picture parameters This structure is configured to be the same as VA-API VADecPictureParameterBufferVP9 structure. More...
 
struct  RocdecVp9SegmentParameter
 VP9 Segmentation Parameter Data Structure This structure is configured to be the same as VA-API VASegmentParameterVP9 structure. More...
 
struct  RocdecVp9SliceParams
 VP9 slice parameter buffer This structure is configured to be the same as VA-API VASliceParameterBufferVP9 structure. More...
 
struct  RocdecAv1SegmentationStruct
 Segmentation Information for AV1. More...
 
struct  RocdecAv1FilmGrainStruct
 Film Grain Information for AV1. More...
 
struct  RocdecAv1WarpedMotionParams
 
struct  RocdecAv1PicParams
 AV1 picture parameters This structure is used in RocdecAv1PicParams structure. More...
 
struct  RocdecAv1SliceParams
 AV1 slice parameter buffer This structure is configured to be the same as VA-API VASliceParameterBufferAV1 structure. This structure conveys parameters related to bit stream data and should be sent once per tile. It uses the name RocdecAv1SliceParams to be consistent with other codec, but actually means RocdecTileParameterAV1. Slice data buffer of VASliceDataBufferType is used to send the bitstream. More...
 
struct  RocdecPicParams
 
struct  RocdecProcParams
 Picture parameters for postprocessing This structure is used in rocDecGetVideoFrame API. More...
 
struct  RocDecoderCreateInfo.display_rect
 
struct  RocDecoderCreateInfo.target_rect
 
struct  RocdecReconfigureDecoderInfo.display_rect
 
struct  RocdecReconfigureDecoderInfo.target_rect
 
union  RocdecMpeg2PicParams.picture_coding_extension
 
struct  RocdecMpeg2PicParams.picture_coding_extension.bits
 
union  RocdecAvcPicParams.seq_fields
 
struct  RocdecAvcPicParams.seq_fields.bits
 
union  RocdecAvcPicParams.pic_fields
 
struct  RocdecAvcPicParams.pic_fields.bits
 
union  RocdecHevcPicParams.pic_fields
 
struct  RocdecHevcPicParams.pic_fields.bits
 
union  RocdecHevcPicParams.slice_parsing_fields
 
struct  RocdecHevcPicParams.slice_parsing_fields.bits
 
union  RocdecHevcSliceParams.long_slice_flags
 
struct  RocdecHevcSliceParams.long_slice_flags.fields
 
union  RocdecVp9PicParams.pic_fields
 
struct  RocdecVp9PicParams.pic_fields.bits
 
union  RocdecVp9SegmentParameter.segment_flags
 
struct  RocdecVp9SegmentParameter.segment_flags.fields
 
union  RocdecAv1SegmentationStruct.segment_info_fields
 
struct  RocdecAv1SegmentationStruct.segment_info_fields.bits
 
union  RocdecAv1FilmGrainStruct.film_grain_info_fields
 
struct  RocdecAv1FilmGrainStruct.film_grain_info_fields.bits
 
union  RocdecAv1PicParams.seq_info_fields
 
struct  RocdecAv1PicParams.seq_info_fields.fields
 
union  RocdecAv1PicParams.pic_info_fields
 
struct  RocdecAv1PicParams.pic_info_fields.bits
 flags for current picture same syntax and semantic as those in AV1 code More...
 
union  RocdecAv1PicParams.loop_filter_info_fields
 
struct  RocdecAv1PicParams.loop_filter_info_fields.bits
 
union  RocdecAv1PicParams.qmatrix_fields
 quantization_matrix More...
 
struct  RocdecAv1PicParams.qmatrix_fields.bits
 
union  RocdecAv1PicParams.mode_control_fields
 
struct  RocdecAv1PicParams.mode_control_fields.bits
 
union  RocdecAv1PicParams.loop_restoration_fields
 loop restoration parameters More...
 
struct  RocdecAv1PicParams.loop_restoration_fields.bits
 
union  RocdecPicParams.pic_params
 
union  RocdecPicParams.slice_params
 Variable size array. The user should allocate one slice param struct for each slice. More...
 
union  RocdecPicParams.iq_matrix
 

Macros

#define ROCDECAPI
 
#define ROCPROFILER_SDK_USE_SYSTEM_ROCDECODE   0
 
#define RocdecAvcPicture_FLAGS_INVALID   0x00000001
 
#define RocdecAvcPicture_FLAGS_TOP_FIELD   0x00000002
 
#define RocdecAvcPicture_FLAGS_BOTTOM_FIELD   0x00000004
 
#define RocdecAvcPicture_FLAGS_SHORT_TERM_REFERENCE   0x00000008
 
#define RocdecAvcPicture_FLAGS_LONG_TERM_REFERENCE   0x00000010
 
#define RocdecAvcPicture_FLAGS_NON_EXISTING   0x00000020
 
#define RocdecHevcPicture_INVALID   0x00000001
 
#define RocdecHevcPicture_FIELD_PIC   0x00000002
 indication of interlace scan picture. should take same value for all the pictures in sequence.
 
#define RocdecHevcPicture_BOTTOM_FIELD   0x00000004
 polarity of the field picture. top field takes even lines of buffer surface. bottom field takes odd lines of buffer surface.
 
#define RocdecHevcPicture_LONG_TERM_REFERENCE   0x00000008
 Long term reference picture.
 
#define RocdecHevcPicture_RPS_ST_CURR_BEFORE   0x00000010
 RefPicSetStCurrBefore of HEVC spec variable Number of ReferenceFrames[] entries with this bit set equals NumPocStCurrBefore.
 
#define RocdecHevcPicture_RPS_ST_CURR_AFTER   0x00000020
 RefPicSetStCurrAfter of HEVC spec variable Number of ReferenceFrames[] entries with this bit set equals NumPocStCurrAfter.
 
#define RocdecHevcPicture_RPS_LT_CURR   0x00000040
 RefPicSetLtCurr of HEVC spec variable Number of ReferenceFrames[] entries with this bit set equals NumPocLtCurr.
 

Typedefs

typedef void * rocDecDecoderHandle
 HANDLE pf rocDecDecoder Used in subsequent API calls after rocDecCreateDecoder.
 

Enumerations

enum  rocDecStatus {
  ROCDEC_DEVICE_INVALID = -1 ,
  ROCDEC_CONTEXT_INVALID = -2 ,
  ROCDEC_RUNTIME_ERROR = -3 ,
  ROCDEC_OUTOF_MEMORY = -4 ,
  ROCDEC_INVALID_PARAMETER = -5 ,
  ROCDEC_NOT_IMPLEMENTED = -6 ,
  ROCDEC_NOT_INITIALIZED = -7 ,
  ROCDEC_NOT_SUPPORTED = -8 ,
  ROCDEC_SUCCESS = 0
}
 
enum  rocDecVideoCodec {
  rocDecVideoCodec_MPEG1 = 0 ,
  rocDecVideoCodec_MPEG2 ,
  rocDecVideoCodec_MPEG4 ,
  rocDecVideoCodec_AVC ,
  rocDecVideoCodec_HEVC ,
  rocDecVideoCodec_AV1 ,
  rocDecVideoCodec_VP8 ,
  rocDecVideoCodec_VP9 ,
  rocDecVideoCodec_JPEG ,
  rocDecVideoCodec_NumCodecs ,
  rocDecVideoCodec_YUV420 ,
  rocDecVideoCodec_YV12 ,
  rocDecVideoCodec_NV12 ,
  rocDecVideoCodec_YUYV ,
  rocDecVideoCodec_UYVY = (('U' << 24) | ('Y' << 16) | ('V' << 8) | ('Y'))
}
 
enum  rocDecVideoSurfaceFormat {
  rocDecVideoSurfaceFormat_NV12 ,
  rocDecVideoSurfaceFormat_P016 ,
  rocDecVideoSurfaceFormat_YUV444 = 2 ,
  rocDecVideoSurfaceFormat_YUV444_16Bit ,
  rocDecVideoSurfaceFormat_YUV420 ,
  rocDecVideoSurfaceFormat_YUV420_16Bit
}
 
enum  rocDecVideoChromaFormat {
  rocDecVideoChromaFormat_Monochrome = 0 ,
  rocDecVideoChromaFormat_420 ,
  rocDecVideoChromaFormat_422 ,
  rocDecVideoChromaFormat_444
}
 
enum  rocDecDecodeStatus {
  rocDecodeStatus_Invalid = 0 ,
  rocDecodeStatus_InProgress = 1 ,
  rocDecodeStatus_Success = 2 ,
  rocDecodeStatus_Error = 8 ,
  rocDecodeStatus_Error_Concealed ,
  rocDecodeStatus_Displaying = 10
}
 
enum  RocdecAv1TransformationType {
  RocdecAv1TransformationIdentity = 0 ,
  RocdecAv1TransformationTranslation = 1 ,
  RocdecAv1TransformationRotzoom = 2 ,
  RocdecAv1TransformationAffine = 3 ,
  RocdecAv1TransformationCount
}
 

Functions

rocDecStatus rocDecCreateDecoder (rocDecDecoderHandle *decoder_handle, RocDecoderCreateInfo *decoder_create_info)
 object based on decoder_create_info. A handle to the created decoder is returned
 
rocDecStatus rocDecDestroyDecoder (rocDecDecoderHandle decoder_handle)
 
rocDecStatus rocDecGetDecoderCaps (RocdecDecodeCaps *decode_caps)
 
rocDecStatus rocDecDecodeFrame (rocDecDecoderHandle decoder_handle, RocdecPicParams *pic_params)
 decoding
 
rocDecStatus rocDecGetDecodeStatus (rocDecDecoderHandle decoder_handle, int pic_idx, RocdecDecodeStatus *decode_status)
 
rocDecStatus rocDecReconfigureDecoder (rocDecDecoderHandle decoder_handle, RocdecReconfigureDecoderInfo *reconfig_params)
 decoder for multiple clips. Currently supports resolution change, resize params params, target area params change for same codec. Must be called during RocdecParserParams::pfn_sequence_callback
 
rocDecStatus rocDecGetVideoFrame (rocDecDecoderHandle decoder_handle, int pic_idx, void *dev_mem_ptr[3], uint32_t *horizontal_pitch, RocdecProcParams *vid_postproc_params)
 
const char * rocDecGetErrorName (rocDecStatus rocdec_status)
 

Detailed Description

The AMD rocDecode Library.

Definition in file rocdecode.h.


Data Structure Documentation

◆ RocdecVp9SegmentParameter

struct RocdecVp9SegmentParameter

VP9 Segmentation Parameter Data Structure This structure is configured to be the same as VA-API VASegmentParameterVP9 structure.

Definition at line 1008 of file rocdecode.h.

+ Collaboration diagram for RocdecVp9SegmentParameter:
Data Fields
int16_t chroma_ac_quant_scale Specifies per segment Chroma AC quantization scale. Corresponding to uv_dequant[qindex][1] in vp9_mb_init_quantizer() function of VP9 code.
int16_t chroma_dc_quant_scale Specifies per segment Chroma DC quantization scale. Corresponding to uv_dequant[qindex][0] in vp9_mb_init_quantizer() function of VP9 code.
uint8_t filter_level[4][2] Specifies the filter level information per segment. The value corresponds to variable lfi->lvl[seg][ref][mode] in VP9 code, where m is [ref], and n is [mode] in FilterLevel[m][n].
int16_t luma_ac_quant_scale Specifies per segment Luma AC quantization scale. Corresponding to y_dequant[qindex][1] in vp9_mb_init_quantizer() function of VP9 code.
int16_t luma_dc_quant_scale Specifies per segment Luma DC quantization scale. Corresponding to y_dequant[qindex][0] in vp9_mb_init_quantizer() function of VP9 code.
union RocdecVp9SegmentParameter.segment_flags segment_flags
uint32_t va_reserved[4] Reserved bytes for future use, must be zero.

◆ RocdecAv1SegmentationStruct

struct RocdecAv1SegmentationStruct

Segmentation Information for AV1.

Definition at line 1104 of file rocdecode.h.

+ Collaboration diagram for RocdecAv1SegmentationStruct:
Data Fields
int16_t feature_data[8][8] Segmentation parameters for current frame. feature_data[segment_id][feature_id] where segment_id has value range [0..7] indicating the segment id. and feature_id is defined as typedef enum { SEG_LVL_ALT_Q, // Use alternate Quantizer .... SEG_LVL_ALT_LF_Y_V, // Use alternate loop filter value on y plane vertical SEG_LVL_ALT_LF_Y_H, // Use alternate loop filter value on y plane horizontal SEG_LVL_ALT_LF_U, // Use alternate loop filter value on u plane SEG_LVL_ALT_LF_V, // Use alternate loop filter value on v plane SEG_LVL_REF_FRAME, // Optional Segment reference frame SEG_LVL_SKIP, // Optional Segment (0,0) + skip mode SEG_LVL_GLOBALMV, SEG_LVL_MAX } SEG_LVL_FEATURES; feature_data[][] is equivalent to variable FeatureData[][] in spec, which is after clip3() operation. Clip3(x, y, z) = (z < x)? x : ((z > y)? y : z); The limit is defined in Segmentation_Feature_Max[ SEG_LVL_MAX ] = { 255, MAX_LOOP_FILTER, MAX_LOOP_FILTER, MAX_LOOP_FILTER, MAX_LOOP_FILTER, 7, 0, 0 }.
uint8_t feature_mask[8] indicates if a feature is enabled or not. Each bit field itself is the feature_id. Index is segment_id. feature_mask[segment_id] & (1 << feature_id) equal to 1 specify that the feature of feature_id for segment of segment_id is enabled, otherwise disabled.
uint32_t reserved[4] Reserved bytes for future use, must be zero.
union RocdecAv1SegmentationStruct.segment_info_fields segment_info_fields

◆ RocdecAv1FilmGrainStruct

struct RocdecAv1FilmGrainStruct

Film Grain Information for AV1.

Definition at line 1179 of file rocdecode.h.

+ Collaboration diagram for RocdecAv1FilmGrainStruct:
Data Fields
int8_t ar_coeffs_cb[25]
int8_t ar_coeffs_cr[25]
int8_t ar_coeffs_y[24]
uint8_t cb_luma_mult
uint8_t cb_mult
uint16_t cb_offset
uint8_t cr_luma_mult
uint8_t cr_mult
uint16_t cr_offset
union RocdecAv1FilmGrainStruct.film_grain_info_fields film_grain_info_fields
uint16_t grain_seed
uint8_t num_cb_points
uint8_t num_cr_points
uint8_t num_y_points
uint8_t point_cb_scaling[10]
uint8_t point_cb_value[10]
uint8_t point_cr_scaling[10]
uint8_t point_cr_value[10]
uint8_t point_y_scaling[14]
uint8_t point_y_value[14]
uint32_t reserved[4] Reserved bytes for future use, must be zero.

◆ RocdecAv1WarpedMotionParams

struct RocdecAv1WarpedMotionParams

Definition at line 1245 of file rocdecode.h.

+ Collaboration diagram for RocdecAv1WarpedMotionParams:
Data Fields
uint8_t invalid
uint32_t reserved[4] Reserved bytes for future use, must be zero.
int32_t wmmat[8] Specify warp motion parameters wm.wmmat[] corresponds to gm_params[][] in spec. Details in AV1 spec section 5.9.24 or refer to libaom code https://aomedia.googlesource.com/aom/+/refs/heads/master/av1/decoder/decodeframe.c.
RocdecAv1TransformationType wmtype Specify the type of warped motion.

◆ RocdecPicParams

struct RocdecPicParams

Definition at line 1725 of file rocdecode.h.

+ Collaboration diagram for RocdecPicParams:
Data Fields
const uint8_t * bitstream_data

IN: Ptr to bitstream data for this picture (slice-layer)

uint32_t bitstream_data_len

IN: Number of bytes in bitstream data buffer

int bottom_field_flag

IN: 0=top field, 1=bottom field (ignored if field_pic_flag=0)

int curr_pic_idx

IN: Output index of the current picture

int field_pic_flag

IN: 0=frame picture, 1=field picture

int intra_pic_flag

IN: This picture is entirely intra coded

union RocdecPicParams.iq_matrix iq_matrix
uint32_t num_slices

IN: Number of slices in this picture

int pic_height

IN: Coded frame height

union RocdecPicParams.pic_params pic_params
int pic_width

IN: Coded frame width

int ref_pic_flag

IN: This picture is a reference picture

uint32_t reserved[30]

Reserved for future use

int second_field

IN: Second field of a complementary field pair

union RocdecPicParams.slice_params slice_params Variable size array. The user should allocate one slice param struct for each slice.

◆ RocdecVp9SegmentParameter.segment_flags

union RocdecVp9SegmentParameter.segment_flags

Definition at line 1010 of file rocdecode.h.

+ Collaboration diagram for RocdecVp9SegmentParameter.segment_flags:
Data Fields
struct RocdecVp9SegmentParameter.segment_flags.fields fields
uint16_t value

◆ RocdecVp9SegmentParameter.segment_flags.fields

struct RocdecVp9SegmentParameter.segment_flags.fields

Definition at line 1012 of file rocdecode.h.

+ Collaboration diagram for RocdecVp9SegmentParameter.segment_flags.fields:
Data Fields
uint16_t segment_reference: 2 Specifies per segment reference indication. 0: reserved 1: Last ref 2: golden 3: altref Value can be derived from variable data when j == SEG_LVL_REF_FRAME in function setup_segmentation() VP9 code.
uint16_t segment_reference_enabled: 1 Indicates if per segment reference frame indicator is enabled. Corresponding to variable feature_enabled when j == SEG_LVL_REF_FRAME in function setup_segmentation() VP9 code.
uint16_t segment_reference_skipped: 1 Indicates if per segment skip feature is enabled. Corresponding to variable feature_enabled when j == SEG_LVL_SKIP in function setup_segmentation() VP9 code.

◆ RocdecAv1SegmentationStruct.segment_info_fields

union RocdecAv1SegmentationStruct.segment_info_fields

Definition at line 1106 of file rocdecode.h.

+ Collaboration diagram for RocdecAv1SegmentationStruct.segment_info_fields:
Data Fields
struct RocdecAv1SegmentationStruct.segment_info_fields.bits bits
uint32_t value

◆ RocdecAv1SegmentationStruct.segment_info_fields.bits

struct RocdecAv1SegmentationStruct.segment_info_fields.bits

Definition at line 1108 of file rocdecode.h.

+ Collaboration diagram for RocdecAv1SegmentationStruct.segment_info_fields.bits:
Data Fields
uint32_t enabled: 1

Indicates whether segmentation map related syntax elements are present or not for current frame. If equal to 0, the segmentation map related syntax elements are not present for the current frame and the control flags of segmentation map related tables feature_data[][], and feature_mask[] are not valid and shall be ignored by accelerator.

uint32_t reserved: 28 Reserved bytes for future use, must be zero.
uint32_t temporal_update: 1

Value 1 indicates that the updates to the segmentation map are coded relative to the existing segmentation map. Value 0 indicates that the new segmentation map is coded without reference to the existing segmentation map.

uint32_t update_data: 1

Value 1 indicates that new parameters are about to be specified for each segment. Value 0 indicates that the segmentation parameters should keep their existing values.

uint32_t update_map: 1

Value 1 indicates that the segmentation map are updated during the decoding of this frame. Value 0 means that the segmentation map from the previous frame is used.

◆ RocdecAv1FilmGrainStruct.film_grain_info_fields

union RocdecAv1FilmGrainStruct.film_grain_info_fields

Definition at line 1181 of file rocdecode.h.

+ Collaboration diagram for RocdecAv1FilmGrainStruct.film_grain_info_fields:
Data Fields
struct RocdecAv1FilmGrainStruct.film_grain_info_fields.bits bits
uint32_t value

◆ RocdecAv1FilmGrainStruct.film_grain_info_fields.bits

struct RocdecAv1FilmGrainStruct.film_grain_info_fields.bits

Definition at line 1183 of file rocdecode.h.

+ Collaboration diagram for RocdecAv1FilmGrainStruct.film_grain_info_fields.bits:
Data Fields
uint32_t apply_grain: 1 Specify whether or not film grain is applied on current frame. If set to 0, all the rest parameters should be set to zero and ignored.
uint32_t ar_coeff_lag: 2
uint32_t ar_coeff_shift_minus_6: 2
uint32_t chroma_scaling_from_luma: 1
uint32_t clip_to_restricted_range: 1
uint32_t grain_scale_shift: 2
uint32_t grain_scaling_minus_8: 2
uint32_t overlap_flag: 1
uint32_t reserved: 20 Reserved bytes for future use, must be zero.

◆ RocdecPicParams.pic_params

union RocdecPicParams.pic_params

Definition at line 1743 of file rocdecode.h.

+ Collaboration diagram for RocdecPicParams.pic_params:
Data Fields
RocdecAv1PicParams av1
RocdecAvcPicParams avc
uint32_t codec_reserved[256]
RocdecHevcPicParams hevc
RocdecJPEGPicParams jpeg
RocdecMpeg2PicParams mpeg2

Also used for MPEG-1

RocdecVc1PicParams vc1
RocdecVp9PicParams vp9

◆ RocdecPicParams.slice_params

union RocdecPicParams.slice_params

Variable size array. The user should allocate one slice param struct for each slice.

Definition at line 1757 of file rocdecode.h.

+ Collaboration diagram for RocdecPicParams.slice_params:
Data Fields
RocdecAv1SliceParams * av1
RocdecAvcSliceParams * avc
RocdecHevcSliceParams * hevc
RocdecVp9SliceParams * vp9

◆ RocdecPicParams.iq_matrix

union RocdecPicParams.iq_matrix

Definition at line 1766 of file rocdecode.h.

+ Collaboration diagram for RocdecPicParams.iq_matrix:
Data Fields
RocdecAvcIQMatrix avc
RocdecHevcIQMatrix hevc

Macro Definition Documentation

◆ ROCDECAPI

#define ROCDECAPI

Definition at line 29 of file rocdecode.h.

◆ RocdecAvcPicture_FLAGS_BOTTOM_FIELD

#define RocdecAvcPicture_FLAGS_BOTTOM_FIELD   0x00000004

Definition at line 318 of file rocdecode.h.

◆ RocdecAvcPicture_FLAGS_INVALID

#define RocdecAvcPicture_FLAGS_INVALID   0x00000001

Definition at line 316 of file rocdecode.h.

◆ RocdecAvcPicture_FLAGS_LONG_TERM_REFERENCE

#define RocdecAvcPicture_FLAGS_LONG_TERM_REFERENCE   0x00000010

Definition at line 320 of file rocdecode.h.

◆ RocdecAvcPicture_FLAGS_NON_EXISTING

#define RocdecAvcPicture_FLAGS_NON_EXISTING   0x00000020

Definition at line 321 of file rocdecode.h.

◆ RocdecAvcPicture_FLAGS_SHORT_TERM_REFERENCE

#define RocdecAvcPicture_FLAGS_SHORT_TERM_REFERENCE   0x00000008

Definition at line 319 of file rocdecode.h.

◆ RocdecAvcPicture_FLAGS_TOP_FIELD

#define RocdecAvcPicture_FLAGS_TOP_FIELD   0x00000002

Definition at line 317 of file rocdecode.h.

◆ RocdecHevcPicture_BOTTOM_FIELD

#define RocdecHevcPicture_BOTTOM_FIELD   0x00000004

polarity of the field picture. top field takes even lines of buffer surface. bottom field takes odd lines of buffer surface.

Definition at line 352 of file rocdecode.h.

◆ RocdecHevcPicture_FIELD_PIC

#define RocdecHevcPicture_FIELD_PIC   0x00000002

indication of interlace scan picture. should take same value for all the pictures in sequence.

Definition at line 347 of file rocdecode.h.

◆ RocdecHevcPicture_INVALID

#define RocdecHevcPicture_INVALID   0x00000001

Definition at line 343 of file rocdecode.h.

◆ RocdecHevcPicture_LONG_TERM_REFERENCE

#define RocdecHevcPicture_LONG_TERM_REFERENCE   0x00000008

Long term reference picture.

Definition at line 354 of file rocdecode.h.

◆ RocdecHevcPicture_RPS_LT_CURR

#define RocdecHevcPicture_RPS_LT_CURR   0x00000040

RefPicSetLtCurr of HEVC spec variable Number of ReferenceFrames[] entries with this bit set equals NumPocLtCurr.

Definition at line 379 of file rocdecode.h.

◆ RocdecHevcPicture_RPS_ST_CURR_AFTER

#define RocdecHevcPicture_RPS_ST_CURR_AFTER   0x00000020

RefPicSetStCurrAfter of HEVC spec variable Number of ReferenceFrames[] entries with this bit set equals NumPocStCurrAfter.

Definition at line 374 of file rocdecode.h.

◆ RocdecHevcPicture_RPS_ST_CURR_BEFORE

#define RocdecHevcPicture_RPS_ST_CURR_BEFORE   0x00000010

RefPicSetStCurrBefore of HEVC spec variable Number of ReferenceFrames[] entries with this bit set equals NumPocStCurrBefore.

RocdecHevcPicture_ST_CURR_BEFORE, RocdecHevcPicture_RPS_ST_CURR_AFTER and RocdecHevcPicture_RPS_LT_CURR of any picture in ReferenceFrames[] should be exclusive. No more than one of them can be set for any picture. Sum of NumPocStCurrBefore, NumPocStCurrAfter and NumPocLtCurr equals NumPocTotalCurr, which should be equal to or smaller than 8. Application should provide valid values for both int16_t format and long format. The pictures in DPB with any of these three flags turned on are referred by the current picture.

Definition at line 369 of file rocdecode.h.

◆ ROCPROFILER_SDK_USE_SYSTEM_ROCDECODE

#define ROCPROFILER_SDK_USE_SYSTEM_ROCDECODE   0

Definition at line 42 of file rocdecode.h.

Typedef Documentation

◆ rocDecDecoderHandle

typedef void* rocDecDecoderHandle

HANDLE pf rocDecDecoder Used in subsequent API calls after rocDecCreateDecoder.

Definition at line 69 of file rocdecode.h.

Enumeration Type Documentation

◆ RocdecAv1TransformationType

Enumerator
RocdecAv1TransformationIdentity 

identity transformation, 0-parameter

RocdecAv1TransformationTranslation 

translational motion, 2-parameter

RocdecAv1TransformationRotzoom 

simplified affine with rotation + zoom only, 4-parameter

RocdecAv1TransformationAffine 

affine, 6-parameter

RocdecAv1TransformationCount 

transformation count

Definition at line 1231 of file rocdecode.h.

1232{
1233 /** identity transformation, 0-parameter */
1235 /** translational motion, 2-parameter */
1237 /** simplified affine with rotation + zoom only, 4-parameter */
1239 /** affine, 6-parameter */
1241 /** transformation count */
RocdecAv1TransformationType
Definition rocdecode.h:1232
@ RocdecAv1TransformationTranslation
Definition rocdecode.h:1236
@ RocdecAv1TransformationAffine
Definition rocdecode.h:1240
@ RocdecAv1TransformationCount
Definition rocdecode.h:1242
@ RocdecAv1TransformationRotzoom
Definition rocdecode.h:1238
@ RocdecAv1TransformationIdentity
Definition rocdecode.h:1234

◆ rocDecDecodeStatus

Enumerator
rocDecodeStatus_Invalid 
rocDecodeStatus_InProgress 
rocDecodeStatus_Success 
rocDecodeStatus_Error 
rocDecodeStatus_Error_Concealed 
rocDecodeStatus_Displaying 

Definition at line 164 of file rocdecode.h.

165{
166 rocDecodeStatus_Invalid = 0, // Decode status is not valid
167 rocDecodeStatus_InProgress = 1, // Decode is in progress
168 rocDecodeStatus_Success = 2, // Decode is completed without any errors
169 // 3 to 7 enums are reserved for future use
170 rocDecodeStatus_Error = 8, // Decode is completed with an error (error is not concealed)
172 9, // Decode is completed with an error and error is concealed
173 rocDecodeStatus_Displaying = 10, // Decode is completed, displaying in progress
rocDecDecodeStatus
Definition rocdecode.h:165
@ rocDecodeStatus_Displaying
Definition rocdecode.h:173
@ rocDecodeStatus_Error
Definition rocdecode.h:170
@ rocDecodeStatus_Error_Concealed
Definition rocdecode.h:171
@ rocDecodeStatus_Invalid
Definition rocdecode.h:166
@ rocDecodeStatus_Success
Definition rocdecode.h:168
@ rocDecodeStatus_InProgress
Definition rocdecode.h:167

◆ rocDecStatus

Enumerator
ROCDEC_DEVICE_INVALID 
ROCDEC_CONTEXT_INVALID 
ROCDEC_RUNTIME_ERROR 
ROCDEC_OUTOF_MEMORY 
ROCDEC_INVALID_PARAMETER 
ROCDEC_NOT_IMPLEMENTED 
ROCDEC_NOT_INITIALIZED 
ROCDEC_NOT_SUPPORTED 
ROCDEC_SUCCESS 

Definition at line 77 of file rocdecode.h.

78{
rocDecStatus
Definition rocdecode.h:78
@ ROCDEC_DEVICE_INVALID
Definition rocdecode.h:79
@ ROCDEC_OUTOF_MEMORY
Definition rocdecode.h:82
@ ROCDEC_CONTEXT_INVALID
Definition rocdecode.h:80
@ ROCDEC_NOT_SUPPORTED
Definition rocdecode.h:86
@ ROCDEC_RUNTIME_ERROR
Definition rocdecode.h:81
@ ROCDEC_NOT_INITIALIZED
Definition rocdecode.h:85
@ ROCDEC_NOT_IMPLEMENTED
Definition rocdecode.h:84
@ ROCDEC_INVALID_PARAMETER
Definition rocdecode.h:83
@ ROCDEC_SUCCESS
Definition rocdecode.h:87

◆ rocDecVideoChromaFormat

Enumerator
rocDecVideoChromaFormat_Monochrome 

MonoChrome

rocDecVideoChromaFormat_420 

YUV 4:2:0

rocDecVideoChromaFormat_422 

YUV 4:2:2

rocDecVideoChromaFormat_444 

YUV 4:4:4

Definition at line 150 of file rocdecode.h.

151{
152 rocDecVideoChromaFormat_Monochrome = 0, /**< MonoChrome */
153 rocDecVideoChromaFormat_420, /**< YUV 4:2:0 */
154 rocDecVideoChromaFormat_422, /**< YUV 4:2:2 */
155 rocDecVideoChromaFormat_444 /**< YUV 4:4:4 */
rocDecVideoChromaFormat
Definition rocdecode.h:151
@ rocDecVideoChromaFormat_422
Definition rocdecode.h:154
@ rocDecVideoChromaFormat_444
Definition rocdecode.h:155
@ rocDecVideoChromaFormat_420
Definition rocdecode.h:153
@ rocDecVideoChromaFormat_Monochrome
Definition rocdecode.h:152

◆ rocDecVideoCodec

Enumerator
rocDecVideoCodec_MPEG1 

MPEG1

rocDecVideoCodec_MPEG2 

MPEG2

rocDecVideoCodec_MPEG4 

MPEG4

rocDecVideoCodec_AVC 

AVC/H264

rocDecVideoCodec_HEVC 

HEVC

rocDecVideoCodec_AV1 

AV1

rocDecVideoCodec_VP8 

VP8

rocDecVideoCodec_VP9 

VP9

rocDecVideoCodec_JPEG 

JPEG

rocDecVideoCodec_NumCodecs 

Max codecs

rocDecVideoCodec_YUV420 

Y,U,V (4:2:0)

rocDecVideoCodec_YV12 

Y,V,U (4:2:0)

rocDecVideoCodec_NV12 

Y,UV (4:2:0)

rocDecVideoCodec_YUYV 

YUYV/YUY2 (4:2:2)

rocDecVideoCodec_UYVY 

UYVY (4:2:2)

Definition at line 96 of file rocdecode.h.

97{
98 rocDecVideoCodec_MPEG1 = 0, /**< MPEG1 */
99 rocDecVideoCodec_MPEG2, /**< MPEG2 */
100 rocDecVideoCodec_MPEG4, /**< MPEG4 */
101 rocDecVideoCodec_AVC, /**< AVC/H264 */
102 rocDecVideoCodec_HEVC, /**< HEVC */
103 rocDecVideoCodec_AV1, /**< AV1 */
104 rocDecVideoCodec_VP8, /**< VP8 */
105 rocDecVideoCodec_VP9, /**< VP9 */
106 rocDecVideoCodec_JPEG, /**< JPEG */
107 rocDecVideoCodec_NumCodecs, /**< Max codecs */
108 // Uncompressed YUV
110 (('I' << 24) | ('Y' << 16) | ('U' << 8) | ('V')), /**< Y,U,V (4:2:0) */
112 (('Y' << 24) | ('V' << 16) | ('1' << 8) | ('2')), /**< Y,V,U (4:2:0) */
114 (('N' << 24) | ('V' << 16) | ('1' << 8) | ('2')), /**< Y,UV (4:2:0) */
116 (('Y' << 24) | ('U' << 16) | ('Y' << 8) | ('V')), /**< YUYV/YUY2 (4:2:2) */
117 rocDecVideoCodec_UYVY = (('U' << 24) | ('Y' << 16) | ('V' << 8) | ('Y')) /**< UYVY (4:2:2) */
rocDecVideoCodec
Definition rocdecode.h:97
@ rocDecVideoCodec_NV12
Definition rocdecode.h:113
@ rocDecVideoCodec_YV12
Definition rocdecode.h:111
@ rocDecVideoCodec_YUV420
Definition rocdecode.h:109
@ rocDecVideoCodec_UYVY
Definition rocdecode.h:117
@ rocDecVideoCodec_YUYV
Definition rocdecode.h:115
@ rocDecVideoCodec_AV1
Definition rocdecode.h:103
@ rocDecVideoCodec_MPEG4
Definition rocdecode.h:100
@ rocDecVideoCodec_HEVC
Definition rocdecode.h:102
@ rocDecVideoCodec_MPEG1
Definition rocdecode.h:98
@ rocDecVideoCodec_JPEG
Definition rocdecode.h:106
@ rocDecVideoCodec_VP9
Definition rocdecode.h:105
@ rocDecVideoCodec_AVC
Definition rocdecode.h:101
@ rocDecVideoCodec_MPEG2
Definition rocdecode.h:99
@ rocDecVideoCodec_VP8
Definition rocdecode.h:104
@ rocDecVideoCodec_NumCodecs
Definition rocdecode.h:107

◆ rocDecVideoSurfaceFormat

Enumerator
rocDecVideoSurfaceFormat_NV12 

Semi-Planar YUV [Y plane followed by interleaved UV plane]

rocDecVideoSurfaceFormat_P016 

16 bit Semi-Planar YUV [Y plane followed by interleaved UV plane]. Can be used for 10 bit(6LSB bits 0), 12 bit (4LSB bits 0)

rocDecVideoSurfaceFormat_YUV444 

Planar YUV [Y plane followed by U and V planes]

rocDecVideoSurfaceFormat_YUV444_16Bit 

16 bit Planar YUV [Y plane followed by U and V planes]. Can be used for 10 bit(6LSB bits 0), 12 bit (4LSB bits 0)

rocDecVideoSurfaceFormat_YUV420 

Planar YUV [Y plane followed by U and V planes in 4:2:0 format]

rocDecVideoSurfaceFormat_YUV420_16Bit 

16 bit Planar YUV [Y plane followed by U and V planes in ]. Can be used for 10 bit(LSB), 12 bit (LSB)

Definition at line 126 of file rocdecode.h.

127{
129 0, /**< Semi-Planar YUV [Y plane followed by interleaved UV plane] */
131 1, /**< 16 bit Semi-Planar YUV [Y plane followed by interleaved UV plane].
132 Can be used for 10 bit(6LSB bits 0), 12 bit (4LSB bits 0) */
133 rocDecVideoSurfaceFormat_YUV444 = 2, /**< Planar YUV [Y plane followed by U and V planes] */
135 3, /**< 16 bit Planar YUV [Y plane followed by U and V planes].
136 Can be used for 10 bit(6LSB bits 0), 12 bit (4LSB bits 0) */
138 4, /**< Planar YUV [Y plane followed by U and V planes in 4:2:0 format] */
140 5, /**< 16 bit Planar YUV [Y plane followed by U and V planes in ].
141 Can be used for 10 bit(LSB), 12 bit (LSB) */
rocDecVideoSurfaceFormat
Definition rocdecode.h:127
@ rocDecVideoSurfaceFormat_YUV420
Definition rocdecode.h:137
@ rocDecVideoSurfaceFormat_YUV444_16Bit
Definition rocdecode.h:134
@ rocDecVideoSurfaceFormat_YUV420_16Bit
Definition rocdecode.h:139
@ rocDecVideoSurfaceFormat_P016
Definition rocdecode.h:130
@ rocDecVideoSurfaceFormat_NV12
Definition rocdecode.h:128
@ rocDecVideoSurfaceFormat_YUV444
Definition rocdecode.h:133

Function Documentation

◆ rocDecCreateDecoder()

rocDecStatus ROCDECAPI rocDecCreateDecoder ( rocDecDecoderHandle decoder_handle,
RocDecoderCreateInfo decoder_create_info 
)
extern

object based on decoder_create_info. A handle to the created decoder is returned

◆ rocDecDecodeFrame()

rocDecStatus ROCDECAPI rocDecDecodeFrame ( rocDecDecoderHandle  decoder_handle,
RocdecPicParams pic_params 
)
extern

decoding

◆ rocDecDestroyDecoder()

rocDecStatus rocDecDestroyDecoder ( rocDecDecoderHandle  decoder_handle)
extern

◆ rocDecGetDecoderCaps()

rocDecStatus rocDecGetDecoderCaps ( RocdecDecodeCaps decode_caps)
extern

◆ rocDecGetDecodeStatus()

rocDecStatus rocDecGetDecodeStatus ( rocDecDecoderHandle  decoder_handle,
int  pic_idx,
RocdecDecodeStatus decode_status 
)
extern

◆ rocDecGetErrorName()

const char * rocDecGetErrorName ( rocDecStatus  rocdec_status)
extern

◆ rocDecGetVideoFrame()

rocDecStatus rocDecGetVideoFrame ( rocDecDecoderHandle  decoder_handle,
int  pic_idx,
void *  dev_mem_ptr[3],
uint32_t *  horizontal_pitch,
RocdecProcParams vid_postproc_params 
)
extern

◆ rocDecReconfigureDecoder()

rocDecStatus ROCDECAPI rocDecReconfigureDecoder ( rocDecDecoderHandle  decoder_handle,
RocdecReconfigureDecoderInfo reconfig_params 
)
extern

decoder for multiple clips. Currently supports resolution change, resize params params, target area params change for same codec. Must be called during RocdecParserParams::pfn_sequence_callback