mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-07 13:39:55 +00:00
2.4 KiB
2.4 KiB
libScePngDec technical debt
Functional
- libScePngDec: the supplied module confirms the work-memory size formula, 16-byte handle alignment, the first 24 bytes of its context, and Create/QueryMemorySize validation order. The host now exposes these values but still allocates decoder working storage on the host instead of using the guest work region.
- scePngDecDecode: the original's accepted pixel format 132 remains unsupported and throws. The input bit-depth limit and 16-to-8-bit conversion follow Prosper's PS5 3.20 module analysis, and the large-dimension image-info requirement and its validation order follow Prosper's PS5 3.20 module analysis, not console measurements here. The supplied 13.42 module accepts row filter type 7 and leaves the rows decoded before an error when the IDAT data ends early; here both decode nothing and return
0x80690012. Decoder scratch-memory behavior is not matched to the supplied module. - scePngDecDecodeWithInputControl (libScePngDec) - parameter offsets and validation order are from firmware 11.00's
libScePngDec.sprxdisassembly, not measured on a console: the input callback is at0x00, its argument at0x08, the output buffer at0x10, its size at0x18,operationat0x1c(0x10parses the header,0x20decodes), pixel format at0x1e, alpha at0x20, a reserved halfword at0x22that must be zero, and the pitch at0x24. Operation0x10keeps the stream on the handle and stops once the IHDR, tRNS or IDAT chunk header is known; operation0x20continues that stream and decodes the buffered bytes through the direct decode path. The host pulls 16-byte blocks for the header and 1 KiB blocks for the body, so callback call counts and the byte at which each callback runs differ from the console's streaming; decoding without a prior parse, pixel format 132, and a concurrent call on a busy handle throws. Malformed data returns0x80690010and a negative callback result is propagated, where the console has further0x80690011and0x80690020parse failures that are not reproduced.