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 "formats.h"
27 
29  DET_UNSET = 0,
35 };
36 
38  LISTEN = -1,
44 };
45 
46 typedef struct ChannelContext {
47  double fa_double[3], fm_double[3];
48  double dstate_double[2];
49  double fstate_double[2];
50  double tstate_double[2];
52  double detect_double;
56  double sum_double;
57  float fa_float[3], fm_float[3];
58  float dstate_float[2];
59  float fstate_float[2];
60  float tstate_float[2];
62  float detect_float;
66  float sum_float;
67  void *dqueue;
68  void *queue;
69  int position;
70  int size;
71  int front;
72  int back;
73  int detection;
74  int init;
76 
78  const AVClass *class;
79 
80  double threshold;
81  double threshold_log;
82  double dfrequency;
83  double dqfactor;
84  double tfrequency;
85  double tqfactor;
86  double ratio;
87  double range;
88  double makeup;
89  double dattack;
90  double drelease;
91  double dattack_coef;
92  double drelease_coef;
93  double gattack_coef;
94  double grelease_coef;
95  int mode;
96  int detection;
97  int tftype;
98  int dftype;
99  int precision;
100  int format;
102 
104  int (*filter_channels)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs);
105 
106  double da_double[3], dm_double[3];
107  float da_float[3], dm_float[3];
108 
111 
113 {
115  static const enum AVSampleFormat sample_fmts[3][3] = {
119  };
120  int ret;
121 
123  return ret;
124 
125  if ((ret = ff_set_common_formats_from_list(ctx, sample_fmts[s->precision])) < 0)
126  return ret;
127 
129 }
130 
131 static double get_coef(double x, double sr)
132 {
133  return 1.0 - exp(-1.0 / (0.001 * x * sr));
134 }
135 
136 typedef struct ThreadData {
137  AVFrame *in, *out;
138 } ThreadData;
139 
140 #define DEPTH 32
142 
143 #undef DEPTH
144 #define DEPTH 64
146 
148 {
149  AVFilterContext *ctx = inlink->dst;
151 
152  s->format = inlink->format;
153  s->cc = av_calloc(inlink->ch_layout.nb_channels, sizeof(*s->cc));
154  if (!s->cc)
155  return AVERROR(ENOMEM);
156  s->nb_channels = inlink->ch_layout.nb_channels;
157 
158  switch (s->format) {
159  case AV_SAMPLE_FMT_DBLP:
160  s->filter_prepare = filter_prepare_double;
161  s->filter_channels = filter_channels_double;
162  break;
163  case AV_SAMPLE_FMT_FLTP:
164  s->filter_prepare = filter_prepare_float;
165  s->filter_channels = filter_channels_float;
166  break;
167  }
168 
169  for (int ch = 0; ch < s->nb_channels; ch++) {
170  ChannelContext *cc = &s->cc[ch];
171  cc->queue = av_calloc(inlink->sample_rate, sizeof(double));
172  cc->dqueue = av_calloc(inlink->sample_rate, sizeof(double));
173  if (!cc->queue || !cc->dqueue)
174  return AVERROR(ENOMEM);
175  }
176 
177  return 0;
178 }
179 
181 {
182  AVFilterContext *ctx = inlink->dst;
183  AVFilterLink *outlink = ctx->outputs[0];
185  ThreadData td;
186  AVFrame *out;
187 
188  if (av_frame_is_writable(in)) {
189  out = in;
190  } else {
191  out = ff_get_audio_buffer(outlink, in->nb_samples);
192  if (!out) {
193  av_frame_free(&in);
194  return AVERROR(ENOMEM);
195  }
197  }
198 
199  td.in = in;
200  td.out = out;
201  s->filter_prepare(ctx);
202  ff_filter_execute(ctx, s->filter_channels, &td, NULL,
204 
205  if (out != in)
206  av_frame_free(&in);
207  return ff_filter_frame(outlink, out);
208 }
209 
211 {
213 
214  for (int ch = 0; ch < s->nb_channels; ch++) {
215  ChannelContext *cc = &s->cc[ch];
216  av_freep(&cc->queue);
217  av_freep(&cc->dqueue);
218  }
219  av_freep(&s->cc);
220 }
221 
222 #define OFFSET(x) offsetof(AudioDynamicEqualizerContext, x)
223 #define AF AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
224 #define FLAGS AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
225 
227  { "threshold", "set detection threshold", OFFSET(threshold), AV_OPT_TYPE_DOUBLE, {.dbl=0}, 0, 100, FLAGS },
228  { "dfrequency", "set detection frequency", OFFSET(dfrequency), AV_OPT_TYPE_DOUBLE, {.dbl=1000}, 2, 1000000, FLAGS },
229  { "dqfactor", "set detection Q factor", OFFSET(dqfactor), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0.001, 1000, FLAGS },
230  { "tfrequency", "set target frequency", OFFSET(tfrequency), AV_OPT_TYPE_DOUBLE, {.dbl=1000}, 2, 1000000, FLAGS },
231  { "tqfactor", "set target Q factor", OFFSET(tqfactor), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0.001, 1000, FLAGS },
232  { "attack", "set detection attack duration", OFFSET(dattack), AV_OPT_TYPE_DOUBLE, {.dbl=20}, 0.01, 2000, FLAGS },
233  { "release","set detection release duration",OFFSET(drelease), AV_OPT_TYPE_DOUBLE, {.dbl=200}, 0.01, 2000, FLAGS },
234  { "ratio", "set ratio factor", OFFSET(ratio), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 30, FLAGS },
235  { "makeup", "set makeup gain", OFFSET(makeup), AV_OPT_TYPE_DOUBLE, {.dbl=0}, 0, 1000, FLAGS },
236  { "range", "set max gain", OFFSET(range), AV_OPT_TYPE_DOUBLE, {.dbl=50}, 1, 2000, FLAGS },
237  { "mode", "set mode", OFFSET(mode), AV_OPT_TYPE_INT, {.i64=0}, LISTEN,NB_FMODES-1,FLAGS, .unit = "mode" },
238  { "listen", 0, 0, AV_OPT_TYPE_CONST, {.i64=LISTEN}, 0, 0, FLAGS, .unit = "mode" },
239  { "cutbelow", 0, 0, AV_OPT_TYPE_CONST, {.i64=CUT_BELOW},0, 0, FLAGS, .unit = "mode" },
240  { "cutabove", 0, 0, AV_OPT_TYPE_CONST, {.i64=CUT_ABOVE},0, 0, FLAGS, .unit = "mode" },
241  { "boostbelow", 0, 0, AV_OPT_TYPE_CONST, {.i64=BOOST_BELOW},0, 0, FLAGS, .unit = "mode" },
242  { "boostabove", 0, 0, AV_OPT_TYPE_CONST, {.i64=BOOST_ABOVE},0, 0, FLAGS, .unit = "mode" },
243  { "dftype", "set detection filter type",OFFSET(dftype), AV_OPT_TYPE_INT, {.i64=0}, 0, 3, FLAGS, .unit = "dftype" },
244  { "bandpass", 0, 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, .unit = "dftype" },
245  { "lowpass", 0, 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, .unit = "dftype" },
246  { "highpass", 0, 0, AV_OPT_TYPE_CONST, {.i64=2}, 0, 0, FLAGS, .unit = "dftype" },
247  { "peak", 0, 0, AV_OPT_TYPE_CONST, {.i64=3}, 0, 0, FLAGS, .unit = "dftype" },
248  { "tftype", "set target filter type", OFFSET(tftype), AV_OPT_TYPE_INT, {.i64=0}, 0, 2, FLAGS, .unit = "tftype" },
249  { "bell", 0, 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, .unit = "tftype" },
250  { "lowshelf", 0, 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, .unit = "tftype" },
251  { "highshelf",0, 0, AV_OPT_TYPE_CONST, {.i64=2}, 0, 0, FLAGS, .unit = "tftype" },
252  { "auto", "set auto threshold", OFFSET(detection), AV_OPT_TYPE_INT, {.i64=DET_OFF},DET_DISABLED,NB_DMODES-1,FLAGS, .unit = "auto" },
253  { "disabled", 0, 0, AV_OPT_TYPE_CONST, {.i64=DET_DISABLED}, 0, 0, FLAGS, .unit = "auto" },
254  { "off", 0, 0, AV_OPT_TYPE_CONST, {.i64=DET_OFF}, 0, 0, FLAGS, .unit = "auto" },
255  { "on", 0, 0, AV_OPT_TYPE_CONST, {.i64=DET_ON}, 0, 0, FLAGS, .unit = "auto" },
256  { "adaptive", 0, 0, AV_OPT_TYPE_CONST, {.i64=DET_ADAPTIVE}, 0, 0, FLAGS, .unit = "auto" },
257  { "precision", "set processing precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=0}, 0, 2, AF, .unit = "precision" },
258  { "auto", "set auto processing precision", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, AF, .unit = "precision" },
259  { "float", "set single-floating point processing precision", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, AF, .unit = "precision" },
260  { "double","set double-floating point processing precision", 0, AV_OPT_TYPE_CONST, {.i64=2}, 0, 0, AF, .unit = "precision" },
261  { NULL }
262 };
263 
264 AVFILTER_DEFINE_CLASS(adynamicequalizer);
265 
266 static const AVFilterPad inputs[] = {
267  {
268  .name = "default",
269  .type = AVMEDIA_TYPE_AUDIO,
270  .filter_frame = filter_frame,
271  .config_props = config_input,
272  },
273 };
274 
276  .name = "adynamicequalizer",
277  .description = NULL_IF_CONFIG_SMALL("Apply Dynamic Equalization of input audio."),
278  .priv_size = sizeof(AudioDynamicEqualizerContext),
279  .priv_class = &adynamicequalizer_class,
280  .uninit = uninit,
286  .process_command = ff_filter_process_command,
287 };
ChannelContext::front
int front
Definition: af_adynamicequalizer.c:71
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:97
AV_SAMPLE_FMT_FLTP
@ AV_SAMPLE_FMT_FLTP
float, planar
Definition: samplefmt.h:66
AudioDynamicEqualizerContext::precision
int precision
Definition: af_adynamicequalizer.c:99
CUT_BELOW
@ CUT_BELOW
Definition: af_adynamicequalizer.c:39
ChannelContext::dqueue
void * dqueue
Definition: af_adynamicequalizer.c:67
AudioDynamicEqualizerContext::dfrequency
double dfrequency
Definition: af_adynamicequalizer.c:82
ChannelContext::fm_float
float fm_float[3]
Definition: af_adynamicequalizer.c:57
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:98
AudioDynamicEqualizerContext::range
double range
Definition: af_adynamicequalizer.c:87
out
FILE * out
Definition: movenc.c:55
ChannelContext::sum_double
double sum_double
Definition: af_adynamicequalizer.c:56
ff_filter_frame
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Definition: avfilter.c:1015
AudioDynamicEqualizerContext::drelease
double drelease
Definition: af_adynamicequalizer.c:90
sample_fmts
static enum AVSampleFormat sample_fmts[]
Definition: adpcmenc.c:948
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:275
av_frame_free
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
Definition: frame.c:160
AudioDynamicEqualizerContext::makeup
double makeup
Definition: af_adynamicequalizer.c:88
AVFrame
This structure describes decoded (raw) audio or video data.
Definition: frame.h:374
config_input
static int config_input(AVFilterLink *inlink)
Definition: af_adynamicequalizer.c:147
ChannelContext::queue
void * queue
Definition: af_adynamicequalizer.c:68
DET_ADAPTIVE
@ DET_ADAPTIVE
Definition: af_adynamicequalizer.c:33
AVOption
AVOption.
Definition: opt.h:357
FILTER_QUERY_FUNC
#define FILTER_QUERY_FUNC(func)
Definition: internal.h:159
ChannelContext::fstate_float
float fstate_float[2]
Definition: af_adynamicequalizer.c:59
AudioDynamicEqualizerContext::drelease_coef
double drelease_coef
Definition: af_adynamicequalizer.c:92
FLAGS
#define FLAGS
Definition: af_adynamicequalizer.c:224
DET_ON
@ DET_ON
Definition: af_adynamicequalizer.c:32
ChannelContext::threshold_log_double
double threshold_log_double
Definition: af_adynamicequalizer.c:53
ff_set_common_all_samplerates
int ff_set_common_all_samplerates(AVFilterContext *ctx)
Equivalent to ff_set_common_samplerates(ctx, ff_all_samplerates())
Definition: formats.c:822
float.h
AVFilter::name
const char * name
Filter name.
Definition: avfilter.h:170
AudioDynamicEqualizerContext::mode
int mode
Definition: af_adynamicequalizer.c:95
ChannelContext::detection
int detection
Definition: af_adynamicequalizer.c:73
ThreadData::out
AVFrame * out
Definition: af_adeclick.c:527
AVChannelLayout::nb_channels
int nb_channels
Number of channels in this layout.
Definition: channel_layout.h:321
ThreadData::in
AVFrame * in
Definition: af_adecorrelate.c:154
get_coef
static double get_coef(double x, double sr)
Definition: af_adynamicequalizer.c:131
ChannelContext::detect_double
double detect_double
Definition: af_adynamicequalizer.c:52
ChannelContext::log_sum_double
double log_sum_double
Definition: af_adynamicequalizer.c:55
formats.h
AudioDynamicEqualizerContext::detection
int detection
Definition: af_adynamicequalizer.c:96
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_adynamicequalizer.c:180
AudioDynamicEqualizerContext::cc
ChannelContext * cc
Definition: af_adynamicequalizer.c:109
ChannelContext::init
int init
Definition: af_adynamicequalizer.c:74
ChannelContext::tstate_double
double tstate_double[2]
Definition: af_adynamicequalizer.c:50
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_adynamicequalizer.c:210
AVFilterPad
A filter pad used for either input or output.
Definition: internal.h:33
av_cold
#define av_cold
Definition: attributes.h:90
adynamicequalizer_options
static const AVOption adynamicequalizer_options[]
Definition: af_adynamicequalizer.c:226
FilterModes
FilterModes
Definition: af_adynamicequalizer.c:37
s
#define s(width, name)
Definition: cbs_vp9.c:198
AV_OPT_TYPE_DOUBLE
@ AV_OPT_TYPE_DOUBLE
Definition: opt.h:247
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
ChannelContext::threshold_log_float
float threshold_log_float
Definition: af_adynamicequalizer.c:63
ff_set_common_formats_from_list
int ff_set_common_formats_from_list(AVFilterContext *ctx, const int *fmts)
Equivalent to ff_set_common_formats(ctx, ff_make_format_list(fmts))
Definition: formats.c:874
ctx
AVFormatContext * ctx
Definition: movenc.c:49
BOOST_ABOVE
@ BOOST_ABOVE
Definition: af_adynamicequalizer.c:42
AudioDynamicEqualizerContext::da_double
double da_double[3]
Definition: af_adynamicequalizer.c:106
AudioDynamicEqualizerContext::filter_channels
int(* filter_channels)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
Definition: af_adynamicequalizer.c:104
AudioDynamicEqualizerContext::grelease_coef
double grelease_coef
Definition: af_adynamicequalizer.c:94
AudioDynamicEqualizerContext::dattack
double dattack
Definition: af_adynamicequalizer.c:89
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:182
arg
const char * arg
Definition: jacosubdec.c:67
ChannelContext::dstate_double
double dstate_double[2]
Definition: af_adynamicequalizer.c:48
AudioDynamicEqualizerContext::tqfactor
double tqfactor
Definition: af_adynamicequalizer.c:85
DetectionModes
DetectionModes
Definition: af_adynamicequalizer.c:28
AVClass
Describe the class of an AVClass context structure.
Definition: log.h:66
NULL
#define NULL
Definition: coverity.c:32
ChannelContext::lin_gain_float
float lin_gain_float
Definition: af_adynamicequalizer.c:61
NB_FMODES
@ NB_FMODES
Definition: af_adynamicequalizer.c:43
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:709
AudioDynamicEqualizerContext::da_float
float da_float[3]
Definition: af_adynamicequalizer.c:107
AVFILTER_DEFINE_CLASS
AVFILTER_DEFINE_CLASS(adynamicequalizer)
DET_OFF
@ DET_OFF
Definition: af_adynamicequalizer.c:31
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
AudioDynamicEqualizerContext::dm_double
double dm_double[3]
Definition: af_adynamicequalizer.c:106
LISTEN
@ LISTEN
Definition: af_adynamicequalizer.c:38
ff_set_common_all_channel_counts
int ff_set_common_all_channel_counts(AVFilterContext *ctx)
Equivalent to ff_set_common_channel_layouts(ctx, ff_all_channel_counts())
Definition: formats.c:804
exp
int8_t exp
Definition: eval.c:73
ChannelContext::fstate_double
double fstate_double[2]
Definition: af_adynamicequalizer.c:49
ChannelContext::log_sum_float
float log_sum_float
Definition: af_adynamicequalizer.c:65
AudioDynamicEqualizerContext::filter_prepare
int(* filter_prepare)(AVFilterContext *ctx)
Definition: af_adynamicequalizer.c:103
ChannelContext::new_threshold_log_double
double new_threshold_log_double
Definition: af_adynamicequalizer.c:54
AudioDynamicEqualizerContext::tftype
int tftype
Definition: af_adynamicequalizer.c:97
DET_UNSET
@ DET_UNSET
Definition: af_adynamicequalizer.c:29
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:222
AV_SAMPLE_FMT_NONE
@ AV_SAMPLE_FMT_NONE
Definition: samplefmt.h:56
AudioDynamicEqualizerContext::format
int format
Definition: af_adynamicequalizer.c:100
BOOST_BELOW
@ BOOST_BELOW
Definition: af_adynamicequalizer.c:41
av_frame_is_writable
int av_frame_is_writable(AVFrame *frame)
Check if the frame data is writable.
Definition: frame.c:645
AudioDynamicEqualizerContext
Definition: af_adynamicequalizer.c:77
range
enum AVColorRange range
Definition: mediacodec_wrapper.c:2464
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:887
AudioDynamicEqualizerContext::dattack_coef
double dattack_coef
Definition: af_adynamicequalizer.c:91
ChannelContext::detect_float
float detect_float
Definition: af_adynamicequalizer.c:62
AudioDynamicEqualizerContext::dm_float
float dm_float[3]
Definition: af_adynamicequalizer.c:107
ChannelContext::fa_float
float fa_float[3]
Definition: af_adynamicequalizer.c:57
ChannelContext::new_threshold_log_float
float new_threshold_log_float
Definition: af_adynamicequalizer.c:64
AudioDynamicEqualizerContext::threshold_log
double threshold_log
Definition: af_adynamicequalizer.c:81
AVFrame::nb_samples
int nb_samples
number of audio samples (per channel) described by this frame
Definition: frame.h:454
ff_filter_get_nb_threads
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
Definition: avfilter.c:827
AVSampleFormat
AVSampleFormat
Audio sample formats.
Definition: samplefmt.h:55
ThreadData
Used for passing data between threads.
Definition: dsddec.c:71
FFMIN
#define FFMIN(a, b)
Definition: macros.h:49
ChannelContext::position
int position
Definition: af_adynamicequalizer.c:69
AVFilterPad::name
const char * name
Pad name.
Definition: internal.h:39
AudioDynamicEqualizerContext::ratio
double ratio
Definition: af_adynamicequalizer.c:86
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:93
AVFilter
Filter definition.
Definition: avfilter.h:166
NB_DMODES
@ NB_DMODES
Definition: af_adynamicequalizer.c:34
ret
ret
Definition: filter_design.txt:187
AF
#define AF
Definition: af_adynamicequalizer.c:223
ChannelContext::tstate_float
float tstate_float[2]
Definition: af_adynamicequalizer.c:60
AudioDynamicEqualizerContext::tfrequency
double tfrequency
Definition: af_adynamicequalizer.c:84
DET_DISABLED
@ DET_DISABLED
Definition: af_adynamicequalizer.c:30
mode
mode
Definition: ebur128.h:83
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:245
avfilter.h
AV_SAMPLE_FMT_DBLP
@ AV_SAMPLE_FMT_DBLP
double, planar
Definition: samplefmt.h:67
AudioDynamicEqualizerContext::dqfactor
double dqfactor
Definition: af_adynamicequalizer.c:83
ffmath.h
ChannelContext
Definition: hcadec.c:35
ChannelContext::size
int size
Definition: af_adynamicequalizer.c:70
AVFilterContext
An instance of a filter.
Definition: avfilter.h:407
ChannelContext::fa_double
double fa_double[3]
Definition: af_adynamicequalizer.c:47
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
mem.h
audio.h
ChannelContext::sum_float
float sum_float
Definition: af_adynamicequalizer.c:66
AudioDynamicEqualizerContext::threshold
double threshold
Definition: af_adynamicequalizer.c:80
AudioDynamicEqualizerContext::nb_channels
int nb_channels
Definition: af_adynamicequalizer.c:101
CUT_ABOVE
@ CUT_ABOVE
Definition: af_adynamicequalizer.c:40
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:183
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:155
ChannelContext::back
int back
Definition: af_adynamicequalizer.c:72
inputs
static const AVFilterPad inputs[]
Definition: af_adynamicequalizer.c:266
ff_filter_execute
static av_always_inline int ff_filter_execute(AVFilterContext *ctx, avfilter_action_func *func, void *arg, int *ret, int nb_jobs)
Definition: internal.h:134
int
int
Definition: ffmpeg_filter.c:424
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:254
ChannelContext::dstate_float
float dstate_float[2]
Definition: af_adynamicequalizer.c:58
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: af_adynamicequalizer.c:112
ChannelContext::lin_gain_double
double lin_gain_double
Definition: af_adynamicequalizer.c:51
ChannelContext::fm_double
double fm_double[3]
Definition: af_adynamicequalizer.c:47