summaryrefslogtreecommitdiffstats
path: root/lib/rbcodec/codecs/libopus/celt/cf
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2014-07-13 11:49:34 +0200
committerNils Wallménius <nils@rockbox.org>2014-07-13 11:49:34 +0200
commit888e05ec12f573cfbef0d331888e68808763a84b (patch)
tree930ebc33f00af0638e32097633f9687358697074 /lib/rbcodec/codecs/libopus/celt/cf
parent9b7ec42403073ee887efc531c153e6b1b6c15bab (diff)
downloadrockbox-888e05ec12f573cfbef0d331888e68808763a84b.tar.gz
rockbox-888e05ec12f573cfbef0d331888e68808763a84b.zip
libopus: asm C_MUL for coldfire
The recent merge of upstream changed the fft to use C_MUL which wasn't implemented in asm for coldfire. Speeds up decoding 64 kbps test file by 2.68 MHz and 128 kbps test file by 2.80 MHz on H300. Change-Id: I8b61fc0f9568d6350431e311a12e44fe4f60f72e
Diffstat (limited to 'lib/rbcodec/codecs/libopus/celt/cf')
-rw-r--r--lib/rbcodec/codecs/libopus/celt/cf/kiss_fft_cf.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/rbcodec/codecs/libopus/celt/cf/kiss_fft_cf.h b/lib/rbcodec/codecs/libopus/celt/cf/kiss_fft_cf.h
index fe0fe2f3ca..74f14fb9e1 100644
--- a/lib/rbcodec/codecs/libopus/celt/cf/kiss_fft_cf.h
+++ b/lib/rbcodec/codecs/libopus/celt/cf/kiss_fft_cf.h
@@ -32,6 +32,27 @@
#ifdef FIXED_POINT
+#undef C_MUL
+#define C_MUL(m,a,b) \
+ { \
+ asm volatile("move.l (%[bp]), %%d2;" \
+ "clr.l %%d3;" \
+ "move.w %%d2, %%d3;" \
+ "swap %%d3;" \
+ "clr.w %%d2;" \
+ "movem.l (%[ap]), %%d0-%%d1;" \
+ "mac.l %%d0, %%d2, %%acc0;" \
+ "msac.l %%d1, %%d3, %%acc0;" \
+ "mac.l %%d1, %%d2, %%acc1;" \
+ "mac.l %%d0, %%d3, %%acc1;" \
+ "movclr.l %%acc0, %[mr];" \
+ "movclr.l %%acc1, %[mi];" \
+ : [mr] "=r" ((m).r), [mi] "=r" ((m).i) \
+ : [ap] "a" (&(a)), [bp] "a" (&(b)) \
+ : "d0", "d1", "d2", "d3", "cc"); \
+ }
+
+
#undef C_MULC
#define C_MULC(m,a,b) \
{ \