mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
10l: reverse the biquad coefficients.
I did not notice that the filter implementation uses a reversed history state. Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
This commit is contained in:
parent
20ac9de3df
commit
98cfadd648
@ -137,15 +137,15 @@ static int biquad_init_coeffs(void *avc, struct FFIIRFilterCoeffs *c,
|
|||||||
|
|
||||||
if (filt_mode == FF_FILTER_MODE_HIGHPASS) {
|
if (filt_mode == FF_FILTER_MODE_HIGHPASS) {
|
||||||
c->gain = ((1.0 + cos_w0) / 2.0) / a0;
|
c->gain = ((1.0 + cos_w0) / 2.0) / a0;
|
||||||
x0 = (-(1.0 + cos_w0)) / a0;
|
x0 = ((1.0 + cos_w0) / 2.0) / a0;
|
||||||
x1 = ((1.0 + cos_w0) / 2.0) / a0;
|
x1 = (-(1.0 + cos_w0)) / a0;
|
||||||
} else { // FF_FILTER_MODE_LOWPASS
|
} else { // FF_FILTER_MODE_LOWPASS
|
||||||
c->gain = ((1.0 - cos_w0) / 2.0) / a0;
|
c->gain = ((1.0 - cos_w0) / 2.0) / a0;
|
||||||
x0 = (1.0 - cos_w0) / a0;
|
x0 = ((1.0 - cos_w0) / 2.0) / a0;
|
||||||
x1 = ((1.0 - cos_w0) / 2.0) / a0;
|
x1 = (1.0 - cos_w0) / a0;
|
||||||
}
|
}
|
||||||
c->cy[0] = (2.0 * cos_w0) / a0;
|
c->cy[0] = (-1.0 + (sin_w0 / 2.0)) / a0;
|
||||||
c->cy[1] = (-1.0 + (sin_w0 / 2.0)) / a0;
|
c->cy[1] = (2.0 * cos_w0) / a0;
|
||||||
|
|
||||||
// divide by gain to make the x coeffs integers.
|
// divide by gain to make the x coeffs integers.
|
||||||
// during filtering, the delay state will include the gain multiplication
|
// during filtering, the delay state will include the gain multiplication
|
||||||
|
Loading…
Reference in New Issue
Block a user