FFmpeg: libavfilter/af_anequalizer.c Source File
Go to the documentation of this file. 1 /*
2 * Copyright (c) 2001-2010 Krzysztof Foltman, Markus Schmidt, Thor Harald Johansen and others
3 * Copyright (c) 2015 Paul B Mahol
4 *
5 * This file is part of FFmpeg.
6 *
7 * FFmpeg is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * FFmpeg is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with FFmpeg; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
30
31 #define FILTER_ORDER 4
32
38 };
39
43
47
52
56
59
66
74
75 #define OFFSET(x) offsetof(AudioNEqualizerContext, x)
76 #define A AV_OPT_FLAG_AUDIO_PARAM
77 #define V AV_OPT_FLAG_VIDEO_PARAM
78 #define F AV_OPT_FLAG_FILTERING_PARAM
79
88 {
"colors",
"set channels curves colors",
OFFSET(colors),
AV_OPT_TYPE_STRING, {.str =
"red|green|blue|yellow|orange|lime|pink|magenta|brown" }, 0, 0,
V|
F },
90 };
91
93
95 {
99
101 if (!colors)
102 return;
103
104 memset(
out->data[0], 0,
s->h *
out->linesize[0]);
105
106 for (ch = 0; ch <
inlink->channels; ch++) {
107 uint8_t fg[4] = { 0xff, 0xff, 0xff, 0xff };
108 int prev_v = -1;
110
114
115 for (
f = 0;
f <
s->w;
f++) {
116 double zr, zi, zr2, zi2;
117 double Hr, Hi;
118 double Hmag = 1;
120 int v, y, x;
121
122 w =
M_PI * (
s->fscale ? pow(
s->w - 1,
f /
s->w) :
f) / (
s->w - 1);
124 zr2 = zr * zr;
126 zi2 = zi * zi;
127
128 for (n = 0; n <
s->nb_filters; n++) {
129 if (
s->filters[n].channel != ch ||
130 s->filters[n].ignore)
131 continue;
132
135
136 /* H *= (((((S->b4 * z + S->b3) * z + S->b2) * z + S->b1) * z + S->b0) /
137 ((((S->a4 * z + S->a3) * z + S->a2) * z + S->a1) * z + S->a0)); */
138
139 Hr =
S->b4*(1-8*zr2*zi2) +
S->b2*(zr2-zi2) + zr*(
S->b1+
S->b3*(zr2-3*zi2))+
S->b0;
140 Hi = zi*(
S->b3*(3*zr2-zi2) +
S->b1 + 2*zr*(2*
S->b4*(zr2-zi2) +
S->b2));
141 Hmag *=
hypot(Hr, Hi);
142 Hr =
S->a4*(1-8*zr2*zi2) +
S->a2*(zr2-zi2) + zr*(
S->a1+
S->a3*(zr2-3*zi2))+
S->a0;
143 Hi = zi*(
S->a3*(3*zr2-zi2) +
S->a1 + 2*zr*(2*
S->a4*(zr2-zi2) +
S->a2));
144 Hmag /=
hypot(Hr, Hi);
145 }
146 }
147
148 v =
av_clip((1. + -20 * log10(Hmag) /
s->mag) *
s->h / 2, 0,
s->h - 1);
150 if (prev_v == -1)
151 prev_v = v;
152 if (v <= prev_v) {
153 for (y = v; y <= prev_v; y++)
155 } else {
156 for (y = prev_v; y <= v; y++)
158 }
159
160 prev_v = v;
161 }
162 }
163
165 }
166
168 {
173
176
182
184
185 return 0;
186 }
187
189 {
193
197 };
198
202
203 if (
s->draw_curves) {
208 };
212 }
213
214 return 0;
215 }
216
218 {
228 };
230
231 if (
s->draw_curves) {
236 }
237
242
247
252
253 return 0;
254 }
255
257 {
259
264 }
265
267 double si,
double g,
double g0,
269 {
270 if (c0 == 1 || c0 == -1) {
271 S->b0 = (
g*
g*beta*beta + 2*
g*g0*si*beta + g0*g0)/
D;
272 S->b1 = 2*c0*(
g*
g*beta*beta - g0*g0)/
D;
273 S->b2 = (
g*
g*beta*beta - 2*g0*
g*beta*si + g0*g0)/
D;
276
278 S->a1 = 2*c0*(beta*beta - 1)/
D;
279 S->a2 = (beta*beta - 2*beta*si + 1)/
D;
282 } else {
283 S->b0 = (
g*
g*beta*beta + 2*
g*g0*si*beta + g0*g0)/
D;
284 S->b1 = -4*c0*(g0*g0 +
g*g0*si*beta)/
D;
285 S->b2 = 2*(g0*g0*(1 + 2*c0*c0) -
g*
g*beta*beta)/
D;
286 S->b3 = -4*c0*(g0*g0 -
g*g0*si*beta)/
D;
287 S->b4 = (
g*
g*beta*beta - 2*
g*g0*si*beta + g0*g0)/
D;
288
290 S->a1 = -4*c0*(1 + si*beta)/
D;
291 S->a2 = 2*(1 + 2*c0*c0 - beta*beta)/
D;
292 S->a3 = -4*c0*(1 - si*beta)/
D;
293 S->a4 = (beta*beta - 2*si*beta + 1)/
D;
294 }
295 }
296
298 int N,
double w0,
double wb,
299 double G,
double Gb,
double G0)
300 {
301 double g, c0, g0, beta;
302 double epsilon;
306
307 if (
G == 0 && G0 == 0) {
308 f->section[0].a0 = 1;
309 f->section[0].b0 = 1;
310 f->section[1].a0 = 1;
311 f->section[1].b0 = 1;
312 return;
313 }
314
318
319 epsilon = sqrt((
G *
G - Gb * Gb) / (Gb * Gb - G0 * G0));
321 g0 = pow(G0, 1.0 /
N);
322 beta = pow(epsilon, -1.0 /
N) * tan(wb/2);
323 c0 = cos(w0);
324
325 for (
i = 1;
i <=
L;
i++) {
326 double ui = (2.0 *
i - 1) /
N;
327 double si = sin(
M_PI *
ui / 2.0);
328 double Di = beta * beta + 2 * si * beta + 1;
329
331 }
332 }
333
335 double c,
double tetta_b,
336 double g0,
double si,
double b,
338 {
339 if (c0 == 1 || c0 == -1) {
340 S->b0 = (tetta_b*tetta_b*(
b*
b+g0*g0*
c*
c) + 2*g0*
b*si*tetta_b*tetta_b + g0*g0)/
D;
341 S->b1 = 2*c0*(tetta_b*tetta_b*(
b*
b+g0*g0*
c*
c) - g0*g0)/
D;
342 S->b2 = (tetta_b*tetta_b*(
b*
b+g0*g0*
c*
c) - 2*g0*
b*si*tetta_b + g0*g0)/
D;
345
347 S->a1 = 2*c0*(tetta_b*tetta_b*(
a*
a+
c*
c) - 1)/
D;
348 S->a2 = (tetta_b*tetta_b*(
a*
a+
c*
c) - 2*
a*si*tetta_b + 1)/
D;
351 } else {
352 S->b0 = ((
b*
b + g0*g0*
c*
c)*tetta_b*tetta_b + 2*g0*
b*si*tetta_b + g0*g0)/
D;
353 S->b1 = -4*c0*(g0*g0 + g0*
b*si*tetta_b)/
D;
354 S->b2 = 2*(g0*g0*(1 + 2*c0*c0) - (
b*
b + g0*g0*
c*
c)*tetta_b*tetta_b)/
D;
355 S->b3 = -4*c0*(g0*g0 - g0*
b*si*tetta_b)/
D;
356 S->b4 = ((
b*
b + g0*g0*
c*
c)*tetta_b*tetta_b - 2*g0*
b*si*tetta_b + g0*g0)/
D;
357
359 S->a1 = -4*c0*(1 +
a*si*tetta_b)/
D;
360 S->a2 = 2*(1 + 2*c0*c0 - (
a*
a +
c*
c)*tetta_b*tetta_b)/
D;
361 S->a3 = -4*c0*(1 -
a*si*tetta_b)/
D;
362 S->a4 = ((
a*
a +
c*
c)*tetta_b*tetta_b - 2*
a*si*tetta_b + 1)/
D;
363 }
364 }
365
367 int N,
double w0,
double wb,
368 double G,
double Gb,
double G0)
369 {
370 double a,
b, c0, g0, alfa, beta, tetta_b;
371 double epsilon;
375
376 if (
G == 0 && G0 == 0) {
377 f->section[0].a0 = 1;
378 f->section[0].b0 = 1;
379 f->section[1].a0 = 1;
380 f->section[1].b0 = 1;
381 return;
382 }
383
387
388 epsilon = sqrt((
G*
G - Gb*Gb) / (Gb*Gb - G0*G0));
390 alfa = pow(1.0/epsilon + sqrt(1 + 1/(epsilon*epsilon)), 1.0/
N);
391 beta = pow(
G/epsilon + Gb * sqrt(1 + 1/(epsilon*epsilon)), 1.0/
N);
392 a = 0.5 * (alfa - 1.0/alfa);
393 b = 0.5 * (beta - g0*g0*(1/beta));
394 tetta_b = tan(wb/2);
395 c0 = cos(w0);
396
397 for (
i = 1;
i <=
L;
i++) {
398 double ui = (2.0*
i-1.0)/
N;
399 double ci = cos(
M_PI*
ui/2.0);
400 double si = sin(
M_PI*
ui/2.0);
401 double Di = (
a*
a + ci*ci)*tetta_b*tetta_b + 2.0*
a*si*tetta_b + 1;
402
404 }
405 }
406
408 double c,
double tetta_b,
409 double g,
double si,
double b,
411 {
412 if (c0 == 1 || c0 == -1) {
413 S->b0 = (
g*
g*tetta_b*tetta_b + 2*tetta_b*
g*
b*si +
b*
b +
g*
g*
c*
c)/
D;
414 S->b1 = 2*c0*(
g*
g*tetta_b*tetta_b -
b*
b -
g*
g*
c*
c)/
D;
415 S->b2 = (
g*
g*tetta_b*tetta_b - 2*tetta_b*
g*
b*si +
b*
b +
g*
g*
c*
c)/
D;
418
420 S->a1 = 2*c0*(tetta_b*tetta_b -
a*
a -
c*
c)/
D;
421 S->a2 = (tetta_b*tetta_b - 2*tetta_b*
a*si +
a*
a +
c*
c)/
D;
424 } else {
425 S->b0 = (
g*
g*tetta_b*tetta_b + 2*
g*
b*si*tetta_b +
b*
b +
g*
g*
c*
c)/
D;
426 S->b1 = -4*c0*(
b*
b +
g*
g*
c*
c +
g*
b*si*tetta_b)/
D;
427 S->b2 = 2*((
b*
b +
g*
g*
c*
c)*(1 + 2*c0*c0) -
g*
g*tetta_b*tetta_b)/
D;
428 S->b3 = -4*c0*(
b*
b +
g*
g*
c*
c -
g*
b*si*tetta_b)/
D;
429 S->b4 = (
g*
g*tetta_b*tetta_b - 2*
g*
b*si*tetta_b +
b*
b +
g*
g*
c*
c)/
D;
430
432 S->a1 = -4*c0*(
a*
a +
c*
c +
a*si*tetta_b)/
D;
433 S->a2 = 2*((
a*
a +
c*
c)*(1 + 2*c0*c0) - tetta_b*tetta_b)/
D;
434 S->a3 = -4*c0*(
a*
a +
c*
c -
a*si*tetta_b)/
D;
435 S->a4 = (tetta_b*tetta_b - 2*
a*si*tetta_b +
a*
a +
c*
c)/
D;
436 }
437 }
438
440 int N,
double w0,
double wb,
441 double G,
double Gb,
double G0)
442 {
443 double a,
b, c0, tetta_b;
444 double epsilon,
g, eu, ew;
448
449 if (
G == 0 && G0 == 0) {
450 f->section[0].a0 = 1;
451 f->section[0].b0 = 1;
452 f->section[1].a0 = 1;
453 f->section[1].b0 = 1;
454 return;
455 }
456
460
461 epsilon = sqrt((
G*
G - Gb*Gb) / (Gb*Gb - G0*G0));
463 eu = pow(epsilon + sqrt(1 + epsilon*epsilon), 1.0/
N);
464 ew = pow(G0*epsilon + Gb*sqrt(1 + epsilon*epsilon), 1.0/
N);
465 a = (eu - 1.0/eu)/2.0;
466 b = (ew -
g*
g/ew)/2.0;
467 tetta_b = tan(wb/2);
468 c0 = cos(w0);
469
470 for (
i = 1;
i <=
L;
i++) {
471 double ui = (2.0 *
i - 1.0)/
N;
472 double ci = cos(
M_PI *
ui / 2.0);
473 double si = sin(
M_PI *
ui / 2.0);
474 double Di = tetta_b*tetta_b + 2*
a*si*tetta_b +
a*
a + ci*ci;
475
477 }
478 }
479
481 {
482 double bw_gain = 0;
483
484 if (gain <= -6)
485 bw_gain = gain + 3;
486 else if(gain > -6 && gain < 6)
487 bw_gain = gain * 0.5;
488 else if(gain >= 6)
489 bw_gain = gain - 3;
490
491 return bw_gain;
492 }
493
495 {
496 double bw_gain = 0;
497
498 if (gain <= -6)
499 bw_gain = gain + 1;
500 else if(gain > -6 && gain < 6)
501 bw_gain = gain * 0.9;
502 else if(gain >= 6)
503 bw_gain = gain - 1;
504
505 return bw_gain;
506 }
507
509 {
510 double bw_gain = 0;
511
512 if (gain <= -6)
513 bw_gain = -3;
514 else if(gain > -6 && gain < 6)
515 bw_gain = gain * 0.3;
516 else if(gain >= 6)
517 bw_gain = 3;
518
519 return bw_gain;
520 }
521
523 {
525 }
526
528 {
531 double bw_gain;
532
537 break;
541 break;
545 break;
546 }
547
548 }
549
551 {
553 if (
s->nb_filters >=
s->nb_allocated - 1) {
555
559 memcpy(
filters,
s->filters,
sizeof(*
s->filters) *
s->nb_allocated);
562 s->nb_allocated *= 2;
563 }
565
566 return 0;
567 }
568
570 {
574 char *saveptr =
NULL;
576
577 if (!args)
579
580 s->nb_allocated = 32 *
inlink->channels;
586 }
587
588 while (1) {
590
592 break;
593
594 s->filters[
s->nb_filters].type = 0;
595 if (sscanf(
arg,
"c%d f=%lf w=%lf g=%lf t=%d", &
s->filters[
s->nb_filters].channel,
596 &
s->filters[
s->nb_filters].freq,
597 &
s->filters[
s->nb_filters].width,
598 &
s->filters[
s->nb_filters].gain,
599 &
s->filters[
s->nb_filters].type) != 5 &&
600 sscanf(
arg,
"c%d f=%lf w=%lf g=%lf", &
s->filters[
s->nb_filters].channel,
601 &
s->filters[
s->nb_filters].freq,
602 &
s->filters[
s->nb_filters].width,
603 &
s->filters[
s->nb_filters].gain) != 4 ) {
606 }
607
608 if (
s->filters[
s->nb_filters].freq < 0 ||
609 s->filters[
s->nb_filters].freq >
inlink->sample_rate / 2.0)
610 s->filters[
s->nb_filters].ignore = 1;
611
612 if (
s->filters[
s->nb_filters].channel < 0 ||
613 s->filters[
s->nb_filters].channel >=
inlink->channels)
614 s->filters[
s->nb_filters].ignore = 1;
615
619 break;
620 }
621
623
625 }
626
628 char *res,
int res_len,
int flags)
629 {
633
634 if (!strcmp(cmd, "change")) {
635 double freq,
width, gain;
637
638 if (sscanf(args,
"%d|f=%lf|w=%lf|g=%lf", &
filter, &freq, &
width, &gain) != 4)
640
641 if (filter < 0 || filter >=
s->nb_filters)
643
644 if (freq < 0 || freq >
inlink->sample_rate / 2.0)
646
647 s->filters[
filter].freq = freq;
649 s->filters[
filter].gain = gain;
653
655 }
656
658 }
659
661 {
663
665 out+=
S->b1 *
S->num[0] -
S->denum[0] *
S->a1;
666 out+=
S->b2 *
S->num[1] -
S->denum[1] *
S->a2;
667 out+=
S->b3 *
S->num[2] -
S->denum[2] *
S->a3;
668 out+=
S->b4 *
S->num[3] -
S->denum[3] *
S->a4;
669
670 S->num[3] =
S->num[2];
671 S->num[2] =
S->num[1];
672 S->num[1] =
S->num[0];
674
675 S->denum[3] =
S->denum[2];
676 S->denum[2] =
S->denum[1];
677 S->denum[1] =
S->denum[0];
679
681 }
682
684 {
685 double p0 = in, p1;
687
690 p0 = p1;
691 }
692
693 return p1;
694 }
695
697 int jobnr, int nb_jobs)
698 {
701 const int start = (buf->
channels * jobnr) / nb_jobs;
702 const int end = (buf->
channels * (jobnr+1)) / nb_jobs;
703
704 for (
int i = 0;
i <
s->nb_filters;
i++) {
706 double *bptr;
707
708 if (
f->gain == 0. ||
f->ignore)
709 continue;
710 if (
f->channel < start ||
712 continue;
713
717
720 }
721 }
722
723 return 0;
724 }
725
727 {
731
732 if (!
ctx->is_disabled)
735
736 if (
s->draw_curves) {
738
739 const int64_t
pts = buf->
pts +
743
746 if (!clone)
751 }
752
754 }
755
757 {
763 },
764 };
765
767 .
name =
"anequalizer",
770 .priv_class = &anequalizer_class,
780 };
static int config_video(AVFilterLink *outlink)
AVFrame * ff_get_video_buffer(AVFilterLink *link, int w, int h)
Request a picture buffer with a specific set of permissions.
A list of supported channel layouts.
AVPixelFormat
Pixel format.
static av_always_inline double ff_exp10(double x)
Compute 10^x for floating point values.
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
static void butterworth_fo_section(FoSection *S, double beta, double si, double g, double g0, double D, double c0)
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
static enum AVSampleFormat sample_fmts[]
enum MovChannelLayoutTag * layouts
int av_parse_color(uint8_t *rgba_color, const char *color_string, int slen, void *log_ctx)
Put the RGBA values that correspond to color_string in rgba_color.
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
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
This structure describes decoded (raw) audio or video data.
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
#define FILTER_QUERY_FUNC(func)
static int filter_channels(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static void chebyshev1_bp_filter(EqualizatorFilter *f, int N, double w0, double wb, double G, double Gb, double G0)
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce then the filter should push the output frames on the output link immediately As an exception to the previous rule if the input frame is enough to produce several output frames then the filter needs output only at least one per link The additional frames can be left buffered in the filter
const char * name
Filter name.
A link between two filters.
static void chebyshev2_bp_filter(EqualizatorFilter *f, int N, double w0, double wb, double G, double Gb, double G0)
static const AVOption anequalizer_options[]
static int filter_frame(AVFilterLink *inlink, AVFrame *buf)
static int config_input(AVFilterLink *inlink)
AVFILTER_DEFINE_CLASS(anequalizer)
A filter pad used for either input or output.
#define filters(fmt, inverse, clip, i, c)
static void equalizer(EqualizatorFilter *f, double sample_rate)
static void chebyshev2_fo_section(FoSection *S, double a, double c, double tetta_b, double g, double si, double b, double D, double c0)
int channels
number of audio channels, only used for audio.
char * av_strtok(char *s, const char *delim, char **saveptr)
Split the string into several tokens which can be accessed by successive calls to av_strtok().
AVRational sample_aspect_ratio
agreed upon sample aspect ratio
static void chebyshev1_fo_section(FoSection *S, double a, double c, double tetta_b, double g0, double si, double b, double D, double c0)
static int query_formats(AVFilterContext *ctx)
static enum AVPixelFormat pix_fmts[]
AVFrame * av_frame_clone(const AVFrame *src)
Create a new frame that references the same data as src.
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
#define FILTER_INPUTS(array)
static double hz_2_rad(double x, double fs)
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
static av_cold void uninit(AVFilterContext *ctx)
Describe the class of an AVClass context structure.
#define fs(width, name, subs,...)
static const AVFilterPad inputs[]
Rational number (pair of numerator and denominator).
@ AV_OPT_TYPE_IMAGE_SIZE
offset must point to two consecutive integers
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
#define AVFILTER_FLAG_DYNAMIC_OUTPUTS
The number of the filter outputs is not determined just by AVFilter.outputs.
static void draw_curves(AVFilterContext *ctx, AVFilterLink *inlink, AVFrame *out)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static av_const double hypot(double x, double y)
static const uint32_t color[16+AV_CLASS_CATEGORY_NB]
AVFilterContext * src
source filter
AVFilterFormatsConfig incfg
Lists of supported formats / etc.
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
static int add_filter(AudioNEqualizerContext *s, AVFilterLink *inlink)
int nb_samples
number of audio samples (per channel) described by this frame
#define i(width, name, range_min, range_max)
int w
agreed upon image width
uint8_t ** extended_data
pointers to the data planes/channels.
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
AVSampleFormat
Audio sample formats.
static double section_process(FoSection *S, double in)
static double chebyshev1_compute_bw_gain_db(double gain)
const char * name
Pad name.
void * av_calloc(size_t nmemb, size_t size)
static double chebyshev2_compute_bw_gain_db(double gain)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
int h
agreed upon image height
static void butterworth_bp_filter(EqualizatorFilter *f, int N, double w0, double wb, double G, double Gb, double G0)
@ AV_SAMPLE_FMT_DBLP
double, planar
AVRational time_base
Define the time base used by the PTS of the frames/samples which will pass through this link.
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
char * av_strdup(const char *s)
Duplicate a string.
int ff_append_outpad(AVFilterContext *f, AVFilterPad *p)
static double process_sample(FoSection *s1, double in)
const AVFilter ff_af_anequalizer
EqualizatorFilter * filters
#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will have its filter_frame() c...
#define flags(name, subs,...)
static av_always_inline int ff_filter_execute(AVFilterContext *ctx, avfilter_action_func *func, void *arg, int *ret, int nb_jobs)
static av_cold int init(AVFilterContext *ctx)
static double butterworth_compute_bw_gain_db(double gain)
#define AVFILTERPAD_FLAG_NEEDS_WRITABLE
The filter expects writable frames from its input link, duplicating data buffers if needed.
Generated on Wed Aug 24 2022 21:38:05 for FFmpeg by
doxygen
1.8.17