diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-04-18 20:07:48 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-04-18 20:07:48 +0000 |
commit | e91f4bf1606801d53c33234d0f5ff3a7138a6f3f (patch) | |
tree | a819add24a1a32ad7e51264e65bb13ab7af7a8f4 /libavcodec/bitstream.h | |
parent | 5bb8a0daa1bd660fd70261eaf2bba44f7aab1cd5 (diff) | |
download | ffmpeg-e91f4bf1606801d53c33234d0f5ff3a7138a6f3f.tar.gz |
avoid UPDATE_CACHE() in GET_RL_VLC() if not needed
Originally committed as revision 4137 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/bitstream.h')
-rw-r--r-- | libavcodec/bitstream.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/bitstream.h b/libavcodec/bitstream.h index 93e1e4fca2..fd69915d8f 100644 --- a/libavcodec/bitstream.h +++ b/libavcodec/bitstream.h @@ -727,7 +727,7 @@ void free_vlc(VLC *vlc); SKIP_BITS(name, gb, n)\ } -#define GET_RL_VLC(level, run, name, gb, table, bits, max_depth)\ +#define GET_RL_VLC(level, run, name, gb, table, bits, max_depth, need_update)\ {\ int n, index, nb_bits;\ \ @@ -736,8 +736,10 @@ void free_vlc(VLC *vlc); n = table[index].len;\ \ if(max_depth > 1 && n < 0){\ - LAST_SKIP_BITS(name, gb, bits)\ - UPDATE_CACHE(name, gb)\ + SKIP_BITS(name, gb, bits)\ + if(need_update){\ + UPDATE_CACHE(name, gb)\ + }\ \ nb_bits = -n;\ \ |