FFmpeg
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 "gblur.h"
#include "internal.h"
#include "video.h"

Go to the source code of this file.

Data Structures

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

Macros

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

Functions

 AVFILTER_DEFINE_CLASS (gblur)
 
static void horiz_slice_c (float *buffer, int width, int height, int steps, float nu, float bscale)
 
static int filter_horizontally (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static void do_vertical_columns (float *buffer, int width, int height, int column_begin, int column_end, int steps, float nu, float boundaryscale, int column_step)
 
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)
 
void ff_gblur_init (GBlurContext *s)
 
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 37 of file vf_gblur.c.

Definition at line 38 of file vf_gblur.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( gblur  )
static void horiz_slice_c ( float *  buffer,
int  width,
int  height,
int  steps,
float  nu,
float  bscale 
)
static

Definition at line 55 of file vf_gblur.c.

Referenced by ff_gblur_init().

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

Definition at line 77 of file vf_gblur.c.

Referenced by gaussianiir2d().

static void do_vertical_columns ( float *  buffer,
int  width,
int  height,
int  column_begin,
int  column_end,
int  steps,
float  nu,
float  boundaryscale,
int  column_step 
)
static

Definition at line 96 of file vf_gblur.c.

Referenced by filter_vertically().

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

Definition at line 130 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 156 of file vf_gblur.c.

Referenced by gaussianiir2d().

static void gaussianiir2d ( AVFilterContext ctx,
int  plane 
)
static

Definition at line 175 of file vf_gblur.c.

Referenced by filter_frame().

static int query_formats ( AVFilterContext ctx)
static

Definition at line 193 of file vf_gblur.c.

void ff_gblur_init ( GBlurContext s)

Definition at line 219 of file vf_gblur.c.

Referenced by checkasm_check_vf_gblur(), and config_input().

static int config_input ( AVFilterLink inlink)
static

Definition at line 226 of file vf_gblur.c.

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

Definition at line 251 of file vf_gblur.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 262 of file vf_gblur.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 347 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:38
#define OFFSET(x)
Definition: vf_gblur.c:37
static const struct @317 planes[]

Definition at line 40 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 filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_gblur.c:262
static int config_input(AVFilterLink *inlink)
Definition: vf_gblur.c:226

Definition at line 354 of file vf_gblur.c.

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

Definition at line 364 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:354
#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_gblur.c:347
static int query_formats(AVFilterContext *ctx)
Definition: vf_gblur.c:193
#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:887
#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_acontrast.c:203
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
static const AVFilterPad gblur_outputs[]
Definition: vf_gblur.c:364
#define flags(name, subs,...)
Definition: cbs_av1.c:561
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: af_afftdn.c:1373

Definition at line 372 of file vf_gblur.c.