FFmpeg
Data Structures | Macros | Functions | Variables
vf_lagfun.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  LagfunContext
 
struct  ThreadData
 Used for passing data between threads. More...
 

Macros

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

Functions

static int query_formats (AVFilterContext *ctx)
 
static int lagfun_frame8 (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int lagfun_frame16 (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int config_output (AVFilterLink *outlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold void uninit (AVFilterContext *ctx)
 
 AVFILTER_DEFINE_CLASS (lagfun)
 

Variables

static const AVOption lagfun_options []
 
static const AVFilterPad inputs []
 
static const AVFilterPad outputs []
 
AVFilter ff_vf_lagfun
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 213 of file vf_lagfun.c.

◆ FLAGS

Definition at line 214 of file vf_lagfun.c.

Function Documentation

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 47 of file vf_lagfun.c.

◆ lagfun_frame8()

static int lagfun_frame8 ( AVFilterContext ctx,
void *  arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 80 of file vf_lagfun.c.

Referenced by config_output().

◆ lagfun_frame16()

static int lagfun_frame16 ( AVFilterContext ctx,
void *  arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 116 of file vf_lagfun.c.

Referenced by config_output().

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 152 of file vf_lagfun.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 175 of file vf_lagfun.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 206 of file vf_lagfun.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( lagfun  )

Variable Documentation

◆ lagfun_options

const AVOption lagfun_options[]
static
Initial value:
= {
{ "decay", "set decay", OFFSET(decay), AV_OPT_TYPE_FLOAT, {.dbl=.95}, 0, 1, FLAGS },
{ "planes", "set what planes to filter", OFFSET(planes), AV_OPT_TYPE_FLAGS, {.i64=15}, 0, 15, FLAGS },
{ NULL },
}

Definition at line 216 of file vf_lagfun.c.

◆ inputs

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

Definition at line 222 of file vf_lagfun.c.

◆ outputs

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

Definition at line 231 of file vf_lagfun.c.

◆ ff_vf_lagfun

AVFilter ff_vf_lagfun
Initial value:
= {
.name = "lagfun",
.description = NULL_IF_CONFIG_SMALL("Slowly update darker pixels."),
.priv_size = sizeof(LagfunContext),
.priv_class = &lagfun_class,
}

Definition at line 242 of file vf_lagfun.c.

config_output
static int config_output(AVFilterLink *outlink)
Definition: vf_lagfun.c:152
LagfunContext
Definition: vf_lagfun.c:31
inputs
static const AVFilterPad inputs[]
Definition: vf_lagfun.c:222
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_lagfun.c:206
NULL
#define NULL
Definition: coverity.c:32
planes
static const struct @314 planes[]
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:188
FLAGS
#define FLAGS
Definition: vf_lagfun.c:214
AV_OPT_TYPE_FLOAT
@ AV_OPT_TYPE_FLOAT
Definition: opt.h:226
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_lagfun.c:175
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: vf_lagfun.c:47
outputs
static const AVFilterPad outputs[]
Definition: vf_lagfun.c:231
AVFILTER_FLAG_SLICE_THREADS
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:116
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_OPT_TYPE_FLAGS
@ AV_OPT_TYPE_FLAGS
Definition: opt.h:222
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:565
OFFSET
#define OFFSET(x)
Definition: vf_lagfun.c:213