summaryrefslogtreecommitdiff
path: root/libavfilter
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-11-28 14:37:06 +0100
committerPaul B Mahol <onemda@gmail.com>2020-11-28 14:53:17 +0100
commit68adb68e96e6ec9003e0601251b8103624088174 (patch)
treedf0d32b99bf9b8270d142fe986e4ec8450aed652 /libavfilter
parentea8c05a3e73d2c69e02fc1c72ad3800d61c96ae6 (diff)
avfilter/af_acrossover: really fix single-pole allpass coefficients
Now LR2, LR6, LR10, LR14 and LR18 have really flat sum.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/af_acrossover.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/libavfilter/af_acrossover.c b/libavfilter/af_acrossover.c
index f989ac81d9..33a0812c9f 100644
--- a/libavfilter/af_acrossover.c
+++ b/libavfilter/af_acrossover.c
@@ -211,11 +211,9 @@ static void set_ap(BiquadContext *b, double fc, double q, double sr)
static void set_ap1(BiquadContext *b, double fc, double sr)
{
- double omega = 0.5 * M_PI * fc / sr + M_PI_4;
- double cosine = cos(omega);
- double sine = sin(omega);
+ double omega = M_PI * fc / sr;
- b->a1 = -cosine / sine;
+ b->a1 = exp(-omega);
b->a2 = 0.;
b->b0 = -b->a1;
b->b1 = 1.;