feat(libSceAudiodecCpu): implement DVD LPCM decode and HE-VAG lifecycle #27277
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/27277"
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 gurtgg on 2026-11-25T18:34:38Z.
What
0x1004, 16/20/24-bit at 48/96 kHz with 150-tick PTS continuation and parameter validation) inlibSceAudiodecCpu(core/libs/prx/libSceAudiodecCpu/Export.cpp).0x1008)QueryMemSize(0x1b0),InitDecoderparameter/memory validation and state initialization,ClearContexthistory clearing, andDecodepre-validation gates.GuestAudiodecCpuQueryGuest.cppcovering HE-VAG lifecycle/validation and DVD LPCM 16/20/24-bit decode, error codes, and rollback on unwritable guest outputs.docs/dev/debt/changes/feat-audiodeccpu-1360-codecs.md.Tested
libSceAudiodecCpu.sprx,libSceAudiodecCpuLpcm.sprx, andlibSceAudiodecCpuHevag.sprxdisassembly and validated encoding/conventions checks.Checklist
tools/check_conventions.pyrules (no C++ comments, UTF-8 no-BOM, LF only)core/libs/tests/GuestAudiodecCpuQueryGuest.cppImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T19:01:46Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks merging; optional notes are listed below.
What I ran
Reviewed head
744ea71ceef8277ded52933058061b2d2d7b4ebd. Read the prepared description, commits, diff, manifest, and all three changed files. No tests or build commands were run.Results
Findings
Blocking
None.
Non-blocking
core/libs/prx/libSceAudiodecCpu/Export.cpp:175acceptschannels == 0although the description says InitDecoder validates channel parameters. Consider returningErrorHevagChannelsfor zero channels if firmware rejects that value.core/libs/tests/GuestAudiodecCpuQueryGuest.cpp:155).Not verified
Tests, build, convention checks, and comparison against firmware disassembly were not run by this review. The prepared
files.jsonwas not available through the reader; the listing confirms the three changed files were included, and all three were read.To get this to a good state
Nothing is required. Optional: verify the HE-VAG channel lower bound against firmware and add boundary tests if needed.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T23:39:03Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: fix DVD LPCM decoding for valid frame counts that are not multiples of the packing group, and ensure PCM output is bounded by the supplied output capacity.
What I ran
Reviewed head
5834eb2e5e4eec2ff695f9bcff94e31e08b0b1f0usingrepo_read.pyand the prepared diff. No tests or build commands were run.Results
Findings
Blocking
outputis sized for all samples; this can leave decoded samples unset or read an undersized input buffer. This affects supported frame counts when the frame count is not a packing-group multiple. Handle partial groups or reject those frame counts explicitly.core/libs/prx/libSceAudiodecCpu/Export.cpp:343samplesis computed from the full AU while input is capped atLpcmOutputSamples, but output is allocated for the full sample count and copied usingsamples * 4. A sufficiently large valid frame therefore writes past the module’s declared PCM output capacity (0x43800bytes). Reject oversized decoded frames or process them in bounded chunks.core/libs/prx/libSceAudiodecCpu/Export.cpp:341Non-blocking
None.
Not verified
The full text of all three changed files was read:
core/libs/prx/libSceAudiodecCpu/Export.cpp,core/libs/tests/GuestAudiodecCpuQueryGuest.cpp, anddocs/dev/debt/changes/feat-audiodeccpu-1360-codecs.md. No changed files were excluded. Tests, build, firmware behavior, and console hardware behavior were not run or independently confirmed. The description’s disassembly verification is author-reported.To get this to a good state
Fix the partial-group input/output handling and bound the PCM write by the provided output capacity; then rerun the guest regression tests and build.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-26T00:41:59Z.
Review: COMMENTED
Reviewed — no blocking findings
The inspected changes show no verified blocking defect, but I did not run the regression tests, so a formal approval is not justified.
What I ran
Reviewed head
edc35d68f503739b6bbb9cd616e572118f379c1b. No commands or tests were run; I inspected the prepared diff and targeted source ranges throughrepo_read.py.Results
Findings
Blocking
None verified in the inspected code.
Non-blocking
Sources
core/libs/prx/libSceAudiodecCpu/Export.cpp— inspected the HE-VAG lifecycle, DVD LPCM decode, and codec dispatch paths.core/libs/tests/GuestAudiodecCpuQueryGuest.cpp— inspected the added lifecycle and decode test cases.docs/dev/debt/changes/feat-audiodeccpu-1360-codecs.md— read the full change fragment.Not verified
Tests, build and firmware behavior were not run or confirmed. The full text of
Export.cppandGuestAudiodecCpuQueryGuest.cppwas not read; targeted ranges and changed hunks were inspected. The prepared bundle lists all three changed files as included; all three were inspected, with the two C++ files only partially read.To get this to a good state
Nothing is required. Optional: run the new guest regression tests on this head.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T10:25:00Z.
Review: COMMENTED
The GuestAudiodecCpuQueryGuest fixture passed on Linux with the exact implementation from this head. The fixture covers the LPCM and HE-VAG paths, including the DVD PCM output capacity boundary and preservation of output on rejection.
AI-assisted: yes.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.