Libav
Data Structures | Macros | Functions | Variables
vf_fade.c File Reference

video fade filter based heavily on vf_negate.c by Bobby Bingham More...

#include "libavutil/common.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  FadeContext

Macros

#define FADE_IN   0
#define FADE_OUT   1
#define OFFSET(x)   offsetof(FadeContext, x)
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM

Functions

static av_cold int init (AVFilterContext *ctx)
static int query_formats (AVFilterContext *ctx)
static int config_props (AVFilterLink *inlink)
static int filter_slice_luma (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static int filter_slice_chroma (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static int filter_frame (AVFilterLink *inlink, AVFrame *frame)

Variables

static const AVOption options []
static const AVClass fade_class
static const AVFilterPad avfilter_vf_fade_inputs []
static const AVFilterPad avfilter_vf_fade_outputs []
AVFilter ff_vf_fade

Detailed Description

video fade filter based heavily on vf_negate.c by Bobby Bingham

Definition in file vf_fade.c.

Macro Definition Documentation

#define FADE_IN   0

Definition at line 36 of file vf_fade.c.

Referenced by init().

#define FADE_OUT   1

Definition at line 37 of file vf_fade.c.

Referenced by init().

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

Definition at line 171 of file vf_fade.c.

#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM

Definition at line 172 of file vf_fade.c.

Function Documentation

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 48 of file vf_fade.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 68 of file vf_fade.c.

static int config_props ( AVFilterLink inlink)
static

Definition at line 83 of file vf_fade.c.

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

Definition at line 95 of file vf_fade.c.

Referenced by filter_frame().

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

Definition at line 119 of file vf_fade.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink inlink,
AVFrame frame 
)
static

Definition at line 145 of file vf_fade.c.

Variable Documentation

const AVOption options[]
static
Initial value:
{
{ "type", "'in' or 'out' for fade-in/fade-out", OFFSET(type), AV_OPT_TYPE_INT, { .i64 = FADE_IN }, FADE_IN, FADE_OUT, FLAGS, "type" },
{ "in", "fade-in", 0, AV_OPT_TYPE_CONST, { .i64 = FADE_IN }, .unit = "type" },
{ "out", "fade-out", 0, AV_OPT_TYPE_CONST, { .i64 = FADE_OUT }, .unit = "type" },
{ "start_frame", "Number of the first frame to which to apply the effect.",
OFFSET(start_frame), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FLAGS },
{ "nb_frames", "Number of frames to which the effect should be applied.",
OFFSET(nb_frames), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, INT_MAX, FLAGS },
{ NULL },
}

Definition at line 173 of file vf_fade.c.

const AVClass fade_class
static
Initial value:
{
.class_name = "fade",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 184 of file vf_fade.c.

const AVFilterPad avfilter_vf_fade_inputs[]
static
Initial value:
{
{
.name = "default",
.config_props = config_props,
.get_video_buffer = ff_null_get_video_buffer,
.filter_frame = filter_frame,
.needs_writable = 1,
},
{ NULL }
}

Definition at line 191 of file vf_fade.c.

const AVFilterPad avfilter_vf_fade_outputs[]
static
Initial value:
{
{
.name = "default",
},
{ NULL }
}

Definition at line 203 of file vf_fade.c.

AVFilter ff_vf_fade
Initial value:
{
.name = "fade",
.description = NULL_IF_CONFIG_SMALL("Fade in/out input video"),
.init = init,
.priv_size = sizeof(FadeContext),
.priv_class = &fade_class,
}

Definition at line 211 of file vf_fade.c.