diff options
author | Nils Wallménius <nils@rockbox.org> | 2012-10-04 19:20:55 +0200 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2012-10-04 19:20:55 +0200 |
commit | 6d2ad505dccda640439b6fa75fb742caf2981e11 (patch) | |
tree | 97a9759cb9230ffeb0b685932eaa8b44f5a5d6ef /lib/rbcodec/codecs/libopus/celt/cwrs.c | |
parent | 283277e5ab95b3c74a9bee0bef25cb55d55e016b (diff) | |
download | rockbox-6d2ad505dccda640439b6fa75fb742caf2981e11.tar.gz rockbox-6d2ad505dccda640439b6fa75fb742caf2981e11.zip |
opus: put arrays frequently used by pulse decoding on the stack
speeds up decoding of a 64kbps test file by 14MHz on h300 (cf)
and 1MHz on c200 (pp)
Change-Id: I852cb66808676ea51109423f5b70cfc8782dd109
Diffstat (limited to 'lib/rbcodec/codecs/libopus/celt/cwrs.c')
-rw-r--r-- | lib/rbcodec/codecs/libopus/celt/cwrs.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/rbcodec/codecs/libopus/celt/cwrs.c b/lib/rbcodec/codecs/libopus/celt/cwrs.c index 3d5dd790d9..b8ade96fce 100644 --- a/lib/rbcodec/codecs/libopus/celt/cwrs.c +++ b/lib/rbcodec/codecs/libopus/celt/cwrs.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include "cwrs.h" | 35 | #include "cwrs.h" |
36 | #include "mathops.h" | 36 | #include "mathops.h" |
37 | #include "arch.h" | 37 | #include "arch.h" |
38 | #include "rate.h" | ||
38 | 39 | ||
39 | #ifdef CUSTOM_MODES | 40 | #ifdef CUSTOM_MODES |
40 | 41 | ||
@@ -632,11 +633,12 @@ void decode_pulses(int *_y,int _n,int _k,ec_dec *_dec) | |||
632 | default: | 633 | default: |
633 | { | 634 | { |
634 | #endif | 635 | #endif |
635 | VARDECL(opus_uint32,u); | 636 | /* VARDECL(opus_uint32,u); |
636 | SAVE_STACK; | 637 | SAVE_STACK; |
637 | ALLOC(u,_k+2U,opus_uint32); | 638 | ALLOC(u,_k+2U,opus_uint32); */ |
639 | opus_uint32 u[MAX_PULSES+2]; | ||
638 | cwrsi(_n,_k,ec_dec_uint(_dec,ncwrs_urow(_n,_k,u)),_y,u); | 640 | cwrsi(_n,_k,ec_dec_uint(_dec,ncwrs_urow(_n,_k,u)),_y,u); |
639 | RESTORE_STACK; | 641 | /* RESTORE_STACK; */ |
640 | #ifndef SMALL_FOOTPRINT | 642 | #ifndef SMALL_FOOTPRINT |
641 | } | 643 | } |
642 | break; | 644 | break; |