diff options
| author | Michael Giacomelli <giac2000@hotmail.com> | 2008-04-07 02:01:44 +0000 |
|---|---|---|
| committer | Michael Giacomelli <giac2000@hotmail.com> | 2008-04-07 02:01:44 +0000 |
| commit | 4a808073c7b99239db10df3dabe649fd1d7b55da (patch) | |
| tree | ff46a936c1c7bc57d46cadad254a878ff77ba2a1 /apps/codecs/libwma | |
| parent | 1aaa89aa9b9a94ca33082e606f3ad8dca6a7b9e0 (diff) | |
| download | rockbox-4a808073c7b99239db10df3dabe649fd1d7b55da.zip rockbox-4a808073c7b99239db10df3dabe649fd1d7b55da.tar.gz rockbox-4a808073c7b99239db10df3dabe649fd1d7b55da.tar.bz2 rockbox-4a808073c7b99239db10df3dabe649fd1d7b55da.tar.xz | |
Amazingly, I've only been initing about 1/2 the huffman table entries needed to actually decode a WMA file for the last 8 months and yet somehow never noticed. Fixes FS#8713, FS#8606 and probably a lot of other files.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17011 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libwma')
| -rw-r--r-- | apps/codecs/libwma/wmadeci.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/apps/codecs/libwma/wmadeci.c b/apps/codecs/libwma/wmadeci.c index 66b3039..e67a9dc 100644 --- a/apps/codecs/libwma/wmadeci.c +++ b/apps/codecs/libwma/wmadeci.c @@ -60,11 +60,17 @@ uint16_t *runtabarray[2], *levtabarray[2]; uint16_t runtab0[1336], runtab1[1336], levtab0[1336], levtab1[1336]; //these could be made smaller since only one can be 1336 +#define VLCBUF1SIZE 4598 +#define VLCBUF2SIZE 3574 +#define VLCBUF3SIZE 360 +#define VLCBUF4SIZE 540 + /*putting these in IRAM actually makes PP slower*/ -VLC_TYPE vlcbuf1[2550][2]; -VLC_TYPE vlcbuf2[2550][2]; -VLC_TYPE vlcbuf3[360][2]; -VLC_TYPE vlcbuf4[540][2]; + +VLC_TYPE vlcbuf1[VLCBUF1SIZE][2]; +VLC_TYPE vlcbuf2[VLCBUF2SIZE][2]; +VLC_TYPE vlcbuf3[VLCBUF3SIZE][2]; +VLC_TYPE vlcbuf4[VLCBUF4SIZE][2]; @@ -690,9 +696,9 @@ int wma_decode_init(WMADecodeContext* s, asf_waveformatex_t *wfx) levtabarray[0] = levtab0; levtabarray[1] = levtab1; s->coef_vlc[0].table = vlcbuf1; - s->coef_vlc[0].table_allocated = 24576/4; + s->coef_vlc[0].table_allocated = VLCBUF1SIZE; s->coef_vlc[1].table = vlcbuf2; - s->coef_vlc[1].table_allocated = 14336/4; + s->coef_vlc[1].table_allocated = VLCBUF2SIZE; init_coef_vlc(&s->coef_vlc[0], &s->run_table[0], &s->level_table[0], |