FFmpeg
Data Structures | Macros | Functions | Variables
vf_avgblur.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  AverageBlurContext
 
struct  ThreadData
 Used for passing data between threads. More...
 

Macros

#define OFFSET(x)   offsetof(AverageBlurContext, x)
 
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
#define HORIZONTAL_FILTER(name, type)
 
#define VERTICAL_FILTER(name, type)
 

Functions

 AVFILTER_DEFINE_CLASS (avgblur)
 
static int config_input (AVFilterLink *inlink)
 
static void averageiir2d (AVFilterContext *ctx, AVFrame *in, AVFrame *out, int plane)
 
static int query_formats (AVFilterContext *ctx)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption avgblur_options []
 
static const AVFilterPad avgblur_inputs []
 
static const AVFilterPad avgblur_outputs []
 
AVFilter ff_vf_avgblur
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 48 of file vf_avgblur.c.

◆ FLAGS

Definition at line 49 of file vf_avgblur.c.

◆ HORIZONTAL_FILTER

#define HORIZONTAL_FILTER (   name,
  type 
)

Definition at line 67 of file vf_avgblur.c.

◆ VERTICAL_FILTER

#define VERTICAL_FILTER (   name,
  type 
)

Definition at line 120 of file vf_avgblur.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( avgblur  )

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 176 of file vf_avgblur.c.

◆ averageiir2d()

static void averageiir2d ( AVFilterContext ctx,
AVFrame in,
AVFrame out,
int  plane 
)
static

Definition at line 208 of file vf_avgblur.c.

Referenced by filter_frame().

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 226 of file vf_avgblur.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 252 of file vf_avgblur.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 291 of file vf_avgblur.c.

Variable Documentation

◆ avgblur_options

const AVOption avgblur_options[]
static
Initial value:
= {
{ "sizeX", "set horizontal size", OFFSET(radius), AV_OPT_TYPE_INT, {.i64=1}, 1, 1024, FLAGS },
{ "planes", "set planes to filter", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=0xF}, 0, 0xF, FLAGS },
{ "sizeY", "set vertical size", OFFSET(radiusV), AV_OPT_TYPE_INT, {.i64=0}, 0, 1024, FLAGS },
{ NULL }
}

Definition at line 51 of file vf_avgblur.c.

◆ avgblur_inputs

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

Definition at line 298 of file vf_avgblur.c.

◆ avgblur_outputs

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

Definition at line 308 of file vf_avgblur.c.

◆ ff_vf_avgblur

AVFilter ff_vf_avgblur
Initial value:
= {
.name = "avgblur",
.description = NULL_IF_CONFIG_SMALL("Apply Average Blur filter."),
.priv_size = sizeof(AverageBlurContext),
.priv_class = &avgblur_class,
}

Definition at line 316 of file vf_avgblur.c.

query_formats
static int query_formats(AVFilterContext *ctx)
Definition: vf_avgblur.c:226
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: vf_avgblur.c:291
FLAGS
#define FLAGS
Definition: vf_avgblur.c:49
outputs
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
NULL
#define NULL
Definition: coverity.c:32
avgblur_inputs
static const AVFilterPad avgblur_inputs[]
Definition: vf_avgblur.c:298
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
avgblur_outputs
static const AVFilterPad avgblur_outputs[]
Definition: vf_avgblur.c:308
planes
static const struct @314 planes[]
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:188
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:125
OFFSET
#define OFFSET(x)
Definition: vf_avgblur.c:48
AverageBlurContext
Definition: vf_avgblur.c:31
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:223
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_avgblur.c:252
AVFILTER_FLAG_SLICE_THREADS
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:116
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:565
config_input
static int config_input(AVFilterLink *inlink)
Definition: vf_avgblur.c:176