Mercurial > libavcodec.hg
diff bitstream.h @ 2615:0d88e3f89379 libavcodec
avoid UPDATE_CACHE() in GET_RL_VLC() if not needed
author | michael |
---|---|
date | Mon, 18 Apr 2005 20:07:48 +0000 |
parents | 5e24800ab329 |
children | b33be8b00488 |
line wrap: on
line diff
--- a/bitstream.h Mon Apr 18 12:08:16 2005 +0000 +++ b/bitstream.h Mon Apr 18 20:07:48 2005 +0000 @@ -727,7 +727,7 @@ 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 @@ 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;\ \