FFmpeg
Data Structures | Macros | Typedefs | Functions | Variables
af_bs2b.c File Reference
#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 | AV_OPT_FLAG_FILTERING_PARAM
 

Typedefs

typedef void(* filter_func) (t_bs2bdp bs2bdp, uint8_t *sample, int n)
 

Functions

 AVFILTER_DEFINE_CLASS (bs2b)
 
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 bs2b_options []
 
static const AVFilterPad bs2b_inputs []
 
static const AVFilterPad bs2b_outputs []
 
const AVFilter ff_af_bs2b
 

Detailed Description

Bauer stereo-to-binaural filter

Definition in file af_bs2b.c.

Macro Definition Documentation

◆ OFFSET

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

Definition at line 49 of file af_bs2b.c.

◆ A

Definition at line 50 of file af_bs2b.c.

Typedef Documentation

◆ filter_func

typedef void(* filter_func) (t_bs2bdp bs2bdp, uint8_t *sample, int n)

Definition at line 35 of file af_bs2b.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( bs2b  )

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 67 of file af_bs2b.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 85 of file af_bs2b.c.

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 93 of file af_bs2b.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame frame 
)
static

Definition at line 120 of file af_bs2b.c.

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 153 of file af_bs2b.c.

Variable Documentation

◆ bs2b_options

const AVOption bs2b_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 52 of file af_bs2b.c.

◆ bs2b_inputs

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

Definition at line 189 of file af_bs2b.c.

◆ bs2b_outputs

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

Definition at line 197 of file af_bs2b.c.

◆ ff_af_bs2b

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

Definition at line 205 of file af_bs2b.c.

profile
mfxU16 profile
Definition: qsvenc.c:45
FILTER_QUERY_FUNC
#define FILTER_QUERY_FUNC(func)
Definition: internal.h:168
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: af_bs2b.c:93
bs2b_outputs
static const AVFilterPad bs2b_outputs[]
Definition: af_bs2b.c:197
Bs2bContext
Definition: af_bs2b.c:37
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:191
feed
static void feed(AVFilterContext *ctx, int ch, const float *in_samples, float *out_samples, int diff_only, float *in_frame, float *out_dist_frame, float *windowed_frame, float *clipping_delta, float *spectrum_buf, float *mask_curve)
Definition: af_apsyclip.c:396
A
#define A
Definition: af_bs2b.c:50
NULL
#define NULL
Definition: coverity.c:32
init
static av_cold int init(AVFilterContext *ctx)
Definition: af_bs2b.c:67
config_output
static int config_output(AVFilterLink *outlink)
Definition: af_bs2b.c:153
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
Definition: af_bs2b.c:120
OFFSET
#define OFFSET(x)
Definition: af_bs2b.c:49
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:224
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:192
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:233
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_bs2b.c:85
bs2b_inputs
static const AVFilterPad bs2b_inputs[]
Definition: af_bs2b.c:189