The av_cold attribute is only effective if the compiler can see it during the
compilation of code that calls a function marked av_cold. Thus the attribute
needs to be part of function declarations in header files.
---
libavcodec/aacps.h | 5 +++--
libavcodec/ac3.h | 4 +++-
libavcodec/ac3dsp.h | 8 +++++---
libavcodec/ac3enc.h | 14 ++++++++------
libavcodec/arm/dsputil_arm.h | 5 +++--
libavcodec/cavs.h | 5 +++--
libavcodec/cavsdsp.h | 6 ++++--
libavcodec/dcadsp.h | 4 +++-
libavcodec/dct.h | 7 ++++---
libavcodec/dctref.h | 4 +++-
libavcodec/dsputil.h | 7 ++++---
libavcodec/dvdata.h | 3 ++-
libavcodec/faxcompr.h | 3 ++-
libavcodec/fft.h | 22 ++++++++++++----------
libavcodec/h263.h | 6 ++++--
libavcodec/iirfilter.h | 17 +++++++++--------
libavcodec/intrax8.h | 6 ++++--
libavcodec/ivi_common.h | 8 +++++---
libavcodec/kbdwin.h | 4 +++-
libavcodec/lpc.h | 8 ++++----
libavcodec/lzw.h | 6 ++++--
libavcodec/mjpegdec.h | 6 +++---
libavcodec/mjpegenc.h | 3 ++-
libavcodec/mlp.h | 3 ++-
libavcodec/mpeg12.h | 3 ++-
libavcodec/mpegaudiodsp.h | 6 ++++--
libavcodec/mpegvideo.h | 13 +++++++------
libavcodec/msmpeg4.h | 3 ++-
libavcodec/rdft.h | 7 ++++---
libavcodec/rv34.h | 5 +++--
libavcodec/rv34dsp.h | 9 +++++----
libavcodec/sbrdsp.h | 6 ++++--
libavcodec/snow.h | 5 +++--
libavcodec/synth_filter.h | 5 +++--
libavcodec/vc1dsp.h | 3 ++-
libavcodec/vp56.h | 5 +++--
libavcodec/vp56dsp.h | 4 +++-
libavcodec/vp8dsp.h | 9 +++++----
libavcodec/wmv2.h | 3 ++-
libavdevice/alsa-audio.h | 10 ++++++----
libavdevice/sndio_common.h | 6 ++++--
libavutil/lfg.h | 4 +++-
libswscale/swscale_internal.h | 9 +++++----
43 files changed, 169 insertions(+), 110 deletions(-)
diff --git a/libavcodec/aacps.h b/libavcodec/aacps.h
index 124fbee..f2a1321 100644
--- a/libavcodec/aacps.h
+++ b/libavcodec/aacps.h
@@ -24,6 +24,7 @@
#include <stdint.h>
+#include "libavutil/attributes.h"
#include "avcodec.h"
#include "get_bits.h"
@@ -74,8 +75,8 @@ typedef struct {
int8_t ipd_hist[PS_MAX_NR_IIDICC];
} PSContext;
-void ff_ps_init(void);
-void ff_ps_ctx_init(PSContext *ps);
+av_cold void ff_ps_init(void);
+av_cold void ff_ps_ctx_init(PSContext *ps);
int ff_ps_read_data(AVCodecContext *avctx, GetBitContext *gb, PSContext *ps,
int bits_left);
int ff_ps_apply(AVCodecContext *avctx, PSContext *ps, float L[2][38][64],
float R[2][38][64], int top);
diff --git a/libavcodec/ac3.h b/libavcodec/ac3.h
index 304c86c..7411d3c 100644
--- a/libavcodec/ac3.h
+++ b/libavcodec/ac3.h
@@ -27,6 +27,8 @@
#ifndef AVCODEC_AC3_H
#define AVCODEC_AC3_H
+#include "libavutil/attributes.h"
+
#define AC3_MAX_CODED_FRAME_SIZE 3840 /* in bytes */
#define AC3_MAX_CHANNELS 7 /**< maximum number of channels,
including coupling channel */
#define CPL_CH 0 /**< coupling channel index */
@@ -129,7 +131,7 @@ typedef enum {
EAC3_FRAME_TYPE_RESERVED
} EAC3FrameType;
-void ff_ac3_common_init(void);
+av_cold void ff_ac3_common_init(void);
/**
* Calculate the log power-spectral density of the input signal.
diff --git a/libavcodec/ac3dsp.h b/libavcodec/ac3dsp.h
index 8eeafd6..3cb8593 100644
--- a/libavcodec/ac3dsp.h
+++ b/libavcodec/ac3dsp.h
@@ -24,6 +24,8 @@
#include <stdint.h>
+#include "libavutil/attributes.h"
+
/**
* Number of mantissa bits written for each bap value.
* bap values with fractional bits are set to 0 and are calculated separately.
@@ -127,8 +129,8 @@ typedef struct AC3DSPContext {
void (*extract_exponents)(uint8_t *exp, int32_t *coef, int nb_coefs);
} AC3DSPContext;
-void ff_ac3dsp_init (AC3DSPContext *c, int bit_exact);
-void ff_ac3dsp_init_arm(AC3DSPContext *c, int bit_exact);
-void ff_ac3dsp_init_x86(AC3DSPContext *c, int bit_exact);
+av_cold void ff_ac3dsp_init (AC3DSPContext *c, int bit_exact);
+av_cold void ff_ac3dsp_init_arm(AC3DSPContext *c, int bit_exact);
+av_cold void ff_ac3dsp_init_x86(AC3DSPContext *c, int bit_exact);
#endif /* AVCODEC_AC3DSP_H */
diff --git a/libavcodec/ac3enc.h b/libavcodec/ac3enc.h
index e8415a2..61f24df 100644
--- a/libavcodec/ac3enc.h
+++ b/libavcodec/ac3enc.h
@@ -29,6 +29,8 @@
#define AVCODEC_AC3ENC_H
#include <stdint.h>
+
+#include "libavutil/attributes.h"
#include "ac3.h"
#include "ac3dsp.h"
#include "avcodec.h"
@@ -260,9 +262,9 @@ typedef struct AC3EncodeContext {
extern const uint64_t ff_ac3_channel_layouts[19];
-int ff_ac3_encode_init(AVCodecContext *avctx);
+av_cold int ff_ac3_encode_init(AVCodecContext *avctx);
-int ff_ac3_encode_close(AVCodecContext *avctx);
+av_cold int ff_ac3_encode_close(AVCodecContext *avctx);
int ff_ac3_validate_metadata(AC3EncodeContext *s);
@@ -285,11 +287,11 @@ void ff_ac3_output_frame(AC3EncodeContext *s, unsigned
char *frame);
/* prototypes for functions in ac3enc_fixed.c and ac3enc_float.c */
-void ff_ac3_fixed_mdct_end(AC3EncodeContext *s);
-void ff_ac3_float_mdct_end(AC3EncodeContext *s);
+av_cold void ff_ac3_fixed_mdct_end(AC3EncodeContext *s);
+av_cold void ff_ac3_float_mdct_end(AC3EncodeContext *s);
-int ff_ac3_fixed_mdct_init(AC3EncodeContext *s);
-int ff_ac3_float_mdct_init(AC3EncodeContext *s);
+av_cold int ff_ac3_fixed_mdct_init(AC3EncodeContext *s);
+av_cold int ff_ac3_float_mdct_init(AC3EncodeContext *s);
/* prototypes for functions in ac3enc_template.c */
diff --git a/libavcodec/arm/dsputil_arm.h b/libavcodec/arm/dsputil_arm.h
index 36d5d56..06b48d8 100644
--- a/libavcodec/arm/dsputil_arm.h
+++ b/libavcodec/arm/dsputil_arm.h
@@ -21,11 +21,12 @@
#ifndef AVCODEC_ARM_DSPUTIL_H
#define AVCODEC_ARM_DSPUTIL_H
+#include "libavutil/attributes.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/dsputil.h"
-void ff_dsputil_init_armv5te(DSPContext* c, AVCodecContext *avctx);
-void ff_dsputil_init_armv6(DSPContext* c, AVCodecContext *avctx);
+av_cold void ff_dsputil_init_armv5te(DSPContext *c, AVCodecContext *avctx);
+av_cold void ff_dsputil_init_armv6(DSPContext *c, AVCodecContext *avctx);
void ff_dsputil_init_vfp(DSPContext* c, AVCodecContext *avctx);
void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx);
diff --git a/libavcodec/cavs.h b/libavcodec/cavs.h
index eda76a8..c6e47ec 100644
--- a/libavcodec/cavs.h
+++ b/libavcodec/cavs.h
@@ -22,6 +22,7 @@
#ifndef AVCODEC_CAVS_H
#define AVCODEC_CAVS_H
+#include "libavutil/attributes.h"
#include "dsputil.h"
#include "mpegvideo.h"
#include "cavsdsp.h"
@@ -315,7 +316,7 @@ void ff_cavs_init_mb(AVSContext *h);
int ff_cavs_next_mb(AVSContext *h);
void ff_cavs_init_pic(AVSContext *h);
void ff_cavs_init_top_lines(AVSContext *h);
-int ff_cavs_init(AVCodecContext *avctx);
-int ff_cavs_end (AVCodecContext *avctx);
+av_cold int ff_cavs_init(AVCodecContext *avctx);
+av_cold int ff_cavs_end (AVCodecContext *avctx);
#endif /* AVCODEC_CAVS_H */
diff --git a/libavcodec/cavsdsp.h b/libavcodec/cavsdsp.h
index b1133b7..7a5f312 100644
--- a/libavcodec/cavsdsp.h
+++ b/libavcodec/cavsdsp.h
@@ -23,6 +23,8 @@
#define AVCODEC_CAVSDSP_H
#include <stdint.h>
+
+#include "libavutil/attributes.h"
#include "dsputil.h"
typedef struct CAVSDSPContext {
@@ -35,7 +37,7 @@ typedef struct CAVSDSPContext {
void (*cavs_idct8_add)(uint8_t *dst, DCTELEM *block, int stride);
} CAVSDSPContext;
-void ff_cavsdsp_init(CAVSDSPContext* c, AVCodecContext *avctx);
-void ff_cavsdsp_init_mmx(CAVSDSPContext* c, AVCodecContext *avctx);
+av_cold void ff_cavsdsp_init(CAVSDSPContext *c, AVCodecContext *avctx);
+av_cold void ff_cavsdsp_init_mmx(CAVSDSPContext *c, AVCodecContext *avctx);
#endif /* AVCODEC_CAVSDSP_H */
diff --git a/libavcodec/dcadsp.h b/libavcodec/dcadsp.h
index 3c6f1f9..a07412b 100644
--- a/libavcodec/dcadsp.h
+++ b/libavcodec/dcadsp.h
@@ -19,12 +19,14 @@
#ifndef AVCODEC_DCADSP_H
#define AVCODEC_DCADSP_H
+#include "libavutil/attributes.h"
+
typedef struct DCADSPContext {
void (*lfe_fir)(float *out, const float *in, const float *coefs,
int decifactor, float scale);
} DCADSPContext;
void ff_dcadsp_init(DCADSPContext *s);
-void ff_dcadsp_init_arm(DCADSPContext *s);
+av_cold void ff_dcadsp_init_arm(DCADSPContext *s);
#endif /* AVCODEC_DCADSP_H */
diff --git a/libavcodec/dct.h b/libavcodec/dct.h
index c898856..1779f83 100644
--- a/libavcodec/dct.h
+++ b/libavcodec/dct.h
@@ -24,6 +24,7 @@
#ifndef AVCODEC_DCT_H
#define AVCODEC_DCT_H
+#include "libavutil/attributes.h"
#include "rdft.h"
struct DCTContext {
@@ -44,9 +45,9 @@ struct DCTContext {
*
* @note the first element of the input of DST-I is ignored
*/
-int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType type);
-void ff_dct_end (DCTContext *s);
+av_cold int ff_dct_init(DCTContext *s, int nbits, enum DCTTransformType type);
+av_cold void ff_dct_end (DCTContext *s);
-void ff_dct_init_mmx(DCTContext *s);
+av_cold void ff_dct_init_mmx(DCTContext *s);
#endif /* AVCODEC_DCT_H */
diff --git a/libavcodec/dctref.h b/libavcodec/dctref.h
index a93b70d..46281ec 100644
--- a/libavcodec/dctref.h
+++ b/libavcodec/dctref.h
@@ -22,8 +22,10 @@
#ifndef AVCODEC_DCTREF_H
#define AVCODEC_DCTREF_H
+#include "libavutil/attributes.h"
+
void ff_ref_fdct(short *block);
void ff_ref_idct(short *block);
-void ff_ref_dct_init(void);
+av_cold void ff_ref_dct_init(void);
#endif /* AVCODEC_DCTREF_H */
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index aa026e1..2d51b63 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -30,6 +30,7 @@
#ifndef AVCODEC_DSPUTIL_H
#define AVCODEC_DSPUTIL_H
+#include "libavutil/attributes.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
@@ -579,8 +580,8 @@ typedef struct DSPContext {
op_fill_func fill_block_tab[2];
} DSPContext;
-void ff_dsputil_static_init(void);
-void ff_dsputil_init(DSPContext* p, AVCodecContext *avctx);
+av_cold void ff_dsputil_static_init(void);
+av_cold void ff_dsputil_init(DSPContext *p, AVCodecContext *avctx);
int ff_check_alignment(void);
@@ -649,7 +650,7 @@ void ff_dsputil_init_sh4(DSPContext* c, AVCodecContext
*avctx);
void ff_dsputil_init_vis(DSPContext* c, AVCodecContext *avctx);
void ff_dsputil_init_dwt(DSPContext *c);
-void ff_intrax8dsp_init(DSPContext* c, AVCodecContext *avctx);
+av_cold void ff_intrax8dsp_init(DSPContext *c, AVCodecContext *avctx);
void ff_mlp_init(DSPContext* c, AVCodecContext *avctx);
void ff_mlp_init_x86(DSPContext* c, AVCodecContext *avctx);
diff --git a/libavcodec/dvdata.h b/libavcodec/dvdata.h
index 8b4811a..3402d73 100644
--- a/libavcodec/dvdata.h
+++ b/libavcodec/dvdata.h
@@ -27,6 +27,7 @@
#ifndef AVCODEC_DVDATA_H
#define AVCODEC_DVDATA_H
+#include "libavutil/attributes.h"
#include "libavutil/rational.h"
#include "avcodec.h"
#include "dsputil.h"
@@ -131,7 +132,7 @@ const DVprofile* avpriv_dv_frame_profile(const DVprofile
*sys,
const DVprofile* avpriv_dv_codec_profile(AVCodecContext* codec);
int ff_dv_init_dynamic_tables(const DVprofile *d);
-int ff_dvvideo_init(AVCodecContext *avctx);
+av_cold int ff_dvvideo_init(AVCodecContext *avctx);
static inline int dv_work_pool_size(const DVprofile *d)
{
diff --git a/libavcodec/faxcompr.h b/libavcodec/faxcompr.h
index 8157f1f..844a227 100644
--- a/libavcodec/faxcompr.h
+++ b/libavcodec/faxcompr.h
@@ -27,13 +27,14 @@
#ifndef AVCODEC_FAXCOMPR_H
#define AVCODEC_FAXCOMPR_H
+#include "libavutil/rational.h"
#include "avcodec.h"
#include "tiff.h"
/**
* initialize upacker code
*/
-void ff_ccitt_unpack_init(void);
+av_cold void ff_ccitt_unpack_init(void);
/**
* unpack data compressed with CCITT Group 3 1/2-D or Group 4 method
diff --git a/libavcodec/fft.h b/libavcodec/fft.h
index 706f94b..e51a5fe 100644
--- a/libavcodec/fft.h
+++ b/libavcodec/fft.h
@@ -27,8 +27,10 @@
#endif
#include <stdint.h>
-#include "config.h"
+
+#include "libavutil/attributes.h"
#include "libavutil/mem.h"
+#include "config.h"
#if CONFIG_FFT_FLOAT
@@ -121,7 +123,7 @@ extern COSTABLE_CONST FFTSample* const
FFT_NAME(ff_cos_tabs)[17];
* Initialize the cosine table in ff_cos_tabs[index]
* @param index index in ff_cos_tabs array of the table to initialize
*/
-void ff_init_ff_cos_tabs(int index);
+av_cold void ff_init_ff_cos_tabs(int index);
#define ff_fft_init FFT_NAME(ff_fft_init)
#define ff_fft_end FFT_NAME(ff_fft_end)
@@ -131,22 +133,22 @@ void ff_init_ff_cos_tabs(int index);
* @param nbits log2 of the length of the input array
* @param inverse if 0 perform the forward transform, if 1 perform the
inverse
*/
-int ff_fft_init(FFTContext *s, int nbits, int inverse);
+av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse);
#if CONFIG_FFT_FLOAT
-void ff_fft_init_altivec(FFTContext *s);
-void ff_fft_init_mmx(FFTContext *s);
-void ff_fft_init_arm(FFTContext *s);
+av_cold void ff_fft_init_altivec(FFTContext *s);
+av_cold void ff_fft_init_mmx(FFTContext *s);
+av_cold void ff_fft_init_arm(FFTContext *s);
#else
-void ff_fft_fixed_init_arm(FFTContext *s);
+av_cold void ff_fft_fixed_init_arm(FFTContext *s);
#endif
-void ff_fft_end(FFTContext *s);
+av_cold void ff_fft_end(FFTContext *s);
#define ff_mdct_init FFT_NAME(ff_mdct_init)
#define ff_mdct_end FFT_NAME(ff_mdct_end)
-int ff_mdct_init(FFTContext *s, int nbits, int inverse, double scale);
-void ff_mdct_end(FFTContext *s);
+av_cold int ff_mdct_init(FFTContext *s, int nbits, int inverse, double scale);
+av_cold void ff_mdct_end(FFTContext *s);
#endif /* AVCODEC_FFT_H */
diff --git a/libavcodec/h263.h b/libavcodec/h263.h
index 2a1ae48..17b4553 100644
--- a/libavcodec/h263.h
+++ b/libavcodec/h263.h
@@ -21,6 +21,8 @@
#define AVCODEC_H263_H
#include <stdint.h>
+
+#include "libavutil/attributes.h"
#include "libavutil/rational.h"
#include "get_bits.h"
#include "mpegvideo.h"
@@ -67,11 +69,11 @@ extern uint8_t
ff_h263_static_rl_table_store[2][2][2*MAX_RUN + MAX_LEVEL + 3];
int ff_h263_decode_motion(MpegEncContext * s, int pred, int f_code);
av_const int ff_h263_aspect_to_info(AVRational aspect);
-int ff_h263_decode_init(AVCodecContext *avctx);
+av_cold int ff_h263_decode_init(AVCodecContext *avctx);
int ff_h263_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt);
-int ff_h263_decode_end(AVCodecContext *avctx);
+av_cold int ff_h263_decode_end(AVCodecContext *avctx);
void ff_h263_encode_mb(MpegEncContext *s,
DCTELEM block[6][64],
int motion_x, int motion_y);
diff --git a/libavcodec/iirfilter.h b/libavcodec/iirfilter.h
index bc65a96..c2be0f5 100644
--- a/libavcodec/iirfilter.h
+++ b/libavcodec/iirfilter.h
@@ -27,6 +27,7 @@
#ifndef AVCODEC_IIRFILTER_H
#define AVCODEC_IIRFILTER_H
+#include "libavutil/attributes.h"
#include "avcodec.h"
struct FFIIRFilterCoeffs;
@@ -61,11 +62,11 @@ enum IIRFilterMode{
*
* @return pointer to filter coefficients structure or NULL if filter cannot
be created
*/
-struct FFIIRFilterCoeffs* ff_iir_filter_init_coeffs(void *avc,
- enum IIRFilterType filt_type,
- enum IIRFilterMode filt_mode,
- int order, float cutoff_ratio,
- float stopband, float ripple);
+av_cold struct FFIIRFilterCoeffs *ff_iir_filter_init_coeffs(void *avc,
+ enum IIRFilterType
filt_type,
+ enum IIRFilterMode
filt_mode,
+ int order, float
cutoff_ratio,
+ float stopband,
float ripple);
/**
* Create new filter state.
@@ -74,21 +75,21 @@ struct FFIIRFilterCoeffs* ff_iir_filter_init_coeffs(void
*avc,
*
* @return pointer to new filter state or NULL if state creation fails
*/
-struct FFIIRFilterState* ff_iir_filter_init_state(int order);
+av_cold struct FFIIRFilterState* ff_iir_filter_init_state(int order);
/**
* Free filter coefficients.
*
* @param coeffs pointer allocated with ff_iir_filter_init_coeffs()
*/
-void ff_iir_filter_free_coeffs(struct FFIIRFilterCoeffs *coeffs);
+av_cold void ff_iir_filter_free_coeffs(struct FFIIRFilterCoeffs *coeffs);
/**
* Free filter state.
*
* @param state pointer allocated with ff_iir_filter_init_state()
*/
-void ff_iir_filter_free_state(struct FFIIRFilterState *state);
+av_cold void ff_iir_filter_free_state(struct FFIIRFilterState *state);
/**
* Perform IIR filtering on signed 16-bit input samples.
diff --git a/libavcodec/intrax8.h b/libavcodec/intrax8.h
index 3a58938..6889e24 100644
--- a/libavcodec/intrax8.h
+++ b/libavcodec/intrax8.h
@@ -19,6 +19,7 @@
#ifndef AVCODEC_INTRAX8_H
#define AVCODEC_INTRAX8_H
+#include "libavutil/attributes.h"
#include "get_bits.h"
#include "mpegvideo.h"
@@ -50,8 +51,9 @@ typedef struct{
int est_run;
} IntraX8Context;
-void ff_intrax8_common_init(IntraX8Context * w, MpegEncContext * const s);
-void ff_intrax8_common_end(IntraX8Context * w);
+av_cold void ff_intrax8_common_init(IntraX8Context *w,
+ MpegEncContext *const s);
+av_cold void ff_intrax8_common_end(IntraX8Context *w);
int ff_intrax8_decode_picture(IntraX8Context * w, int quant, int halfpq);
#endif /* AVCODEC_INTRAX8_H */
diff --git a/libavcodec/ivi_common.h b/libavcodec/ivi_common.h
index 4b2ae06..660e840 100644
--- a/libavcodec/ivi_common.h
+++ b/libavcodec/ivi_common.h
@@ -29,6 +29,7 @@
#ifndef AVCODEC_IVI_COMMON_H
#define AVCODEC_IVI_COMMON_H
+#include "libavutil/attributes.h"
#include "avcodec.h"
#include "get_bits.h"
#include <stdint.h>
@@ -271,14 +272,14 @@ void ff_ivi_huff_desc_copy(IVIHuffDesc *dst, const
IVIHuffDesc *src);
* @param[in] cfg pointer to the ivi_pic_config structure describing
picture layout
* @return result code: 0 - OK
*/
-int ff_ivi_init_planes(IVIPlaneDesc *planes, const IVIPicConfig *cfg);
+av_cold int ff_ivi_init_planes(IVIPlaneDesc *planes, const IVIPicConfig *cfg);
/**
* Free planes, bands and macroblocks buffers.
*
* @param[in] planes pointer to the array of the plane descriptors
*/
-void ff_ivi_free_buffers(IVIPlaneDesc *planes);
+av_cold void ff_ivi_free_buffers(IVIPlaneDesc *planes);
/**
* Initialize tile and macroblock descriptors.
@@ -288,7 +289,8 @@ void ff_ivi_free_buffers(IVIPlaneDesc *planes);
* @param[in] tile_height tile height
* @return result code: 0 - OK
*/
-int ff_ivi_init_tiles(IVIPlaneDesc *planes, int tile_width, int tile_height);
+av_cold int ff_ivi_init_tiles(IVIPlaneDesc *planes, int tile_width,
+ int tile_height);
/**
* Decode size of the tile data.
diff --git a/libavcodec/kbdwin.h b/libavcodec/kbdwin.h
index 89b569a..9fe7b46 100644
--- a/libavcodec/kbdwin.h
+++ b/libavcodec/kbdwin.h
@@ -19,6 +19,8 @@
#ifndef AVCODEC_KBDWIN_H
#define AVCODEC_KBDWIN_H
+#include "libavutil/attributes.h"
+
/**
* Maximum window size for ff_kbd_window_init.
*/
@@ -30,6 +32,6 @@
* @param alpha determines window shape
* @param n size of half window, max FF_KBD_WINDOW_MAX
*/
-void ff_kbd_window_init(float *window, float alpha, int n);
+av_cold void ff_kbd_window_init(float *window, float alpha, int n);
#endif /* AVCODEC_KBDWIN_H */
diff --git a/libavcodec/lpc.h b/libavcodec/lpc.h
index 1775374..dcc3e4f 100644
--- a/libavcodec/lpc.h
+++ b/libavcodec/lpc.h
@@ -94,14 +94,14 @@ int ff_lpc_calc_coefs(LPCContext *s,
/**
* Initialize LPCContext.
*/
-int ff_lpc_init(LPCContext *s, int blocksize, int max_order,
- enum FFLPCType lpc_type);
-void ff_lpc_init_x86(LPCContext *s);
+av_cold int ff_lpc_init(LPCContext *s, int blocksize, int max_order,
+ enum FFLPCType lpc_type);
+av_cold void ff_lpc_init_x86(LPCContext *s);
/**
* Uninitialize LPCContext.
*/
-void ff_lpc_end(LPCContext *s);
+av_cold void ff_lpc_end(LPCContext *s);
#ifdef LPC_USE_DOUBLE
#define LPC_TYPE double
diff --git a/libavcodec/lzw.h b/libavcodec/lzw.h
index ab782f5..f10dce5 100644
--- a/libavcodec/lzw.h
+++ b/libavcodec/lzw.h
@@ -32,6 +32,8 @@
#include <stdint.h>
+#include "libavutil/attributes.h"
+
struct PutBitContext;
enum FF_LZW_MODES{
@@ -43,8 +45,8 @@ enum FF_LZW_MODES{
typedef void LZWState;
/* first two functions de/allocate memory for LZWState */
-void ff_lzw_decode_open(LZWState **p);
-void ff_lzw_decode_close(LZWState **p);
+av_cold void ff_lzw_decode_open(LZWState **p);
+av_cold void ff_lzw_decode_close(LZWState **p);
int ff_lzw_decode_init(LZWState *s, int csize, const uint8_t *buf, int
buf_size, int mode);
int ff_lzw_decode(LZWState *s, uint8_t *buf, int len);
const uint8_t* ff_lzw_cur_ptr(LZWState *lzw);
diff --git a/libavcodec/mjpegdec.h b/libavcodec/mjpegdec.h
index bfa987d..0b53965 100644
--- a/libavcodec/mjpegdec.h
+++ b/libavcodec/mjpegdec.h
@@ -29,8 +29,8 @@
#ifndef AVCODEC_MJPEGDEC_H
#define AVCODEC_MJPEGDEC_H
+#include "libavutil/attributes.h"
#include "libavutil/log.h"
-
#include "avcodec.h"
#include "get_bits.h"
#include "dsputil.h"
@@ -113,8 +113,8 @@ typedef struct MJpegDecodeContext {
int extern_huff;
} MJpegDecodeContext;
-int ff_mjpeg_decode_init(AVCodecContext *avctx);
-int ff_mjpeg_decode_end(AVCodecContext *avctx);
+av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx);
+av_cold int ff_mjpeg_decode_end(AVCodecContext *avctx);
int ff_mjpeg_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
AVPacket *avpkt);
diff --git a/libavcodec/mjpegenc.h b/libavcodec/mjpegenc.h
index 12ff540..f7f7d7f 100644
--- a/libavcodec/mjpegenc.h
+++ b/libavcodec/mjpegenc.h
@@ -33,6 +33,7 @@
#ifndef AVCODEC_MJPEGENC_H
#define AVCODEC_MJPEGENC_H
+#include "libavutil/attributes.h"
#include "dsputil.h"
#include "mpegvideo.h"
@@ -48,7 +49,7 @@ typedef struct MJpegContext {
uint16_t huff_code_ac_chrominance[256];
} MJpegContext;
-int ff_mjpeg_encode_init(MpegEncContext *s);
+av_cold int ff_mjpeg_encode_init(MpegEncContext *s);
void ff_mjpeg_encode_close(MpegEncContext *s);
void ff_mjpeg_encode_picture_header(MpegEncContext *s);
void ff_mjpeg_encode_picture_trailer(MpegEncContext *s);
diff --git a/libavcodec/mlp.h b/libavcodec/mlp.h
index b001ad2..4371b6e 100644
--- a/libavcodec/mlp.h
+++ b/libavcodec/mlp.h
@@ -24,6 +24,7 @@
#include <stdint.h>
+#include "libavutil/attributes.h"
#include "avcodec.h"
/** Last possible matrix channel for each codec */
@@ -114,7 +115,7 @@ uint8_t ff_mlp_restart_checksum(const uint8_t *buf,
unsigned int bit_size);
*/
uint8_t ff_mlp_calculate_parity(const uint8_t *buf, unsigned int buf_size);
-void ff_mlp_init_crc(void);
+av_cold void ff_mlp_init_crc(void);
/** XOR four bytes into one. */
static inline uint8_t xor_32_to_8(uint32_t value)
diff --git a/libavcodec/mpeg12.h b/libavcodec/mpeg12.h
index ab0352f..8f57744 100644
--- a/libavcodec/mpeg12.h
+++ b/libavcodec/mpeg12.h
@@ -22,6 +22,7 @@
#ifndef AVCODEC_MPEG12_H
#define AVCODEC_MPEG12_H
+#include "libavutil/attributes.h"
#include "mpegvideo.h"
#define DC_VLC_BITS 9
@@ -46,7 +47,7 @@ typedef struct Mpeg1Context {
extern uint8_t ff_mpeg12_static_rl_table_store[2][2][2*MAX_RUN + MAX_LEVEL +
3];
-void ff_mpeg12_common_init(MpegEncContext *s);
+av_cold void ff_mpeg12_common_init(MpegEncContext *s);
void ff_mpeg12_init_vlcs(void);
static inline int decode_dc(GetBitContext *gb, int component)
diff --git a/libavcodec/mpegaudiodsp.h b/libavcodec/mpegaudiodsp.h
index c24ea41..e312d8c 100644
--- a/libavcodec/mpegaudiodsp.h
+++ b/libavcodec/mpegaudiodsp.h
@@ -20,6 +20,8 @@
#define AVCODEC_MPEGAUDIODSP_H
#include <stdint.h>
+
+#include "libavutil/attributes.h"
#include "libavutil/common.h"
typedef struct MPADSPContext {
@@ -56,8 +58,8 @@ void ff_mpadsp_init_arm(MPADSPContext *s);
void ff_mpadsp_init_mmx(MPADSPContext *s);
void ff_mpadsp_init_altivec(MPADSPContext *s);
-void ff_mpa_synth_init_float(float *window);
-void ff_mpa_synth_init_fixed(int32_t *window);
+av_cold void ff_mpa_synth_init_float(float *window);
+av_cold void ff_mpa_synth_init_fixed(int32_t *window);
void ff_mpadsp_apply_window_float(float *synth_buf, float *window,
int *dither_state, float *samples,
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index 8f788a7..257d36a 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -37,6 +37,7 @@
#include "mpeg12data.h"
#include "rl.h"
+#include "libavutil/attributes.h"
#include "libavutil/opt.h"
#define FRAME_SKIPPED 100 ///< return value for header parsers if frame is not
coded
@@ -734,13 +735,13 @@ static const AVClass name ## _class = {\
};
void ff_MPV_decode_defaults(MpegEncContext *s);
-int ff_MPV_common_init(MpegEncContext *s);
+av_cold int ff_MPV_common_init(MpegEncContext *s);
void ff_MPV_common_end(MpegEncContext *s);
void ff_MPV_decode_mb(MpegEncContext *s, DCTELEM block[12][64]);
int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx);
void ff_MPV_frame_end(MpegEncContext *s);
-int ff_MPV_encode_init(AVCodecContext *avctx);
-int ff_MPV_encode_end(AVCodecContext *avctx);
+av_cold int ff_MPV_encode_init(AVCodecContext *avctx);
+av_cold int ff_MPV_encode_end(AVCodecContext *avctx);
int ff_MPV_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
const AVFrame *frame, int *got_packet);
void ff_MPV_common_init_mmx(MpegEncContext *s);
@@ -768,7 +769,7 @@ void ff_er_frame_start(MpegEncContext *s);
void ff_er_frame_end(MpegEncContext *s);
void ff_er_add_slice(MpegEncContext *s, int startx, int starty, int endx, int
endy, int status);
-int ff_dct_common_init(MpegEncContext *s);
+av_cold int ff_dct_common_init(MpegEncContext *s);
void ff_convert_matrix(DSPContext *dsp, int (*qmat)[64], uint16_t
(*qmat16)[2][64],
const uint16_t *quant_matrix, int bias, int qmin, int
qmax, int intra);
@@ -874,8 +875,8 @@ void ff_msmpeg4_encode_mb(MpegEncContext * s,
int motion_x, int motion_y);
int ff_msmpeg4_decode_picture_header(MpegEncContext * s);
int ff_msmpeg4_decode_ext_header(MpegEncContext * s, int buf_size);
-int ff_msmpeg4_decode_init(AVCodecContext *avctx);
-void ff_msmpeg4_encode_init(MpegEncContext *s);
+av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx);
+av_cold void ff_msmpeg4_encode_init(MpegEncContext *s);
int ff_wmv2_decode_picture_header(MpegEncContext * s);
int ff_wmv2_decode_secondary_picture_header(MpegEncContext * s);
void ff_wmv2_add_mb(MpegEncContext *s, DCTELEM block[6][64], uint8_t *dest_y,
uint8_t *dest_cb, uint8_t *dest_cr);
diff --git a/libavcodec/msmpeg4.h b/libavcodec/msmpeg4.h
index 8fe07f2..f6a9f64 100644
--- a/libavcodec/msmpeg4.h
+++ b/libavcodec/msmpeg4.h
@@ -24,6 +24,7 @@
#include <stdint.h>
+#include "libavutil/attributes.h"
#include "config.h"
#include "avcodec.h"
#include "dsputil.h"
@@ -44,7 +45,7 @@ extern VLC ff_mb_non_intra_vlc[4];
extern VLC ff_inter_intra_vlc;
void ff_msmpeg4_code012(PutBitContext *pb, int n);
-void ff_msmpeg4_common_init(MpegEncContext *s);
+av_cold void ff_msmpeg4_common_init(MpegEncContext *s);
void ff_msmpeg4_encode_block(MpegEncContext * s, DCTELEM * block, int n);
void ff_msmpeg4_handle_slices(MpegEncContext *s);
void ff_msmpeg4_encode_motion(MpegEncContext * s, int mx, int my);
diff --git a/libavcodec/rdft.h b/libavcodec/rdft.h
index 8ff620f..6c788e0 100644
--- a/libavcodec/rdft.h
+++ b/libavcodec/rdft.h
@@ -65,10 +65,11 @@ struct RDFTContext {
* @param nbits log2 of the length of the input array
* @param trans the type of transform
*/
-int ff_rdft_init(RDFTContext *s, int nbits, enum RDFTransformType trans);
-void ff_rdft_end(RDFTContext *s);
+av_cold int ff_rdft_init(RDFTContext *s, int nbits,
+ enum RDFTransformType trans);
+av_cold void ff_rdft_end(RDFTContext *s);
-void ff_rdft_init_arm(RDFTContext *s);
+av_cold void ff_rdft_init_arm(RDFTContext *s);
#endif /* AVCODEC_RDFT_H */
diff --git a/libavcodec/rv34.h b/libavcodec/rv34.h
index 7623214..5635099 100644
--- a/libavcodec/rv34.h
+++ b/libavcodec/rv34.h
@@ -27,6 +27,7 @@
#ifndef AVCODEC_RV34_H
#define AVCODEC_RV34_H
+#include "libavutil/attributes.h"
#include "avcodec.h"
#include "dsputil.h"
#include "mpegvideo.h"
@@ -130,9 +131,9 @@ typedef struct RV34DecContext{
* common decoding functions
*/
int ff_rv34_get_start_offset(GetBitContext *gb, int blocks);
-int ff_rv34_decode_init(AVCodecContext *avctx);
+av_cold int ff_rv34_decode_init(AVCodecContext *avctx);
int ff_rv34_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
AVPacket *avpkt);
-int ff_rv34_decode_end(AVCodecContext *avctx);
+av_cold int ff_rv34_decode_end(AVCodecContext *avctx);
int ff_rv34_decode_init_thread_copy(AVCodecContext *avctx);
int ff_rv34_decode_update_thread_context(AVCodecContext *dst, const
AVCodecContext *src);
diff --git a/libavcodec/rv34dsp.h b/libavcodec/rv34dsp.h
index c70194c..a7bcdff 100644
--- a/libavcodec/rv34dsp.h
+++ b/libavcodec/rv34dsp.h
@@ -27,6 +27,7 @@
#ifndef AVCODEC_RV34DSP_H
#define AVCODEC_RV34DSP_H
+#include "libavutil/attributes.h"
#include "dsputil.h"
typedef void (*rv40_weight_func)(uint8_t *dst/*align width (8 or 16)*/,
@@ -68,12 +69,12 @@ typedef struct RV34DSPContext {
rv40_loop_filter_strength_func rv40_loop_filter_strength[2];
} RV34DSPContext;
-void ff_rv30dsp_init(RV34DSPContext *c, DSPContext* dsp);
-void ff_rv34dsp_init(RV34DSPContext *c, DSPContext* dsp);
-void ff_rv40dsp_init(RV34DSPContext *c, DSPContext* dsp);
+av_cold void ff_rv30dsp_init(RV34DSPContext *c, DSPContext *dsp);
+av_cold void ff_rv34dsp_init(RV34DSPContext *c, DSPContext *dsp);
+av_cold void ff_rv40dsp_init(RV34DSPContext *c, DSPContext *dsp);
void ff_rv34dsp_init_neon(RV34DSPContext *c, DSPContext *dsp);
-void ff_rv34dsp_init_x86(RV34DSPContext *c, DSPContext *dsp);
+av_cold void ff_rv34dsp_init_x86(RV34DSPContext *c, DSPContext *dsp);
void ff_rv40dsp_init_x86(RV34DSPContext *c, DSPContext *dsp);
void ff_rv40dsp_init_neon(RV34DSPContext *c, DSPContext *dsp);
diff --git a/libavcodec/sbrdsp.h b/libavcodec/sbrdsp.h
index 07235c6..28b5492 100644
--- a/libavcodec/sbrdsp.h
+++ b/libavcodec/sbrdsp.h
@@ -23,6 +23,8 @@
#include <stdint.h>
+#include "libavutil/attributes.h"
+
typedef struct SBRDSPContext {
void (*sum64x5)(float *z);
float (*sum_square)(float (*x)[2], int n);
@@ -44,8 +46,8 @@ typedef struct SBRDSPContext {
extern const float ff_sbr_noise_table[][2];
-void ff_sbrdsp_init(SBRDSPContext *s);
-void ff_sbrdsp_init_arm(SBRDSPContext *s);
+av_cold void ff_sbrdsp_init(SBRDSPContext *s);
+av_cold void ff_sbrdsp_init_arm(SBRDSPContext *s);
void ff_sbrdsp_init_x86(SBRDSPContext *s);
#endif /* AVCODEC_SBRDSP_H */
diff --git a/libavcodec/snow.h b/libavcodec/snow.h
index 5edb8f8..db5a5f9 100644
--- a/libavcodec/snow.h
+++ b/libavcodec/snow.h
@@ -22,6 +22,7 @@
#ifndef AVCODEC_SNOW_H
#define AVCODEC_SNOW_H
+#include "libavutil/attributes.h"
#include "dsputil.h"
#include "dwt.h"
@@ -209,9 +210,9 @@ static av_always_inline void
snow_horizontal_compose_liftS_lead_out(int i, IDWTE
/* common code */
-int ff_snow_common_init(AVCodecContext *avctx);
+av_cold int ff_snow_common_init(AVCodecContext *avctx);
int ff_snow_common_init_after_header(AVCodecContext *avctx);
-void ff_snow_common_end(SnowContext *s);
+av_cold void ff_snow_common_end(SnowContext *s);
void ff_snow_release_buffer(AVCodecContext *avctx);
void ff_snow_reset_contexts(SnowContext *s);
int ff_snow_alloc_blocks(SnowContext *s);
diff --git a/libavcodec/synth_filter.h b/libavcodec/synth_filter.h
index 7b73578..7d2e007 100644
--- a/libavcodec/synth_filter.h
+++ b/libavcodec/synth_filter.h
@@ -21,6 +21,7 @@
#ifndef AVCODEC_SYNTH_FILTER_H
#define AVCODEC_SYNTH_FILTER_H
+#include "libavutil/attributes.h"
#include "fft.h"
typedef struct SynthFilterContext {
@@ -31,7 +32,7 @@ typedef struct SynthFilterContext {
float scale);
} SynthFilterContext;
-void ff_synth_filter_init(SynthFilterContext *c);
-void ff_synth_filter_init_arm(SynthFilterContext *c);
+av_cold void ff_synth_filter_init(SynthFilterContext *c);
+av_cold void ff_synth_filter_init_arm(SynthFilterContext *c);
#endif /* AVCODEC_SYNTH_FILTER_H */
diff --git a/libavcodec/vc1dsp.h b/libavcodec/vc1dsp.h
index 3e0a88e..5fb0266 100644
--- a/libavcodec/vc1dsp.h
+++ b/libavcodec/vc1dsp.h
@@ -28,6 +28,7 @@
#ifndef AVCODEC_VC1DSP_H
#define AVCODEC_VC1DSP_H
+#include "libavutil/attributes.h"
#include "dsputil.h"
typedef struct VC1DSPContext {
@@ -72,7 +73,7 @@ typedef struct VC1DSPContext {
int alpha, int width);
} VC1DSPContext;
-void ff_vc1dsp_init(VC1DSPContext* c);
+av_cold void ff_vc1dsp_init(VC1DSPContext *c);
void ff_vc1dsp_init_altivec(VC1DSPContext* c);
void ff_vc1dsp_init_mmx(VC1DSPContext* dsp);
diff --git a/libavcodec/vp56.h b/libavcodec/vp56.h
index 0607e0d..2f46089 100644
--- a/libavcodec/vp56.h
+++ b/libavcodec/vp56.h
@@ -26,6 +26,7 @@
#ifndef AVCODEC_VP56_H
#define AVCODEC_VP56_H
+#include "libavutil/attributes.h"
#include "vp56data.h"
#include "dsputil.h"
#include "get_bits.h"
@@ -171,8 +172,8 @@ struct vp56_context {
};
-void ff_vp56_init(AVCodecContext *avctx, int flip, int has_alpha);
-int ff_vp56_free(AVCodecContext *avctx);
+av_cold void ff_vp56_init(AVCodecContext *avctx, int flip, int has_alpha);
+av_cold int ff_vp56_free(AVCodecContext *avctx);
void ff_vp56_init_dequant(VP56Context *s, int quantizer);
int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
AVPacket *avpkt);
diff --git a/libavcodec/vp56dsp.h b/libavcodec/vp56dsp.h
index 3bd6d27..229d720 100644
--- a/libavcodec/vp56dsp.h
+++ b/libavcodec/vp56dsp.h
@@ -22,6 +22,8 @@
#define AVCODEC_VP56DSP_H
#include <stdint.h>
+
+#include "libavutil/attributes.h"
#include "avcodec.h"
typedef struct VP56DSPContext {
@@ -37,6 +39,6 @@ void ff_vp6_filter_diag4_c(uint8_t *dst, uint8_t *src, int
stride,
void ff_vp56dsp_init(VP56DSPContext *s, enum CodecID codec);
void ff_vp56dsp_init_arm(VP56DSPContext *s, enum CodecID codec);
-void ff_vp56dsp_init_x86(VP56DSPContext* c, enum CodecID codec);
+av_cold void ff_vp56dsp_init_x86(VP56DSPContext *c, enum CodecID codec);
#endif /* AVCODEC_VP56DSP_H */
diff --git a/libavcodec/vp8dsp.h b/libavcodec/vp8dsp.h
index 62cc010..7b5aec1 100644
--- a/libavcodec/vp8dsp.h
+++ b/libavcodec/vp8dsp.h
@@ -27,6 +27,7 @@
#ifndef AVCODEC_VP8DSP_H
#define AVCODEC_VP8DSP_H
+#include "libavutil/attributes.h"
#include "dsputil.h"
typedef void (*vp8_mc_func)(uint8_t *dst/*align 8*/, ptrdiff_t dstStride,
@@ -87,9 +88,9 @@ void ff_put_vp8_pixels8_c(uint8_t *dst, uint8_t *src,
ptrdiff_t stride,
void ff_put_vp8_pixels4_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
int h, int x, int y);
-void ff_vp8dsp_init(VP8DSPContext *c);
-void ff_vp8dsp_init_x86(VP8DSPContext *c);
-void ff_vp8dsp_init_altivec(VP8DSPContext *c);
-void ff_vp8dsp_init_arm(VP8DSPContext *c);
+av_cold void ff_vp8dsp_init(VP8DSPContext *c);
+av_cold void ff_vp8dsp_init_x86(VP8DSPContext *c);
+av_cold void ff_vp8dsp_init_altivec(VP8DSPContext *c);
+av_cold void ff_vp8dsp_init_arm(VP8DSPContext *c);
#endif /* AVCODEC_VP8DSP_H */
diff --git a/libavcodec/wmv2.h b/libavcodec/wmv2.h
index 80f36cc..22e3f40 100644
--- a/libavcodec/wmv2.h
+++ b/libavcodec/wmv2.h
@@ -21,6 +21,7 @@
#ifndef AVCODEC_WMV2_H
#define AVCODEC_WMV2_H
+#include "libavutil/attributes.h"
#include "avcodec.h"
#include "dsputil.h"
#include "mpegvideo.h"
@@ -53,6 +54,6 @@ typedef struct Wmv2Context{
DECLARE_ALIGNED(16, DCTELEM, abt_block2)[6][64];
}Wmv2Context;
-void ff_wmv2_common_init(Wmv2Context * w);
+av_cold void ff_wmv2_common_init(Wmv2Context *w);
#endif /* AVCODEC_WMV2_H */
diff --git a/libavdevice/alsa-audio.h b/libavdevice/alsa-audio.h
index ee43463..eb7f60c 100644
--- a/libavdevice/alsa-audio.h
+++ b/libavdevice/alsa-audio.h
@@ -31,6 +31,8 @@
#define AVDEVICE_ALSA_AUDIO_H
#include <alsa/asoundlib.h>
+
+#include "libavutil/attributes.h"
#include "config.h"
#include "libavformat/avformat.h"
#include "libavutil/log.h"
@@ -68,9 +70,9 @@ typedef struct {
*
* @return 0 if OK, AVERROR_xxx on error
*/
-int ff_alsa_open(AVFormatContext *s, snd_pcm_stream_t mode,
- unsigned int *sample_rate,
- int channels, enum CodecID *codec_id);
+av_cold int ff_alsa_open(AVFormatContext *s, snd_pcm_stream_t mode,
+ unsigned int *sample_rate,
+ int channels, enum CodecID *codec_id);
/**
* Close the ALSA PCM.
@@ -79,7 +81,7 @@ int ff_alsa_open(AVFormatContext *s, snd_pcm_stream_t mode,
*
* @return 0
*/
-int ff_alsa_close(AVFormatContext *s1);
+av_cold int ff_alsa_close(AVFormatContext *s1);
/**
* Try to recover from ALSA buffer underrun.
diff --git a/libavdevice/sndio_common.h b/libavdevice/sndio_common.h
index e23b96d..39e47d7 100644
--- a/libavdevice/sndio_common.h
+++ b/libavdevice/sndio_common.h
@@ -25,8 +25,9 @@
#include <stdint.h>
#include <sndio.h>
-#include "libavformat/avformat.h"
+#include "libavutil/attributes.h"
#include "libavutil/log.h"
+#include "libavformat/avformat.h"
typedef struct {
AVClass *class;
@@ -42,7 +43,8 @@ typedef struct {
int sample_rate;
} SndioData;
-int ff_sndio_open(AVFormatContext *s1, int is_output, const char
*audio_device);
+av_cold int ff_sndio_open(AVFormatContext *s1, int is_output,
+ const char *audio_device);
int ff_sndio_close(SndioData *s);
#endif /* AVDEVICE_SNDIO_COMMON_H */
diff --git a/libavutil/lfg.h b/libavutil/lfg.h
index 904d00a..82079dd 100644
--- a/libavutil/lfg.h
+++ b/libavutil/lfg.h
@@ -22,12 +22,14 @@
#ifndef AVUTIL_LFG_H
#define AVUTIL_LFG_H
+#include "attributes.h"
+
typedef struct {
unsigned int state[64];
int index;
} AVLFG;
-void av_lfg_init(AVLFG *c, unsigned int seed);
+av_cold void av_lfg_init(AVLFG *c, unsigned int seed);
/**
* Get the next random unsigned 32-bit number using an ALFG.
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index aa56aa7..01e74d8 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -27,6 +27,7 @@
#include <altivec.h>
#endif
+#include "libavutil/attributes.h"
#include "libavutil/avutil.h"
#include "libavutil/log.h"
#include "libavutil/pixfmt.h"
@@ -524,9 +525,9 @@ typedef struct SwsContext {
//FIXME check init (where 0)
SwsFunc ff_yuv2rgb_get_func_ptr(SwsContext *c);
-int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4],
- int fullRange, int brightness,
- int contrast, int saturation);
+av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4],
+ int fullRange, int brightness,
+ int contrast, int saturation);
void ff_yuv2rgb_init_tables_altivec(SwsContext *c, const int inv_table[4],
int brightness, int contrast, int
saturation);
@@ -658,7 +659,7 @@ void ff_swscale_get_unscaled_altivec(SwsContext *c);
*/
SwsFunc ff_getSwsFunc(SwsContext *c);
-void ff_sws_init_input_funcs(SwsContext *c);
+av_cold void ff_sws_init_input_funcs(SwsContext *c);
void ff_sws_init_output_funcs(SwsContext *c,
yuv2planar1_fn *yuv2plane1,
yuv2planarX_fn *yuv2planeX,
--
1.7.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel