Mercurial > libavcodec.hg
diff bitstream.h @ 5071:0d503c12092b libavcodec
add init_vlc_sparse(). faster than init_vlc() if there are lots of holes in the tables.
author | lorenm |
---|---|
date | Thu, 24 May 2007 17:38:56 +0000 |
parents | 90d7898ff5d5 |
children | 4dbe6578f811 |
line wrap: on
line diff
--- a/bitstream.h Thu May 24 04:08:48 2007 +0000 +++ b/bitstream.h Thu May 24 17:38:56 2007 +0000 @@ -799,9 +799,19 @@ 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