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 LAGFUN(name, type)
 
#define OFFSET(x)   offsetof(LagfunContext, x)
 
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM | AV_OPT_FLAG_RUNTIME_PARAM
 

Functions

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)
 
 AVFILTER_DEFINE_CLASS (lagfun)
 

Variables

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

Macro Definition Documentation

◆ LAGFUN

#define LAGFUN (   name,
  type 
)

Definition at line 80 of file vf_lagfun.c.

◆ OFFSET

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

Definition at line 193 of file vf_lagfun.c.

◆ FLAGS

Definition at line 194 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.

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 130 of file vf_lagfun.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 162 of file vf_lagfun.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 185 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 196 of file vf_lagfun.c.

◆ inputs

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

Definition at line 202 of file vf_lagfun.c.

◆ outputs

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

Definition at line 211 of file vf_lagfun.c.

◆ ff_vf_lagfun

const 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 222 of file vf_lagfun.c.

config_output
static int config_output(AVFilterLink *outlink)
Definition: vf_lagfun.c:130
LagfunContext
Definition: vf_lagfun.c:31
inputs
static const AVFilterPad inputs[]
Definition: vf_lagfun.c:202
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_lagfun.c:185
NULL
#define NULL
Definition: coverity.c:32
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:117
process_command
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: af_acrusher.c:336
ff_filter_process_command
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Generic processing of user supplied commands that are set in the same way as the filter options.
Definition: avfilter.c:842
FLAGS
#define FLAGS
Definition: vf_lagfun.c:194
AV_OPT_TYPE_FLOAT
@ AV_OPT_TYPE_FLOAT
Definition: opt.h:228
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_lagfun.c:162
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: vf_lagfun.c:47
outputs
static const AVFilterPad outputs[]
Definition: vf_lagfun.c:211
planes
static const struct @322 planes[]
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:117
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_OPT_TYPE_FLAGS
@ AV_OPT_TYPE_FLAGS
Definition: opt.h:224
AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will have its filter_frame() c...
Definition: avfilter.h:134
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561
OFFSET
#define OFFSET(x)
Definition: vf_lagfun.c:193