feat(libSceAjm.native): implement M4AAC decoding #5307
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5307"
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 MarcZX10 on 2026-10-13T16:50:44Z.
What
Fixes #3410. Adds the M4AAC decoder path for AJM codec 2 using the existing FFmpeg AAC decoder. It handles ADTS and raw access units, AAC-LC output, gapless trimming, resampling and multiple-frame jobs, and reports format and codec info. Unsupported profiles, channel layouts and input shapes throw explicitly. The behavior model follows shadPS4 and remains unverified on PS5 hardware.
The implementation commit retains screamm as author and its original coauthor metadata.
Tested
guest_ajmpassed (1/1), including the embedded ADTS fixture, raw access units, gapless and multiple-frame cases, format and codec info, initialization validation, and unsupported-input cases.git diff --checkpassed.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-13T16:51:32Z.
Progress report (
145cb82→b7c1293)📉 System libraries: 88.33% (-0.03%, -1 reverted functions)
⚠️ 1 went back to stubs
sceAjmInstanceCreateImported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-10-14T01:38:00Z.
Heads-up for reviewers: #4934 (also yours, opened earlier the same day) implements the same AJM M4AAC codec-2 decoder on the same FFmpeg AAC path, with ~547 lines each. This one carries screamm's commit (for #3410), and #4934 is a separate implementation (PPSA26344). Only one can merge. Could you say in both descriptions which one you want reviewed, close the other, and carry over anything only the other covers (e.g. #4934's reset/gapless fixture, or this one's resampling and multi-frame jobs)?
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-14T06:51:05Z.
I compared the current file patches for #5307 and #4934:
Ajm.cppandGuestAjm.cppare identical, including the reset/gapless and multiple-frame coverage; only the debt prose differs. I agree one PR should continue. #4934 is already closed as the duplicate, so #5307 is the review target and keeps screamm’s implementation commit authorship. No test-only material from #4934 appears to be missing.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-14T11:35:00Z.
Checked the M4AAC decoder against the new
guest_ajmcases (ADTS, raw access units, gapless trim, multi-frame, format/codec info, rejected inputs): build and ctest pass, and the test fails without the change.Added one commit on top: the M4AAC flag check in
sceAjmInstanceCreatecalledNotImplemented_nid_no_patchdirectly, which made the progress report countsceAjmInstanceCreateas reverted to a stub. It now lives in aCheckAacFlagshelper (same behaviour, same test); build and ctest are green again.The PS4-derived behaviour (2-frame delay, bitrate, error results) stays unverified on PS5 and is listed in the debt entry. Merging.