vitasdk
Documentation of the vitasdk
|
Exports for User.
Include the header file in your project:
Link the library to the executable:
Load the required module:
Typedefs | |
typedef void * | SceJpegArmEncoderContext |
Dynamically allocated encoder context. More... | |
Macros | |
#define | SCE_JPEGENCARM_MIN_COMP_RATIO 1 |
Lowest compression ratio, best quality. More... | |
#define | SCE_JPEGENCARM_DEFAULT_COMP_RATIO 64 |
Default compression ratio. More... | |
#define | SCE_JPEGENCARM_MAX_COMP_RATIO 255 |
Highest compression ratio, lowest quality. More... | |
#define SCE_JPEGENCARM_MIN_COMP_RATIO 1 |
Lowest compression ratio, best quality.
#define SCE_JPEGENCARM_DEFAULT_COMP_RATIO 64 |
Default compression ratio.
#define SCE_JPEGENCARM_MAX_COMP_RATIO 255 |
Highest compression ratio, lowest quality.
typedef void* SceJpegArmEncoderContext |
Dynamically allocated encoder context.
See sceJpegArmEncoderGetContextSize() for required allocation size. The address must be 4 byte aligned.
Error Codes.
Enumerator | |
---|---|
SCE_JPEGENCARM_ERROR_IMAGE_SIZE | The image dimensions given are not supported, or are larger than those set at initialization. |
SCE_JPEGENCARM_ERROR_INSUFFICIENT_BUFFER | The output buffer provided is not of sufficient size. |
SCE_JPEGENCARM_ERROR_INVALID_COMP_RATIO | The compression ratio given is not within the valid range. |
SCE_JPEGENCARM_ERROR_INVALID_PIXELFORMAT | The pixelformat given is not one of SceJpegArmEncoderPixelFormat. |
SCE_JPEGENCARM_ERROR_INVALID_HEADER_MODE | The headerMode given is not one of SceJpegArmEncoderHeaderMode. |
SCE_JPEGENCARM_ERROR_INVALID_POINTER | A null or badly aligned pointer was given. |
VITASDK_BUILD_ASSERT_EQ | ( | 4 | , |
SceJpegArmEncoderContext | |||
) |
SceSize sceJpegArmEncoderGetContextSize | ( | void | ) |
Get required size of context memory.
int sceJpegArmEncoderInit | ( | SceJpegArmEncoderContext | context, |
SceUInt16 | inWidth, | ||
SceUInt16 | inHeight, | ||
SceJpegArmEncoderPixelFormat | pixelformat, | ||
void * | outBuffer, | ||
SceSize | outSize | ||
) |
Initialize a JPEG encoder.
[in] | context | - An allocated encoder context of appropriate size. |
[in] | inWidth | - Input width in pixels. |
[in] | inHeight | - Input height in pixels. |
[in] | pixelformat | - One of SceJpegArmEncoderPixelFormat. |
[in] | outBuffer | - A sufficiently sized 8 byte aligned output buffer. |
[in] | outSize | - Output buffer size in bytes. |
int sceJpegArmEncoderEnd | ( | SceJpegArmEncoderContext | context | ) |
Terminate a JPEG encoder.
[in] | context | - An already initialized SceJpegArmEncoderContext. |
int sceJpegArmEncoderEncode | ( | SceJpegArmEncoderContext | context, |
const void * | inBuffer | ||
) |
Execute a JPEG encode.
[in] | context | - An already initialized SceJpegArmEncoderContext. |
[in] | inBuffer | - An 8 byte aligned memory block of color data. |
int sceJpegArmEncoderSetCompressionRatio | ( | SceJpegArmEncoderContext | context, |
SceUInt8 | ratio | ||
) |
Set the encoder compression ratio.
[in] | context | - An already initialized SceJpegArmEncoderContext. |
[in] | ratio | - A value between 1 and 255 (higher = better compression, lower = better speed). |
See SCE_JPEGENCARM_DEFAULT_COMP_RATIO for the default compression ratio.
int sceJpegArmEncoderSetOutputAddr | ( | SceJpegArmEncoderContext | context, |
void * | outBuffer, | ||
SceSize | outSize | ||
) |
Set encoder output address.
[in] | context | - An already initialized SceJpegArmEncoderContext. |
[in] | outBuffer | - A sufficiently sized 8 byte aligned output buffer. |
[in] | outSize | - Output buffer size in bytes. |
int sceJpegArmEncoderSetValidRegion | ( | SceJpegArmEncoderContext | context, |
SceUInt16 | regionWidth, | ||
SceUInt16 | regionHeight | ||
) |
Set the region of the image to be encoded as JPEG.
The encoded region starts from (0,0), which is the top left of the image, and expands outward by regionWidth and regionHeight.
[in] | context | - An already initialized SceJpegArmEncoderContext. |
[in] | regionWidth | - Width of the region in pixels. |
[in] | regionHeight | - Height of the region in pixels. |
int sceJpegArmEncoderSetHeaderMode | ( | SceJpegArmEncoderContext | context, |
SceJpegArmEncoderHeaderMode | mode | ||
) |
Set header used for output file.
[in] | context | - An already initialized SceJpegArmEncoderContext. |
[in] | mode | - One of SceJpegArmEncoderHeaderMode. |