Commit d295b6b6 authored by Paul B Mahol's avatar Paul B Mahol

avfilter: fix highshelf zdf coefficients

parent e35dfe86
......@@ -238,7 +238,7 @@ static int fn(filter_channels)(AVFilterContext *ctx, void *arg, int jobnr, int n
break;
case 2:
k = itqfactor;
g = fg / SQRT(gain);
g = fg * SQRT(gain);
fa[0] = ONE / (ONE + g * (g + k));
fa[1] = g * fa[0];
......
......@@ -722,7 +722,7 @@ static void convert_dir2zdf(BiquadsContext *s, int sample_rate)
case treble:
case highshelf:
A = ff_exp10(s->gain / 40.);
g = tan(M_PI * s->frequency / sample_rate) / sqrt(A);
g = tan(M_PI * s->frequency / sample_rate) * sqrt(A);
k = 1. / Q;
a[0] = 1. / (1. + g * (g + k));
a[1] = g * a[0];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment