From b2fa99b4dd3e1c8d2079190278bcef52325d3668 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Fri, 25 Jan 2008 18:52:15 +0000 Subject: Vorbis codec: Only try to put the ARM assembler optimised MDCT in IRAM if the target uses IRAM. This fixes the code for gigabeat, but it is kept disabled for gigabeat because the C code is actually slightly faster (~0.5%). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16164 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/Tremor/mdct.c | 1 + apps/codecs/Tremor/mdct_arm.S | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/apps/codecs/Tremor/mdct.c b/apps/codecs/Tremor/mdct.c index 2e386174da..dce2a9d196 100644 --- a/apps/codecs/Tremor/mdct.c +++ b/apps/codecs/Tremor/mdct.c @@ -39,6 +39,7 @@ #include "mdct_lookup.h" #if defined(CPU_ARM) && CONFIG_CPU != S3C2440 +/* C code is faster on S3C2440 */ extern void mdct_butterfly_32(DATA_TYPE *x); extern void mdct_butterfly_generic_loop(DATA_TYPE *x1, DATA_TYPE *x2, diff --git a/apps/codecs/Tremor/mdct_arm.S b/apps/codecs/Tremor/mdct_arm.S index 495e6a17c9..275359db7e 100644 --- a/apps/codecs/Tremor/mdct_arm.S +++ b/apps/codecs/Tremor/mdct_arm.S @@ -16,12 +16,20 @@ * KIND, either express or implied. * ****************************************************************************/ + +#include "config.h" +/* Codecs should not normally do this, but we need to check a macro, and + * codecs.h would confuse the assembler. */ #define cPI3_8 (0x30fbc54d) #define cPI2_8 (0x5a82799a) #define cPI1_8 (0x7641af3d) +#ifdef USE_IRAM .section .icode,"ax",%progbits +#else + .text +#endif .align .global mdct_butterfly_32 -- cgit v1.2.3