-
Notifications
You must be signed in to change notification settings - Fork 169
Add sceJpegDecodeMJpegYCbCr, sceJpegCsc and sceJpegGetOutputInfo #317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Cool, this is great to have. Have you tested they work? Then I'll merge them. |
|
Seems like the functions currently in this header might work specifically with yuvj420p chromas on real hardware vs any jpeg on ppsspp, we'll research more on it and update the header accordingly |
|
I've tested the functions and they do "work" on real hardware (only if the input resolution is at maximum about 480p and 4:2:0 chroma subsampling format). To use OutputInfo, YCbCr and Csc instead of the call to DecodeMJpeg just swap the decode with: int decRes, w, h, col, reqSize;
getJpegSize(buf, bufSize, w, h);
sceJpegCreateMJpeg(w, h);
uint8_t *conversion = (uint8_t *) malloc(w*h*4);
reqSize = sceJpegGetOutputInfo(buf, bufSize, &col, 0);
uint8_t *yCbCrBuf = (uint8_t *) malloc(reqSize);
decRes = sceJpegDecodeMJpegYCbCr(buf, bufSize, yCbCrBuf, reqSize, 0);
sceJpegCsc(conversion, yCbCrBuf, decRes, w, col);
free(yCbCrBuf);
sceJpegDeleteMJpeg();I've also cleaned up a bit the docs with the findings and added some defines with the errors I've encountered while testing so that they can be used to error check the functions. I don't think I am capable to do much more to help so if you think this version is satisfactory it can be merged, else if anyone has more information contributions are welcomed |
|
This is a really great addition, thanks for looking into this and finding out how it works! |

No description provided.