af_biquads.c File Reference
#include "libavutil/opt.h"
#include "libavutil/avassert.h"
#include "audio.h"
#include "avfilter.h"
#include "internal.h"
Include dependency graph for af_biquads.c:

Go to the source code of this file.

Data Structures

struct  ChanCache
 
struct  BiquadsContext
 

Macros

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

Typedefs

typedef struct ChanCache ChanCache
 

Enumerations

enum  FilterType {
  biquad, equalizer, bass, treble,
  band, bandpass, bandreject, allpass,
  highpass, lowpass
}
 
enum  WidthType {
  NONE, HZ, OCTAVE, QFACTOR,
  SLOPE
}
 

Functions

static av_cold int init (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_output (AVFilterLink *outlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *buf)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

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

Macro Definition Documentation

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

Definition at line 164 of file af_biquads.c.

#define DEFINE_BIQUAD_FILTER (   name_,
  description_ 
)
Value:
static av_cold int name_##_init(AVFilterContext *ctx) \
{ \
BiquadsContext *p = ctx->priv; \
p->class = &name_##_class; \
p->filter_type = name_; \
return init(ctx); \
} \
\
AVFilter avfilter_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, \
}
static const AVFilterPad inputs[]
Definition: af_biquads.c:426
#define av_cold
Definition: attributes.h:78
static const AVFilterPad outputs[]
Definition: af_biquads.c:435
static av_cold int init(AVFilterContext *ctx)
Definition: af_biquads.c:119
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
struct AVFilter AVFilter
Filter definition.
const char * name
filter name
Definition: avfilter.h:437
static int query_formats(AVFilterContext *ctx)
Definition: af_biquads.c:134
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_biquads.c:419
#define AVFILTER_DEFINE_CLASS(fname)
An instance of a filter.
Definition: avfilter.h:524
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 the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame This method is called when a frame is wanted on an output For an it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return it should return

Definition at line 447 of file af_biquads.c.

Definition at line 445 of file af_biquads.c.

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

Definition at line 444 of file af_biquads.c.

Typedef Documentation

typedef struct ChanCache ChanCache

Enumeration Type Documentation

enum FilterType
Enumerator
biquad 
equalizer 
bass 
treble 
band 
bandpass 
bandreject 
allpass 
highpass 
lowpass 

Definition at line 71 of file af_biquads.c.

enum WidthType
Enumerator
NONE 
HZ 
OCTAVE 
QFACTOR 
SLOPE 

Definition at line 84 of file af_biquads.c.

Function Documentation

static int config_output ( AVFilterLink outlink)
static

Definition at line 233 of file af_biquads.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame buf 
)
static

Definition at line 389 of file af_biquads.c.

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 119 of file af_biquads.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 134 of file af_biquads.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 419 of file af_biquads.c.

Variable Documentation

const AVFilterPad inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}
NULL
Definition: eval.c:55
static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
Definition: af_biquads.c:389

Definition at line 426 of file af_biquads.c.

const AVFilterPad outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_output,
},
{ NULL }
}
NULL
Definition: eval.c:55
static int config_output(AVFilterLink *outlink)
Definition: af_biquads.c:233

Definition at line 435 of file af_biquads.c.