vf_colorchannelmixer.c File Reference
#include "libavutil/opt.h"
#include "avfilter.h"
#include "drawutils.h"
#include "formats.h"
#include "internal.h"
#include "video.h"
Include dependency graph for vf_colorchannelmixer.c:

Go to the source code of this file.

Data Structures

struct  ColorChannelMixerContext
 

Macros

#define R   0
 
#define G   1
 
#define B   2
 
#define A   3
 
#define OFFSET(x)   offsetof(ColorChannelMixerContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS (colorchannelmixer)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_output (AVFilterLink *outlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption colorchannelmixer_options []
 
static const AVFilterPad colorchannelmixer_inputs []
 
static const AVFilterPad colorchannelmixer_outputs []
 
AVFilter avfilter_vf_colorchannelmixer
 

Macro Definition Documentation

#define A   3

Definition at line 31 of file vf_colorchannelmixer.c.

Referenced by config_output(), and filter_frame().

#define B   2

Definition at line 30 of file vf_colorchannelmixer.c.

Referenced by config_output(), and filter_frame().

Definition at line 48 of file vf_colorchannelmixer.c.

#define G   1

Definition at line 29 of file vf_colorchannelmixer.c.

Referenced by config_output(), and filter_frame().

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

Definition at line 47 of file vf_colorchannelmixer.c.

#define R   0

Definition at line 28 of file vf_colorchannelmixer.c.

Referenced by config_output(), and filter_frame().

Function Documentation

AVFILTER_DEFINE_CLASS ( colorchannelmixer  )
static int config_output ( AVFilterLink outlink)
static

Definition at line 88 of file vf_colorchannelmixer.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 151 of file vf_colorchannelmixer.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 71 of file vf_colorchannelmixer.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 336 of file vf_colorchannelmixer.c.

Variable Documentation

AVFilter avfilter_vf_colorchannelmixer
Initial value:
= {
.name = "colorchannelmixer",
.description = NULL_IF_CONFIG_SMALL("Adjust colors by mixing color channels."),
.priv_size = sizeof(ColorChannelMixerContext),
.priv_class = &colorchannelmixer_class,
}
static int query_formats(AVFilterContext *ctx)
static const AVFilterPad outputs[]
Definition: af_ashowinfo.c:117
static const AVFilterPad colorchannelmixer_inputs[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static av_cold void uninit(AVFilterContext *ctx)
static const AVFilterPad colorchannelmixer_outputs[]
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs

Definition at line 361 of file vf_colorchannelmixer.c.

const AVFilterPad colorchannelmixer_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
NULL
Definition: eval.c:55

Definition at line 343 of file vf_colorchannelmixer.c.

const AVOption colorchannelmixer_options[]
static
Initial value:
= {
{ "rr", "set the red gain for the red channel", OFFSET(rr), AV_OPT_TYPE_DOUBLE, {.dbl=1}, -2, 2, FLAGS },
{ "rg", "set the green gain for the red channel", OFFSET(rg), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -2, 2, FLAGS },
{ "rb", "set the blue gain for the red channel", OFFSET(rb), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -2, 2, FLAGS },
{ "ra", "set the alpha gain for the red channel", OFFSET(ra), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -2, 2, FLAGS },
{ "gr", "set the red gain for the green channel", OFFSET(gr), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -2, 2, FLAGS },
{ "gg", "set the green gain for the green channel", OFFSET(gg), AV_OPT_TYPE_DOUBLE, {.dbl=1}, -2, 2, FLAGS },
{ "gb", "set the blue gain for the green channel", OFFSET(gb), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -2, 2, FLAGS },
{ "ga", "set the alpha gain for the green channel", OFFSET(ga), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -2, 2, FLAGS },
{ "br", "set the red gain for the blue channel", OFFSET(br), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -2, 2, FLAGS },
{ "bg", "set the green gain for the blue channel", OFFSET(bg), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -2, 2, FLAGS },
{ "bb", "set the blue gain for the blue channel", OFFSET(bb), AV_OPT_TYPE_DOUBLE, {.dbl=1}, -2, 2, FLAGS },
{ "ba", "set the alpha gain for the blue channel", OFFSET(ba), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -2, 2, FLAGS },
{ "ar", "set the red gain for the alpha channel", OFFSET(ar), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -2, 2, FLAGS },
{ "ag", "set the green gain for the alpha channel", OFFSET(ag), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -2, 2, FLAGS },
{ "ab", "set the blue gain for the alpha channel", OFFSET(ab), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -2, 2, FLAGS },
{ "aa", "set the alpha gain for the alpha channel", OFFSET(aa), AV_OPT_TYPE_DOUBLE, {.dbl=1}, -2, 2, FLAGS },
{ NULL }
}
#define OFFSET(x)
#define ra
Definition: regdef.h:57
NULL
Definition: eval.c:55
#define FLAGS

Definition at line 49 of file vf_colorchannelmixer.c.

const AVFilterPad colorchannelmixer_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_output,
},
{ NULL }
}
static int config_output(AVFilterLink *outlink)
NULL
Definition: eval.c:55

Definition at line 352 of file vf_colorchannelmixer.c.