summaryrefslogtreecommitdiff
path: root/libavcodec/bitstream.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-05-30 20:00:19 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-05-30 20:00:19 +0000
commitd05b24ff89474b8701d4bedba803120c676c642f (patch)
tree7414e9d6388ace6bc495b984ddf06f793b8c2d69 /libavcodec/bitstream.h
parentccc54864fef9afed00a32c0fc1394a78cf6e971e (diff)
Little helper macro to make the use of INIT_VLC_USE_NEW_STATIC easier.
Originally committed as revision 13562 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/bitstream.h')
-rw-r--r--libavcodec/bitstream.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavcodec/bitstream.h b/libavcodec/bitstream.h
index 8d2d795d7c..737c58c5a3 100644
--- a/libavcodec/bitstream.h
+++ b/libavcodec/bitstream.h
@@ -805,6 +805,15 @@ int init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes,
#define INIT_VLC_USE_NEW_STATIC 4
void free_vlc(VLC *vlc);
+#define INIT_VLC_STATIC(vlc, bits, a,b,c,d,e,f,g, static_size)\
+{\
+ static VLC_TYPE table[static_size][2];\
+ (vlc)->table= table;\
+ (vlc)->table_allocated= static_size;\
+ init_vlc(vlc, bits, a,b,c,d,e,f,g, INIT_VLC_USE_NEW_STATIC);\
+}
+
+
/**
*
* if the vlc code is invalid and max_depth=1 than no bits will be removed