summaryrefslogtreecommitdiff
path: root/apps/codecs
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs')
-rw-r--r--apps/codecs/Tremor/asm_arm.h27
-rw-r--r--apps/codecs/Tremor/config-tremor.h4
-rw-r--r--apps/codecs/Tremor/floor0.c2
3 files changed, 17 insertions, 16 deletions
diff --git a/apps/codecs/Tremor/asm_arm.h b/apps/codecs/Tremor/asm_arm.h
index 3a3716df1f..e623ce9b3d 100644
--- a/apps/codecs/Tremor/asm_arm.h
+++ b/apps/codecs/Tremor/asm_arm.h
@@ -46,22 +46,17 @@ static inline ogg_int32_t MULT31_SHIFT15(ogg_int32_t x, ogg_int32_t y) {
46 46
47#define MB() asm volatile ("" : : : "memory") 47#define MB() asm volatile ("" : : : "memory")
48 48
49static inline void XPROD32(ogg_int32_t a, ogg_int32_t b, 49#define XPROD32(a, b, t, v, x, y) \
50 ogg_int32_t t, ogg_int32_t v, 50{ \
51 ogg_int32_t *x, ogg_int32_t *y) 51 long l; \
52{ 52 asm( "smull %0, %1, %4, %6\n\t" \
53 int x1, y1, l; 53 "smlal %0, %1, %5, %7\n\t" \
54 asm( "smull %0, %1, %4, %6\n\t" 54 "rsb %3, %4, #0\n\t" \
55 "smlal %0, %1, %5, %7\n\t" 55 "smull %0, %2, %5, %6\n\t" \
56 "rsb %3, %4, #0\n\t" 56 "smlal %0, %2, %3, %7" \
57 "smull %0, %2, %5, %6\n\t" 57 : "=&r" (l), "=&r" (x), "=&r" (y), "=r" ((a)) \
58 "smlal %0, %2, %3, %7" 58 : "3" ((a)), "r" ((b)), "r" ((t)), "r" ((v)) \
59 : "=&r" (l), "=&r" (x1), "=&r" (y1), "=r" (a) 59 : "cc" ); \
60 : "3" (a), "r" (b), "r" (t), "r" (v)
61 : "cc" );
62 *x = x1;
63 MB();
64 *y = y1;
65} 60}
66 61
67static inline void XPROD31(ogg_int32_t a, ogg_int32_t b, 62static inline void XPROD31(ogg_int32_t a, ogg_int32_t b,
diff --git a/apps/codecs/Tremor/config-tremor.h b/apps/codecs/Tremor/config-tremor.h
index 402feb5363..f4a0e1c0bf 100644
--- a/apps/codecs/Tremor/config-tremor.h
+++ b/apps/codecs/Tremor/config-tremor.h
@@ -1,4 +1,8 @@
1#include "../codec.h" 1#include "../codec.h"
2#ifdef CPU_ARM
3#define _ARM_ASSEM_
4#endif
5
2#ifdef ROCKBOX_BIG_ENDIAN 6#ifdef ROCKBOX_BIG_ENDIAN
3#define BIG_ENDIAN 1 7#define BIG_ENDIAN 1
4#define LITTLE_ENDIAN 0 8#define LITTLE_ENDIAN 0
diff --git a/apps/codecs/Tremor/floor0.c b/apps/codecs/Tremor/floor0.c
index 8ea36aba2a..c412f71ddd 100644
--- a/apps/codecs/Tremor/floor0.c
+++ b/apps/codecs/Tremor/floor0.c
@@ -173,6 +173,8 @@ void vorbis_lsp_to_curve(ogg_int32_t *curve,int *map,int n,int ln,
173 ogg_int32_t wi=icos[k]; 173 ogg_int32_t wi=icos[k];
174 174
175#ifdef _V_LSP_MATH_ASM 175#ifdef _V_LSP_MATH_ASM
176 (void)shift; /* kill warnings */
177 (void)j;
176 lsp_loop_asm(&qi,&pi,&qexp,ilsp,wi,m); 178 lsp_loop_asm(&qi,&pi,&qexp,ilsp,wi,m);
177 179
178 pi=((pi*pi)>>16); 180 pi=((pi*pi)>>16);