feat(libSceJpegDec): implement JPEG decoding #296

Merged
Pouare514 merged 1 commit from upstream-pr/296 into main 2026-10-02 13:45:19 +00:00
Pouare514 commented 2026-10-01 22:38:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Pouare514 on 2026-10-01T22:38:33Z.


What

New \libSceJpegDec\ module (Create/Delete/QueryMemorySize/ParseHeader/Decode) on the shared stb JPEG decoder, mirroring \libScePngDec. Unblocks TLOU Part I (PPSA03396), whose loader failed on the missing \libSceJpegDec.prx\ module.

  • Validates params with decoder-family error codes, RGBA/BGRA output with pitch support, returns packed dimensions like PngDec.
  • Adds header-only \Decoder::Jpeg::ParseHeader\ (stb info, no full decode).
  • Guards the shared \decoder_jpeg\ target so JpegEnc/JpegDec coexist.

Tested

Windows 11, MinGW GCC 15.2.0. \guest_jpeg_dec\ (round-trip via shared encoder, validation errors, BGRA swap, garbage input) passes. Full \ctest -E agc_driver_graphics|guest_rendering_wait: 94/94. Verified all 5 export NIDs present in the built .prx. TLOU still stops later at 3 other missing modules (PlayGoDialog, TextToSpeech2, Vdecsw) - follow-ups.

Checklist

  • Based on current \main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (\NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md\ files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4710473733 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/296). Originally posted by [Pouare514](https://github.com/Pouare514) on 2026-10-01T22:38:33Z. --- ### What New \libSceJpegDec\ module (Create/Delete/QueryMemorySize/ParseHeader/Decode) on the shared stb JPEG decoder, mirroring \libScePngDec\. Unblocks TLOU Part I (PPSA03396), whose loader failed on the missing \libSceJpegDec.prx\ module. - Validates params with decoder-family error codes, RGBA/BGRA output with pitch support, returns packed dimensions like PngDec. - Adds header-only \Decoder::Jpeg::ParseHeader\ (stb info, no full decode). - Guards the shared \decoder_jpeg\ target so JpegEnc/JpegDec coexist. ### Tested Windows 11, MinGW GCC 15.2.0. \guest_jpeg_dec\ (round-trip via shared encoder, validation errors, BGRA swap, garbage input) passes. Full \ctest -E agc_driver_graphics|guest_rendering_wait\: 94/94. Verified all 5 export NIDs present in the built \.prx\. TLOU still stops later at 3 other missing modules (PlayGoDialog, TextToSpeech2, Vdecsw) - follow-ups. ### Checklist - [x] Based on current \main\; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except technical debt - [x] Unimplemented paths throw (\NotImplemented_nid_no_patch\); silent stubs are listed in TechnicalDebt - [x] No notes, investigation \.md\ files or images added to the repository - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-01 22:38:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-01T22:38:56Z.


Progress report (e1654a9 → 8bd9670)

📈 System libraries: 80.8% (+0.04%, +5 implemented functions)

✅ 5 implemented
Library Name
libSceJpegDec sceJpegDecCreate
libSceJpegDec sceJpegDecDecode
libSceJpegDec sceJpegDecDelete
libSceJpegDec sceJpegDecParseHeader
libSceJpegDec sceJpegDecQueryMemorySize
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:5942104397 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/296#issuecomment-5942104397). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-01T22:38:56Z. --- <!-- progress-report --> ### Progress report (e1654a9 → 8bd9670) 📈 **System libraries**: 80.8% (+0.04%, +5 implemented functions) <details> <summary>✅ 5 implemented</summary> | Library | Name | | - | - | | libSceJpegDec | `sceJpegDecCreate` | | libSceJpegDec | `sceJpegDecDecode` | | libSceJpegDec | `sceJpegDecDelete` | | libSceJpegDec | `sceJpegDecParseHeader` | | libSceJpegDec | `sceJpegDecQueryMemorySize` | </details>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!296
No description provided.