summaryrefslogtreecommitdiff
path: root/lib/rbcodec
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2012-10-06 23:41:15 +0200
committerNils Wallménius <nils@rockbox.org>2012-10-06 23:43:05 +0200
commit3ac0fc7c907695d72f58c41907cef913cf81561f (patch)
treec11c87f87f2645271bad607600f9d0e46bd1ca64 /lib/rbcodec
parent2119f75af3e94a959451cd0dccde9ce38b19bcf0 (diff)
opus: cf inline asm for MULT32_32_Q31
speeds up decoding of a 64kbps test file by 2MHz on h300 Change-Id: I437d05278fe1c495715cf0e3477f9960d1df9d3a
Diffstat (limited to 'lib/rbcodec')
-rw-r--r--lib/rbcodec/codecs/libopus/celt/fixed_generic.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/rbcodec/codecs/libopus/celt/fixed_generic.h b/lib/rbcodec/codecs/libopus/celt/fixed_generic.h
index 53f513b67b..28a1598d3e 100644
--- a/lib/rbcodec/codecs/libopus/celt/fixed_generic.h
+++ b/lib/rbcodec/codecs/libopus/celt/fixed_generic.h
@@ -71,7 +71,19 @@ static inline int32_t MULT16_32_Q15(int32_t a, int32_t b)
#define MULT16_32_Q15(a,b) ADD32(SHL(MULT16_16((a),SHR((b),16)),1), SHR(MULT16_16SU((a),((b)&0x0000ffff)),15))
#endif
-#if defined(CPU_ARM)
+#if defined(CPU_COLDFIRE)
+static inline int32_t MULT32_32_Q31(int32_t a, int32_t b)
+{
+ int32_t r;
+ asm volatile ("mac.l %[a], %[b], %%acc0;"
+ "movclr.l %%acc0, %[r];"
+ : [r] "=r" (r)
+ : [a] "r" (a), [b] "r" (b)
+ : "cc");
+ return r;
+}
+
+#elif defined(CPU_ARM)
static inline int32_t MULT32_32_Q31(int32_t a, int32_t b)
{
int32_t lo, hi;