/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocdecode/checkouts/latest/api/rocdecode.h File Reference

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocdecode/checkouts/latest/api/rocdecode.h File Reference#

rocDecode: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-rocdecode/checkouts/latest/api/rocdecode.h File Reference
rocdecode.h File Reference

The AMD rocDecode Library. More...

#include "hip/hip_runtime.h"

Go to the source code of this file.

Data Structures

struct  _RocdecDecodeCaps
 
struct  _RocDecoderCreateInfo
 
struct  _RocdecDecodeStatus
 
struct  _RocdecReconfigureDecoderInfo
 
struct  _RocdecAvcPicture
 
struct  _RocdecHevcPicture
 
struct  _RocdecJPEGPicParams
 
struct  _RocdecMpeg2QMatrix
 
struct  _RocdecMpeg2PicParams
 
struct  _RocdecVc1PicParams
 
struct  _RocdecAvcPicParams
 
struct  _RocdecAvcSliceParams
 
struct  _RocdecAvcIQMatrix
 
struct  _RocdecHevcPicParams
 
struct  _RocdecHevcSliceParams
 
struct  _RocdecHevcIQMatrix
 
struct  _RocdecAv1SegmentationStruct
 Segmentation Information for AV1. More...
 
struct  _RocdecAv1FilmGrainStruct
 Film Grain Information for AV1. More...
 
struct  _RocdecAv1WarpedMotionParams
 
struct  _RocdecAV1PicParams
 
struct  _RocdecAv1SliceParams
 
struct  _RocdecPicParams
 
struct  _RocdecProcParams
 

Macros

#define ROCDECAPI
 
#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. More...
 
#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
 
typedef enum rocDecStatus_enum rocDecStatus
 
typedef enum rocDecVideoCodec_enum rocDecVideoCodec
 
typedef enum rocDecVideoSurfaceFormat_enum rocDecVideoSurfaceFormat
 
typedef enum rocDecVideoChromaFormat_enum rocDecVideoChromaFormat
 
typedef enum rocDecodeStatus_enum rocDecDecodeStatus
 
typedef struct _RocdecDecodeCaps RocdecDecodeCaps
 
typedef struct _RocDecoderCreateInfo RocDecoderCreateInfo
 
typedef struct _RocdecDecodeStatus RocdecDecodeStatus
 
typedef struct _RocdecReconfigureDecoderInfo RocdecReconfigureDecoderInfo
 
typedef struct _RocdecAvcPicture RocdecAvcPicture
 
typedef struct _RocdecHevcPicture RocdecHevcPicture
 
typedef struct _RocdecJPEGPicParams RocdecJPEGPicParams
 
typedef struct _RocdecMpeg2QMatrix RocdecMpeg2QMatrix
 
typedef struct _RocdecMpeg2PicParams RocdecMpeg2PicParams
 
typedef struct _RocdecVc1PicParams RocdecVc1PicParams
 
typedef struct _RocdecAvcPicParams RocdecAvcPicParams
 
typedef struct _RocdecAvcSliceParams RocdecAvcSliceParams
 
typedef struct _RocdecAvcIQMatrix RocdecAvcIQMatrix
 
typedef struct _RocdecHevcPicParams RocdecHevcPicParams
 
typedef struct _RocdecHevcSliceParams RocdecHevcSliceParams
 
typedef struct _RocdecHevcIQMatrix RocdecHevcIQMatrix
 
typedef struct _RocdecAv1SegmentationStruct RocdecAv1SegmentationStruct
 Segmentation Information for AV1.
 
typedef struct _RocdecAv1FilmGrainStruct RocdecAv1FilmGrainStruct
 Film Grain Information for AV1.
 
typedef struct _RocdecAv1WarpedMotionParams RocdecAv1WarpedMotionParams
 
typedef struct _RocdecAV1PicParams RocdecAv1PicParams
 
typedef struct _RocdecAv1SliceParams RocdecAv1SliceParams
 
typedef struct _RocdecPicParams RocdecPicParams
 
typedef struct _RocdecProcParams RocdecProcParams
 

Enumerations

enum  rocDecStatus_enum {
  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_enum {
  rocDecVideoCodec_MPEG1 = 0 , rocDecVideoCodec_MPEG2 , rocDecVideoCodec_MPEG4 , rocDecVideoCodec_AVC ,
  rocDecVideoCodec_HEVC , rocDecVideoCodec_AV1 , rocDecVideoCodec_VP8 , rocDecVideoCodec_VP9 ,
  rocDecVideoCodec_JPEG , rocDecVideoCodec_NumCodecs , rocDecVideoCodec_YUV420 = (('I' << 24) | ('Y' << 16) | ('U' << 8) | ('V')) , rocDecVideoCodec_YV12 = (('Y' << 24) | ('V' << 16) | ('1' << 8) | ('2')) ,
  rocDecVideoCodec_NV12 = (('N' << 24) | ('V' << 16) | ('1' << 8) | ('2')) , rocDecVideoCodec_YUYV = (('Y' << 24) | ('U' << 16) | ('Y' << 8) | ('V')) , rocDecVideoCodec_UYVY = (('U' << 24) | ('Y' << 16) | ('V' << 8) | ('Y'))
}
 
enum  rocDecVideoSurfaceFormat_enum { rocDecVideoSurfaceFormat_NV12 = 0 , rocDecVideoSurfaceFormat_P016 = 1 , rocDecVideoSurfaceFormat_YUV444 = 2 , rocDecVideoSurfaceFormat_YUV444_16Bit = 3 }
 
enum  rocDecVideoChromaFormat_enum { rocDecVideoChromaFormat_Monochrome = 0 , rocDecVideoChromaFormat_420 , rocDecVideoChromaFormat_422 , rocDecVideoChromaFormat_444 }
 
enum  rocDecodeStatus_enum {
  rocDecodeStatus_Invalid = 0 , rocDecodeStatus_InProgress = 1 , rocDecodeStatus_Success = 2 , rocDecodeStatus_Error = 8 ,
  rocDecodeStatus_Error_Concealed = 9 , rocDecodeStatus_Displaying = 10
}
 
enum  RocdecAv1TransformationType {
  RocdecAv1TransformationIdentity = 0 , RocdecAv1TransformationTranslation = 1 , RocdecAv1TransformationRotzoom = 2 , RocdecAv1TransformationAffine = 3 ,
  RocdecAv1TransformationCount
}
 

Functions

rocDecStatus ROCDECAPI rocDecCreateDecoder (rocDecDecoderHandle *decoder_handle, RocDecoderCreateInfo *decoder_create_info)
 
rocDecStatus ROCDECAPI rocDecDestroyDecoder (rocDecDecoderHandle decoder_handle)
 
rocDecStatus ROCDECAPI rocDecGetDecoderCaps (RocdecDecodeCaps *decode_caps)
 
rocDecStatus ROCDECAPI rocDecDecodeFrame (rocDecDecoderHandle decoder_handle, RocdecPicParams *pic_params)
 
rocDecStatus ROCDECAPI rocDecGetDecodeStatus (rocDecDecoderHandle decoder_handle, int pic_idx, RocdecDecodeStatus *decode_status)
 
rocDecStatus ROCDECAPI rocDecReconfigureDecoder (rocDecDecoderHandle decoder_handle, RocdecReconfigureDecoderInfo *reconfig_params)
 
rocDecStatus ROCDECAPI rocDecGetVideoFrame (rocDecDecoderHandle decoder_handle, int pic_idx, void *dev_mem_ptr[3], uint32_t(&horizontal_pitch)[3], RocdecProcParams *vid_postproc_params)
 
const char *ROCDECAPI rocDecGetErrorName (rocDecStatus rocdec_status)
 

Detailed Description

The AMD rocDecode Library.

Macro Definition Documentation

◆ 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.

Typedef Documentation

◆ rocDecDecoderHandle

typedef void* rocDecDecoderHandle

HANDLE pf rocDecDecoder Used in subsequent API calls after rocDecCreateDecoder

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

◆ rocDecVideoChromaFormat_enum

Enumerator
rocDecVideoChromaFormat_Monochrome 

MonoChrome

rocDecVideoChromaFormat_420 

YUV 4:2:0

rocDecVideoChromaFormat_422 

YUV 4:2:2

rocDecVideoChromaFormat_444 

YUV 4:4:4

◆ rocDecVideoCodec_enum

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)

◆ rocDecVideoSurfaceFormat_enum

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)