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/eval.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


#define MAX_SPLITS   16
#define MAX_BANDS   MAX_SPLITS + 1
#define OFFSET(x)   offsetof(AudioCrossoverContext, x)


static av_cold int init (AVFilterContext *ctx)
static void set_lp (BiquadContext *b, double fc, double q, double sr)
static int config_input (AVFilterLink *inlink)
static int query_formats (AVFilterContext *ctx)
static double biquad_process (BiquadContext *b, double in)
static int filter_channels (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
static av_cold void uninit (AVFilterContext *ctx)


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 38 of file af_acrossover.c.

Referenced by init().

#define MAX_BANDS   MAX_SPLITS + 1

Definition at line 39 of file af_acrossover.c.

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

Definition at line 68 of file af_acrossover.c.

Definition at line 69 of file af_acrossover.c.

Function Documentation

static av_cold int init ( AVFilterContext ctx)

Definition at line 82 of file af_acrossover.c.

static void set_lp ( BiquadContext b,
double  fc,
double  q,
double  sr 

Definition at line 136 of file af_acrossover.c.

Referenced by config_input().

static int config_input ( AVFilterLink inlink)

Definition at line 151 of file af_acrossover.c.

static int query_formats ( AVFilterContext ctx)

Definition at line 194 of file af_acrossover.c.

static double biquad_process ( BiquadContext b,
double  in 

Definition at line 224 of file af_acrossover.c.

Referenced by filter_channels().

static int filter_channels ( AVFilterContext ctx,
void arg,
int  jobnr,
int  nb_jobs 

Definition at line 236 of file af_acrossover.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink inlink,
AVFrame in 

Definition at line 273 of file af_acrossover.c.

static av_cold void uninit ( AVFilterContext ctx)

Definition at line 314 of file af_acrossover.c.

Variable Documentation

const AVOption acrossover_options[]
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:69
#define OFFSET(x)
Definition: af_acrossover.c:68

Definition at line 71 of file af_acrossover.c.

const AVFilterPad inputs[]
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 326 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:82
static const AVFilterPad inputs[]
The number of the filter outputs is not determined just by AVFilter.outputs.
Definition: avfilter.h:111
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:116
static int query_formats(AVFilterContext *ctx)
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
#define flags(name, subs,...)
Definition: cbs_av1.c:564
static av_cold void uninit(AVFilterContext *ctx)

Definition at line 336 of file af_acrossover.c.