avfilter/af_biquads: fix low/highshelf 'k' calculation
This commit is contained in:
parent
f912cefb83
commit
93b31dae1d
@ -690,7 +690,7 @@ static void convert_dir2zdf(BiquadsContext *s, int sample_rate)
|
||||
case lowshelf:
|
||||
A = ff_exp10(s->gain / 40.);
|
||||
g = tan(M_PI * s->frequency / sample_rate) / sqrt(A);
|
||||
k = 1. / (Q * A);
|
||||
k = 1. / Q;
|
||||
a[0] = 1. / (1. + g * (g + k));
|
||||
a[1] = g * a[0];
|
||||
a[2] = g * a[1];
|
||||
@ -702,7 +702,7 @@ static void convert_dir2zdf(BiquadsContext *s, int sample_rate)
|
||||
case highshelf:
|
||||
A = ff_exp10(s->gain / 40.);
|
||||
g = tan(M_PI * s->frequency / sample_rate) / sqrt(A);
|
||||
k = 1. / (Q * A);
|
||||
k = 1. / Q;
|
||||
a[0] = 1. / (1. + g * (g + k));
|
||||
a[1] = g * a[0];
|
||||
a[2] = g * a[1];
|
||||
|
Loading…
x
Reference in New Issue
Block a user