summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2012-09-26 11:54:03 +0200
committerNils Wallménius <nils@rockbox.org>2012-09-26 11:54:03 +0200
commitf636aa07dfb541b5828d44e8168e7b36e5ad8898 (patch)
tree9755b43e8081011a9492064fc5602ee0fa7f7b83
parent425725edb087bc606bfe4ca4fe9e26008ef49b6a (diff)
opus: put frequently used mdct buffer on the real stack which is in iram
Saves about 30MHz on h300 (cf) and 1.5MHz on c200 (pp) decoding a 64kbps test file. Stack usage is still below 70%. Change-Id: Ib13df9011adb4eef4bb91a52e5a32741c8bf8988
-rw-r--r--lib/rbcodec/codecs/libopus/celt/mdct.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/rbcodec/codecs/libopus/celt/mdct.c b/lib/rbcodec/codecs/libopus/celt/mdct.c
index 4b66c211cf..15d2393d6f 100644
--- a/lib/rbcodec/codecs/libopus/celt/mdct.c
+++ b/lib/rbcodec/codecs/libopus/celt/mdct.c
@@ -214,14 +214,15 @@ void clt_mdct_backward(const mdct_lookup *l, kiss_fft_scalar *in, kiss_fft_scala
int i;
int N, N2, N4;
kiss_twiddle_scalar sine;
- VARDECL(kiss_fft_scalar, f);
+/* VARDECL(kiss_fft_scalar, f); */
VARDECL(kiss_fft_scalar, f2);
SAVE_STACK;
- N = l->n;
+ N = l->n; /* static modes => N = 1920 */
N >>= shift;
N2 = N>>1;
N4 = N>>2;
- ALLOC(f, N2, kiss_fft_scalar);
+/* ALLOC(f, N2, kiss_fft_scalar); */
+ kiss_fft_scalar f[N2]; /* worst case 3840b */
ALLOC(f2, N2, kiss_fft_scalar);
/* sin(x) ~= x here */
#ifdef FIXED_POINT