Mercurial > libavcodec.hg
changeset 9007:043574c5c153 libavcodec
Add missing av_cold in static init/close functions.
Patch by Daniel Verkamp daniel at drv dot nu.
author | stefano |
---|---|
date | Sun, 22 Feb 2009 13:48:55 +0000 |
parents | 37ac731fe32c |
children | 251c7a9cb795 |
files | 4xm.c ac3enc.c adpcm.c atrac3.c bfi.c cook.c dvdsub_parser.c huffyuv.c imgconvert.c libamr.c libdiracdec.c libdiracenc.c libfaad.c libschroedingerdec.c libtheoraenc.c libvorbis.c mpeg4video_parser.c mpegaudio_parser.c mpegaudiodec.c mpegvideo.c msmpeg4.c qdm2.c roqaudioenc.c svq3.c vp3.c |
diffstat | 25 files changed, 60 insertions(+), 60 deletions(-) [+] |
line wrap: on
line diff
--- a/4xm.c Sun Feb 22 11:35:32 2009 +0000 +++ b/4xm.c Sun Feb 22 13:48:55 2009 +0000 @@ -785,7 +785,7 @@ } -static void common_init(AVCodecContext *avctx){ +static av_cold void common_init(AVCodecContext *avctx){ FourXContext * const f = avctx->priv_data; dsputil_init(&f->dsp, avctx);
--- a/ac3enc.c Sun Feb 22 11:35:32 2009 +0000 +++ b/ac3enc.c Sun Feb 22 13:48:55 2009 +0000 @@ -88,7 +88,7 @@ short re,im; } IComplex; -static void fft_init(int ln) +static av_cold void fft_init(int ln) { int i, n; float alpha;
--- a/adpcm.c Sun Feb 22 11:35:32 2009 +0000 +++ b/adpcm.c Sun Feb 22 13:48:55 2009 +0000 @@ -149,7 +149,7 @@ /* XXX: implement encoding */ #if CONFIG_ENCODERS -static int adpcm_encode_init(AVCodecContext *avctx) +static av_cold int adpcm_encode_init(AVCodecContext *avctx) { if (avctx->channels > 2) return -1; /* only stereo or mono =) */ @@ -199,7 +199,7 @@ return 0; } -static int adpcm_encode_close(AVCodecContext *avctx) +static av_cold int adpcm_encode_close(AVCodecContext *avctx) { av_freep(&avctx->coded_frame);
--- a/atrac3.c Sun Feb 22 11:35:32 2009 +0000 +++ b/atrac3.c Sun Feb 22 13:48:55 2009 +0000 @@ -244,7 +244,7 @@ } -static void init_atrac3_transforms(ATRAC3Context *q) { +static av_cold void init_atrac3_transforms(ATRAC3Context *q) { float enc_window[256]; float s; int i; @@ -275,7 +275,7 @@ * Atrac3 uninit, free all allocated memory */ -static int atrac3_decode_close(AVCodecContext *avctx) +static av_cold int atrac3_decode_close(AVCodecContext *avctx) { ATRAC3Context *q = avctx->priv_data; @@ -926,7 +926,7 @@ * @param avctx pointer to the AVCodecContext */ -static int atrac3_decode_init(AVCodecContext *avctx) +static av_cold int atrac3_decode_init(AVCodecContext *avctx) { int i; const uint8_t *edata_ptr = avctx->extradata;
--- a/bfi.c Sun Feb 22 11:35:32 2009 +0000 +++ b/bfi.c Sun Feb 22 13:48:55 2009 +0000 @@ -36,7 +36,7 @@ uint8_t *dst; } BFIContext; -static int bfi_decode_init(AVCodecContext * avctx) +static av_cold int bfi_decode_init(AVCodecContext * avctx) { BFIContext *bfi = avctx->priv_data; avctx->pix_fmt = PIX_FMT_PAL8; @@ -161,7 +161,7 @@ return buf_size; } -static int bfi_decode_close(AVCodecContext * avctx) +static av_cold int bfi_decode_close(AVCodecContext * avctx) { BFIContext *bfi = avctx->priv_data; if (bfi->frame.data[0])
--- a/cook.c Sun Feb 22 11:35:32 2009 +0000 +++ b/cook.c Sun Feb 22 13:48:55 2009 +0000 @@ -183,7 +183,7 @@ /*************** init functions ***************/ /* table generator */ -static void init_pow2table(void){ +static av_cold void init_pow2table(void){ int i; for (i=-63 ; i<64 ; i++){ pow2tab[63+i]= pow(2, i); @@ -192,7 +192,7 @@ } /* table generator */ -static void init_gain_table(COOKContext *q) { +static av_cold void init_gain_table(COOKContext *q) { int i; q->gain_size_factor = q->samples_per_channel/8; for (i=0 ; i<23 ; i++) { @@ -202,7 +202,7 @@ } -static int init_cook_vlc_tables(COOKContext *q) { +static av_cold int init_cook_vlc_tables(COOKContext *q) { int i, result; result = 0; @@ -229,7 +229,7 @@ return result; } -static int init_cook_mlt(COOKContext *q) { +static av_cold int init_cook_mlt(COOKContext *q) { int j; int mlt_size = q->samples_per_channel; @@ -258,7 +258,7 @@ return ptr; } -static void init_cplscales_table (COOKContext *q) { +static av_cold void init_cplscales_table (COOKContext *q) { int i; for (i=0;i<5;i++) q->cplscales[i] = maybe_reformat_buffer32 (q, cplscales[i], (1<<(i+2))-1); @@ -314,7 +314,7 @@ * Cook uninit */ -static int cook_decode_close(AVCodecContext *avctx) +static av_cold int cook_decode_close(AVCodecContext *avctx) { int i; COOKContext *q = avctx->priv_data;
--- a/dvdsub_parser.c Sun Feb 22 11:35:32 2009 +0000 +++ b/dvdsub_parser.c Sun Feb 22 13:48:55 2009 +0000 @@ -29,7 +29,7 @@ int packet_index; } DVDSubParseContext; -static int dvdsub_parse_init(AVCodecParserContext *s) +static av_cold int dvdsub_parse_init(AVCodecParserContext *s) { return 0; } @@ -70,7 +70,7 @@ return buf_size; } -static void dvdsub_parse_close(AVCodecParserContext *s) +static av_cold void dvdsub_parse_close(AVCodecParserContext *s) { DVDSubParseContext *pc = s->priv_data; av_freep(&pc->packet);
--- a/huffyuv.c Sun Feb 22 11:35:32 2009 +0000 +++ b/huffyuv.c Sun Feb 22 13:48:55 2009 +0000 @@ -431,7 +431,7 @@ #endif } -static void alloc_temp(HYuvContext *s){ +static av_cold void alloc_temp(HYuvContext *s){ int i; if(s->bitstream_bpp<24){ @@ -445,7 +445,7 @@ } } -static int common_init(AVCodecContext *avctx){ +static av_cold int common_init(AVCodecContext *avctx){ HYuvContext *s = avctx->priv_data; s->avctx= avctx;
--- a/imgconvert.c Sun Feb 22 11:35:32 2009 +0000 +++ b/imgconvert.c Sun Feb 22 13:48:55 2009 +0000 @@ -2170,7 +2170,7 @@ static uint8_t c_jpeg_to_ccir[256]; /* init various conversion tables */ -static void img_convert_init(void) +static av_cold void img_convert_init(void) { int i; uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
--- a/libamr.c Sun Feb 22 11:35:32 2009 +0000 +++ b/libamr.c Sun Feb 22 13:48:55 2009 +0000 @@ -156,7 +156,7 @@ enum TXFrameType tx_frametype; } AMRContext; -static int amr_nb_decode_init(AVCodecContext * avctx) +static av_cold int amr_nb_decode_init(AVCodecContext * avctx) { AMRContext *s = avctx->priv_data; @@ -184,7 +184,7 @@ return 0; } -static int amr_nb_encode_init(AVCodecContext * avctx) +static av_cold int amr_nb_encode_init(AVCodecContext * avctx) { AMRContext *s = avctx->priv_data; @@ -225,7 +225,7 @@ return 0; } -static int amr_nb_encode_close(AVCodecContext * avctx) +static av_cold int amr_nb_encode_close(AVCodecContext * avctx) { AMRContext *s = avctx->priv_data; @@ -235,7 +235,7 @@ return 0; } -static int amr_nb_decode_close(AVCodecContext * avctx) +static av_cold int amr_nb_decode_close(AVCodecContext * avctx) { AMRContext *s = avctx->priv_data; @@ -362,7 +362,7 @@ int enc_bitrate; } AMRContext; -static int amr_nb_decode_init(AVCodecContext * avctx) +static av_cold int amr_nb_decode_init(AVCodecContext * avctx) { AMRContext *s = avctx->priv_data; @@ -385,7 +385,7 @@ return 0; } -static int amr_nb_encode_init(AVCodecContext * avctx) +static av_cold int amr_nb_encode_init(AVCodecContext * avctx) { AMRContext *s = avctx->priv_data; @@ -422,7 +422,7 @@ return 0; } -static int amr_nb_decode_close(AVCodecContext * avctx) +static av_cold int amr_nb_decode_close(AVCodecContext * avctx) { AMRContext *s = avctx->priv_data; @@ -430,7 +430,7 @@ return 0; } -static int amr_nb_encode_close(AVCodecContext * avctx) +static av_cold int amr_nb_encode_close(AVCodecContext * avctx) { AMRContext *s = avctx->priv_data;
--- a/libdiracdec.c Sun Feb 22 11:35:32 2009 +0000 +++ b/libdiracdec.c Sun Feb 22 13:48:55 2009 +0000 @@ -63,7 +63,7 @@ return PIX_FMT_NONE; } -static int libdirac_decode_init(AVCodecContext *avccontext) +static av_cold int libdirac_decode_init(AVCodecContext *avccontext) { FfmpegDiracDecoderParams *p_dirac_params = avccontext->priv_data ; @@ -174,7 +174,7 @@ } -static int libdirac_decode_close(AVCodecContext *avccontext) +static av_cold int libdirac_decode_close(AVCodecContext *avccontext) { FfmpegDiracDecoderParams *p_dirac_params = avccontext->priv_data; dirac_decoder_close (p_dirac_params->p_decoder);
--- a/libdiracenc.c Sun Feb 22 11:35:32 2009 +0000 +++ b/libdiracenc.c Sun Feb 22 13:48:55 2009 +0000 @@ -127,7 +127,7 @@ ff_dirac_video_formats[idx] : VIDEO_FORMAT_CUSTOM; } -static int libdirac_encode_init(AVCodecContext *avccontext) +static av_cold int libdirac_encode_init(AVCodecContext *avccontext) { FfmpegDiracEncoderParams* p_dirac_params = avccontext->priv_data; @@ -386,7 +386,7 @@ return enc_size; } -static int libdirac_encode_close(AVCodecContext *avccontext) +static av_cold int libdirac_encode_close(AVCodecContext *avccontext) { FfmpegDiracEncoderParams* p_dirac_params = avccontext->priv_data;
--- a/libfaad.c Sun Feb 22 11:35:32 2009 +0000 +++ b/libfaad.c Sun Feb 22 13:48:55 2009 +0000 @@ -117,7 +117,7 @@ #endif } -static int faac_init_mp4(AVCodecContext *avctx) +static av_cold int faac_init_mp4(AVCodecContext *avctx) { FAACContext *s = avctx->priv_data; unsigned long samplerate;
--- a/libschroedingerdec.c Sun Feb 22 11:35:32 2009 +0000 +++ b/libschroedingerdec.c Sun Feb 22 13:48:55 2009 +0000 @@ -135,7 +135,7 @@ return PIX_FMT_NONE; } -static int libschroedinger_decode_init(AVCodecContext *avccontext) +static av_cold int libschroedinger_decode_init(AVCodecContext *avccontext) { FfmpegSchroDecoderParams *p_schro_params = avccontext->priv_data ; @@ -325,7 +325,7 @@ } -static int libschroedinger_decode_close(AVCodecContext *avccontext) +static av_cold int libschroedinger_decode_close(AVCodecContext *avccontext) { FfmpegSchroDecoderParams *p_schro_params = avccontext->priv_data; /* Free the decoder. */
--- a/libtheoraenc.c Sun Feb 22 11:35:32 2009 +0000 +++ b/libtheoraenc.c Sun Feb 22 13:48:55 2009 +0000 @@ -77,7 +77,7 @@ return 0; } -static int encode_init(AVCodecContext* avc_context) +static av_cold int encode_init(AVCodecContext* avc_context) { theora_info t_info; theora_comment t_comment; @@ -240,7 +240,7 @@ return o_packet.bytes; } -static int encode_close(AVCodecContext* avc_context) +static av_cold int encode_close(AVCodecContext* avc_context) { ogg_packet o_packet; TheoraContext *h = avc_context->priv_data;
--- a/libvorbis.c Sun Feb 22 11:35:32 2009 +0000 +++ b/libvorbis.c Sun Feb 22 13:48:55 2009 +0000 @@ -50,7 +50,7 @@ } OggVorbisContext ; -static int oggvorbis_init_encoder(vorbis_info *vi, AVCodecContext *avccontext) { +static av_cold int oggvorbis_init_encoder(vorbis_info *vi, AVCodecContext *avccontext) { double cfreq; if(avccontext->flags & CODEC_FLAG_QSCALE) {
--- a/mpeg4video_parser.c Sun Feb 22 11:35:32 2009 +0000 +++ b/mpeg4video_parser.c Sun Feb 22 13:48:55 2009 +0000 @@ -90,7 +90,7 @@ return ret; } -static int mpeg4video_parse_init(AVCodecParserContext *s) +static av_cold int mpeg4video_parse_init(AVCodecParserContext *s) { ParseContext1 *pc = s->priv_data;
--- a/mpegaudio_parser.c Sun Feb 22 11:35:32 2009 +0000 +++ b/mpegaudio_parser.c Sun Feb 22 13:48:55 2009 +0000 @@ -81,7 +81,7 @@ return s->frame_size; } -static int mpegaudio_parse_init(AVCodecParserContext *s1) +static av_cold int mpegaudio_parse_init(AVCodecParserContext *s1) { MpegAudioParseContext *s = s1->priv_data; s->inbuf_ptr = s->inbuf;
--- a/mpegaudiodec.c Sun Feb 22 11:35:32 2009 +0000 +++ b/mpegaudiodec.c Sun Feb 22 13:48:55 2009 +0000 @@ -250,7 +250,7 @@ }; #endif -static void int_pow_init(void) +static av_cold void int_pow_init(void) { int i, a; @@ -308,7 +308,7 @@ } #endif -static int decode_init(AVCodecContext * avctx) +static av_cold int decode_init(AVCodecContext * avctx) { MPADecodeContext *s = avctx->priv_data; static int init=0; @@ -829,7 +829,7 @@ op2(sum2, (w2)[7 * 64], tmp);\ } -void ff_mpa_synth_init(MPA_INT *window) +void av_cold ff_mpa_synth_init(MPA_INT *window) { int i; @@ -2444,7 +2444,7 @@ } -static int decode_close_mp3on4(AVCodecContext * avctx) +static av_cold int decode_close_mp3on4(AVCodecContext * avctx) { MP3On4DecodeContext *s = avctx->priv_data; int i;
--- a/mpegvideo.c Sun Feb 22 11:35:32 2009 +0000 +++ b/mpegvideo.c Sun Feb 22 13:48:55 2009 +0000 @@ -107,7 +107,7 @@ } /* init common dct for both encoder and decoder */ -int ff_dct_common_init(MpegEncContext *s) +av_cold int ff_dct_common_init(MpegEncContext *s) { s->dct_unquantize_h263_intra = dct_unquantize_h263_intra_c; s->dct_unquantize_h263_inter = dct_unquantize_h263_inter_c; @@ -396,7 +396,7 @@ * init common structure for both encoder and decoder. * this assumes that some variables like width/height are already set */ -int MPV_common_init(MpegEncContext *s) +av_cold int MPV_common_init(MpegEncContext *s) { int y_size, c_size, yc_size, i, mb_array_size, mv_table_size, x, y, threads;
--- a/msmpeg4.c Sun Feb 22 11:35:32 2009 +0000 +++ b/msmpeg4.c Sun Feb 22 13:48:55 2009 +0000 @@ -85,7 +85,7 @@ static uint8_t static_rl_table_store[NB_RL_TABLES][2][2*MAX_RUN + MAX_LEVEL + 3]; -static void common_init(MpegEncContext * s) +static av_cold void common_init(MpegEncContext * s) { static int initialized=0; @@ -163,7 +163,7 @@ } } -void ff_msmpeg4_encode_init(MpegEncContext *s) +av_cold void ff_msmpeg4_encode_init(MpegEncContext *s) { static int init_done=0; int i; @@ -995,7 +995,7 @@ /* This table is practically identical to the one from h263 * except that it is inverted. */ -static void init_h263_dc_for_msmpeg4(void) +static av_cold void init_h263_dc_for_msmpeg4(void) { int level, uni_code, uni_len; @@ -1050,7 +1050,7 @@ } /* init all vlc decoding tables */ -int ff_msmpeg4_decode_init(MpegEncContext *s) +av_cold int ff_msmpeg4_decode_init(MpegEncContext *s) { static int done = 0; int i;
--- a/qdm2.c Sun Feb 22 11:35:32 2009 +0000 +++ b/qdm2.c Sun Feb 22 13:48:55 2009 +0000 @@ -222,7 +222,7 @@ static DECLARE_ALIGNED_16(MPA_INT, mpa_window[512]); -static void softclip_table_init(void) { +static av_cold void softclip_table_init(void) { int i; double dfl = SOFTCLIP_THRESHOLD - 32767; float delta = 1.0 / -dfl; @@ -232,7 +232,7 @@ // random generated table -static void rnd_table_init(void) { +static av_cold void rnd_table_init(void) { int i,j; uint32_t ldw,hdw; uint64_t tmp64_1; @@ -268,7 +268,7 @@ } -static void init_noise_samples(void) { +static av_cold void init_noise_samples(void) { int i; int random_seed = 0; float delta = 1.0 / 16384.0; @@ -279,7 +279,7 @@ } -static void qdm2_init_vlc(void) +static av_cold void qdm2_init_vlc(void) { init_vlc (&vlc_tab_level, 8, 24, vlc_tab_level_huffbits, 1, 1, @@ -1660,7 +1660,7 @@ * * @param q context */ -static void qdm2_init(QDM2Context *q) { +static av_cold void qdm2_init(QDM2Context *q) { static int initialized = 0; if (initialized != 0) @@ -1726,7 +1726,7 @@ /** * Init parameters from codec extradata */ -static int qdm2_decode_init(AVCodecContext *avctx) +static av_cold int qdm2_decode_init(AVCodecContext *avctx) { QDM2Context *s = avctx->priv_data; uint8_t *extradata; @@ -1896,7 +1896,7 @@ } -static int qdm2_decode_close(AVCodecContext *avctx) +static av_cold int qdm2_decode_close(AVCodecContext *avctx) { QDM2Context *s = avctx->priv_data;
--- a/roqaudioenc.c Sun Feb 22 11:35:32 2009 +0000 +++ b/roqaudioenc.c Sun Feb 22 13:48:55 2009 +0000 @@ -49,7 +49,7 @@ } } -static int roq_dpcm_encode_init(AVCodecContext *avctx) +static av_cold int roq_dpcm_encode_init(AVCodecContext *avctx) { ROQDPCMContext *context = avctx->priv_data;
--- a/svq3.c Sun Feb 22 11:35:32 2009 +0000 +++ b/svq3.c Sun Feb 22 13:48:55 2009 +0000 @@ -775,7 +775,7 @@ return 0; } -static int svq3_decode_init(AVCodecContext *avctx) +static av_cold int svq3_decode_init(AVCodecContext *avctx) { MpegEncContext *const s = avctx->priv_data; H264Context *const h = avctx->priv_data;