vitasdk
Documentation of the vitasdk

Detailed Description

Exports for User


Using this library in your project

Include the header file in your project:

#include <psp2/videodec.h>


Link the library to the executable:

SceVideodec_stub


Load the required module:



Functions

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 horizontal
uint32_t numOfRefFrames Number of reference frames to use.
uint32_t numOfStreams Must be set to 1.
uint32_t size sizeof(SceVideodecQueryInitInfoHwAvcdec)
uint32_t vertical

◆ SceVideodecQueryInitInfo

union SceVideodecQueryInitInfo
Data Fields
SceVideodecQueryInitInfoHwAvcdec hwAvc
uint8_t reserved[32]

◆ SceVideodecTimeStamp

struct SceVideodecTimeStamp
Data Fields
uint32_t lower
uint32_t upper

◆ SceAvcdecQueryDecoderInfo

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

◆ SceAvcdecDecoderInfo

struct SceAvcdecDecoderInfo
Data Fields
uint32_t frameMemSize

◆ SceAvcdecBuf

struct SceAvcdecBuf
Data Fields
void * pBuf
uint32_t size

◆ SceAvcdecCtrl

struct SceAvcdecCtrl
Data Fields
SceAvcdecBuf frameBuf
uint32_t handle

◆ SceAvcdecAu

struct SceAvcdecAu

◆ SceAvcdecInfo

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

◆ 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 frameCropBottomOffset
uint32_t frameCropLeftOffset
uint32_t frameCropRightOffset
uint32_t frameCropTopOffset
uint32_t frameHeight
uint32_t framePitch
uint32_t frameWidth
uint32_t horizontalSize
SceAvcdecFrameOption opt
uint32_t pixelType One of SceAvcdecPixelFormat.
void * pPicture[2] address of picture buffer
uint32_t verticalSize

◆ SceAvcdecPicture

struct SceAvcdecPicture
Data Fields
SceAvcdecFrame frame
SceAvcdecInfo info
uint32_t size

◆ SceAvcdecArrayPicture

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

Enumeration Type Documentation

◆ 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 

◆ 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 

Function Documentation

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

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

◆ sceAvcdecDeleteDecoder()

int sceAvcdecDeleteDecoder ( SceAvcdecCtrl decoder)
Parameters
[in]decoder- A SceAvcdecCtrl decoder initialized with sceAvcdecCreateDecoder
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.

◆ 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.
videodec.h
sceSysmoduleLoadModule
int sceSysmoduleLoadModule(SceSysmoduleModuleId id)
Load a module.
SCE_SYSMODULE_AVCDEC
AVCDec module.
Definition: sysmodule.h:105