Mercurial > libavcodec.hg
comparison mdec.c @ 6517:48759bfbd073 libavcodec
Apply 'cold' attribute to init/uninit functions in libavcodec
author | zuxy |
---|---|
date | Fri, 21 Mar 2008 03:11:20 +0000 |
parents | 493dc59d469a |
children | ad0c77d2b6ee |
comparison
equal
deleted
inserted
replaced
6516:dbb902bb2347 | 6517:48759bfbd073 |
---|---|
213 emms_c(); | 213 emms_c(); |
214 | 214 |
215 return (get_bits_count(&a->gb)+31)/32*4; | 215 return (get_bits_count(&a->gb)+31)/32*4; |
216 } | 216 } |
217 | 217 |
218 static void mdec_common_init(AVCodecContext *avctx){ | 218 static av_cold void mdec_common_init(AVCodecContext *avctx){ |
219 MDECContext * const a = avctx->priv_data; | 219 MDECContext * const a = avctx->priv_data; |
220 | 220 |
221 dsputil_init(&a->dsp, avctx); | 221 dsputil_init(&a->dsp, avctx); |
222 | 222 |
223 a->mb_width = (avctx->coded_width + 15) / 16; | 223 a->mb_width = (avctx->coded_width + 15) / 16; |
225 | 225 |
226 avctx->coded_frame= (AVFrame*)&a->picture; | 226 avctx->coded_frame= (AVFrame*)&a->picture; |
227 a->avctx= avctx; | 227 a->avctx= avctx; |
228 } | 228 } |
229 | 229 |
230 static int decode_init(AVCodecContext *avctx){ | 230 static av_cold int decode_init(AVCodecContext *avctx){ |
231 MDECContext * const a = avctx->priv_data; | 231 MDECContext * const a = avctx->priv_data; |
232 AVFrame *p= (AVFrame*)&a->picture; | 232 AVFrame *p= (AVFrame*)&a->picture; |
233 | 233 |
234 mdec_common_init(avctx); | 234 mdec_common_init(avctx); |
235 init_vlcs(); | 235 init_vlcs(); |
245 avctx->pix_fmt= PIX_FMT_YUV420P; | 245 avctx->pix_fmt= PIX_FMT_YUV420P; |
246 | 246 |
247 return 0; | 247 return 0; |
248 } | 248 } |
249 | 249 |
250 static int decode_end(AVCodecContext *avctx){ | 250 static av_cold int decode_end(AVCodecContext *avctx){ |
251 MDECContext * const a = avctx->priv_data; | 251 MDECContext * const a = avctx->priv_data; |
252 | 252 |
253 av_freep(&a->bitstream_buffer); | 253 av_freep(&a->bitstream_buffer); |
254 av_freep(&a->picture.qscale_table); | 254 av_freep(&a->picture.qscale_table); |
255 a->bitstream_buffer_size=0; | 255 a->bitstream_buffer_size=0; |