FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
af_adynamicequalizer.c File Reference
#include <float.h>
#include "libavutil/ffmath.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "avfilter.h"
#include "audio.h"
#include "filters.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 (const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
 
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 145 of file af_adynamicequalizer.c.

◆ DEPTH [2/2]

#define DEPTH   64

Definition at line 145 of file af_adynamicequalizer.c.

◆ OFFSET

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

Definition at line 223 of file af_adynamicequalizer.c.

◆ AF

Definition at line 224 of file af_adynamicequalizer.c.

◆ FLAGS

Definition at line 225 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 29 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 38 of file af_adynamicequalizer.c.

Function Documentation

◆ query_formats()

static int query_formats ( const AVFilterContext ctx,
AVFilterFormatsConfig **  cfg_in,
AVFilterFormatsConfig **  cfg_out 
)
static

Definition at line 113 of file af_adynamicequalizer.c.

◆ get_coef()

static double get_coef ( double  x,
double  sr 
)
static

Definition at line 132 of file af_adynamicequalizer.c.

Referenced by filter_prepare().

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 148 of file af_adynamicequalizer.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 181 of file af_adynamicequalizer.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 211 of file af_adynamicequalizer.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( adynamicequalizer  )

Variable Documentation

◆ adynamicequalizer_options

const AVOption adynamicequalizer_options[]
static

Definition at line 227 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 267 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 276 of file af_adynamicequalizer.c.

query_formats
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
Definition: af_adynamicequalizer.c:113
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: filters.h:262
config_input
static int config_input(AVFilterLink *inlink)
Definition: af_adynamicequalizer.c:148
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_adynamicequalizer.c:181
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_adynamicequalizer.c:211
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: filters.h:263
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:34
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:94
AudioDynamicEqualizerContext
Definition: af_adynamicequalizer.c:78
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:900
FILTER_QUERY_FUNC2
#define FILTER_QUERY_FUNC2(func)
Definition: filters.h:239
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:152
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:190
inputs
static const AVFilterPad inputs[]
Definition: af_adynamicequalizer.c:267