Mercurial > libavcodec.hg
diff common.h @ 531:f5d7fcc81787 libavcodec
get_vlc() optimizations
author | michaelni |
---|---|
date | Wed, 10 Jul 2002 20:05:42 +0000 |
parents | f1f4d3d755f8 |
children | 56784e066e09 |
line wrap: on
line diff
--- a/common.h Wed Jul 10 17:39:16 2002 +0000 +++ b/common.h Wed Jul 10 20:05:42 2002 +0000 @@ -766,6 +766,7 @@ SKIP_BITS(name, gb, n)\ } +// deprecated, dont use get_vlc for new code, use get_vlc2 instead or use GET_VLC directly static inline int get_vlc(GetBitContext *s, VLC *vlc) { int code; @@ -780,6 +781,19 @@ return code; } +static inline int get_vlc2(GetBitContext *s, VLC_TYPE (*table)[2], int bits, int max_depth) +{ + int code; + + OPEN_READER(re, s) + UPDATE_CACHE(re, s) + + GET_VLC(code, re, s, table, bits, max_depth) + + CLOSE_READER(re, s) + return code; +} + /* define it to include statistics code (useful only for optimizing codec efficiency */ //#define STATS