Add sceJpegDecodeMJpegYCbCr and sceJpegCsc to pspjpeg.h

This commit is contained in:
Reg
2025-07-04 13:30:55 +02:00
committed by GitHub
parent 0d2e9b6507
commit 6b77137ab5

View File

@@ -55,11 +55,36 @@ int sceJpegDeleteMJpeg(void);
* @param size - size of the buffer pointed by jpegbuf
* @param rgba - buffer where the decoded data in RGBA format will be stored.
* It should have a size of (width * height * 4).
* @param unk - Unknown, pass 0
* @param dhtMode - Unknown, pass 0
*
* @return (width * 65536) + height on success, < 0 on error
*/
int sceJpegDecodeMJpeg(u8 *jpegbuf, SceSize size, void *rgba, u32 unk);
int sceJpegDecodeMJpeg(u8 *jpegbuf, SceSize size, void *rgba, u32 dhtMode);
/**
* Decodes a mjpeg frame with YCbCr encoding.
*
* @param jpegbuf - the buffer with the mjpeg frame
* @param size - size of the buffer pointed by jpegbuf
* @param rgba - buffer where the decoded data in YCbCr format will be stored.
* @param dhtMode - Unknown, pass 0
*
* @return (width * 65536) + height on success, < 0 on error
*/
int sceJpegDecodeMJpegYCbCr(u8 *jpegbuf, SceSize size, void *yCbCr, u32 dhtMode);
/**
* Converts a frame from YCbCr to ABGR
*
* @param imageAddr - buffer where the decoded data in abgr format will be stored.
* @param yCbCrAddr - the buffer with the YCbCr data
* @param widthHeight - width and height of the frame (width << 16) | height
* @param bufferWidth - number of pixels per row of the buffer
* @param colourInfo - chroma subsampling mode
*
* @return 0 on success, < 0 on error
*/
int sceJpegCsc(u8 *imageAddr, u8 *yCbCrAddr, int widthHeight, int bufferWidth, int colourInfo);
#ifdef __cplusplus
}