FFmpeg
Data Structures | Macros | Functions | Variables
vf_dblur.c File Reference
#include "libavutil/imgutils.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  DBlurContext
 

Macros

#define OFFSET(x)   offsetof(DBlurContext, x)
 
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
 
#define f(n, m)   (dst[(n) * width + (m)])
 

Functions

 AVFILTER_DEFINE_CLASS (dblur)
 
static int filter_horizontally (AVFilterContext *ctx, int width, int height)
 
static void diriir2d (AVFilterContext *ctx, int plane)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 
static void set_params (DBlurContext *s, float angle, float r)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption dblur_options []
 
static const AVFilterPad dblur_inputs []
 
static const AVFilterPad dblur_outputs []
 
const AVFilter ff_vf_dblur
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 45 of file vf_dblur.c.

◆ FLAGS

Definition at line 46 of file vf_dblur.c.

◆ f

#define f (   n,
 
)    (dst[(n) * width + (m)])

Definition at line 57 of file vf_dblur.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( dblur  )

◆ filter_horizontally()

static int filter_horizontally ( AVFilterContext ctx,
int  width,
int  height 
)
static

Definition at line 59 of file vf_dblur.c.

Referenced by diriir2d().

◆ diriir2d()

static void diriir2d ( AVFilterContext ctx,
int  plane 
)
static

Definition at line 106 of file vf_dblur.c.

Referenced by filter_frame().

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 115 of file vf_dblur.c.

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 142 of file vf_dblur.c.

◆ set_params()

static void set_params ( DBlurContext s,
float  angle,
float  r 
)
static

Definition at line 162 of file vf_dblur.c.

Referenced by filter_frame().

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 186 of file vf_dblur.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 270 of file vf_dblur.c.

Variable Documentation

◆ dblur_options

const AVOption dblur_options[]
static
Initial value:
= {
{ "angle", "set angle", OFFSET(angle), AV_OPT_TYPE_FLOAT, {.dbl=45}, 0.0, 360, FLAGS },
{ "radius", "set radius", OFFSET(radius), AV_OPT_TYPE_FLOAT, {.dbl=5}, 1, 8192, FLAGS },
{ "planes", "set planes to filter", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=0xF}, 0, 0xF, FLAGS },
{ NULL }
}

Definition at line 48 of file vf_dblur.c.

◆ dblur_inputs

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

Definition at line 277 of file vf_dblur.c.

◆ dblur_outputs

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

Definition at line 287 of file vf_dblur.c.

◆ ff_vf_dblur

const AVFilter ff_vf_dblur
Initial value:
= {
.name = "dblur",
.description = NULL_IF_CONFIG_SMALL("Apply Directional Blur filter."),
.priv_size = sizeof(DBlurContext),
.priv_class = &dblur_class,
}

Definition at line 295 of file vf_dblur.c.

DBlurContext
Definition: vf_dblur.c:29
dblur_inputs
static const AVFilterPad dblur_inputs[]
Definition: vf_dblur.c:277
config_input
static int config_input(AVFilterLink *inlink)
Definition: vf_dblur.c:142
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_dblur.c:186
inputs
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: filter_design.txt:243
OFFSET
#define OFFSET(x)
Definition: vf_dblur.c:45
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: vf_dblur.c:115
outputs
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
dblur_outputs
static const AVFilterPad dblur_outputs[]
Definition: vf_dblur.c:287
NULL
#define NULL
Definition: coverity.c:32
FLAGS
#define FLAGS
Definition: vf_dblur.c:46
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
AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
#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:126
AV_OPT_TYPE_FLOAT
@ AV_OPT_TYPE_FLOAT
Definition: opt.h:228
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_dblur.c:270
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
planes
static const struct @322 planes[]
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561