Mercurial > libavcodec.hg
diff common.c @ 193:b691dd3e9088 libavcodec
aligned bitstream support (optional) - patch by ichael Niedermayer <michaelni@gmx.at>
| author | arpi_esp |
|---|---|
| date | Fri, 11 Jan 2002 21:21:20 +0000 |
| parents | 1e5f64be86fc |
| children | 5b88ee1abf97 |
line wrap: on
line diff
--- a/common.c Thu Jan 10 00:56:05 2002 +0000 +++ b/common.c Fri Jan 11 21:21:20 2002 +0000 @@ -505,41 +505,3 @@ free(vlc->table_codes); } -int get_vlc(GetBitContext *s, VLC *vlc) -{ - int bit_cnt, code, n, nb_bits, index; - UINT32 bit_buf; - INT16 *table_codes; - INT8 *table_bits; - UINT8 *buf_ptr; - - SAVE_BITS(s); - nb_bits = vlc->bits; - table_codes = vlc->table_codes; - table_bits = vlc->table_bits; - for(;;) { - SHOW_BITS(s, index, nb_bits); - code = table_codes[index]; - n = table_bits[index]; - if (n > 0) { - /* most common case */ - FLUSH_BITS(n); -#ifdef STATS - st_bit_counts[st_current_index] += n; -#endif - break; - } else if (n == 0) { - return -1; - } else { - FLUSH_BITS(nb_bits); -#ifdef STATS - st_bit_counts[st_current_index] += nb_bits; -#endif - nb_bits = -n; - table_codes = vlc->table_codes + code; - table_bits = vlc->table_bits + code; - } - } - RESTORE_BITS(s); - return code; -}
