summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2010-07-17 08:57:30 +0000
committerNils Wallménius <nils@rockbox.org>2010-07-17 08:57:30 +0000
commit331460c1f520ccc9c2e29fc1c2f228d737c148fa (patch)
tree53aed4aa42604e2cb198c57f64aa2ba62d0c3576 /apps
parentf2a1d92030a3dab73cd36b735d5e1b374943a57b (diff)
downloadrockbox-331460c1f520ccc9c2e29fc1c2f228d737c148fa.tar.gz
rockbox-331460c1f520ccc9c2e29fc1c2f228d737c148fa.zip
libwma: Reduce size of runtab and levtab buffers, only one set can get the worst case size so make the other set the second worst case size.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27459 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/codecs/libwma/wmadeci.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/codecs/libwma/wmadeci.c b/apps/codecs/libwma/wmadeci.c
index d81b93ffe3..5a03a0a59c 100644
--- a/apps/codecs/libwma/wmadeci.c
+++ b/apps/codecs/libwma/wmadeci.c
@@ -48,7 +48,7 @@ fixed32 stat0[2048], stat1[1024], stat2[512], stat3[256], stat4[128];
48uint16_t *runtabarray[2], *levtabarray[2]; 48uint16_t *runtabarray[2], *levtabarray[2];
49 49
50/*these could be made smaller since only one can be 1336*/ 50/*these could be made smaller since only one can be 1336*/
51uint16_t runtab0[1336], runtab1[1336], levtab0[1336], levtab1[1336]; 51uint16_t runtab_big[1336], runtab_small[1072], levtab_big[1336], levtab_small[1072];
52 52
53#define VLCBUF1SIZE 4598 53#define VLCBUF1SIZE 4598
54#define VLCBUF2SIZE 3574 54#define VLCBUF2SIZE 3574
@@ -546,8 +546,10 @@ int wma_decode_init(WMADecodeContext* s, asf_waveformatex_t *wfx)
546 coef_vlc_table = 1; 546 coef_vlc_table = 1;
547 } 547 }
548 548
549 runtabarray[0] = runtab0; runtabarray[1] = runtab1; 549 /* since the coef2 table is the biggest and that has index 2 in coef_vlcs
550 levtabarray[0] = levtab0; levtabarray[1] = levtab1; 550 it's safe to always assign like this */
551 runtabarray[0] = runtab_big; runtabarray[1] = runtab_small;
552 levtabarray[0] = levtab_big; levtabarray[1] = levtab_small;
551 553
552 s->coef_vlc[0].table = vlcbuf1; 554 s->coef_vlc[0].table = vlcbuf1;
553 s->coef_vlc[0].table_allocated = VLCBUF1SIZE; 555 s->coef_vlc[0].table_allocated = VLCBUF1SIZE;