vitasdk
Documentation of the vitasdk
videodec.h
Go to the documentation of this file.
1 
7 #ifndef _PSP2_VIDEODEC_H_
8 #define _PSP2_VIDEODEC_H_
9 
10 #include <vitasdk/build_utils.h>
11 #include <psp2/types.h>
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 typedef enum SceVideodecErrorCode {
33 
34 typedef enum SceVideodecType {
37 
38 typedef enum SceAvcdecErrorCode {
54 
55 typedef enum SceAvcdecPixelFormat {
62 
64  uint32_t size;
65  uint32_t horizontal;
66  uint32_t vertical;
67  uint32_t numOfRefFrames;
68  uint32_t numOfStreams;
71 
72 typedef union SceVideodecQueryInitInfo {
73  uint8_t reserved[32];
77 
78 typedef struct SceVideodecTimeStamp {
79  uint32_t upper;
80  uint32_t lower;
83 
84 typedef struct SceAvcdecQueryDecoderInfo {
85  uint32_t horizontal;
86  uint32_t vertical;
87  uint32_t numOfRefFrames;
90 
91 typedef struct SceAvcdecDecoderInfo {
92  uint32_t frameMemSize;
95 
96 typedef struct SceAvcdecBuf {
97  void *pBuf;
98  uint32_t size;
99 } SceAvcdecBuf;
101 
102 typedef struct SceAvcdecCtrl {
103  uint32_t handle;
105 } SceAvcdecCtrl;
107 
108 typedef struct SceAvcdecAu {
112 } SceAvcdecAu;
114 
115 typedef struct SceAvcdecInfo {
116  uint32_t numUnitsInTick;
117  uint32_t timeScale;
119 
120  uint8_t aspectRatioIdc;
121  uint16_t sarWidth;
122  uint16_t sarHeight;
123 
127 
129 
130  uint8_t picStruct[2];
131  uint8_t ctType;
132 
134 } SceAvcdecInfo;
136 
137 typedef struct SceAvcdecFrameOptionRGBA {
138  uint8_t alpha;
139  uint8_t cscCoefficient;
140  uint8_t reserved[14];
143 
144 typedef union SceAvcdecFrameOption {
145  uint8_t reserved[16];
149 
150 typedef struct SceAvcdecFrame {
151  uint32_t pixelType;
152  uint32_t framePitch;
153  uint32_t frameWidth;
154  uint32_t frameHeight;
155 
156  uint32_t horizontalSize;
157  uint32_t verticalSize;
158 
163 
165 
166  void *pPicture[2];
169 
170 typedef struct SceAvcdecPicture {
171  uint32_t size;
176 
177 typedef struct SceAvcdecArrayPicture {
178  uint32_t numOfOutput;
179  uint32_t numOfElm;
183 
191 
198 
207 
216 
223 
231 int sceAvcdecDecode(const SceAvcdecCtrl *decoder, const SceAvcdecAu *au, SceAvcdecArrayPicture *array_picture);
232 
233 #ifdef __cplusplus
234 }
235 #endif
236 
237 #endif /* _PSP2_VIDEODEC_H_ */
SceVideodecQueryInitInfoHwAvcdec hwAvc
Definition: videodec.h:74
uint8_t reserved[16]
Definition: videodec.h:145
uint8_t transferCharacteristics
Definition: videodec.h:125
uint32_t size
sizeof(SceVideodecQueryInitInfoHwAvcdec)
Definition: videodec.h:64
uint16_t sarWidth
Definition: videodec.h:121
uint32_t pixelType
One of SceAvcdecPixelFormat.
Definition: videodec.h:151
void * pPicture[2]
address of picture buffer
Definition: videodec.h:166
SceVideodecType
Definition: videodec.h:34
uint32_t frameCropLeftOffset
Definition: videodec.h:159
uint8_t matrixCoefficients
Definition: videodec.h:126
uint32_t framePitch
Definition: videodec.h:152
uint32_t numOfOutput
Number of outputs.
Definition: videodec.h:178
uint16_t sarHeight
Definition: videodec.h:122
SceAvcdecBuf es
Definition: videodec.h:111
uint32_t horizontalSize
Definition: videodec.h:156
int sceVideodecInitLibrary(SceVideodecType codec, const SceVideodecQueryInitInfoHwAvcdec *initInfo)
uint8_t colourPrimaries
Definition: videodec.h:124
uint32_t frameWidth
Definition: videodec.h:153
int sceAvcdecCreateDecoder(SceVideodecType codec, SceAvcdecCtrl *decoder, const SceAvcdecQueryDecoderInfo *query)
int sceAvcdecDecode(const SceAvcdecCtrl *decoder, const SceAvcdecAu *au, SceAvcdecArrayPicture *array_picture)
uint32_t vertical
Definition: videodec.h:66
uint32_t vertical
Definition: videodec.h:86
uint32_t numOfRefFrames
Number of reference frames.
Definition: videodec.h:87
SceAvcdecPixelFormat
Definition: videodec.h:55
uint8_t fixedFrameRateFlag
Definition: videodec.h:118
uint32_t handle
Definition: videodec.h:103
uint32_t horizontal
Definition: videodec.h:85
int sceAvcdecDeleteDecoder(SceAvcdecCtrl *decoder)
SceAvcdecBuf frameBuf
Definition: videodec.h:104
uint8_t reserved[14]
Definition: videodec.h:140
SceAvcdecFrame frame
Definition: videodec.h:172
uint8_t alpha
Definition: videodec.h:138
uint32_t upper
Definition: videodec.h:79
SceAvcdecFrameOptionRGBA rgba
Definition: videodec.h:146
uint32_t lower
Definition: videodec.h:80
VITASDK_BUILD_ASSERT_EQ(0x14, SceVideodecQueryInitInfoHwAvcdec)
uint32_t timeScale
Definition: videodec.h:117
uint32_t frameCropBottomOffset
Definition: videodec.h:162
void * pBuf
Definition: videodec.h:97
uint32_t frameHeight
Definition: videodec.h:154
uint32_t size
Definition: videodec.h:171
SceVideodecTimeStamp pts
Definition: videodec.h:109
uint8_t reserved[32]
Definition: videodec.h:73
SceAvcdecFrameOption opt
Definition: videodec.h:164
uint8_t ctType
Definition: videodec.h:131
SceVideodecTimeStamp pts
Definition: videodec.h:133
uint32_t frameCropRightOffset
Definition: videodec.h:160
SceVideodecErrorCode
Definition: videodec.h:17
uint32_t numUnitsInTick
Definition: videodec.h:116
SceVideodecTimeStamp dts
Definition: videodec.h:110
SceAvcdecPicture ** pPicture
Definition: videodec.h:180
uint32_t numOfStreams
Must be set to 1.
Definition: videodec.h:68
uint32_t verticalSize
Definition: videodec.h:157
uint32_t size
Definition: videodec.h:98
uint32_t numOfRefFrames
Number of reference frames to use.
Definition: videodec.h:67
int sceVideodecTermLibrary(SceVideodecType codec)
uint32_t horizontal
Definition: videodec.h:65
uint8_t aspectRatioIdc
Definition: videodec.h:120
SceAvcdecInfo info
Definition: videodec.h:173
uint8_t videoFullRangeFlag
Definition: videodec.h:128
uint8_t cscCoefficient
Definition: videodec.h:139
uint32_t frameMemSize
Definition: videodec.h:92
uint32_t frameCropTopOffset
Definition: videodec.h:161
uint8_t picStruct[2]
Definition: videodec.h:130
uint32_t numOfElm
Number of elements.
Definition: videodec.h:179
SceAvcdecErrorCode
Definition: videodec.h:38
int sceAvcdecQueryDecoderMemSize(SceVideodecType codec, const SceAvcdecQueryDecoderInfo *query, SceAvcdecDecoderInfo *decoderInfo)
@ SCE_VIDEODEC_TYPE_HW_AVCDEC
Definition: videodec.h:35
@ SCE_AVCDEC_PIXELFORMAT_YUV420_PACKED_RASTER
Definition: videodec.h:60
@ SCE_AVCDEC_PIXELFORMAT_YUV420_RASTER
Definition: videodec.h:59
@ SCE_AVCDEC_PIXELFORMAT_RGBA8888
Definition: videodec.h:56
@ SCE_AVCDEC_PIXELFORMAT_RGBA565
Definition: videodec.h:57
@ SCE_AVCDEC_PIXELFORMAT_RGBA5551
Definition: videodec.h:58
@ SCE_VIDEODEC_ERROR_NOT_INITIALIZE
Definition: videodec.h:29
@ SCE_VIDEODEC_ERROR_NOT_PHY_CONTINUOUS_MEMORY
Definition: videodec.h:24
@ SCE_VIDEODEC_ERROR_INVALID_TYPE
Definition: videodec.h:18
@ SCE_VIDEODEC_ERROR_INVALID_STREAM
Definition: videodec.h:30
@ SCE_VIDEODEC_ERROR_INITIALIZE
Definition: videodec.h:28
@ SCE_VIDEODEC_ERROR_INVALID_POINTER
Definition: videodec.h:26
@ SCE_VIDEODEC_ERROR_INVALID_ARGUMENT_SIZE
Definition: videodec.h:31
@ SCE_VIDEODEC_ERROR_ALREADY_USED
Definition: videodec.h:25
@ SCE_VIDEODEC_ERROR_UNSUPPORT_IMAGE_SIZE
Definition: videodec.h:22
@ SCE_VIDEODEC_ERROR_INVALID_PARAM
Definition: videodec.h:19
@ SCE_VIDEODEC_ERROR_ES_BUFFER_FULL
Definition: videodec.h:27
@ SCE_VIDEODEC_ERROR_INVALID_COLOR_FORMAT
Definition: videodec.h:23
@ SCE_VIDEODEC_ERROR_INVALID_STATE
Definition: videodec.h:21
@ SCE_VIDEODEC_ERROR_OUT_OF_MEMORY
Definition: videodec.h:20
@ SCE_AVCDEC_ERROR_INVALID_POINTER
Definition: videodec.h:47
@ SCE_AVCDEC_ERROR_INVALID_PARAM
Definition: videodec.h:40
@ SCE_AVCDEC_ERROR_ES_BUFFER_FULL
Definition: videodec.h:48
@ SCE_AVCDEC_ERROR_INVALID_STATE
Definition: videodec.h:42
@ SCE_AVCDEC_ERROR_NOT_PHY_CONTINUOUS_MEMORY
Definition: videodec.h:45
@ SCE_AVCDEC_ERROR_INVALID_ARGUMENT_SIZE
Definition: videodec.h:52
@ SCE_AVCDEC_ERROR_UNSUPPORT_IMAGE_SIZE
Definition: videodec.h:43
@ SCE_AVCDEC_ERROR_INVALID_STREAM
Definition: videodec.h:51
@ SCE_AVCDEC_ERROR_ALREADY_USED
Definition: videodec.h:46
@ SCE_AVCDEC_ERROR_NOT_INITIALIZE
Definition: videodec.h:50
@ SCE_AVCDEC_ERROR_INITIALIZE
Definition: videodec.h:49
@ SCE_AVCDEC_ERROR_OUT_OF_MEMORY
Definition: videodec.h:41
@ SCE_AVCDEC_ERROR_INVALID_TYPE
Definition: videodec.h:39
@ SCE_AVCDEC_ERROR_INVALID_COLOR_FORMAT
Definition: videodec.h:44
Definition: videodec.h:177
Definition: videodec.h:108
Definition: videodec.h:96
Definition: videodec.h:102
Definition: videodec.h:91
Definition: videodec.h:150
Definition: videodec.h:137
Definition: videodec.h:115
Definition: videodec.h:170
Definition: videodec.h:84
Definition: videodec.h:63
Definition: videodec.h:78
Definition: videodec.h:144
Definition: videodec.h:72