FFmpeg  4.0
Data Structures | Macros | Enumerations | Functions | Variables
af_biquads.c File Reference
#include "libavutil/avassert.h"
#include "libavutil/opt.h"
#include "audio.h"
#include "avfilter.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  ChanCache
 
struct  BiquadsContext
 

Macros

#define BIQUAD_FILTER(name, type, min, max, need_clipping)
 
#define OFFSET(x)   offsetof(BiquadsContext, x)
 
#define FLAGS   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
#define DEFINE_BIQUAD_FILTER(name_, description_)
 

Enumerations

enum  FilterType {
  BUTTERWORTH, CHEBYSHEV1, CHEBYSHEV2, NB_TYPES,
  biquad, equalizer, bass, treble,
  bandpass, bandreject, allpass, highpass,
  lowpass, LOWPASS, FLAT, AFLAT,
  CHROMA, COLOR, ACOLOR, XFLAT,
  NB_FILTERS
}
 
enum  WidthType {
  NONE, HERTZ, OCTAVE, QFACTOR,
  SLOPE, KHERTZ, NB_WTYPE
}
 

Functions

static av_cold int init (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_filter (AVFilterLink *outlink, int reset)
 
static int config_output (AVFilterLink *outlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *buf)
 
static int process_command (AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVFilterPad inputs []
 
static const AVFilterPad outputs []
 

Macro Definition Documentation

◆ BIQUAD_FILTER

#define BIQUAD_FILTER (   name,
  type,
  min,
  max,
  need_clipping 
)

Definition at line 171 of file af_biquads.c.

◆ OFFSET

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

Definition at line 590 of file af_biquads.c.

◆ FLAGS

Definition at line 591 of file af_biquads.c.

◆ DEFINE_BIQUAD_FILTER

#define DEFINE_BIQUAD_FILTER (   name_,
  description_ 
)
Value:
static av_cold int name_##_init(AVFilterContext *ctx) \
{ \
BiquadsContext *s = ctx->priv; \
s->class = &name_##_class; \
s->filter_type = name_; \
return init(ctx); \
} \
\
AVFilter ff_af_##name_ = { \
.name = #name_, \
.description = NULL_IF_CONFIG_SMALL(description_), \
.priv_size = sizeof(BiquadsContext), \
.init = name_##_init, \
.uninit = uninit, \
.inputs = inputs, \
.priv_class = &name_##_class, \
}
const char * s
Definition: avisynth_c.h:768
static const AVFilterPad inputs[]
Definition: af_biquads.c:572
#define av_cold
Definition: attributes.h:82
static const AVFilterPad outputs[]
Definition: af_biquads.c:581
static av_cold int init(AVFilterContext *ctx)
Definition: af_biquads.c:123
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
AVFormatContext * ctx
Definition: movenc.c:48
static int query_formats(AVFilterContext *ctx)
Definition: af_biquads.c:138
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_biquads.c:565
#define AVFILTER_DEFINE_CLASS(fname)
Definition: internal.h:334
An instance of a filter.
Definition: avfilter.h:338
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: af_biquads.c:454

Definition at line 593 of file af_biquads.c.

Enumeration Type Documentation

◆ FilterType

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

Definition at line 71 of file af_biquads.c.

◆ WidthType

enum WidthType
Enumerator
NONE 
HERTZ 
OCTAVE 
QFACTOR 
SLOPE 
KHERTZ 
NB_WTYPE 

Definition at line 83 of file af_biquads.c.

Function Documentation

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 123 of file af_biquads.c.

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 138 of file af_biquads.c.

◆ config_filter()

static int config_filter ( AVFilterLink outlink,
int  reset 
)
static

Definition at line 241 of file af_biquads.c.

Referenced by config_output(), and process_command().

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 406 of file af_biquads.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame buf 
)
static

Definition at line 411 of file af_biquads.c.

◆ process_command()

static int process_command ( AVFilterContext ctx,
const char *  cmd,
const char *  args,
char *  res,
int  res_len,
int  flags 
)
static

Definition at line 454 of file af_biquads.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 565 of file af_biquads.c.

Variable Documentation

◆ inputs

const AVFilterPad inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
Definition: af_biquads.c:411

Definition at line 572 of file af_biquads.c.

◆ outputs

const AVFilterPad outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_output,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int config_output(AVFilterLink *outlink)
Definition: af_biquads.c:406

Definition at line 581 of file af_biquads.c.