fix(ajm): accept Opus mapping family 255 for a mono stream #5075
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5075"
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 SandstromPL on 2026-10-13T10:50:43Z.
What
@poonasor found this on NHL 27's (PPSA34063) integration branch (#4275, stop 13) and accepted it for a mono stream in poonasor/AnyPS5@3b35621bb. This carries that change onto the mapping-family code from #3831.
The title initializes a mono 48 kHz Opus decoder with
1, 48000, 255. On that branch, which predates #3831, it stopped with... nonzero third parameter word; with the change it went on to the later stops in that table. #3831 reads the third word as the mapping family and refuses anything above 1, so main refuses the same call withsceAjmBatchJobInitialize (Opus mapping family other than 0 or 1) not implemented.Family 255 is now accepted for one channel and decoded as a single mono stream, the same as family 0. RFC 7845 section 5.1.1 defines a family-255 stream's layout through the stream count, coupled stream count and channel mapping in its own header, and AJM's 12-byte initialize parameters carry none of them. So family 255 with more channels still throws, and the debt entry records the mono reading as assumed.
Tested
Ubuntu 24.04, GCC 13.3, full build (Release):
guest_ajmgainsTestOpusMonoFamily255:1, 48000, 0and a1, 48000, 255instance decode the same three Opus packets. They must give identical PCM, the expected consumed and written sizes and decoded-sample totals, and the test tone's peak.2, 48000, 255and1, 48000, 2must still be refused.On main it aborts with the error above. It passes here, 5 runs out of 5. Two mutants fail it: one accepts every family for mono, the other accepts 255 for every channel count.
Built at
cac4e9688; the AJM sources, the test and the debt file are identical on currentmain.NHL 27 was not rerun. Nothing past start-up has been run on main, and earlier stops in #4275 are still open there (for example stop 12, #4563).
tools/check_conventions.pyfrom main passes with this title and body.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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-14T03:43:43Z.
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/libSceAjm.native.mdL9-10