[FFmpeg-cvslog] avfilter/af_biquads: fix low/highshelf 'k' calculation
Paul B Mahol
git at videolan.org
Fri May 27 10:37:56 EEST 2022
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri May 27 09:36:19 2022 +0200| [93b31dae1dec4c2b3e6c63a7e9f5b344b849126c] | committer: Paul B Mahol
avfilter/af_biquads: fix low/highshelf 'k' calculation
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=93b31dae1dec4c2b3e6c63a7e9f5b344b849126c
---
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 0687bc31e9..26cb4d49bb 100644
--- a/libavfilter/af_biquads.c
+++ b/libavfilter/af_biquads.c
@@ -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];
More information about the ffmpeg-cvslog
mailing list