Mercurial > libavcodec.hg
comparison asv1.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 | 7fa807dd7958 |
children | ad0c77d2b6ee |
comparison
equal
deleted
inserted
replaced
6516:dbb902bb2347 | 6517:48759bfbd073 |
---|---|
111 static VLC level_vlc; | 111 static VLC level_vlc; |
112 static VLC dc_ccp_vlc; | 112 static VLC dc_ccp_vlc; |
113 static VLC ac_ccp_vlc; | 113 static VLC ac_ccp_vlc; |
114 static VLC asv2_level_vlc; | 114 static VLC asv2_level_vlc; |
115 | 115 |
116 static void init_vlcs(ASV1Context *a){ | 116 static av_cold void init_vlcs(ASV1Context *a){ |
117 static int done = 0; | 117 static int done = 0; |
118 | 118 |
119 if (!done) { | 119 if (!done) { |
120 done = 1; | 120 done = 1; |
121 | 121 |
519 | 519 |
520 return size*4; | 520 return size*4; |
521 } | 521 } |
522 #endif /* CONFIG_ENCODERS */ | 522 #endif /* CONFIG_ENCODERS */ |
523 | 523 |
524 static void common_init(AVCodecContext *avctx){ | 524 static av_cold void common_init(AVCodecContext *avctx){ |
525 ASV1Context * const a = avctx->priv_data; | 525 ASV1Context * const a = avctx->priv_data; |
526 | 526 |
527 dsputil_init(&a->dsp, avctx); | 527 dsputil_init(&a->dsp, avctx); |
528 | 528 |
529 a->mb_width = (avctx->width + 15) / 16; | 529 a->mb_width = (avctx->width + 15) / 16; |
533 | 533 |
534 avctx->coded_frame= (AVFrame*)&a->picture; | 534 avctx->coded_frame= (AVFrame*)&a->picture; |
535 a->avctx= avctx; | 535 a->avctx= avctx; |
536 } | 536 } |
537 | 537 |
538 static int decode_init(AVCodecContext *avctx){ | 538 static av_cold int decode_init(AVCodecContext *avctx){ |
539 ASV1Context * const a = avctx->priv_data; | 539 ASV1Context * const a = avctx->priv_data; |
540 AVFrame *p= (AVFrame*)&a->picture; | 540 AVFrame *p= (AVFrame*)&a->picture; |
541 int i; | 541 int i; |
542 const int scale= avctx->codec_id == CODEC_ID_ASV1 ? 1 : 2; | 542 const int scale= avctx->codec_id == CODEC_ID_ASV1 ? 1 : 2; |
543 | 543 |
568 | 568 |
569 return 0; | 569 return 0; |
570 } | 570 } |
571 | 571 |
572 #ifdef CONFIG_ENCODERS | 572 #ifdef CONFIG_ENCODERS |
573 static int encode_init(AVCodecContext *avctx){ | 573 static av_cold int encode_init(AVCodecContext *avctx){ |
574 ASV1Context * const a = avctx->priv_data; | 574 ASV1Context * const a = avctx->priv_data; |
575 int i; | 575 int i; |
576 const int scale= avctx->codec_id == CODEC_ID_ASV1 ? 1 : 2; | 576 const int scale= avctx->codec_id == CODEC_ID_ASV1 ? 1 : 2; |
577 | 577 |
578 common_init(avctx); | 578 common_init(avctx); |
593 | 593 |
594 return 0; | 594 return 0; |
595 } | 595 } |
596 #endif | 596 #endif |
597 | 597 |
598 static int decode_end(AVCodecContext *avctx){ | 598 static av_cold int decode_end(AVCodecContext *avctx){ |
599 ASV1Context * const a = avctx->priv_data; | 599 ASV1Context * const a = avctx->priv_data; |
600 | 600 |
601 av_freep(&a->bitstream_buffer); | 601 av_freep(&a->bitstream_buffer); |
602 av_freep(&a->picture.qscale_table); | 602 av_freep(&a->picture.qscale_table); |
603 a->bitstream_buffer_size=0; | 603 a->bitstream_buffer_size=0; |