Mercurial > libavcodec.hg
comparison mpegaudiodec.c @ 3623:d0242f36a793 libavcodec
reduce size of vlc table, thats slightly faster here
author | michael |
---|---|
date | Fri, 25 Aug 2006 12:26:34 +0000 |
parents | e88a3910f855 |
children | 7d8ef3c542a1 |
comparison
equal
deleted
inserted
replaced
3622:e88a3910f855 | 3623:d0242f36a793 |
---|---|
389 tmp_codes[(x << 4) | y]= h->codes[j++]; | 389 tmp_codes[(x << 4) | y]= h->codes[j++]; |
390 } | 390 } |
391 } | 391 } |
392 | 392 |
393 /* XXX: fail test */ | 393 /* XXX: fail test */ |
394 init_vlc(&huff_vlc[i], 8, 256, | 394 init_vlc(&huff_vlc[i], 7, 256, |
395 tmp_bits, 1, 1, tmp_codes, 2, 2, 1); | 395 tmp_bits, 1, 1, tmp_codes, 2, 2, 1); |
396 } | 396 } |
397 for(i=0;i<2;i++) { | 397 for(i=0;i<2;i++) { |
398 init_vlc(&huff_quad_vlc[i], i == 0 ? 7 : 4, 16, | 398 init_vlc(&huff_quad_vlc[i], i == 0 ? 7 : 4, 16, |
399 mpa_quad_bits[i], 1, 1, mpa_quad_codes[i], 1, 1, 1); | 399 mpa_quad_bits[i], 1, 1, mpa_quad_codes[i], 1, 1, 1); |
1703 | 1703 |
1704 /* read huffcode and compute each couple */ | 1704 /* read huffcode and compute each couple */ |
1705 for(;j>0;j--) { | 1705 for(;j>0;j--) { |
1706 if (get_bits_count(&s->gb) >= end_pos) | 1706 if (get_bits_count(&s->gb) >= end_pos) |
1707 break; | 1707 break; |
1708 y = get_vlc2(&s->gb, vlc->table, 8, 3); | 1708 y = get_vlc2(&s->gb, vlc->table, 7, 3); |
1709 | 1709 |
1710 if(!y){ | 1710 if(!y){ |
1711 g->sb_hybrid[s_index ] = | 1711 g->sb_hybrid[s_index ] = |
1712 g->sb_hybrid[s_index+1] = 0; | 1712 g->sb_hybrid[s_index+1] = 0; |
1713 s_index += 2; | 1713 s_index += 2; |