Mercurial > libavcodec.hg
diff mpeg12.c @ 4655:f0ce30e115ac libavcodec
dont malloc() static mv_penalty arrays
author | michael |
---|---|
date | Tue, 13 Mar 2007 22:47:05 +0000 |
parents | 6679d37a3338 |
children | 1f1a0e67b961 |
line wrap: on
line diff
--- a/mpeg12.c Tue Mar 13 22:01:06 2007 +0000 +++ b/mpeg12.c Tue Mar 13 22:47:05 2007 +0000 @@ -94,7 +94,7 @@ PIX_FMT_XVMC_MPEG2_MC, -1}; #ifdef CONFIG_ENCODERS -static uint8_t (*mv_penalty)[MAX_MV*2+1]= NULL; +static uint8_t mv_penalty[MAX_FCODE+1][MAX_MV*2+1]; static uint8_t fcode_tab[MAX_MV*2+1]; static uint8_t uni_mpeg1_ac_vlc_len [64*64*2]; @@ -859,8 +859,6 @@ mpeg1_chr_dc_uni[i+255]= bits + (code<<8); } - mv_penalty= av_mallocz( sizeof(uint8_t)*(MAX_FCODE+1)*(2*MAX_MV+1) ); - for(f_code=1; f_code<=MAX_FCODE; f_code++){ for(mv=-MAX_MV; mv<=MAX_MV; mv++){ int len;