FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
vf_gblur.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  GBlurContext
 
struct  ThreadData
 

Macros

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

Functions

 AVFILTER_DEFINE_CLASS (gblur)
 
static int filter_horizontally (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int filter_vertically (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int filter_postscale (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static void gaussianiir2d (AVFilterContext *ctx, int plane)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 
static void set_params (float sigma, int steps, float *postscale, float *boundaryscale, float *nu)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption gblur_options []
 
static const AVFilterPad gblur_inputs []
 
static const AVFilterPad gblur_outputs []
 
AVFilter ff_vf_gblur
 

Macro Definition Documentation

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

Definition at line 57 of file vf_gblur.c.

Definition at line 58 of file vf_gblur.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( gblur  )
static int filter_horizontally ( AVFilterContext ctx,
void arg,
int  jobnr,
int  nb_jobs 
)
static

Definition at line 75 of file vf_gblur.c.

Referenced by gaussianiir2d().

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

Definition at line 111 of file vf_gblur.c.

Referenced by gaussianiir2d().

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

Definition at line 149 of file vf_gblur.c.

Referenced by gaussianiir2d().

static void gaussianiir2d ( AVFilterContext ctx,
int  plane 
)
static

Definition at line 168 of file vf_gblur.c.

Referenced by filter_frame().

static int query_formats ( AVFilterContext ctx)
static

Definition at line 186 of file vf_gblur.c.

static int config_input ( AVFilterLink inlink)
static

Definition at line 212 of file vf_gblur.c.

static void set_params ( float  sigma,
int  steps,
float *  postscale,
float *  boundaryscale,
float *  nu 
)
static

Definition at line 236 of file vf_gblur.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 247 of file vf_gblur.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 332 of file vf_gblur.c.

Variable Documentation

const AVOption gblur_options[]
static
Initial value:
= {
{ "sigma", "set sigma", OFFSET(sigma), AV_OPT_TYPE_FLOAT, {.dbl=0.5}, 0.0, 1024, FLAGS },
{ "steps", "set number of steps", OFFSET(steps), AV_OPT_TYPE_INT, {.i64=1}, 1, 6, FLAGS },
{ "planes", "set planes to filter", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=0xF}, 0, 0xF, FLAGS },
{ "sigmaV", "set vertical sigma", OFFSET(sigmaV), AV_OPT_TYPE_FLOAT, {.dbl=-1}, -1, 1024, FLAGS },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define FLAGS
Definition: vf_gblur.c:58
#define OFFSET(x)
Definition: vf_gblur.c:57

Definition at line 60 of file vf_gblur.c.

const AVFilterPad gblur_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_gblur.c:212
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_gblur.c:247

Definition at line 339 of file vf_gblur.c.

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

Definition at line 349 of file vf_gblur.c.

AVFilter ff_vf_gblur
Initial value:
= {
.name = "gblur",
.description = NULL_IF_CONFIG_SMALL("Apply Gaussian Blur filter."),
.priv_size = sizeof(GBlurContext),
.priv_class = &gblur_class,
}
static const AVFilterPad gblur_inputs[]
Definition: vf_gblur.c:339
#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 int flags
Definition: log.c:57
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_gblur.c:332
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:179
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:116
static const AVFilterPad outputs[]
Definition: af_afftfilt.c:386
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:376
static int query_formats(AVFilterContext *ctx)
Definition: vf_gblur.c:186
static const AVFilterPad gblur_outputs[]
Definition: vf_gblur.c:349

Definition at line 357 of file vf_gblur.c.