diff mpegvideo.c @ 4655:f0ce30e115ac libavcodec

dont malloc() static mv_penalty arrays
author michael
date Tue, 13 Mar 2007 22:47:05 +0000
parents 5464e5021a67
children f5499f9c2dbe
line wrap: on
line diff
--- a/mpegvideo.c	Tue Mar 13 22:01:06 2007 +0000
+++ b/mpegvideo.c	Tue Mar 13 22:47:05 2007 +0000
@@ -107,7 +107,7 @@
 };
 
 #ifdef CONFIG_ENCODERS
-static uint8_t (*default_mv_penalty)[MAX_MV*2+1]=NULL;
+static uint8_t default_mv_penalty[MAX_FCODE+1][MAX_MV*2+1];
 static uint8_t default_fcode_tab[MAX_MV*2+1];
 
 enum PixelFormat ff_yuv420p_list[2]= {PIX_FMT_YUV420P, -1};
@@ -633,7 +633,6 @@
         int i;
         done=1;
 
-        default_mv_penalty= av_mallocz( sizeof(uint8_t)*(MAX_FCODE+1)*(2*MAX_MV+1) );
         memset(default_fcode_tab , 0, sizeof(uint8_t)*(2*MAX_MV+1));
 
         for(i=-16; i<16; i++){