diff options
author | Nils Wallménius <nils@rockbox.org> | 2014-07-13 11:49:34 +0200 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2014-07-13 11:49:34 +0200 |
commit | 888e05ec12f573cfbef0d331888e68808763a84b (patch) | |
tree | 930ebc33f00af0638e32097633f9687358697074 /lib/rbcodec | |
parent | 9b7ec42403073ee887efc531c153e6b1b6c15bab (diff) | |
download | rockbox-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')
-rw-r--r-- | lib/rbcodec/codecs/libopus/celt/cf/kiss_fft_cf.h | 21 |
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 @@ | |||
32 | 32 | ||
33 | #ifdef FIXED_POINT | 33 | #ifdef FIXED_POINT |
34 | 34 | ||
35 | #undef C_MUL | ||
36 | #define C_MUL(m,a,b) \ | ||
37 | { \ | ||
38 | asm volatile("move.l (%[bp]), %%d2;" \ | ||
39 | "clr.l %%d3;" \ | ||
40 | "move.w %%d2, %%d3;" \ | ||
41 | "swap %%d3;" \ | ||
42 | "clr.w %%d2;" \ | ||
43 | "movem.l (%[ap]), %%d0-%%d1;" \ | ||
44 | "mac.l %%d0, %%d2, %%acc0;" \ | ||
45 | "msac.l %%d1, %%d3, %%acc0;" \ | ||
46 | "mac.l %%d1, %%d2, %%acc1;" \ | ||
47 | "mac.l %%d0, %%d3, %%acc1;" \ | ||
48 | "movclr.l %%acc0, %[mr];" \ | ||
49 | "movclr.l %%acc1, %[mi];" \ | ||
50 | : [mr] "=r" ((m).r), [mi] "=r" ((m).i) \ | ||
51 | : [ap] "a" (&(a)), [bp] "a" (&(b)) \ | ||
52 | : "d0", "d1", "d2", "d3", "cc"); \ | ||
53 | } | ||
54 | |||
55 | |||
35 | #undef C_MULC | 56 | #undef C_MULC |
36 | #define C_MULC(m,a,b) \ | 57 | #define C_MULC(m,a,b) \ |
37 | { \ | 58 | { \ |