FFmpeg
Data Structures | Macros | Functions | Variables
vf_amplify.c File Reference
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

struct  AmplifyContext
 
struct  ThreadData
 Used for passing data between threads. More...
 

Macros

#define OFFSET(x)   offsetof(AmplifyContext, x)
 
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM
 
#define VFT   AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_RUNTIME_PARAM
 

Functions

static int query_formats (AVFilterContext *ctx)
 
static av_cold int init (AVFilterContext *ctx)
 
static int amplify_frame (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int config_output (AVFilterLink *outlink)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
 AVFILTER_DEFINE_CLASS (amplify)
 

Variables

static const AVOption amplify_options []
 
static const AVFilterPad inputs []
 
static const AVFilterPad outputs []
 
AVFilter ff_vf_amplify
 

Macro Definition Documentation

#define OFFSET (   x)    offsetof(AmplifyContext, x)

Definition at line 269 of file vf_amplify.c.

Definition at line 270 of file vf_amplify.c.

Definition at line 271 of file vf_amplify.c.

Function Documentation

static int query_formats ( AVFilterContext ctx)
static

Definition at line 53 of file vf_amplify.c.

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 82 of file vf_amplify.c.

static int amplify_frame ( AVFilterContext ctx,
void arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 99 of file vf_amplify.c.

Referenced by filter_frame().

static int config_output ( AVFilterLink outlink)
static

Definition at line 205 of file vf_amplify.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 227 of file vf_amplify.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 239 of file vf_amplify.c.

AVFILTER_DEFINE_CLASS ( amplify  )

Variable Documentation

const AVOption amplify_options[]
static
Initial value:
= {
{ "radius", "set radius", OFFSET(radius), AV_OPT_TYPE_INT, {.i64=2}, 1, 63, .flags = FLAGS },
{ "factor", "set factor", OFFSET(factor), AV_OPT_TYPE_FLOAT, {.dbl=2}, 0, UINT16_MAX, .flags = VFT },
{ "threshold", "set threshold", OFFSET(threshold), AV_OPT_TYPE_FLOAT, {.dbl=10}, 0, UINT16_MAX, .flags = VFT },
{ "tolerance", "set tolerance", OFFSET(tolerance), AV_OPT_TYPE_FLOAT, {.dbl=0}, 0, UINT16_MAX, .flags = VFT },
{ "low", "set low limit for amplification", OFFSET(llimit), AV_OPT_TYPE_INT, {.i64=UINT16_MAX}, 0, UINT16_MAX, .flags = VFT },
{ "high", "set high limit for amplification", OFFSET(hlimit), AV_OPT_TYPE_INT, {.i64=UINT16_MAX}, 0, UINT16_MAX, .flags = VFT },
{ "planes", "set what planes to filter", OFFSET(planes), AV_OPT_TYPE_FLAGS, {.i64=7}, 0, 15, VFT },
{ NULL },
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: vf_amplify.c:269
#define FLAGS
Definition: vf_amplify.c:270
static const int factor[16]
Definition: vf_pp7.c:75
#define VFT
Definition: vf_amplify.c:271
static const struct @317 planes[]

Definition at line 273 of file vf_amplify.c.

const AVFilterPad inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_amplify.c:239

Definition at line 284 of file vf_amplify.c.

const AVFilterPad outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_output,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int config_output(AVFilterLink *outlink)
Definition: vf_amplify.c:205

Definition at line 293 of file vf_amplify.c.

AVFilter ff_vf_amplify
Initial value:
= {
.name = "amplify",
.description = NULL_IF_CONFIG_SMALL("Amplify changes between successive video frames."),
.priv_size = sizeof(AmplifyContext),
.priv_class = &amplify_class,
.init = init,
}
static const AVFilterPad inputs[]
Definition: vf_amplify.c:284
static av_cold int init(AVFilterContext *ctx)
Definition: vf_amplify.c:82
static int query_formats(AVFilterContext *ctx)
Definition: vf_amplify.c:53
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Generic processing of user supplied commands that are set in the same way as the filter options...
Definition: avfilter.c:887
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:116
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_amplify.c:227
static const AVFilterPad outputs[]
Definition: vf_amplify.c:293
#define flags(name, subs,...)
Definition: cbs_av1.c:561
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: af_afftdn.c:1373

Definition at line 304 of file vf_amplify.c.