FFmpeg
Data Structures | Macros | Functions | Variables
vf_yaepblur.c File Reference

yaep(yet another edge preserving) blur filter More...

#include "libavutil/opt.h"
#include "libavutil/imgutils.h"
#include "avfilter.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  YAEPContext
 
struct  ThreadData
 Used for passing data between threads. More...
 

Macros

#define PRE_CALCULATE_ROW(type, name)
 
#define FILTER_SLICE(type, name)
 
#define OFFSET(x)   offsetof(YAEPContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
 

Functions

static av_cold void uninit (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static int pre_calculate_col (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static int config_input (AVFilterLink *inlink)
 
 AVFILTER_DEFINE_CLASS (yaep)
 

Variables

static const AVFilterPad yaep_inputs []
 
static const AVFilterPad yaep_outputs []
 
static const AVOption yaep_options []
 
AVFilter ff_vf_yaepblur
 

Detailed Description

yaep(yet another edge preserving) blur filter

This implementation is based on an algorithm described in "J. S. Lee, Digital image enhancement and noise filtering by use of local statistics, IEEE Trans. Pattern Anal. Mach. Intell. PAMI-2, 1980."

Definition in file vf_yaepblur.c.

Macro Definition Documentation

#define PRE_CALCULATE_ROW (   type,
  name 
)

Definition at line 98 of file vf_yaepblur.c.

#define FILTER_SLICE (   type,
  name 
)

Definition at line 165 of file vf_yaepblur.c.

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

Definition at line 323 of file vf_yaepblur.c.

Definition at line 324 of file vf_yaepblur.c.

Function Documentation

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 55 of file vf_yaepblur.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 62 of file vf_yaepblur.c.

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

Definition at line 135 of file vf_yaepblur.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 220 of file vf_yaepblur.c.

static int config_input ( AVFilterLink inlink)
static

Definition at line 270 of file vf_yaepblur.c.

AVFILTER_DEFINE_CLASS ( yaep  )

Variable Documentation

const AVFilterPad yaep_inputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_input,
.filter_frame = filter_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int config_input(AVFilterLink *inlink)
Definition: vf_yaepblur.c:270
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_yaepblur.c:220

Definition at line 305 of file vf_yaepblur.c.

const AVFilterPad yaep_outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}
#define NULL
Definition: coverity.c:32

Definition at line 315 of file vf_yaepblur.c.

const AVOption yaep_options[]
static
Initial value:
= {
{ "radius", "set window radius", OFFSET(radius), AV_OPT_TYPE_INT, {.i64=3}, 0, INT_MAX, .flags=FLAGS },
{ "r" , "set window radius", OFFSET(radius), AV_OPT_TYPE_INT, {.i64=3}, 0, INT_MAX, .flags=FLAGS },
{ "planes", "set planes to filter", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=1}, 0, 0xF, .flags=FLAGS },
{ "p", "set planes to filter", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=1}, 0, 0xF, .flags=FLAGS },
{ "sigma", "set blur strength", OFFSET(sigma), AV_OPT_TYPE_INT, {.i64=128}, 1, INT_MAX, .flags=FLAGS },
{ "s", "set blur strength", OFFSET(sigma), AV_OPT_TYPE_INT, {.i64=128}, 1, INT_MAX, .flags=FLAGS },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: vf_yaepblur.c:323
static const struct @315 planes[]
#define FLAGS
Definition: vf_yaepblur.c:324

Definition at line 326 of file vf_yaepblur.c.

AVFilter ff_vf_yaepblur
Initial value:
= {
.name = "yaepblur",
.description = NULL_IF_CONFIG_SMALL("Yet another edge preserving blur filter."),
.priv_size = sizeof(YAEPContext),
.priv_class = &yaep_class,
}
#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:125
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_yaepblur.c:55
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
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:869
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:116
static int query_formats(AVFilterContext *ctx)
Definition: vf_yaepblur.c:62
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
static const AVFilterPad yaep_outputs[]
Definition: vf_yaepblur.c:315
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
#define flags(name, subs,...)
Definition: cbs_av1.c:564
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: af_afftdn.c:1374
static const AVFilterPad yaep_inputs[]
Definition: vf_yaepblur.c:305

Definition at line 338 of file vf_yaepblur.c.