Exports for Kernel.
Using this library in your project
Include the header file in your project:
#include <psp2kern/avcodec/jpegenc.h>
Link the library to the executable:
|
int | ksceJpegEncoderInit (SceJpegEncoderContext context, int inWidth, int inHeight, SceJpegEncoderPixelFormat pixelformat, void *outBuffer, SceSize outSize) |
| Initialize a jpeg encoder. More...
|
|
int | ksceJpegEncoderEnd (SceJpegEncoderContext context) |
| Terminate a jpeg encoder. More...
|
|
int | ksceJpegEncoderEncode (SceJpegEncoderContext context, const void *inBuffer) |
| Execute a jpeg encode. More...
|
|
int | ksceJpegEncoderSetCompressionRatio (SceJpegEncoderContext context, int ratio) |
| Set encoder compression ratio. More...
|
|
int | ksceJpegEncoderSetOutputAddr (SceJpegEncoderContext context, void *outBuffer, SceSize outSize) |
| Set encoder output address. More...
|
|
int | ksceJpegEncoderCsc (SceJpegEncoderContext context, void *outBuffer, const void *inBuffer, int inPitch, SceJpegEncoderPixelFormat inPixelFormat) |
| Execute a color conversion from ARGB to YCbCr. More...
|
|
int | ksceJpegEncoderGetContextSize (void) |
| Return required free size to allocate a jpeg encoder. More...
|
|
int | ksceJpegEncoderSetValidRegion (SceJpegEncoderContext context, int inWidth, int inHeight) |
| Set encoder valid region (?) More...
|
|
int | ksceJpegEncoderSetHeaderMode (SceJpegEncoderContext context, int mode) |
| Set header used for output file. More...
|
|
◆ ksceJpegEncoderInit()
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.
◆ ksceJpegEncoderEnd()
Terminate a jpeg encoder.
- Parameters
-
- Returns
- 0 on success, < 0 on error.
◆ ksceJpegEncoderEncode()
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
- 0 on success, < 0 on error.
◆ ksceJpegEncoderSetCompressionRatio()
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.
◆ ksceJpegEncoderSetOutputAddr()
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.
◆ ksceJpegEncoderCsc()
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.
◆ ksceJpegEncoderGetContextSize()
int ksceJpegEncoderGetContextSize |
( |
void |
| ) |
|
Return required free size to allocate a jpeg encoder.
- Returns
- Required free memory size in bytes, < 0 on error.
◆ ksceJpegEncoderSetValidRegion()
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.
◆ ksceJpegEncoderSetHeaderMode()
Set header used for output file.
- Parameters
-
- Returns
- 0 on success, < 0 on error.