diff wnv1.c @ 9463:d719a2711c64 libavcodec

Use new static VLC scheme in Indeo2, Musepack and WNV1 decoders
author kostya
date Fri, 17 Apr 2009 14:09:56 +0000
parents 0dce4fe6e6f3
children b949a56ecc07
line wrap: on
line diff
--- a/wnv1.c	Fri Apr 17 13:59:07 2009 +0000
+++ b/wnv1.c	Fri Apr 17 14:09:56 2009 +0000
@@ -129,15 +129,16 @@
 
 static av_cold int decode_init(AVCodecContext *avctx){
     WNV1Context * const l = avctx->priv_data;
+    static VLC_TYPE code_table[1 << CODE_VLC_BITS][2];
 
     l->avctx = avctx;
     avctx->pix_fmt = PIX_FMT_YUV422P;
 
-    if(!code_vlc.table){
+    code_vlc.table = code_table;
+    code_vlc.table_allocated = 1 << CODE_VLC_BITS;
         init_vlc(&code_vlc, CODE_VLC_BITS, 16,
                     &code_tab[0][1], 4, 2,
-                    &code_tab[0][0], 4, 2, INIT_VLC_USE_STATIC);
-    }
+                    &code_tab[0][0], 4, 2, INIT_VLC_USE_NEW_STATIC);
 
     return 0;
 }