feat(libSceVideodec2): decode HEVC and VP9 #1931
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1931"
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 johnmaia on 2026-10-09T00:30:59Z.
What
sceVideodec2CreateDecoderaccepted only H.264 (codecType == 1). EVO-PLAYER PPSA99039 v0.11.0 creates resident decoders at start-up for AVC, HEVC and VP9, and with its default build for HEVC Main10 and VP9 Profile 2 too. With #1916 and the PRs for its earlier stops, it stopped at the HEVC one:Videodec2CodecType(Interop/Video/Videodec2.cs:Avc = 1, Hevc = 974921, Vp9 = 2382845). EVO-PLAYER'smedia/include/sce/sce_videodec2.hgives the same values and recordssceVideodec2CreateDecoderaccepting them on hardware. Any other value still throwsunsupported codec.QueryDecoderMemoryInforeports the 8-bit frame size for those decoders.sceVideodec2GetPictureInfoandsceVideodec2GetAvcPictureInfothrow for HEVC and VP9 pictures instead of writing the AVC layout; SharpProspero gives them separateSceVideodec2HevcPictureInfoandSceVideodec2Vp9PictureInfolayouts.GetHevcPictureInfoandGetVp9PictureInfoare not exported. EVO calls none of these.Tested
guest_videodec2, extended:-pix_fmt nv12); all 12 hashes are distinct. The output reports the codec type, the size and the 256-byte pitch.GetPictureInfothrows for these pictures.Export.cppfrommain, the test fails atVideodec2: unsupported codec.guest_videodec2passes.guest_videodec2passes.mainf1451396plus #1916, #1838, #1634, #1714, #1641, #1857 and #1529, Linux, RX 7600:RESIDENT AVC/HEVC/VP9/HEVC10 decoder up).sceAgcCreatePrimState: invalid context register offsets, which is unrelated to this change.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
https://claude.ai/code/session_01DwFnKjMxmwGDWiuYYf1v4D
Imported from boykopovar/AnyPS5. Originally posted by klosixgaming-arch on 2026-10-09T00:46:19Z.
Review: APPROVED
Reviewed against the repo's bar. This is a clean, well-scoped extension and I can approve it.
What holds up:
CodecIdcentralises the codec dispatch and throws on any unknown tag, so no silent fallback. Thecreatepath callsCodecId(config->codecType)before allocating, which rejects bad tags early rather than afterOpenCodec.av_pix_fmt_desc_get(...)->comp[0].depth > 8throwing instead of silently converting is exactly what the repo wants for unknown console output layouts, and it's debt-documented.GetPictureInfothrows for HEVC/VP9 pictures rather than writing the AVC layout — correct, and the debt entry names the real separate layouts.mainfails atunsupported codec). Good.Notes (non-blocking):
decoder.annexBthen pointsunitat it, whereas H.264/HEVC go throughToAnnexB. ConfirmannexBisn't also holding an H.264 stream for a decoder that is both (it isn't — one codec per decoder) so the reuse is safe; just flagging the shared member.QueryDecoderMemoryInforeports the 8-bit size even for Main10/VP9-P2 decoders that then throw on decode. That's debt-documented and acceptable, but a title probing memory for a 10-bit buffer will get an undersized value — worth a sentence in the debt entry that the query also lies in that case (it currently only says the frame throws).Written with AI assistance.
Imported from boykopovar/AnyPS5. Originally posted by johnmaia on 2026-10-09T00:51:49Z.
Thanks @klosixgaming-arch. On note 2: the debt entry already covers the query. It ends with "a decoder for HEVC Main10 or VP9 Profile 2 is created, but a frame deeper than 8 bits throws, since the console's 10-bit output layout is unknown, and
QueryDecoderMemoryInforeports the 8-bit frame size for it". On note 1: right, each decoder has one codec, so the sharedannexBbuffer only ever holds that codec's data.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T01:10:03Z.
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.mdL355docs/dev/TechnicalDebt.mdL355docs/dev/TechnicalDebt.mdL355docs/dev/TechnicalDebt.mdL355docs/dev/TechnicalDebt.mdL355docs/dev/TechnicalDebt.mdL355