vitasdk
Documentation of the vitasdk
jpegencarm.h File Reference
#include <vitasdk/build_utils.h>
#include <psp2/types.h>

Go to the source code of this file.

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...
 

Typedefs

typedef void * SceJpegArmEncoderContext
 Dynamically allocated encoder context. More...
 

Enumerations

enum  SceJpegEncArmErrorCode {
  SCE_JPEGENCARM_ERROR_IMAGE_SIZE = 0x80650300 , SCE_JPEGENCARM_ERROR_INSUFFICIENT_BUFFER = 0x80650301 , SCE_JPEGENCARM_ERROR_INVALID_COMP_RATIO = 0x80650302 , SCE_JPEGENCARM_ERROR_INVALID_PIXELFORMAT = 0x80650303 ,
  SCE_JPEGENCARM_ERROR_INVALID_HEADER_MODE = 0x80650304 , SCE_JPEGENCARM_ERROR_INVALID_POINTER = 0x80650305
}
 Error Codes. More...
 
enum  SceJpegArmEncoderPixelFormat { SCE_JPEGENCARM_PIXELFORMAT_YCBCR420 = 8 , SCE_JPEGENCARM_PIXELFORMAT_YCBCR422 = 9 }
 Pixel Formats. More...
 
enum  SceJpegArmEncoderHeaderMode { SCE_JPEGENCARM_HEADER_MODE_JPEG = 0 , SCE_JPEGENCARM_HEADER_MODE_MJPEG = 1 }
 JPEG Header Modes. More...
 

Functions

 VITASDK_BUILD_ASSERT_EQ (4, SceJpegArmEncoderContext)
 
SceSize sceJpegArmEncoderGetContextSize (void)
 Get required size of context memory. More...
 
int sceJpegArmEncoderInit (SceJpegArmEncoderContext context, SceUInt16 inWidth, SceUInt16 inHeight, SceJpegArmEncoderPixelFormat pixelformat, void *outBuffer, SceSize outSize)
 Initialize a JPEG encoder. More...
 
int sceJpegArmEncoderEnd (SceJpegArmEncoderContext context)
 Terminate a JPEG encoder. More...
 
int sceJpegArmEncoderEncode (SceJpegArmEncoderContext context, const void *inBuffer)
 Execute a JPEG encode. More...
 
int sceJpegArmEncoderSetCompressionRatio (SceJpegArmEncoderContext context, SceUInt8 ratio)
 Set the encoder compression ratio. More...
 
int sceJpegArmEncoderSetOutputAddr (SceJpegArmEncoderContext context, void *outBuffer, SceSize outSize)
 Set encoder output address. More...
 
int sceJpegArmEncoderSetValidRegion (SceJpegArmEncoderContext context, SceUInt16 regionWidth, SceUInt16 regionHeight)
 Set the region of the image to be encoded as JPEG. More...
 
int sceJpegArmEncoderSetHeaderMode (SceJpegArmEncoderContext context, SceJpegArmEncoderHeaderMode mode)
 Set header used for output file. More...