Exports for User.
Using this library in your project
Include the header file in your project:
Link the library to the executable:
Using this library in your project
Include the header file in your project:
|
| VITASDK_BUILD_ASSERT_EQ (0x1C, SceJpegEncoderInitParam) |
|
int | sceJpegEncoderInit (SceJpegEncoderContext context, int inWidth, int inHeight, SceJpegEncoderPixelFormat pixelformat, void *outBuffer, SceSize outSize) |
| Initialize a jpeg encoder. More...
|
|
int | sceJpegEncoderInitWithParam (SceJpegEncoderContext context, const SceJpegEncoderInitParam *initParam) |
| Initialize a jpeg encoder with param. More...
|
|
int | sceJpegEncoderEnd (SceJpegEncoderContext context) |
| Terminate a jpeg encoder. More...
|
|
int | sceJpegEncoderEncode (SceJpegEncoderContext context, const void *inBuffer) |
| Execute a jpeg encode. More...
|
|
int | sceJpegEncoderSetCompressionRatio (SceJpegEncoderContext context, int ratio) |
| Set encoder compression ratio. More...
|
|
int | sceJpegEncoderSetOutputAddr (SceJpegEncoderContext context, void *outBuffer, SceSize outSize) |
| Set encoder output address. More...
|
|
int | sceJpegEncoderCsc (SceJpegEncoderContext context, void *outBuffer, const void *inBuffer, int inPitch, SceJpegEncoderPixelFormat inPixelFormat) |
| Execute a color conversion from ARGB to YCbCr. More...
|
|
int | sceJpegEncoderGetContextSize (void) |
| Return required free size to allocate a jpeg encoder. More...
|
|
int | sceJpegEncoderSetValidRegion (SceJpegEncoderContext context, int inWidth, int inHeight) |
| Set encoder valid region (?) More...
|
|
int | sceJpegEncoderSetHeaderMode (SceJpegEncoderContext context, int mode) |
| Set header used for output file. More...
|
|
| VITASDK_BUILD_ASSERT_EQ (4, SceJpegEncoderContext) |
|
◆ SceJpegEncoderInitParam
struct SceJpegEncoderInitParam |
Data Fields |
SceSize |
size |
Size of this structure. |
int |
inWidth |
Input width in pixels. |
int |
inHeight |
Input height in pixels. |
int |
pixelFormat |
A valid SceJpegEncoderPixelFormat set of values. |
void * |
outBuffer |
A physically continuous memory block 256 bytes aligned. |
SceSize |
outSize |
Output size in bytes. |
int |
option |
Additional options, OR of SceJpegEncoderInitParamOption. |
◆ SceJpegEncoderContext
◆ SceJpegEncoderInitParamOption
Enumerator |
---|
SCE_JPEGENC_INIT_PARAM_OPTION_NONE | Default option.
|
SCE_JPEGENC_INIT_PARAM_OPTION_LPDDR2_MEMORY | LPDDR2 memory will be used instead of CDRAM.
|
◆ SceJpegEncErrorCode
Enumerator |
---|
SCE_JPEGENC_ERROR_IMAGE_SIZE | |
SCE_JPEGENC_ERROR_INSUFFICIENT_BUFFER | |
SCE_JPEGENC_ERROR_INVALID_COMPRATIO | |
SCE_JPEGENC_ERROR_INVALID_PIXELFORMAT | |
SCE_JPEGENC_ERROR_INVALID_HEADER_MODE | |
SCE_JPEGENC_ERROR_INVALID_POINTER | |
SCE_JPEGENC_ERROR_NOT_PHY_CONTINUOUS_MEMORY | |
◆ SceJpegEncoderPixelFormat
Enumerator |
---|
SCE_JPEGENC_PIXELFORMAT_ARGB8888 | ARGB8888 format.
|
SCE_JPEGENC_PIXELFORMAT_YCBCR420 | YCbCr420 format.
|
SCE_JPEGENC_PIXELFORMAT_YCBCR422 | YCbCr422 format.
|
SCE_JPEGENC_PIXELFORMAT_CSC_ARGB_YCBCR | ARGB to YCbCr color conversion flag.
|
◆ SceJpegEncoderHeaderMode
Enumerator |
---|
SCE_JPEGENC_HEADER_MODE_JPEG | JPEG header mode.
|
SCE_JPEGENC_HEADER_MODE_MJPEG | MJPEG header mode.
|
◆ VITASDK_BUILD_ASSERT_EQ() [1/2]
◆ sceJpegEncoderInit()
Initialize a jpeg encoder.
- Parameters
-
[in] | context | - A pointer to a big enough allocated memory block |
[in] | inWidth | - Input width in pixels |
[in] | inHeight | - Input height in pixels |
[in] | pixelformat | - A valid SceJpegEncoderPixelFormat set of values |
[in] | outBuffer | - A physically continuous memory block 256 bytes aligned |
[in] | outSize | - Output size in bytes |
- Returns
- 0 on success, < 0 on error.
◆ sceJpegEncoderInitWithParam()
Initialize a jpeg encoder with param.
- Parameters
-
[in] | initParam | - A pointer to the initialization parameters |
- Returns
- 0 on success, < 0 on error.
◆ sceJpegEncoderEnd()
Terminate a jpeg encoder.
- Parameters
-
- Returns
- 0 on success, < 0 on error.
◆ sceJpegEncoderEncode()
Execute a jpeg encode.
- Parameters
-
[in] | context | - A pointer to an already initialized SceJpegEncoderContext |
[in] | inBuffer | - A physically continuous memory block 256 bytes aligned |
- Returns
- encoded jpeg size on success, < 0 on error.
◆ sceJpegEncoderSetCompressionRatio()
Set encoder compression ratio.
- Parameters
-
[in] | context | - A pointer to an already initialized SceJpegEncoderContext |
[in] | ratio | - A value between 0 and 255 (higher = better compression, lower = better speed) |
- Returns
- 0 on success, < 0 on error.
◆ sceJpegEncoderSetOutputAddr()
Set encoder output address.
- Parameters
-
[in] | context | - A pointer to an already initialized SceJpegEncoderContext |
[in] | outBuffer | - A physically continuous memory block 256 bytes aligned |
[in] | outSize | - Output buffer size in bytes |
- Returns
- 0 on success, < 0 on error.
◆ sceJpegEncoderCsc()
Execute a color conversion from ARGB to YCbCr.
- Parameters
-
[in] | context | - A pointer to an already initialized SceJpegEncoderContext |
[in] | outBuffer | - A physical continuous memory block 256 bytes aligned |
[in] | inBuffer | - A pointer to a valid ARGB buffer |
[in] | inPitch | - Input pitch value in pixels |
[in] | inPixelFormat | - A valid SceJpegEncoderPixelFormat set of values |
- Returns
- 0 on success, < 0 on error.
◆ sceJpegEncoderGetContextSize()
int sceJpegEncoderGetContextSize |
( |
void |
| ) |
|
Return required free size to allocate a jpeg encoder.
- Returns
- Required free memory size in bytes, < 0 on error.
◆ sceJpegEncoderSetValidRegion()
Set encoder valid region (?)
- Parameters
-
[in] | context | - A pointer to an already initialized SceJpegEncoderContext |
[in] | inWidth | - Input width in pixels |
[in] | inHeight | - Input height in pixels |
- Returns
- 0 on success, < 0 on error.
◆ sceJpegEncoderSetHeaderMode()
Set header used for output file.
- Parameters
-
- Returns
- 0 on success, < 0 on error.
◆ VITASDK_BUILD_ASSERT_EQ() [2/2]