Files
AnyPS5/docs/dev/debt/libSceJpegDec.md
T
RickandClaude Opus 5.5 95e51985d4 fix(libSceJpegDec): use the JpegDec parameter and image info layouts
The JpegDec structures were libScePngDec's under new names. OpenOrbis
jpeg.h and SharpProspero JpegDec.cs agree on a 12-byte create param, a
0x30-byte decode param with a coefficient buffer, decode mode and down
scale, and a 0x24-byte image info that reports the coefficient memory
size, the suitable CSC attribute and the output size.

Accept the CSC attributes 1 and 2 that SharpProspero passes, fill the
output size, component count, coefficient memory size and suitable
attribute, apply the requested alpha, and throw for decode modes other
than 0 and down scales other than 1.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 16:44:09 +02:00

1.5 KiB

libSceJpegDec technical debt

Unknown function info

  • libSceJpegDec (libSceJpegDec) - structure layouts follow OpenOrbis jpeg.h and SharpProspero JpegDec.cs; attributes 1 and 2 are the values SharpProspero's JpegImage.cs passes. The error codes are libScePngDec's: no reference lists the JpegDec ones, and SharpProspero raises 0x80650020 on its JpegDec path where it raises libScePngDec's 0x80690020 on its PngDec path. Image info always reports color space 3, suitable CSC attribute 1 and zero component ids and sampling factors; the console's values, including which images it reports attribute 2 for, are unknown. The coefficient memory size is 0 because the host decoder needs no coefficient buffer; the size the console reports for progressive images is unknown. max_image_width is not checked, and the packed width << 16 | height decode result is libScePngDec's

Functional

  • libSceJpegDec (libSceJpegDec) - decode modes other than 0 and down scales other than 1 throw