mirror of https://git.ffmpeg.org/ffmpeg.git
avfilter/af_acrossover: really fix single-pole allpass coefficients
Now LR2, LR6, LR10, LR14 and LR18 have really flat sum.
This commit is contained in:
parent
ea8c05a3e7
commit
68adb68e96
|
@ -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)
|
static void set_ap1(BiquadContext *b, double fc, double sr)
|
||||||
{
|
{
|
||||||
double omega = 0.5 * M_PI * fc / sr + M_PI_4;
|
double omega = M_PI * fc / sr;
|
||||||
double cosine = cos(omega);
|
|
||||||
double sine = sin(omega);
|
|
||||||
|
|
||||||
b->a1 = -cosine / sine;
|
b->a1 = exp(-omega);
|
||||||
b->a2 = 0.;
|
b->a2 = 0.;
|
||||||
b->b0 = -b->a1;
|
b->b0 = -b->a1;
|
||||||
b->b1 = 1.;
|
b->b1 = 1.;
|
||||||
|
|
Loading…
Reference in New Issue