ffmpeg | branch: master | Paul B Mahol <[email protected]> | Thu Dec 17 15:12:40 
2020 +0100| [1eb751955ed0aa40f58f21e6ca7d6a1f5f74e1aa] | committer: Paul B Mahol

avfilter/af_biquads: fix error in ro calculation

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1eb751955ed0aa40f58f21e6ca7d6a1f5f74e1aa
---

 libavfilter/af_biquads.c | 4 ++--
 1 file 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;

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to