mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-10-10 08:03:04 -04:00
On ARMv4 the fixed-phase FIR cycles at 8, 12 and 16 kHz run as adds of shifted samples rather than multiplies: every coefficient is a constant, and a shifted add is one cycle where mla plus loading the coefficient is five or six. Each sample is loaded once per cycle and added into the two or three outputs it feeds, sharing partial products such as 31x between them, about 27 adds per output. The kernels are generated by silk/arm/gen_resampler_armv4.py. Bit-exact; OPUS_ARM_NO_SILK_ASM disables them. Measured on the e200v1, silk_5.opus (WB SILK), with the previous commit: 36.31 -> 28.85 MHz, -20.5%. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Change-Id: Ic1fd5777e91d182248f43954e4b6ae977309dc5d
40 lines
1.9 KiB
Text
40 lines
1.9 KiB
Text
Libraries: Opus (snapshot) / Opus-tools (snapshot) / libogg 1.3
|
|
Imported: January 1st, 2019
|
|
|
|
Steps taken to adapt original opus/opus-tool/ogg source files to rockbox
|
|
(useful when for example syncing a new snapshot)
|
|
|
|
Opus:
|
|
* copied .c/.h files from opus/src lib/rbcodec/codecs/libopus
|
|
* copied .h files from opus/include to lib/rbcodec/codecs/libopus
|
|
* copied .c/.h files from opus/celt to lib/rbcodec/codecs/libopus/celt
|
|
* copied .c/.h files from opus/silk to lib/rbcodec/codecs/libopus/silk
|
|
|
|
Celt:
|
|
* changed #if FIXED_POINT to #ifdef FIXED_POINT in bands.c
|
|
* changed #elif OPUS_ARM_INLINE_EDSP to #elif defined (OPUS_ARM_INLINE_EDSP)
|
|
* renamed OPUS_ARM_INLINE_ASM to OPUS_ARM_ASM_ARMV4_ONLY and
|
|
OPUS_ARM_INLINE_EDSP to OPUS_ARM_ASM_ARMV5E_AND_LATER throughout celt and
|
|
silk, since config.h defines exactly one of them per core
|
|
* add #define ABS(a)(((a) < 0) ? - (a) :(a)) to mathops.h
|
|
|
|
Silk:
|
|
* added fixed-phase interpolation paths for the 8, 12 and 16 kHz to 48 kHz
|
|
steps in resampler_private_IIR_FIR.c (disable with OPUS_NO_SILK_FIXED_PHASE)
|
|
* resampler_private_IIR_FIR.c calls an ARMv4 kernel for those three steps,
|
|
silk/arm/resampler_armv4_asm.S, generated by gen_resampler_armv4.py beside
|
|
it (disable with OPUS_ARM_NO_SILK_ASM)
|
|
|
|
Opus-tools:
|
|
* copied src/opus_header.h and src/opus_header.c to lib/rbcodec/codecs/libopus
|
|
* changed #include <ogg/ogg.h> to #include "ogg/ogg.h" in opus_header.h
|
|
|
|
Ogg:
|
|
* copied libogg/src/framing.c to lib/rbcodec/codecs/libopus/ogg
|
|
* copied libogg/include/ogg.h to lib/rbcodec/codecs/libopus/ogg
|
|
* copied libogg/include/crctable.h to lib/rbcodec/codecs/libopus/ogg
|
|
* changed #include "ogg/ogg.h" to #include "ogg.h" in framing.c
|
|
* -- added os_config.h to lib/rbcodec/codecs/libopus/ogg
|
|
* added our own os_types.h
|
|
* changed #include <ogg/os_types.h> to #include "os_types.h" in ogg.h
|
|
* changed #include <ogg/os_types.h> to #include "os_types.h" in crctable.h
|