FFmpeg  4.0
Data Structures | Macros | Functions | Variables
vf_despill.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  DespillContext
 

Macros

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

Functions

static int do_despill_slice (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int filter_frame (AVFilterLink *link, AVFrame *frame)
 
static av_cold int config_output (AVFilterLink *outlink)
 
static av_cold int query_formats (AVFilterContext *ctx)
 
 AVFILTER_DEFINE_CLASS (despill)
 

Variables

static const AVFilterPad despill_inputs []
 
static const AVFilterPad despill_outputs []
 
static const AVOption despill_options []
 
AVFilter ff_vf_despill
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 155 of file vf_despill.c.

◆ FLAGS

Definition at line 156 of file vf_despill.c.

Function Documentation

◆ do_despill_slice()

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

Definition at line 43 of file vf_despill.c.

Referenced by filter_frame().

◆ filter_frame()

static int filter_frame ( AVFilterLink link,
AVFrame frame 
)
static

Definition at line 92 of file vf_despill.c.

◆ config_output()

static av_cold int config_output ( AVFilterLink outlink)
static

Definition at line 106 of file vf_despill.c.

◆ query_formats()

static av_cold int query_formats ( AVFilterContext ctx)
static

Definition at line 119 of file vf_despill.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( despill  )

Variable Documentation

◆ despill_inputs

const AVFilterPad despill_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}
static int filter_frame(AVFilterLink *link, AVFrame *frame)
Definition: vf_despill.c:92
#define NULL
Definition: coverity.c:32

Definition at line 137 of file vf_despill.c.

◆ despill_outputs

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

Definition at line 146 of file vf_despill.c.

◆ despill_options

const AVOption despill_options[]
static
Initial value:
= {
{ "type", "set the screen type", OFFSET(type), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, FLAGS, "type" },
{ "green", "greenscreen", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, "type" },
{ "blue", "bluescreen", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, "type" },
{ "mix", "set the spillmap mix", OFFSET(spillmix), AV_OPT_TYPE_FLOAT, {.dbl=0.5}, 0, 1, FLAGS },
{ "expand", "set the spillmap expand", OFFSET(spillexpand), AV_OPT_TYPE_FLOAT, {.dbl=0}, 0, 1, FLAGS },
{ "red", "set red scale", OFFSET(redscale), AV_OPT_TYPE_FLOAT, {.dbl=0}, -100, 100, FLAGS },
{ "green", "set green scale", OFFSET(greenscale), AV_OPT_TYPE_FLOAT, {.dbl=-1}, -100, 100, FLAGS },
{ "blue", "set blue scale", OFFSET(bluescale), AV_OPT_TYPE_FLOAT, {.dbl=0}, -100, 100, FLAGS },
{ "brightness", "set brightness", OFFSET(brightness), AV_OPT_TYPE_FLOAT, {.dbl=0}, -10, 10, FLAGS },
{ "alpha", "change alpha component", OFFSET(alpha), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, FLAGS },
{ NULL }
}
#define NULL
Definition: coverity.c:32
static float alpha(float a)
cl_device_type type
#define OFFSET(x)
Definition: vf_despill.c:155
#define FLAGS
Definition: vf_despill.c:156

Definition at line 158 of file vf_despill.c.

◆ ff_vf_despill

AVFilter ff_vf_despill
Initial value:
= {
.name = "despill",
.description = NULL_IF_CONFIG_SMALL("Despill video."),
.priv_size = sizeof(DespillContext),
.priv_class = &despill_class,
}
static const AVFilterPad despill_inputs[]
Definition: vf_despill.c:137
static const AVFilterPad despill_outputs[]
Definition: vf_despill.c:146
static av_cold int query_formats(AVFilterContext *ctx)
Definition: vf_despill.c:119
#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

Definition at line 174 of file vf_despill.c.