mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 23:21:06 +01:00
avfilter/af_biquads: fix low/highshelf 'k' calculation
This commit is contained in:
parent
f912cefb83
commit
93b31dae1d
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue