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 213 of file af_asubboost.c.

◆ FLAGS

Definition at line 214 of file af_asubboost.c.

Function Documentation

◆ get_coeffs()

static int get_coeffs ( AVFilterContext ctx)
static

Definition at line 51 of file af_asubboost.c.

Referenced by config_input(), and process_command().

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 76 of file af_asubboost.c.

◆ filter_channels()

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

Definition at line 94 of file af_asubboost.c.

Referenced by filter_frame().

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 155 of file af_asubboost.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 191 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 201 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=1.0}, 0, 1, FLAGS },
{ "wet", "set wet gain", OFFSET(wet_gain), AV_OPT_TYPE_DOUBLE, {.dbl=1.0}, 0, 1, FLAGS },
{ "boost", "set max boost",OFFSET(max_boost),AV_OPT_TYPE_DOUBLE, {.dbl=2.0}, 1, 12, FLAGS },
{ "decay", "set decay", OFFSET(decay), AV_OPT_TYPE_DOUBLE, {.dbl=0.0}, 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 },
{ "channels", "set channels to filter", OFFSET(ch_layout_str), AV_OPT_TYPE_STRING, {.str="all"}, 0, 0, FLAGS },
{ NULL }
}

Definition at line 216 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 231 of file af_asubboost.c.

◆ outputs

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

Definition at line 240 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 247 of file af_asubboost.c.

inputs
static const AVFilterPad inputs[]
Definition: af_asubboost.c:231
FILTER_SINGLE_SAMPLEFMT
#define FILTER_SINGLE_SAMPLEFMT(sample_fmt_)
Definition: internal.h:187
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:201
config_input
static int config_input(AVFilterLink *inlink)
Definition: af_asubboost.c:76
outputs
static const AVFilterPad outputs[]
Definition: af_asubboost.c:240
ASubBoostContext
Definition: af_asubboost.c:26
AV_OPT_TYPE_DOUBLE
@ AV_OPT_TYPE_DOUBLE
Definition: opt.h:227
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:194
NULL
#define NULL
Definition: coverity.c:32
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_asubboost.c:155
FLAGS
#define FLAGS
Definition: af_asubboost.c:214
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:115
OFFSET
#define OFFSET(x)
Definition: af_asubboost.c:213
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_asubboost.c:191
AV_SAMPLE_FMT_DBLP
@ AV_SAMPLE_FMT_DBLP
double, planar
Definition: samplefmt.h:67
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:117
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:195
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:150
AV_OPT_TYPE_STRING
@ AV_OPT_TYPE_STRING
Definition: opt.h:229