diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-05-30 21:08:41 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-05-30 21:08:41 +0000 |
commit | ceaaf78bb758396657a77811a3c38478843afad0 (patch) | |
tree | 10aa937648a23fe3b5086f8c4e9c2393b6090ab2 /libavcodec/mpegvideo.c | |
parent | 2d80ce2bdf8241ff67e00118ef00d47e7f0dbb5d (diff) | |
download | ffmpeg-ceaaf78bb758396657a77811a3c38478843afad0.tar.gz |
Change init_vlc_rl() so it does not use *alloc_static() anymore.
Originally committed as revision 13567 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpegvideo.c')
-rw-r--r-- | libavcodec/mpegvideo.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 7a2deae72a..2ffb7a247f 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -722,19 +722,10 @@ void init_rl(RLTable *rl, uint8_t static_store[2][2*MAX_RUN + MAX_LEVEL + 3]) } } -void init_vlc_rl(RLTable *rl, int use_static) +void init_vlc_rl(RLTable *rl) { int i, q; - /* Return if static table is already initialized */ - if(use_static && rl->rl_vlc[0]) - return; - - init_vlc(&rl->vlc, 9, rl->n + 1, - &rl->table_vlc[0][1], 4, 2, - &rl->table_vlc[0][0], 4, 2, use_static); - - for(q=0; q<32; q++){ int qmul= q*2; int qadd= (q-1)|1; @@ -743,10 +734,6 @@ void init_vlc_rl(RLTable *rl, int use_static) qmul=1; qadd=0; } - if(use_static) - rl->rl_vlc[q]= av_mallocz_static(rl->vlc.table_size*sizeof(RL_VLC_ELEM)); - else - rl->rl_vlc[q]= av_malloc(rl->vlc.table_size*sizeof(RL_VLC_ELEM)); for(i=0; i<rl->vlc.table_size; i++){ int code= rl->vlc.table[i][0]; int len = rl->vlc.table[i][1]; |