Skip to content

feat(libSceVideodec2): implement the HEVC decoder aliases - #14722

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
AlexWhitehouse:feat/libscevideodec2-hevc-aliases
Nov 3, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
AlexWhitehouse:feat/libscevideodec2-hevc-aliases

Conversation

@AlexWhitehouse

Copy link
Copy Markdown
Contributor

What

Implements sceVideodec2CreateHevcDecoder (pu4kxXkYz3E) and sceVideodec2QueryHevcDecoderMemoryInfo (krChT8KBUDU) in libSceVideodec2. Both threw through NotImplemented_nid_no_patch in Unimplemented.cpp.

  • They forward their arguments unchanged to the existing sceVideodec2CreateDecoder and sceVideodec2QueryDecoderMemoryInfo, so they share those functions' validation, memory sizing, error codes and decoding.
  • This follows shadPS4's implementation at 28ad5d998fae6e4f15fd708222da9408388693fb, videodec2.cpp lines 327–339. There, both functions return the generic call's result, and lines 351–355 register them under these NIDs. No shadPS4 code is copied.
  • No HEVC-only codec check is added, because shadPS4 has none.

Debt. In docs/dev/debt/libSceVideodec2.md:

  • The "TermLibrary and N other exports" entry drops the two aliases, going from eleven others to nine, which matches Unimplemented.cpp.
  • A new Functional entry says that PS5 alias equivalence is unverified, and that the evidence is shadPS4's PS4 implementation.

Tested

  • New ctest guest_videodec2_hevc_aliases (core/libs/tests/GuestVideodec2HevcAliases.cpp):
    • queries memory through the alias and the generic function with the same config, and requires the same result and all nine DecoderMemoryInfo fields;
    • requires the same error from both for a null config, and for a null memory pointer on create;
    • creates a decoder through the alias and checks that an empty access unit returns the same error code as a generic decoder;
    • decodes the existing HEVC fixture through the alias, checking each picture's geometry and NV12 hash, and flushes until every expected picture is out.
  • guest_videodec2_unimplemented no longer expects the two aliases to throw.
  • On main, the new test fails with the alias's not-implemented throw.
  • Mutation check: forwarding a changed codec field from the Create alias fails the test during HEVC decoding. Restoring it passes.
  • Linux (Ubuntu 26.04, GCC 15): ctest -R "videodec2|hevc" passes 4/4 (guest_videodec2_hevc_aliases, guest_videodec2, guest_videodec2_unimplemented, guest_hevc_metadata). public_headers passes.
  • Windows 11 (MinGW GCC 15.2.0): the same four tests pass 4/4, with no compiler warnings in the changed files.
  • python3 tools/check_conventions.py --base origin/main: all conventions checks passed.
  • python3 tools/pr_overlap.py:

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 under Silent stubs in their library's technical debt file
  • 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
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no blocking findings

The HEVC aliases forward directly to the existing generic implementations, and the new test exercises parity through decoding; hosted checks are still pending and the reported builds/tests were not independently reproduced.

What I ran

Reviewed exact head 28f157cc6cf3c9010ad1b543392f592c7b001012 against base f2d874c1fdccf781c0fa5d86619bb5dd8894b958; the PR's merge preview against main was clean. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. I did not build or run C++ tests.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 14722
python3 tools/pr_abi_audit.py --base f2d874c1fdccf781c0fa5d86619bb5dd8894b958 --head 28f157cc6cf3c9010ad1b543392f592c7b001012
gh search prs 'repo:boykopovar/AnyPS5 is:open sceVideodec2CreateHevcDecoder' --json number,title,url
gh search prs 'repo:boykopovar/AnyPS5 is:open sceVideodec2QueryHevcDecoderMemoryInfo' --json number,title,url

Results

Check Result Note
Diff whitespace and conventions passed No findings.
ABI declarations and NIDs passed Both aliases have one declaration and definition.
Exact-name duplicate search passed No other open PR result for either alias.
Merge preview against main passed Clean.
Pair preview with #14212 failed Broad debt-file conflicts include this library's debt file.
C++ build/runtime tests not run No local build was run.
Hosted CI not run Six jobs were queued when inspected.
Unedited check output

Conventions-check stdout:

All conventions checks passed.

ABI-audit stdout:

ABI audit: passed
sceVideodec2AllocateComputeQueue_nid_postfix: NID=eD+X2SmxUt4 declarations=1 definitions=1 aliases=0
sceVideodec2CreateDecoderBid: NID=hjoVB02yu0U declarations=1 definitions=1 aliases=0
sceVideodec2CreateDecoder_nid_postfix: NID=CNNRoRYd8XI declarations=1 definitions=1 aliases=0
sceVideodec2CreateHevcDecoder: NID=pu4kxXkYz3E declarations=1 definitions=1 aliases=0
sceVideodec2Decode_nid_postfix: NID=852F5+q6+iM declarations=1 definitions=1 aliases=0
sceVideodec2DeleteDecoder_nid_postfix: NID=jwImxXRGSKA declarations=1 definitions=1 aliases=0
sceVideodec2Flush_nid_postfix: NID=l1hXwscLuCY declarations=1 definitions=1 aliases=0
sceVideodec2GetAvcPictureInfo_nid_postfix: NID=kjrLbcyhEiw declarations=1 definitions=1 aliases=0
sceVideodec2GetHevcPictureInfo_nid_postfix: NID=7M+1UFqWOAI declarations=1 definitions=1 aliases=0
sceVideodec2GetPictureInfo_nid_postfix: NID=NtXRa3dRzU0 declarations=1 definitions=1 aliases=0
sceVideodec2GetVp9PictureInfo_nid_postfix: NID=69fVNDtk2Zk declarations=1 definitions=1 aliases=0
sceVideodec2InitLibrary: NID=DXlobplVYj0 declarations=1 definitions=1 aliases=0
sceVideodec2MapDirectMemory: NID=hIIZXUsMeI8 declarations=1 definitions=1 aliases=0
sceVideodec2MapMemory: NID=2C6StOEz+nM declarations=1 definitions=1 aliases=0
sceVideodec2PresetDecoderConfigInfo: NID=B92MMJrPQMI declarations=1 definitions=1 aliases=0
sceVideodec2PresetDecoderConfigInfoAvc: NID=X9RNCpx+mFE declarations=1 definitions=1 aliases=0
sceVideodec2PresetDecoderConfigInfoHevc: NID=KoHlJNQCzIw declarations=1 definitions=1 aliases=0
sceVideodec2PresetDecoderConfigInfoVp9: NID=ao7f1-9zqkk declarations=1 definitions=1 aliases=0
sceVideodec2QueryComputeMemoryInfo_nid_postfix: NID=RnDibcGCPKw declarations=1 definitions=1 aliases=0
sceVideodec2QueryDecoderInfo: NID=EQtFad2c1T8 declarations=1 definitions=1 aliases=0
sceVideodec2QueryDecoderMemoryInfo_nid_postfix: NID=qqMCwlULR+E declarations=1 definitions=1 aliases=0
sceVideodec2QueryHevcDecoderMemoryInfo: NID=krChT8KBUDU declarations=1 definitions=1 aliases=0
sceVideodec2QueryLibraryInfo: NID=mhKZJqhGnXg declarations=1 definitions=1 aliases=0
sceVideodec2ReleaseComputeQueue_nid_postfix: NID=UvtA3FAiF4Y declarations=1 definitions=1 aliases=0
sceVideodec2Reset_nid_postfix: NID=wJXikG6QFN8 declarations=1 definitions=1 aliases=0
sceVideodec2TermLibrary: NID=q0gN8e4VLZo declarations=1 definitions=1 aliases=0
limit: This lexical audit does not parse C++ fully, prove calling-convention or binary ABI correctness, verify runtime version tables, or replace compilation.
limit: An absent source declaration or explicit alias can be intentional for assembly exports, conditional platform code, or generated interfaces; inspect findings before treating them as defects.

Exact-name PR search output:

[]
[]

The full pr_overlap.py scan did not complete; its unedited stderr was:

pr_overlap: Invalid \uXXXX escape: line 1 column 1655513 (char 1655512)

Pair preview command:

set +e
git merge-tree --write-tree refs/review/14212/head refs/review/14722/head > /tmp/merge-tree-14212-14722.txt 2>&1
merge_rc=$?
grep -E 'CONFLICT|libSceVideodec2.md' /tmp/merge-tree-14212-14722.txt
printf 'git merge-tree exit status: %s\n' "$merge_rc"

Filtered output from that command:

100644 7d2bc73f0afc99aff16f058e89b5bac016ef0710 1	docs/dev/debt/libSceVideodec2.md
100644 b4f24faa72992dc60ef1be915d2d42755fd1b880 2	docs/dev/debt/libSceVideodec2.md
100644 fcc4b75f6b337312b4ef8c1229197a9196006cc4 3	docs/dev/debt/libSceVideodec2.md
CONFLICT (content): Merge conflict in docs/dev/debt/libSceVideodec2.md
git merge-tree exit status: 1

Negative control

Not run by me. The PR description reports a base-source failure and a mutation check, but those results were not independently reproduced in this session.

Findings

Blocking

None found in the reviewed change.

Non-blocking

Open PR #14212 also changes docs/dev/debt/libSceVideodec2.md as part of a broad blank-line update and is currently marked conflicting with main. The pair preview reports a conflict in that debt file; it does not show a functional-code conflict for this PR. Preserve both documentation updates when the older PR is reconciled with main.

The PR description reports passing Linux and Windows tests, a host build and a mutation check. I did not independently run these. The new debt entry correctly labels exact PS5 alias equivalence as unverified, so the PS4 reference is not presented as console proof.

Sources

Not verified

No local C++ build, CTest, Windows run, physical PS5 run, or console measurement was performed. The PR's reported Linux and Windows tests and mutation check are author-supplied. Hosted CI was queued when inspected. The full overlap scan could not parse the GitHub response.

To get this to a good state

No source change is requested. Let the hosted checks finish and preserve the debt-file information if #14212 is updated or lands first. I will rerun applicable no-build checks if this PR's head changes.

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

Some 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.

Pull request Shared files not compared
PR 14212 docs/dev/debt/libSceVideodec2.md

@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

Progress report (f2d874c → 28f157c)

📈 System libraries: 26.26% (+0.01%, +2 implemented functions)

✅ 2 implemented
Library Name
libSceVideodec2 sceVideodec2CreateHevcDecoder
libSceVideodec2 sceVideodec2QueryHevcDecoderMemoryInfo

Changed libraries (implemented exports)

Library Before After Change
libSceVideodec2 9/29 (31.03%) 11/29 (37.93%) +6.90%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants