diff options
author | Nils Wallménius <nils@rockbox.org> | 2012-09-26 11:54:03 +0200 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2012-09-26 11:54:03 +0200 |
commit | f636aa07dfb541b5828d44e8168e7b36e5ad8898 (patch) | |
tree | 9755b43e8081011a9492064fc5602ee0fa7f7b83 | |
parent | 425725edb087bc606bfe4ca4fe9e26008ef49b6a (diff) | |
download | rockbox-f636aa07dfb541b5828d44e8168e7b36e5ad8898.tar.gz rockbox-f636aa07dfb541b5828d44e8168e7b36e5ad8898.zip |
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.c | 7 |
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 | |||
214 | int i; | 214 | int i; |
215 | int N, N2, N4; | 215 | int N, N2, N4; |
216 | kiss_twiddle_scalar sine; | 216 | kiss_twiddle_scalar sine; |
217 | VARDECL(kiss_fft_scalar, f); | 217 | /* VARDECL(kiss_fft_scalar, f); */ |
218 | VARDECL(kiss_fft_scalar, f2); | 218 | VARDECL(kiss_fft_scalar, f2); |
219 | SAVE_STACK; | 219 | SAVE_STACK; |
220 | N = l->n; | 220 | N = l->n; /* static modes => N = 1920 */ |
221 | N >>= shift; | 221 | N >>= shift; |
222 | N2 = N>>1; | 222 | N2 = N>>1; |
223 | N4 = N>>2; | 223 | N4 = N>>2; |
224 | ALLOC(f, N2, kiss_fft_scalar); | 224 | /* ALLOC(f, N2, kiss_fft_scalar); */ |
225 | kiss_fft_scalar f[N2]; /* worst case 3840b */ | ||
225 | ALLOC(f2, N2, kiss_fft_scalar); | 226 | ALLOC(f2, N2, kiss_fft_scalar); |
226 | /* sin(x) ~= x here */ | 227 | /* sin(x) ~= x here */ |
227 | #ifdef FIXED_POINT | 228 | #ifdef FIXED_POINT |