summaryrefslogtreecommitdiff
path: root/libavcodec/bitstream.h
diff options
context:
space:
mode:
authorLoren Merritt <lorenm@u.washington.edu>2007-05-24 17:38:56 +0000
committerLoren Merritt <lorenm@u.washington.edu>2007-05-24 17:38:56 +0000
commitb613bacca9c256f1483c46847f713e47a0e9a5f6 (patch)
treebad3046ebe982e818982754fa4e82cdb76600de2 /libavcodec/bitstream.h
parent4d5588cfb89a193708b832f4a1beb2e86788a7c4 (diff)
downloadffmpeg-b613bacca9c256f1483c46847f713e47a0e9a5f6.tar.gz
add init_vlc_sparse(). faster than init_vlc() if there are lots of holes in the tables.
Originally committed as revision 9117 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/bitstream.h')
-rw-r--r--libavcodec/bitstream.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/libavcodec/bitstream.h b/libavcodec/bitstream.h
index 2ef76ec5d7..e30ba83510 100644
--- a/libavcodec/bitstream.h
+++ b/libavcodec/bitstream.h
@@ -799,9 +799,19 @@ static inline void align_get_bits(GetBitContext *s)
if(n) skip_bits(s, n);
}
-int init_vlc(VLC *vlc, int nb_bits, int nb_codes,
+#define init_vlc(vlc, nb_bits, nb_codes,\
+ bits, bits_wrap, bits_size,\
+ codes, codes_wrap, codes_size,\
+ flags)\
+ init_vlc_sparse(vlc, nb_bits, nb_codes,\
+ bits, bits_wrap, bits_size,\
+ codes, codes_wrap, codes_size,\
+ NULL, 0, 0, flags)
+
+int init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes,
const void *bits, int bits_wrap, int bits_size,
const void *codes, int codes_wrap, int codes_size,
+ const void *symbols, int symbols_wrap, int symbols_size,
int flags);
#define INIT_VLC_USE_STATIC 1
#define INIT_VLC_LE 2