[FFmpeg-cvslog] avfilter/af_acrossover: split in correct spot

Paul B Mahol git at videolan.org
Sun Nov 29 11:54:38 EET 2020


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Nov 29 10:39:13 2020 +0100| [f194cedfe601fc839ce99a63e128ecd259e5d74f] | committer: Paul B Mahol

avfilter/af_acrossover: split in correct spot

Previously split was made in wrong (half of original) position.

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

 libavfilter/af_acrossover.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavfilter/af_acrossover.c b/libavfilter/af_acrossover.c
index b3827a9bdc..c52fb9fec9 100644
--- a/libavfilter/af_acrossover.c
+++ b/libavfilter/af_acrossover.c
@@ -167,7 +167,7 @@ static av_cold int init(AVFilterContext *ctx)
 
 static void set_lp(BiquadCoeffs *b, double fc, double q, double sr)
 {
-    double omega = M_PI * fc / sr;
+    double omega = 2. * M_PI * fc / sr;
     double cosine = cos(omega);
     double alpha = sin(omega) / (2. * q);
 
@@ -187,7 +187,7 @@ static void set_lp(BiquadCoeffs *b, double fc, double q, double sr)
 
 static void set_hp(BiquadCoeffs *b, double fc, double q, double sr)
 {
-    double omega = M_PI * fc / sr;
+    double omega = 2. * M_PI * fc / sr;
     double cosine = cos(omega);
     double alpha = sin(omega) / (2. * q);
 
@@ -207,7 +207,7 @@ static void set_hp(BiquadCoeffs *b, double fc, double q, double sr)
 
 static void set_ap(BiquadCoeffs *b, double fc, double q, double sr)
 {
-    double omega = M_PI * fc / sr;
+    double omega = 2. * M_PI * fc / sr;
     double cosine = cos(omega);
     double alpha = sin(omega) / (2. * q);
 
@@ -227,7 +227,7 @@ static void set_ap(BiquadCoeffs *b, double fc, double q, double sr)
 
 static void set_ap1(BiquadCoeffs *b, double fc, double sr)
 {
-    double omega = M_PI * fc / sr;
+    double omega = 2. * M_PI * fc / sr;
 
     b->a1 = exp(-omega);
     b->a2 = 0.;



More information about the ffmpeg-cvslog mailing list