feat(videodec2): add HEVC picture-information queries #2161
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2161"
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 inmert on 2026-10-09T10:22:12Z.
What
HEVC decoding is already supported, but
sceVideodec2GetHevcPictureInfois missing and the generic picture-info query rejects HEVC output.Add the HEVC export and dispatch to it from
sceVideodec2GetPictureInfo. Capture SPS/VUI metadata and timestamps with each access unit so they stay attached to the right picture through B-frame reordering. Queries report coded dimensions, profile and level, timing, aspect ratio, colour information and NAL-presence flags.Keep metadata available for retained output buffers and track which decoder last wrote each buffer. Reusing a buffer between decoders must return the newer picture's metadata; resetting or deleting its decoder invalidates the record.
This covers single-layer, single-temporal-layer, uncropped 8-bit 4:2:0 pictures. Crop/display windows, field sequences, explicit scaling lists, predicted SPS reference sets, HRD, SPS extensions and picture-timing/frame-packing/alternative-transfer SEI still throw when queried. Existing decoding continues to work. Unsupported persistent SEI keeps subsequent queries unsupported until decoder reset.
The 184-byte layout follows the public PS5 declaration and matches the shadPS4 layout. Metadata parsing follows FFmpeg's HEVC syntax. Accepted structure sizes, inferred defaults and unverified console behaviour are recorded in
TechnicalDebt.md. There is no known title caller used to validate these queries.The overlap warning with #1831, #1916 and #2142 is limited to
docs/dev/TechnicalDebt.md. Those PRs append unrelated entries immediately after the decoder note that this PR corrects. There are no shared exports or implementation changes, and none is a dependency. The documentation conflict can be resolved by keeping the corrected HEVC note and the other PR's entry.Tested
Windows 11, MinGW-w64 GCC 15.2.0, Ninja, Release,
BUILD_TESTING=ON. The full project build completed after rebasing onto currentmain, and both focused CTest cases passed with no skips (6.85 seconds total). Tests use synthetic bitstreams; no game, console or Linux testing.guest_videodec2: Annex-B and length-prefixed HEVC, B-frame timestamps, SPS/VUI changes, retained and reused buffers, reset/deletion, structure bounds, malformed input and unsupported persistent SEI. Existing H.264, HEVC and VP9 decode hashes still pass.patched_libraries: all 116 libraries loaded, with no failures.git diff --checkpassed.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt. No new stubs..mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T10:27:44Z.
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/TechnicalDebt.mdL367docs/dev/TechnicalDebt.mdL367core/libs/tests/GuestVideodec2.cppL8docs/dev/TechnicalDebt.mdL367docs/dev/TechnicalDebt.mdL366-367Imported from boykopovar/AnyPS5. Originally posted by muhzain05 on 2026-10-09T12:49:03Z.
Thanks for the HEVC picture-information work!
I've been building a complementary follow-up on top of this PR that extends picture metadata support to VP9 and generalizes picture ownership across AVC, HEVC, and VP9.
The follow-up also addresses a conversion-retry edge case where a failed output conversion can consume a queued picture before it is successfully published.
I'll keep those changes separate to avoid expanding the scope of #2161, and plan to rebase onto main once this lands.
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T20:09:13Z.
Closing: no title calls
sceVideodec2GetHevcPictureInfoon main, as the description says, and a new HEVC metadata parser needs one that does. Please reopen with the title ID and the log line if you find one.Pull request closed