aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2013-02-01 10:31:59 +0100
committerDiego Biurrun <diego@biurrun.de>2013-02-05 17:01:05 +0100
commitc9f933b5b62d3054021fcdca8597d1c2fb6bdb2f (patch)
treec806492fc39c6605545f5e2b216fdfb36ed4840b
parent25841dfe806a13de526ae09c11149ab1f83555a8 (diff)
downloadffmpeg-c9f933b5b62d3054021fcdca8597d1c2fb6bdb2f.tar.gz
Add av_cold attributes to arch-specific init functions
-rw-r--r--libavcodec/alpha/dsputil_alpha.c3
-rw-r--r--libavcodec/alpha/mpegvideo_alpha.c3
-rw-r--r--libavcodec/arm/dsputil_init_arm.c3
-rw-r--r--libavcodec/arm/dsputil_init_neon.c3
-rw-r--r--libavcodec/arm/fmtconvert_init_arm.c3
-rw-r--r--libavcodec/arm/h264dsp_init_arm.c7
-rw-r--r--libavcodec/arm/h264pred_init_arm.c8
-rw-r--r--libavcodec/arm/h264qpel_init_arm.c3
-rw-r--r--libavcodec/arm/mpegaudiodsp_init_arm.c3
-rw-r--r--libavcodec/arm/mpegvideo_arm.c2
-rw-r--r--libavcodec/arm/mpegvideo_armv5te.c3
-rw-r--r--libavcodec/arm/rv34dsp_init_arm.c3
-rw-r--r--libavcodec/arm/rv40dsp_init_arm.c5
-rw-r--r--libavcodec/arm/videodsp_init_arm.c3
-rw-r--r--libavcodec/arm/videodsp_init_armv5te.c3
-rw-r--r--libavcodec/arm/vorbisdsp_init_arm.c2
-rw-r--r--libavcodec/arm/vp56dsp_init_arm.c3
-rw-r--r--libavcodec/bfin/dsputil_bfin.c3
-rw-r--r--libavcodec/bfin/mpegvideo_bfin.c3
-rw-r--r--libavcodec/bfin/vp3_bfin.c3
-rw-r--r--libavcodec/ppc/dsputil_altivec.c3
-rw-r--r--libavcodec/ppc/dsputil_ppc.c3
-rw-r--r--libavcodec/ppc/fmtconvert_altivec.c3
-rw-r--r--libavcodec/ppc/h264_altivec.c4
-rw-r--r--libavcodec/ppc/h264_qpel.c4
-rw-r--r--libavcodec/ppc/int_altivec.c3
-rw-r--r--libavcodec/ppc/mpegaudiodec_altivec.c3
-rw-r--r--libavcodec/ppc/mpegvideo_altivec.c3
-rw-r--r--libavcodec/ppc/vc1dsp_altivec.c3
-rw-r--r--libavcodec/ppc/videodsp_ppc.c3
-rw-r--r--libavcodec/ppc/vorbisdsp_altivec.c3
-rw-r--r--libavcodec/sh4/dsputil_align.c4
-rw-r--r--libavcodec/sh4/dsputil_sh4.c3
-rw-r--r--libavcodec/sparc/dsputil_vis.c3
-rw-r--r--libavcodec/x86/cavsdsp.c8
-rw-r--r--libavcodec/x86/dnxhdenc.c3
-rw-r--r--libavcodec/x86/dsputil_mmx.c31
-rw-r--r--libavcodec/x86/dsputilenc_mmx.c3
-rw-r--r--libavcodec/x86/fmtconvert_init.c3
-rw-r--r--libavcodec/x86/h264_intrapred_init.c5
-rw-r--r--libavcodec/x86/h264_qpel.c3
-rw-r--r--libavcodec/x86/h264dsp_init.c5
-rw-r--r--libavcodec/x86/lpc.c1
-rw-r--r--libavcodec/x86/mlpdsp.c3
-rw-r--r--libavcodec/x86/motion_est.c3
-rw-r--r--libavcodec/x86/mpegaudiodec.c3
-rw-r--r--libavcodec/x86/mpegvideo.c3
-rw-r--r--libavcodec/x86/mpegvideoenc.c3
-rw-r--r--libavcodec/x86/pngdsp_init.c3
-rw-r--r--libavcodec/x86/rv40dsp_init.c3
-rw-r--r--libavcodec/x86/sbrdsp_init.c3
-rw-r--r--libavcodec/x86/videodsp_init.c3
-rw-r--r--libavcodec/x86/vorbisdsp_init.c3
53 files changed, 135 insertions, 71 deletions
diff --git a/libavcodec/alpha/dsputil_alpha.c b/libavcodec/alpha/dsputil_alpha.c
index d02ebdb3cc..34fe2ebcad 100644
--- a/libavcodec/alpha/dsputil_alpha.c
+++ b/libavcodec/alpha/dsputil_alpha.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavcodec/dsputil.h"
#include "dsputil_alpha.h"
#include "asm.h"
@@ -268,7 +269,7 @@ static void put_pixels16_axp_asm(uint8_t *block, const uint8_t *pixels,
put_pixels_axp_asm(block + 8, pixels + 8, line_size, h);
}
-void ff_dsputil_init_alpha(DSPContext* c, AVCodecContext *avctx)
+av_cold void ff_dsputil_init_alpha(DSPContext *c, AVCodecContext *avctx)
{
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
diff --git a/libavcodec/alpha/mpegvideo_alpha.c b/libavcodec/alpha/mpegvideo_alpha.c
index 24e9a91a17..023aef9143 100644
--- a/libavcodec/alpha/mpegvideo_alpha.c
+++ b/libavcodec/alpha/mpegvideo_alpha.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavcodec/dsputil.h"
#include "libavcodec/mpegvideo.h"
#include "asm.h"
@@ -103,7 +104,7 @@ static void dct_unquantize_h263_inter_axp(MpegEncContext *s, int16_t *block,
dct_unquantize_h263_axp(block, n_coeffs, qscale, (qscale - 1) | 1);
}
-void ff_MPV_common_init_axp(MpegEncContext *s)
+av_cold void ff_MPV_common_init_axp(MpegEncContext *s)
{
s->dct_unquantize_h263_intra = dct_unquantize_h263_intra_axp;
s->dct_unquantize_h263_inter = dct_unquantize_h263_inter_axp;
diff --git a/libavcodec/arm/dsputil_init_arm.c b/libavcodec/arm/dsputil_init_arm.c
index 7379761917..5a51d26691 100644
--- a/libavcodec/arm/dsputil_init_arm.c
+++ b/libavcodec/arm/dsputil_init_arm.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/arm/cpu.h"
#include "libavcodec/dsputil.h"
#include "dsputil_arm.h"
@@ -74,7 +75,7 @@ static void simple_idct_arm_add(uint8_t *dest, int line_size, int16_t *block)
ff_add_pixels_clamped(block, dest, line_size);
}
-void ff_dsputil_init_arm(DSPContext* c, AVCodecContext *avctx)
+av_cold void ff_dsputil_init_arm(DSPContext *c, AVCodecContext *avctx)
{
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
int cpu_flags = av_get_cpu_flags();
diff --git a/libavcodec/arm/dsputil_init_neon.c b/libavcodec/arm/dsputil_init_neon.c
index c73b30ee47..b8d1578e27 100644
--- a/libavcodec/arm/dsputil_init_neon.c
+++ b/libavcodec/arm/dsputil_init_neon.c
@@ -21,6 +21,7 @@
#include <stdint.h>
+#include "libavutil/attributes.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/dsputil.h"
#include "dsputil_arm.h"
@@ -83,7 +84,7 @@ int32_t ff_scalarproduct_and_madd_int16_neon(int16_t *v1, const int16_t *v2,
void ff_apply_window_int16_neon(int16_t *dst, const int16_t *src,
const int16_t *window, unsigned n);
-void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx)
+av_cold void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx)
{
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
diff --git a/libavcodec/arm/fmtconvert_init_arm.c b/libavcodec/arm/fmtconvert_init_arm.c
index 94352636c2..c5f8fbfee3 100644
--- a/libavcodec/arm/fmtconvert_init_arm.c
+++ b/libavcodec/arm/fmtconvert_init_arm.c
@@ -20,6 +20,7 @@
#include <stdint.h>
+#include "libavutil/attributes.h"
#include "libavutil/arm/cpu.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/fmtconvert.h"
@@ -32,7 +33,7 @@ void ff_float_to_int16_interleave_neon(int16_t *, const float **, long, int);
void ff_float_to_int16_vfp(int16_t *dst, const float *src, long len);
-void ff_fmt_convert_init_arm(FmtConvertContext *c, AVCodecContext *avctx)
+av_cold void ff_fmt_convert_init_arm(FmtConvertContext *c, AVCodecContext *avctx)
{
int cpu_flags = av_get_cpu_flags();
diff --git a/libavcodec/arm/h264dsp_init_arm.c b/libavcodec/arm/h264dsp_init_arm.c
index 53d862e292..13ae15c1a6 100644
--- a/libavcodec/arm/h264dsp_init_arm.c
+++ b/libavcodec/arm/h264dsp_init_arm.c
@@ -20,6 +20,7 @@
#include <stdint.h>
+#include "libavutil/attributes.h"
#include "libavutil/arm/cpu.h"
#include "libavcodec/dsputil.h"
#include "libavcodec/h264dsp.h"
@@ -68,7 +69,8 @@ void ff_h264_idct8_add4_neon(uint8_t *dst, const int *block_offset,
int16_t *block, int stride,
const uint8_t nnzc[6*8]);
-static void ff_h264dsp_init_neon(H264DSPContext *c, const int bit_depth, const int chroma_format_idc)
+static av_cold void ff_h264dsp_init_neon(H264DSPContext *c, const int bit_depth,
+ const int chroma_format_idc)
{
if (bit_depth == 8) {
c->h264_v_loop_filter_luma = ff_h264_v_loop_filter_luma_neon;
@@ -96,7 +98,8 @@ static void ff_h264dsp_init_neon(H264DSPContext *c, const int bit_depth, const i
}
}
-void ff_h264dsp_init_arm(H264DSPContext *c, const int bit_depth, const int chroma_format_idc)
+av_cold void ff_h264dsp_init_arm(H264DSPContext *c, const int bit_depth,
+ const int chroma_format_idc)
{
int cpu_flags = av_get_cpu_flags();
diff --git a/libavcodec/arm/h264pred_init_arm.c b/libavcodec/arm/h264pred_init_arm.c
index 0431fc8691..fb4bbdd468 100644
--- a/libavcodec/arm/h264pred_init_arm.c
+++ b/libavcodec/arm/h264pred_init_arm.c
@@ -20,6 +20,7 @@
#include <stdint.h>
+#include "libavutil/attributes.h"
#include "libavutil/arm/cpu.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/h264pred.h"
@@ -44,7 +45,9 @@ void ff_pred8x8_0lt_dc_neon(uint8_t *src, ptrdiff_t stride);
void ff_pred8x8_l00_dc_neon(uint8_t *src, ptrdiff_t stride);
void ff_pred8x8_0l0_dc_neon(uint8_t *src, ptrdiff_t stride);
-static void ff_h264_pred_init_neon(H264PredContext *h, int codec_id, const int bit_depth, const int chroma_format_idc)
+static av_cold void ff_h264_pred_init_neon(H264PredContext *h, int codec_id,
+ const int bit_depth,
+ const int chroma_format_idc)
{
const int high_depth = bit_depth > 8;
@@ -76,7 +79,8 @@ static void ff_h264_pred_init_neon(H264PredContext *h, int codec_id, const int b
h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_neon;
}
-void ff_h264_pred_init_arm(H264PredContext *h, int codec_id, int bit_depth, const int chroma_format_idc)
+av_cold void ff_h264_pred_init_arm(H264PredContext *h, int codec_id,
+ int bit_depth, const int chroma_format_idc)
{
int cpu_flags = av_get_cpu_flags();
diff --git a/libavcodec/arm/h264qpel_init_arm.c b/libavcodec/arm/h264qpel_init_arm.c
index 21eb72f165..ebbaa17e35 100644
--- a/libavcodec/arm/h264qpel_init_arm.c
+++ b/libavcodec/arm/h264qpel_init_arm.c
@@ -22,6 +22,7 @@
#include <stdint.h>
#include "config.h"
+#include "libavutil/attributes.h"
#include "libavutil/arm/cpu.h"
#include "libavcodec/h264qpel.h"
@@ -93,7 +94,7 @@ void ff_avg_h264_qpel8_mc13_neon(uint8_t *, uint8_t *, int);
void ff_avg_h264_qpel8_mc23_neon(uint8_t *, uint8_t *, int);
void ff_avg_h264_qpel8_mc33_neon(uint8_t *, uint8_t *, int);
-void ff_h264qpel_init_arm(H264QpelContext *c, int bit_depth)
+av_cold void ff_h264qpel_init_arm(H264QpelContext *c, int bit_depth)
{
const int high_bit_depth = bit_depth > 8;
int cpu_flags = av_get_cpu_flags();
diff --git a/libavcodec/arm/mpegaudiodsp_init_arm.c b/libavcodec/arm/mpegaudiodsp_init_arm.c
index a9804e976c..e73aee6a2b 100644
--- a/libavcodec/arm/mpegaudiodsp_init_arm.c
+++ b/libavcodec/arm/mpegaudiodsp_init_arm.c
@@ -20,6 +20,7 @@
#include <stdint.h>
+#include "libavutil/attributes.h"
#include "libavutil/arm/cpu.h"
#include "libavcodec/mpegaudiodsp.h"
#include "config.h"
@@ -27,7 +28,7 @@
void ff_mpadsp_apply_window_fixed_armv6(int32_t *synth_buf, int32_t *window,
int *dither, int16_t *out, int incr);
-void ff_mpadsp_init_arm(MPADSPContext *s)
+av_cold void ff_mpadsp_init_arm(MPADSPContext *s)
{
int cpu_flags = av_get_cpu_flags();
diff --git a/libavcodec/arm/mpegvideo_arm.c b/libavcodec/arm/mpegvideo_arm.c
index a7b9de81be..6fcd1d3cc3 100644
--- a/libavcodec/arm/mpegvideo_arm.c
+++ b/libavcodec/arm/mpegvideo_arm.c
@@ -39,7 +39,7 @@ void ff_dct_unquantize_h263_inter_neon(MpegEncContext *s, int16_t *block,
void ff_dct_unquantize_h263_intra_neon(MpegEncContext *s, int16_t *block,
int n, int qscale);
-void ff_MPV_common_init_arm(MpegEncContext *s)
+av_cold void ff_MPV_common_init_arm(MpegEncContext *s)
{
int cpu_flags = av_get_cpu_flags();
diff --git a/libavcodec/arm/mpegvideo_armv5te.c b/libavcodec/arm/mpegvideo_armv5te.c
index 80d921eeab..d395f09518 100644
--- a/libavcodec/arm/mpegvideo_armv5te.c
+++ b/libavcodec/arm/mpegvideo_armv5te.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/dsputil.h"
#include "libavcodec/mpegvideo.h"
@@ -94,7 +95,7 @@ static void dct_unquantize_h263_inter_armv5te(MpegEncContext *s,
ff_dct_unquantize_h263_armv5te(block, qmul, qadd, nCoeffs + 1);
}
-void ff_MPV_common_init_armv5te(MpegEncContext *s)
+av_cold void ff_MPV_common_init_armv5te(MpegEncContext *s)
{
s->dct_unquantize_h263_intra = dct_unquantize_h263_intra_armv5te;
s->dct_unquantize_h263_inter = dct_unquantize_h263_inter_armv5te;
diff --git a/libavcodec/arm/rv34dsp_init_arm.c b/libavcodec/arm/rv34dsp_init_arm.c
index 2fc6a03d2b..ce86343aa5 100644
--- a/libavcodec/arm/rv34dsp_init_arm.c
+++ b/libavcodec/arm/rv34dsp_init_arm.c
@@ -20,6 +20,7 @@
#include <stdint.h>
+#include "libavutil/attributes.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/rv34dsp.h"
#include "libavutil/arm/cpu.h"
@@ -31,7 +32,7 @@ void ff_rv34_inv_transform_noround_dc_neon(int16_t *block);
void ff_rv34_idct_add_neon(uint8_t *dst, ptrdiff_t stride, int16_t *block);
void ff_rv34_idct_dc_add_neon(uint8_t *dst, ptrdiff_t stride, int dc);
-void ff_rv34dsp_init_arm(RV34DSPContext *c, DSPContext* dsp)
+av_cold void ff_rv34dsp_init_arm(RV34DSPContext *c, DSPContext *dsp)
{
int cpu_flags = av_get_cpu_flags();
diff --git a/libavcodec/arm/rv40dsp_init_arm.c b/libavcodec/arm/rv40dsp_init_arm.c
index 83f4355a42..aaa1227088 100644
--- a/libavcodec/arm/rv40dsp_init_arm.c
+++ b/libavcodec/arm/rv40dsp_init_arm.c
@@ -20,6 +20,7 @@
#include <stdint.h>
+#include "libavutil/attributes.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/rv34dsp.h"
#include "libavutil/arm/cpu.h"
@@ -69,7 +70,7 @@ void ff_rv40_v_weak_loop_filter_neon(uint8_t *src, ptrdiff_t stride, int filter_
int filter_q1, int alpha, int beta,
int lim_p0q0, int lim_q1, int lim_p1);
-static void ff_rv40dsp_init_neon(RV34DSPContext *c)
+static av_cold void ff_rv40dsp_init_neon(RV34DSPContext *c)
{
c->put_pixels_tab[0][ 1] = ff_put_rv40_qpel16_mc10_neon;
c->put_pixels_tab[0][ 3] = ff_put_rv40_qpel16_mc30_neon;
@@ -138,7 +139,7 @@ static void ff_rv40dsp_init_neon(RV34DSPContext *c)
c->rv40_weak_loop_filter[1] = ff_rv40_v_weak_loop_filter_neon;
}
-void ff_rv40dsp_init_arm(RV34DSPContext *c, DSPContext* dsp)
+av_cold void ff_rv40dsp_init_arm(RV34DSPContext *c, DSPContext *dsp)
{
int cpu_flags = av_get_cpu_flags();
diff --git a/libavcodec/arm/videodsp_init_arm.c b/libavcodec/arm/videodsp_init_arm.c
index 6c97b2ce5e..20c6e4a605 100644
--- a/libavcodec/arm/videodsp_init_arm.c
+++ b/libavcodec/arm/videodsp_init_arm.c
@@ -18,11 +18,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/arm/cpu.h"
#include "libavcodec/videodsp.h"
#include "videodsp_arm.h"
-void ff_videodsp_init_arm(VideoDSPContext *ctx, int bpc)
+av_cold void ff_videodsp_init_arm(VideoDSPContext *ctx, int bpc)
{
int cpu_flags = av_get_cpu_flags();
if (have_armv5te(cpu_flags)) ff_videodsp_init_armv5te(ctx, bpc);
diff --git a/libavcodec/arm/videodsp_init_armv5te.c b/libavcodec/arm/videodsp_init_armv5te.c
index 5830f4b8cc..832191f6d2 100644
--- a/libavcodec/arm/videodsp_init_armv5te.c
+++ b/libavcodec/arm/videodsp_init_armv5te.c
@@ -18,13 +18,14 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/arm/cpu.h"
#include "libavcodec/videodsp.h"
#include "videodsp_arm.h"
void ff_prefetch_arm(uint8_t *mem, ptrdiff_t stride, int h);
-void ff_videodsp_init_armv5te(VideoDSPContext *ctx, int bpc)
+av_cold void ff_videodsp_init_armv5te(VideoDSPContext *ctx, int bpc)
{
ctx->prefetch = ff_prefetch_arm;
}
diff --git a/libavcodec/arm/vorbisdsp_init_arm.c b/libavcodec/arm/vorbisdsp_init_arm.c
index 8c88cc5404..853ba2d865 100644
--- a/libavcodec/arm/vorbisdsp_init_arm.c
+++ b/libavcodec/arm/vorbisdsp_init_arm.c
@@ -27,7 +27,7 @@
void ff_vorbis_inverse_coupling_neon(float *mag, float *ang,
intptr_t blocksize);
-void ff_vorbisdsp_init_arm(VorbisDSPContext *c)
+av_cold void ff_vorbisdsp_init_arm(VorbisDSPContext *c)
{
int cpu_flags = av_get_cpu_flags();
diff --git a/libavcodec/arm/vp56dsp_init_arm.c b/libavcodec/arm/vp56dsp_init_arm.c
index afa507061a..65e892dafa 100644
--- a/libavcodec/arm/vp56dsp_init_arm.c
+++ b/libavcodec/arm/vp56dsp_init_arm.c
@@ -20,6 +20,7 @@
#include <stdint.h>
+#include "libavutil/attributes.h"
#include "libavutil/arm/cpu.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/vp56dsp.h"
@@ -27,7 +28,7 @@
void ff_vp6_edge_filter_hor_neon(uint8_t *yuv, int stride, int t);
void ff_vp6_edge_filter_ver_neon(uint8_t *yuv, int stride, int t);
-void ff_vp56dsp_init_arm(VP56DSPContext *s, enum AVCodecID codec)
+av_cold void ff_vp56dsp_init_arm(VP56DSPContext *s, enum AVCodecID codec)
{
int cpu_flags = av_get_cpu_flags();
diff --git a/libavcodec/bfin/dsputil_bfin.c b/libavcodec/bfin/dsputil_bfin.c
index 34e3d1a23e..b6737a2acf 100644
--- a/libavcodec/bfin/dsputil_bfin.c
+++ b/libavcodec/bfin/dsputil_bfin.c
@@ -21,6 +21,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/dsputil.h"
#include "dsputil_bfin.h"
@@ -195,7 +196,7 @@ static int bfin_pix_abs8_xy2 (void *c, uint8_t *blk1, uint8_t *blk2, int line_si
*/
-void ff_dsputil_init_bfin( DSPContext* c, AVCodecContext *avctx )
+av_cold void ff_dsputil_init_bfin(DSPContext *c, AVCodecContext *avctx)
{
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
diff --git a/libavcodec/bfin/mpegvideo_bfin.c b/libavcodec/bfin/mpegvideo_bfin.c
index 1ab803b8b0..7f7a910286 100644
--- a/libavcodec/bfin/mpegvideo_bfin.c
+++ b/libavcodec/bfin/mpegvideo_bfin.c
@@ -20,6 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/dsputil.h"
#include "libavcodec/mpegvideo.h"
@@ -141,7 +142,7 @@ static int dct_quantize_bfin (MpegEncContext *s,
return last_non_zero;
}
-void ff_MPV_common_init_bfin (MpegEncContext *s)
+av_cold void ff_MPV_common_init_bfin (MpegEncContext *s)
{
/* s->dct_quantize= dct_quantize_bfin; */
}
diff --git a/libavcodec/bfin/vp3_bfin.c b/libavcodec/bfin/vp3_bfin.c
index 5c64a94e09..4b57714eba 100644
--- a/libavcodec/bfin/vp3_bfin.c
+++ b/libavcodec/bfin/vp3_bfin.c
@@ -20,6 +20,7 @@
#include <string.h>
+#include "libavutil/attributes.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/vp3dsp.h"
#include "libavcodec/dsputil.h"
@@ -50,7 +51,7 @@ void ff_bfin_vp3_idct_add (uint8_t *dest, int line_size, int16_t *block)
memset(block, 0, 128);
}
-void ff_vp3dsp_init_bfin(VP3DSPContext *c, int flags)
+av_cold void ff_vp3dsp_init_bfin(VP3DSPContext *c, int flags)
{
c->idct_add = ff_bfin_vp3_idct_add;
c->idct_put = ff_bfin_vp3_idct_put;
diff --git a/libavcodec/ppc/dsputil_altivec.c b/libavcodec/ppc/dsputil_altivec.c
index da9022d965..a86dc8195c 100644
--- a/libavcodec/ppc/dsputil_altivec.c
+++ b/libavcodec/ppc/dsputil_altivec.c
@@ -24,6 +24,7 @@
#if HAVE_ALTIVEC_H
#include <altivec.h>
#endif
+#include "libavutil/attributes.h"
#include "libavutil/ppc/types_altivec.h"
#include "libavutil/ppc/util_altivec.h"
#include "libavcodec/dsputil.h"
@@ -1346,7 +1347,7 @@ static void avg_pixels8_xy2_altivec(uint8_t *block, const uint8_t *pixels, ptrdi
}
}
-void ff_dsputil_init_altivec(DSPContext* c, AVCodecContext *avctx)
+av_cold void ff_dsputil_init_altivec(DSPContext *c, AVCodecContext *avctx)
{
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
diff --git a/libavcodec/ppc/dsputil_ppc.c b/libavcodec/ppc/dsputil_ppc.c
index b73778ed6b..1174a7c746 100644
--- a/libavcodec/ppc/dsputil_ppc.c
+++ b/libavcodec/ppc/dsputil_ppc.c
@@ -22,6 +22,7 @@
#include <string.h>
+#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/mem.h"
#include "libavcodec/dsputil.h"
@@ -137,7 +138,7 @@ static long check_dcbzl_effect(void)
}
#endif
-void ff_dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx)
+av_cold void ff_dsputil_init_ppc(DSPContext *c, AVCodecContext *avctx)
{
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
diff --git a/libavcodec/ppc/fmtconvert_altivec.c b/libavcodec/ppc/fmtconvert_altivec.c
index 694e9306f0..78386f6c8c 100644
--- a/libavcodec/ppc/fmtconvert_altivec.c
+++ b/libavcodec/ppc/fmtconvert_altivec.c
@@ -21,6 +21,7 @@
#include "libavcodec/fmtconvert.h"
#include "libavutil/ppc/util_altivec.h"
+#include "libavutil/attributes.h"
#include "libavutil/mem.h"
#include "dsputil_altivec.h"
@@ -155,7 +156,7 @@ static void float_to_int16_interleave_altivec(int16_t *dst, const float **src,
}
}
-void ff_fmt_convert_init_altivec(FmtConvertContext *c, AVCodecContext *avctx)
+av_cold void ff_fmt_convert_init_altivec(FmtConvertContext *c, AVCodecContext *avctx)
{
c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_altivec;
if (!(avctx->flags & CODEC_FLAG_BITEXACT)) {
diff --git a/libavcodec/ppc/h264_altivec.c b/libavcodec/ppc/h264_altivec.c
index 0cbf89531c..59642fdc36 100644
--- a/libavcodec/ppc/h264_altivec.c
+++ b/libavcodec/ppc/h264_altivec.c
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/ppc/types_altivec.h"
@@ -718,7 +719,8 @@ static void ff_biweight_h264_pixels ## W ## _altivec(uint8_t *dst, uint8_t *src,
H264_WEIGHT(16)
H264_WEIGHT( 8)
-void ff_h264dsp_init_ppc(H264DSPContext *c, const int bit_depth, const int chroma_format_idc)
+av_cold void ff_h264dsp_init_ppc(H264DSPContext *c, const int bit_depth,
+ const int chroma_format_idc)
{
if (av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC) {
if (bit_depth == 8) {
diff --git a/libavcodec/ppc/h264_qpel.c b/libavcodec/ppc/h264_qpel.c
index c32e07b9c4..b70d4a9067 100644
--- a/libavcodec/ppc/h264_qpel.c
+++ b/libavcodec/ppc/h264_qpel.c
@@ -19,6 +19,7 @@
*/
#include "config.h"
+#include "libavutil/attributes.h"
#include "libavcodec/h264qpel.h"
#if HAVE_ALTIVEC
@@ -286,7 +287,8 @@ void ff_dsputil_h264_init_ppc(DSPContext* c, AVCodecContext *avctx)
}
#endif /* HAVE_ALTIVEC */
-void ff_h264qpel_init_ppc(H264QpelContext* c, int bit_depth) {
+av_cold void ff_h264qpel_init_ppc(H264QpelContext *c, int bit_depth)
+{
#if HAVE_ALTIVEC
const int high_bit_depth = bit_depth > 8;
diff --git a/libavcodec/ppc/int_altivec.c b/libavcodec/ppc/int_altivec.c
index 4fcdf7727d..67d119c473 100644
--- a/libavcodec/ppc/int_altivec.c
+++ b/libavcodec/ppc/int_altivec.c
@@ -28,6 +28,7 @@
#include <altivec.h>
#endif
+#include "libavutil/attributes.h"
#include "libavutil/ppc/types_altivec.h"
#include "libavcodec/dsputil.h"
@@ -136,7 +137,7 @@ static int32_t scalarproduct_and_madd_int16_altivec(int16_t *v1, const int16_t *
return ires;
}
-void ff_int_init_altivec(DSPContext* c, AVCodecContext *avctx)
+av_cold void ff_int_init_altivec(DSPContext *c, AVCodecContext *avctx)
{
c->ssd_int8_vs_int16 = ssd_int8_vs_int16_altivec;
c->scalarproduct_int16 = scalarproduct_int16_altivec;
diff --git a/libavcodec/ppc/mpegaudiodec_altivec.c b/libavcodec/ppc/mpegaudiodec_altivec.c
index fabde6aac0..fcd127abca 100644
--- a/libavcodec/ppc/mpegaudiodec_altivec.c
+++ b/libavcodec/ppc/mpegaudiodec_altivec.c
@@ -20,6 +20,7 @@
*/
#include "dsputil_altivec.h"
+#include "libavutil/attributes.h"
#include "libavutil/ppc/util_altivec.h"
#include "libavcodec/dsputil.h"
#include "libavcodec/mpegaudiodsp.h"
@@ -123,7 +124,7 @@ static void apply_window_mp3(float *in, float *win, int *unused, float *out,
*out = sum;
}
-void ff_mpadsp_init_altivec(MPADSPContext *s)
+av_cold void ff_mpadsp_init_altivec(MPADSPContext *s)
{
s->apply_window_float = apply_window_mp3;
}
diff --git a/libavcodec/ppc/mpegvideo_altivec.c b/libavcodec/ppc/mpegvideo_altivec.c
index 9aa0ae7449..081d5c44a8 100644
--- a/libavcodec/ppc/mpegvideo_altivec.c
+++ b/libavcodec/ppc/mpegvideo_altivec.c
@@ -24,6 +24,7 @@
#include <stdlib.h>
#include <stdio.h>
+#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/ppc/types_altivec.h"
#include "libavutil/ppc/util_altivec.h"
@@ -112,7 +113,7 @@ static void dct_unquantize_h263_altivec(MpegEncContext *s,
}
-void ff_MPV_common_init_altivec(MpegEncContext *s)
+av_cold void ff_MPV_common_init_altivec(MpegEncContext *s)
{
if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC)) return;
diff --git a/libavcodec/ppc/vc1dsp_altivec.c b/libavcodec/ppc/vc1dsp_altivec.c
index ad2c63ee7f..e6ebb9ccb5 100644
--- a/libavcodec/ppc/vc1dsp_altivec.c
+++ b/libavcodec/ppc/vc1dsp_altivec.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/ppc/types_altivec.h"
#include "libavutil/ppc/util_altivec.h"
#include "libavcodec/dsputil.h"
@@ -335,7 +336,7 @@ static void vc1_inv_trans_8x4_altivec(uint8_t *dest, int stride, int16_t *block)
#undef OP_U8_ALTIVEC
#undef PREFIX_no_rnd_vc1_chroma_mc8_altivec
-void ff_vc1dsp_init_altivec(VC1DSPContext* dsp)
+av_cold void ff_vc1dsp_init_altivec(VC1DSPContext *dsp)
{
if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC))
return;
diff --git a/libavcodec/ppc/videodsp_ppc.c b/libavcodec/ppc/videodsp_ppc.c
index 1865b198b0..b9e003b487 100644
--- a/libavcodec/ppc/videodsp_ppc.c
+++ b/libavcodec/ppc/videodsp_ppc.c
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavcodec/videodsp.h"
static void prefetch_ppc(uint8_t *mem, ptrdiff_t stride, int h)
@@ -29,7 +30,7 @@ static void prefetch_ppc(uint8_t *mem, ptrdiff_t stride, int h)
} while(--h);
}
-void ff_videodsp_init_ppc(VideoDSPContext *ctx, int bpc)
+av_cold void ff_videodsp_init_ppc(VideoDSPContext *ctx, int bpc)
{
ctx->prefetch = prefetch_ppc;
}
diff --git a/libavcodec/ppc/vorbisdsp_altivec.c b/libavcodec/ppc/vorbisdsp_altivec.c
index d6b961c6e9..251be130a9 100644
--- a/libavcodec/ppc/vorbisdsp_altivec.c
+++ b/libavcodec/ppc/vorbisdsp_altivec.c
@@ -22,6 +22,7 @@
#if HAVE_ALTIVEC_H
#include <altivec.h>
#endif
+#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavcodec/vorbisdsp.h"
@@ -50,7 +51,7 @@ static void vorbis_inverse_coupling_altivec(float *mag, float *ang,
}
#endif /* HAVE_ALTIVEC */
-void ff_vorbisdsp_init_ppc(VorbisDSPContext* c)
+av_cold void ff_vorbisdsp_init_ppc(VorbisDSPContext *c)
{
#if HAVE_ALTIVEC
if (av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC) {
diff --git a/libavcodec/sh4/dsputil_align.c b/libavcodec/sh4/dsputil_align.c
index 04df7fd432..0deb4eefeb 100644
--- a/libavcodec/sh4/dsputil_align.c
+++ b/libavcodec/sh4/dsputil_align.c
@@ -20,7 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
+#include "libavutil/attributes.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/dsputil.h"
#include "dsputil_sh4.h"
@@ -326,7 +326,7 @@ DEFFUNC(avg,no_rnd,xy,16,OP_XY,PACK)
#endif
-void ff_dsputil_init_align(DSPContext* c, AVCodecContext *avctx)
+av_cold void ff_dsputil_init_align(DSPContext *c, AVCodecContext *avctx)
{
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
diff --git a/libavcodec/sh4/dsputil_sh4.c b/libavcodec/sh4/dsputil_sh4.c
index cab1b0a298..bd2b182ecc 100644
--- a/libavcodec/sh4/dsputil_sh4.c
+++ b/libavcodec/sh4/dsputil_sh4.c
@@ -20,6 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/dsputil.h"
#include "dsputil_sh4.h"
@@ -89,7 +90,7 @@ static void idct_add(uint8_t *dest, int line_size, int16_t *block)
}
}
-void ff_dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx)
+av_cold void ff_dsputil_init_sh4(DSPContext *c, AVCodecContext *avctx)
{
const int idct_algo= avctx->idct_algo;
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
diff --git a/libavcodec/sparc/dsputil_vis.c b/libavcodec/sparc/dsputil_vis.c
index 1381d09c15..0c24c383f7 100644
--- a/libavcodec/sparc/dsputil_vis.c
+++ b/libavcodec/sparc/dsputil_vis.c
@@ -26,6 +26,7 @@
#include <inttypes.h>
+#include "libavutil/attributes.h"
#include "libavcodec/dsputil.h"
#include "libavutil/mem.h"
#include "dsputil_vis.h"
@@ -3494,7 +3495,7 @@ static int vis_level(void)
}
/* libavcodec initialization code */
-void ff_dsputil_init_vis(DSPContext* c, AVCodecContext *avctx)
+av_cold void ff_dsputil_init_vis(DSPContext *c, AVCodecContext *avctx)
{
/* VIS-specific optimizations */
int accel = vis_level ();
diff --git a/libavcodec/x86/cavsdsp.c b/libavcodec/x86/cavsdsp.c
index f94e2f3f1b..80c34bbb3b 100644
--- a/libavcodec/x86/cavsdsp.c
+++ b/libavcodec/x86/cavsdsp.c
@@ -22,6 +22,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "libavutil/cpu.h"
#include "libavutil/x86/asm.h"
@@ -446,7 +447,8 @@ CAVS_MC(put_, 16, mmxext)
CAVS_MC(avg_, 8, mmxext)
CAVS_MC(avg_, 16, mmxext)
-static void ff_cavsdsp_init_mmxext(CAVSDSPContext *c, AVCodecContext *avctx)
+static av_cold void ff_cavsdsp_init_mmxext(CAVSDSPContext *c,
+ AVCodecContext *avctx)
{
#define dspfunc(PFX, IDX, NUM) \
c->PFX ## _pixels_tab[IDX][ 0] = ff_ ## PFX ## NUM ## _mc00_mmxext; \
@@ -474,7 +476,9 @@ CAVS_MC(put_, 16,3dnow)
CAVS_MC(avg_, 8, 3dnow)
CAVS_MC(avg_, 16,3dnow)
-static void ff_cavsdsp_init_3dnow(CAVSDSPContext* c, AVCodecContext *avctx) {
+static av_cold void ff_cavsdsp_init_3dnow(CAVSDSPContext *c,
+ AVCodecContext *avctx)
+{
#define dspfunc(PFX, IDX, NUM) \
c->PFX ## _pixels_tab[IDX][ 0] = ff_ ## PFX ## NUM ## _mc00_mmxext; \
c->PFX ## _pixels_tab[IDX][ 2] = ff_ ## PFX ## NUM ## _mc20_3dnow; \
diff --git a/libavcodec/x86/dnxhdenc.c b/libavcodec/x86/dnxhdenc.c
index f5470c95e4..9f71c82e91 100644
--- a/libavcodec/x86/dnxhdenc.c
+++ b/libavcodec/x86/dnxhdenc.c
@@ -21,6 +21,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/x86/asm.h"
#include "libavcodec/dnxhdenc.h"
@@ -54,7 +55,7 @@ static void get_pixels_8x4_sym_sse2(int16_t *block, const uint8_t *pixels, int l
#endif /* HAVE_SSE2_INLINE */
-void ff_dnxhdenc_init_x86(DNXHDEncContext *ctx)
+av_cold void ff_dnxhdenc_init_x86(DNXHDEncContext *ctx)
{
#if HAVE_SSE2_INLINE
if (av_get_cpu_flags() & AV_CPU_FLAG_SSE2) {
diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c
index b882c68a3b..92f532a65e 100644
--- a/libavcodec/x86/dsputil_mmx.c
+++ b/libavcodec/x86/dsputil_mmx.c
@@ -22,6 +22,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/x86/asm.h"
#include "libavcodec/dsputil.h"
@@ -1653,7 +1654,8 @@ void ff_vector_clip_int32_sse4 (int32_t *dst, const int32_t *src,
c->PFX ## _pixels_tab IDX [3] = PFX ## _pixels ## SIZE ## _xy2_ ## CPU; \
} while (0)
-static void dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx, int mm_flags)
+static av_cold void dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx,
+ int mm_flags)
{
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
@@ -1712,8 +1714,8 @@ static void dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx, int mm_flags)
}
-static void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx,
- int mm_flags)
+static av_cold void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx,
+ int mm_flags)
{
const int bit_depth = avctx->bits_per_raw_sample;
const int high_bit_depth = bit_depth > 8;
@@ -1799,8 +1801,8 @@ static void dsputil_init_mmxext(DSPContext *c, AVCodecContext *avctx,
#endif /* HAVE_MMXEXT_EXTERNAL */
}
-static void dsputil_init_3dnow(DSPContext *c, AVCodecContext *avctx,
- int mm_flags)
+static av_cold void dsputil_init_3dnow(DSPContext *c, AVCodecContext *avctx,
+ int mm_flags)
{
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
@@ -1844,7 +1846,8 @@ static void dsputil_init_3dnow(DSPContext *c, AVCodecContext *avctx,
#endif /* HAVE_YASM */
}
-static void dsputil_init_sse(DSPContext *c, AVCodecContext *avctx, int mm_flags)
+static av_cold void dsputil_init_sse(DSPContext *c, AVCodecContext *avctx,
+ int mm_flags)
{
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
@@ -1861,8 +1864,8 @@ static void dsputil_init_sse(DSPContext *c, AVCodecContext *avctx, int mm_flags)
#endif /* HAVE_INLINE_ASM */
}
-static void dsputil_init_sse2(DSPContext *c, AVCodecContext *avctx,
- int mm_flags)
+static av_cold void dsputil_init_sse2(DSPContext *c, AVCodecContext *avctx,
+ int mm_flags)
{
const int bit_depth = avctx->bits_per_raw_sample;
const int high_bit_depth = bit_depth > 8;
@@ -1909,8 +1912,8 @@ static void dsputil_init_sse2(DSPContext *c, AVCodecContext *avctx,
#endif /* HAVE_SSE2_EXTERNAL */
}
-static void dsputil_init_ssse3(DSPContext *c, AVCodecContext *avctx,
- int mm_flags)
+static av_cold void dsputil_init_ssse3(DSPContext *c, AVCodecContext *avctx,
+ int mm_flags)
{
#if HAVE_SSSE3_EXTERNAL
const int high_bit_depth = avctx->bits_per_raw_sample > 8;
@@ -1935,15 +1938,15 @@ static void dsputil_init_ssse3(DSPContext *c, AVCodecContext *avctx,
#endif /* HAVE_SSSE3_EXTERNAL */
}
-static void dsputil_init_sse4(DSPContext *c, AVCodecContext *avctx,
- int mm_flags)
+static av_cold void dsputil_init_sse4(DSPContext *c, AVCodecContext *avctx,
+ int mm_flags)
{
#if HAVE_SSE4_EXTERNAL
c->vector_clip_int32 = ff_vector_clip_int32_sse4;
#endif /* HAVE_SSE4_EXTERNAL */
}
-static void dsputil_init_avx(DSPContext *c, AVCodecContext *avctx, int mm_flags)
+static av_cold void dsputil_init_avx(DSPContext *c, AVCodecContext *avctx, int mm_flags)
{
#if HAVE_AVX_EXTERNAL
const int bit_depth = avctx->bits_per_raw_sample;
@@ -1957,7 +1960,7 @@ static void dsputil_init_avx(DSPContext *c, AVCodecContext *avctx, int mm_flags)
#endif /* HAVE_AVX_EXTERNAL */
}
-void ff_dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx)
+av_cold void ff_dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx)
{
int mm_flags = av_get_cpu_flags();
diff --git a/libavcodec/x86/dsputilenc_mmx.c b/libavcodec/x86/dsputilenc_mmx.c
index 532b60956d..985b0cc3b8 100644
--- a/libavcodec/x86/dsputilenc_mmx.c
+++ b/libavcodec/x86/dsputilenc_mmx.c
@@ -22,6 +22,7 @@
* MMX optimization by Nick Kurshev <nickols_k@mail.ru>
*/
+#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
@@ -941,7 +942,7 @@ hadamard_func(mmxext)
hadamard_func(sse2)
hadamard_func(ssse3)
-void ff_dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx)
+av_cold void ff_dsputilenc_init_mmx(DSPContext *c, AVCodecContext *avctx)
{
int mm_flags = av_get_cpu_flags();
int bit_depth = avctx->bits_per_raw_sample;
diff --git a/libavcodec/x86/fmtconvert_init.c b/libavcodec/x86/fmtconvert_init.c
index b97fbf9863..1eaff37365 100644
--- a/libavcodec/x86/fmtconvert_init.c
+++ b/libavcodec/x86/fmtconvert_init.c
@@ -22,6 +22,7 @@
* MMX optimization by Nick Kurshev <nickols_k@mail.ru>
*/
+#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
@@ -113,7 +114,7 @@ static void float_interleave_sse(float *dst, const float **src,
}
#endif /* HAVE_YASM */
-void ff_fmt_convert_init_x86(FmtConvertContext *c, AVCodecContext *avctx)
+av_cold void ff_fmt_convert_init_x86(FmtConvertContext *c, AVCodecContext *avctx)
{
#if HAVE_YASM
int mm_flags = av_get_cpu_flags();
diff --git a/libavcodec/x86/h264_intrapred_init.c b/libavcodec/x86/h264_intrapred_init.c
index d207fd0a49..84ffd4f9eb 100644
--- a/libavcodec/x86/h264_intrapred_init.c
+++ b/libavcodec/x86/h264_intrapred_init.c
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/x86/cpu.h"
#include "libavcodec/avcodec.h"
@@ -180,7 +181,9 @@ PRED4x4(tm_vp8, 8, mmxext)
PRED4x4(tm_vp8, 8, ssse3)
PRED4x4(vertical_vp8, 8, mmxext)
-void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth, const int chroma_format_idc)
+av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id,
+ const int bit_depth,
+ const int chroma_format_idc)
{
int mm_flags = av_get_cpu_flags();
diff --git a/libavcodec/x86/h264_qpel.c b/libavcodec/x86/h264_qpel.c
index be4eaa98b4..11d849b6b3 100644
--- a/libavcodec/x86/h264_qpel.c
+++ b/libavcodec/x86/h264_qpel.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
@@ -529,7 +530,7 @@ QPEL16(mmxext)
c->avg_h264_qpel_pixels_tab[1][x + y * 4] = ff_avg_h264_qpel8_mc ## x ## y ## _10_ ## CPU; \
} while (0)
-void ff_h264qpel_init_x86(H264QpelContext *c, int bit_depth)
+av_cold void ff_h264qpel_init_x86(H264QpelContext *c, int bit_depth)
{
#if HAVE_YASM
int high_bit_depth = bit_depth > 8;
diff --git a/libavcodec/x86/h264dsp_init.c b/libavcodec/x86/h264dsp_init.c
index 0acd61d13f..15dceedc1a 100644
--- a/libavcodec/x86/h264dsp_init.c
+++ b/libavcodec/x86/h264dsp_init.c
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
@@ -207,8 +208,8 @@ H264_BIWEIGHT_10_SSE(16, 10)
H264_BIWEIGHT_10_SSE(8, 10)
H264_BIWEIGHT_10_SSE(4, 10)
-void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth,
- const int chroma_format_idc)
+av_cold void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth,
+ const int chroma_format_idc)
{
int mm_flags = av_get_cpu_flags();
diff --git a/libavcodec/x86/lpc.c b/libavcodec/x86/lpc.c
index b8c77e28f4..02b489fc91 100644
--- a/libavcodec/x86/lpc.c
+++ b/libavcodec/x86/lpc.c
@@ -20,6 +20,7 @@
*/
#include "libavutil/x86/asm.h"
+#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/internal.h"
#include "libavcodec/lpc.h"
diff --git a/libavcodec/x86/mlpdsp.c b/libavcodec/x86/mlpdsp.c
index a18e9fa67b..7bd2c12a9e 100644
--- a/libavcodec/x86/mlpdsp.c
+++ b/libavcodec/x86/mlpdsp.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/internal.h"
#include "libavutil/x86/asm.h"
#include "libavcodec/mlpdsp.h"
@@ -174,7 +175,7 @@ static void mlp_filter_channel_x86(int32_t *state, const int32_t *coeff,
#endif /* HAVE_7REGS && HAVE_INLINE_ASM */
-void ff_mlpdsp_init_x86(MLPDSPContext *c)
+av_cold void ff_mlpdsp_init_x86(MLPDSPContext *c)
{
#if HAVE_7REGS && HAVE_INLINE_ASM
c->mlp_filter_channel = mlp_filter_channel_x86;
diff --git a/libavcodec/x86/motion_est.c b/libavcodec/x86/motion_est.c
index 4c53053d85..34949f01f3 100644
--- a/libavcodec/x86/motion_est.c
+++ b/libavcodec/x86/motion_est.c
@@ -22,6 +22,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/internal.h"
#include "libavutil/mem.h"
#include "libavutil/x86/asm.h"
@@ -432,7 +433,7 @@ PIX_SAD(mmxext)
#endif /* HAVE_INLINE_ASM */
-void ff_dsputil_init_pix_mmx(DSPContext* c, AVCodecContext *avctx)
+av_cold void ff_dsputil_init_pix_mmx(DSPContext *c, AVCodecContext *avctx)
{
#if HAVE_INLINE_ASM
int mm_flags = av_get_cpu_flags();
diff --git a/libavcodec/x86/mpegaudiodec.c b/libavcodec/x86/mpegaudiodec.c
index c914fe1468..cc2b6619b6 100644
--- a/libavcodec/x86/mpegaudiodec.c
+++ b/libavcodec/x86/mpegaudiodec.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
@@ -223,7 +224,7 @@ DECL_IMDCT_BLOCKS(ssse3,sse)
DECL_IMDCT_BLOCKS(avx,avx)
#endif /* HAVE_YASM */
-void ff_mpadsp_init_x86(MPADSPContext *s)
+av_cold void ff_mpadsp_init_x86(MPADSPContext *s)
{
int mm_flags = av_get_cpu_flags();
diff --git a/libavcodec/x86/mpegvideo.c b/libavcodec/x86/mpegvideo.c
index 599db949a8..4e16142182 100644
--- a/libavcodec/x86/mpegvideo.c
+++ b/libavcodec/x86/mpegvideo.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/x86/asm.h"
#include "libavcodec/avcodec.h"
@@ -584,7 +585,7 @@ static void denoise_dct_sse2(MpegEncContext *s, int16_t *block){
#endif /* HAVE_INLINE_ASM */
-void ff_MPV_common_init_x86(MpegEncContext *s)
+av_cold void ff_MPV_common_init_x86(MpegEncContext *s)
{
#if HAVE_INLINE_ASM
int mm_flags = av_get_cpu_flags();
diff --git a/libavcodec/x86/mpegvideoenc.c b/libavcodec/x86/mpegvideoenc.c
index 8f7c2e474a..d6f74ec5f4 100644
--- a/libavcodec/x86/mpegvideoenc.c
+++ b/libavcodec/x86/mpegvideoenc.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/x86/asm.h"
#include "libavutil/x86/cpu.h"
@@ -80,7 +81,7 @@ extern uint16_t ff_inv_zigzag_direct16[64];
#include "mpegvideoenc_template.c"
#endif /* HAVE_SSSE3_INLINE */
-void ff_MPV_encode_init_x86(MpegEncContext *s)
+av_cold void ff_MPV_encode_init_x86(MpegEncContext *s)
{
int mm_flags = av_get_cpu_flags();
const int dct_algo = s->avctx->dct_algo;
diff --git a/libavcodec/x86/pngdsp_init.c b/libavcodec/x86/pngdsp_init.c
index 2e858fa0ae..ec6c238bf9 100644
--- a/libavcodec/x86/pngdsp_init.c
+++ b/libavcodec/x86/pngdsp_init.c
@@ -19,6 +19,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "libavutil/x86/cpu.h"
#include "libavcodec/pngdsp.h"
@@ -32,7 +33,7 @@ void ff_add_bytes_l2_mmx (uint8_t *dst, uint8_t *src1,
void ff_add_bytes_l2_sse2(uint8_t *dst, uint8_t *src1,
uint8_t *src2, int w);
-void ff_pngdsp_init_x86(PNGDSPContext *dsp)
+av_cold void ff_pngdsp_init_x86(PNGDSPContext *dsp)
{
int flags = av_get_cpu_flags();
diff --git a/libavcodec/x86/rv40dsp_init.c b/libavcodec/x86/rv40dsp_init.c
index a1dc22a7ce..dea951d4f4 100644
--- a/libavcodec/x86/rv40dsp_init.c
+++ b/libavcodec/x86/rv40dsp_init.c
@@ -27,6 +27,7 @@
*/
#include "libavcodec/rv34dsp.h"
+#include "libavutil/attributes.h"
#include "libavutil/mem.h"
#include "libavutil/x86/cpu.h"
#include "dsputil_mmx.h"
@@ -187,7 +188,7 @@ QPEL_FUNCS_SET (OP, 3, 2, OPT)
#endif /* HAVE_YASM */
-void ff_rv40dsp_init_x86(RV34DSPContext *c, DSPContext *dsp)
+av_cold void ff_rv40dsp_init_x86(RV34DSPContext *c, DSPContext *dsp)
{
#if HAVE_YASM
int mm_flags = av_get_cpu_flags();
diff --git a/libavcodec/x86/sbrdsp_init.c b/libavcodec/x86/sbrdsp_init.c
index 747817bb21..27fade133f 100644
--- a/libavcodec/x86/sbrdsp_init.c
+++ b/libavcodec/x86/sbrdsp_init.c
@@ -20,6 +20,7 @@
*/
#include "config.h"
+#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/x86/cpu.h"
#include "libavcodec/sbrdsp.h"
@@ -33,7 +34,7 @@ void ff_sbr_hf_gen_sse(float (*X_high)[2], const float (*X_low)[2],
float bw, int start, int end);
void ff_sbr_qmf_post_shuffle_sse(float W[32][2], const float *z);
-void ff_sbrdsp_init_x86(SBRDSPContext *s)
+av_cold void ff_sbrdsp_init_x86(SBRDSPContext *s)
{
int mm_flags = av_get_cpu_flags();
diff --git a/libavcodec/x86/videodsp_init.c b/libavcodec/x86/videodsp_init.c
index 07a0324c69..48f42d5be5 100644
--- a/libavcodec/x86/videodsp_init.c
+++ b/libavcodec/x86/videodsp_init.c
@@ -19,6 +19,7 @@
*/
#include "config.h"
+#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "libavutil/cpu.h"
#include "libavutil/mem.h"
@@ -96,7 +97,7 @@ static av_noinline void emulated_edge_mc_sse(uint8_t *buf, const uint8_t *src,
void ff_prefetch_mmxext(uint8_t *buf, ptrdiff_t stride, int h);
void ff_prefetch_3dnow(uint8_t *buf, ptrdiff_t stride, int h);
-void ff_videodsp_init_x86(VideoDSPContext *ctx, int bpc)
+av_cold void ff_videodsp_init_x86(VideoDSPContext *ctx, int bpc)
{
#if HAVE_YASM
int mm_flags = av_get_cpu_flags();
diff --git a/libavcodec/x86/vorbisdsp_init.c b/libavcodec/x86/vorbisdsp_init.c
index 703cd93f17..762d3eeca9 100644
--- a/libavcodec/x86/vorbisdsp_init.c
+++ b/libavcodec/x86/vorbisdsp_init.c
@@ -19,6 +19,7 @@
*/
#include "config.h"
+#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavcodec/vorbisdsp.h"
@@ -27,7 +28,7 @@ void ff_vorbis_inverse_coupling_3dnow(float *mag, float *ang,
void ff_vorbis_inverse_coupling_sse(float *mag, float *ang,
intptr_t blocksize);
-void ff_vorbisdsp_init_x86(VorbisDSPContext *dsp)
+av_cold void ff_vorbisdsp_init_x86(VorbisDSPContext *dsp)
{
#if HAVE_YASM
int mm_flags = av_get_cpu_flags();