[FFmpeg-devel] [PATCH] remove INIT_VLC_USE_STATIC from svq1dec

Reimar Döffinger Reimar.Doeffinger
Thu Sep 24 11:59:26 CEST 2009


Hello,
together with my other patches this would remove the last use of
INIT_VLC_USE_STATIC, allowing to finally remove all other code related
to it as well.
Index: libavcodec/svq1dec.c
===================================================================
--- libavcodec/svq1dec.c        (revision 20009)
+++ libavcodec/svq1dec.c        (working copy)
@@ -768,6 +768,7 @@
 {
     MpegEncContext *s = avctx->priv_data;
     int i;
+    int offset = 0;
 
     MPV_decode_defaults(s);
 
@@ -789,12 +790,20 @@
         &mvtab[0][0], 2, 1, 176);
 
     for (i = 0; i < 6; i++) {
+        static const int sizes[2][6] = {{14, 10, 14, 18, 16, 18}, {10, 10, 14, 14, 14, 16}};
+        static VLC_TYPE table[168][2];
+        svq1_intra_multistage[i].table = &table[offset];
+        svq1_intra_multistage[i].table_allocated = sizes[0][i];
+        offset += sizes[0][i];
         init_vlc(&svq1_intra_multistage[i], 3, 8,
             &ff_svq1_intra_multistage_vlc[i][0][1], 2, 1,
-            &ff_svq1_intra_multistage_vlc[i][0][0], 2, 1, INIT_VLC_USE_STATIC);
+            &ff_svq1_intra_multistage_vlc[i][0][0], 2, 1, INIT_VLC_USE_NEW_STATIC);
+        svq1_inter_multistage[i].table = &table[offset];
+        svq1_inter_multistage[i].table_allocated = sizes[1][i];
+        offset += sizes[1][i];
         init_vlc(&svq1_inter_multistage[i], 3, 8,
             &ff_svq1_inter_multistage_vlc[i][0][1], 2, 1,
-            &ff_svq1_inter_multistage_vlc[i][0][0], 2, 1, INIT_VLC_USE_STATIC);
+            &ff_svq1_inter_multistage_vlc[i][0][0], 2, 1, INIT_VLC_USE_NEW_STATIC);
     }
 
     INIT_VLC_STATIC(&svq1_intra_mean, 8, 256,




More information about the ffmpeg-devel mailing list