History

avfilter/af_biquads: add zdf transform type

Paul B Mahol committed 4 years ago

Commit cbc1b8a1 parent 80162192 files · +248 −11Browse files

Showing the changes to libavfilter (1 of 2 files). Show all

Unified · Split

libavfilter/af_biquads.c+239−11
@@ -104,6 +104,7 @@ enum TransformType { · 103 unmodified lines
104104 TDII,
105105 LATT,
106106 SVF,
107+ ZDF,
107108 NB_TTYPE,
108109 };
109110
@@ -150,7 +151,7 @@ typedef struct BiquadsContext { · 40 unmodified lines
150151
151152 void (*filter)(struct BiquadsContext *s, const void *ibuf, void *obuf, int len,
152153 double *i1, double *i2, double *o1, double *o2,
153− double b0, double b1, double b2, double a1, double a2, int *clippings,
154+ double b0, double b1, double b2, double a0, double a1, double a2, int *clippings,
154155 int disabled);
155156 } BiquadsContext;
156157
@@ -203,7 +204,7 @@ static void biquad_## name (BiquadsContext *s, \ · 46 unmodified lines
203204 double *in1, double *in2, \
204205 double *out1, double *out2, \
205206 double b0, double b1, double b2, \
206− double a1, double a2, int *clippings, \
207+ double a0, double a1, double a2, int *clippings, \
207208 int disabled) \
208209 { \
209210 const type *ibuf = input; \
@@ -286,7 +287,7 @@ static void biquad_dii_## name (BiquadsContext *s, \ · 76 unmodified lines
286287 double *z1, double *z2, \
287288 double *unused1, double *unused2, \
288289 double b0, double b1, double b2, \
289− double a1, double a2, int *clippings, \
290+ double a0, double a1, double a2, int *clippings, \
290291 int disabled) \
291292 { \
292293 const type *ibuf = input; \
@@ -334,7 +335,7 @@ static void biquad_tdi_## name (BiquadsContext *s, \ · 41 unmodified lines
334335 double *z1, double *z2, \
335336 double *z3, double *z4, \
336337 double b0, double b1, double b2, \
337− double a1, double a2, int *clippings, \
338+ double a0, double a1, double a2, int *clippings, \
338339 int disabled) \
339340 { \
340341 const type *ibuf = input; \
@@ -390,7 +391,7 @@ static void biquad_tdii_## name (BiquadsContext *s, \ · 49 unmodified lines
390391 double *z1, double *z2, \
391392 double *unused1, double *unused2, \
392393 double b0, double b1, double b2, \
393− double a1, double a2, int *clippings, \
394+ double a0, double a1, double a2, int *clippings, \
394395 int disabled) \
395396 { \
396397 const type *ibuf = input; \
@@ -437,7 +438,8 @@ static void biquad_latt_## name (BiquadsContext *s, \ · 40 unmodified lines
437438 double *z1, double *z2, \
438439 double *unused1, double *unused2, \
439440 double v0, double v1, double v2, \
440− double k0, double k1, int *clippings, \
441+ double unused, double k0, double k1, \
442+ int *clippings, \
441443 int disabled) \
442444 { \
443445 const type *ibuf = input; \
@@ -492,7 +494,7 @@ static void biquad_svf_## name (BiquadsContext *s, \ · 48 unmodified lines
492494 double *y0, double *y1, \
493495 double *unused1, double *unused2, \
494496 double b0, double b1, double b2, \
495− double a1, double a2, int *clippings, \
497+ double a0, double a1, double a2, int *clippings, \
496498 int disabled) \
497499 { \
498500 const type *ibuf = input; \
@@ -534,6 +536,56 @@ BIQUAD_SVF_FILTER(s32, int32_t, INT32_MIN, INT32_MAX, 1) · 35 unmodified lines
534536 BIQUAD_SVF_FILTER(flt, float, -1., 1., 0)
535537 BIQUAD_SVF_FILTER(dbl, double, -1., 1., 0)
536538
539+#define BIQUAD_ZDF_FILTER(name, type, min, max, need_clipping) \
540+static void biquad_zdf_## name (BiquadsContext *s, \
541+ const void *input, void *output, int len, \
542+ double *y0, double *y1, \
543+ double *unused1, double *unused2, \
544+ double m0, double m1, double m2, \
545+ double a0, double a1, double a2, int *clippings, \
546+ int disabled) \
547+{ \
548+ const type *ibuf = input; \
549+ type *obuf = output; \
550+ double b0 = *y0; \
551+ double b1 = *y1; \
552+ double wet = s->mix; \
553+ double dry = 1. - wet; \
554+ double out; \
555+ \
556+ for (int i = 0; i < len; i++) { \
557+ const double in = ibuf[i]; \
558+ const double v0 = in; \
559+ const double v3 = v0 - b1; \
560+ const double v1 = a0 * b0 + a1 * v3; \
561+ const double v2 = b1 + a1 * b0 + a2 * v3; \
562+ \
563+ b0 = 2. * v1 - b0; \
564+ b1 = 2. * v2 - b1; \
565+ \
566+ out = m0 * v0 + m1 * v1 + m2 * v2; \
567+ out = out * wet + in * dry; \
568+ if (disabled) { \
569+ obuf[i] = in; \
570+ } else if (need_clipping && out < min) { \
571+ (*clippings)++; \
572+ obuf[i] = min; \
573+ } else if (need_clipping && out > max) { \
574+ (*clippings)++; \
575+ obuf[i] = max; \
576+ } else { \
577+ obuf[i] = out; \
578+ } \
579+ } \
580+ *y0 = b0; \
581+ *y1 = b1; \
582+}
583+
584+BIQUAD_ZDF_FILTER(s16, int16_t, INT16_MIN, INT16_MAX, 1)
585+BIQUAD_ZDF_FILTER(s32, int32_t, INT32_MIN, INT32_MAX, 1)
586+BIQUAD_ZDF_FILTER(flt, float, -1., 1., 0)
587+BIQUAD_ZDF_FILTER(dbl, double, -1., 1., 0)
588+
537589 static void convert_dir2latt(BiquadsContext *s)
538590 {
539591 double k0, k1, v0, v1, v2;
@@ -569,6 +621,154 @@ static void convert_dir2svf(BiquadsContext *s) · 29 unmodified lines
569621 s->b2 = b[2];
570622 }
571623
624+static double convert_width2qfactor(double width,
625+ double frequency,
626+ double gain,
627+ double sample_rate,
628+ int width_type)
629+{
630+ double w0 = 2. * M_PI * frequency / sample_rate;
631+ double A = ff_exp10(gain / 40.);
632+ double ret;
633+
634+ switch (width_type) {
635+ case NONE:
636+ case QFACTOR:
637+ ret = width;
638+ break;
639+ case HERTZ:
640+ ret = frequency / width;
641+ break;
642+ case KHERTZ:
643+ ret = frequency / (width * 1000.);
644+ break;
645+ case OCTAVE:
646+ ret = 1. / (2. * sinh(log(2.) / 2. * width * w0 / sin(w0)));
647+ break;
648+ case SLOPE:
649+ ret = 1. / sqrt((A + 1. / A) * (1. / width - 1.) + 2.);
650+ break;
651+ default:
652+ av_assert0(0);
653+ break;
654+ }
655+
656+ return ret;
657+}
658+
659+static void convert_dir2zdf(BiquadsContext *s, int sample_rate)
660+{
661+ double Q = convert_width2qfactor(s->width, s->frequency, s->gain, sample_rate, s->width_type);
662+ double g, k, A;
663+ double a[3];
664+ double m[3];
665+
666+ switch (s->filter_type) {
667+ case biquad:
668+ a[0] = s->oa0;
669+ a[1] = s->oa1;
670+ a[2] = s->oa2;
671+ m[0] = s->ob0;
672+ m[1] = s->ob1;
673+ m[2] = s->ob2;
674+ break;
675+ case equalizer:
676+ A = ff_exp10(s->gain / 40.);
677+ g = tan(M_PI * s->frequency / sample_rate);
678+ k = 1. / (Q * A);
679+ a[0] = 1. / (1. + g * (g + k));
680+ a[1] = g * a[0];
681+ a[2] = g * a[1];
682+ m[0] = 1.;
683+ m[1] = k * (A * A - 1.);
684+ m[2] = 0.;
685+ break;
686+ case bass:
687+ case lowshelf:
688+ A = ff_exp10(s->gain / 40.);
689+ g = tan(M_PI * s->frequency / sample_rate) / sqrt(A);
690+ k = 1. / (Q * A);
691+ a[0] = 1. / (1. + g * (g + k));
692+ a[1] = g * a[0];
693+ a[2] = g * a[1];
694+ m[0] = 1.;
695+ m[1] = k * (A - 1.);
696+ m[2] = A * A - 1.;
697+ break;
698+ case treble:
699+ case highshelf:
700+ A = ff_exp10(s->gain / 40.);
701+ g = tan(M_PI * s->frequency / sample_rate) / sqrt(A);
702+ k = 1. / (Q * A);
703+ a[0] = 1. / (1. + g * (g + k));
704+ a[1] = g * a[0];
705+ a[2] = g * a[1];
706+ m[0] = A * A;
707+ m[1] = k * (1. - A) * A;
708+ m[2] = 1. - A * A;
709+ break;
710+ case bandpass:
711+ g = tan(M_PI * s->frequency / sample_rate);
712+ k = 1. / Q;
713+ a[0] = 1. / (1. + g * (g + k));
714+ a[1] = g * a[0];
715+ a[2] = g * a[1];
716+ m[0] = 0.;
717+ m[1] = s->csg ? 1. : 2.;
718+ m[2] = 0.;
719+ break;
720+ case bandreject:
721+ g = tan(M_PI * s->frequency / sample_rate);
722+ k = 1. / Q;
723+ a[0] = 1. / (1. + g * (g + k));
724+ a[1] = g * a[0];
725+ a[2] = g * a[1];
726+ m[0] = 1.;
727+ m[1] = -k;
728+ m[2] = 0.;
729+ break;
730+ case lowpass:
731+ g = tan(M_PI * s->frequency / sample_rate);
732+ k = 1. / Q;
733+ a[0] = 1. / (1. + g * (g + k));
734+ a[1] = g * a[0];
735+ a[2] = g * a[1];
736+ m[0] = 0.;
737+ m[1] = 0.;
738+ m[2] = 1.;
739+ break;
740+ case highpass:
741+ g = tan(M_PI * s->frequency / sample_rate);
742+ k = 1. / Q;
743+ a[0] = 1. / (1. + g * (g + k));
744+ a[1] = g * a[0];
745+ a[2] = g * a[1];
746+ m[0] = 1.;
747+ m[1] = -k;
748+ m[2] = -1.;
749+ break;
750+ case allpass:
751+ g = tan(M_PI * s->frequency / sample_rate);
752+ k = 1. / Q;
753+ a[0] = 1. / (1. + g * (g + k));
754+ a[1] = g * a[0];
755+ a[2] = g * a[1];
756+ m[0] = 1.;
757+ m[1] = -2. * k;
758+ m[2] = 0.;
759+ break;
760+ default:
761+ av_assert0(0);
762+ }
763+
764+ s->a0 = a[0];
765+ s->a1 = a[1];
766+ s->a2 = a[2];
767+ s->b0 = m[0];
768+ s->b1 = m[1];
769+ s->b2 = m[2];
770+}
771+
572772 static int config_filter(AVFilterLink *outlink, int reset)
573773 {
574774 AVFilterContext *ctx = outlink->src;
@@ -902,6 +1102,23 @@ static int config_filter(AVFilterLink *outlink, int reset) · 327 unmodified lines
9021102 default: av_assert0(0);
9031103 }
9041104 break;
1105+ case ZDF:
1106+ switch (inlink->format) {
1107+ case AV_SAMPLE_FMT_S16P:
1108+ s->filter = biquad_zdf_s16;
1109+ break;
1110+ case AV_SAMPLE_FMT_S32P:
1111+ s->filter = biquad_zdf_s32;
1112+ break;
1113+ case AV_SAMPLE_FMT_FLTP:
1114+ s->filter = biquad_zdf_flt;
1115+ break;
1116+ case AV_SAMPLE_FMT_DBLP:
1117+ s->filter = biquad_zdf_dbl;
1118+ break;
1119+ default: av_assert0(0);
1120+ }
1121+ break;
9051122 default:
9061123 av_assert0(0);
9071124 }
@@ -912,6 +1129,8 @@ static int config_filter(AVFilterLink *outlink, int reset) · 4 unmodified lines
9121129 convert_dir2latt(s);
9131130 else if (s->transform_type == SVF)
9141131 convert_dir2svf(s);
1132+ else if (s->transform_type == ZDF)
1133+ convert_dir2zdf(s, inlink->sample_rate);
9151134
9161135 return 0;
9171136 }
@@ -985,13 +1204,13 @@ static int filter_channel(AVFilterContext *ctx, void *arg, int jobnr, int nb_job · 67 unmodified lines
9851204 if (!s->block_samples) {
9861205 s->filter(s, buf->extended_data[ch], out_buf->extended_data[ch], buf->nb_samples,
9871206 &s->cache[ch].i1, &s->cache[ch].i2, &s->cache[ch].o1, &s->cache[ch].o2,
988− s->b0, s->b1, s->b2, s->a1, s->a2, &s->cache[ch].clippings, ctx->is_disabled);
1207+ s->b0, s->b1, s->b2, s->a0, s->a1, s->a2, &s->cache[ch].clippings, ctx->is_disabled);
9891208 } else {
9901209 memcpy(s->block[0]->extended_data[ch] + s->block_align * s->block_samples, buf->extended_data[ch],
9911210 buf->nb_samples * s->block_align);
9921211 s->filter(s, s->block[0]->extended_data[ch], s->block[1]->extended_data[ch], s->block_samples,
9931212 &s->cache[ch].i1, &s->cache[ch].i2, &s->cache[ch].o1, &s->cache[ch].o2,
994− s->b0, s->b1, s->b2, s->a1, s->a2, &s->cache[ch].clippings, ctx->is_disabled);
1213+ s->b0, s->b1, s->b2, s->a0, s->a1, s->a2, &s->cache[ch].clippings, ctx->is_disabled);
9951214 s->cache[ch].ri1 = s->cache[ch].i1;
9961215 s->cache[ch].ri2 = s->cache[ch].i2;
9971216 s->cache[ch].ro1 = s->cache[ch].o1;
@@ -1000,7 +1219,7 @@ static int filter_channel(AVFilterContext *ctx, void *arg, int jobnr, int nb_job · 2 unmodified lines
10001219 s->block[1]->extended_data[ch] + s->block_samples * s->block_align,
10011220 s->block_samples,
10021221 &s->cache[ch].ri1, &s->cache[ch].ri2, &s->cache[ch].ro1, &s->cache[ch].ro2,
1003− s->b0, s->b1, s->b2, s->a1, s->a2, &s->cache[ch].clippings, ctx->is_disabled);
1222+ s->b0, s->b1, s->b2, s->a0, s->a1, s->a2, &s->cache[ch].clippings, ctx->is_disabled);
10041223 reverse_samples(s->block[2], s->block[1], ch, 0, 0, s->block_samples * 2);
10051224 s->cache[ch].ri1 = 0.;
10061225 s->cache[ch].ri2 = 0.;
@@ -1008,7 +1227,7 @@ static int filter_channel(AVFilterContext *ctx, void *arg, int jobnr, int nb_job · 1 unmodified line
10081227 s->cache[ch].ro2 = 0.;
10091228 s->filter(s, s->block[2]->extended_data[ch], s->block[2]->extended_data[ch], s->block[2]->nb_samples,
10101229 &s->cache[ch].ri1, &s->cache[ch].ri2, &s->cache[ch].ro1, &s->cache[ch].ro2,
1011− s->b0, s->b1, s->b2, s->a1, s->a2, &s->cache[ch].clippings, ctx->is_disabled);
1230+ s->b0, s->b1, s->b2, s->a0, s->a1, s->a2, &s->cache[ch].clippings, ctx->is_disabled);
10121231 reverse_samples(out_buf, s->block[2], ch, 0, s->block_samples, out_buf->nb_samples);
10131232 memmove(s->block[0]->extended_data[ch], s->block[0]->extended_data[ch] + s->block_align * s->block_samples,
10141233 s->block_samples * s->block_align);
@@ -1197,6 +1416,7 @@ static const AVOption equalizer_options[] = { · 182 unmodified lines
11971416 {"tdii", "transposed direct form II", 0, AV_OPT_TYPE_CONST, {.i64=TDII}, 0, 0, AF, "transform_type"},
11981417 {"latt", "lattice-ladder form", 0, AV_OPT_TYPE_CONST, {.i64=LATT}, 0, 0, AF, "transform_type"},
11991418 {"svf", "state variable filter form", 0, AV_OPT_TYPE_CONST, {.i64=SVF}, 0, 0, AF, "transform_type"},
1419+ {"zdf", "zero-delay filter form", 0, AV_OPT_TYPE_CONST, {.i64=ZDF}, 0, 0, AF, "transform_type"},
12001420 {"precision", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"},
12011421 {"r", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"},
12021422 {"auto", "automatic", 0, AV_OPT_TYPE_CONST, {.i64=-1}, 0, 0, AF, "precision"},
@@ -1242,6 +1462,7 @@ static const AVOption bass_lowshelf_options[] = { · 39 unmodified lines
12421462 {"tdii", "transposed direct form II", 0, AV_OPT_TYPE_CONST, {.i64=TDII}, 0, 0, AF, "transform_type"},
12431463 {"latt", "lattice-ladder form", 0, AV_OPT_TYPE_CONST, {.i64=LATT}, 0, 0, AF, "transform_type"},
12441464 {"svf", "state variable filter form", 0, AV_OPT_TYPE_CONST, {.i64=SVF}, 0, 0, AF, "transform_type"},
1465+ {"zdf", "zero-delay filter form", 0, AV_OPT_TYPE_CONST, {.i64=ZDF}, 0, 0, AF, "transform_type"},
12451466 {"precision", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"},
12461467 {"r", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"},
12471468 {"auto", "automatic", 0, AV_OPT_TYPE_CONST, {.i64=-1}, 0, 0, AF, "precision"},
@@ -1294,6 +1515,7 @@ static const AVOption treble_highshelf_options[] = { · 46 unmodified lines
12941515 {"tdii", "transposed direct form II", 0, AV_OPT_TYPE_CONST, {.i64=TDII}, 0, 0, AF, "transform_type"},
12951516 {"latt", "lattice-ladder form", 0, AV_OPT_TYPE_CONST, {.i64=LATT}, 0, 0, AF, "transform_type"},
12961517 {"svf", "state variable filter form", 0, AV_OPT_TYPE_CONST, {.i64=SVF}, 0, 0, AF, "transform_type"},
1518+ {"zdf", "zero-delay filter form", 0, AV_OPT_TYPE_CONST, {.i64=ZDF}, 0, 0, AF, "transform_type"},
12971519 {"precision", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"},
12981520 {"r", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"},
12991521 {"auto", "automatic", 0, AV_OPT_TYPE_CONST, {.i64=-1}, 0, 0, AF, "precision"},
@@ -1345,6 +1567,7 @@ static const AVOption bandpass_options[] = { · 45 unmodified lines
13451567 {"tdii", "transposed direct form II", 0, AV_OPT_TYPE_CONST, {.i64=TDII}, 0, 0, AF, "transform_type"},
13461568 {"latt", "lattice-ladder form", 0, AV_OPT_TYPE_CONST, {.i64=LATT}, 0, 0, AF, "transform_type"},
13471569 {"svf", "state variable filter form", 0, AV_OPT_TYPE_CONST, {.i64=SVF}, 0, 0, AF, "transform_type"},
1570+ {"zdf", "zero-delay filter form", 0, AV_OPT_TYPE_CONST, {.i64=ZDF}, 0, 0, AF, "transform_type"},
13481571 {"precision", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"},
13491572 {"r", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"},
13501573 {"auto", "automatic", 0, AV_OPT_TYPE_CONST, {.i64=-1}, 0, 0, AF, "precision"},
@@ -1386,6 +1609,7 @@ static const AVOption bandreject_options[] = { · 35 unmodified lines
13861609 {"tdii", "transposed direct form II", 0, AV_OPT_TYPE_CONST, {.i64=TDII}, 0, 0, AF, "transform_type"},
13871610 {"latt", "lattice-ladder form", 0, AV_OPT_TYPE_CONST, {.i64=LATT}, 0, 0, AF, "transform_type"},
13881611 {"svf", "state variable filter form", 0, AV_OPT_TYPE_CONST, {.i64=SVF}, 0, 0, AF, "transform_type"},
1612+ {"zdf", "zero-delay filter form", 0, AV_OPT_TYPE_CONST, {.i64=ZDF}, 0, 0, AF, "transform_type"},
13891613 {"precision", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"},
13901614 {"r", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"},
13911615 {"auto", "automatic", 0, AV_OPT_TYPE_CONST, {.i64=-1}, 0, 0, AF, "precision"},
@@ -1429,6 +1653,7 @@ static const AVOption lowpass_options[] = { · 37 unmodified lines
14291653 {"tdii", "transposed direct form II", 0, AV_OPT_TYPE_CONST, {.i64=TDII}, 0, 0, AF, "transform_type"},
14301654 {"latt", "lattice-ladder form", 0, AV_OPT_TYPE_CONST, {.i64=LATT}, 0, 0, AF, "transform_type"},
14311655 {"svf", "state variable filter form", 0, AV_OPT_TYPE_CONST, {.i64=SVF}, 0, 0, AF, "transform_type"},
1656+ {"zdf", "zero-delay filter form", 0, AV_OPT_TYPE_CONST, {.i64=ZDF}, 0, 0, AF, "transform_type"},
14321657 {"precision", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"},
14331658 {"r", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"},
14341659 {"auto", "automatic", 0, AV_OPT_TYPE_CONST, {.i64=-1}, 0, 0, AF, "precision"},
@@ -1472,6 +1697,7 @@ static const AVOption highpass_options[] = { · 37 unmodified lines
14721697 {"tdii", "transposed direct form II", 0, AV_OPT_TYPE_CONST, {.i64=TDII}, 0, 0, AF, "transform_type"},
14731698 {"latt", "lattice-ladder form", 0, AV_OPT_TYPE_CONST, {.i64=LATT}, 0, 0, AF, "transform_type"},
14741699 {"svf", "state variable filter form", 0, AV_OPT_TYPE_CONST, {.i64=SVF}, 0, 0, AF, "transform_type"},
1700+ {"zdf", "zero-delay filter form", 0, AV_OPT_TYPE_CONST, {.i64=ZDF}, 0, 0, AF, "transform_type"},
14751701 {"precision", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"},
14761702 {"r", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"},
14771703 {"auto", "automatic", 0, AV_OPT_TYPE_CONST, {.i64=-1}, 0, 0, AF, "precision"},
@@ -1515,6 +1741,7 @@ static const AVOption allpass_options[] = { · 37 unmodified lines
15151741 {"tdii", "transposed direct form II", 0, AV_OPT_TYPE_CONST, {.i64=TDII}, 0, 0, AF, "transform_type"},
15161742 {"latt", "lattice-ladder form", 0, AV_OPT_TYPE_CONST, {.i64=LATT}, 0, 0, AF, "transform_type"},
15171743 {"svf", "state variable filter form", 0, AV_OPT_TYPE_CONST, {.i64=SVF}, 0, 0, AF, "transform_type"},
1744+ {"zdf", "zero-delay filter form", 0, AV_OPT_TYPE_CONST, {.i64=ZDF}, 0, 0, AF, "transform_type"},
15181745 {"precision", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"},
15191746 {"r", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"},
15201747 {"auto", "automatic", 0, AV_OPT_TYPE_CONST, {.i64=-1}, 0, 0, AF, "precision"},
@@ -1549,6 +1776,7 @@ static const AVOption biquad_options[] = { · 28 unmodified lines
15491776 {"tdii", "transposed direct form II", 0, AV_OPT_TYPE_CONST, {.i64=TDII}, 0, 0, AF, "transform_type"},
15501777 {"latt", "lattice-ladder form", 0, AV_OPT_TYPE_CONST, {.i64=LATT}, 0, 0, AF, "transform_type"},
15511778 {"svf", "state variable filter form", 0, AV_OPT_TYPE_CONST, {.i64=SVF}, 0, 0, AF, "transform_type"},
1779+ {"zdf", "zero-delay filter form", 0, AV_OPT_TYPE_CONST, {.i64=ZDF}, 0, 0, AF, "transform_type"},
15521780 {"precision", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"},
15531781 {"r", "set filtering precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=-1}, -1, 3, AF, "precision"},
15541782 {"auto", "automatic", 0, AV_OPT_TYPE_CONST, {.i64=-1}, 0, 0, AF, "precision"},

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t