FFmpeg
Data Structures | Macros | Functions | Variables
af_aexciter.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  ChannelParams
 sample data coding information More...
 
struct  AExciterContext
 

Macros

#define OFFSET(x)   offsetof(AExciterContext, x)
 
#define A   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS (aexciter)
 
static double M (double x)
 
static double D (double x)
 
static void set_params (ChannelParams *p, double blend, double drive, double srate, double freq, double ceil)
 
static double bprocess (double in, const double *const c, double *w1, double *w2)
 
static double distortion_process (AExciterContext *s, ChannelParams *p, double in)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static int query_formats (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 
static int process_command (AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
 

Variables

static const AVOption aexciter_options []
 
static const AVFilterPad avfilter_af_aexciter_inputs []
 
static const AVFilterPad avfilter_af_aexciter_outputs []
 
AVFilter ff_af_aexciter
 

Macro Definition Documentation

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

Definition at line 51 of file af_aexciter.c.

Definition at line 52 of file af_aexciter.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( aexciter  )
static double M ( double  x)
inlinestatic

Definition at line 68 of file af_aexciter.c.

Referenced by distortion_process().

static double D ( double  x)
inlinestatic

Definition at line 73 of file af_aexciter.c.

Referenced by distortion_process(), and set_params().

static void set_params ( ChannelParams p,
double  blend,
double  drive,
double  srate,
double  freq,
double  ceil 
)
static

Definition at line 80 of file af_aexciter.c.

Referenced by config_input().

static double bprocess ( double  in,
const double *const  c,
double *  w1,
double *  w2 
)
static

Definition at line 133 of file af_aexciter.c.

Referenced by distortion_process().

static double distortion_process ( AExciterContext s,
ChannelParams p,
double  in 
)
static

Definition at line 144 of file af_aexciter.c.

Referenced by filter_frame().

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 172 of file af_aexciter.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 221 of file af_aexciter.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 251 of file af_aexciter.c.

static int config_input ( AVFilterLink inlink)
static

Definition at line 258 of file af_aexciter.c.

Referenced by 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 275 of file af_aexciter.c.

Variable Documentation

const AVOption aexciter_options[]
static
Initial value:
= {
{ "level_in", "set level in", OFFSET(level_in), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 64, A },
{ "level_out", "set level out", OFFSET(level_out), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 64, A },
{ "amount", "set amount", OFFSET(amount), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 64, A },
{ "drive", "set harmonics", OFFSET(drive), AV_OPT_TYPE_DOUBLE, {.dbl=8.5}, 0.1, 10, A },
{ "blend", "set blend harmonics", OFFSET(blend), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -10, 10, A },
{ "freq", "set scope", OFFSET(freq), AV_OPT_TYPE_DOUBLE, {.dbl=7500}, 2000, 12000, A },
{ "ceil", "set ceiling", OFFSET(ceil), AV_OPT_TYPE_DOUBLE, {.dbl=9999}, 9999, 20000, A },
{ "listen", "enable listen mode", OFFSET(listen), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, A },
{ NULL }
}
#define NULL
Definition: coverity.c:32
static __device__ float ceil(float a)
Definition: cuda_runtime.h:176
#define OFFSET(x)
Definition: af_aexciter.c:51
#define A
Definition: af_aexciter.c:52

Definition at line 54 of file af_aexciter.c.

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

Definition at line 288 of file af_aexciter.c.

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

Definition at line 298 of file af_aexciter.c.

AVFilter ff_af_aexciter
Initial value:
= {
.name = "aexciter",
.description = NULL_IF_CONFIG_SMALL("Enhance high frequency part of audio."),
.priv_size = sizeof(AExciterContext),
.priv_class = &aexciter_class,
}
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_aexciter.c:251
static const AVFilterPad avfilter_af_aexciter_inputs[]
Definition: af_aexciter.c:288
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: af_aexciter.c:275
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:117
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
static int query_formats(AVFilterContext *ctx)
Definition: af_aexciter.c:221
static const AVFilterPad avfilter_af_aexciter_outputs[]
Definition: af_aexciter.c:298
#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:134
#define flags(name, subs,...)
Definition: cbs_av1.c:561

Definition at line 306 of file af_aexciter.c.