summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuxy Meng <zuxy.meng@gmail.com>2008-03-21 03:11:20 +0000
committerZuxy Meng <zuxy.meng@gmail.com>2008-03-21 03:11:20 +0000
commit98a6fff98c3f2e963783e52fb193529bdc14e040 (patch)
treed950fcf03110d5716c0d348f0ffbbc5f459b71aa
parent77ab59eb7ff28d8183ea51c5a46aab3b430edd9c (diff)
downloadffmpeg-98a6fff98c3f2e963783e52fb193529bdc14e040.tar.gz
Apply 'cold' attribute to init/uninit functions in libavcodec
Originally committed as revision 12525 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/4xm.c6
-rw-r--r--libavcodec/8bps.c4
-rw-r--r--libavcodec/aac_parser.c2
-rw-r--r--libavcodec/aasc.c4
-rw-r--r--libavcodec/ac3.c2
-rw-r--r--libavcodec/ac3_parser.c2
-rw-r--r--libavcodec/ac3dec.c6
-rw-r--r--libavcodec/ac3enc.c4
-rw-r--r--libavcodec/adpcm.c2
-rw-r--r--libavcodec/adxenc.c4
-rw-r--r--libavcodec/alac.c4
-rw-r--r--libavcodec/apedec.c4
-rw-r--r--libavcodec/asv1.c10
-rw-r--r--libavcodec/avs.c2
-rw-r--r--libavcodec/bethsoftvideo.c4
-rw-r--r--libavcodec/bmp.c4
-rw-r--r--libavcodec/bmpenc.c2
-rw-r--r--libavcodec/c93.c4
-rw-r--r--libavcodec/cavs.c4
-rw-r--r--libavcodec/cinepak.c4
-rw-r--r--libavcodec/cljr.c6
-rw-r--r--libavcodec/cscd.c4
-rw-r--r--libavcodec/cyuv.c4
-rw-r--r--libavcodec/dca.c6
-rw-r--r--libavcodec/dca_parser.c2
-rw-r--r--libavcodec/dnxhddec.c4
-rw-r--r--libavcodec/dpcm.c2
-rw-r--r--libavcodec/dsicinav.c6
-rw-r--r--libavcodec/dv.c2
-rw-r--r--libavcodec/dvbsub_parser.c4
-rw-r--r--libavcodec/dvbsubdec.c4
-rw-r--r--libavcodec/dxa.c4
-rw-r--r--libavcodec/ffv1.c8
-rw-r--r--libavcodec/flac.c4
-rw-r--r--libavcodec/flacenc.c4
-rw-r--r--libavcodec/flashsv.c4
-rw-r--r--libavcodec/flashsvenc.c4
-rw-r--r--libavcodec/flicvideo.c4
-rw-r--r--libavcodec/fraps.c4
-rw-r--r--libavcodec/g726.c6
-rw-r--r--libavcodec/gif.c2
-rw-r--r--libavcodec/gifdec.c4
-rw-r--r--libavcodec/h261dec.c6
-rw-r--r--libavcodec/h263dec.c4
-rw-r--r--libavcodec/h264.c8
-rw-r--r--libavcodec/huffyuv.c8
-rw-r--r--libavcodec/idcinvideo.c6
-rw-r--r--libavcodec/imc.c4
-rw-r--r--libavcodec/indeo2.c2
-rw-r--r--libavcodec/indeo3.c10
-rw-r--r--libavcodec/interplayvideo.c4
-rw-r--r--libavcodec/jpeglsenc.c2
-rw-r--r--libavcodec/kmvc.c4
-rw-r--r--libavcodec/lcldec.c4
-rw-r--r--libavcodec/lclenc.c4
-rw-r--r--libavcodec/liba52.c4
-rw-r--r--libavcodec/libfaac.c4
-rw-r--r--libavcodec/libfaad.c4
-rw-r--r--libavcodec/libgsm.c4
-rw-r--r--libavcodec/libmp3lame.c4
-rw-r--r--libavcodec/libvorbis.c4
-rw-r--r--libavcodec/libx264.c4
-rw-r--r--libavcodec/libxvidff.c4
-rw-r--r--libavcodec/loco.c2
-rw-r--r--libavcodec/lzw.c4
-rw-r--r--libavcodec/mace.c2
-rw-r--r--libavcodec/mdec.c6
-rw-r--r--libavcodec/mimic.c4
-rw-r--r--libavcodec/mjpegdec.c4
-rw-r--r--libavcodec/mjpegenc.c2
-rw-r--r--libavcodec/mmvideo.c4
-rw-r--r--libavcodec/mpc7.c2
-rw-r--r--libavcodec/mpc8.c2
-rw-r--r--libavcodec/mpeg12.c4
-rw-r--r--libavcodec/mpeg12enc.c2
-rw-r--r--libavcodec/mpegaudioenc.c4
-rw-r--r--libavcodec/mpegvideo_enc.c4
-rw-r--r--libavcodec/msrle.c4
-rw-r--r--libavcodec/msvideo1.c4
-rw-r--r--libavcodec/nellymoserdec.c4
-rw-r--r--libavcodec/nuv.c4
-rw-r--r--libavcodec/pcm.c12
-rw-r--r--libavcodec/pcx.c4
-rw-r--r--libavcodec/pngdec.c2
-rw-r--r--libavcodec/pngenc.c2
-rw-r--r--libavcodec/pnmenc.c2
-rw-r--r--libavcodec/ptx.c4
-rw-r--r--libavcodec/qdrw.c2
-rw-r--r--libavcodec/qpeg.c4
-rw-r--r--libavcodec/qtrle.c4
-rw-r--r--libavcodec/qtrleenc.c4
-rw-r--r--libavcodec/rawdec.c4
-rw-r--r--libavcodec/rawenc.c2
-rw-r--r--libavcodec/roqaudioenc.c4
-rw-r--r--libavcodec/roqvideodec.c4
-rw-r--r--libavcodec/rpza.c4
-rw-r--r--libavcodec/rv10.c4
-rw-r--r--libavcodec/rv30.c2
-rw-r--r--libavcodec/rv34.c6
-rw-r--r--libavcodec/rv40.c4
-rw-r--r--libavcodec/sgidec.c4
-rw-r--r--libavcodec/sgienc.c2
-rw-r--r--libavcodec/shorten.c4
-rw-r--r--libavcodec/smacker.c6
-rw-r--r--libavcodec/smc.c4
-rw-r--r--libavcodec/snow.c12
-rw-r--r--libavcodec/sonic.c8
-rw-r--r--libavcodec/sunrast.c4
-rw-r--r--libavcodec/svq1dec.c4
-rw-r--r--libavcodec/svq1enc.c4
-rw-r--r--libavcodec/targa.c4
-rw-r--r--libavcodec/targaenc.c2
-rw-r--r--libavcodec/tiertexseqv.c4
-rw-r--r--libavcodec/tiff.c4
-rw-r--r--libavcodec/truemotion1.c4
-rw-r--r--libavcodec/truemotion2.c4
-rw-r--r--libavcodec/truespeech.c2
-rw-r--r--libavcodec/tscc.c4
-rw-r--r--libavcodec/tta.c4
-rw-r--r--libavcodec/txd.c4
-rw-r--r--libavcodec/ulti.c4
-rw-r--r--libavcodec/vb.c4
-rw-r--r--libavcodec/vc1.c4
-rw-r--r--libavcodec/vcr1.c6
-rw-r--r--libavcodec/vmdav.c6
-rw-r--r--libavcodec/vmnc.c4
-rw-r--r--libavcodec/vorbis_dec.c4
-rw-r--r--libavcodec/vorbis_enc.c4
-rw-r--r--libavcodec/vp3.c4
-rw-r--r--libavcodec/vp5.c2
-rw-r--r--libavcodec/vp56.c4
-rw-r--r--libavcodec/vp6.c2
-rw-r--r--libavcodec/vqavideo.c4
-rw-r--r--libavcodec/wavpack.c2
-rw-r--r--libavcodec/wmv2.c2
-rw-r--r--libavcodec/wmv2dec.c4
-rw-r--r--libavcodec/wmv2enc.c4
-rw-r--r--libavcodec/wnv1.c2
-rw-r--r--libavcodec/ws-snd1.c2
-rw-r--r--libavcodec/xan.c4
-rw-r--r--libavcodec/xl.c2
-rw-r--r--libavcodec/xsubdec.c2
-rw-r--r--libavcodec/zmbv.c4
-rw-r--r--libavcodec/zmbvenc.c4
-rw-r--r--libavutil/common.h8
145 files changed, 296 insertions, 288 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 13cd66fb85..71954d8c18 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -235,7 +235,7 @@ static void idct(DCTELEM block[64]){
}
}
-static void init_vlcs(FourXContext *f){
+static av_cold void init_vlcs(FourXContext *f){
int i;
for(i=0; i<8; i++){
@@ -792,7 +792,7 @@ static void common_init(AVCodecContext *avctx){
f->avctx= avctx;
}
-static int decode_init(AVCodecContext *avctx){
+static av_cold int decode_init(AVCodecContext *avctx){
FourXContext * const f = avctx->priv_data;
if(avctx->extradata_size != 4 || !avctx->extradata) {
@@ -811,7 +811,7 @@ static int decode_init(AVCodecContext *avctx){
}
-static int decode_end(AVCodecContext *avctx){
+static av_cold int decode_end(AVCodecContext *avctx){
FourXContext * const f = avctx->priv_data;
int i;
diff --git a/libavcodec/8bps.c b/libavcodec/8bps.c
index 23883457dd..57c4ec1939 100644
--- a/libavcodec/8bps.c
+++ b/libavcodec/8bps.c
@@ -148,7 +148,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const
* Init 8BPS decoder
*
*/
-static int decode_init(AVCodecContext *avctx)
+static av_cold int decode_init(AVCodecContext *avctx)
{
EightBpsContext * const c = avctx->priv_data;
@@ -208,7 +208,7 @@ static int decode_init(AVCodecContext *avctx)
* Uninit 8BPS decoder
*
*/
-static int decode_end(AVCodecContext *avctx)
+static av_cold int decode_end(AVCodecContext *avctx)
{
EightBpsContext * const c = avctx->priv_data;
diff --git a/libavcodec/aac_parser.c b/libavcodec/aac_parser.c
index ac806931ec..ac129c23b2 100644
--- a/libavcodec/aac_parser.c
+++ b/libavcodec/aac_parser.c
@@ -81,7 +81,7 @@ static int aac_sync(const uint8_t *buf, int *channels, int *sample_rate,
return size;
}
-static int aac_parse_init(AVCodecParserContext *s1)
+static av_cold int aac_parse_init(AVCodecParserContext *s1)
{
AACAC3ParseContext *s = s1->priv_data;
s->inbuf_ptr = s->inbuf;
diff --git a/libavcodec/aasc.c b/libavcodec/aasc.c
index 62912a81ae..eec26468bc 100644
--- a/libavcodec/aasc.c
+++ b/libavcodec/aasc.c
@@ -44,7 +44,7 @@ typedef struct AascContext {
} \
stream_byte = buf[stream_ptr++];
-static int aasc_decode_init(AVCodecContext *avctx)
+static av_cold int aasc_decode_init(AVCodecContext *avctx)
{
AascContext *s = avctx->priv_data;
@@ -150,7 +150,7 @@ static int aasc_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int aasc_decode_end(AVCodecContext *avctx)
+static av_cold int aasc_decode_end(AVCodecContext *avctx)
{
AascContext *s = avctx->priv_data;
diff --git a/libavcodec/ac3.c b/libavcodec/ac3.c
index cc80277bc6..a1415a570c 100644
--- a/libavcodec/ac3.c
+++ b/libavcodec/ac3.c
@@ -223,7 +223,7 @@ void ac3_parametric_bit_allocation(AC3BitAllocParameters *s, uint8_t *bap,
* note: This function must remain thread safe because it is called by the
* AVParser init code.
*/
-void ac3_common_init(void)
+av_cold void ac3_common_init(void)
{
int i, j, k, l, v;
/* compute bndtab and masktab from bandsz */
diff --git a/libavcodec/ac3_parser.c b/libavcodec/ac3_parser.c
index 9bda203809..bae788ed49 100644
--- a/libavcodec/ac3_parser.c
+++ b/libavcodec/ac3_parser.c
@@ -137,7 +137,7 @@ static int ac3_sync(const uint8_t *buf, int *channels, int *sample_rate,
return hdr.frame_size;
}
-static int ac3_parse_init(AVCodecParserContext *s1)
+static av_cold int ac3_parse_init(AVCodecParserContext *s1)
{
AACAC3ParseContext *s = s1->priv_data;
s->inbuf_ptr = s->inbuf;
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 72bd109f70..75208de33d 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -207,7 +207,7 @@ symmetric_dequant(int code, int levels)
/*
* Initialize tables at runtime.
*/
-static void ac3_tables_init(void)
+static av_cold void ac3_tables_init(void)
{
int i;
@@ -260,7 +260,7 @@ static void ac3_tables_init(void)
/**
* AVCodec initialization
*/
-static int ac3_decode_init(AVCodecContext *avctx)
+static av_cold int ac3_decode_init(AVCodecContext *avctx)
{
AC3DecodeContext *s = avctx->priv_data;
s->avctx = avctx;
@@ -1209,7 +1209,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size,
/**
* Uninitialize the AC-3 decoder.
*/
-static int ac3_decode_end(AVCodecContext *avctx)
+static av_cold int ac3_decode_end(AVCodecContext *avctx)
{
AC3DecodeContext *s = avctx->priv_data;
ff_mdct_end(&s->imdct_512);
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index facdf8fb69..6845cea434 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -608,7 +608,7 @@ static int compute_bit_allocation(AC3EncodeContext *s,
return 0;
}
-static int AC3_encode_init(AVCodecContext *avctx)
+static av_cold int AC3_encode_init(AVCodecContext *avctx)
{
int freq = avctx->sample_rate;
int bitrate = avctx->bit_rate;
@@ -1255,7 +1255,7 @@ static int AC3_encode_frame(AVCodecContext *avctx,
return output_frame_end(s);
}
-static int AC3_encode_close(AVCodecContext *avctx)
+static av_cold int AC3_encode_close(AVCodecContext *avctx)
{
av_freep(&avctx->coded_frame);
return 0;
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index 4e5c54e872..8cbf0f9891 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -663,7 +663,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx,
}
#endif //CONFIG_ENCODERS
-static int adpcm_decode_init(AVCodecContext * avctx)
+static av_cold int adpcm_decode_init(AVCodecContext * avctx)
{
ADPCMContext *c = avctx->priv_data;
unsigned int max_channels = 2;
diff --git a/libavcodec/adxenc.c b/libavcodec/adxenc.c
index 4c3d74e3b2..dcc8f3c955 100644
--- a/libavcodec/adxenc.c
+++ b/libavcodec/adxenc.c
@@ -110,7 +110,7 @@ static int adx_encode_header(AVCodecContext *avctx,unsigned char *buf,size_t buf
return 0x20+4;
}
-static int adx_encode_init(AVCodecContext *avctx)
+static av_cold int adx_encode_init(AVCodecContext *avctx)
{
if (avctx->channels > 2)
return -1; /* only stereo or mono =) */
@@ -126,7 +126,7 @@ static int adx_encode_init(AVCodecContext *avctx)
return 0;
}
-static int adx_encode_close(AVCodecContext *avctx)
+static av_cold int adx_encode_close(AVCodecContext *avctx)
{
av_freep(&avctx->coded_frame);
diff --git a/libavcodec/alac.c b/libavcodec/alac.c
index 0689a46ef5..d93dfd279d 100644
--- a/libavcodec/alac.c
+++ b/libavcodec/alac.c
@@ -624,7 +624,7 @@ static int alac_decode_frame(AVCodecContext *avctx,
return input_buffer_size;
}
-static int alac_decode_init(AVCodecContext * avctx)
+static av_cold int alac_decode_init(AVCodecContext * avctx)
{
ALACContext *alac = avctx->priv_data;
alac->avctx = avctx;
@@ -637,7 +637,7 @@ static int alac_decode_init(AVCodecContext * avctx)
return 0;
}
-static int alac_decode_close(AVCodecContext *avctx)
+static av_cold int alac_decode_close(AVCodecContext *avctx)
{
ALACContext *alac = avctx->priv_data;
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 8fbe9a784f..31addb9b8a 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -185,7 +185,7 @@ static inline int32_t scalarproduct(int16_t * v1, int16_t * v2, int order)
return res;
}
-static int ape_decode_init(AVCodecContext * avctx)
+static av_cold int ape_decode_init(AVCodecContext * avctx)
{
APEContext *s = avctx->priv_data;
int i;
@@ -224,7 +224,7 @@ static int ape_decode_init(AVCodecContext * avctx)
return 0;
}
-static int ape_decode_close(AVCodecContext * avctx)
+static av_cold int ape_decode_close(AVCodecContext * avctx)
{
APEContext *s = avctx->priv_data;
int i;
diff --git a/libavcodec/asv1.c b/libavcodec/asv1.c
index 871fdf5917..f7d3f4c462 100644
--- a/libavcodec/asv1.c
+++ b/libavcodec/asv1.c
@@ -113,7 +113,7 @@ static VLC dc_ccp_vlc;
static VLC ac_ccp_vlc;
static VLC asv2_level_vlc;
-static void init_vlcs(ASV1Context *a){
+static av_cold void init_vlcs(ASV1Context *a){
static int done = 0;
if (!done) {
@@ -521,7 +521,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
}
#endif /* CONFIG_ENCODERS */
-static void common_init(AVCodecContext *avctx){
+static av_cold void common_init(AVCodecContext *avctx){
ASV1Context * const a = avctx->priv_data;
dsputil_init(&a->dsp, avctx);
@@ -535,7 +535,7 @@ static void common_init(AVCodecContext *avctx){
a->avctx= avctx;
}
-static int decode_init(AVCodecContext *avctx){
+static av_cold int decode_init(AVCodecContext *avctx){
ASV1Context * const a = avctx->priv_data;
AVFrame *p= (AVFrame*)&a->picture;
int i;
@@ -570,7 +570,7 @@ static int decode_init(AVCodecContext *avctx){
}
#ifdef CONFIG_ENCODERS
-static int encode_init(AVCodecContext *avctx){
+static av_cold int encode_init(AVCodecContext *avctx){
ASV1Context * const a = avctx->priv_data;
int i;
const int scale= avctx->codec_id == CODEC_ID_ASV1 ? 1 : 2;
@@ -595,7 +595,7 @@ static int encode_init(AVCodecContext *avctx){
}
#endif
-static int decode_end(AVCodecContext *avctx){
+static av_cold int decode_end(AVCodecContext *avctx){
ASV1Context * const a = avctx->priv_data;
av_freep(&a->bitstream_buffer);
diff --git a/libavcodec/avs.c b/libavcodec/avs.c
index 7d4f3e45e6..b2c3e49422 100644
--- a/libavcodec/avs.c
+++ b/libavcodec/avs.c
@@ -142,7 +142,7 @@ avs_decode_frame(AVCodecContext * avctx,
return buf_size;
}
-static int avs_decode_init(AVCodecContext * avctx)
+static av_cold int avs_decode_init(AVCodecContext * avctx)
{
avctx->pix_fmt = PIX_FMT_PAL8;
return 0;
diff --git a/libavcodec/bethsoftvideo.c b/libavcodec/bethsoftvideo.c
index 9d1f6124ad..80d466e93d 100644
--- a/libavcodec/bethsoftvideo.c
+++ b/libavcodec/bethsoftvideo.c
@@ -36,7 +36,7 @@ typedef struct BethsoftvidContext {
AVFrame frame;
} BethsoftvidContext;
-static int bethsoftvid_decode_init(AVCodecContext *avctx)
+static av_cold int bethsoftvid_decode_init(AVCodecContext *avctx)
{
BethsoftvidContext *vid = avctx->priv_data;
vid->frame.reference = 1;
@@ -120,7 +120,7 @@ static int bethsoftvid_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int bethsoftvid_decode_end(AVCodecContext *avctx)
+static av_cold int bethsoftvid_decode_end(AVCodecContext *avctx)
{
BethsoftvidContext * vid = avctx->priv_data;
if(vid->frame.data[0])
diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c
index 35d20e6cc7..52de3be214 100644
--- a/libavcodec/bmp.c
+++ b/libavcodec/bmp.c
@@ -23,7 +23,7 @@
#include "bytestream.h"
#include "bmp.h"
-static int bmp_decode_init(AVCodecContext *avctx){
+static av_cold int bmp_decode_init(AVCodecContext *avctx){
BMPContext *s = avctx->priv_data;
avcodec_get_frame_defaults((AVFrame*)&s->picture);
@@ -231,7 +231,7 @@ static int bmp_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int bmp_decode_end(AVCodecContext *avctx)
+static av_cold int bmp_decode_end(AVCodecContext *avctx)
{
BMPContext* c = avctx->priv_data;
diff --git a/libavcodec/bmpenc.c b/libavcodec/bmpenc.c
index 3510385042..5341cd4f2c 100644
--- a/libavcodec/bmpenc.c
+++ b/libavcodec/bmpenc.c
@@ -23,7 +23,7 @@
#include "bytestream.h"
#include "bmp.h"
-static int bmp_encode_init(AVCodecContext *avctx){
+static av_cold int bmp_encode_init(AVCodecContext *avctx){
BMPContext *s = avctx->priv_data;
avcodec_get_frame_defaults((AVFrame*)&s->picture);
diff --git a/libavcodec/c93.c b/libavcodec/c93.c
index 2b5d3900c0..aa6ba0f306 100644
--- a/libavcodec/c93.c
+++ b/libavcodec/c93.c
@@ -45,13 +45,13 @@ typedef enum {
#define C93_HAS_PALETTE 0x01
#define C93_FIRST_FRAME 0x02
-static int decode_init(AVCodecContext *avctx)
+static av_cold int decode_init(AVCodecContext *avctx)
{
avctx->pix_fmt = PIX_FMT_PAL8;
return 0;
}
-static int decode_end(AVCodecContext *avctx)
+static av_cold int decode_end(AVCodecContext *avctx)
{
C93DecoderContext * const c93 = avctx->priv_data;
diff --git a/libavcodec/cavs.c b/libavcodec/cavs.c
index 2867c06799..60219d4a34 100644
--- a/libavcodec/cavs.c
+++ b/libavcodec/cavs.c
@@ -668,7 +668,7 @@ void ff_cavs_init_top_lines(AVSContext *h) {
h->block = av_mallocz(64*sizeof(DCTELEM));
}
-int ff_cavs_init(AVCodecContext *avctx) {
+av_cold int ff_cavs_init(AVCodecContext *avctx) {
AVSContext *h = avctx->priv_data;
MpegEncContext * const s = &h->s;
@@ -699,7 +699,7 @@ int ff_cavs_init(AVCodecContext *avctx) {
return 0;
}
-int ff_cavs_end(AVCodecContext *avctx) {
+av_cold int ff_cavs_end(AVCodecContext *avctx) {
AVSContext *h = avctx->priv_data;
av_free(h->top_qp);
diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c
index 9a30d8e27c..e3bfc98aed 100644
--- a/libavcodec/cinepak.c
+++ b/libavcodec/cinepak.c
@@ -385,7 +385,7 @@ static int cinepak_decode (CinepakContext *s)
return 0;
}
-static int cinepak_decode_init(AVCodecContext *avctx)
+static av_cold int cinepak_decode_init(AVCodecContext *avctx)
{
CinepakContext *s = avctx->priv_data;
@@ -443,7 +443,7 @@ static int cinepak_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int cinepak_decode_end(AVCodecContext *avctx)
+static av_cold int cinepak_decode_end(AVCodecContext *avctx)
{
CinepakContext *s = avctx->priv_data;
diff --git a/libavcodec/cljr.c b/libavcodec/cljr.c
index 31bec631fd..a5b2c1ea5a 100644
--- a/libavcodec/cljr.c
+++ b/libavcodec/cljr.c
@@ -105,14 +105,14 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
}
#endif
-static void common_init(AVCodecContext *avctx){
+static av_cold void common_init(AVCodecContext *avctx){
CLJRContext * const a = avctx->priv_data;
avctx->coded_frame= (AVFrame*)&a->picture;
a->avctx= avctx;
}
-static int decode_init(AVCodecContext *avctx){
+static av_cold int decode_init(AVCodecContext *avctx){
common_init(avctx);
@@ -122,7 +122,7 @@ static int decode_init(AVCodecContext *avctx){
}
#if 0
-static int encode_init(AVCodecContext *avctx){
+static av_cold int encode_init(AVCodecContext *avctx){
common_init(avctx);
diff --git a/libavcodec/cscd.c b/libavcodec/cscd.c
index 26e662d548..931da79fbe 100644
--- a/libavcodec/cscd.c
+++ b/libavcodec/cscd.c
@@ -212,7 +212,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
return buf_size;
}
-static int decode_init(AVCodecContext *avctx) {
+static av_cold int decode_init(AVCodecContext *avctx) {
CamStudioContext *c = avctx->priv_data;
if (avcodec_check_dimensions(avctx, avctx->height, avctx->width) < 0) {
return 1;
@@ -240,7 +240,7 @@ static int decode_init(AVCodecContext *avctx) {
return 0;
}
-static int decode_end(AVCodecContext *avctx) {
+static av_cold int decode_end(AVCodecContext *avctx) {
CamStudioContext *c = avctx->priv_data;
av_freep(&c->decomp_buf);
if (c->pic.data[0])
diff --git a/libavcodec/cyuv.c b/libavcodec/cyuv.c
index c7fe130bce..53f44bb9c3 100644
--- a/libavcodec/cyuv.c
+++ b/libavcodec/cyuv.c
@@ -43,7 +43,7 @@ typedef struct CyuvDecodeContext {
AVFrame frame;
} CyuvDecodeContext;
-static int cyuv_decode_init(AVCodecContext *avctx)
+static av_cold int cyuv_decode_init(AVCodecContext *avctx)
{
CyuvDecodeContext *s = avctx->priv_data;
@@ -163,7 +163,7 @@ static int cyuv_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int cyuv_decode_end(AVCodecContext *avctx)
+static av_cold int cyuv_decode_end(AVCodecContext *avctx)
{
/* CyuvDecodeContext *s = avctx->priv_data;*/
diff --git a/libavcodec/dca.c b/libavcodec/dca.c
index 14aa9816a3..98fa1f66f9 100644
--- a/libavcodec/dca.c
+++ b/libavcodec/dca.c
@@ -178,7 +178,7 @@ typedef struct {
DSPContext dsp;
} DCAContext;
-static void dca_init_vlcs(void)
+static av_cold void dca_init_vlcs(void)
{
static int vlcs_initialized = 0;
int i, j;
@@ -1200,7 +1200,7 @@ static int dca_decode_frame(AVCodecContext * avctx,
* @param s pointer to the DCAContext
*/
-static void pre_calc_cosmod(DCAContext * s)
+static av_cold void pre_calc_cosmod(DCAContext * s)
{
int i, j, k;
static int cosmod_initialized = 0;
@@ -1230,7 +1230,7 @@ static void pre_calc_cosmod(DCAContext * s)
* @param avctx pointer to the AVCodecContext
*/
-static int dca_decode_init(AVCodecContext * avctx)
+static av_cold int dca_decode_init(AVCodecContext * avctx)
{
DCAContext *s = avctx->priv_data;
diff --git a/libavcodec/dca_parser.c b/libavcodec/dca_parser.c
index 6618b31565..be9af1fd63 100644
--- a/libavcodec/dca_parser.c
+++ b/libavcodec/dca_parser.c
@@ -84,7 +84,7 @@ static int dca_find_frame_end(DCAParseContext * pc1, const uint8_t * buf,
return END_NOT_FOUND;
}
-static int dca_parse_init(AVCodecParserContext * s)
+static av_cold int dca_parse_init(AVCodecParserContext * s)
{
DCAParseContext *pc1 = s->priv_data;
diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c
index a1ccf13a3e..04d8d4a619 100644
--- a/libavcodec/dnxhddec.c
+++ b/libavcodec/dnxhddec.c
@@ -47,7 +47,7 @@ typedef struct {
#define DNXHD_VLC_BITS 9
#define DNXHD_DC_VLC_BITS 7
-static int dnxhd_decode_init(AVCodecContext *avctx)
+static av_cold int dnxhd_decode_init(AVCodecContext *avctx)
{
DNXHDContext *ctx = avctx->priv_data;
@@ -320,7 +320,7 @@ static int dnxhd_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
return buf_size;
}
-static int dnxhd_decode_close(AVCodecContext *avctx)
+static av_cold int dnxhd_decode_close(AVCodecContext *avctx)
{
DNXHDContext *ctx = avctx->priv_data;
diff --git a/libavcodec/dpcm.c b/libavcodec/dpcm.c
index 01dd5cce04..dfa6a25fde 100644
--- a/libavcodec/dpcm.c
+++ b/libavcodec/dpcm.c
@@ -110,7 +110,7 @@ static const int sol_table_16[128] = {
-static int dpcm_decode_init(AVCodecContext *avctx)
+static av_cold int dpcm_decode_init(AVCodecContext *avctx)
{
DPCMContext *s = avctx->priv_data;
int i;
diff --git a/libavcodec/dsicinav.c b/libavcodec/dsicinav.c
index e549487c7e..ac0180fe26 100644
--- a/libavcodec/dsicinav.c
+++ b/libavcodec/dsicinav.c
@@ -86,7 +86,7 @@ static const int16_t cinaudio_delta16_table[256] = {
};
-static int cinvideo_decode_init(AVCodecContext *avctx)
+static av_cold int cinvideo_decode_init(AVCodecContext *avctx)
{
CinVideoContext *cin = avctx->priv_data;
unsigned int i;
@@ -284,7 +284,7 @@ static int cinvideo_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int cinvideo_decode_end(AVCodecContext *avctx)
+static av_cold int cinvideo_decode_end(AVCodecContext *avctx)
{
CinVideoContext *cin = avctx->priv_data;
int i;
@@ -298,7 +298,7 @@ static int cinvideo_decode_end(AVCodecContext *avctx)
return 0;
}
-static int cinaudio_decode_init(AVCodecContext *avctx)
+static av_cold int cinaudio_decode_init(AVCodecContext *avctx)
{
CinAudioContext *cin = avctx->priv_data;
diff --git a/libavcodec/dv.c b/libavcodec/dv.c
index 7fa27aedaf..3a8a843464 100644
--- a/libavcodec/dv.c
+++ b/libavcodec/dv.c
@@ -107,7 +107,7 @@ static void dv_build_unquantize_tables(DVVideoContext *s, uint8_t* perm)
}
}
-static int dvvideo_init(AVCodecContext *avctx)
+static av_cold int dvvideo_init(AVCodecContext *avctx)
{
DVVideoContext *s = avctx->priv_data;
DSPContext dsp;
diff --git a/libavcodec/dvbsub_parser.c b/libavcodec/dvbsub_parser.c
index 312c243bf5..459f6cccd6 100644
--- a/libavcodec/dvbsub_parser.c
+++ b/libavcodec/dvbsub_parser.c
@@ -38,7 +38,7 @@ typedef struct DVBSubParseContext {
int in_packet;
} DVBSubParseContext;
-static int dvbsub_parse_init(AVCodecParserContext *s)
+static av_cold int dvbsub_parse_init(AVCodecParserContext *s)
{
DVBSubParseContext *pc = s->priv_data;
pc->packet_buf = av_malloc(PARSE_BUF_SIZE);
@@ -181,7 +181,7 @@ static int dvbsub_parse(AVCodecParserContext *s,
return buf_size;
}
-static void dvbsub_parse_close(AVCodecParserContext *s)
+static av_cold void dvbsub_parse_close(AVCodecParserContext *s)
{
DVBSubParseContext *pc = s->priv_data;
av_freep(&pc->packet_buf);
diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index 5822564e78..52aee28e88 100644
--- a/libavcodec/dvbsubdec.c
+++ b/libavcodec/dvbsubdec.c
@@ -338,7 +338,7 @@ static void delete_state(DVBSubContext *ctx)
av_log(0, AV_LOG_ERROR, "Memory deallocation error!\n");
}
-static int dvbsub_init_decoder(AVCodecContext *avctx)
+static av_cold int dvbsub_init_decoder(AVCodecContext *avctx)
{
int i, r, g, b, a = 0;
DVBSubContext *ctx = (DVBSubContext*) avctx->priv_data;
@@ -411,7 +411,7 @@ static int dvbsub_init_decoder(AVCodecContext *avctx)
return 0;
}
-static int dvbsub_close_decoder(AVCodecContext *avctx)
+static av_cold int dvbsub_close_decoder(AVCodecContext *avctx)
{
DVBSubContext *ctx = (DVBSubContext*) avctx->priv_data;
DVBSubRegionDisplay *display;
diff --git a/libavcodec/dxa.c b/libavcodec/dxa.c
index 46b01cd816..380fa1f8db 100644
--- a/libavcodec/dxa.c
+++ b/libavcodec/dxa.c
@@ -285,7 +285,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const
return orig_buf_size;
}
-static int decode_init(AVCodecContext *avctx)
+static av_cold int decode_init(AVCodecContext *avctx)
{
DxaDecContext * const c = avctx->priv_data;
@@ -305,7 +305,7 @@ static int decode_init(AVCodecContext *avctx)
return 0;
}
-static int decode_end(AVCodecContext *avctx)
+static av_cold int decode_end(AVCodecContext *avctx)
{
DxaDecContext * const c = avctx->priv_data;
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index d0f2efbfe3..14e39ca4a2 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -530,7 +530,7 @@ static void write_header(FFV1Context *f){
}
#endif /* CONFIG_ENCODERS */
-static int common_init(AVCodecContext *avctx){
+static av_cold int common_init(AVCodecContext *avctx){
FFV1Context *s = avctx->priv_data;
int width, height;
@@ -548,7 +548,7 @@ static int common_init(AVCodecContext *avctx){
}
#ifdef CONFIG_ENCODERS
-static int encode_init(AVCodecContext *avctx)
+static av_cold int encode_init(AVCodecContext *avctx)
{
FFV1Context *s = avctx->priv_data;
int i;
@@ -694,7 +694,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
}
#endif /* CONFIG_ENCODERS */
-static int common_end(AVCodecContext *avctx){
+static av_cold int common_end(AVCodecContext *avctx){
FFV1Context *s = avctx->priv_data;
int i;
@@ -927,7 +927,7 @@ static int read_header(FFV1Context *f){
return 0;
}
-static int decode_init(AVCodecContext *avctx)
+static av_cold int decode_init(AVCodecContext *avctx)
{
// FFV1Context *s = avctx->priv_data;
diff --git a/libavcodec/flac.c b/libavcodec/flac.c
index 81ed55e354..e31b3c9d4b 100644
--- a/libavcodec/flac.c
+++ b/libavcodec/flac.c
@@ -98,7 +98,7 @@ static void metadata_streaminfo(FLACContext *s);
static void allocate_buffers(FLACContext *s);
static int metadata_parse(FLACContext *s);
-static int flac_decode_init(AVCodecContext * avctx)
+static av_cold int flac_decode_init(AVCodecContext * avctx)
{
FLACContext *s = avctx->priv_data;
s->avctx = avctx;
@@ -737,7 +737,7 @@ end:
return i;
}
-static int flac_decode_close(AVCodecContext *avctx)
+static av_cold int flac_decode_close(AVCodecContext *avctx)
{
FLACContext *s = avctx->priv_data;
int i;
diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index 469b46115c..2f07ac56a9 100644
--- a/libavcodec/flacenc.c
+++ b/libavcodec/flacenc.c
@@ -169,7 +169,7 @@ static int select_blocksize(int samplerate, int block_time_ms)
return blocksize;
}
-static int flac_encode_init(AVCodecContext *avctx)
+static av_cold int flac_encode_init(AVCodecContext *avctx)
{
int freq = avctx->sample_rate;
int channels = avctx->channels;
@@ -1486,7 +1486,7 @@ static int flac_encode_frame(AVCodecContext *avctx, uint8_t *frame,
return out_bytes;
}
-static int flac_encode_close(AVCodecContext *avctx)
+static av_cold int flac_encode_close(AVCodecContext *avctx)
{
av_freep(&avctx->extradata);
avctx->extradata_size = 0;
diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c
index 842a7ccaf8..edb44cddcd 100644
--- a/libavcodec/flashsv.c
+++ b/libavcodec/flashsv.c
@@ -79,7 +79,7 @@ static void copy_region(uint8_t *sptr, uint8_t *dptr,
}
-static int flashsv_decode_init(AVCodecContext *avctx)
+static av_cold int flashsv_decode_init(AVCodecContext *avctx)
{
FlashSVContext *s = avctx->priv_data;
int zret; // Zlib return code
@@ -228,7 +228,7 @@ static int flashsv_decode_frame(AVCodecContext *avctx,
}
-static int flashsv_decode_end(AVCodecContext *avctx)
+static av_cold int flashsv_decode_end(AVCodecContext *avctx)
{
FlashSVContext *s = avctx->priv_data;
inflateEnd(&(s->zstream));
diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c
index 2b791c2948..c26d893ef1 100644
--- a/libavcodec/flashsvenc.c
+++ b/libavcodec/flashsvenc.c
@@ -97,7 +97,7 @@ static int copy_region_enc(uint8_t *sptr, uint8_t *dptr,
return 0;
}
-static int flashsv_encode_init(AVCodecContext *avctx)
+static av_cold int flashsv_encode_init(AVCodecContext *avctx)
{
FlashSVContext *s = avctx->priv_data;
@@ -271,7 +271,7 @@ static int flashsv_encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf_siz
return res;
}
-static int flashsv_encode_end(AVCodecContext *avctx)
+static av_cold int flashsv_encode_end(AVCodecContext *avctx)
{
FlashSVContext *s = avctx->priv_data;
diff --git a/libavcodec/flicvideo.c b/libavcodec/flicvideo.c
index 0315d5edb3..0a4ea6cf97 100644
--- a/libavcodec/flicvideo.c
+++ b/libavcodec/flicvideo.c
@@ -76,7 +76,7 @@ typedef struct FlicDecodeContext {
int fli_type; /* either 0xAF11 or 0xAF12, affects palette resolution */
} FlicDecodeContext;
-static int flic_decode_init(AVCodecContext *avctx)
+static av_cold int flic_decode_init(AVCodecContext *avctx)
{
FlicDecodeContext *s = avctx->priv_data;
unsigned char *fli_header = (unsigned char *)avctx->extradata;
@@ -726,7 +726,7 @@ static int flic_decode_frame(AVCodecContext *avctx,
}
-static int flic_decode_end(AVCodecContext *avctx)
+static av_cold int flic_decode_end(AVCodecContext *avctx)
{
FlicDecodeContext *s = avctx->priv_data;
diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c
index d180ee0a77..246f725726 100644
--- a/libavcodec/fraps.c
+++ b/libavcodec/fraps.c
@@ -55,7 +55,7 @@ typedef struct FrapsContext{
* @param avctx codec context
* @return 0 on success or negative if fails
*/
-static int decode_init(AVCodecContext *avctx)
+static av_cold int decode_init(AVCodecContext *avctx)
{
FrapsContext * const s = avctx->priv_data;
@@ -343,7 +343,7 @@ static int decode_frame(AVCodecContext *avctx,
* @param avctx codec context
* @return 0 on success or negative if fails
*/
-static int decode_end(AVCodecContext *avctx)
+static av_cold int decode_end(AVCodecContext *avctx)
{
FrapsContext *s = (FrapsContext*)avctx->priv_data;
diff --git a/libavcodec/g726.c b/libavcodec/g726.c
index d0073c1b4d..14cc9a42ec 100644
--- a/libavcodec/g726.c
+++ b/libavcodec/g726.c
@@ -266,7 +266,7 @@ static inline int16_t g726_iterate(G726Context* c, int16_t I)
return av_clip(re_signal << 2, -0xffff, 0xffff);
}
-static int g726_reset(G726Context* c, int bit_rate)
+static av_cold int g726_reset(G726Context* c, int bit_rate)
{
int i;
@@ -319,7 +319,7 @@ typedef struct AVG726Context {
int code_size;
} AVG726Context;
-static int g726_init(AVCodecContext * avctx)
+static av_cold int g726_init(AVCodecContext * avctx)
{
AVG726Context* c = (AVG726Context*)avctx->priv_data;
@@ -346,7 +346,7 @@ static int g726_init(AVCodecContext * avctx)
return 0;
}
-static int g726_close(AVCodecContext *avctx)
+static av_cold int g726_close(AVCodecContext *avctx)
{
av_freep(&avctx->coded_frame);
return 0;
diff --git a/libavcodec/gif.c b/libavcodec/gif.c
index ee3a13929f..45dbe5568d 100644
--- a/libavcodec/gif.c
+++ b/libavcodec/gif.c
@@ -308,7 +308,7 @@ typedef struct {
AVFrame picture;
} GIFContext;
-static int gif_encode_init(AVCodecContext *avctx)
+static av_cold int gif_encode_init(AVCodecContext *avctx)
{
GIFContext *s = avctx->priv_data;
diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c
index d8f67b4640..342bf1e6c5 100644
--- a/libavcodec/gifdec.c
+++ b/libavcodec/gifdec.c
@@ -269,7 +269,7 @@ static int gif_parse_next_image(GifState *s)
return -1;
}
-static int gif_decode_init(AVCodecContext *avctx)
+static av_cold int gif_decode_init(AVCodecContext *avctx)
{
GifState *s = avctx->priv_data;
@@ -314,7 +314,7 @@ static int gif_decode_frame(AVCodecContext *avctx, void *data, int *data_size, c
return s->bytestream - buf;
}
-static int gif_decode_close(AVCodecContext *avctx)
+static av_cold int gif_decode_close(AVCodecContext *avctx)
{
GifState *s = avctx->priv_data;
diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c
index 4c94539231..6d960f9149 100644
--- a/libavcodec/h261dec.c
+++ b/libavcodec/h261dec.c
@@ -48,7 +48,7 @@ static VLC h261_cbp_vlc;
static int h261_decode_block(H261Context * h, DCTELEM * block, int n, int coded);
-static void h261_decode_init_vlc(H261Context *h){
+static av_cold void h261_decode_init_vlc(H261Context *h){
static int done = 0;
if(!done){
@@ -70,7 +70,7 @@ static void h261_decode_init_vlc(H261Context *h){
}
}
-static int h261_decode_init(AVCodecContext *avctx){
+static av_cold int h261_decode_init(AVCodecContext *avctx){
H261Context *h= avctx->priv_data;
MpegEncContext * const s = &h->s;
@@ -628,7 +628,7 @@ assert(s->current_picture.pict_type == s->pict_type);
return get_consumed_bytes(s, buf_size);
}
-static int h261_decode_end(AVCodecContext *avctx)
+static av_cold int h261_decode_end(AVCodecContext *avctx)
{
H261Context *h= avctx->priv_data;
MpegEncContext *s = &h->s;
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 7bb8204008..86a577b63b 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -35,7 +35,7 @@
//#define DEBUG
//#define PRINT_FRAME_TIME
-int ff_h263_decode_init(AVCodecContext *avctx)
+av_cold int ff_h263_decode_init(AVCodecContext *avctx)
{
MpegEncContext *s = avctx->priv_data;
@@ -119,7 +119,7 @@ int ff_h263_decode_init(AVCodecContext *avctx)
return 0;
}
-int ff_h263_decode_end(AVCodecContext *avctx)
+av_cold int ff_h263_decode_end(AVCodecContext *avctx)
{
MpegEncContext *s = avctx->priv_data;
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index e945774078..26bd3b5d4e 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1952,7 +1952,7 @@ static void hl_motion(H264Context *h, uint8_t *dest_y, uint8_t *dest_cb, uint8_t
prefetch_motion(h, 1);
}
-static void decode_init_vlc(void){
+static av_cold void decode_init_vlc(void){
static int done = 0;
if (!done) {
@@ -2166,7 +2166,7 @@ fail:
return -1; // free_tables will clean up for us
}
-static void common_init(H264Context *h){
+static av_cold void common_init(H264Context *h){
MpegEncContext * const s = &h->s;
s->width = s->avctx->width;
@@ -2183,7 +2183,7 @@ static void common_init(H264Context *h){
memset(h->pps.scaling_matrix8, 16, 2*64*sizeof(uint8_t));
}
-static int decode_init(AVCodecContext *avctx){
+static av_cold int decode_init(AVCodecContext *avctx){
H264Context *h= avctx->priv_data;
MpegEncContext * const s = &h->s;
@@ -8054,7 +8054,7 @@ int main(void){
#endif /* TEST */
-static int decode_end(AVCodecContext *avctx)
+static av_cold int decode_end(AVCodecContext *avctx)
{
H264Context *h = avctx->priv_data;
MpegEncContext *s = &h->s;
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c
index dddcdf1dba..18f21d4068 100644
--- a/libavcodec/huffyuv.c
+++ b/libavcodec/huffyuv.c
@@ -478,7 +478,7 @@ static int common_init(AVCodecContext *avctx){
}
#ifdef CONFIG_DECODERS
-static int decode_init(AVCodecContext *avctx)
+static av_cold int decode_init(AVCodecContext *avctx)
{
HYuvContext *s = avctx->priv_data;
@@ -599,7 +599,7 @@ static int store_table(HYuvContext *s, uint8_t *len, uint8_t *buf){
return index;
}
-static int encode_init(AVCodecContext *avctx)
+static av_cold int encode_init(AVCodecContext *avctx)
{
HYuvContext *s = avctx->priv_data;
int i, j;
@@ -1210,7 +1210,7 @@ static int common_end(HYuvContext *s){
}
#ifdef CONFIG_DECODERS
-static int decode_end(AVCodecContext *avctx)
+static av_cold int decode_end(AVCodecContext *avctx)
{
HYuvContext *s = avctx->priv_data;
int i;
@@ -1420,7 +1420,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
return size*4;
}
-static int encode_end(AVCodecContext *avctx)
+static av_cold int encode_end(AVCodecContext *avctx)
{
HYuvContext *s = avctx->priv_data;
diff --git a/libavcodec/idcinvideo.c b/libavcodec/idcinvideo.c
index a65648df0a..1b0f9d569c 100644
--- a/libavcodec/idcinvideo.c
+++ b/libavcodec/idcinvideo.c
@@ -113,7 +113,7 @@ static int huff_smallest_node(hnode_t *hnodes, int num_hnodes) {
* num_huff_nodes[prev] - contains the index to the root node of the tree.
* That is: huff_nodes[prev][num_huff_nodes[prev]] is the root node.
*/
-static void huff_build_tree(IdcinContext *s, int prev) {
+static av_cold void huff_build_tree(IdcinContext *s, int prev) {
hnode_t *node, *hnodes;
int num_hnodes, i;
@@ -143,7 +143,7 @@ static void huff_build_tree(IdcinContext *s, int prev) {
s->num_huff_nodes[prev] = num_hnodes - 1;
}
-static int idcin_decode_init(AVCodecContext *avctx)
+static av_cold int idcin_decode_init(AVCodecContext *avctx)
{
IdcinContext *s = avctx->priv_data;
int i, j, histogram_index = 0;
@@ -242,7 +242,7 @@ static int idcin_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int idcin_decode_end(AVCodecContext *avctx)
+static av_cold int idcin_decode_end(AVCodecContext *avctx)
{
IdcinContext *s = avctx->priv_data;
diff --git a/libavcodec/imc.c b/libavcodec/imc.c
index 237ff6816c..0ab555db7f 100644
--- a/libavcodec/imc.c
+++ b/libavcodec/imc.c
@@ -90,7 +90,7 @@ typedef struct {
} IMCContext;
-static int imc_decode_init(AVCodecContext * avctx)
+static av_cold int imc_decode_init(AVCodecContext * avctx)
{
int i, j;
IMCContext *q = avctx->priv_data;
@@ -796,7 +796,7 @@ static int imc_decode_frame(AVCodecContext * avctx,
}
-static int imc_decode_close(AVCodecContext * avctx)
+static av_cold int imc_decode_close(AVCodecContext * avctx)
{
IMCContext *q = avctx->priv_data;
diff --git a/libavcodec/indeo2.c b/libavcodec/indeo2.c
index 4a7e2d01f5..4198e53f06 100644
--- a/libavcodec/indeo2.c
+++ b/libavcodec/indeo2.c
@@ -188,7 +188,7 @@ static int ir2_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int ir2_decode_init(AVCodecContext *avctx){
+static av_cold int ir2_decode_init(AVCodecContext *avctx){
Ir2Context * const ic = avctx->priv_data;
ic->avctx = avctx;
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index 78dc6f9890..bd3287f9a5 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -62,7 +62,7 @@ static const int corrector_type_0[24] = {
static const int corrector_type_2[8] = { 9, 7, 6, 8, 5, 4, 3, 2 };
-static void build_modpred(Indeo3DecodeContext *s)
+static av_cold void build_modpred(Indeo3DecodeContext *s)
{
int i, j;
@@ -97,7 +97,7 @@ static void iv_Decode_Chunk(Indeo3DecodeContext *s, unsigned char *cur,
const unsigned char *buf2, int min_width_160);
/* ---------------------------------------------------------------------- */
-static void iv_alloc_frames(Indeo3DecodeContext *s)
+static av_cold void iv_alloc_frames(Indeo3DecodeContext *s)
{
int luma_width, luma_height, luma_pixels, chroma_width, chroma_height,
chroma_pixels, i;
@@ -155,7 +155,7 @@ static void iv_alloc_frames(Indeo3DecodeContext *s)
}
/* ---------------------------------------------------------------------- */
-static void iv_free_func(Indeo3DecodeContext *s)
+static av_cold void iv_free_func(Indeo3DecodeContext *s)
{
int i;
@@ -1048,7 +1048,7 @@ static void iv_Decode_Chunk(Indeo3DecodeContext *s,
}
}
-static int indeo3_decode_init(AVCodecContext *avctx)
+static av_cold int indeo3_decode_init(AVCodecContext *avctx)
{
Indeo3DecodeContext *s = avctx->priv_data;
@@ -1115,7 +1115,7 @@ static int indeo3_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int indeo3_decode_end(AVCodecContext *avctx)
+static av_cold int indeo3_decode_end(AVCodecContext *avctx)
{
Indeo3DecodeContext *s = avctx->priv_data;
diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c
index 3ca7774e0f..dc90aabbc8 100644
--- a/libavcodec/interplayvideo.c
+++ b/libavcodec/interplayvideo.c
@@ -835,7 +835,7 @@ static void ipvideo_decode_opcodes(IpvideoContext *s)
}
}
-static int ipvideo_decode_init(AVCodecContext *avctx)
+static av_cold int ipvideo_decode_init(AVCodecContext *avctx)
{
IpvideoContext *s = avctx->priv_data;
@@ -919,7 +919,7 @@ static int ipvideo_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int ipvideo_decode_end(AVCodecContext *avctx)
+static av_cold int ipvideo_decode_end(AVCodecContext *avctx)
{
IpvideoContext *s = avctx->priv_data;
diff --git a/libavcodec/jpeglsenc.c b/libavcodec/jpeglsenc.c
index a759a70484..3ca685b055 100644
--- a/libavcodec/jpeglsenc.c
+++ b/libavcodec/jpeglsenc.c
@@ -368,7 +368,7 @@ static int encode_picture_ls(AVCodecContext *avctx, unsigned char *buf, int buf_
return put_bits_count(&pb) >> 3;
}
-static int encode_init_ls(AVCodecContext *ctx) {
+static av_cold int encode_init_ls(AVCodecContext *ctx) {
JpeglsContext *c = (JpeglsContext*)ctx->priv_data;
c->avctx = ctx;
diff --git a/libavcodec/kmvc.c b/libavcodec/kmvc.c
index 395ca2cb99..160af3aeb7 100644
--- a/libavcodec/kmvc.c
+++ b/libavcodec/kmvc.c
@@ -338,7 +338,7 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *data_size, cons
/*
* Init kmvc decoder
*/
-static int decode_init(AVCodecContext * avctx)
+static av_cold int decode_init(AVCodecContext * avctx)
{
KmvcContext *const c = avctx->priv_data;
int i;
@@ -390,7 +390,7 @@ static int decode_init(AVCodecContext * avctx)
/*
* Uninit kmvc decoder
*/
-static int decode_end(AVCodecContext * avctx)
+static av_cold int decode_end(AVCodecContext * avctx)
{
KmvcContext *const c = avctx->priv_data;
diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
index 4abb0cd41e..61806612db 100644
--- a/libavcodec/lcldec.c
+++ b/libavcodec/lcldec.c
@@ -514,7 +514,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const
* Init lcl decoder
*
*/
-static int decode_init(AVCodecContext *avctx)
+static av_cold int decode_init(AVCodecContext *avctx)
{
LclDecContext * const c = avctx->priv_data;
unsigned int basesize = avctx->width * avctx->height;
@@ -673,7 +673,7 @@ static int decode_init(AVCodecContext *avctx)
* Uninit lcl decoder
*
*/
-static int decode_end(AVCodecContext *avctx)
+static av_cold int decode_end(AVCodecContext *avctx)
{
LclDecContext * const c = avctx->priv_data;
diff --git a/libavcodec/lclenc.c b/libavcodec/lclenc.c
index e8349052af..37fc3866fe 100644
--- a/libavcodec/lclenc.c
+++ b/libavcodec/lclenc.c
@@ -139,7 +139,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
* Init lcl encoder
*
*/
-static int encode_init(AVCodecContext *avctx)
+static av_cold int encode_init(AVCodecContext *avctx)
{
LclEncContext *c = avctx->priv_data;
int zret; // Zlib return code
@@ -207,7 +207,7 @@ static int encode_init(AVCodecContext *avctx)
* Uninit lcl encoder
*
*/
-static int encode_end(AVCodecContext *avctx)
+static av_cold int encode_end(AVCodecContext *avctx)
{
LclEncContext *c = avctx->priv_data;
diff --git a/libavcodec/liba52.c b/libavcodec/liba52.c
index 86b0136020..c276494abf 100644
--- a/libavcodec/liba52.c
+++ b/libavcodec/liba52.c
@@ -77,7 +77,7 @@ static void* dlsymm(void* handle, const char* symbol)
}
#endif
-static int a52_decode_init(AVCodecContext *avctx)
+static av_cold int a52_decode_init(AVCodecContext *avctx)
{
AC3DecodeState *s = avctx->priv_data;
@@ -203,7 +203,7 @@ static int a52_decode_frame(AVCodecContext *avctx,
return len;
}
-static int a52_decode_end(AVCodecContext *avctx)
+static av_cold int a52_decode_end(AVCodecContext *avctx)
{
AC3DecodeState *s = avctx->priv_data;
s->a52_free(s->state);
diff --git a/libavcodec/libfaac.c b/libavcodec/libfaac.c
index e2802b3984..14e80112d2 100644
--- a/libavcodec/libfaac.c
+++ b/libavcodec/libfaac.c
@@ -31,7 +31,7 @@ typedef struct FaacAudioContext {
faacEncHandle faac_handle;
} FaacAudioContext;
-static int Faac_encode_init(AVCodecContext *avctx)
+static av_cold int Faac_encode_init(AVCodecContext *avctx)
{
FaacAudioContext *s = avctx->priv_data;
faacEncConfigurationPtr faac_cfg;
@@ -132,7 +132,7 @@ static int Faac_encode_frame(AVCodecContext *avctx,
return bytes_written;
}
-static int Faac_encode_close(AVCodecContext *avctx)
+static av_cold int Faac_encode_close(AVCodecContext *avctx)
{
FaacAudioContext *s = avctx->priv_data;
diff --git a/libavcodec/libfaad.c b/libavcodec/libfaad.c
index f8d7c65732..842231347a 100644
--- a/libavcodec/libfaad.c
+++ b/libavcodec/libfaad.c
@@ -209,7 +209,7 @@ static int faac_decode_frame(AVCodecContext *avctx,
#endif
}
-static int faac_decode_end(AVCodecContext *avctx)
+static av_cold int faac_decode_end(AVCodecContext *avctx)
{
FAACContext *s = avctx->priv_data;
@@ -219,7 +219,7 @@ static int faac_decode_end(AVCodecContext *avctx)
return 0;
}
-static int faac_decode_init(AVCodecContext *avctx)
+static av_cold int faac_decode_init(AVCodecContext *avctx)
{
FAACContext *s = avctx->priv_data;
faacDecConfigurationPtr faac_cfg;
diff --git a/libavcodec/libgsm.c b/libavcodec/libgsm.c
index 4fe2b384b3..3ae5567f72 100644
--- a/libavcodec/libgsm.c
+++ b/libavcodec/libgsm.c
@@ -35,7 +35,7 @@
#define GSM_MS_BLOCK_SIZE 65
#define GSM_FRAME_SIZE 160
-static int libgsm_init(AVCodecContext *avctx) {
+static av_cold int libgsm_init(AVCodecContext *avctx) {
if (avctx->channels > 1 || avctx->sample_rate != 8000 || avctx->bit_rate != 13000)
return -1;
@@ -60,7 +60,7 @@ static int libgsm_init(AVCodecContext *avctx) {
return 0;
}
-static int libgsm_close(AVCodecContext *avctx) {
+static av_cold int libgsm_close(AVCodecContext *avctx) {
gsm_destroy(avctx->priv_data);
avctx->priv_data = NULL;
return 0;
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
index 6fbf2e23d3..dddb919cd3 100644
--- a/libavcodec/libmp3lame.c
+++ b/libavcodec/libmp3lame.c
@@ -36,7 +36,7 @@ typedef struct Mp3AudioContext {
int buffer_index;
} Mp3AudioContext;
-static int MP3lame_encode_init(AVCodecContext *avctx)
+static av_cold int MP3lame_encode_init(AVCodecContext *avctx)
{
Mp3AudioContext *s = avctx->priv_data;
@@ -198,7 +198,7 @@ static int MP3lame_encode_frame(AVCodecContext *avctx,
return 0;
}
-static int MP3lame_encode_close(AVCodecContext *avctx)
+static av_cold int MP3lame_encode_close(AVCodecContext *avctx)
{
Mp3AudioContext *s = avctx->priv_data;
diff --git a/libavcodec/libvorbis.c b/libavcodec/libvorbis.c
index 3fb507dadf..dcef79939f 100644
--- a/libavcodec/libvorbis.c
+++ b/libavcodec/libvorbis.c
@@ -81,7 +81,7 @@ static int oggvorbis_init_encoder(vorbis_info *vi, AVCodecContext *avccontext) {
return vorbis_encode_setup_init(vi);
}
-static int oggvorbis_encode_init(AVCodecContext *avccontext) {
+static av_cold int oggvorbis_encode_init(AVCodecContext *avccontext) {
OggVorbisContext *context = avccontext->priv_data ;
ogg_packet header, header_comm, header_code;
uint8_t *p;
@@ -191,7 +191,7 @@ static int oggvorbis_encode_frame(AVCodecContext *avccontext,
}
-static int oggvorbis_encode_close(AVCodecContext *avccontext) {
+static av_cold int oggvorbis_encode_close(AVCodecContext *avccontext) {
OggVorbisContext *context = avccontext->priv_data ;
/* ogg_packet op ; */
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index eb897eba20..e730bfe421 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -119,7 +119,7 @@ X264_frame(AVCodecContext *ctx, uint8_t *buf, int bufsize, void *data)
return bufsize;
}
-static int
+static av_cold int
X264_close(AVCodecContext *avctx)
{
X264Context *x4 = avctx->priv_data;
@@ -130,7 +130,7 @@ X264_close(AVCodecContext *avctx)
return 0;
}
-static int
+static av_cold int
X264_init(AVCodecContext *avctx)
{
X264Context *x4 = avctx->priv_data;
diff --git a/libavcodec/libxvidff.c b/libavcodec/libxvidff.c
index f3a1a5bb9f..af90f7e207 100644
--- a/libavcodec/libxvidff.c
+++ b/libavcodec/libxvidff.c
@@ -81,7 +81,7 @@ void xvid_correct_framerate(AVCodecContext *avctx);
* @param avctx AVCodecContext pointer to context
* @return Returns 0 on success, -1 on failure
*/
-int ff_xvid_encode_init(AVCodecContext *avctx) {
+av_cold int ff_xvid_encode_init(AVCodecContext *avctx) {
int xerr, i;
int xvid_flags = avctx->flags;
xvid_context_t *x = avctx->priv_data;
@@ -461,7 +461,7 @@ int ff_xvid_encode_frame(AVCodecContext *avctx,
* @param avctx AVCodecContext pointer to context
* @return Returns 0, success guaranteed
*/
-int ff_xvid_encode_close(AVCodecContext *avctx) {
+av_cold int ff_xvid_encode_close(AVCodecContext *avctx) {
xvid_context_t *x = avctx->priv_data;
xvid_encore(x->encoder_handle, XVID_ENC_DESTROY, NULL, NULL);
diff --git a/libavcodec/loco.c b/libavcodec/loco.c
index 14be6f0192..c023b08ff6 100644
--- a/libavcodec/loco.c
+++ b/libavcodec/loco.c
@@ -225,7 +225,7 @@ static int decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int decode_init(AVCodecContext *avctx){
+static av_cold int decode_init(AVCodecContext *avctx){
LOCOContext * const l = avctx->priv_data;
int version;
diff --git a/libavcodec/lzw.c b/libavcodec/lzw.c
index 833c9d0ab3..207b807e9d 100644
--- a/libavcodec/lzw.c
+++ b/libavcodec/lzw.c
@@ -109,12 +109,12 @@ void ff_lzw_decode_tail(LZWState *p)
s->pbuf= s->ebuf;
}
-void ff_lzw_decode_open(LZWState **p)
+av_cold void ff_lzw_decode_open(LZWState **p)
{
*p = av_mallocz(sizeof(struct LZWState));
}
-void ff_lzw_decode_close(LZWState **p)
+av_cold void ff_lzw_decode_close(LZWState **p)
{
av_freep(p);
}
diff --git a/libavcodec/mace.c b/libavcodec/mace.c
index 7256f7678f..8ff2d1d3ce 100644
--- a/libavcodec/mace.c
+++ b/libavcodec/mace.c
@@ -392,7 +392,7 @@ static void Exp1to6(MACEContext *ctx,
}
/* \\\ */
-static int mace_decode_init(AVCodecContext * avctx)
+static av_cold int mace_decode_init(AVCodecContext * avctx)
{
if (avctx->channels > 2)
return -1;
diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c
index e9bf5f5d1b..5c1382e3c0 100644
--- a/libavcodec/mdec.c
+++ b/libavcodec/mdec.c
@@ -215,7 +215,7 @@ static int decode_frame(AVCodecContext *avctx,
return (get_bits_count(&a->gb)+31)/32*4;
}
-static void mdec_common_init(AVCodecContext *avctx){
+static av_cold void mdec_common_init(AVCodecContext *avctx){
MDECContext * const a = avctx->priv_data;
dsputil_init(&a->dsp, avctx);
@@ -227,7 +227,7 @@ static void mdec_common_init(AVCodecContext *avctx){
a->avctx= avctx;
}
-static int decode_init(AVCodecContext *avctx){
+static av_cold int decode_init(AVCodecContext *avctx){
MDECContext * const a = avctx->priv_data;
AVFrame *p= (AVFrame*)&a->picture;
@@ -247,7 +247,7 @@ static int decode_init(AVCodecContext *avctx){
return 0;
}
-static int decode_end(AVCodecContext *avctx){
+static av_cold int decode_end(AVCodecContext *avctx){
MDECContext * const a = avctx->priv_data;
av_freep(&a->bitstream_buffer);
diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c
index b810753679..6fa8534eb2 100644
--- a/libavcodec/mimic.c
+++ b/libavcodec/mimic.c
@@ -102,7 +102,7 @@ static const uint8_t col_zag[64] = {
53, 60, 61, 54, 47, 55, 62, 63
};
-static int mimic_decode_init(AVCodecContext *avctx)
+static av_cold int mimic_decode_init(AVCodecContext *avctx)
{
MimicContext *ctx = avctx->priv_data;
@@ -371,7 +371,7 @@ static int mimic_decode_frame(AVCodecContext *avctx, void *data,
return buf_size;
}
-static int mimic_decode_end(AVCodecContext *avctx)
+static av_cold int mimic_decode_end(AVCodecContext *avctx)
{
MimicContext *ctx = avctx->priv_data;
int i;
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 6da13c2e45..8390412408 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -73,7 +73,7 @@ static void build_basic_mjpeg_vlc(MJpegDecodeContext * s) {
ff_mjpeg_val_ac_chrominance, 251, 0, 1);
}
-int ff_mjpeg_decode_init(AVCodecContext *avctx)
+av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx)
{
MJpegDecodeContext *s = avctx->priv_data;
@@ -1338,7 +1338,7 @@ the_end:
return buf_ptr - buf;
}
-int ff_mjpeg_decode_end(AVCodecContext *avctx)
+av_cold int ff_mjpeg_decode_end(AVCodecContext *avctx)
{
MJpegDecodeContext *s = avctx->priv_data;
int i, j;
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c
index b5e5a827d3..5980b9fc78 100644
--- a/libavcodec/mjpegenc.c
+++ b/libavcodec/mjpegenc.c
@@ -44,7 +44,7 @@
#undef TWOMATRIXES
-int ff_mjpeg_encode_init(MpegEncContext *s)
+av_cold int ff_mjpeg_encode_init(MpegEncContext *s)
{
MJpegContext *m;
diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c
index 9c169a0044..8b3e656d21 100644
--- a/libavcodec/mmvideo.c
+++ b/libavcodec/mmvideo.c
@@ -47,7 +47,7 @@ typedef struct MmContext {
AVFrame frame;
} MmContext;
-static int mm_decode_init(AVCodecContext *avctx)
+static av_cold int mm_decode_init(AVCodecContext *avctx)
{
MmContext *s = avctx->priv_data;
@@ -182,7 +182,7 @@ static int mm_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int mm_decode_end(AVCodecContext *avctx)
+static av_cold int mm_decode_end(AVCodecContext *avctx)
{
MmContext *s = avctx->priv_data;
diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c
index 37bdb5f390..d3afe313da 100644
--- a/libavcodec/mpc7.c
+++ b/libavcodec/mpc7.c
@@ -44,7 +44,7 @@
static VLC scfi_vlc, dscf_vlc, hdr_vlc, quant_vlc[MPC7_QUANT_VLC_TABLES][2];
-static int mpc7_decode_init(AVCodecContext * avctx)
+static av_cold int mpc7_decode_init(AVCodecContext * avctx)
{
int i, j;
MPCContext *c = avctx->priv_data;
diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c
index 3dfa5c9f32..1833e45dac 100644
--- a/libavcodec/mpc8.c
+++ b/libavcodec/mpc8.c
@@ -92,7 +92,7 @@ static int mpc8_get_mask(GetBitContext *gb, int size, int t)
return mask;
}
-static int mpc8_decode_init(AVCodecContext * avctx)
+static av_cold int mpc8_decode_init(AVCodecContext * avctx)
{
int i;
MPCContext *c = avctx->priv_data;
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index 52753576eb..e4cbcfe39e 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -1199,7 +1199,7 @@ typedef struct Mpeg1Context {
} Mpeg1Context;
-static int mpeg_decode_init(AVCodecContext *avctx)
+static av_cold int mpeg_decode_init(AVCodecContext *avctx)
{
Mpeg1Context *s = avctx->priv_data;
MpegEncContext *s2 = &s->mpeg_enc_ctx;
@@ -2459,7 +2459,7 @@ AVCodec mpegvideo_decoder = {
};
#ifdef HAVE_XVMC
-static int mpeg_mc_decode_init(AVCodecContext *avctx){
+static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx){
Mpeg1Context *s;
if( avctx->thread_count > 1)
diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index 17d80a870a..6d62ccbab0 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -133,7 +133,7 @@ static int find_frame_rate_index(MpegEncContext *s){
return 0;
}
-static int encode_init(AVCodecContext *avctx)
+static av_cold int encode_init(AVCodecContext *avctx)
{
MpegEncContext *s = avctx->priv_data;
diff --git a/libavcodec/mpegaudioenc.c b/libavcodec/mpegaudioenc.c
index ede44927c2..5621dfbd85 100644
--- a/libavcodec/mpegaudioenc.c
+++ b/libavcodec/mpegaudioenc.c
@@ -61,7 +61,7 @@ typedef struct MpegAudioContext {
#include "mpegaudiodata.h"
#include "mpegaudiotab.h"
-static int MPA_encode_init(AVCodecContext *avctx)
+static av_cold int MPA_encode_init(AVCodecContext *avctx)
{
MpegAudioContext *s = avctx->priv_data;
int freq = avctx->sample_rate;
@@ -781,7 +781,7 @@ static int MPA_encode_frame(AVCodecContext *avctx,
return pbBufPtr(&s->pb) - s->pb.buf;
}
-static int MPA_encode_close(AVCodecContext *avctx)
+static av_cold int MPA_encode_close(AVCodecContext *avctx)
{
av_freep(&avctx->coded_frame);
return 0;
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 89d4562a79..a04e818327 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -240,7 +240,7 @@ static void MPV_encode_defaults(MpegEncContext *s){
}
/* init video encoder */
-int MPV_encode_init(AVCodecContext *avctx)
+av_cold int MPV_encode_init(AVCodecContext *avctx)
{
MpegEncContext *s = avctx->priv_data;
int i;
@@ -737,7 +737,7 @@ int MPV_encode_init(AVCodecContext *avctx)
return 0;
}
-int MPV_encode_end(AVCodecContext *avctx)
+av_cold int MPV_encode_end(AVCodecContext *avctx)
{
MpegEncContext *s = avctx->priv_data;
diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c
index 51893cbb7b..f9f037339f 100644
--- a/libavcodec/msrle.c
+++ b/libavcodec/msrle.c
@@ -236,7 +236,7 @@ static void msrle_decode_pal8(MsrleContext *s)
stream_ptr, s->size);
}
-static int msrle_decode_init(AVCodecContext *avctx)
+static av_cold int msrle_decode_init(AVCodecContext *avctx)
{
MsrleContext *s = avctx->priv_data;
@@ -283,7 +283,7 @@ static int msrle_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int msrle_decode_end(AVCodecContext *avctx)
+static av_cold int msrle_decode_end(AVCodecContext *avctx)
{
MsrleContext *s = avctx->priv_data;
diff --git a/libavcodec/msvideo1.c b/libavcodec/msvideo1.c
index 3377ce8789..31b10d5d50 100644
--- a/libavcodec/msvideo1.c
+++ b/libavcodec/msvideo1.c
@@ -57,7 +57,7 @@ typedef struct Msvideo1Context {
} Msvideo1Context;
-static int msvideo1_decode_init(AVCodecContext *avctx)
+static av_cold int msvideo1_decode_init(AVCodecContext *avctx)
{
Msvideo1Context *s = avctx->priv_data;
@@ -319,7 +319,7 @@ static int msvideo1_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int msvideo1_decode_end(AVCodecContext *avctx)
+static av_cold int msvideo1_decode_end(AVCodecContext *avctx)
{
Msvideo1Context *s = avctx->priv_data;
diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c
index 7c83bd5620..b5254b9d9f 100644
--- a/libavcodec/nellymoserdec.c
+++ b/libavcodec/nellymoserdec.c
@@ -329,7 +329,7 @@ void nelly_decode_block(NellyMoserDecodeContext *s, const unsigned char block[NE
}
}
-static int decode_init(AVCodecContext * avctx) {
+static av_cold int decode_init(AVCodecContext * avctx) {
NellyMoserDecodeContext *s = avctx->priv_data;
int i;
@@ -391,7 +391,7 @@ static int decode_tag(AVCodecContext * avctx,
return buf_size;
}
-static int decode_end(AVCodecContext * avctx) {
+static av_cold int decode_end(AVCodecContext * avctx) {
NellyMoserDecodeContext *s = avctx->priv_data;
ff_mdct_end(&s->imdct_ctx);
diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c
index 6193806fab..2c30eb4fee 100644
--- a/libavcodec/nuv.c
+++ b/libavcodec/nuv.c
@@ -236,7 +236,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
return orig_size;
}
-static int decode_init(AVCodecContext *avctx) {
+static av_cold int decode_init(AVCodecContext *avctx) {
NuvContext *c = avctx->priv_data;
avctx->pix_fmt = PIX_FMT_YUV420P;
c->pic.data[0] = NULL;
@@ -253,7 +253,7 @@ static int decode_init(AVCodecContext *avctx) {
return 0;
}
-static int decode_end(AVCodecContext *avctx) {
+static av_cold int decode_end(AVCodecContext *avctx) {
NuvContext *c = avctx->priv_data;
av_freep(&c->decomp_buf);
if (c->pic.data[0])
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
index 926c6f0109..661dfc6f09 100644
--- a/libavcodec/pcm.c
+++ b/libavcodec/pcm.c
@@ -44,7 +44,7 @@
* alaw2linear() - Convert an A-law value to 16-bit linear PCM
*
*/
-static int alaw2linear(unsigned char a_val)
+static av_cold int alaw2linear(unsigned char a_val)
{
int t;
int seg;
@@ -59,7 +59,7 @@ static int alaw2linear(unsigned char a_val)
return ((a_val & SIGN_BIT) ? t : -t);
}
-static int ulaw2linear(unsigned char u_val)
+static av_cold int ulaw2linear(unsigned char u_val)
{
int t;
@@ -80,7 +80,7 @@ static int ulaw2linear(unsigned char u_val)
static uint8_t linear_to_alaw[16384];
static uint8_t linear_to_ulaw[16384];
-static void build_xlaw_table(uint8_t *linear_to_xlaw,
+static av_cold void build_xlaw_table(uint8_t *linear_to_xlaw,
int (*xlaw2linear)(unsigned char),
int mask)
{
@@ -104,7 +104,7 @@ static void build_xlaw_table(uint8_t *linear_to_xlaw,
linear_to_xlaw[0] = linear_to_xlaw[1];
}
-static int pcm_encode_init(AVCodecContext *avctx)
+static av_cold int pcm_encode_init(AVCodecContext *avctx)
{
avctx->frame_size = 1;
switch(avctx->codec->id) {
@@ -154,7 +154,7 @@ static int pcm_encode_init(AVCodecContext *avctx)
return 0;
}
-static int pcm_encode_close(AVCodecContext *avctx)
+static av_cold int pcm_encode_close(AVCodecContext *avctx)
{
av_freep(&avctx->coded_frame);
@@ -325,7 +325,7 @@ typedef struct PCMDecode {
short table[256];
} PCMDecode;
-static int pcm_decode_init(AVCodecContext * avctx)
+static av_cold int pcm_decode_init(AVCodecContext * avctx)
{
PCMDecode *s = avctx->priv_data;
int i;
diff --git a/libavcodec/pcx.c b/libavcodec/pcx.c
index 5aa7b08462..c52a21770e 100644
--- a/libavcodec/pcx.c
+++ b/libavcodec/pcx.c
@@ -30,7 +30,7 @@ typedef struct PCXContext {
AVFrame picture;
} PCXContext;
-static int pcx_init(AVCodecContext *avctx) {
+static av_cold int pcx_init(AVCodecContext *avctx) {
PCXContext *s = avctx->priv_data;
avcodec_get_frame_defaults(&s->picture);
@@ -224,7 +224,7 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
return buf - bufstart;
}
-static int pcx_end(AVCodecContext *avctx) {
+static av_cold int pcx_end(AVCodecContext *avctx) {
PCXContext *s = avctx->priv_data;
if(s->picture.data[0])
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 90dac4dfa5..bfaa38cf86 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -597,7 +597,7 @@ static int decode_frame(AVCodecContext *avctx,
goto the_end;
}
-static int png_dec_init(AVCodecContext *avctx){
+static av_cold int png_dec_init(AVCodecContext *avctx){
PNGDecContext *s = avctx->priv_data;
avcodec_get_frame_defaults((AVFrame*)&s->picture);
diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
index 703371d856..49f61df312 100644
--- a/libavcodec/pngenc.c
+++ b/libavcodec/pngenc.c
@@ -422,7 +422,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
goto the_end;
}
-static int png_enc_init(AVCodecContext *avctx){
+static av_cold int png_enc_init(AVCodecContext *avctx){
PNGEncContext *s = avctx->priv_data;
avcodec_get_frame_defaults((AVFrame*)&s->picture);
diff --git a/libavcodec/pnmenc.c b/libavcodec/pnmenc.c
index c5061f2e75..9fbbc34065 100644
--- a/libavcodec/pnmenc.c
+++ b/libavcodec/pnmenc.c
@@ -23,7 +23,7 @@
#include "pnm.h"
-static int common_init(AVCodecContext *avctx){
+static av_cold int common_init(AVCodecContext *avctx){
PNMContext *s = avctx->priv_data;
avcodec_get_frame_defaults((AVFrame*)&s->picture);
diff --git a/libavcodec/ptx.c b/libavcodec/ptx.c
index 22bb461781..bbd40096ee 100644
--- a/libavcodec/ptx.c
+++ b/libavcodec/ptx.c
@@ -25,7 +25,7 @@ typedef struct PTXContext {
AVFrame picture;
} PTXContext;
-static int ptx_init(AVCodecContext *avctx) {
+static av_cold int ptx_init(AVCodecContext *avctx) {
PTXContext *s = avctx->priv_data;
avcodec_get_frame_defaults(&s->picture);
@@ -94,7 +94,7 @@ static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
return offset + w*h*bytes_per_pixel;
}
-static int ptx_end(AVCodecContext *avctx) {
+static av_cold int ptx_end(AVCodecContext *avctx) {
PTXContext *s = avctx->priv_data;
if(s->picture.data[0])
diff --git a/libavcodec/qdrw.c b/libavcodec/qdrw.c
index 78283f6cc0..cd041ea65b 100644
--- a/libavcodec/qdrw.c
+++ b/libavcodec/qdrw.c
@@ -129,7 +129,7 @@ static int decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int decode_init(AVCodecContext *avctx){
+static av_cold int decode_init(AVCodecContext *avctx){
// QdrawContext * const a = avctx->priv_data;
if (avcodec_check_dimensions(avctx, avctx->width, avctx->height) < 0) {
diff --git a/libavcodec/qpeg.c b/libavcodec/qpeg.c
index 03e97b304d..9e92ff0f99 100644
--- a/libavcodec/qpeg.c
+++ b/libavcodec/qpeg.c
@@ -284,7 +284,7 @@ static int decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int decode_init(AVCodecContext *avctx){
+static av_cold int decode_init(AVCodecContext *avctx){
QpegContext * const a = avctx->priv_data;
a->avctx = avctx;
@@ -295,7 +295,7 @@ static int decode_init(AVCodecContext *avctx){
return 0;
}
-static int decode_end(AVCodecContext *avctx){
+static av_cold int decode_end(AVCodecContext *avctx){
QpegContext * const a = avctx->priv_data;
AVFrame * const p= (AVFrame*)&a->pic;
diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c
index a0952039ce..88db1014cf 100644
--- a/libavcodec/qtrle.c
+++ b/libavcodec/qtrle.c
@@ -485,7 +485,7 @@ static void qtrle_decode_32bpp(QtrleContext *s)
}
}
-static int qtrle_decode_init(AVCodecContext *avctx)
+static av_cold int qtrle_decode_init(AVCodecContext *avctx)
{
QtrleContext *s = avctx->priv_data;
@@ -600,7 +600,7 @@ static int qtrle_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int qtrle_decode_end(AVCodecContext *avctx)
+static av_cold int qtrle_decode_end(AVCodecContext *avctx)
{
QtrleContext *s = avctx->priv_data;
diff --git a/libavcodec/qtrleenc.c b/libavcodec/qtrleenc.c
index 2f41f3ce14..9adab61827 100644
--- a/libavcodec/qtrleenc.c
+++ b/libavcodec/qtrleenc.c
@@ -57,7 +57,7 @@ typedef struct QtrleEncContext {
uint8_t* skip_table;
} QtrleEncContext;
-static int qtrle_encode_init(AVCodecContext *avctx)
+static av_cold int qtrle_encode_init(AVCodecContext *avctx)
{
QtrleEncContext *s = avctx->priv_data;
@@ -303,7 +303,7 @@ static int qtrle_encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf_size,
return chunksize;
}
-static int qtrle_encode_end(AVCodecContext *avctx)
+static av_cold int qtrle_encode_end(AVCodecContext *avctx)
{
QtrleEncContext *s = avctx->priv_data;
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 11d2a185e8..2ad547bac1 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -64,7 +64,7 @@ static int findPixelFormat(const PixelFormatTag *tags, unsigned int fourcc)
return PIX_FMT_YUV420P;
}
-static int raw_init_decoder(AVCodecContext *avctx)
+static av_cold int raw_init_decoder(AVCodecContext *avctx)
{
RawVideoContext *context = avctx->priv_data;
@@ -145,7 +145,7 @@ static int raw_decode(AVCodecContext *avctx,
return buf_size;
}
-static int raw_close_decoder(AVCodecContext *avctx)
+static av_cold int raw_close_decoder(AVCodecContext *avctx)
{
RawVideoContext *context = avctx->priv_data;
diff --git a/libavcodec/rawenc.c b/libavcodec/rawenc.c
index 61608bcc32..60fd7bc043 100644
--- a/libavcodec/rawenc.c
+++ b/libavcodec/rawenc.c
@@ -27,7 +27,7 @@
#include "avcodec.h"
#include "raw.h"
-static int raw_init_encoder(AVCodecContext *avctx)
+static av_cold int raw_init_encoder(AVCodecContext *avctx)
{
avctx->coded_frame = (AVFrame *)avctx->priv_data;
avctx->coded_frame->pict_type = FF_I_TYPE;
diff --git a/libavcodec/roqaudioenc.c b/libavcodec/roqaudioenc.c
index f76079e1d1..eacea9a386 100644
--- a/libavcodec/roqaudioenc.c
+++ b/libavcodec/roqaudioenc.c
@@ -37,7 +37,7 @@ typedef struct
short lastSample[2];
} ROQDPCMContext_t;
-static void roq_dpcm_table_init(void)
+static av_cold void roq_dpcm_table_init(void)
{
int i;
@@ -158,7 +158,7 @@ static int roq_dpcm_encode_frame(AVCodecContext *avctx,
return out - frame;
}
-static int roq_dpcm_encode_close(AVCodecContext *avctx)
+static av_cold int roq_dpcm_encode_close(AVCodecContext *avctx)
{
av_freep(&avctx->coded_frame);
diff --git a/libavcodec/roqvideodec.c b/libavcodec/roqvideodec.c
index 3391ec4042..1d3ee4fd1d 100644
--- a/libavcodec/roqvideodec.c
+++ b/libavcodec/roqvideodec.c
@@ -153,7 +153,7 @@ static void roqvideo_decode_frame(RoqContext *ri)
}
-static int roq_decode_init(AVCodecContext *avctx)
+static av_cold int roq_decode_init(AVCodecContext *avctx)
{
RoqContext *s = avctx->priv_data;
@@ -196,7 +196,7 @@ static int roq_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int roq_decode_end(AVCodecContext *avctx)
+static av_cold int roq_decode_end(AVCodecContext *avctx)
{
RoqContext *s = avctx->priv_data;
diff --git a/libavcodec/rpza.c b/libavcodec/rpza.c
index 3a71c69b6d..8756171f6d 100644
--- a/libavcodec/rpza.c
+++ b/libavcodec/rpza.c
@@ -226,7 +226,7 @@ static void rpza_decode_stream(RpzaContext *s)
}
}
-static int rpza_decode_init(AVCodecContext *avctx)
+static av_cold int rpza_decode_init(AVCodecContext *avctx)
{
RpzaContext *s = avctx->priv_data;
@@ -263,7 +263,7 @@ static int rpza_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int rpza_decode_end(AVCodecContext *avctx)
+static av_cold int rpza_decode_end(AVCodecContext *avctx)
{
RpzaContext *s = avctx->priv_data;
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
index 4d35df5f12..12d5208884 100644
--- a/libavcodec/rv10.c
+++ b/libavcodec/rv10.c
@@ -522,7 +522,7 @@ av_log(s->avctx, AV_LOG_DEBUG, "\n");*/
return s->mb_width*s->mb_height - mb_pos;
}
-static int rv10_decode_init(AVCodecContext *avctx)
+static av_cold int rv10_decode_init(AVCodecContext *avctx)
{
MpegEncContext *s = avctx->priv_data;
static int done=0;
@@ -588,7 +588,7 @@ static int rv10_decode_init(AVCodecContext *avctx)
return 0;
}
-static int rv10_decode_end(AVCodecContext *avctx)
+static av_cold int rv10_decode_end(AVCodecContext *avctx)
{
MpegEncContext *s = avctx->priv_data;
diff --git a/libavcodec/rv30.c b/libavcodec/rv30.c
index 424589cf03..2e90d8e9bd 100644
--- a/libavcodec/rv30.c
+++ b/libavcodec/rv30.c
@@ -114,7 +114,7 @@ static int rv30_decode_mb_info(RV34DecContext *r)
/**
* Initialize decoder.
*/
-static int rv30_decode_init(AVCodecContext *avctx)
+static av_cold int rv30_decode_init(AVCodecContext *avctx)
{
RV34DecContext *r = avctx->priv_data;
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c
index fa7803370b..7749637dc1 100644
--- a/libavcodec/rv34.c
+++ b/libavcodec/rv34.c
@@ -99,7 +99,7 @@ static void rv34_gen_vlc(const uint8_t *bits, int size, VLC *vlc, const uint8_t
/**
* Initialize all tables.
*/
-static void rv34_init_tables()
+static av_cold void rv34_init_tables()
{
int i, j, k;
@@ -1163,7 +1163,7 @@ static int rv34_decode_slice(RV34DecContext *r, int end, uint8_t* buf, int buf_s
/**
* Initialize decoder.
*/
-int ff_rv34_decode_init(AVCodecContext *avctx)
+av_cold int ff_rv34_decode_init(AVCodecContext *avctx)
{
RV34DecContext *r = avctx->priv_data;
MpegEncContext *s = &r->s;
@@ -1285,7 +1285,7 @@ int ff_rv34_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-int ff_rv34_decode_end(AVCodecContext *avctx)
+av_cold int ff_rv34_decode_end(AVCodecContext *avctx)
{
RV34DecContext *r = avctx->priv_data;
diff --git a/libavcodec/rv40.c b/libavcodec/rv40.c
index 25258104fd..38bc48a08b 100644
--- a/libavcodec/rv40.c
+++ b/libavcodec/rv40.c
@@ -40,7 +40,7 @@ static VLC ptype_vlc[NUM_PTYPE_VLCS], btype_vlc[NUM_BTYPE_VLCS];
/**
* Initialize all tables.
*/
-static void rv40_init_tables()
+static av_cold void rv40_init_tables()
{
int i;
@@ -250,7 +250,7 @@ static int rv40_decode_mb_info(RV34DecContext *r)
/**
* Initialize decoder.
*/
-static int rv40_decode_init(AVCodecContext *avctx)
+static av_cold int rv40_decode_init(AVCodecContext *avctx)
{
RV34DecContext *r = avctx->priv_data;
diff --git a/libavcodec/sgidec.c b/libavcodec/sgidec.c
index 5a85cdcdd0..476bb6a085 100644
--- a/libavcodec/sgidec.c
+++ b/libavcodec/sgidec.c
@@ -235,7 +235,7 @@ static int decode_frame(AVCodecContext *avctx,
}
}
-static int sgi_init(AVCodecContext *avctx){
+static av_cold int sgi_init(AVCodecContext *avctx){
SgiState *s = avctx->priv_data;
avcodec_get_frame_defaults(&s->picture);
@@ -244,7 +244,7 @@ static int sgi_init(AVCodecContext *avctx){
return 0;
}
-static int sgi_end(AVCodecContext *avctx)
+static av_cold int sgi_end(AVCodecContext *avctx)
{
SgiState * const s = avctx->priv_data;
diff --git a/libavcodec/sgienc.c b/libavcodec/sgienc.c
index 147bc8961c..09d3c06c7a 100644
--- a/libavcodec/sgienc.c
+++ b/libavcodec/sgienc.c
@@ -31,7 +31,7 @@ typedef struct SgiContext {
AVFrame picture;
} SgiContext;
-static int encode_init(AVCodecContext *avctx){
+static av_cold int encode_init(AVCodecContext *avctx){
SgiContext *s = avctx->priv_data;
avcodec_get_frame_defaults(&s->picture);
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index 36e0d09188..2f3a1fe168 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -100,7 +100,7 @@ typedef struct ShortenContext {
int32_t lpcqoffset;
} ShortenContext;
-static int shorten_decode_init(AVCodecContext * avctx)
+static av_cold int shorten_decode_init(AVCodecContext * avctx)
{
ShortenContext *s = avctx->priv_data;
s->avctx = avctx;
@@ -501,7 +501,7 @@ frame_done:
return i;
}
-static int shorten_decode_close(AVCodecContext *avctx)
+static av_cold int shorten_decode_close(AVCodecContext *avctx)
{
ShortenContext *s = avctx->priv_data;
int i;
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index d8639383d5..cb90bf6da1 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -506,7 +506,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const
* Init smacker decoder
*
*/
-static int decode_init(AVCodecContext *avctx)
+static av_cold int decode_init(AVCodecContext *avctx)
{
SmackVContext * const c = avctx->priv_data;
@@ -540,7 +540,7 @@ static int decode_init(AVCodecContext *avctx)
* Uninit smacker decoder
*
*/
-static int decode_end(AVCodecContext *avctx)
+static av_cold int decode_end(AVCodecContext *avctx)
{
SmackVContext * const smk = avctx->priv_data;
@@ -556,7 +556,7 @@ static int decode_end(AVCodecContext *avctx)
}
-static int smka_decode_init(AVCodecContext *avctx)
+static av_cold int smka_decode_init(AVCodecContext *avctx)
{
return 0;
}
diff --git a/libavcodec/smc.c b/libavcodec/smc.c
index 364c5967f5..0cdd0dd9c5 100644
--- a/libavcodec/smc.c
+++ b/libavcodec/smc.c
@@ -426,7 +426,7 @@ static void smc_decode_stream(SmcContext *s)
}
}
-static int smc_decode_init(AVCodecContext *avctx)
+static av_cold int smc_decode_init(AVCodecContext *avctx)
{
SmcContext *s = avctx->priv_data;
@@ -464,7 +464,7 @@ static int smc_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int smc_decode_end(AVCodecContext *avctx)
+static av_cold int smc_decode_end(AVCodecContext *avctx)
{
SmcContext *s = avctx->priv_data;
diff --git a/libavcodec/snow.c b/libavcodec/snow.c
index 8fcf548761..b5a381024c 100644
--- a/libavcodec/snow.c
+++ b/libavcodec/snow.c
@@ -3640,7 +3640,7 @@ static void init_qexp(void){
}
}
-static int common_init(AVCodecContext *avctx){
+static av_cold int common_init(AVCodecContext *avctx){
SnowContext *s = avctx->priv_data;
int width, height;
int i, j;
@@ -3960,7 +3960,7 @@ static void dwt_quantize(SnowContext *s, Plane *p, DWTELEM *buffer, int width, i
#endif /* QUANTIZE2==1 */
-static int encode_init(AVCodecContext *avctx)
+static av_cold int encode_init(AVCodecContext *avctx)
{
SnowContext *s = avctx->priv_data;
int plane_index;
@@ -4426,7 +4426,7 @@ redo_frame:
return ff_rac_terminate(c);
}
-static void common_end(SnowContext *s){
+static av_cold void common_end(SnowContext *s){
int plane_index, level, orientation, i;
av_freep(&s->spatial_dwt_buffer);
@@ -4457,7 +4457,7 @@ static void common_end(SnowContext *s){
}
}
-static int encode_end(AVCodecContext *avctx)
+static av_cold int encode_end(AVCodecContext *avctx)
{
SnowContext *s = avctx->priv_data;
@@ -4467,7 +4467,7 @@ static int encode_end(AVCodecContext *avctx)
return 0;
}
-static int decode_init(AVCodecContext *avctx)
+static av_cold int decode_init(AVCodecContext *avctx)
{
avctx->pix_fmt= PIX_FMT_YUV420P;
@@ -4639,7 +4639,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const
return bytes_read;
}
-static int decode_end(AVCodecContext *avctx)
+static av_cold int decode_end(AVCodecContext *avctx)
{
SnowContext *s = avctx->priv_data;
diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c
index 9e193d469d..79641ae513 100644
--- a/libavcodec/sonic.c
+++ b/libavcodec/sonic.c
@@ -503,7 +503,7 @@ static inline int code_samplerate(int samplerate)
return -1;
}
-static int sonic_encode_init(AVCodecContext *avctx)
+static av_cold int sonic_encode_init(AVCodecContext *avctx)
{
SonicContext *s = avctx->priv_data;
PutBitContext pb;
@@ -608,7 +608,7 @@ static int sonic_encode_init(AVCodecContext *avctx)
return 0;
}
-static int sonic_encode_close(AVCodecContext *avctx)
+static av_cold int sonic_encode_close(AVCodecContext *avctx)
{
SonicContext *s = avctx->priv_data;
int i;
@@ -751,7 +751,7 @@ static int sonic_encode_frame(AVCodecContext *avctx,
#endif //CONFIG_ENCODERS
#ifdef CONFIG_DECODERS
-static int sonic_decode_init(AVCodecContext *avctx)
+static av_cold int sonic_decode_init(AVCodecContext *avctx)
{
SonicContext *s = avctx->priv_data;
GetBitContext gb;
@@ -831,7 +831,7 @@ static int sonic_decode_init(AVCodecContext *avctx)
return 0;
}
-static int sonic_decode_close(AVCodecContext *avctx)
+static av_cold int sonic_decode_close(AVCodecContext *avctx)
{
SonicContext *s = avctx->priv_data;
int i;
diff --git a/libavcodec/sunrast.c b/libavcodec/sunrast.c
index 7e71f21ef0..1960073ab4 100644
--- a/libavcodec/sunrast.c
+++ b/libavcodec/sunrast.c
@@ -32,7 +32,7 @@ typedef struct SUNRASTContext {
AVFrame picture;
} SUNRASTContext;
-static int sunrast_init(AVCodecContext *avctx) {
+static av_cold int sunrast_init(AVCodecContext *avctx) {
SUNRASTContext *s = avctx->priv_data;
avcodec_get_frame_defaults(&s->picture);
@@ -172,7 +172,7 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
return buf - bufstart;
}
-static int sunrast_end(AVCodecContext *avctx) {
+static av_cold int sunrast_end(AVCodecContext *avctx) {
SUNRASTContext *s = avctx->priv_data;
if(s->picture.data[0])
diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c
index 081e12ce57..7058964642 100644
--- a/libavcodec/svq1dec.c
+++ b/libavcodec/svq1dec.c
@@ -761,7 +761,7 @@ static int svq1_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int svq1_decode_init(AVCodecContext *avctx)
+static av_cold int svq1_decode_init(AVCodecContext *avctx)
{
MpegEncContext *s = avctx->priv_data;
int i;
@@ -805,7 +805,7 @@ static int svq1_decode_init(AVCodecContext *avctx)
return 0;
}
-static int svq1_decode_end(AVCodecContext *avctx)
+static av_cold int svq1_decode_end(AVCodecContext *avctx)
{
MpegEncContext *s = avctx->priv_data;
diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c
index 7960d4636f..d02e6c083b 100644
--- a/libavcodec/svq1enc.c
+++ b/libavcodec/svq1enc.c
@@ -479,7 +479,7 @@ static int svq1_encode_plane(SVQ1Context *s, int plane, unsigned char *src_plane
return 0;
}
-static int svq1_encode_init(AVCodecContext *avctx)
+static av_cold int svq1_encode_init(AVCodecContext *avctx)
{
SVQ1Context * const s = avctx->priv_data;
@@ -554,7 +554,7 @@ static int svq1_encode_frame(AVCodecContext *avctx, unsigned char *buf,
return (put_bits_count(&s->pb) / 8);
}
-static int svq1_encode_end(AVCodecContext *avctx)
+static av_cold int svq1_encode_end(AVCodecContext *avctx)
{
SVQ1Context * const s = avctx->priv_data;
int i;
diff --git a/libavcodec/targa.c b/libavcodec/targa.c
index 9309157772..8a8bbfa105 100644
--- a/libavcodec/targa.c
+++ b/libavcodec/targa.c
@@ -220,7 +220,7 @@ static int decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int targa_init(AVCodecContext *avctx){
+static av_cold int targa_init(AVCodecContext *avctx){
TargaContext *s = avctx->priv_data;
avcodec_get_frame_defaults((AVFrame*)&s->picture);
@@ -230,7 +230,7 @@ static int targa_init(AVCodecContext *avctx){
return 0;
}
-static int targa_end(AVCodecContext *avctx){
+static av_cold int targa_end(AVCodecContext *avctx){
TargaContext *s = avctx->priv_data;
if(s->picture.data[0])
diff --git a/libavcodec/targaenc.c b/libavcodec/targaenc.c
index 47e33b19e1..007a79591c 100644
--- a/libavcodec/targaenc.c
+++ b/libavcodec/targaenc.c
@@ -133,7 +133,7 @@ static int targa_encode_frame(AVCodecContext *avctx,
return out + 26 - outbuf;
}
-static int targa_encode_init(AVCodecContext *avctx)
+static av_cold int targa_encode_init(AVCodecContext *avctx)
{
return 0;
}
diff --git a/libavcodec/tiertexseqv.c b/libavcodec/tiertexseqv.c
index f106ceb321..60e5736d68 100644
--- a/libavcodec/tiertexseqv.c
+++ b/libavcodec/tiertexseqv.c
@@ -173,7 +173,7 @@ static void seqvideo_decode(SeqVideoContext *seq, const unsigned char *data, int
}
}
-static int seqvideo_decode_init(AVCodecContext *avctx)
+static av_cold int seqvideo_decode_init(AVCodecContext *avctx)
{
SeqVideoContext *seq = avctx->priv_data;
@@ -185,7 +185,7 @@ static int seqvideo_decode_init(AVCodecContext *avctx)
return 0;
}
-static int seqvideo_decode_frame(AVCodecContext *avctx,
+static av_cold int seqvideo_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
const uint8_t *buf, int buf_size)
{
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index a172b62539..4a12a2bb1e 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -461,7 +461,7 @@ static int decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int tiff_init(AVCodecContext *avctx){
+static av_cold int tiff_init(AVCodecContext *avctx){
TiffContext *s = avctx->priv_data;
s->width = 0;
@@ -475,7 +475,7 @@ static int tiff_init(AVCodecContext *avctx){
return 0;
}
-static int tiff_end(AVCodecContext *avctx)
+static av_cold int tiff_end(AVCodecContext *avctx)
{
TiffContext * const s = avctx->priv_data;
diff --git a/libavcodec/truemotion1.c b/libavcodec/truemotion1.c
index 50948fdda3..d825ba1414 100644
--- a/libavcodec/truemotion1.c
+++ b/libavcodec/truemotion1.c
@@ -461,7 +461,7 @@ static int truemotion1_decode_header(TrueMotion1Context *s)
return header.header_size;
}
-static int truemotion1_decode_init(AVCodecContext *avctx)
+static av_cold int truemotion1_decode_init(AVCodecContext *avctx)
{
TrueMotion1Context *s = avctx->priv_data;
@@ -877,7 +877,7 @@ static int truemotion1_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int truemotion1_decode_end(AVCodecContext *avctx)
+static av_cold int truemotion1_decode_end(AVCodecContext *avctx)
{
TrueMotion1Context *s = avctx->priv_data;
diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c
index 4a4ea7b416..26a4b49ce2 100644
--- a/libavcodec/truemotion2.c
+++ b/libavcodec/truemotion2.c
@@ -818,7 +818,7 @@ static int decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int decode_init(AVCodecContext *avctx){
+static av_cold int decode_init(AVCodecContext *avctx){
TM2Context * const l = avctx->priv_data;
int i;
@@ -855,7 +855,7 @@ static int decode_init(AVCodecContext *avctx){
return 0;
}
-static int decode_end(AVCodecContext *avctx){
+static av_cold int decode_end(AVCodecContext *avctx){
TM2Context * const l = avctx->priv_data;
int i;
diff --git a/libavcodec/truespeech.c b/libavcodec/truespeech.c
index 9deac28bef..f25278cee9 100644
--- a/libavcodec/truespeech.c
+++ b/libavcodec/truespeech.c
@@ -50,7 +50,7 @@ typedef struct {
int16_t filters[32]; // filters for every subframe
} TSContext;
-static int truespeech_decode_init(AVCodecContext * avctx)
+static av_cold int truespeech_decode_init(AVCodecContext * avctx)
{
// TSContext *c = avctx->priv_data;
diff --git a/libavcodec/tscc.c b/libavcodec/tscc.c
index 30bb19f976..fd4bee836b 100644
--- a/libavcodec/tscc.c
+++ b/libavcodec/tscc.c
@@ -253,7 +253,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const
* Init tscc decoder
*
*/
-static int decode_init(AVCodecContext *avctx)
+static av_cold int decode_init(AVCodecContext *avctx)
{
CamtasiaContext * const c = avctx->priv_data;
int zret; // Zlib return code
@@ -316,7 +316,7 @@ static int decode_init(AVCodecContext *avctx)
* Uninit tscc decoder
*
*/
-static int decode_end(AVCodecContext *avctx)
+static av_cold int decode_end(AVCodecContext *avctx)
{
CamtasiaContext * const c = avctx->priv_data;
diff --git a/libavcodec/tta.c b/libavcodec/tta.c
index f08b12d90b..57d4c7b9dd 100644
--- a/libavcodec/tta.c
+++ b/libavcodec/tta.c
@@ -197,7 +197,7 @@ static int tta_get_unary(GetBitContext *gb)
return ret;
}
-static int tta_decode_init(AVCodecContext * avctx)
+static av_cold int tta_decode_init(AVCodecContext * avctx)
{
TTAContext *s = avctx->priv_data;
int i;
@@ -425,7 +425,7 @@ static int tta_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int tta_decode_close(AVCodecContext *avctx) {
+static av_cold int tta_decode_close(AVCodecContext *avctx) {
TTAContext *s = avctx->priv_data;
if (s->decode_buffer)
diff --git a/libavcodec/txd.c b/libavcodec/txd.c
index 13e1938bb5..d999d71d61 100644
--- a/libavcodec/txd.c
+++ b/libavcodec/txd.c
@@ -28,7 +28,7 @@ typedef struct TXDContext {
AVFrame picture;
} TXDContext;
-static int txd_init(AVCodecContext *avctx) {
+static av_cold int txd_init(AVCodecContext *avctx) {
TXDContext *s = avctx->priv_data;
avcodec_get_frame_defaults(&s->picture);
@@ -143,7 +143,7 @@ unsupported:
return -1;
}
-static int txd_end(AVCodecContext *avctx) {
+static av_cold int txd_end(AVCodecContext *avctx) {
TXDContext *s = avctx->priv_data;
if (s->picture.data[0])
diff --git a/libavcodec/ulti.c b/libavcodec/ulti.c
index cf0c28f1f0..e1ca0eb032 100644
--- a/libavcodec/ulti.c
+++ b/libavcodec/ulti.c
@@ -41,7 +41,7 @@ typedef struct UltimotionDecodeContext {
const uint8_t *ulti_codebook;
} UltimotionDecodeContext;
-static int ulti_decode_init(AVCodecContext *avctx)
+static av_cold int ulti_decode_init(AVCodecContext *avctx)
{
UltimotionDecodeContext *s = avctx->priv_data;
@@ -393,7 +393,7 @@ static int ulti_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int ulti_decode_end(AVCodecContext *avctx)
+static av_cold int ulti_decode_end(AVCodecContext *avctx)
{
/* UltimotionDecodeContext *s = avctx->priv_data;*/
diff --git a/libavcodec/vb.c b/libavcodec/vb.c
index 7a2e007056..920a0be18e 100644
--- a/libavcodec/vb.c
+++ b/libavcodec/vb.c
@@ -234,7 +234,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const
return buf_size;
}
-static int decode_init(AVCodecContext *avctx)
+static av_cold int decode_init(AVCodecContext *avctx)
{
VBDecContext * const c = avctx->priv_data;
@@ -257,7 +257,7 @@ static int decode_init(AVCodecContext *avctx)
return 0;
}
-static int decode_end(AVCodecContext *avctx)
+static av_cold int decode_end(AVCodecContext *avctx)
{
VBDecContext *c = avctx->priv_data;
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index 77505db119..7621acb751 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -3812,7 +3812,7 @@ static av_always_inline int vc1_unescape_buffer(const uint8_t *src, int size, ui
* @todo TODO: Handle VC-1 IDUs (Transport level?)
* @todo TODO: Decypher remaining bits in extra_data
*/
-static int vc1_decode_init(AVCodecContext *avctx)
+static av_cold int vc1_decode_init(AVCodecContext *avctx)
{
VC1Context *v = avctx->priv_data;
MpegEncContext *s = &v->s;
@@ -4109,7 +4109,7 @@ assert(s->current_picture.pict_type == s->pict_type);
/** Close a VC1/WMV3 decoder
* @warning Initial try at using MpegEncContext stuff
*/
-static int vc1_decode_end(AVCodecContext *avctx)
+static av_cold int vc1_decode_end(AVCodecContext *avctx)
{
VC1Context *v = avctx->priv_data;
diff --git a/libavcodec/vcr1.c b/libavcodec/vcr1.c
index d43faad53e..79dfd136c5 100644
--- a/libavcodec/vcr1.c
+++ b/libavcodec/vcr1.c
@@ -137,14 +137,14 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
}
#endif
-static void common_init(AVCodecContext *avctx){
+static av_cold void common_init(AVCodecContext *avctx){
VCR1Context * const a = avctx->priv_data;
avctx->coded_frame= (AVFrame*)&a->picture;
a->avctx= avctx;
}
-static int decode_init(AVCodecContext *avctx){
+static av_cold int decode_init(AVCodecContext *avctx){
common_init(avctx);
@@ -154,7 +154,7 @@ static int decode_init(AVCodecContext *avctx){
}
#if 0
-static int encode_init(AVCodecContext *avctx){
+static av_cold int encode_init(AVCodecContext *avctx){
common_init(avctx);
diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c
index 4c632621a8..cffc6315fa 100644
--- a/libavcodec/vmdav.c
+++ b/libavcodec/vmdav.c
@@ -322,7 +322,7 @@ static void vmd_decode(VmdVideoContext *s)
}
}
-static int vmdvideo_decode_init(AVCodecContext *avctx)
+static av_cold int vmdvideo_decode_init(AVCodecContext *avctx)
{
VmdVideoContext *s = avctx->priv_data;
int i;
@@ -398,7 +398,7 @@ static int vmdvideo_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int vmdvideo_decode_end(AVCodecContext *avctx)
+static av_cold int vmdvideo_decode_end(AVCodecContext *avctx)
{
VmdVideoContext *s = avctx->priv_data;
@@ -438,7 +438,7 @@ static uint16_t vmdaudio_table[128] = {
0xF00, 0x1000, 0x1400, 0x1800, 0x1C00, 0x2000, 0x3000, 0x4000
};
-static int vmdaudio_decode_init(AVCodecContext *avctx)
+static av_cold int vmdaudio_decode_init(AVCodecContext *avctx)
{
VmdAudioContext *s = avctx->priv_data;
diff --git a/libavcodec/vmnc.c b/libavcodec/vmnc.c
index 12f414856e..cf3efa906c 100644
--- a/libavcodec/vmnc.c
+++ b/libavcodec/vmnc.c
@@ -456,7 +456,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const
* Init VMnc decoder
*
*/
-static int decode_init(AVCodecContext *avctx)
+static av_cold int decode_init(AVCodecContext *avctx)
{
VmncContext * const c = avctx->priv_data;
@@ -496,7 +496,7 @@ static int decode_init(AVCodecContext *avctx)
* Uninit VMnc decoder
*
*/
-static int decode_end(AVCodecContext *avctx)
+static av_cold int decode_end(AVCodecContext *avctx)
{
VmncContext * const c = avctx->priv_data;
diff --git a/libavcodec/vorbis_dec.c b/libavcodec/vorbis_dec.c
index 3ef56dc169..2a63a6496b 100644
--- a/libavcodec/vorbis_dec.c
+++ b/libavcodec/vorbis_dec.c
@@ -923,7 +923,7 @@ static int vorbis_parse_id_hdr(vorbis_context *vc){
// Process the extradata using the functions above (identification header, setup header)
-static int vorbis_decode_init(AVCodecContext *avccontext) {
+static av_cold int vorbis_decode_init(AVCodecContext *avccontext) {
vorbis_context *vc = avccontext->priv_data ;
uint8_t *headers = avccontext->extradata;
int headers_len=avccontext->extradata_size;
@@ -1617,7 +1617,7 @@ static int vorbis_decode_frame(AVCodecContext *avccontext,
// Close decoder
-static int vorbis_decode_close(AVCodecContext *avccontext) {
+static av_cold int vorbis_decode_close(AVCodecContext *avccontext) {
vorbis_context *vc = avccontext->priv_data;
vorbis_free(vc);
diff --git a/libavcodec/vorbis_enc.c b/libavcodec/vorbis_enc.c
index 3912022118..a69aa9ce51 100644
--- a/libavcodec/vorbis_enc.c
+++ b/libavcodec/vorbis_enc.c
@@ -932,7 +932,7 @@ static int apply_window_and_mdct(venc_context_t * venc, signed short * audio, in
return 1;
}
-static int vorbis_encode_init(AVCodecContext * avccontext)
+static av_cold int vorbis_encode_init(AVCodecContext * avccontext)
{
venc_context_t * venc = avccontext->priv_data;
@@ -1015,7 +1015,7 @@ static int vorbis_encode_frame(AVCodecContext * avccontext, unsigned char * pack
}
-static int vorbis_encode_close(AVCodecContext * avccontext)
+static av_cold int vorbis_encode_close(AVCodecContext * avccontext)
{
venc_context_t * venc = avccontext->priv_data;
int i;
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index b18095bc0e..b47923ec6b 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -1933,7 +1933,7 @@ static void theora_calculate_pixel_addresses(Vp3DecodeContext *s)
/*
* This is the ffmpeg/libavcodec API init function.
*/
-static int vp3_decode_init(AVCodecContext *avctx)
+static av_cold int vp3_decode_init(AVCodecContext *avctx)
{
Vp3DecodeContext *s = avctx->priv_data;
int i, inter, plane;
@@ -2310,7 +2310,7 @@ if (!s->keyframe) {
/*
* This is the ffmpeg/libavcodec API module cleanup function.
*/
-static int vp3_decode_end(AVCodecContext *avctx)
+static av_cold int vp3_decode_end(AVCodecContext *avctx)
{
Vp3DecodeContext *s = avctx->priv_data;
int i;
diff --git a/libavcodec/vp5.c b/libavcodec/vp5.c
index 9a7f99723b..77bfedff19 100644
--- a/libavcodec/vp5.c
+++ b/libavcodec/vp5.c
@@ -265,7 +265,7 @@ static void vp5_default_models_init(vp56_context_t *s)
memset(model->vector_pdv, 0x80, sizeof(model->vector_pdv));
}
-static int vp5_decode_init(AVCodecContext *avctx)
+static av_cold int vp5_decode_init(AVCodecContext *avctx)
{
vp56_context_t *s = avctx->priv_data;
diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c
index ca6ae76f9e..35cce07be6 100644
--- a/libavcodec/vp56.c
+++ b/libavcodec/vp56.c
@@ -643,7 +643,7 @@ int vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
return buf_size;
}
-void vp56_init(AVCodecContext *avctx, int flip, int has_alpha)
+av_cold void vp56_init(AVCodecContext *avctx, int flip, int has_alpha)
{
vp56_context_t *s = avctx->priv_data;
int i;
@@ -683,7 +683,7 @@ void vp56_init(AVCodecContext *avctx, int flip, int has_alpha)
}
}
-int vp56_free(AVCodecContext *avctx)
+av_cold int vp56_free(AVCodecContext *avctx)
{
vp56_context_t *s = avctx->priv_data;
diff --git a/libavcodec/vp6.c b/libavcodec/vp6.c
index 1b59ecd078..7f3fe3a0f0 100644
--- a/libavcodec/vp6.c
+++ b/libavcodec/vp6.c
@@ -610,7 +610,7 @@ static void vp6_filter(vp56_context_t *s, uint8_t *dst, uint8_t *src,
}
}
-static int vp6_decode_init(AVCodecContext *avctx)
+static av_cold int vp6_decode_init(AVCodecContext *avctx)
{
vp56_context_t *s = avctx->priv_data;
diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c
index d2beb15d71..ff3f6510ac 100644
--- a/libavcodec/vqavideo.c
+++ b/libavcodec/vqavideo.c
@@ -127,7 +127,7 @@ typedef struct VqaContext {
} VqaContext;
-static int vqa_decode_init(AVCodecContext *avctx)
+static av_cold int vqa_decode_init(AVCodecContext *avctx)
{
VqaContext *s = avctx->priv_data;
unsigned char *vqa_header;
@@ -592,7 +592,7 @@ static int vqa_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int vqa_decode_end(AVCodecContext *avctx)
+static av_cold int vqa_decode_end(AVCodecContext *avctx)
{
VqaContext *s = avctx->priv_data;
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 025898da85..20340cccae 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -354,7 +354,7 @@ static int wv_unpack_mono(WavpackContext *s, GetBitContext *gb, int16_t *dst)
return count;
}
-static int wavpack_decode_init(AVCodecContext *avctx)
+static av_cold int wavpack_decode_init(AVCodecContext *avctx)
{
WavpackContext *s = avctx->priv_data;
diff --git a/libavcodec/wmv2.c b/libavcodec/wmv2.c
index 39efea29c1..1e29363cf9 100644
--- a/libavcodec/wmv2.c
+++ b/libavcodec/wmv2.c
@@ -25,7 +25,7 @@
#include "wmv2.h"
-void ff_wmv2_common_init(Wmv2Context * w){
+av_cold void ff_wmv2_common_init(Wmv2Context * w){
MpegEncContext * const s= &w->s;
ff_init_scantable(s->dsp.idct_permutation, &w->abt_scantable[0], wmv2_scantableA);
diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c
index 20e17867c5..c88ca77b05 100644
--- a/libavcodec/wmv2dec.c
+++ b/libavcodec/wmv2dec.c
@@ -457,7 +457,7 @@ int ff_wmv2_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
return 0;
}
-static int wmv2_decode_init(AVCodecContext *avctx){
+static av_cold int wmv2_decode_init(AVCodecContext *avctx){
Wmv2Context * const w= avctx->priv_data;
if(avctx->idct_algo==FF_IDCT_AUTO){
@@ -474,7 +474,7 @@ static int wmv2_decode_init(AVCodecContext *avctx){
return 0;
}
-static int wmv2_decode_end(AVCodecContext *avctx)
+static av_cold int wmv2_decode_end(AVCodecContext *avctx)
{
Wmv2Context *w = avctx->priv_data;
diff --git a/libavcodec/wmv2enc.c b/libavcodec/wmv2enc.c
index 5c95b20faa..6a5baeb8fb 100644
--- a/libavcodec/wmv2enc.c
+++ b/libavcodec/wmv2enc.c
@@ -51,7 +51,7 @@ static int encode_ext_header(Wmv2Context *w){
return 0;
}
-static int wmv2_encode_init(AVCodecContext *avctx){
+static av_cold int wmv2_encode_init(AVCodecContext *avctx){
Wmv2Context * const w= avctx->priv_data;
if(MPV_encode_init(avctx) < 0)
@@ -67,7 +67,7 @@ static int wmv2_encode_init(AVCodecContext *avctx){
}
#if 0 /* unused, remove? */
-static int wmv2_encode_end(AVCodecContext *avctx){
+static av_cold int wmv2_encode_end(AVCodecContext *avctx){
if(MPV_encode_end(avctx) < 0)
return -1;
diff --git a/libavcodec/wnv1.c b/libavcodec/wnv1.c
index 0aadf4dbed..1df741de77 100644
--- a/libavcodec/wnv1.c
+++ b/libavcodec/wnv1.c
@@ -116,7 +116,7 @@ static int decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int decode_init(AVCodecContext *avctx){
+static av_cold int decode_init(AVCodecContext *avctx){
WNV1Context * const l = avctx->priv_data;
l->avctx = avctx;
diff --git a/libavcodec/ws-snd1.c b/libavcodec/ws-snd1.c
index 057d4bfc29..6858b09c32 100644
--- a/libavcodec/ws-snd1.c
+++ b/libavcodec/ws-snd1.c
@@ -36,7 +36,7 @@ static const char ws_adpcm_4bit[] = {
#define CLIP8(a) if(a>127)a=127;if(a<-128)a=-128;
-static int ws_snd_decode_init(AVCodecContext * avctx)
+static av_cold int ws_snd_decode_init(AVCodecContext * avctx)
{
// WSSNDContext *c = avctx->priv_data;
diff --git a/libavcodec/xan.c b/libavcodec/xan.c
index 8dad6e83f9..c369be1fce 100644
--- a/libavcodec/xan.c
+++ b/libavcodec/xan.c
@@ -54,7 +54,7 @@ typedef struct XanContext {
} XanContext;
-static int xan_decode_init(AVCodecContext *avctx)
+static av_cold int xan_decode_init(AVCodecContext *avctx)
{
XanContext *s = avctx->priv_data;
@@ -445,7 +445,7 @@ static int xan_decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int xan_decode_end(AVCodecContext *avctx)
+static av_cold int xan_decode_end(AVCodecContext *avctx)
{
XanContext *s = avctx->priv_data;
diff --git a/libavcodec/xl.c b/libavcodec/xl.c
index e1fd909186..b607df2cb0 100644
--- a/libavcodec/xl.c
+++ b/libavcodec/xl.c
@@ -117,7 +117,7 @@ static int decode_frame(AVCodecContext *avctx,
return buf_size;
}
-static int decode_init(AVCodecContext *avctx){
+static av_cold int decode_init(AVCodecContext *avctx){
// VideoXLContext * const a = avctx->priv_data;
avctx->pix_fmt= PIX_FMT_YUV411P;
diff --git a/libavcodec/xsubdec.c b/libavcodec/xsubdec.c
index 391a003acb..480fc9af5a 100644
--- a/libavcodec/xsubdec.c
+++ b/libavcodec/xsubdec.c
@@ -22,7 +22,7 @@
#include "bitstream.h"
#include "bytestream.h"
-static int decode_init(AVCodecContext *avctx) {
+static av_cold int decode_init(AVCodecContext *avctx) {
avctx->pix_fmt = PIX_FMT_PAL8;
return 0;
}
diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c
index 972cf2c289..4e67aa90e1 100644
--- a/libavcodec/zmbv.c
+++ b/libavcodec/zmbv.c
@@ -589,7 +589,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const
* Init zmbv decoder
*
*/
-static int decode_init(AVCodecContext *avctx)
+static av_cold int decode_init(AVCodecContext *avctx)
{
ZmbvContext * const c = avctx->priv_data;
int zret; // Zlib return code
@@ -638,7 +638,7 @@ static int decode_init(AVCodecContext *avctx)
* Uninit zmbv decoder
*
*/
-static int decode_end(AVCodecContext *avctx)
+static av_cold int decode_end(AVCodecContext *avctx)
{
ZmbvContext * const c = avctx->priv_data;
diff --git a/libavcodec/zmbvenc.c b/libavcodec/zmbvenc.c
index ce62ece4d2..b8455480da 100644
--- a/libavcodec/zmbvenc.c
+++ b/libavcodec/zmbvenc.c
@@ -231,7 +231,7 @@ static int encode_frame(AVCodecContext *avctx, uint8_t *buf, int buf_size, void
/**
* Init zmbv encoder
*/
-static int encode_init(AVCodecContext *avctx)
+static av_cold int encode_init(AVCodecContext *avctx)
{
ZmbvEncContext * const c = avctx->priv_data;
int zret; // Zlib return code
@@ -297,7 +297,7 @@ static int encode_init(AVCodecContext *avctx)
/**
* Uninit zmbv encoder
*/
-static int encode_end(AVCodecContext *avctx)
+static av_cold int encode_end(AVCodecContext *avctx)
{
ZmbvEncContext * const c = avctx->priv_data;
diff --git a/libavutil/common.h b/libavutil/common.h
index d2489e3f32..4b195776bf 100644
--- a/libavutil/common.h
+++ b/libavutil/common.h
@@ -73,6 +73,14 @@
#endif
#endif
+#ifndef av_cold
+#if defined(__GNUC__) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ > 2)
+# define av_cold __attribute__((cold))
+#else
+# define av_cold
+#endif
+#endif
+
#ifdef HAVE_AV_CONFIG_H
# include "internal.h"
#endif /* HAVE_AV_CONFIG_H */