summaryrefslogtreecommitdiffstats
path: root/apps/codecs
diff options
context:
space:
mode:
authorMichael Giacomelli <giac2000@hotmail.com>2007-07-08 05:57:14 +0000
committerMichael Giacomelli <giac2000@hotmail.com>2007-07-08 05:57:14 +0000
commit030dce6f886865b026bf8e2413b58e1f6485a81e (patch)
treeb27454a7d0072e0ee5d47c161a77fe14c68bf304 /apps/codecs
parentf5114daa730c05c6967bb4d908c934d0e3a8f994 (diff)
downloadrockbox-030dce6f886865b026bf8e2413b58e1f6485a81e.tar.gz
rockbox-030dce6f886865b026bf8e2413b58e1f6485a81e.zip
Fix previous
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13814 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs')
-rw-r--r--apps/codecs/libwma/wmadeci.c4
-rw-r--r--apps/codecs/libwma/wmafixed.c4
-rw-r--r--apps/codecs/libwma/wmafixed.h15
3 files changed, 19 insertions, 4 deletions
diff --git a/apps/codecs/libwma/wmadeci.c b/apps/codecs/libwma/wmadeci.c
index bb9b96abe0..cd01c030c8 100644
--- a/apps/codecs/libwma/wmadeci.c
+++ b/apps/codecs/libwma/wmadeci.c
@@ -696,14 +696,14 @@ void ff_mdct_end(MDCTContext *s)
static void vector_fmul_add_add(fixed32 *dst, const fixed32 *src0, const fixed32 *src1, const fixed32 *src2, int src3, int len, int step){
int i;
for(i=0; i<len; i++)
- dst[i*step] = fixmul32(src0[i], src1[i]) + src2[i] + src3;
+ dst[i*step] = fixmul32b(src0[i], src1[i]) + src2[i] + src3;
}
static void vector_fmul_reverse(fixed32 *dst, const fixed32 *src0, const fixed32 *src1, int len){
int i;
src1 += len-1;
for(i=0; i<len; i++)
- dst[i] = fixmul32(src0[i], src1[-i]);
+ dst[i] = fixmul32b(src0[i], src1[-i]);
}
/**
diff --git a/apps/codecs/libwma/wmafixed.c b/apps/codecs/libwma/wmafixed.c
index 3a902dd9ef..7b08689282 100644
--- a/apps/codecs/libwma/wmafixed.c
+++ b/apps/codecs/libwma/wmafixed.c
@@ -275,7 +275,7 @@ long fsincos(unsigned long phase, fixed32 *cos)
*/
-#if 0
+
fixed32 fixsin32(fixed32 x)
{
@@ -326,4 +326,4 @@ fixed32 fixcos32(fixed32 x)
{
return fixsin32(x - (M_PI_F>>1))*-1;
}
-#endif
+
diff --git a/apps/codecs/libwma/wmafixed.h b/apps/codecs/libwma/wmafixed.h
index 99ddec759e..da0637fb68 100644
--- a/apps/codecs/libwma/wmafixed.h
+++ b/apps/codecs/libwma/wmafixed.h
@@ -61,6 +61,21 @@ long fsincos(unsigned long phase, fixed32 *cos);
__result; \
})
+
+ #define fixmul32b(x, y) \
+ ({ int32_t __hi; \
+ uint32_t __lo; \
+ int32_t __result; \
+ asm ("smull %0, %1, %3, %4\n\t" \
+ "movs %0, %0, lsr %5\n\t" \
+ "adc %2, %0, %1, lsl %6" \
+ : "=&r" (__lo), "=&r" (__hi), "=r" (__result) \
+ : "%r" (x), "r" (y), \
+ "M" (31), "M" (32 - 31) \
+ : "cc"); \
+ __result; \
+ })
+
#elif defined(CPU_COLDFIRE)
static inline int32_t fixmul32(int32_t x, int32_t y)
{