comparison indeo2.c @ 9463:d719a2711c64 libavcodec

Use new static VLC scheme in Indeo2, Musepack and WNV1 decoders
author kostya
date Fri, 17 Apr 2009 14:09:56 +0000
parents 0dce4fe6e6f3
children 136334ad62b3
comparison
equal deleted inserted replaced
9462:ab2daba3e200 9463:d719a2711c64
190 return buf_size; 190 return buf_size;
191 } 191 }
192 192
193 static av_cold int ir2_decode_init(AVCodecContext *avctx){ 193 static av_cold int ir2_decode_init(AVCodecContext *avctx){
194 Ir2Context * const ic = avctx->priv_data; 194 Ir2Context * const ic = avctx->priv_data;
195 static VLC_TYPE vlc_tables[1 << CODE_VLC_BITS][2];
195 196
196 ic->avctx = avctx; 197 ic->avctx = avctx;
197 198
198 avctx->pix_fmt= PIX_FMT_YUV410P; 199 avctx->pix_fmt= PIX_FMT_YUV410P;
199 200
200 if (!ir2_vlc.table) 201 ir2_vlc.table = vlc_tables;
202 ir2_vlc.table_allocated = 1 << CODE_VLC_BITS;
201 #ifdef ALT_BITSTREAM_READER_LE 203 #ifdef ALT_BITSTREAM_READER_LE
202 init_vlc(&ir2_vlc, CODE_VLC_BITS, IR2_CODES, 204 init_vlc(&ir2_vlc, CODE_VLC_BITS, IR2_CODES,
203 &ir2_codes[0][1], 4, 2, 205 &ir2_codes[0][1], 4, 2,
204 &ir2_codes[0][0], 4, 2, INIT_VLC_USE_STATIC | INIT_VLC_LE); 206 &ir2_codes[0][0], 4, 2, INIT_VLC_USE_NEW_STATIC | INIT_VLC_LE);
205 #else 207 #else
206 init_vlc(&ir2_vlc, CODE_VLC_BITS, IR2_CODES, 208 init_vlc(&ir2_vlc, CODE_VLC_BITS, IR2_CODES,
207 &ir2_codes[0][1], 4, 2, 209 &ir2_codes[0][1], 4, 2,
208 &ir2_codes[0][0], 4, 2, INIT_VLC_USE_STATIC); 210 &ir2_codes[0][0], 4, 2, INIT_VLC_USE_NEW_STATIC);
209 #endif 211 #endif
210 212
211 return 0; 213 return 0;
212 } 214 }
213 215