Mercurial > libavcodec.hg
diff mpeg12.c @ 4668:1f1a0e67b961 libavcodec
kill av_mallocz_static() calls in init_rl()
author | michael |
---|---|
date | Wed, 14 Mar 2007 13:19:19 +0000 |
parents | f0ce30e115ac |
children | d161ec980995 |
line wrap: on
line diff
--- a/mpeg12.c Wed Mar 14 12:29:32 2007 +0000 +++ b/mpeg12.c Wed Mar 14 13:19:19 2007 +0000 @@ -108,6 +108,8 @@ static int8_t mpeg1_max_level[2][64]; #endif //CONFIG_ENCODERS +static uint8_t static_rl_table_store[2][2][2*MAX_RUN + MAX_LEVEL + 3]; + static void init_2d_vlc_rl(RLTable *rl, int use_static) { int i; @@ -825,9 +827,9 @@ int i; done=1; - init_rl(&rl_mpeg1, 1); + init_rl(&rl_mpeg1, static_rl_table_store[0]); if(s->intra_vlc_format) - init_rl(&rl_mpeg2, 1); + init_rl(&rl_mpeg2, static_rl_table_store[1]); for(i=0; i<64; i++) { @@ -1075,8 +1077,8 @@ init_vlc(&mb_btype_vlc, MB_BTYPE_VLC_BITS, 11, &table_mb_btype[0][1], 2, 1, &table_mb_btype[0][0], 2, 1, 1); - init_rl(&rl_mpeg1, 1); - init_rl(&rl_mpeg2, 1); + init_rl(&rl_mpeg1, static_rl_table_store[0]); + init_rl(&rl_mpeg2, static_rl_table_store[1]); init_2d_vlc_rl(&rl_mpeg1, 1); init_2d_vlc_rl(&rl_mpeg2, 1);