Revision bbdf8728 libavcodec/mpegaudiodec.c
libavcodec/mpegaudiodec.c  

84  84  
85  85 
/* vlc structure for decoding layer 3 huffman tables */ 
86  86 
static VLC huff_vlc[16]; 
87 
static VLC_TYPE huff_vlc_tables[ 

88 
0+128+128+128+130+128+154+166+ 

89 
142+204+190+170+542+460+662+414 

90 
][2]; 

91 
static const int huff_vlc_tables_sizes[16] = { 

92 
0, 128, 128, 128, 130, 128, 154, 166, 

93 
142, 204, 190, 170, 542, 460, 662, 414 

94 
}; 

87  95 
static VLC huff_quad_vlc[2]; 
96 
static VLC_TYPE huff_quad_vlc_tables[128+16][2]; 

97 
static const int huff_quad_vlc_tables_sizes[2] = { 

98 
128, 16 

99 
}; 

88  100 
/* computed from band_size_long */ 
89  101 
static uint16_t band_index_long[9][23]; 
90  102 
/* XXX: free when all decoders are closed */ 
...  ...  
324  336 
s>compute_antialias= compute_antialias_float; 
325  337  
326  338 
if (!init && !avctx>parse_only) { 
339 
int offset; 

340  
327  341 
/* scale factors table for layer 1/2 */ 
328  342 
for(i=0;i<64;i++) { 
329  343 
int shift, mod; 
...  ...  
351  365 
ff_mpa_synth_init(window); 
352  366  
353  367 
/* huffman decode tables */ 
368 
offset = 0; 

354  369 
for(i=1;i<16;i++) { 
355  370 
const HuffTable *h = &mpa_huff_tables[i]; 
356  371 
int xsize, x, y; 
...  ...  
373  388 
} 
374  389  
375  390 
/* XXX: fail test */ 
391 
huff_vlc[i].table = huff_vlc_tables+offset; 

392 
huff_vlc[i].table_allocated = huff_vlc_tables_sizes[i]; 

376  393 
init_vlc(&huff_vlc[i], 7, 512, 
377 
tmp_bits, 1, 1, tmp_codes, 2, 2, 1); 

394 
tmp_bits, 1, 1, tmp_codes, 2, 2, 

395 
INIT_VLC_USE_NEW_STATIC); 

396 
offset += huff_vlc_tables_sizes[i]; 

378  397 
} 
398 
assert(offset == sizeof(huff_vlc_tables)/(sizeof(VLC_TYPE)*2)); 

399  
400 
offset = 0; 

379  401 
for(i=0;i<2;i++) { 
402 
huff_quad_vlc[i].table = huff_quad_vlc_tables+offset; 

403 
huff_quad_vlc[i].table_allocated = huff_quad_vlc_tables_sizes[i]; 

380  404 
init_vlc(&huff_quad_vlc[i], i == 0 ? 7 : 4, 16, 
381 
mpa_quad_bits[i], 1, 1, mpa_quad_codes[i], 1, 1, 1); 

405 
mpa_quad_bits[i], 1, 1, mpa_quad_codes[i], 1, 1, 

406 
INIT_VLC_USE_NEW_STATIC); 

407 
offset += huff_quad_vlc_tables_sizes[i]; 

382  408 
} 
409 
assert(offset == sizeof(huff_quad_vlc_tables)/(sizeof(VLC_TYPE)*2)); 

383  410  
384  411 
for(i=0;i<9;i++) { 
385  412 
k = 0; 
Also available in: Unified diff