FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
vf_deblock.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  DeblockContext
 

Macros

#define WEAK_HFILTER(name, type, ldiv)
 
#define WEAK_VFILTER(name, type, ldiv)
 
#define STRONG_HFILTER(name, type, ldiv)
 
#define STRONG_VFILTER(name, type, ldiv)
 
#define OFFSET(x)   offsetof(DeblockContext, x)
 
#define FLAGS   AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM
 

Enumerations

enum  FilterType {
  BUTTERWORTH, CHEBYSHEV1, CHEBYSHEV2, NB_TYPES,
  biquad, equalizer, bass, treble,
  bandpass, bandreject, allpass, highpass,
  lowpass, lowshelf, highshelf, WEAK,
  STRONG, NB_FILTER, LOWPASS, FLAT,
  AFLAT, CHROMA, COLOR, ACOLOR,
  XFLAT, YFLAT, NB_FILTERS
}
 

Functions

static int query_formats (AVFilterContext *ctx)
 
static int config_output (AVFilterLink *outlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
 AVFILTER_DEFINE_CLASS (deblock)
 

Variables

static const AVOption deblock_options []
 
static const AVFilterPad inputs []
 
static const AVFilterPad outputs []
 
AVFilter ff_vf_deblock
 

Macro Definition Documentation

◆ WEAK_HFILTER

#define WEAK_HFILTER (   name,
  type,
  ldiv 
)

Definition at line 93 of file vf_deblock.c.

◆ WEAK_VFILTER

#define WEAK_VFILTER (   name,
  type,
  ldiv 
)

Definition at line 132 of file vf_deblock.c.

◆ STRONG_HFILTER

#define STRONG_HFILTER (   name,
  type,
  ldiv 
)

Definition at line 173 of file vf_deblock.c.

◆ STRONG_VFILTER

#define STRONG_VFILTER (   name,
  type,
  ldiv 
)

Definition at line 219 of file vf_deblock.c.

◆ OFFSET

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

Definition at line 370 of file vf_deblock.c.

◆ FLAGS

Definition at line 371 of file vf_deblock.c.

Enumeration Type Documentation

◆ FilterType

enum FilterType
Enumerator
BUTTERWORTH 
CHEBYSHEV1 
CHEBYSHEV2 
NB_TYPES 
biquad 
equalizer 
bass 
treble 
bandpass 
bandreject 
allpass 
highpass 
lowpass 
lowshelf 
highshelf 
WEAK 
STRONG 
NB_FILTER 
LOWPASS 
FLAT 
AFLAT 
CHROMA 
COLOR 
ACOLOR 
XFLAT 
YFLAT 
NB_FILTERS 

Definition at line 34 of file vf_deblock.c.

Function Documentation

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 64 of file vf_deblock.c.

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 267 of file vf_deblock.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 309 of file vf_deblock.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( deblock  )

Variable Documentation

◆ deblock_options

const AVOption deblock_options[]
static
Initial value:
= {
{ "filter", "set type of filter", OFFSET(filter), AV_OPT_TYPE_INT, {.i64=STRONG},0, 1, FLAGS, "filter" },
{ "weak", 0, 0, AV_OPT_TYPE_CONST, {.i64=WEAK}, 0, 0, FLAGS, "filter" },
{ "strong", 0, 0, AV_OPT_TYPE_CONST, {.i64=STRONG},0, 0, FLAGS, "filter" },
{ "block", "set size of block", OFFSET(block), AV_OPT_TYPE_INT, {.i64=8}, 4, 512, FLAGS },
{ "alpha", "set 1st detection threshold", OFFSET(alpha), AV_OPT_TYPE_FLOAT, {.dbl=.098}, 0, 1, FLAGS },
{ "beta", "set 2nd detection threshold", OFFSET(beta), AV_OPT_TYPE_FLOAT, {.dbl=.05}, 0, 1, FLAGS },
{ "gamma", "set 3rd detection threshold", OFFSET(gamma), AV_OPT_TYPE_FLOAT, {.dbl=.05}, 0, 1, FLAGS },
{ "delta", "set 4th detection threshold", OFFSET(delta), AV_OPT_TYPE_FLOAT, {.dbl=.05}, 0, 1, FLAGS },
{ "planes", "set planes to filter", OFFSET(planes), AV_OPT_TYPE_INT, {.i64=15}, 0, 15, FLAGS },
{ NULL },
}

Definition at line 373 of file vf_deblock.c.

◆ inputs

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

Definition at line 386 of file vf_deblock.c.

◆ outputs

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

Definition at line 395 of file vf_deblock.c.

◆ ff_vf_deblock

AVFilter ff_vf_deblock
Initial value:
= {
.name = "deblock",
.description = NULL_IF_CONFIG_SMALL("Deblock video."),
.priv_size = sizeof(DeblockContext),
.priv_class = &deblock_class,
}

Definition at line 406 of file vf_deblock.c.

outputs
static const AVFilterPad outputs[]
Definition: vf_deblock.c:395
inputs
static const AVFilterPad inputs[]
Definition: vf_deblock.c:386
filter
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce then the filter should push the output frames on the output link immediately As an exception to the previous rule if the input frame is enough to produce several output frames then the filter needs output only at least one per link The additional frames can be left buffered in the filter
Definition: filter_design.txt:228
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: vf_deblock.c:64
NULL
#define NULL
Definition: coverity.c:32
config_output
static int config_output(AVFilterLink *outlink)
Definition: vf_deblock.c:267
WEAK
@ WEAK
Definition: vf_deblock.c:34
DeblockContext
Definition: vf_deblock.c:36
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
STRONG
@ STRONG
Definition: vf_deblock.c:34
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
AV_OPT_TYPE_FLOAT
@ AV_OPT_TYPE_FLOAT
Definition: opt.h:226
planes
static const struct @315 planes[]
OFFSET
#define OFFSET(x)
Definition: vf_deblock.c:370
delta
float delta
Definition: vorbis_enc_data.h:457
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:223
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: vf_deblock.c:309
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
alpha
static const int16_t alpha[]
Definition: ilbcdata.h:55
FLAGS
#define FLAGS
Definition: vf_deblock.c:371
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:565
block
The exact code depends on how similar the blocks are and how related they are to the block
Definition: filter_design.txt:207
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:232