mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
iirfilter: fix biquad filter coefficients.
The current filter implementation should only have the cx coefficients divided by gain in order to give the correct output scale.
This commit is contained in:
parent
edeb56fa31
commit
2f37321abc
@ -151,8 +151,6 @@ static int biquad_init_coeffs(void *avc, struct FFIIRFilterCoeffs *c,
|
|||||||
// during filtering, the delay state will include the gain multiplication
|
// during filtering, the delay state will include the gain multiplication
|
||||||
c->cx[0] = lrintf(x0 / c->gain);
|
c->cx[0] = lrintf(x0 / c->gain);
|
||||||
c->cx[1] = lrintf(x1 / c->gain);
|
c->cx[1] = lrintf(x1 / c->gain);
|
||||||
c->cy[0] /= c->gain;
|
|
||||||
c->cy[1] /= c->gain;
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user