FFmpeg
Data Structures | Macros | Functions | Variables
af_asupercut.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  BiquadCoeffs
 
struct  ASuperCutContext
 
struct  ThreadData
 Used for passing data between threads. More...
 

Macros

#define FILTER(name, type)
 
#define OFFSET(x)   offsetof(ASuperCutContext, x)
 
#define FLAGS   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
 
#define asuperpass_options   asuperpass_asuperstop_options
 
#define asuperstop_options   asuperpass_asuperstop_options
 

Functions

static int query_formats (AVFilterContext *ctx)
 
static void calc_q_factors (int n, double *q)
 
static int get_coeffs (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static int process_command (AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
 
static av_cold void uninit (AVFilterContext *ctx)
 
 AVFILTER_DEFINE_CLASS (asupercut)
 
 AVFILTER_DEFINE_CLASS (asubcut)
 
 AVFILTER_DEFINE_CLASS (asuperpass)
 
 AVFILTER_DEFINE_CLASS (asuperstop)
 

Variables

static const AVOption asupercut_options []
 
static const AVFilterPad inputs []
 
static const AVFilterPad outputs []
 
AVFilter ff_af_asupercut
 
static const AVOption asubcut_options []
 
AVFilter ff_af_asubcut
 
static const AVOption asuperpass_asuperstop_options []
 
AVFilter ff_af_asuperpass
 
AVFilter ff_af_asuperstop
 

Macro Definition Documentation

#define FILTER (   name,
  type 
)

Definition at line 231 of file af_asupercut.c.

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

Definition at line 341 of file af_asupercut.c.

Definition at line 342 of file af_asupercut.c.

#define asuperpass_options   asuperpass_asuperstop_options

Definition at line 416 of file af_asupercut.c.

#define asuperstop_options   asuperpass_asuperstop_options

Definition at line 433 of file af_asupercut.c.

Function Documentation

static int query_formats ( AVFilterContext ctx)
static

Definition at line 52 of file af_asupercut.c.

static void calc_q_factors ( int  n,
double *  q 
)
static

Definition at line 82 of file af_asupercut.c.

Referenced by get_coeffs().

static int get_coeffs ( AVFilterContext ctx)
static

Definition at line 88 of file af_asupercut.c.

Referenced by config_input(), and process_command().

static int config_input ( AVFilterLink inlink)
static

Definition at line 274 of file af_asupercut.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 291 of file af_asupercut.c.

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

Definition at line 322 of file af_asupercut.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 334 of file af_asupercut.c.

AVFILTER_DEFINE_CLASS ( asupercut  )
AVFILTER_DEFINE_CLASS ( asubcut  )
AVFILTER_DEFINE_CLASS ( asuperpass  )
AVFILTER_DEFINE_CLASS ( asuperstop  )

Variable Documentation

const AVOption asupercut_options[]
static
Initial value:
= {
{ "cutoff", "set cutoff frequency", OFFSET(cutoff), AV_OPT_TYPE_DOUBLE, {.dbl=20000}, 20000, 192000, FLAGS },
{ "order", "set filter order", OFFSET(order), AV_OPT_TYPE_INT, {.i64=10}, 3, 20, FLAGS },
{ "level", "set input level", OFFSET(level), AV_OPT_TYPE_DOUBLE, {.dbl=1.}, 0., 1., FLAGS },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: af_asupercut.c:341
uint8_t level
Definition: svq3.c:206
#define FLAGS
Definition: af_asupercut.c:342

Definition at line 344 of file af_asupercut.c.

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

Definition at line 353 of file af_asupercut.c.

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

Definition at line 363 of file af_asupercut.c.

AVFilter ff_af_asupercut
Initial value:
= {
.name = "asupercut",
.description = NULL_IF_CONFIG_SMALL("Cut super frequencies."),
.query_formats = query_formats,
.priv_size = sizeof(ASuperCutContext),
.priv_class = &asupercut_class,
}
static int query_formats(AVFilterContext *ctx)
Definition: af_asupercut.c:52
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
Definition: avfilter.h:126
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:115
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:117
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_asupercut.c:334
static const AVFilterPad inputs[]
Definition: af_asupercut.c:353
#define flags(name, subs,...)
Definition: cbs_av1.c:561
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: af_asupercut.c:322
static const AVFilterPad outputs[]
Definition: af_asupercut.c:363

Definition at line 371 of file af_asupercut.c.

const AVOption asubcut_options[]
static
Initial value:
= {
{ "cutoff", "set cutoff frequency", OFFSET(cutoff), AV_OPT_TYPE_DOUBLE, {.dbl=20}, 2, 200, FLAGS },
{ "order", "set filter order", OFFSET(order), AV_OPT_TYPE_INT, {.i64=10}, 3, 20, FLAGS },
{ "level", "set input level", OFFSET(level), AV_OPT_TYPE_DOUBLE, {.dbl=1.}, 0., 1., FLAGS },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: af_asupercut.c:341
uint8_t level
Definition: svq3.c:206
#define FLAGS
Definition: af_asupercut.c:342

Definition at line 385 of file af_asupercut.c.

AVFilter ff_af_asubcut
Initial value:
= {
.name = "asubcut",
.description = NULL_IF_CONFIG_SMALL("Cut subwoofer frequencies."),
.query_formats = query_formats,
.priv_size = sizeof(ASuperCutContext),
.priv_class = &asubcut_class,
}
static int query_formats(AVFilterContext *ctx)
Definition: af_asupercut.c:52
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
Definition: avfilter.h:126
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:115
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:117
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_asupercut.c:334
static const AVFilterPad inputs[]
Definition: af_asupercut.c:353
#define flags(name, subs,...)
Definition: cbs_av1.c:561
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: af_asupercut.c:322
static const AVFilterPad outputs[]
Definition: af_asupercut.c:363

Definition at line 394 of file af_asupercut.c.

const AVOption asuperpass_asuperstop_options[]
static
Initial value:
= {
{ "centerf","set center frequency", OFFSET(cutoff), AV_OPT_TYPE_DOUBLE, {.dbl=1000}, 2, 999999, FLAGS },
{ "order", "set filter order", OFFSET(order), AV_OPT_TYPE_INT, {.i64=4}, 4, 20, FLAGS },
{ "qfactor","set Q-factor", OFFSET(qfactor),AV_OPT_TYPE_DOUBLE, {.dbl=1.},0.01, 100., FLAGS },
{ "level", "set input level", OFFSET(level), AV_OPT_TYPE_DOUBLE, {.dbl=1.}, 0., 2., FLAGS },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: af_asupercut.c:341
uint8_t level
Definition: svq3.c:206
#define FLAGS
Definition: af_asupercut.c:342

Definition at line 408 of file af_asupercut.c.

AVFilter ff_af_asuperpass
Initial value:
= {
.name = "asuperpass",
.description = NULL_IF_CONFIG_SMALL("Apply high order Butterworth band-pass filter."),
.query_formats = query_formats,
.priv_size = sizeof(ASuperCutContext),
.priv_class = &asuperpass_class,
}
static int query_formats(AVFilterContext *ctx)
Definition: af_asupercut.c:52
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
Definition: avfilter.h:126
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:115
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:117
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_asupercut.c:334
static const AVFilterPad inputs[]
Definition: af_asupercut.c:353
#define flags(name, subs,...)
Definition: cbs_av1.c:561
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: af_asupercut.c:322
static const AVFilterPad outputs[]
Definition: af_asupercut.c:363

Definition at line 419 of file af_asupercut.c.

AVFilter ff_af_asuperstop
Initial value:
= {
.name = "asuperstop",
.description = NULL_IF_CONFIG_SMALL("Apply high order Butterworth band-stop filter."),
.query_formats = query_formats,
.priv_size = sizeof(ASuperCutContext),
.priv_class = &asuperstop_class,
}
static int query_formats(AVFilterContext *ctx)
Definition: af_asupercut.c:52
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
Definition: avfilter.h:126
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:115
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:117
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_asupercut.c:334
static const AVFilterPad inputs[]
Definition: af_asupercut.c:353
#define flags(name, subs,...)
Definition: cbs_av1.c:561
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: af_asupercut.c:322
static const AVFilterPad outputs[]
Definition: af_asupercut.c:363

Definition at line 436 of file af_asupercut.c.