summaryrefslogtreecommitdiff
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
parent2119f75af3e94a959451cd0dccde9ce38b19bcf0 (diff)
downloadrockbox-3ac0fc7c907695d72f58c41907cef913cf81561f.tar.gz
rockbox-3ac0fc7c907695d72f58c41907cef913cf81561f.zip
opus: cf inline asm for MULT32_32_Q31
speeds up decoding of a 64kbps test file by 2MHz on h300 Change-Id: I437d05278fe1c495715cf0e3477f9960d1df9d3a
-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)
71#define MULT16_32_Q15(a,b) ADD32(SHL(MULT16_16((a),SHR((b),16)),1), SHR(MULT16_16SU((a),((b)&0x0000ffff)),15)) 71#define MULT16_32_Q15(a,b) ADD32(SHL(MULT16_16((a),SHR((b),16)),1), SHR(MULT16_16SU((a),((b)&0x0000ffff)),15))
72#endif 72#endif
73 73
74#if defined(CPU_ARM) 74#if defined(CPU_COLDFIRE)
75static inline int32_t MULT32_32_Q31(int32_t a, int32_t b)
76{
77 int32_t r;
78 asm volatile ("mac.l %[a], %[b], %%acc0;"
79 "movclr.l %%acc0, %[r];"
80 : [r] "=r" (r)
81 : [a] "r" (a), [b] "r" (b)
82 : "cc");
83 return r;
84}
85
86#elif defined(CPU_ARM)
75static inline int32_t MULT32_32_Q31(int32_t a, int32_t b) 87static inline int32_t MULT32_32_Q31(int32_t a, int32_t b)
76{ 88{
77 int32_t lo, hi; 89 int32_t lo, hi;