aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-04-30 11:44:48 +0200
committerPaul B Mahol <onemda@gmail.com>2020-04-30 12:18:36 +0200
commit0ec61fcff71d212b616660a6e93d856ef1849466 (patch)
treed375ea1f6d230ca3ca3f4c9aa156726f40c8f411
parentc7d8082357965bfd02bc3a8ba6867b36119d2895 (diff)
downloadffmpeg-0ec61fcff71d212b616660a6e93d856ef1849466.tar.gz
avfilter/af_crossfeed: fix calculation of alpha parameter
Use A in calculation.
-rw-r--r--libavfilter/af_crossfeed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/af_crossfeed.c b/libavfilter/af_crossfeed.c
index c819ca59a7..f1bbb357ba 100644
--- a/libavfilter/af_crossfeed.c
+++ b/libavfilter/af_crossfeed.c
@@ -62,7 +62,7 @@ static int config_input(AVFilterLink *inlink)
double w0 = 2 * M_PI * (1. - s->range) * 2100 / inlink->sample_rate;
double alpha;
- alpha = sin(w0) / 2 * sqrt(2 * (1 / 0.5 - 1) + 2);
+ alpha = sin(w0) / 2 * sqrt((A + 1 / A) * (1 / 0.5 - 1) + 2);
s->a0 = (A + 1) + (A - 1) * cos(w0) + 2 * sqrt(A) * alpha;
s->a1 = -2 * ((A - 1) + (A + 1) * cos(w0));