FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
af_deesser.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "avfilter.h"
#include "audio.h"
#include "filters.h"

Go to the source code of this file.

Data Structures

struct  DeesserChannel
 
struct  DeesserContext
 

Macros

#define OFFSET(x)   offsetof(DeesserContext, x)
 
#define A   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 

Enumerations

enum  OutModes {
  IN_MODE, DESIRED_MODE, OUT_MODE, NOISE_MODE,
  ERROR_MODE, NB_OMODES, IN_MODE, OUT_MODE,
  NOISE_MODE, NB_MODES, IN_MODE, OUT_MODE,
  NOISE_MODE, NB_MODES, IN_MODE, DESIRED_MODE,
  OUT_MODE, NOISE_MODE, ERROR_MODE, NB_OMODES,
  IN_MODE, DESIRED_MODE, OUT_MODE, NOISE_MODE,
  ERROR_MODE, NB_OMODES, IN_MODE, OUT_MODE,
  ESS_MODE, NB_MODES
}
 

Functions

 AVFILTER_DEFINE_CLASS (deesser)
 
static int config_input (AVFilterLink *inlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption deesser_options []
 
static const AVFilterPad inputs []
 
const AVFilter ff_af_deesser
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 56 of file af_deesser.c.

◆ A

Definition at line 57 of file af_deesser.c.

Enumeration Type Documentation

◆ OutModes

enum OutModes
Enumerator
IN_MODE 
DESIRED_MODE 
OUT_MODE 
NOISE_MODE 
ERROR_MODE 
NB_OMODES 
IN_MODE 
OUT_MODE 
NOISE_MODE 
NB_MODES 
IN_MODE 
OUT_MODE 
NOISE_MODE 
NB_MODES 
IN_MODE 
DESIRED_MODE 
OUT_MODE 
NOISE_MODE 
ERROR_MODE 
NB_OMODES 
IN_MODE 
DESIRED_MODE 
OUT_MODE 
NOISE_MODE 
ERROR_MODE 
NB_OMODES 
IN_MODE 
OUT_MODE 
ESS_MODE 
NB_MODES 

Definition at line 49 of file af_deesser.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( deesser  )

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 72 of file af_deesser.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 90 of file af_deesser.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 181 of file af_deesser.c.

Variable Documentation

◆ deesser_options

const AVOption deesser_options[]
static
Initial value:
= {
{ "i", "set intensity", OFFSET(intensity), AV_OPT_TYPE_DOUBLE, {.dbl=0.0}, 0.0, 1.0, A },
{ "m", "set max deessing", OFFSET(max), AV_OPT_TYPE_DOUBLE, {.dbl=0.5}, 0.0, 1.0, A },
{ "f", "set frequency", OFFSET(frequency), AV_OPT_TYPE_DOUBLE, {.dbl=0.5}, 0.0, 1.0, A },
{ "s", "set output mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64=OUT_MODE}, 0, NB_MODES-1, A, .unit = "mode" },
{ "i", "input", 0, AV_OPT_TYPE_CONST, {.i64=IN_MODE}, 0, 0, A, .unit = "mode" },
{ "o", "output", 0, AV_OPT_TYPE_CONST, {.i64=OUT_MODE}, 0, 0, A, .unit = "mode" },
{ "e", "ess", 0, AV_OPT_TYPE_CONST, {.i64=ESS_MODE}, 0, 0, A, .unit = "mode" },
{ NULL }
}

Definition at line 59 of file af_deesser.c.

◆ inputs

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

Definition at line 188 of file af_deesser.c.

◆ ff_af_deesser

const AVFilter ff_af_deesser
Initial value:
= {
.name = "deesser",
.description = NULL_IF_CONFIG_SMALL("Apply de-essing to the audio."),
.priv_size = sizeof(DeesserContext),
.priv_class = &deesser_class,
}

Definition at line 197 of file af_deesser.c.

FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: filters.h:262
config_input
static int config_input(AVFilterLink *inlink)
Definition: af_deesser.c:72
max
#define max(a, b)
Definition: cuda_runtime.h:33
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_deesser.c:181
NB_MODES
@ NB_MODES
Definition: af_deesser.c:53
IN_MODE
@ IN_MODE
Definition: af_deesser.c:50
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_deesser.c:90
inputs
static const AVFilterPad inputs[]
Definition: af_deesser.c:188
AV_OPT_TYPE_DOUBLE
@ AV_OPT_TYPE_DOUBLE
Underlying C type is double.
Definition: opt.h:267
A
#define A
Definition: af_deesser.c:57
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: filters.h:263
NULL
#define NULL
Definition: coverity.c:32
ff_audio_default_filterpad
const AVFilterPad ff_audio_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_AUDIO.
Definition: audio.c:34
FILTER_SINGLE_SAMPLEFMT
#define FILTER_SINGLE_SAMPLEFMT(sample_fmt_)
Definition: filters.h:255
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:94
OFFSET
#define OFFSET(x)
Definition: af_deesser.c:56
OUT_MODE
@ OUT_MODE
Definition: af_deesser.c:51
mode
mode
Definition: ebur128.h:83
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition: opt.h:259
AV_SAMPLE_FMT_DBLP
@ AV_SAMPLE_FMT_DBLP
double, planar
Definition: samplefmt.h:67
ESS_MODE
@ ESS_MODE
Definition: af_deesser.c:52
AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will have its filter_frame() c...
Definition: avfilter.h:190
DeesserContext
Definition: af_deesser.c:38
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition: opt.h:299