diff mpegvideo.c @ 6940:778ecab25dd8 libavcodec

Change init_vlc_rl() so it does not use *alloc_static() anymore.
author michael
date Fri, 30 May 2008 21:08:41 +0000
parents 8f656b589911
children 3f819263176e
line wrap: on
line diff
--- a/mpegvideo.c	Fri May 30 21:06:40 2008 +0000
+++ b/mpegvideo.c	Fri May 30 21:08:41 2008 +0000
@@ -722,19 +722,10 @@
     }
 }
 
-void init_vlc_rl(RLTable *rl, int use_static)
+void init_vlc_rl(RLTable *rl)
 {
     int i, q;
 
-    /* Return if static table is already initialized */
-    if(use_static && rl->rl_vlc[0])
-        return;
-
-    init_vlc(&rl->vlc, 9, rl->n + 1,
-             &rl->table_vlc[0][1], 4, 2,
-             &rl->table_vlc[0][0], 4, 2, use_static);
-
-
     for(q=0; q<32; q++){
         int qmul= q*2;
         int qadd= (q-1)|1;
@@ -743,10 +734,6 @@
             qmul=1;
             qadd=0;
         }
-        if(use_static)
-            rl->rl_vlc[q]= av_mallocz_static(rl->vlc.table_size*sizeof(RL_VLC_ELEM));
-        else
-            rl->rl_vlc[q]= av_malloc(rl->vlc.table_size*sizeof(RL_VLC_ELEM));
         for(i=0; i<rl->vlc.table_size; i++){
             int code= rl->vlc.table[i][0];
             int len = rl->vlc.table[i][1];