aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-12-17 15:12:40 +0100
committerPaul B Mahol <onemda@gmail.com>2020-12-17 15:13:42 +0100
commit1eb751955ed0aa40f58f21e6ca7d6a1f5f74e1aa (patch)
tree0717cca695b28db72687a8a755bcd0b34988280e
parent331858d0f68324edd17307eee2dcae1abfd5d302 (diff)
downloadffmpeg-1eb751955ed0aa40f58f21e6ca7d6a1f5f74e1aa.tar.gz
avfilter/af_biquads: fix error in ro calculation
-rw-r--r--libavfilter/af_biquads.c4
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;