Core decode API reference#

2026-09-23

3 min read time

Applies to Linux

The rocDecode core decode API is exposed in rocdecode.h.

int poc#

picture order count. ! in HEVC, POCs for top and bottom fields of same picture should take different values.

rocDecStatus ROCDECAPI rocDecCreateDecoder (rocDecDecoderHandle *decoder_handle, RocDecoderCreateInfo *decoder_create_info)

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

rocDecStatus ROCDECAPI rocDecDestroyDecoder (rocDecDecoderHandle decoder_handle)

Destroy the decoder object

rocDecStatus ROCDECAPI rocDecDecodeFrame (rocDecDecoderHandle decoder_handle, RocdecPicParams *pic_params)

Decodes a single picture Submits the frame for HW decoding

rocDecStatus ROCDECAPI rocDecGetDecodeStatus (rocDecDecoderHandle decoder_handle, int pic_idx, RocdecDecodeStatus *decode_status)

Get the decode status for frame corresponding to nPicIdx. Please note that this API makes a non-blocking call and returns the status of the frame associated with nPicIdx at the time of the call, without waiting for the decoding to complete. The decode_status->decode_status can be either rocDecodeStatus_Success, indicating that the decoding has been completed, or rocDecodeStatus_InProgress, which means that the decoding is still in progress.

rocDecStatus ROCDECAPI rocDecReconfigureDecoder (rocDecDecoderHandle decoder_handle, RocdecReconfigureDecoderInfo *reconfig_params)

Used to reuse single 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

const char *ROCDECAPI rocDecGetErrorName (rocDecStatus rocdec_status)

Return name of the specified error code in text form.

struct RocdecDecodeCaps#
#include <rocdecode.h>

This structure is used in rocDecGetDecoderCaps API

struct RocDecoderCreateInfo#
#include <rocdecode.h>

This structure is used in rocDecCreateDecoder API

struct RocdecDecodeStatus#
#include <rocdecode.h>

Struct for reporting decode status. This structure is used in RocdecGetDecodeStatus API.

struct RocdecReconfigureDecoderInfo#
#include <rocdecode.h>

Struct for decoder reset This structure is used in rocDecReconfigureDecoder() API

struct RocdecAvcPicture#
#include <rocdecode.h>

AVC/H.264 Picture Entry This structure is used in RocdecAvcPicParams structure

struct RocdecHevcPicture#
#include <rocdecode.h>

HEVC Picture Entry This structure is used in RocdecHevcPicParams structure

struct RocdecJPEGPicParams#

JPEG picture parameters This structure is used in RocdecPicParams structure

struct RocdecMpeg2QMatrix#
#include <rocdecode.h>

MPEG2 QMatrix This structure is used in _RocdecMpeg2PicParams structure

struct RocdecMpeg2PicParams#
#include <rocdecode.h>

MPEG2 picture parameters This structure is used in RocdecMpeg2PicParams structure

struct RocdecVc1PicParams#

JPEG picture parameters This structure is used in RocdecVc1PicParams structure

struct RocdecAvcPicParams#
#include <rocdecode.h>

AVC picture parameters This structure is used in RocdecAvcPicParams structure This structure is configured to be the same as VA-API VAPictureParameterBufferH264 structure

struct RocdecAvcSliceParams#
#include <rocdecode.h>

AVC slice parameter buffer This structure is configured to be the same as VA-API VASliceParameterBufferH264 structure

struct RocdecAvcIQMatrix#
#include <rocdecode.h>

AVC Inverse Quantization Matrix This structure is configured to be the same as VA-API VAIQMatrixBufferH264 structure

struct RocdecHevcPicParams#
#include <rocdecode.h>

HEVC picture parameters This structure is used in RocdecHevcPicParams structure

struct RocdecHevcSliceParams#
#include <rocdecode.h>

HEVC slice parameters This structure is used in RocdecPicParams structure

struct RocdecHevcIQMatrix#
#include <rocdecode.h>

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

struct RocdecVp9PicParams#
#include <rocdecode.h>

VP9 picture parameters This structure is configured to be the same as VA-API VADecPictureParameterBufferVP9 structure.

struct RocdecVp9SliceParams#
#include <rocdecode.h>

VP9 slice parameter buffer This structure is configured to be the same as VA-API VASliceParameterBufferVP9 structure.

struct RocdecAv1PicParams#
#include <rocdecode.h>

AV1 picture parameters This structure is used in RocdecAv1PicParams structure

struct RocdecAv1SliceParams#
#include <rocdecode.h>

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.

struct _RocdecPicParams#
#include <rocdecode.h>

Picture parameters for decoding This structure is used in rocDecDecodeFrame API IN for rocDecDecodeFrame

struct RocdecProcParams#
#include <rocdecode.h>

Picture parameters for postprocessing This structure is used in rocDecGetVideoFrame API