fix(libSceVideodec2): answer the generic picture query for VP9 pictures #8839
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8839"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-21T02:11:43Z.
What
Mortal Shell 2 (PPSA34008) plays its intro movie through a VP9 Videodec2 decoder (
[videodec2] decoder 1: codec=2382845 max 3840x2160) and asks for each picture's metadata with the genericsceVideodec2GetPictureInfo(NtXRa3dRzU0), notsceVideodec2GetVp9PictureInfo. Onmainthe generic query throws for anything but H.264, and the title aborts 88.7 s in:A gdb breakpoint on the export shows the call:
output thisSize=56 pictureCount=1 first thisSize=88 second=nullptr. 88 bytes issizeof(Vp9PictureInfo).sceVideodec2GetPictureInfonow writes the decoder's own layout for a VP9 picture: the same 88-byte VP9 structuresceVideodec2GetVp9PictureInforeturns, checked againstthisSize. shadPS4'svideodec2.cpphandles the generic query the same way, copying the decoder's own picture-info layout sized by the caller'sthisSize. H.264 is unchanged. HEVC pictures still throw: no title calling the HEVC layout has been seen (as when #2161 was closed).Tested
Windows 11 22621, AMD Radeon RX 6700 XT, WinLibs GCC 15.2 UCRT r7, Release, on
main6c12024f7.guest_videodec2: the VP9 clip now also calls the generic query with a guarded 88-byte structure and checks that every field equalssceVideodec2GetVp9PictureInfo's result and that the guard after it is intact. It fails without the library change (Videodec2: picture info is only implemented for H.264) and passes with it.ctest -j 32: 1817 of 1819 pass. The other two fail the same way onmain:agc_driver_image_array_window_past_layer_limit(does not build on MinGW, #8310/#8361) andagc_driver_tessellation(reported on #6679).6c12024f7that differ only inlibSceVideodec2.prx; both runs usedAPS5_LOOP_GUARD=1to get past an unrelated GPU timeout (Windows TDR) that ends unguarded runs at about 25 s. That setting caps every shader loop at one evaluation, so the rendering in these runs is not representative; it does not touch video decoding, which runs on the CPU through FFmpeg:tools/check_conventions.py: no errors, one warning.docs/dev/debt/libSceVideodec2.md:11is over the 1000-character debt length. That entry is 2072 characters onmainand 1967 here; it had to change because it said the generic query throws for VP9.tools/pr_overlap.py: no overlap with open pull requests.Independent contributor validation: @xXPBSXx reports
guest_videodec2passing 3/3 on Windows 10 Pro 10.0.19045, Ryzen 7 5800X3D, WinLibs GCC 15.2.0 r7 (MinGW-w64 UCRT), Release withBUILD_TESTING=ON. Keeping this PR's test and restoring onlylibSceVideodec2/Export.cppfrom merge base6c12024f7dmakes it fail 3/3; the PR's files were restored afterward. Onlyguest_videodec2_testswas built and one CTest test listed. The contributor did not run other tests, a title or console, or another platform; no exact PR-head SHA was supplied. These are attributed contributor results, not a locally repeated run.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-21T02:31:11Z.
Linux data point:
844372448bmerged onto main6696def6e6(clean). Linux 7.2.9, RX 6650 XT, RADV Mesa 26.2.4. PPSA34008 with the same scripted Cross presses:what(): Videodec2: picture info is only implemented for H.264, on a VP9 decoder (codec=2382845).The title runs very slowly here (0.1-0.2 FPS), which is unrelated to this change.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-21T02:37:15Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)docs/dev/debt/libSceVideodec2.mdL11Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/tests/GuestVideodec2.cppImported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-21T02:45:10Z.
Bring-up discussion for this title: #8844.
Imported from boykopovar/AnyPS5. Originally posted by JJenkx on 2026-10-21T03:11:47Z.
Overlap with #8119: both edit the last sentence of the
sceVideodec2CreateDecoderentry indocs/dev/debt/libSceVideodec2.md. #8119 changes only "sceVideodec2GetHevcPictureInfois not exported" to "reports that it is not implemented"; this PR rewrites the clause before it (the generic query now answers VP9) and moves the VP9 detail to thesceVideodec2GetVp9PictureInfoentry. The code does not overlap. If #8119 merges first I will rebase and keep its wording forsceVideodec2GetHevcPictureInfo.Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-21T07:44:21Z.
Independent Windows run of this PR (data only).
Environment: Windows 10 Pro 10.0.19045, Ryzen 7 5800X3D, WinLibs GCC 15.2.0 r7 (MinGW-w64 UCRT), Release, BUILD_TESTING=ON. Merge-tree of the PR head against
mainis clean. I built onlyguest_videodec2_tests;ctest -N -R guest_videodec2lists exactly one test.Results (3 runs each):
guest_videodec2passes 3/3.core/libs/prx/libSceVideodec2/Export.cppwith the version from the PR's merge base (6c12024f7d), then rebuilt. The test fails 3/3 (ctest reports Failed). I restored the PR's files afterwards.Not run: other platforms, the other tests in the same family, the full repository CTest, and any title or console run.
AI-assisted (Claude Code).