diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2003-03-31 11:13:14 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-03-31 11:13:14 +0000 |
commit | 309522372c481dea3d9f6f33eacc6d200cce10cb (patch) | |
tree | 0802521e9d59572ba31004e4e9e5bd9d09d2da40 /libavcodec/mpeg12.c | |
parent | 8437bd7bc8d3fa502e1f9bf112bebcce2522d82c (diff) | |
download | ffmpeg-309522372c481dea3d9f6f33eacc6d200cce10cb.tar.gz |
some static -> dynamic alloc & 16->8 bit
Originally committed as revision 1722 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r-- | libavcodec/mpeg12.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index a25d7c0601..95ce87edf3 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -73,7 +73,7 @@ static inline int mpeg2_decode_block_intra(MpegEncContext *s, static int mpeg_decode_motion(MpegEncContext *s, int fcode, int pred); #ifdef CONFIG_ENCODERS -static uint16_t mv_penalty[MAX_FCODE+1][MAX_MV*2+1]; +static uint8_t (*mv_penalty)[MAX_MV*2+1]= NULL; static uint8_t fcode_tab[MAX_MV*2+1]; static uint32_t uni_mpeg1_ac_vlc_bits[64*64*2]; @@ -670,6 +670,8 @@ void ff_mpeg1_encode_init(MpegEncContext *s) 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; |