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

Bauer stereo-to-binaural filter. More...

#include <bs2b.h>
#include "libavutil/channel_layout.h"
#include "libavutil/common.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  Bs2bContext
 

Macros

#define OFFSET(x)   offsetof(Bs2bContext, x)
 
#define A   AV_OPT_FLAG_AUDIO_PARAM
 

Functions

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

Variables

static const AVOption options []
 
static const AVClass bs2b_class
 
static const AVFilterPad bs2b_inputs []
 
static const AVFilterPad bs2b_outputs []
 
AVFilter ff_af_bs2b
 

Detailed Description

Bauer stereo-to-binaural filter.

Definition in file af_bs2b.c.

Macro Definition Documentation

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

Definition at line 47 of file af_bs2b.c.

#define A   AV_OPT_FLAG_AUDIO_PARAM

Definition at line 48 of file af_bs2b.c.

Function Documentation

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 70 of file af_bs2b.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 88 of file af_bs2b.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 96 of file af_bs2b.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame frame 
)
static

Definition at line 127 of file af_bs2b.c.

static int config_output ( AVFilterLink outlink)
static

Definition at line 158 of file af_bs2b.c.

Variable Documentation

const AVOption options[]
static
Initial value:
= {
{ "profile", "Apply a pre-defined crossfeed level",
OFFSET(profile), AV_OPT_TYPE_INT, { .i64 = BS2B_DEFAULT_CLEVEL }, 0, INT_MAX, A, "profile" },
{ "default", "default profile", 0, AV_OPT_TYPE_CONST, { .i64 = BS2B_DEFAULT_CLEVEL }, 0, 0, A, "profile" },
{ "cmoy", "Chu Moy circuit", 0, AV_OPT_TYPE_CONST, { .i64 = BS2B_CMOY_CLEVEL }, 0, 0, A, "profile" },
{ "jmeier", "Jan Meier circuit", 0, AV_OPT_TYPE_CONST, { .i64 = BS2B_JMEIER_CLEVEL }, 0, 0, A, "profile" },
{ "fcut", "Set cut frequency (in Hz)",
OFFSET(fcut), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, BS2B_MAXFCUT, A },
{ "feed", "Set feed level (in Hz)",
OFFSET(feed), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, BS2B_MAXFEED, A },
{ NULL },
}

Definition at line 50 of file af_bs2b.c.

const AVClass bs2b_class
static
Initial value:
= {
.class_name = "bs2b filter",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 63 of file af_bs2b.c.

const AVFilterPad bs2b_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}

Definition at line 194 of file af_bs2b.c.

const AVFilterPad bs2b_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_output,
},
{ NULL }
}

Definition at line 203 of file af_bs2b.c.

AVFilter ff_af_bs2b
Initial value:
= {
.name = "bs2b",
.description = NULL_IF_CONFIG_SMALL("Bauer stereo-to-binaural filter."),
.query_formats = query_formats,
.priv_size = sizeof(Bs2bContext),
.priv_class = &bs2b_class,
.init = init,
}

Definition at line 212 of file af_bs2b.c.