FFmpeg
Classes | Macros | Typedefs | Functions | Variables
vf_sab.c File Reference

Shape Adaptive Blur filter, ported from MPlayer libmpcodecs/vf_sab.c. More...

#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
#include "libswscale/swscale.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"

Classes

struct  FilterParam
 
struct  SabContext
 

Macros

#define COLOR_DIFF_COEFF_SIZE   512
 
#define RADIUS_MIN   0.1
 
#define RADIUS_MAX   4.0
 
#define PRE_FILTER_RADIUS_MIN   0.1
 
#define PRE_FILTER_RADIUS_MAX   2.0
 
#define STRENGTH_MIN   0.1
 
#define STRENGTH_MAX   100.0
 
#define OFFSET(x)   offsetof(SabContext, x)
 
#define FLAGS   AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
 
#define NB_PLANES   4
 
#define UPDATE_FACTOR
 

Typedefs

typedef struct FilterParam FilterParam
 
typedef struct SabContext SabContext
 

Functions

 AVFILTER_DEFINE_CLASS (sab)
 

Variables

AVFilter ff_vf_sab
 

Detailed Description

Shape Adaptive Blur filter, ported from MPlayer libmpcodecs/vf_sab.c.

Macro Definition Documentation

§ UPDATE_FACTOR

#define UPDATE_FACTOR
Value:
do { \
int factor; \
factor = f.color_diff_coeff[COLOR_DIFF_COEFF_SIZE/2 + pre_val - \
f.pre_filter_buf[ix + iy*f.pre_filter_linesize]] * f.dist_coeff[dx + dy*f.dist_linesize]; \
sum += src[ix + iy*src_linesize] * factor; \
div += factor; \
} while (0)

Variable Documentation

§ ff_vf_sab

AVFilter ff_vf_sab
Initial value:
= {
.name = "sab",
.description = NULL_IF_CONFIG_SMALL("Apply shape adaptive blur."),
.priv_size = sizeof(SabContext),
.init = init,
.uninit = uninit,
.query_formats = query_formats,
.inputs = sab_inputs,
.outputs = sab_outputs,
.priv_class = &sab_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
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
Definition: vf_sab.c:49