feat(libs): implement libSceVdecsw on top of libSceVideodec2 #2203

Merged
XairRrR merged 1 commit from upstream-pr/2203 into main 2026-10-09 21:04:01 +00:00
XairRrR commented 2026-10-09 11:29:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-09T11:29:48Z.


What

Uncharted: Legacy of Thieves Collection (PPSA05684) plays its intro and menu movies through libSceVdecsw and stops on main with:

sceVdecswQueryComputeMemoryInfo not implemented

(#1208 and #1881 were closed because no title was shown reaching the module.)

  • Decoder creation, compute queues, memory queries, decode input and output, AVC picture info, reset and finalize use the layouts of shadPS4's vdecsw.h, checked against the title's movie decoder; decoding goes through libSceVideodec2.
  • At most four decoded pictures are queued. The last one is held until sceVdecswFinalizeDecodeSequence and marked as the last frame: the title waits for it to end a movie.
  • What is inferred is recorded in TechnicalDebt; the eleven "unknown signature" entries are removed.
  • The H.264 stream of guest_videodec2 moves to tests/H264Fixture.hpp; the new guest_vdecsw test decodes it through Vdecsw.

Tested

Arch Linux, GCC 16.2.1, NVIDIA GeForce RTX 4070 Ti SUPER (driver 615.71.09).

  • The branch alone on current main (d70b8998): tools/check_conventions.py passes; of the 514 ctest tests all pass except agc_driver_dcc_keys_first_write, which fails the same way on main (an unchanged pending image was uploaded again). agc_driver_storage_cache_budget passes run alone; under ctest -j8 a local 3 GB RSS limit stopped it.
  • Uncharted: Legacy of Thieves Collection (PPSA05684): with this and the other changes of its bring-up, the title boots past the stop quoted above and reaches its main menu.
  • the PlayStation Studios intro movie of the title plays with sound and ends, then the game continues.

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 (attach them to this PR)
  • 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:4799798420 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2203). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-10-09T11:29:48Z. --- ### What Uncharted: Legacy of Thieves Collection (PPSA05684) plays its intro and menu movies through libSceVdecsw and stops on `main` with: ``` sceVdecswQueryComputeMemoryInfo not implemented ``` (#1208 and #1881 were closed because no title was shown reaching the module.) - Decoder creation, compute queues, memory queries, decode input and output, AVC picture info, reset and finalize use the layouts of shadPS4's `vdecsw.h`, checked against the title's movie decoder; decoding goes through libSceVideodec2. - At most four decoded pictures are queued. The last one is held until `sceVdecswFinalizeDecodeSequence` and marked as the last frame: the title waits for it to end a movie. - What is inferred is recorded in TechnicalDebt; the eleven "unknown signature" entries are removed. - The H.264 stream of `guest_videodec2` moves to `tests/H264Fixture.hpp`; the new `guest_vdecsw` test decodes it through Vdecsw. ### Tested Arch Linux, GCC 16.2.1, NVIDIA GeForce RTX 4070 Ti SUPER (driver 615.71.09). - The branch alone on current `main` (d70b8998): `tools/check_conventions.py` passes; of the 514 ctest tests all pass except `agc_driver_dcc_keys_first_write`, which fails the same way on `main` (`an unchanged pending image was uploaded again`). `agc_driver_storage_cache_budget` passes run alone; under `ctest -j8` a local 3 GB RSS limit stopped it. - Uncharted: Legacy of Thieves Collection (PPSA05684): with this and the other changes of its bring-up, the title boots past the stop quoted above and reaches its main menu. - the PlayStation Studios intro movie of the title plays with sound and ends, then the game continues. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [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](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [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
popcoder565 commented 2026-10-09 15:47:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T15:47:00Z.


Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head 60c26120, merged onto main d70b8998 in one build with 38 other PRs that had no Windows run.

  • This PR's tests pass: guest_vdecsw, guest_videodec2. None of them reported skipping a case.
  • Full ctest in that build: 519 of 519. That needed local fixes to three other PRs in the batch that don't build or pass on Windows: #1611, #1796 and #1824 (reported there).

No title was run.

🤖 Addressed by Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6084280829 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2203#issuecomment-6084280829). Originally posted by [popcoder565](https://github.com/popcoder565) on 2026-10-09T15:47:00Z. --- Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head `60c26120`, merged onto `main` d70b8998 in one build with 38 other PRs that had no Windows run. - This PR's tests pass: `guest_vdecsw`, `guest_videodec2`. None of them reported skipping a case. - Full ctest in that build: 519 of 519. That needed local fixes to three other PRs in the batch that don't build or pass on Windows: #1611, #1796 and #1824 (reported there). No title was run. _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
adriadam10 commented 2026-10-09 21:03:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-09T21:03:57Z.


Checked on Linux (GCC, merged onto current main): build and ctest green for guest_vdecsw and guest_videodec2; guest_vdecsw fails without the change. Struct sizes and offsets match shadPS4 vdecsw.h; the inferred error codes and queue depth are recorded in TechnicalDebt. Windows run by @popcoder565 also passes. Merging once CI is green.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6089224801 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2203#issuecomment-6089224801). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-09T21:03:57Z. --- Checked on Linux (GCC, merged onto current `main`): build and ctest green for `guest_vdecsw` and `guest_videodec2`; `guest_vdecsw` fails without the change. Struct sizes and offsets match shadPS4 `vdecsw.h`; the inferred error codes and queue depth are recorded in TechnicalDebt. Windows run by @popcoder565 also passes. Merging once CI is green.
github-actions[bot] commented 2026-10-09 21:13:51 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T21:13:51Z.


Progress report (d70b899 → 60c2612)

📈 System libraries: 85.12% (+0.43%, +13 implemented functions)

✅ 13 implemented
Library Name
libSceVdecsw sceVdecswAllocateComputeQueue
libSceVdecsw sceVdecswCreateDecoder
libSceVdecsw sceVdecswDeleteDecoder
libSceVdecsw sceVdecswFinalizeDecodeSequence
libSceVdecsw sceVdecswGetAvcPictureInfo
libSceVdecsw sceVdecswQueryComputeMemoryInfo
libSceVdecsw sceVdecswQueryDecoderMemoryInfo
libSceVdecsw sceVdecswReleaseComputeQueue
libSceVdecsw sceVdecswResetDecoder
libSceVdecsw sceVdecswSetDecodeInput
libSceVdecsw sceVdecswSetDecodeOutput
libSceVdecsw sceVdecswTrySyncDecodeInput
libSceVdecsw sceVdecswTrySyncDecodeOutput
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6089363615 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2203#issuecomment-6089363615). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-09T21:13:51Z. --- <!-- progress-report --> ### Progress report (d70b899 → 60c2612) 📈 **System libraries**: 85.12% (+0.43%, +13 implemented functions) <details> <summary>✅ 13 implemented</summary> | Library | Name | | - | - | | libSceVdecsw | `sceVdecswAllocateComputeQueue` | | libSceVdecsw | `sceVdecswCreateDecoder` | | libSceVdecsw | `sceVdecswDeleteDecoder` | | libSceVdecsw | `sceVdecswFinalizeDecodeSequence` | | libSceVdecsw | `sceVdecswGetAvcPictureInfo` | | libSceVdecsw | `sceVdecswQueryComputeMemoryInfo` | | libSceVdecsw | `sceVdecswQueryDecoderMemoryInfo` | | libSceVdecsw | `sceVdecswReleaseComputeQueue` | | libSceVdecsw | `sceVdecswResetDecoder` | | libSceVdecsw | `sceVdecswSetDecodeInput` | | libSceVdecsw | `sceVdecswSetDecodeOutput` | | libSceVdecsw | `sceVdecswTrySyncDecodeInput` | | libSceVdecsw | `sceVdecswTrySyncDecodeOutput` | </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!2203
No description provided.