summaryrefslogtreecommitdiff
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
parent5f60590e807dab79e46efa29b62a5d64e56f3451 (diff)
downloadrockbox-425725edb087bc606bfe4ca4fe9e26008ef49b6a.tar.gz
rockbox-425725edb087bc606bfe4ca4fe9e26008ef49b6a.zip
opus: improve cf MULT16_32_Q15 by giving the compiler more freedom
saves about 3MHz when decoding a 64kbps test file Change-Id: I10f47173ccb78e60e364662220d1db2f78dd5fdd
-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 d2271e7972..bc6820fa21 100644
--- a/lib/rbcodec/codecs/libopus/celt/fixed_generic.h
+++ b/lib/rbcodec/codecs/libopus/celt/fixed_generic.h
@@ -45,14 +45,13 @@
45#if defined(CPU_COLDFIRE) 45#if defined(CPU_COLDFIRE)
46static inline int32_t MULT16_32_Q15(int32_t a, int32_t b) 46static inline int32_t MULT16_32_Q15(int32_t a, int32_t b)
47{ 47{
48 asm volatile ("lsl.l #8, %[a];" 48 int32_t r;
49 "lsl.l #8, %[a];" 49 asm volatile ("mac.l %[a], %[b], %%acc0;"
50 "mac.l %[a], %[b], %%acc0;" 50 "movclr.l %%acc0, %[r];"
51 "movclr.l %%acc0, %[a];" 51 : [r] "=r" (r)
52 : [a] "+d" (a) 52 : [a] "r" (a<<16), [b] "r" (b)
53 : [b] "d" (b)
54 : "cc"); 53 : "cc");
55 return a; 54 return r;
56} 55}
57 56
58#elif defined(CPU_ARM) 57#elif defined(CPU_ARM)