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

Go to the source code of this file.

Data Structures

struct  LumakeyContext
 

Macros

#define OFFSET(x)   offsetof(LumakeyContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 

Functions

static int do_lumakey_slice8 (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int do_lumakey_slice16 (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int config_input (AVFilterLink *inlink)
 
static int filter_frame (AVFilterLink *link, AVFrame *frame)
 
static av_cold int query_formats (AVFilterContext *ctx)
 
 AVFILTER_DEFINE_CLASS (lumakey)
 

Variables

static const AVFilterPad lumakey_inputs []
 
static const AVFilterPad lumakey_outputs []
 
static const AVOption lumakey_options []
 
AVFilter ff_vf_lumakey
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 180 of file vf_lumakey.c.

◆ FLAGS

Definition at line 181 of file vf_lumakey.c.

Function Documentation

◆ do_lumakey_slice8()

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

Definition at line 42 of file vf_lumakey.c.

Referenced by config_input().

◆ do_lumakey_slice16()

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

Definition at line 74 of file vf_lumakey.c.

Referenced by config_input().

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 107 of file vf_lumakey.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink link,
AVFrame frame 
)
static

Definition at line 129 of file vf_lumakey.c.

◆ query_formats()

static av_cold int query_formats ( AVFilterContext ctx)
static

Definition at line 144 of file vf_lumakey.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( lumakey  )

Variable Documentation

◆ lumakey_inputs

const AVFilterPad lumakey_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
.config_props = config_input,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int filter_frame(AVFilterLink *link, AVFrame *frame)
Definition: vf_lumakey.c:129
static int config_input(AVFilterLink *inlink)
Definition: vf_lumakey.c:107

Definition at line 162 of file vf_lumakey.c.

◆ lumakey_outputs

const AVFilterPad lumakey_outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}
#define NULL
Definition: coverity.c:32

Definition at line 172 of file vf_lumakey.c.

◆ lumakey_options

const AVOption lumakey_options[]
static
Initial value:
= {
{ "threshold", "set the threshold value", OFFSET(threshold), AV_OPT_TYPE_INT, {.i64=0}, 0, UINT16_MAX, FLAGS },
{ "tolerance", "set the tolerance value", OFFSET(tolerance), AV_OPT_TYPE_INT, {.i64=1}, 0, UINT16_MAX, FLAGS },
{ "softness", "set the softness value", OFFSET(softness), AV_OPT_TYPE_INT, {.i64=0}, 0, UINT16_MAX, FLAGS },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define FLAGS
Definition: vf_lumakey.c:181
#define OFFSET(x)
Definition: vf_lumakey.c:180

Definition at line 183 of file vf_lumakey.c.

◆ ff_vf_lumakey

AVFilter ff_vf_lumakey
Initial value:
= {
.name = "lumakey",
.description = NULL_IF_CONFIG_SMALL("Turns a certain luma into transparency."),
.priv_size = sizeof(LumakeyContext),
.priv_class = &lumakey_class,
}
static const AVFilterPad lumakey_outputs[]
Definition: vf_lumakey.c:172
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
Definition: avfilter.h:125
static int flags
Definition: log.c:55
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:116
static const AVFilterPad inputs[]
Definition: af_acontrast.c:193
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
static const AVFilterPad lumakey_inputs[]
Definition: vf_lumakey.c:162
static av_cold int query_formats(AVFilterContext *ctx)
Definition: vf_lumakey.c:144

Definition at line 192 of file vf_lumakey.c.