summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2012-09-26 11:21:25 +0200
committerNils Wallménius <nils@rockbox.org>2012-09-26 11:21:25 +0200
commit425725edb087bc606bfe4ca4fe9e26008ef49b6a (patch)
tree4e3d54d16c1d861ed6092fe3fe91016b4a398673 /lib
parent5f60590e807dab79e46efa29b62a5d64e56f3451 (diff)
downloadrockbox-425725edb087bc606bfe4ca4fe9e26008ef49b6a.zip
rockbox-425725edb087bc606bfe4ca4fe9e26008ef49b6a.tar.gz
rockbox-425725edb087bc606bfe4ca4fe9e26008ef49b6a.tar.bz2
rockbox-425725edb087bc606bfe4ca4fe9e26008ef49b6a.tar.xz
opus: improve cf MULT16_32_Q15 by giving the compiler more freedom
saves about 3MHz when decoding a 64kbps test file Change-Id: I10f47173ccb78e60e364662220d1db2f78dd5fdd
Diffstat (limited to 'lib')
-rw-r--r--lib/rbcodec/codecs/libopus/celt/fixed_generic.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/rbcodec/codecs/libopus/celt/fixed_generic.h b/lib/rbcodec/codecs/libopus/celt/fixed_generic.h
index d2271e7..bc6820f 100644
--- a/lib/rbcodec/codecs/libopus/celt/fixed_generic.h
+++ b/lib/rbcodec/codecs/libopus/celt/fixed_generic.h
@@ -45,14 +45,13 @@
#if defined(CPU_COLDFIRE)
static inline int32_t MULT16_32_Q15(int32_t a, int32_t b)
{
- asm volatile ("lsl.l #8, %[a];"
- "lsl.l #8, %[a];"
- "mac.l %[a], %[b], %%acc0;"
- "movclr.l %%acc0, %[a];"
- : [a] "+d" (a)
- : [b] "d" (b)
+ int32_t r;
+ asm volatile ("mac.l %[a], %[b], %%acc0;"
+ "movclr.l %%acc0, %[r];"
+ : [r] "=r" (r)
+ : [a] "r" (a<<16), [b] "r" (b)
: "cc");
- return a;
+ return r;
}
#elif defined(CPU_ARM)