changeset 6936:97798862a414 libavcodec

Little helper macro to make the use of INIT_VLC_USE_NEW_STATIC easier.
author michael
date Fri, 30 May 2008 20:00:19 +0000
parents 24e01f7cc819
children 966b86c01ade
files bitstream.h
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/bitstream.h	Fri May 30 19:48:02 2008 +0000
+++ b/bitstream.h	Fri May 30 20:00:19 2008 +0000
@@ -805,6 +805,15 @@
 #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