[FFmpeg-soc] [soc]: r3989 - in wmapro: wma3data.h wma3dec.c
faust3
subversion at mplayerhq.hu
Sat Jan 17 20:10:24 CET 2009
Author: faust3
Date: Sat Jan 17 20:10:23 2009
New Revision: 3989
Log:
use FF_WMA3_HUFF_VECi_SIZE defines instead of hardcoded numbers
Modified:
wmapro/wma3data.h
wmapro/wma3dec.c
Modified: wmapro/wma3data.h
==============================================================================
--- wmapro/wma3data.h Sat Jan 17 19:43:47 2009 (r3988)
+++ wmapro/wma3data.h Sat Jan 17 20:10:23 2009 (r3989)
@@ -534,7 +534,7 @@ static const uint8_t ff_wma3_vec1_huffbi
};
-static const uint16_t ff_wma3_symbol_to_vec4[] = {
+static const uint16_t ff_wma3_symbol_to_vec4[FF_WMA3_HUFF_VEC4_SIZE] = {
0, 1, 2, 3, 4, 5, 16, 17, 18, 19,
20, 32, 33, 34, 35, 48, 49, 50, 64, 65,
80, 256, 257, 258, 259, 260, 272, 273, 274, 275,
@@ -547,11 +547,11 @@ static const uint16_t ff_wma3_symbol_to_
5120, 8192, 8193, 8194, 8195, 8208, 8209, 8210, 8224, 8225,
8240, 8448, 8449, 8450, 8464, 8465, 8480, 8704, 8705, 8720,
8960, 12288, 12289, 12290, 12304, 12305, 12320, 12544, 12545, 12560,
- 12800, 16384, 16385, 16400, 16640, 20480, 0, 0,
+ 12800, 16384, 16385, 16400, 16640, 20480, 0,
};
-static const uint8_t ff_wma3_symbol_to_vec2[] = {
+static const uint8_t ff_wma3_symbol_to_vec2[FF_WMA3_HUFF_VEC2_SIZE] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45,
@@ -561,8 +561,7 @@ static const uint8_t ff_wma3_symbol_to_v
105, 112, 113, 114, 115, 116, 117, 118, 119, 120, 128, 129, 130, 131, 132,
133, 134, 135, 144, 145, 146, 147, 148, 149, 150, 160, 161, 162, 163, 164,
165, 176, 177, 178, 179, 180, 192, 193, 194, 195, 208, 209, 210, 224, 225,
- 240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 240, 0,
};
/** @} */
Modified: wmapro/wma3dec.c
==============================================================================
--- wmapro/wma3dec.c Sat Jan 17 19:43:47 2009 (r3988)
+++ wmapro/wma3dec.c Sat Jan 17 20:10:23 2009 (r3989)
@@ -742,16 +742,16 @@ static inline void wma_get_vec4(WMA3Deco
idx = get_vlc2(s->getbit, s->vec4_vlc.table, VLCBITS, ((FF_WMA3_HUFF_VEC4_MAXBITS+VLCBITS-1)/VLCBITS));
- if ( idx == 126 )
+ if ( idx == FF_WMA3_HUFF_VEC4_SIZE - 1 )
{
while(i < 4){
idx = get_vlc2(s->getbit, s->vec2_vlc.table, VLCBITS, ((FF_WMA3_HUFF_VEC2_MAXBITS+VLCBITS-1)/VLCBITS));
- if ( idx == 136 ){
+ if ( idx == FF_WMA3_HUFF_VEC2_SIZE - 1 ){
vals[i] = get_vlc2(s->getbit, s->vec1_vlc.table, VLCBITS, ((FF_WMA3_HUFF_VEC1_MAXBITS+VLCBITS-1)/VLCBITS));
- if(vals[i] == 100)
+ if(vals[i] == FF_WMA3_HUFF_VEC1_SIZE - 1)
vals[i] += wma_get_large_val(s);
vals[i+1] = get_vlc2(s->getbit, s->vec1_vlc.table, VLCBITS, ((FF_WMA3_HUFF_VEC1_MAXBITS+VLCBITS-1)/VLCBITS));
- if(vals[i+1] == 100)
+ if(vals[i+1] == FF_WMA3_HUFF_VEC1_SIZE - 1)
vals[i+1] += wma_get_large_val(s);
}else{
vals[i] = (ff_wma3_symbol_to_vec2[idx] >> 4) & 0xF;
More information about the FFmpeg-soc
mailing list