vitasdk
Documentation of the vitasdk

Detailed Description

Exports for User.


Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceVideodec_stub


Load the required module:

int sceSysmoduleLoadModule(SceSysmoduleModuleId id)
Load a module.
@ SCE_SYSMODULE_AVCDEC
AVCDec module.
Definition: sysmodule.h:111



Functions

 VITASDK_BUILD_ASSERT_EQ (0x14, SceVideodecQueryInitInfoHwAvcdec)
 
 VITASDK_BUILD_ASSERT_EQ (0x20, SceVideodecQueryInitInfo)
 
 VITASDK_BUILD_ASSERT_EQ (8, SceVideodecTimeStamp)
 
 VITASDK_BUILD_ASSERT_EQ (0xC, SceAvcdecQueryDecoderInfo)
 
 VITASDK_BUILD_ASSERT_EQ (4, SceAvcdecDecoderInfo)
 
 VITASDK_BUILD_ASSERT_EQ (8, SceAvcdecBuf)
 
 VITASDK_BUILD_ASSERT_EQ (0xC, SceAvcdecCtrl)
 
 VITASDK_BUILD_ASSERT_EQ (0x18, SceAvcdecAu)
 
 VITASDK_BUILD_ASSERT_EQ (0x20, SceAvcdecInfo)
 
 VITASDK_BUILD_ASSERT_EQ (0x10, SceAvcdecFrameOptionRGBA)
 
 VITASDK_BUILD_ASSERT_EQ (0x10, SceAvcdecFrameOption)
 
 VITASDK_BUILD_ASSERT_EQ (0x40, SceAvcdecFrame)
 
 VITASDK_BUILD_ASSERT_EQ (0x64, SceAvcdecPicture)
 
 VITASDK_BUILD_ASSERT_EQ (0xC, SceAvcdecArrayPicture)
 
int sceVideodecInitLibrary (SceVideodecType codec, const SceVideodecQueryInitInfoHwAvcdec *initInfo)
 
int sceVideodecTermLibrary (SceVideodecType codec)
 
int sceAvcdecQueryDecoderMemSize (SceVideodecType codec, const SceAvcdecQueryDecoderInfo *query, SceAvcdecDecoderInfo *decoderInfo)
 
int sceAvcdecCreateDecoder (SceVideodecType codec, SceAvcdecCtrl *decoder, const SceAvcdecQueryDecoderInfo *query)
 
int sceAvcdecDeleteDecoder (SceAvcdecCtrl *decoder)
 
int sceAvcdecDecode (const SceAvcdecCtrl *decoder, const SceAvcdecAu *au, SceAvcdecArrayPicture *array_picture)
 

Data Structure Documentation

◆ SceVideodecQueryInitInfoHwAvcdec

struct SceVideodecQueryInitInfoHwAvcdec
Data Fields
uint32_t size sizeof(SceVideodecQueryInitInfoHwAvcdec)
uint32_t horizontal
uint32_t vertical
uint32_t numOfRefFrames Number of reference frames to use.
uint32_t numOfStreams Must be set to 1.

◆ SceVideodecQueryInitInfo

union SceVideodecQueryInitInfo
Data Fields
uint8_t reserved[32]
SceVideodecQueryInitInfoHwAvcdec hwAvc

◆ SceVideodecTimeStamp

struct SceVideodecTimeStamp
Data Fields
uint32_t upper
uint32_t lower

◆ SceAvcdecQueryDecoderInfo

struct SceAvcdecQueryDecoderInfo
Data Fields
uint32_t horizontal
uint32_t vertical
uint32_t numOfRefFrames Number of reference frames.

◆ SceAvcdecDecoderInfo

struct SceAvcdecDecoderInfo
Data Fields
uint32_t frameMemSize

◆ SceAvcdecBuf

struct SceAvcdecBuf
Data Fields
void * pBuf
uint32_t size

◆ SceAvcdecCtrl

struct SceAvcdecCtrl
Data Fields
uint32_t handle
SceAvcdecBuf frameBuf

◆ SceAvcdecAu

struct SceAvcdecAu

◆ SceAvcdecInfo

struct SceAvcdecInfo
Data Fields
uint32_t numUnitsInTick
uint32_t timeScale
uint8_t fixedFrameRateFlag
uint8_t aspectRatioIdc
uint16_t sarWidth
uint16_t sarHeight
uint8_t colourPrimaries
uint8_t transferCharacteristics
uint8_t matrixCoefficients
uint8_t videoFullRangeFlag
uint8_t picStruct[2]
uint8_t ctType
SceVideodecTimeStamp pts

◆ SceAvcdecFrameOptionRGBA

struct SceAvcdecFrameOptionRGBA
Data Fields
uint8_t alpha
uint8_t cscCoefficient
uint8_t reserved[14]

◆ SceAvcdecFrameOption

union SceAvcdecFrameOption
Data Fields
uint8_t reserved[16]
SceAvcdecFrameOptionRGBA rgba

◆ SceAvcdecFrame

struct SceAvcdecFrame
Data Fields
uint32_t pixelType One of SceAvcdecPixelFormat.
uint32_t framePitch
uint32_t frameWidth
uint32_t frameHeight
uint32_t horizontalSize
uint32_t verticalSize
uint32_t frameCropLeftOffset
uint32_t frameCropRightOffset
uint32_t frameCropTopOffset
uint32_t frameCropBottomOffset
SceAvcdecFrameOption opt
void * pPicture[2] address of picture buffer

◆ SceAvcdecPicture

struct SceAvcdecPicture
Data Fields
uint32_t size
SceAvcdecFrame frame
SceAvcdecInfo info

◆ SceAvcdecArrayPicture

struct SceAvcdecArrayPicture
Data Fields
uint32_t numOfOutput Number of outputs.
uint32_t numOfElm Number of elements.
SceAvcdecPicture ** pPicture

Enumeration Type Documentation

◆ SceVideodecErrorCode

Enumerator
SCE_VIDEODEC_ERROR_INVALID_TYPE 
SCE_VIDEODEC_ERROR_INVALID_PARAM 
SCE_VIDEODEC_ERROR_OUT_OF_MEMORY 
SCE_VIDEODEC_ERROR_INVALID_STATE 
SCE_VIDEODEC_ERROR_UNSUPPORT_IMAGE_SIZE 
SCE_VIDEODEC_ERROR_INVALID_COLOR_FORMAT 
SCE_VIDEODEC_ERROR_NOT_PHY_CONTINUOUS_MEMORY 
SCE_VIDEODEC_ERROR_ALREADY_USED 
SCE_VIDEODEC_ERROR_INVALID_POINTER 
SCE_VIDEODEC_ERROR_ES_BUFFER_FULL 
SCE_VIDEODEC_ERROR_INITIALIZE 
SCE_VIDEODEC_ERROR_NOT_INITIALIZE 
SCE_VIDEODEC_ERROR_INVALID_STREAM 
SCE_VIDEODEC_ERROR_INVALID_ARGUMENT_SIZE 

◆ SceVideodecType

Enumerator
SCE_VIDEODEC_TYPE_HW_AVCDEC 

◆ SceAvcdecErrorCode

Enumerator
SCE_AVCDEC_ERROR_INVALID_TYPE 
SCE_AVCDEC_ERROR_INVALID_PARAM 
SCE_AVCDEC_ERROR_OUT_OF_MEMORY 
SCE_AVCDEC_ERROR_INVALID_STATE 
SCE_AVCDEC_ERROR_UNSUPPORT_IMAGE_SIZE 
SCE_AVCDEC_ERROR_INVALID_COLOR_FORMAT 
SCE_AVCDEC_ERROR_NOT_PHY_CONTINUOUS_MEMORY 
SCE_AVCDEC_ERROR_ALREADY_USED 
SCE_AVCDEC_ERROR_INVALID_POINTER 
SCE_AVCDEC_ERROR_ES_BUFFER_FULL 
SCE_AVCDEC_ERROR_INITIALIZE 
SCE_AVCDEC_ERROR_NOT_INITIALIZE 
SCE_AVCDEC_ERROR_INVALID_STREAM 
SCE_AVCDEC_ERROR_INVALID_ARGUMENT_SIZE 

◆ SceAvcdecPixelFormat

Enumerator
SCE_AVCDEC_PIXELFORMAT_RGBA8888 
SCE_AVCDEC_PIXELFORMAT_RGBA565 
SCE_AVCDEC_PIXELFORMAT_RGBA5551 
SCE_AVCDEC_PIXELFORMAT_YUV420_RASTER 
SCE_AVCDEC_PIXELFORMAT_YUV420_PACKED_RASTER 

Function Documentation

◆ VITASDK_BUILD_ASSERT_EQ() [1/14]

VITASDK_BUILD_ASSERT_EQ ( 0x14  ,
SceVideodecQueryInitInfoHwAvcdec   
)

◆ VITASDK_BUILD_ASSERT_EQ() [2/14]

VITASDK_BUILD_ASSERT_EQ ( 0x20  ,
SceVideodecQueryInitInfo   
)

◆ VITASDK_BUILD_ASSERT_EQ() [3/14]

VITASDK_BUILD_ASSERT_EQ ( ,
SceVideodecTimeStamp   
)

◆ VITASDK_BUILD_ASSERT_EQ() [4/14]

VITASDK_BUILD_ASSERT_EQ ( 0xC  ,
SceAvcdecQueryDecoderInfo   
)

◆ VITASDK_BUILD_ASSERT_EQ() [5/14]

VITASDK_BUILD_ASSERT_EQ ( ,
SceAvcdecDecoderInfo   
)

◆ VITASDK_BUILD_ASSERT_EQ() [6/14]

VITASDK_BUILD_ASSERT_EQ ( ,
SceAvcdecBuf   
)

◆ VITASDK_BUILD_ASSERT_EQ() [7/14]

VITASDK_BUILD_ASSERT_EQ ( 0xC  ,
SceAvcdecCtrl   
)

◆ VITASDK_BUILD_ASSERT_EQ() [8/14]

VITASDK_BUILD_ASSERT_EQ ( 0x18  ,
SceAvcdecAu   
)

◆ VITASDK_BUILD_ASSERT_EQ() [9/14]

VITASDK_BUILD_ASSERT_EQ ( 0x20  ,
SceAvcdecInfo   
)

◆ VITASDK_BUILD_ASSERT_EQ() [10/14]

VITASDK_BUILD_ASSERT_EQ ( 0x10  ,
SceAvcdecFrameOptionRGBA   
)

◆ VITASDK_BUILD_ASSERT_EQ() [11/14]

VITASDK_BUILD_ASSERT_EQ ( 0x10  ,
SceAvcdecFrameOption   
)

◆ VITASDK_BUILD_ASSERT_EQ() [12/14]

VITASDK_BUILD_ASSERT_EQ ( 0x40  ,
SceAvcdecFrame   
)

◆ VITASDK_BUILD_ASSERT_EQ() [13/14]

VITASDK_BUILD_ASSERT_EQ ( 0x64  ,
SceAvcdecPicture   
)

◆ VITASDK_BUILD_ASSERT_EQ() [14/14]

VITASDK_BUILD_ASSERT_EQ ( 0xC  ,
SceAvcdecArrayPicture   
)

◆ sceVideodecInitLibrary()

int sceVideodecInitLibrary ( SceVideodecType  codec,
const SceVideodecQueryInitInfoHwAvcdec initInfo 
)
Parameters
[in]codec- See SceVideodecType
[in]initInfo- See SceVideodecQueryInitInfoHwAvcdec
Returns
0 on success, < 0 on error.

◆ sceVideodecTermLibrary()

int sceVideodecTermLibrary ( SceVideodecType  codec)
Parameters
[in]codec- See SceVideodecType
Returns
0 on success, < 0 on error.

◆ sceAvcdecQueryDecoderMemSize()

int sceAvcdecQueryDecoderMemSize ( SceVideodecType  codec,
const SceAvcdecQueryDecoderInfo query,
SceAvcdecDecoderInfo decoderInfo 
)
Parameters
[in]codec- See SceVideodecType
[in]query- Should be copy from SceVideodecQueryInitInfoHwAvcdec.
[out]decoderInfo- Must be initialized with zeros.
Returns
0 on success, < 0 on error.

◆ sceAvcdecCreateDecoder()

int sceAvcdecCreateDecoder ( SceVideodecType  codec,
SceAvcdecCtrl decoder,
const SceAvcdecQueryDecoderInfo query 
)
Parameters
[in]codec- See SceVideodecType
[out]decoder- Must be initialized frameBuf.size and frameBuf.pBuf
[in]query- Should be copy from SceVideodecQueryInitInfoHwAvcdec.
Returns
0 on success, < 0 on error.

◆ sceAvcdecDeleteDecoder()

int sceAvcdecDeleteDecoder ( SceAvcdecCtrl decoder)
Parameters
[in]decoder- A SceAvcdecCtrl decoder initialized with sceAvcdecCreateDecoder
Returns
0 on success, < 0 on error.

◆ sceAvcdecDecode()

int sceAvcdecDecode ( const SceAvcdecCtrl decoder,
const SceAvcdecAu au,
SceAvcdecArrayPicture array_picture 
)
Parameters
[in]decoder
[in]au- Must set buffer information(es) and be initialized timestamps with 0xFFFFFFFF
[out]array_picture- Must set numOfElm and pPicture. See SceAvcdecArrayPicture
Returns
0 on success, < 0 on error.