vitasdk
Documentation of the vitasdk
jpegenc.h
Go to the documentation of this file.
1 
6 #ifndef _PSP2_JPEGENC_H_
7 #define _PSP2_JPEGENC_H_
8 
9 #include <vitasdk/build_utils.h>
10 #include <psp2/types.h>
11 #include <psp2common/jpegenc.h>
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
21 
22 typedef struct SceJpegEncoderInitParam {
24  int inWidth;
25  int inHeight;
27  void *outBuffer;
29  int option;
32 
45 int sceJpegEncoderInit(SceJpegEncoderContext context, int inWidth, int inHeight, SceJpegEncoderPixelFormat pixelformat, void *outBuffer, SceSize outSize);
46 
55 
64 
73 int sceJpegEncoderEncode(SceJpegEncoderContext context, const void *inBuffer);
74 
84 
85 
95 int sceJpegEncoderSetOutputAddr(SceJpegEncoderContext context, void *outBuffer, SceSize outSize);
96 
108 int sceJpegEncoderCsc(SceJpegEncoderContext context, void *outBuffer, const void *inBuffer, int inPitch, SceJpegEncoderPixelFormat inPixelFormat);
109 
116 
126 int sceJpegEncoderSetValidRegion(SceJpegEncoderContext context, int inWidth, int inHeight);
127 
137 
138 #ifdef __cplusplus
139 }
140 #endif /* __cplusplus */
141 
142 #endif /* _PSP2_JPEGENC_H_ */
143 
int inWidth
Input width in pixels.
Definition: jpegenc.h:24
int inHeight
Input height in pixels.
Definition: jpegenc.h:25
int sceJpegEncoderInitWithParam(SceJpegEncoderContext context, const SceJpegEncoderInitParam *initParam)
Initialize a jpeg encoder with param.
int sceJpegEncoderCsc(SceJpegEncoderContext context, void *outBuffer, const void *inBuffer, int inPitch, SceJpegEncoderPixelFormat inPixelFormat)
Execute a color conversion from ARGB to YCbCr.
SceSize outSize
Output size in bytes.
Definition: jpegenc.h:28
int option
Additional options, OR of SceJpegEncoderInitParamOption.
Definition: jpegenc.h:29
int sceJpegEncoderSetOutputAddr(SceJpegEncoderContext context, void *outBuffer, SceSize outSize)
Set encoder output address.
int sceJpegEncoderGetContextSize(void)
Return required free size to allocate a jpeg encoder.
SceJpegEncoderInitParamOption
Definition: jpegenc.h:17
VITASDK_BUILD_ASSERT_EQ(0x1C, SceJpegEncoderInitParam)
int sceJpegEncoderEnd(SceJpegEncoderContext context)
Terminate a jpeg encoder.
SceJpegEncoderPixelFormat
Definition: jpegenc.h:30
void * SceJpegEncoderContext
Definition: jpegenc.h:17
int sceJpegEncoderEncode(SceJpegEncoderContext context, const void *inBuffer)
Execute a jpeg encode.
int sceJpegEncoderInit(SceJpegEncoderContext context, int inWidth, int inHeight, SceJpegEncoderPixelFormat pixelformat, void *outBuffer, SceSize outSize)
Initialize a jpeg encoder.
int sceJpegEncoderSetHeaderMode(SceJpegEncoderContext context, int mode)
Set header used for output file.
SceSize size
Size of this structure.
Definition: jpegenc.h:23
int sceJpegEncoderSetValidRegion(SceJpegEncoderContext context, int inWidth, int inHeight)
Set encoder valid region (?)
int sceJpegEncoderSetCompressionRatio(SceJpegEncoderContext context, int ratio)
Set encoder compression ratio.
void * outBuffer
A physically continuous memory block 256 bytes aligned.
Definition: jpegenc.h:27
int pixelFormat
A valid SceJpegEncoderPixelFormat set of values.
Definition: jpegenc.h:26
@ SCE_JPEGENC_INIT_PARAM_OPTION_NONE
Default option.
Definition: jpegenc.h:18
@ SCE_JPEGENC_INIT_PARAM_OPTION_LPDDR2_MEMORY
LPDDR2 memory will be used instead of CDRAM.
Definition: jpegenc.h:19
Definition: jpegenc.h:22
unsigned int SceSize
Definition: types.h:56