Mercurial > libavcodec.hg
comparison intrax8.c @ 8737:eeca2fc122f8 libavcodec
Add av_cold attributes to *_init and *_end functions.
author | alexc |
---|---|
date | Tue, 03 Feb 2009 23:09:00 +0000 |
parents | e9d9d946f213 |
children | 25b3650b4db5 |
comparison
equal
deleted
inserted
replaced
8736:f973fff63599 | 8737:eeca2fc122f8 |
---|---|
40 | 40 |
41 static VLC j_ac_vlc[2][2][8]; //[quant<13],[intra/inter],[select] | 41 static VLC j_ac_vlc[2][2][8]; //[quant<13],[intra/inter],[select] |
42 static VLC j_dc_vlc[2][8]; //[quant], [select] | 42 static VLC j_dc_vlc[2][8]; //[quant], [select] |
43 static VLC j_orient_vlc[2][4]; //[quant], [select] | 43 static VLC j_orient_vlc[2][4]; //[quant], [select] |
44 | 44 |
45 static void x8_vlc_init(void){ | 45 static av_cold void x8_vlc_init(void){ |
46 int i; | 46 int i; |
47 | 47 |
48 #define init_ac_vlc(dst,src) \ | 48 #define init_ac_vlc(dst,src) \ |
49 init_vlc(&dst, \ | 49 init_vlc(&dst, \ |
50 AC_VLC_BITS,77, \ | 50 AC_VLC_BITS,77, \ |
662 * Initialize IntraX8 frame decoder. | 662 * Initialize IntraX8 frame decoder. |
663 * Requires valid MpegEncContext with valid s->mb_width before calling. | 663 * Requires valid MpegEncContext with valid s->mb_width before calling. |
664 * @param w pointer to IntraX8Context | 664 * @param w pointer to IntraX8Context |
665 * @param s pointer to MpegEncContext of the parent codec | 665 * @param s pointer to MpegEncContext of the parent codec |
666 */ | 666 */ |
667 void ff_intrax8_common_init(IntraX8Context * w, MpegEncContext * const s){ | 667 av_cold void ff_intrax8_common_init(IntraX8Context * w, MpegEncContext * const s){ |
668 | 668 |
669 w->s=s; | 669 w->s=s; |
670 x8_vlc_init(); | 670 x8_vlc_init(); |
671 assert(s->mb_width>0); | 671 assert(s->mb_width>0); |
672 w->prediction_table=av_mallocz(s->mb_width*2*2);//two rows, 2 blocks per cannon mb | 672 w->prediction_table=av_mallocz(s->mb_width*2*2);//two rows, 2 blocks per cannon mb |
678 | 678 |
679 /** | 679 /** |
680 * Destroy IntraX8 frame structure. | 680 * Destroy IntraX8 frame structure. |
681 * @param w pointer to IntraX8Context | 681 * @param w pointer to IntraX8Context |
682 */ | 682 */ |
683 void ff_intrax8_common_end(IntraX8Context * w) | 683 av_cold void ff_intrax8_common_end(IntraX8Context * w) |
684 { | 684 { |
685 av_freep(&w->prediction_table); | 685 av_freep(&w->prediction_table); |
686 } | 686 } |
687 | 687 |
688 /** | 688 /** |