diff options
author | Nils Wallménius <nils@rockbox.org> | 2012-10-06 23:41:15 +0200 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2012-10-06 23:43:05 +0200 |
commit | 3ac0fc7c907695d72f58c41907cef913cf81561f (patch) | |
tree | c11c87f87f2645271bad607600f9d0e46bd1ca64 /lib/rbcodec | |
parent | 2119f75af3e94a959451cd0dccde9ce38b19bcf0 (diff) | |
download | rockbox-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
Diffstat (limited to 'lib/rbcodec')
-rw-r--r-- | lib/rbcodec/codecs/libopus/celt/fixed_generic.h | 14 |
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) |
75 | static 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) | ||
75 | static inline int32_t MULT32_32_Q31(int32_t a, int32_t b) | 87 | static inline int32_t MULT32_32_Q31(int32_t a, int32_t b) |
76 | { | 88 | { |
77 | int32_t lo, hi; | 89 | int32_t lo, hi; |