comparison ffv1.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 5d82b4e8a7f3
children f282270c589f
comparison
equal deleted inserted replaced
6516:dbb902bb2347 6517:48759bfbd073
528 for(i=0; i<5; i++) 528 for(i=0; i<5; i++)
529 write_quant_table(c, f->quant_table[i]); 529 write_quant_table(c, f->quant_table[i]);
530 } 530 }
531 #endif /* CONFIG_ENCODERS */ 531 #endif /* CONFIG_ENCODERS */
532 532
533 static int common_init(AVCodecContext *avctx){ 533 static av_cold int common_init(AVCodecContext *avctx){
534 FFV1Context *s = avctx->priv_data; 534 FFV1Context *s = avctx->priv_data;
535 int width, height; 535 int width, height;
536 536
537 s->avctx= avctx; 537 s->avctx= avctx;
538 s->flags= avctx->flags; 538 s->flags= avctx->flags;
546 546
547 return 0; 547 return 0;
548 } 548 }
549 549
550 #ifdef CONFIG_ENCODERS 550 #ifdef CONFIG_ENCODERS
551 static int encode_init(AVCodecContext *avctx) 551 static av_cold int encode_init(AVCodecContext *avctx)
552 { 552 {
553 FFV1Context *s = avctx->priv_data; 553 FFV1Context *s = avctx->priv_data;
554 int i; 554 int i;
555 555
556 common_init(avctx); 556 common_init(avctx);
692 return used_count + (put_bits_count(&f->pb)+7)/8; 692 return used_count + (put_bits_count(&f->pb)+7)/8;
693 } 693 }
694 } 694 }
695 #endif /* CONFIG_ENCODERS */ 695 #endif /* CONFIG_ENCODERS */
696 696
697 static int common_end(AVCodecContext *avctx){ 697 static av_cold int common_end(AVCodecContext *avctx){
698 FFV1Context *s = avctx->priv_data; 698 FFV1Context *s = avctx->priv_data;
699 int i; 699 int i;
700 700
701 for(i=0; i<s->plane_count; i++){ 701 for(i=0; i<s->plane_count; i++){
702 PlaneContext *p= &s->plane[i]; 702 PlaneContext *p= &s->plane[i];
925 } 925 }
926 926
927 return 0; 927 return 0;
928 } 928 }
929 929
930 static int decode_init(AVCodecContext *avctx) 930 static av_cold int decode_init(AVCodecContext *avctx)
931 { 931 {
932 // FFV1Context *s = avctx->priv_data; 932 // FFV1Context *s = avctx->priv_data;
933 933
934 common_init(avctx); 934 common_init(avctx);
935 935