diff options
author | Paul B Mahol <onemda@gmail.com> | 2020-12-17 15:12:40 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2020-12-17 15:13:42 +0100 |
commit | 1eb751955ed0aa40f58f21e6ca7d6a1f5f74e1aa (patch) | |
tree | 0717cca695b28db72687a8a755bcd0b34988280e | |
parent | 331858d0f68324edd17307eee2dcae1abfd5d302 (diff) | |
download | ffmpeg-1eb751955ed0aa40f58f21e6ca7d6a1f5f74e1aa.tar.gz |
avfilter/af_biquads: fix error in ro calculation
-rw-r--r-- | libavfilter/af_biquads.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/af_biquads.c b/libavfilter/af_biquads.c index 6e1da52fb3..92e711bc4f 100644 --- a/libavfilter/af_biquads.c +++ b/libavfilter/af_biquads.c @@ -516,7 +516,7 @@ static int config_filter(AVFilterLink *outlink, int reset) case lowshelf: if (s->poles == 1) { double A = ff_exp10(s->gain / 20); - double ro = -sin(w0 / 2. - M_PI_4 / (sin(w0 / 2. + M_PI_4))); + double ro = -sin(w0 / 2. - M_PI_4) / sin(w0 / 2. + M_PI_4); double n = (A + 1) / (A - 1); double alpha1 = A == 1. ? 0. : n - FFSIGN(n) * sqrt(n * n - 1); double beta0 = ((1 + A) + (1 - A) * alpha1) * 0.5; @@ -542,7 +542,7 @@ static int config_filter(AVFilterLink *outlink, int reset) case highshelf: if (s->poles == 1) { double A = ff_exp10(s->gain / 20); - double ro = sin(w0 / 2. - M_PI_4 / (sin(w0 / 2. + M_PI_4))); + double ro = sin(w0 / 2. - M_PI_4) / sin(w0 / 2. + M_PI_4); double n = (A + 1) / (A - 1); double alpha1 = A == 1. ? 0. : n - FFSIGN(n) * sqrt(n * n - 1); double beta0 = ((1 + A) + (1 - A) * alpha1) * 0.5; |