FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
af_aemphasis.c File Reference
#include "libavutil/opt.h"
#include "avfilter.h"
#include "internal.h"
#include "audio.h"

Go to the source code of this file.

Data Structures

struct  BiquadCoeffs
 
struct  BiquadD2
 
struct  RIAACurve
 
struct  AudioEmphasisContext
 

Macros

#define OFFSET(x)   offsetof(AudioEmphasisContext, x)
 
#define FLAGS   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS (aemphasis)
 
static double biquad (BiquadD2 *bq, double in)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static int query_formats (AVFilterContext *ctx)
 
static void set_highshelf_rbj (BiquadD2 *bq, double freq, double q, double peak, double sr)
 
static void set_lp_rbj (BiquadD2 *bq, double fc, double q, double sr, double gain)
 
static double freq_gain (BiquadCoeffs *c, double freq, double sr)
 
static int config_input (AVFilterLink *inlink)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption aemphasis_options []
 
static const AVFilterPad avfilter_af_aemphasis_inputs []
 
static const AVFilterPad avfilter_af_aemphasis_outputs []
 
AVFilter ff_af_aemphasis
 

Macro Definition Documentation

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

Definition at line 48 of file af_aemphasis.c.

Definition at line 49 of file af_aemphasis.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( aemphasis  )
static double biquad ( BiquadD2 bq,
double  in 
)
inlinestatic

Definition at line 72 of file af_aemphasis.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 84 of file af_aemphasis.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 120 of file af_aemphasis.c.

static void set_highshelf_rbj ( BiquadD2 bq,
double  freq,
double  q,
double  peak,
double  sr 
)
inlinestatic

Definition at line 150 of file af_aemphasis.c.

Referenced by config_input().

static void set_lp_rbj ( BiquadD2 bq,
double  fc,
double  q,
double  sr,
double  gain 
)
inlinestatic

Definition at line 174 of file af_aemphasis.c.

Referenced by config_input().

static double freq_gain ( BiquadCoeffs c,
double  freq,
double  sr 
)
static

Definition at line 188 of file af_aemphasis.c.

Referenced by config_input().

static int config_input ( AVFilterLink inlink)
static

Definition at line 201 of file af_aemphasis.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 336 of file af_aemphasis.c.

Variable Documentation

const AVOption aemphasis_options[]
static
Initial value:
= {
{ "level_in", "set input gain", OFFSET(level_in), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 64, FLAGS },
{ "level_out", "set output gain", OFFSET(level_out), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 64, FLAGS },
{ "mode", "set filter mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64=0}, 0, 1, FLAGS, "mode" },
{ "reproduction", NULL, 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, "mode" },
{ "production", NULL, 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, "mode" },
{ "type", "set filter type", OFFSET(type), AV_OPT_TYPE_INT, {.i64=4}, 0, 8, FLAGS, "type" },
{ "col", "Columbia", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, "type" },
{ "emi", "EMI", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, "type" },
{ "bsi", "BSI (78RPM)", 0, AV_OPT_TYPE_CONST, {.i64=2}, 0, 0, FLAGS, "type" },
{ "riaa", "RIAA", 0, AV_OPT_TYPE_CONST, {.i64=3}, 0, 0, FLAGS, "type" },
{ "cd", "Compact Disc (CD)", 0, AV_OPT_TYPE_CONST, {.i64=4}, 0, 0, FLAGS, "type" },
{ "50fm", "50µs (FM)", 0, AV_OPT_TYPE_CONST, {.i64=5}, 0, 0, FLAGS, "type" },
{ "75fm", "75µs (FM)", 0, AV_OPT_TYPE_CONST, {.i64=6}, 0, 0, FLAGS, "type" },
{ "50kf", "50µs (FM-KF)", 0, AV_OPT_TYPE_CONST, {.i64=7}, 0, 0, FLAGS, "type" },
{ "75kf", "75µs (FM-KF)", 0, AV_OPT_TYPE_CONST, {.i64=8}, 0, 0, FLAGS, "type" },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: af_aemphasis.c:48
GLint GLenum type
Definition: opengl_enc.c:105
#define FLAGS
Definition: af_aemphasis.c:49
mode
Use these values in ebur128_init (or'ed).
Definition: ebur128.h:83

Definition at line 51 of file af_aemphasis.c.

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

Definition at line 342 of file af_aemphasis.c.

const AVFilterPad avfilter_af_aemphasis_outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}
#define NULL
Definition: coverity.c:32

Definition at line 352 of file af_aemphasis.c.

AVFilter ff_af_aemphasis
Initial value:
= {
.name = "aemphasis",
.description = NULL_IF_CONFIG_SMALL("Audio emphasis."),
.priv_size = sizeof(AudioEmphasisContext),
.priv_class = &aemphasis_class,
}
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:179
static const AVFilterPad avfilter_af_aemphasis_inputs[]
Definition: af_aemphasis.c:342
static const AVFilterPad outputs[]
Definition: af_afftfilt.c:386
static int query_formats(AVFilterContext *ctx)
Definition: af_aemphasis.c:120
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:376
static const AVFilterPad avfilter_af_aemphasis_outputs[]
Definition: af_aemphasis.c:352
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_aemphasis.c:336

Definition at line 360 of file af_aemphasis.c.