[FFmpeg-cvslog] avfilter: Add av_cold attributes to init/uninit functions
Diego Biurrun
git at videolan.org
Sun May 5 11:50:05 CEST 2013
ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Tue Apr 30 18:30:02 2013 +0200| [093804a93cc5da3f95f98265a5df116912443cec] | committer: Diego Biurrun
avfilter: Add av_cold attributes to init/uninit functions
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=093804a93cc5da3f95f98265a5df116912443cec
---
libavfilter/af_amix.c | 5 +++--
libavfilter/af_ashowinfo.c | 3 ++-
libavfilter/af_asyncts.c | 5 +++--
libavfilter/af_channelsplit.c | 3 ++-
libavfilter/af_join.c | 4 ++--
libavfilter/af_volume.c | 2 +-
libavfilter/split.c | 5 +++--
libavfilter/vf_hqdn3d.c | 5 +++--
libavfilter/vf_lut.c | 5 +++--
libavfilter/vsrc_movie.c | 4 +++-
libavfilter/x86/af_volume_init.c | 3 ++-
11 files changed, 27 insertions(+), 17 deletions(-)
diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c
index 6bc7458..2df0507 100644
--- a/libavfilter/af_amix.c
+++ b/libavfilter/af_amix.c
@@ -28,6 +28,7 @@
* output.
*/
+#include "libavutil/attributes.h"
#include "libavutil/audio_fifo.h"
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
@@ -488,7 +489,7 @@ fail:
return ret;
}
-static int init(AVFilterContext *ctx)
+static av_cold int init(AVFilterContext *ctx)
{
MixContext *s = ctx->priv;
int i;
@@ -510,7 +511,7 @@ static int init(AVFilterContext *ctx)
return 0;
}
-static void uninit(AVFilterContext *ctx)
+static av_cold void uninit(AVFilterContext *ctx)
{
int i;
MixContext *s = ctx->priv;
diff --git a/libavfilter/af_ashowinfo.c b/libavfilter/af_ashowinfo.c
index 0855440..c347391 100644
--- a/libavfilter/af_ashowinfo.c
+++ b/libavfilter/af_ashowinfo.c
@@ -27,6 +27,7 @@
#include <stddef.h>
#include "libavutil/adler32.h"
+#include "libavutil/attributes.h"
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/mem.h"
@@ -59,7 +60,7 @@ static int config_input(AVFilterLink *inlink)
return 0;
}
-static void uninit(AVFilterContext *ctx)
+static av_cold void uninit(AVFilterContext *ctx)
{
AShowInfoContext *s = ctx->priv;
av_freep(&s->plane_checksums);
diff --git a/libavfilter/af_asyncts.c b/libavfilter/af_asyncts.c
index ad4e3d7..a76415b 100644
--- a/libavfilter/af_asyncts.c
+++ b/libavfilter/af_asyncts.c
@@ -17,6 +17,7 @@
*/
#include "libavresample/avresample.h"
+#include "libavutil/attributes.h"
#include "libavutil/audio_fifo.h"
#include "libavutil/common.h"
#include "libavutil/mathematics.h"
@@ -64,7 +65,7 @@ static const AVClass async_class = {
.version = LIBAVUTIL_VERSION_INT,
};
-static int init(AVFilterContext *ctx)
+static av_cold int init(AVFilterContext *ctx)
{
ASyncContext *s = ctx->priv;
@@ -74,7 +75,7 @@ static int init(AVFilterContext *ctx)
return 0;
}
-static void uninit(AVFilterContext *ctx)
+static av_cold void uninit(AVFilterContext *ctx)
{
ASyncContext *s = ctx->priv;
diff --git a/libavfilter/af_channelsplit.c b/libavfilter/af_channelsplit.c
index fde5985..819a0b3 100644
--- a/libavfilter/af_channelsplit.c
+++ b/libavfilter/af_channelsplit.c
@@ -23,6 +23,7 @@
* Split an audio stream into per-channel streams.
*/
+#include "libavutil/attributes.h"
#include "libavutil/channel_layout.h"
#include "libavutil/internal.h"
#include "libavutil/opt.h"
@@ -53,7 +54,7 @@ static const AVClass channelsplit_class = {
.version = LIBAVUTIL_VERSION_INT,
};
-static int init(AVFilterContext *ctx)
+static av_cold int init(AVFilterContext *ctx)
{
ChannelSplitContext *s = ctx->priv;
int nb_channels;
diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c
index 02bc8c8..e3dc5a5 100644
--- a/libavfilter/af_join.c
+++ b/libavfilter/af_join.c
@@ -186,7 +186,7 @@ static int parse_maps(AVFilterContext *ctx)
return 0;
}
-static int join_init(AVFilterContext *ctx)
+static av_cold int join_init(AVFilterContext *ctx)
{
JoinContext *s = ctx->priv;
int ret, i;
@@ -234,7 +234,7 @@ fail:
return ret;
}
-static void join_uninit(AVFilterContext *ctx)
+static av_cold void join_uninit(AVFilterContext *ctx)
{
JoinContext *s = ctx->priv;
int i;
diff --git a/libavfilter/af_volume.c b/libavfilter/af_volume.c
index c22c283..fc878f9 100644
--- a/libavfilter/af_volume.c
+++ b/libavfilter/af_volume.c
@@ -174,7 +174,7 @@ static inline void scale_samples_s32(uint8_t *dst, const uint8_t *src,
-static void volume_init(VolumeContext *vol)
+static av_cold void volume_init(VolumeContext *vol)
{
vol->samples_align = 1;
diff --git a/libavfilter/split.c b/libavfilter/split.c
index 16d0bb3..3da19b1 100644
--- a/libavfilter/split.c
+++ b/libavfilter/split.c
@@ -25,6 +25,7 @@
#include <stdio.h>
+#include "libavutil/attributes.h"
#include "libavutil/internal.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
@@ -39,7 +40,7 @@ typedef struct SplitContext {
int nb_outputs;
} SplitContext;
-static int split_init(AVFilterContext *ctx)
+static av_cold int split_init(AVFilterContext *ctx)
{
SplitContext *s = ctx->priv;
int i;
@@ -58,7 +59,7 @@ static int split_init(AVFilterContext *ctx)
return 0;
}
-static void split_uninit(AVFilterContext *ctx)
+static av_cold void split_uninit(AVFilterContext *ctx)
{
int i;
diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c
index 6f67bb0..d60219a 100644
--- a/libavfilter/vf_hqdn3d.c
+++ b/libavfilter/vf_hqdn3d.c
@@ -29,6 +29,7 @@
#include <float.h>
#include "config.h"
+#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "libavutil/pixdesc.h"
#include "libavutil/intreadwrite.h"
@@ -181,7 +182,7 @@ static int16_t *precalc_coefs(double dist25, int depth)
#define PARAM2_DEFAULT 3.0
#define PARAM3_DEFAULT 6.0
-static int init(AVFilterContext *ctx)
+static av_cold int init(AVFilterContext *ctx)
{
HQDN3DContext *hqdn3d = ctx->priv;
@@ -201,7 +202,7 @@ static int init(AVFilterContext *ctx)
return 0;
}
-static void uninit(AVFilterContext *ctx)
+static av_cold void uninit(AVFilterContext *ctx)
{
HQDN3DContext *hqdn3d = ctx->priv;
diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c
index 7da8f3b..87c028a 100644
--- a/libavfilter/vf_lut.c
+++ b/libavfilter/vf_lut.c
@@ -24,6 +24,7 @@
* value, and apply it to input video.
*/
+#include "libavutil/attributes.h"
#include "libavutil/common.h"
#include "libavutil/eval.h"
#include "libavutil/mathematics.h"
@@ -101,7 +102,7 @@ static const AVOption lut_options[] = {
{ NULL },
};
-static int init(AVFilterContext *ctx)
+static av_cold int init(AVFilterContext *ctx)
{
LutContext *lut = ctx->priv;
@@ -385,7 +386,7 @@ static const AVOption negate_options[] = {
{ NULL },
};
-static int negate_init(AVFilterContext *ctx)
+static av_cold int negate_init(AVFilterContext *ctx)
{
LutContext *lut = ctx->priv;
int i;
diff --git a/libavfilter/vsrc_movie.c b/libavfilter/vsrc_movie.c
index 615b20e..720f077 100644
--- a/libavfilter/vsrc_movie.c
+++ b/libavfilter/vsrc_movie.c
@@ -31,6 +31,8 @@
/* #define DEBUG */
#include <float.h>
+
+#include "libavutil/attributes.h"
#include "libavutil/avstring.h"
#include "libavutil/opt.h"
#include "libavutil/imgutils.h"
@@ -81,7 +83,7 @@ static const AVClass movie_class = {
movie_options
};
-static int movie_init(AVFilterContext *ctx)
+static av_cold int movie_init(AVFilterContext *ctx)
{
MovieContext *movie = ctx->priv;
AVInputFormat *iformat = NULL;
diff --git a/libavfilter/x86/af_volume_init.c b/libavfilter/x86/af_volume_init.c
index 02bedd2..bc51dc9 100644
--- a/libavfilter/x86/af_volume_init.c
+++ b/libavfilter/x86/af_volume_init.c
@@ -17,6 +17,7 @@
*/
#include "config.h"
+#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/samplefmt.h"
#include "libavutil/x86/cpu.h"
@@ -32,7 +33,7 @@ void ff_scale_samples_s32_ssse3_atom(uint8_t *dst, const uint8_t *src, int len,
void ff_scale_samples_s32_avx(uint8_t *dst, const uint8_t *src, int len,
int volume);
-void ff_volume_init_x86(VolumeContext *vol)
+av_cold void ff_volume_init_x86(VolumeContext *vol)
{
int mm_flags = av_get_cpu_flags();
enum AVSampleFormat sample_fmt = av_get_packed_sample_fmt(vol->sample_fmt);
More information about the ffmpeg-cvslog
mailing list