diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-01-11 21:21:20 +0000 |
---|---|---|
committer | Arpi <arpi@thot.banki.hu> | 2002-01-11 21:21:20 +0000 |
commit | 3587d501a37938fd112bbc4642f86e298321ff69 (patch) | |
tree | c49bdf6c6684f28da445bd4e9446ccb5a5a9b7fb /libavcodec/common.c | |
parent | 27a3e2c5e036b3199416b5c055a7db775e8f0620 (diff) | |
download | ffmpeg-3587d501a37938fd112bbc4642f86e298321ff69.tar.gz |
aligned bitstream support (optional) - patch by ichael Niedermayer <michaelni@gmx.at>
Originally committed as revision 253 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/common.c')
-rw-r--r-- | libavcodec/common.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/libavcodec/common.c b/libavcodec/common.c index 3c7bd64a98..fb73c7eb5c 100644 --- a/libavcodec/common.c +++ b/libavcodec/common.c @@ -505,41 +505,3 @@ void free_vlc(VLC *vlc) 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; -} |