vitasdk
Documentation of the vitasdk
jpegencarm.h
Go to the documentation of this file.
1
11#ifndef _PSP2_JPEGENCARM_H_
12#define _PSP2_JPEGENCARM_H_
13
14#include <vitasdk/build_utils.h>
15#include <psp2/types.h>
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21#define SCE_JPEGENCARM_MIN_COMP_RATIO 1
22#define SCE_JPEGENCARM_DEFAULT_COMP_RATIO 64
23#define SCE_JPEGENCARM_MAX_COMP_RATIO 255
24
33
64
72
80
87
100int sceJpegArmEncoderInit(SceJpegArmEncoderContext context, SceUInt16 inWidth, SceUInt16 inHeight, SceJpegArmEncoderPixelFormat pixelformat, void *outBuffer, SceSize outSize);
101
110
119int sceJpegArmEncoderEncode(SceJpegArmEncoderContext context, const void *inBuffer);
120
132
143
155
165
166#ifdef __cplusplus
167}
168#endif /* __cplusplus */
169
170#endif /* _PSP2_JPEGENCARM_H_ */
#define VITASDK_BUILD_ASSERT_EQ(__size__, __name__)
Definition build_utils.h:13
SceJpegEncArmErrorCode
Error Codes.
Definition jpegencarm.h:37
int sceJpegArmEncoderEncode(SceJpegArmEncoderContext context, const void *inBuffer)
Execute a JPEG encode.
SceSize sceJpegArmEncoderGetContextSize(void)
Get required size of context memory.
SceJpegArmEncoderHeaderMode
JPEG Header Modes.
Definition jpegencarm.h:76
SceJpegArmEncoderPixelFormat
Pixel Formats.
Definition jpegencarm.h:68
int sceJpegArmEncoderSetOutputAddr(SceJpegArmEncoderContext context, void *outBuffer, SceSize outSize)
Set encoder output address.
int sceJpegArmEncoderInit(SceJpegArmEncoderContext context, SceUInt16 inWidth, SceUInt16 inHeight, SceJpegArmEncoderPixelFormat pixelformat, void *outBuffer, SceSize outSize)
Initialize a JPEG encoder.
int sceJpegArmEncoderSetValidRegion(SceJpegArmEncoderContext context, SceUInt16 regionWidth, SceUInt16 regionHeight)
Set the region of the image to be encoded as JPEG.
void * SceJpegArmEncoderContext
Dynamically allocated encoder context.
Definition jpegencarm.h:31
int sceJpegArmEncoderEnd(SceJpegArmEncoderContext context)
Terminate a JPEG encoder.
int sceJpegArmEncoderSetCompressionRatio(SceJpegArmEncoderContext context, SceUInt8 ratio)
Set the encoder compression ratio.
int sceJpegArmEncoderSetHeaderMode(SceJpegArmEncoderContext context, SceJpegArmEncoderHeaderMode mode)
Set header used for output file.
@ SCE_JPEGENCARM_ERROR_INVALID_POINTER
A null or badly aligned pointer was given.
Definition jpegencarm.h:62
@ SCE_JPEGENCARM_ERROR_INVALID_HEADER_MODE
The headerMode given is not one of SceJpegArmEncoderHeaderMode.
Definition jpegencarm.h:58
@ SCE_JPEGENCARM_ERROR_IMAGE_SIZE
The image dimensions given are not supported, or are larger than those set at initialization.
Definition jpegencarm.h:42
@ SCE_JPEGENCARM_ERROR_INVALID_COMP_RATIO
The compression ratio given is not within the valid range.
Definition jpegencarm.h:50
@ SCE_JPEGENCARM_ERROR_INSUFFICIENT_BUFFER
The output buffer provided is not of sufficient size.
Definition jpegencarm.h:46
@ SCE_JPEGENCARM_ERROR_INVALID_PIXELFORMAT
The pixelformat given is not one of SceJpegArmEncoderPixelFormat.
Definition jpegencarm.h:54
@ SCE_JPEGENCARM_HEADER_MODE_JPEG
JPEG header mode.
Definition jpegencarm.h:77
@ SCE_JPEGENCARM_HEADER_MODE_MJPEG
MJPEG header mode.
Definition jpegencarm.h:78
@ SCE_JPEGENCARM_PIXELFORMAT_YCBCR422
YCbCr422 format.
Definition jpegencarm.h:70
@ SCE_JPEGENCARM_PIXELFORMAT_YCBCR420
YCbCr420 format.
Definition jpegencarm.h:69
unsigned int SceSize
Definition types.h:56
uint16_t SceUInt16
Definition types.h:42
uint8_t SceUInt8
Definition types.h:36