diff options
Diffstat (limited to 'apps/codecs/libwma/wmadeci.c')
-rw-r--r-- | apps/codecs/libwma/wmadeci.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/apps/codecs/libwma/wmadeci.c b/apps/codecs/libwma/wmadeci.c index f14fbc8197..b867e5c6f1 100644 --- a/apps/codecs/libwma/wmadeci.c +++ b/apps/codecs/libwma/wmadeci.c | |||
@@ -30,10 +30,10 @@ | |||
30 | #include "bitstream.h" | 30 | #include "bitstream.h" |
31 | 31 | ||
32 | 32 | ||
33 | #define VLCBITS 9 | 33 | #define VLCBITS 7 /*7 is the lowest without glitching*/ |
34 | #define VLCMAX ((22+VLCBITS-1)/VLCBITS) | 34 | #define VLCMAX ((22+VLCBITS-1)/VLCBITS) |
35 | 35 | ||
36 | #define EXPVLCBITS 9 | 36 | #define EXPVLCBITS 7 |
37 | #define EXPMAX ((19+EXPVLCBITS-1)/EXPVLCBITS) | 37 | #define EXPMAX ((19+EXPVLCBITS-1)/EXPVLCBITS) |
38 | 38 | ||
39 | #define HGAINVLCBITS 9 | 39 | #define HGAINVLCBITS 9 |
@@ -140,11 +140,12 @@ uint16_t runtab0[1336], runtab1[1336], levtab0[1336], levtab1[1336]; | |||
140 | 140 | ||
141 | FFTComplex mdct_tmp[1] ; /* dummy var */ | 141 | FFTComplex mdct_tmp[1] ; /* dummy var */ |
142 | 142 | ||
143 | //may also be too large by ~ 1KB each? | 143 | |
144 | static VLC_TYPE vlcbuf1[6144][2]; | 144 | /*putting these in IRAM actually makes PP slower*/ |
145 | static VLC_TYPE vlcbuf2[3584][2]; | 145 | VLC_TYPE vlcbuf1[2550][2]; |
146 | static VLC_TYPE vlcbuf3[1536][2] IBSS_ATTR; //small so lets try iram | 146 | VLC_TYPE vlcbuf2[2550][2]; |
147 | static VLC_TYPE vlcbuf4[540][2]; | 147 | VLC_TYPE vlcbuf3[360][2]; |
148 | VLC_TYPE vlcbuf4[540][2]; | ||
148 | 149 | ||
149 | 150 | ||
150 | 151 | ||
@@ -877,8 +878,7 @@ int wma_decode_init(WMADecodeContext* s, asf_waveformatex_t *wfx) | |||
877 | #endif | 878 | #endif |
878 | 879 | ||
879 | s->hgain_vlc.table = vlcbuf4; | 880 | s->hgain_vlc.table = vlcbuf4; |
880 | s->hgain_vlc.table_allocated = 540; | 881 | init_vlc(&s->hgain_vlc, HGAINVLCBITS, sizeof(hgain_huffbits), |
881 | init_vlc(&s->hgain_vlc, 9, sizeof(hgain_huffbits), | ||
882 | hgain_huffbits, 1, 1, | 882 | hgain_huffbits, 1, 1, |
883 | hgain_huffcodes, 2, 2, 0); | 883 | hgain_huffcodes, 2, 2, 0); |
884 | } | 884 | } |
@@ -887,9 +887,8 @@ int wma_decode_init(WMADecodeContext* s, asf_waveformatex_t *wfx) | |||
887 | { | 887 | { |
888 | 888 | ||
889 | s->exp_vlc.table = vlcbuf3; | 889 | s->exp_vlc.table = vlcbuf3; |
890 | s->exp_vlc.table_allocated = 1536; | ||
891 | 890 | ||
892 | init_vlc(&s->exp_vlc, 9, sizeof(scale_huffbits), | 891 | init_vlc(&s->exp_vlc, EXPVLCBITS, sizeof(scale_huffbits), |
893 | scale_huffbits, 1, 1, | 892 | scale_huffbits, 1, 1, |
894 | scale_huffcodes, 4, 4, 0); | 893 | scale_huffcodes, 4, 4, 0); |
895 | } | 894 | } |