Repository navigation
fix(ajm): accept Opus mapping family 255 for a mono stream - #5075
Merged
oneandonlydean merged 1 commit intoOct 14, 2026
Merged
Conversation
Co-authored-by: poonasor <12569806+poonasor@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 tasks done
11 tasks done
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 NHL 27 (PPSA34063) on Windows / AMD RX 6700 XT: reaches match loading, ~1.3 FPS #4275 are still open there (for example stop 12, fix(libkernel): keep a finished Windows thread's stack until it is joined or detached #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