feat(libSceAc3Enc): initialize AC-3 encoders through AJM #28563
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/28563"
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 cmsierrave-coder on 2026-12-01T19:28:32Z.
What
After the existing argument checks, submit the
0x6001setup job through AJMI for codec 7. Return the AJM instance ID after setup succeeds, and destroy the instance if setup or the handle write fails. Enforce one active encoder per process and letsceAc3EncDeleteEncoderrelease it. Calls to encode, encode asynchronously, or flush with a live handle throw.AJM opens FFmpeg’s AC-3 encoder for 5.1 at 48 kHz and 640 kb/s. Successful setup requires
--enable-encoder=ac3in the FFmpeg package. The package pinned by AnyPS5 omits the codec, so a valid request on that build returns0x80E00000and releases the instance. The setup record and error ordering follow BunnyFl’s firmware 13.42 disassembly. The host initializes its AJMI context on the first valid request. The firmware initialization trigger remains unverified.Tested
b510cc3e994, the standard build passedguest_ac3_enc,guest_ajm, andguest_ajm_aac_multichannelwith the stock FFmpeg package. The AC-3 test verifies the missing-codec status and reuses the only free AJM slot after the failure.2ba688dc55bbase also called the NID-patched exports and created and deleted both modes.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)Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-01T19:32:20Z.
Review: APPROVED
Reviewed — looks good
The reviewed change adds AC-3 encoder setup through AJMI, with lifecycle handling and rollback on setup or output-copy failure.
What I ran
Reviewed head
b510cc3e99430700d74c8a736d3e019c6e865f95against the prepared diff and source at that pinned head. No tests, builds, or merged-preview checks were run.Results
Negative control
Not run; no test was executed.
Findings
Blocking
None.
Non-blocking
None.
Sources
Not verified
Linux behavior, PS5 hardware behavior, and the firmware context-initialization trigger remain unverified. Read all eight changed files listed in
manifest.json;files.jsonlists no excluded files.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-12-01T19:37:11Z.
Review: COMMENTED
🏛️ Architecture findings (3)
Advisory architecture findings (3)
💬 Code review
5eca3323-d1f7-4025-bcf6-fc9078d9c974Reviewing files that changed from the base of the PR and between
1891347284andb510cc3e99.core/libs/prx/libSceAc3Enc/CMakeLists.txtcore/libs/prx/libSceAc3Enc/Export.cppcore/libs/prx/libSceAc3Enc/include/Api.hppcore/libs/prx/libSceAjm.native/include/Api.hppcore/libs/prx/libSceAjm.native/src/Ajm.cppcore/libs/tests/GuestAc3Enc.cppdocs/dev/debt/changes/ac3-encoder-setup.mddocs/dev/debt/changes/feat-ac3-dts-create-encoder-checks.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T04:36:04Z.
Review: COMMENTED
The complete
GuestAc3Encsuite passed on Linux with the exact native AJM, AJMI and AC-3 sources. With the repository-pinned FFmpeg package, it verified the missing-encoder status and recovery of the available AJM slot. With the host's AC-3-enabled FFmpeg 7.1.5 libraries, it exercised both setup modes, duplicate-create precedence, unwritable-result rollback, and deletion. This verifies the setup paths in both codec configurations. Audio encoding and retail behavior were outside the run.AI-assisted: yes.