FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
af_acrossover.c File Reference

Crossover filter. More...

#include "libavutil/attributes.h"
#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
#include "libavutil/internal.h"
#include "libavutil/opt.h"
#include "audio.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  BiquadContext
 
struct  CrossoverChannel
 
struct  AudioCrossoverContext
 

Macros

#define MAX_SPLITS   16
 
#define MAX_BANDS   MAX_SPLITS + 1
 
#define OFFSET(x)   offsetof(AudioCrossoverContext, x)
 
#define AF   AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_FILTERING_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS (acrossover)
 
static av_cold int init (AVFilterContext *ctx)
 
static void set_lp (BiquadContext *b, float fc, float q, float sr)
 
static void set_hp (BiquadContext *b, float fc, float q, float sr)
 
static int config_input (AVFilterLink *inlink)
 
static int query_formats (AVFilterContext *ctx)
 
static double biquad_process (BiquadContext *b, double in)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption acrossover_options []
 
static const AVFilterPad inputs []
 
AVFilter ff_af_acrossover
 

Detailed Description

Crossover filter.

Split an audio stream into several bands.

Definition in file af_acrossover.c.

Macro Definition Documentation

#define MAX_SPLITS   16

Definition at line 37 of file af_acrossover.c.

Referenced by init().

#define MAX_BANDS   MAX_SPLITS + 1

Definition at line 38 of file af_acrossover.c.

Referenced by filter_frame().

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

Definition at line 65 of file af_acrossover.c.

Definition at line 66 of file af_acrossover.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( acrossover  )
static av_cold int init ( AVFilterContext ctx)
static

Definition at line 79 of file af_acrossover.c.

static void set_lp ( BiquadContext b,
float  fc,
float  q,
float  sr 
)
static

Definition at line 134 of file af_acrossover.c.

Referenced by config_input().

static void set_hp ( BiquadContext b,
float  fc,
float  q,
float  sr 
)
static

Definition at line 148 of file af_acrossover.c.

Referenced by config_input().

static int config_input ( AVFilterLink inlink)
static

Definition at line 163 of file af_acrossover.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 211 of file af_acrossover.c.

static double biquad_process ( BiquadContext b,
double  in 
)
static

Definition at line 241 of file af_acrossover.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 253 of file af_acrossover.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 311 of file af_acrossover.c.

Variable Documentation

const AVOption acrossover_options[]
static
Initial value:
= {
{ "split", "set split frequencies", OFFSET(splits_str), AV_OPT_TYPE_STRING, {.str="500"}, 0, 0, AF },
{ "order", "set order", OFFSET(order), AV_OPT_TYPE_INT, {.i64=1}, 0, 2, AF, "m" },
{ "2nd", "2nd order", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, AF, "m" },
{ "4th", "4th order", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, "m" },
{ "8th", "8th order", 0, AV_OPT_TYPE_CONST, {.i64=2}, 0, 0, AF, "m" },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define AF
Definition: af_acrossover.c:66
#define OFFSET(x)
Definition: af_acrossover.c:65

Definition at line 68 of file af_acrossover.c.

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

Definition at line 322 of file af_acrossover.c.

AVFilter ff_af_acrossover
Initial value:
= {
.name = "acrossover",
.description = NULL_IF_CONFIG_SMALL("Split audio into per-bands streams."),
.priv_size = sizeof(AudioCrossoverContext),
.priv_class = &acrossover_class,
.init = init,
}
#define NULL
Definition: coverity.c:32
static av_cold int init(AVFilterContext *ctx)
Definition: af_acrossover.c:79
static const AVFilterPad inputs[]
#define AVFILTER_FLAG_DYNAMIC_OUTPUTS
The number of the filter outputs is not determined just by AVFilter.outputs.
Definition: avfilter.h:111
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static int query_formats(AVFilterContext *ctx)
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
#define flags(name, subs,...)
Definition: cbs_av1.c:596
static av_cold void uninit(AVFilterContext *ctx)

Definition at line 332 of file af_acrossover.c.