Mercurial > libavcodec.hg
comparison h261dec.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 | 01647ac078a7 |
comparison
equal
deleted
inserted
replaced
6516:dbb902bb2347 | 6517:48759bfbd073 |
---|---|
46 static VLC h261_mv_vlc; | 46 static VLC h261_mv_vlc; |
47 static VLC h261_cbp_vlc; | 47 static VLC h261_cbp_vlc; |
48 | 48 |
49 static int h261_decode_block(H261Context * h, DCTELEM * block, int n, int coded); | 49 static int h261_decode_block(H261Context * h, DCTELEM * block, int n, int coded); |
50 | 50 |
51 static void h261_decode_init_vlc(H261Context *h){ | 51 static av_cold void h261_decode_init_vlc(H261Context *h){ |
52 static int done = 0; | 52 static int done = 0; |
53 | 53 |
54 if(!done){ | 54 if(!done){ |
55 done = 1; | 55 done = 1; |
56 init_vlc(&h261_mba_vlc, H261_MBA_VLC_BITS, 35, | 56 init_vlc(&h261_mba_vlc, H261_MBA_VLC_BITS, 35, |
68 init_rl(&h261_rl_tcoeff, ff_h261_rl_table_store); | 68 init_rl(&h261_rl_tcoeff, ff_h261_rl_table_store); |
69 init_vlc_rl(&h261_rl_tcoeff, 1); | 69 init_vlc_rl(&h261_rl_tcoeff, 1); |
70 } | 70 } |
71 } | 71 } |
72 | 72 |
73 static int h261_decode_init(AVCodecContext *avctx){ | 73 static av_cold int h261_decode_init(AVCodecContext *avctx){ |
74 H261Context *h= avctx->priv_data; | 74 H261Context *h= avctx->priv_data; |
75 MpegEncContext * const s = &h->s; | 75 MpegEncContext * const s = &h->s; |
76 | 76 |
77 // set defaults | 77 // set defaults |
78 MPV_decode_defaults(s); | 78 MPV_decode_defaults(s); |
626 *data_size = sizeof(AVFrame); | 626 *data_size = sizeof(AVFrame); |
627 | 627 |
628 return get_consumed_bytes(s, buf_size); | 628 return get_consumed_bytes(s, buf_size); |
629 } | 629 } |
630 | 630 |
631 static int h261_decode_end(AVCodecContext *avctx) | 631 static av_cold int h261_decode_end(AVCodecContext *avctx) |
632 { | 632 { |
633 H261Context *h= avctx->priv_data; | 633 H261Context *h= avctx->priv_data; |
634 MpegEncContext *s = &h->s; | 634 MpegEncContext *s = &h->s; |
635 | 635 |
636 MPV_common_end(s); | 636 MPV_common_end(s); |