FFmpeg
Data Structures | Macros | Functions | Variables
af_asubboost.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/ffmath.h"
#include "libavutil/opt.h"
#include "avfilter.h"
#include "audio.h"
#include "formats.h"

Go to the source code of this file.

Data Structures

struct  ASubBoostContext
 
struct  ThreadData
 Used for passing data between threads. More...
 

Macros

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

Functions

static int get_coeffs (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 
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 int process_command (AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
 
 AVFILTER_DEFINE_CLASS (asubboost)
 

Variables

static const AVOption asubboost_options []
 
static const AVFilterPad inputs []
 
static const AVFilterPad outputs []
 
const AVFilter ff_af_asubboost
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 184 of file af_asubboost.c.

◆ FLAGS

Definition at line 185 of file af_asubboost.c.

Function Documentation

◆ get_coeffs()

static int get_coeffs ( AVFilterContext ctx)
static

Definition at line 47 of file af_asubboost.c.

Referenced by config_input(), and process_command().

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 72 of file af_asubboost.c.

◆ filter_channels()

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

Definition at line 90 of file af_asubboost.c.

Referenced by filter_frame().

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 136 of file af_asubboost.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 163 of file af_asubboost.c.

◆ process_command()

static int process_command ( AVFilterContext ctx,
const char *  cmd,
const char *  args,
char *  res,
int  res_len,
int  flags 
)
static

Definition at line 172 of file af_asubboost.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( asubboost  )

Variable Documentation

◆ asubboost_options

const AVOption asubboost_options[]
static
Initial value:
= {
{ "dry", "set dry gain", OFFSET(dry_gain), AV_OPT_TYPE_DOUBLE, {.dbl=0.7}, 0, 1, FLAGS },
{ "wet", "set wet gain", OFFSET(wet_gain), AV_OPT_TYPE_DOUBLE, {.dbl=0.7}, 0, 1, FLAGS },
{ "decay", "set decay", OFFSET(decay), AV_OPT_TYPE_DOUBLE, {.dbl=0.7}, 0, 1, FLAGS },
{ "feedback", "set feedback", OFFSET(feedback), AV_OPT_TYPE_DOUBLE, {.dbl=0.9}, 0, 1, FLAGS },
{ "cutoff", "set cutoff", OFFSET(cutoff), AV_OPT_TYPE_DOUBLE, {.dbl=100}, 50, 900, FLAGS },
{ "slope", "set slope", OFFSET(slope), AV_OPT_TYPE_DOUBLE, {.dbl=0.5}, 0.0001, 1, FLAGS },
{ "delay", "set delay", OFFSET(delay), AV_OPT_TYPE_DOUBLE, {.dbl=20}, 1, 100, FLAGS },
{ NULL }
}

Definition at line 187 of file af_asubboost.c.

◆ inputs

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

Definition at line 200 of file af_asubboost.c.

◆ outputs

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

Definition at line 209 of file af_asubboost.c.

◆ ff_af_asubboost

const AVFilter ff_af_asubboost
Initial value:
= {
.name = "asubboost",
.description = NULL_IF_CONFIG_SMALL("Boost subwoofer frequencies."),
.priv_size = sizeof(ASubBoostContext),
.priv_class = &asubboost_class,
.process_command = process_command,
}

Definition at line 216 of file af_asubboost.c.

inputs
static const AVFilterPad inputs[]
Definition: af_asubboost.c:200
FILTER_SINGLE_SAMPLEFMT
#define FILTER_SINGLE_SAMPLEFMT(sample_fmt_)
Definition: internal.h:184
process_command
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: af_asubboost.c:172
config_input
static int config_input(AVFilterLink *inlink)
Definition: af_asubboost.c:72
outputs
static const AVFilterPad outputs[]
Definition: af_asubboost.c:209
ASubBoostContext
Definition: af_asubboost.c:26
AV_OPT_TYPE_DOUBLE
@ AV_OPT_TYPE_DOUBLE
Definition: opt.h:226
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:191
NULL
#define NULL
Definition: coverity.c:32
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_asubboost.c:136
FLAGS
#define FLAGS
Definition: af_asubboost.c:185
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
OFFSET
#define OFFSET(x)
Definition: af_asubboost.c:184
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_asubboost.c:163
AV_SAMPLE_FMT_DBLP
@ AV_SAMPLE_FMT_DBLP
double, planar
Definition: samplefmt.h:70
AVFILTER_FLAG_SLICE_THREADS
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:121
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:192
AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will have its filter_frame() c...
Definition: avfilter.h:154