mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter: Add av_cold attributes to init/uninit functions
This commit is contained in:
parent
6fee1b90ce
commit
093804a93c
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue