diff options
author | Jens Arnold <amiconn@rockbox.org> | 2008-01-25 18:52:15 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2008-01-25 18:52:15 +0000 |
commit | b2fa99b4dd3e1c8d2079190278bcef52325d3668 (patch) | |
tree | a966022d9124cf5d239fa27def8c865e7ac8dbdc /apps | |
parent | 57a45136eaa7e9a6d37722e68a8dee594c313a42 (diff) | |
download | rockbox-b2fa99b4dd3e1c8d2079190278bcef52325d3668.tar.gz rockbox-b2fa99b4dd3e1c8d2079190278bcef52325d3668.zip |
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
Diffstat (limited to 'apps')
-rw-r--r-- | apps/codecs/Tremor/mdct.c | 1 | ||||
-rw-r--r-- | apps/codecs/Tremor/mdct_arm.S | 8 |
2 files changed, 9 insertions, 0 deletions
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 @@ | |||
39 | #include "mdct_lookup.h" | 39 | #include "mdct_lookup.h" |
40 | 40 | ||
41 | #if defined(CPU_ARM) && CONFIG_CPU != S3C2440 | 41 | #if defined(CPU_ARM) && CONFIG_CPU != S3C2440 |
42 | /* C code is faster on S3C2440 */ | ||
42 | 43 | ||
43 | extern void mdct_butterfly_32(DATA_TYPE *x); | 44 | extern void mdct_butterfly_32(DATA_TYPE *x); |
44 | extern void mdct_butterfly_generic_loop(DATA_TYPE *x1, DATA_TYPE *x2, | 45 | 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 @@ | |||
16 | * KIND, either express or implied. | 16 | * KIND, either express or implied. |
17 | * | 17 | * |
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | |||
20 | #include "config.h" | ||
21 | /* Codecs should not normally do this, but we need to check a macro, and | ||
22 | * codecs.h would confuse the assembler. */ | ||
19 | 23 | ||
20 | #define cPI3_8 (0x30fbc54d) | 24 | #define cPI3_8 (0x30fbc54d) |
21 | #define cPI2_8 (0x5a82799a) | 25 | #define cPI2_8 (0x5a82799a) |
22 | #define cPI1_8 (0x7641af3d) | 26 | #define cPI1_8 (0x7641af3d) |
23 | 27 | ||
28 | #ifdef USE_IRAM | ||
24 | .section .icode,"ax",%progbits | 29 | .section .icode,"ax",%progbits |
30 | #else | ||
31 | .text | ||
32 | #endif | ||
25 | .align | 33 | .align |
26 | 34 | ||
27 | .global mdct_butterfly_32 | 35 | .global mdct_butterfly_32 |