FFmpeg
af_adynamicequalizer.c
Go to the documentation of this file.
1 /*
2  * This file is part of FFmpeg.
3  *
4  * FFmpeg is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * FFmpeg is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with FFmpeg; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #include <float.h>
20 
21 #include "libavutil/ffmath.h"
22 #include "libavutil/mem.h"
23 #include "libavutil/opt.h"
24 #include "avfilter.h"
25 #include "audio.h"
26 #include "filters.h"
27 #include "formats.h"
28 
30  DET_UNSET = 0,
36 };
37 
39  LISTEN = -1,
45 };
46 
47 typedef struct ChannelContext {
48  double fa_double[3], fm_double[3];
49  double dstate_double[2];
50  double fstate_double[2];
51  double tstate_double[2];
53  double detect_double;
57  double sum_double;
58  float fa_float[3], fm_float[3];
59  float dstate_float[2];
60  float fstate_float[2];
61  float tstate_float[2];
63  float detect_float;
67  float sum_float;
68  void *dqueue;
69  void *queue;
70  int position;
71  int size;
72  int front;
73  int back;
74  int detection;
75  int init;
77 
79  const AVClass *class;
80 
81  double threshold;
82  double threshold_log;
83  double dfrequency;
84  double dqfactor;
85  double tfrequency;
86  double tqfactor;
87  double ratio;
88  double range;
89  double makeup;
90  double dattack;
91  double drelease;
92  double dattack_coef;
93  double drelease_coef;
94  double gattack_coef;
95  double grelease_coef;
96  int mode;
97  int detection;
98  int tftype;
99  int dftype;
101  int format;
103 
105  int (*filter_channels)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs);
106 
107  double da_double[3], dm_double[3];
108  float da_float[3], dm_float[3];
109 
112 
114  AVFilterFormatsConfig **cfg_in,
115  AVFilterFormatsConfig **cfg_out)
116 {
117  const AudioDynamicEqualizerContext *s = ctx->priv;
118  static const enum AVSampleFormat sample_fmts[3][3] = {
122  };
123  int ret;
124 
125  if ((ret = ff_set_common_formats_from_list2(ctx, cfg_in, cfg_out,
126  sample_fmts[s->precision])) < 0)
127  return ret;
128 
129  return 0;
130 }
131 
132 static double get_coef(double x, double sr)
133 {
134  return 1.0 - exp(-1.0 / (0.001 * x * sr));
135 }
136 
137 typedef struct ThreadData {
138  AVFrame *in, *out;
139 } ThreadData;
140 
141 #define DEPTH 32
143 
144 #undef DEPTH
145 #define DEPTH 64
147 
149 {
150  AVFilterContext *ctx = inlink->dst;
152 
153  s->format = inlink->format;
154  s->cc = av_calloc(inlink->ch_layout.nb_channels, sizeof(*s->cc));
155  if (!s->cc)
156  return AVERROR(ENOMEM);
157  s->nb_channels = inlink->ch_layout.nb_channels;
158 
159  switch (s->format) {
160  case AV_SAMPLE_FMT_DBLP:
161  s->filter_prepare = filter_prepare_double;
162  s->filter_channels = filter_channels_double;
163  break;
164  case AV_SAMPLE_FMT_FLTP:
165  s->filter_prepare = filter_prepare_float;
166  s->filter_channels = filter_channels_float;
167  break;
168  }
169 
170  for (int ch = 0; ch < s->nb_channels; ch++) {
171  ChannelContext *cc = &s->cc[ch];
172  cc->queue = av_calloc(inlink->sample_rate, sizeof(double));
173  cc->dqueue = av_calloc(inlink->sample_rate, sizeof(double));
174  if (!cc->queue || !cc->dqueue)
175  return AVERROR(ENOMEM);
176  }
177 
178  return 0;
179 }
180 
182 {
183  AVFilterContext *ctx = inlink->dst;
184  AVFilterLink *outlink = ctx->outputs[0];
186  ThreadData td;
187  AVFrame *out;
188 
189  if (av_frame_is_writable(in)) {
190  out = in;
191  } else {
192  out = ff_get_audio_buffer(outlink, in->nb_samples);
193  if (!out) {
194  av_frame_free(&in);
195  return AVERROR(ENOMEM);
196  }
198  }
199 
200  td.in = in;
201  td.out = out;
202  s->filter_prepare(ctx);
203  ff_filter_execute(ctx, s->filter_channels, &td, NULL,
205 
206  if (out != in)
207  av_frame_free(&in);
208  return ff_filter_frame(outlink, out);
209 }
210 
212 {
214 
215  for (int ch = 0; ch < s->nb_channels; ch++) {
216  ChannelContext *cc = &s->cc[ch];
217  av_freep(&cc->queue);
218  av_freep(&cc->dqueue);
219  }
220  av_freep(&s->cc);
221 }
222 
223 #define OFFSET(x) offsetof(AudioDynamicEqualizerContext, x)
224 #define AF AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
225 #define FLAGS AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
226 
228  { "threshold", "set detection threshold", OFFSET(threshold), AV_OPT_TYPE_DOUBLE, {.dbl=0}, 0, 100, FLAGS },
229  { "dfrequency", "set detection frequency", OFFSET(dfrequency), AV_OPT_TYPE_DOUBLE, {.dbl=1000}, 2, 1000000, FLAGS },
230  { "dqfactor", "set detection Q factor", OFFSET(dqfactor), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0.001, 1000, FLAGS },
231  { "tfrequency", "set target frequency", OFFSET(tfrequency), AV_OPT_TYPE_DOUBLE, {.dbl=1000}, 2, 1000000, FLAGS },
232  { "tqfactor", "set target Q factor", OFFSET(tqfactor), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0.001, 1000, FLAGS },
233  { "attack", "set detection attack duration", OFFSET(dattack), AV_OPT_TYPE_DOUBLE, {.dbl=20}, 0.01, 2000, FLAGS },
234  { "release","set detection release duration",OFFSET(drelease), AV_OPT_TYPE_DOUBLE, {.dbl=200}, 0.01, 2000, FLAGS },
235  { "ratio", "set ratio factor", OFFSET(ratio), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 30, FLAGS },
236  { "makeup", "set makeup gain", OFFSET(makeup), AV_OPT_TYPE_DOUBLE, {.dbl=0}, 0, 1000, FLAGS },
237  { "range", "set max gain", OFFSET(range), AV_OPT_TYPE_DOUBLE, {.dbl=50}, 1, 2000, FLAGS },
238  { "mode", "set mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64=0}, LISTEN,NB_FMODES-1,FLAGS, .unit = "mode" },
239  { "listen", 0, 0, AV_OPT_TYPE_CONST, {.i64=LISTEN}, 0, 0, FLAGS, .unit = "mode" },
240  { "cutbelow", 0, 0, AV_OPT_TYPE_CONST, {.i64=CUT_BELOW},0, 0, FLAGS, .unit = "mode" },
241  { "cutabove", 0, 0, AV_OPT_TYPE_CONST, {.i64=CUT_ABOVE},0, 0, FLAGS, .unit = "mode" },
242  { "boostbelow", 0, 0, AV_OPT_TYPE_CONST, {.i64=BOOST_BELOW},0, 0, FLAGS, .unit = "mode" },
243  { "boostabove", 0, 0, AV_OPT_TYPE_CONST, {.i64=BOOST_ABOVE},0, 0, FLAGS, .unit = "mode" },
244  { "dftype", "set detection filter type",OFFSET(dftype), AV_OPT_TYPE_INT, {.i64=0}, 0, 3, FLAGS, .unit = "dftype" },
245  { "bandpass", 0, 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, .unit = "dftype" },
246  { "lowpass", 0, 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, .unit = "dftype" },
247  { "highpass", 0, 0, AV_OPT_TYPE_CONST, {.i64=2}, 0, 0, FLAGS, .unit = "dftype" },
248  { "peak", 0, 0, AV_OPT_TYPE_CONST, {.i64=3}, 0, 0, FLAGS, .unit = "dftype" },
249  { "tftype", "set target filter type", OFFSET(tftype), AV_OPT_TYPE_INT, {.i64=0}, 0, 2, FLAGS, .unit = "tftype" },
250  { "bell", 0, 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, .unit = "tftype" },
251  { "lowshelf", 0, 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, .unit = "tftype" },
252  { "highshelf",0, 0, AV_OPT_TYPE_CONST, {.i64=2}, 0, 0, FLAGS, .unit = "tftype" },
253  { "auto", "set auto threshold", OFFSET(detection), AV_OPT_TYPE_INT, {.i64=DET_OFF},DET_DISABLED,NB_DMODES-1,FLAGS, .unit = "auto" },
254  { "disabled", 0, 0, AV_OPT_TYPE_CONST, {.i64=DET_DISABLED}, 0, 0, FLAGS, .unit = "auto" },
255  { "off", 0, 0, AV_OPT_TYPE_CONST, {.i64=DET_OFF}, 0, 0, FLAGS, .unit = "auto" },
256  { "on", 0, 0, AV_OPT_TYPE_CONST, {.i64=DET_ON}, 0, 0, FLAGS, .unit = "auto" },
257  { "adaptive", 0, 0, AV_OPT_TYPE_CONST, {.i64=DET_ADAPTIVE}, 0, 0, FLAGS, .unit = "auto" },
258  { "precision", "set processing precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=0}, 0, 2, AF, .unit = "precision" },
259  { "auto", "set auto processing precision", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, AF, .unit = "precision" },
260  { "float", "set single-floating point processing precision", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, .unit = "precision" },
261  { "double","set double-floating point processing precision", 0, AV_OPT_TYPE_CONST, {.i64=2}, 0, 0, AF, .unit = "precision" },
262  { NULL }
263 };
264 
265 AVFILTER_DEFINE_CLASS(adynamicequalizer);
266 
267 static const AVFilterPad inputs[] = {
268  {
269  .name = "default",
270  .type = AVMEDIA_TYPE_AUDIO,
271  .filter_frame = filter_frame,
272  .config_props = config_input,
273  },
274 };
275 
277  .name = "adynamicequalizer",
278  .description = NULL_IF_CONFIG_SMALL("Apply Dynamic Equalization of input audio."),
279  .priv_size = sizeof(AudioDynamicEqualizerContext),
280  .priv_class = &adynamicequalizer_class,
281  .uninit = uninit,
287  .process_command = ff_filter_process_command,
288 };
ChannelContext::front
int front
Definition: af_adynamicequalizer.c:72
ff_get_audio_buffer
AVFrame * ff_get_audio_buffer(AVFilterLink *link, int nb_samples)
Request an audio samples buffer with a specific set of permissions.
Definition: audio.c:98
AV_SAMPLE_FMT_FLTP
@ AV_SAMPLE_FMT_FLTP
float, planar
Definition: samplefmt.h:66
AudioDynamicEqualizerContext::precision
int precision
Definition: af_adynamicequalizer.c:100
CUT_BELOW
@ CUT_BELOW
Definition: af_adynamicequalizer.c:40
ChannelContext::dqueue
void * dqueue
Definition: af_adynamicequalizer.c:68
AudioDynamicEqualizerContext::dfrequency
double dfrequency
Definition: af_adynamicequalizer.c:83
ChannelContext::fm_float
float fm_float[3]
Definition: af_adynamicequalizer.c:58
AVERROR
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
opt.h
AudioDynamicEqualizerContext::dftype
int dftype
Definition: af_adynamicequalizer.c:99
AudioDynamicEqualizerContext::range
double range
Definition: af_adynamicequalizer.c:88
out
FILE * out
Definition: movenc.c:55
ChannelContext::sum_double
double sum_double
Definition: af_adynamicequalizer.c:57
ff_filter_frame
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Definition: avfilter.c:1061
AudioDynamicEqualizerContext::drelease
double drelease
Definition: af_adynamicequalizer.c:91
sample_fmts
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:948
query_formats
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
Definition: af_adynamicequalizer.c:113
inlink
The exact code depends on how similar the blocks are and how related they are to the and needs to apply these operations to the correct inlink or outlink if there are several Macros are available to factor that when no extra processing is inlink
Definition: filter_design.txt:212
ff_af_adynamicequalizer
const AVFilter ff_af_adynamicequalizer
Definition: af_adynamicequalizer.c:276
av_frame_free
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition: frame.c:163
AudioDynamicEqualizerContext::makeup
double makeup
Definition: af_adynamicequalizer.c:89
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: filters.h:262
mode
Definition: swscale.c:52
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:403
config_input
static int config_input(AVFilterLink *inlink)
Definition: af_adynamicequalizer.c:148
ChannelContext::queue
void * queue
Definition: af_adynamicequalizer.c:69
DET_ADAPTIVE
@ DET_ADAPTIVE
Definition: af_adynamicequalizer.c:34
AVOption
AVOption.
Definition: opt.h:429
ChannelContext::fstate_float
float fstate_float[2]
Definition: af_adynamicequalizer.c:60
AudioDynamicEqualizerContext::drelease_coef
double drelease_coef
Definition: af_adynamicequalizer.c:93
FLAGS
#define FLAGS
Definition: af_adynamicequalizer.c:225
DET_ON
@ DET_ON
Definition: af_adynamicequalizer.c:33
ChannelContext::threshold_log_double
double threshold_log_double
Definition: af_adynamicequalizer.c:54
float.h
AVFilter::name
const char * name
Filter name.
Definition: avfilter.h:205
AudioDynamicEqualizerContext::mode
int mode
Definition: af_adynamicequalizer.c:96
ChannelContext::detection
int detection
Definition: af_adynamicequalizer.c:74
ThreadData::out
AVFrame * out
Definition: af_adeclick.c:526
AVChannelLayout::nb_channels
int nb_channels
Number of channels in this layout.
Definition: channel_layout.h:328
ThreadData::in
AVFrame * in
Definition: af_adecorrelate.c:155
get_coef
static double get_coef(double x, double sr)
Definition: af_adynamicequalizer.c:132
ChannelContext::detect_double
double detect_double
Definition: af_adynamicequalizer.c:53
ChannelContext::log_sum_double
double log_sum_double
Definition: af_adynamicequalizer.c:56
formats.h
AudioDynamicEqualizerContext::detection
int detection
Definition: af_adynamicequalizer.c:97
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_adynamicequalizer.c:181
AudioDynamicEqualizerContext::cc
ChannelContext * cc
Definition: af_adynamicequalizer.c:110
ChannelContext::init
int init
Definition: af_adynamicequalizer.c:75
ChannelContext::tstate_double
double tstate_double[2]
Definition: af_adynamicequalizer.c:51
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_adynamicequalizer.c:211
AVFilterPad
A filter pad used for either input or output.
Definition: filters.h:38
av_cold
#define av_cold
Definition: attributes.h:90
adynamicequalizer_options
static const AVOption adynamicequalizer_options[]
Definition: af_adynamicequalizer.c:227
FilterModes
FilterModes
Definition: af_adynamicequalizer.c:38
s
#define s(width, name)
Definition: cbs_vp9.c:198
AV_OPT_TYPE_DOUBLE
@ AV_OPT_TYPE_DOUBLE
Underlying C type is double.
Definition: opt.h:267
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
ChannelContext::threshold_log_float
float threshold_log_float
Definition: af_adynamicequalizer.c:64
filters.h
ctx
AVFormatContext * ctx
Definition: movenc.c:49
BOOST_ABOVE
@ BOOST_ABOVE
Definition: af_adynamicequalizer.c:43
AudioDynamicEqualizerContext::da_double
double da_double[3]
Definition: af_adynamicequalizer.c:107
AudioDynamicEqualizerContext::filter_channels
int(* filter_channels)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
Definition: af_adynamicequalizer.c:105
AudioDynamicEqualizerContext::grelease_coef
double grelease_coef
Definition: af_adynamicequalizer.c:95
AudioDynamicEqualizerContext::dattack
double dattack
Definition: af_adynamicequalizer.c:90
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: filters.h:263
arg
const char * arg
Definition: jacosubdec.c:67
ChannelContext::dstate_double
double dstate_double[2]
Definition: af_adynamicequalizer.c:49
AudioDynamicEqualizerContext::tqfactor
double tqfactor
Definition: af_adynamicequalizer.c:86
DetectionModes
DetectionModes
Definition: af_adynamicequalizer.c:29
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:75
NULL
#define NULL
Definition: coverity.c:32
ChannelContext::lin_gain_float
float lin_gain_float
Definition: af_adynamicequalizer.c:62
NB_FMODES
@ NB_FMODES
Definition: af_adynamicequalizer.c:44
av_frame_copy_props
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
Definition: frame.c:726
AudioDynamicEqualizerContext::da_float
float da_float[3]
Definition: af_adynamicequalizer.c:108
AVFILTER_DEFINE_CLASS
AVFILTER_DEFINE_CLASS(adynamicequalizer)
DET_OFF
@ DET_OFF
Definition: af_adynamicequalizer.c:32
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
AudioDynamicEqualizerContext::dm_double
double dm_double[3]
Definition: af_adynamicequalizer.c:107
LISTEN
@ LISTEN
Definition: af_adynamicequalizer.c:39
exp
int8_t exp
Definition: eval.c:73
ChannelContext::fstate_double
double fstate_double[2]
Definition: af_adynamicequalizer.c:50
ChannelContext::log_sum_float
float log_sum_float
Definition: af_adynamicequalizer.c:66
AudioDynamicEqualizerContext::filter_prepare
int(* filter_prepare)(AVFilterContext *ctx)
Definition: af_adynamicequalizer.c:104
AVFilterFormatsConfig
Lists of formats / etc.
Definition: avfilter.h:111
ChannelContext::new_threshold_log_double
double new_threshold_log_double
Definition: af_adynamicequalizer.c:55
AudioDynamicEqualizerContext::tftype
int tftype
Definition: af_adynamicequalizer.c:98
DET_UNSET
@ DET_UNSET
Definition: af_adynamicequalizer.c:30
adynamicequalizer_template.c
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
OFFSET
#define OFFSET(x)
Definition: af_adynamicequalizer.c:223
AV_SAMPLE_FMT_NONE
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:56
AudioDynamicEqualizerContext::format
int format
Definition: af_adynamicequalizer.c:101
BOOST_BELOW
@ BOOST_BELOW
Definition: af_adynamicequalizer.c:42
av_frame_is_writable
int av_frame_is_writable(AVFrame *frame)
Check if the frame data is writable.
Definition: frame.c:662
AudioDynamicEqualizerContext
Definition: af_adynamicequalizer.c:78
range
enum AVColorRange range
Definition: mediacodec_wrapper.c:2594
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
AudioDynamicEqualizerContext::dattack_coef
double dattack_coef
Definition: af_adynamicequalizer.c:92
ChannelContext::detect_float
float detect_float
Definition: af_adynamicequalizer.c:63
AudioDynamicEqualizerContext::dm_float
float dm_float[3]
Definition: af_adynamicequalizer.c:108
ChannelContext::fa_float
float fa_float[3]
Definition: af_adynamicequalizer.c:58
ChannelContext::new_threshold_log_float
float new_threshold_log_float
Definition: af_adynamicequalizer.c:65
AudioDynamicEqualizerContext::threshold_log
double threshold_log
Definition: af_adynamicequalizer.c:82
AVFrame::nb_samples
int nb_samples
number of audio samples (per channel) described by this frame
Definition: frame.h:483
ff_filter_get_nb_threads
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
Definition: avfilter.c:840
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:55
ThreadData
Used for passing data between threads.
Definition: dsddec.c:71
FILTER_QUERY_FUNC2
#define FILTER_QUERY_FUNC2(func)
Definition: filters.h:239
FFMIN
#define FFMIN(a, b)
Definition: macros.h:49
ChannelContext::position
int position
Definition: af_adynamicequalizer.c:70
AVFilterPad::name
const char * name
Pad name.
Definition: filters.h:44
AudioDynamicEqualizerContext::ratio
double ratio
Definition: af_adynamicequalizer.c:87
av_calloc
void * av_calloc(size_t nmemb, size_t size)
Definition: mem.c:264
AudioDynamicEqualizerContext::gattack_coef
double gattack_coef
Definition: af_adynamicequalizer.c:94
AVFilter
Filter definition.
Definition: avfilter.h:201
NB_DMODES
@ NB_DMODES
Definition: af_adynamicequalizer.c:35
ret
ret
Definition: filter_design.txt:187
AF
#define AF
Definition: af_adynamicequalizer.c:224
ChannelContext::tstate_float
float tstate_float[2]
Definition: af_adynamicequalizer.c:61
AudioDynamicEqualizerContext::tfrequency
double tfrequency
Definition: af_adynamicequalizer.c:85
ff_set_common_formats_from_list2
int ff_set_common_formats_from_list2(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out, const int *fmts)
Definition: formats.c:1016
ff_filter_execute
int ff_filter_execute(AVFilterContext *ctx, avfilter_action_func *func, void *arg, int *ret, int nb_jobs)
Definition: avfilter.c:1666
DET_DISABLED
@ DET_DISABLED
Definition: af_adynamicequalizer.c:31
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition: opt.h:259
avfilter.h
AV_SAMPLE_FMT_DBLP
@ AV_SAMPLE_FMT_DBLP
double, planar
Definition: samplefmt.h:67
AudioDynamicEqualizerContext::dqfactor
double dqfactor
Definition: af_adynamicequalizer.c:84
ffmath.h
ChannelContext
Definition: hcadec.c:35
ChannelContext::size
int size
Definition: af_adynamicequalizer.c:71
AVFilterContext
An instance of a filter.
Definition: avfilter.h:457
ChannelContext::fa_double
double fa_double[3]
Definition: af_adynamicequalizer.c:48
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
mem.h
audio.h
ChannelContext::sum_float
float sum_float
Definition: af_adynamicequalizer.c:67
AudioDynamicEqualizerContext::threshold
double threshold
Definition: af_adynamicequalizer.c:81
AudioDynamicEqualizerContext::nb_channels
int nb_channels
Definition: af_adynamicequalizer.c:102
CUT_ABOVE
@ CUT_ABOVE
Definition: af_adynamicequalizer.c:41
av_freep
#define av_freep(p)
Definition: tableprint_vlc.h:34
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
ChannelContext::back
int back
Definition: af_adynamicequalizer.c:73
inputs
static const AVFilterPad inputs[]
Definition: af_adynamicequalizer.c:267
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition: opt.h:299
ChannelContext::dstate_float
float dstate_float[2]
Definition: af_adynamicequalizer.c:59
ChannelContext::lin_gain_double
double lin_gain_double
Definition: af_adynamicequalizer.c:52
ChannelContext::fm_double
double fm_double[3]
Definition: af_adynamicequalizer.c:48