Mercurial > libavcodec.hg
comparison wnv1.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 | b949a56ecc07 |
comparison
equal
deleted
inserted
replaced
9462:ab2daba3e200 | 9463:d719a2711c64 |
---|---|
127 return buf_size; | 127 return buf_size; |
128 } | 128 } |
129 | 129 |
130 static av_cold int decode_init(AVCodecContext *avctx){ | 130 static av_cold int decode_init(AVCodecContext *avctx){ |
131 WNV1Context * const l = avctx->priv_data; | 131 WNV1Context * const l = avctx->priv_data; |
132 static VLC_TYPE code_table[1 << CODE_VLC_BITS][2]; | |
132 | 133 |
133 l->avctx = avctx; | 134 l->avctx = avctx; |
134 avctx->pix_fmt = PIX_FMT_YUV422P; | 135 avctx->pix_fmt = PIX_FMT_YUV422P; |
135 | 136 |
136 if(!code_vlc.table){ | 137 code_vlc.table = code_table; |
138 code_vlc.table_allocated = 1 << CODE_VLC_BITS; | |
137 init_vlc(&code_vlc, CODE_VLC_BITS, 16, | 139 init_vlc(&code_vlc, CODE_VLC_BITS, 16, |
138 &code_tab[0][1], 4, 2, | 140 &code_tab[0][1], 4, 2, |
139 &code_tab[0][0], 4, 2, INIT_VLC_USE_STATIC); | 141 &code_tab[0][0], 4, 2, INIT_VLC_USE_NEW_STATIC); |
140 } | |
141 | 142 |
142 return 0; | 143 return 0; |
143 } | 144 } |
144 | 145 |
145 AVCodec wnv1_decoder = { | 146 AVCodec wnv1_decoder = { |