mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 08:33:12 -05:00
sceJpegDecParseHeader and sceJpegDecDecode threw for every down scale other than 1. SharpProspero's JpegDec.cs documents the factors 1, 2, 4 and 8 and output dimensions that account for the down scale. Decoder::Jpeg gains DecodeScaled, which decodes through libjpeg-turbo's scaled inverse DCT, and ScaledDimension, its rounded-up output size. sceJpegDecParseHeader reports the scaled output size; sceJpegDecDecode checks the pitch and image buffer against it, writes the scaled image and packs the output size into its result. A down scale of 1 still decodes as before. Decode modes other than 0, other down scales and a down-scaled CMYK or YCCK image still throw.