FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
af_adynamicequalizer.c File Reference
#include <float.h>
#include "libavutil/ffmath.h"
#include "libavutil/opt.h"
#include "avfilter.h"
#include "audio.h"
#include "formats.h"
#include "adynamicequalizer_template.c"

Go to the source code of this file.

Data Structures

struct  ChannelContext
 
struct  AudioDynamicEqualizerContext
 
struct  ThreadData
 Used for passing data between threads. More...
 

Macros

#define DEPTH   32
 
#define DEPTH   64
 
#define OFFSET(x)   offsetof(AudioDynamicEqualizerContext, x)
 
#define AF   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
#define FLAGS   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
 

Enumerations

enum  DetectionModes {
  DET_UNSET = 0, DET_DISABLED, DET_OFF, DET_ON,
  DET_ADAPTIVE, NB_DMODES
}
 
enum  FilterModes {
  LISTEN = -1, CUT_BELOW, CUT_ABOVE, BOOST_BELOW,
  BOOST_ABOVE, NB_FMODES, BASIC, FINAL,
  NB_MODES, BASIC, FAST, NB_MODES
}
 

Functions

static int query_formats (AVFilterContext *ctx)
 
static double get_coef (double x, double sr)
 
static int config_input (AVFilterLink *inlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold void uninit (AVFilterContext *ctx)
 
 AVFILTER_DEFINE_CLASS (adynamicequalizer)
 

Variables

static const AVOption adynamicequalizer_options []
 
static const AVFilterPad inputs []
 
const AVFilter ff_af_adynamicequalizer
 

Macro Definition Documentation

◆ DEPTH [1/2]

#define DEPTH   32

Definition at line 143 of file af_adynamicequalizer.c.

◆ DEPTH [2/2]

#define DEPTH   64

Definition at line 143 of file af_adynamicequalizer.c.

◆ OFFSET

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

Definition at line 221 of file af_adynamicequalizer.c.

◆ AF

Definition at line 222 of file af_adynamicequalizer.c.

◆ FLAGS

Definition at line 223 of file af_adynamicequalizer.c.

Enumeration Type Documentation

◆ DetectionModes

Enumerator
DET_UNSET 
DET_DISABLED 
DET_OFF 
DET_ON 
DET_ADAPTIVE 
NB_DMODES 

Definition at line 27 of file af_adynamicequalizer.c.

◆ FilterModes

Enumerator
LISTEN 
CUT_BELOW 
CUT_ABOVE 
BOOST_BELOW 
BOOST_ABOVE 
NB_FMODES 
BASIC 
FINAL 
NB_MODES 
BASIC 
FAST 
NB_MODES 

Definition at line 36 of file af_adynamicequalizer.c.

Function Documentation

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 111 of file af_adynamicequalizer.c.

◆ get_coef()

static double get_coef ( double  x,
double  sr 
)
static

Definition at line 130 of file af_adynamicequalizer.c.

Referenced by filter_prepare().

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 146 of file af_adynamicequalizer.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 179 of file af_adynamicequalizer.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 209 of file af_adynamicequalizer.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( adynamicequalizer  )

Variable Documentation

◆ adynamicequalizer_options

const AVOption adynamicequalizer_options[]
static

Definition at line 225 of file af_adynamicequalizer.c.

◆ inputs

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

Definition at line 265 of file af_adynamicequalizer.c.

◆ ff_af_adynamicequalizer

const AVFilter ff_af_adynamicequalizer
Initial value:
= {
.name = "adynamicequalizer",
.description = NULL_IF_CONFIG_SMALL("Apply Dynamic Equalization of input audio."),
.priv_size = sizeof(AudioDynamicEqualizerContext),
.priv_class = &adynamicequalizer_class,
.process_command = ff_filter_process_command,
}

Definition at line 274 of file af_adynamicequalizer.c.

config_input
static int config_input(AVFilterLink *inlink)
Definition: af_adynamicequalizer.c:146
FILTER_QUERY_FUNC
#define FILTER_QUERY_FUNC(func)
Definition: internal.h:159
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_adynamicequalizer.c:179
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_adynamicequalizer.c:209
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:182
ff_audio_default_filterpad
const AVFilterPad ff_audio_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_AUDIO.
Definition: audio.c:33
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:106
AudioDynamicEqualizerContext
Definition: af_adynamicequalizer.c:76
ff_filter_process_command
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Generic processing of user supplied commands that are set in the same way as the filter options.
Definition: avfilter.c:890
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:183
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:155
inputs
static const AVFilterPad inputs[]
Definition: af_adynamicequalizer.c:265
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: af_adynamicequalizer.c:111