src/third_party/libhelix_mp3/README_ARM_ASSEMBLY.md
The libhelix-mp3 decoder includes highly optimized ARM assembly implementations of the polyphase filter in real/arm/asmpoly_gcc.S.
The assembly file is always included in the build, but uses preprocessor guards to compile only on supported platforms:
#if defined(__GNUC__) && defined(__arm__) && !defined(__thumb__) && !defined(__thumb2__)
// ARM32 assembly code here
#endif
asmpoly_gcc.S is always included via library.json srcFilter| Platform Type | Implementation | Performance |
|---|---|---|
| ARM Cortex-A (Pi Linux) | ARM32 assembly | Fastest (~1-2ms/frame better) |
| ARM Cortex-M (Teensy) | C++ + Thumb-2 inline asm | Already optimized |
| ESP32 (Xtensa) | C++ + Xtensa inline asm | Already optimized |
| AVR/x86/Others | Portable C++ | Good, compiler-optimized |
asmpoly_gcc.S - GCC-compatible ARM32 assembly with preprocessor guards#if !(defined(__GNUC__) && defined(__arm__) && !defined(__thumb__) && !defined(__thumb2__))
#define COMPILE_CPP_POLYPHASE // Compile C++ version
#endif
Assembly functions use xmp3_ prefix (via STATNAME macro):
xmp3_PolyphaseMonoxmp3_PolyphaseStereoThese automatically match the C function declarations in coder.h.
asmpoly.s - ARM ADS assembler format (deleted, incompatible with GCC)asmmisc.s - ARM ADS assembler format (deleted, incompatible with GCC)Only asmpoly_gcc.S (GCC format with preprocessor support) is kept.