diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-03-14 13:19:19 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-03-14 13:19:19 +0000 |
commit | 3502a54f597a678a39679d2699a02c9fbba534f8 (patch) | |
tree | ec518ed2708e612306cbf47b11b7dc86651fdd43 /libavcodec/mpeg12.c | |
parent | efddbce9d0118ba748fadfdd801b10f141882222 (diff) | |
download | ffmpeg-3502a54f597a678a39679d2699a02c9fbba534f8.tar.gz |
kill av_mallocz_static() calls in init_rl()
Originally committed as revision 8402 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r-- | libavcodec/mpeg12.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index d0a3885471..a40a65aade 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -108,6 +108,8 @@ static uint8_t mpeg1_index_run[2][64]; 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 @@ void ff_mpeg1_encode_init(MpegEncContext *s) 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 @@ static void init_vlcs(void) 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); |