fix(ajm): convert planar 16-bit MP3 output from FFmpeg #237
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/237"
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 adriadam10 on 2026-10-01T17:41:00Z.
What
AJM MP3 decoding (#153) throws on Linux:
AJM MP3: FFmpeg sample format 6 is not converted.avcodec_find_decoder(AV_CODEC_ID_MP3)returns the first registered MP3 decoder. The Linux FFmpeg package fromffmpeg-coreonly contains the fixed-pointmp3decoder (checked withnmonlibavcodec.aand the package's build log), whose frames areAV_SAMPLE_FMT_S16P;RunMp3only acceptsAV_SAMPLE_FMT_FLTP, which is what the floatmp3floatdecoder returns (probably present in the Windows package, where this was tested).RunMp3now converts S16P frames as well, to the same S16 / S32 / float outputs.Tested
Linux (CachyOS, GCC): new
guest_ajmtest, linked againstlibSceAjm.native: a 6-frame mono 48 kHz MP3 fixture (1 kHz sine, generated with FFmpeg) is decoded throughsceAjmBatchJobDecode/sceAjmBatchStart, checking the sideband result, bytes consumed and written, total decoded samples and the tone's amplitude. Without the fix the test aborts with the exception above; with it, it passes. Full suite passes. Windows only through CI. No title tested.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-02T07:20:58Z.
No longer stacked on #228 (which now only drops the duplicated stubs): rebased on
main, theguest_ajmtest is now registered inlibSceAjm.nativeand links against it.