iirfilter: fix biquad filter coefficients.
authorJustin Ruggles <justin.ruggles@gmail.com>
Mon, 6 Jun 2011 21:10:11 +0000 (17:10 -0400)
committerJustin Ruggles <justin.ruggles@gmail.com>
Tue, 7 Jun 2011 14:47:36 +0000 (10:47 -0400)
The current filter implementation should only have the cx coefficients
divided by gain in order to give the correct output scale.

libavcodec/iirfilter.c

index 98366e2..a942068 100644 (file)
@@ -151,8 +151,6 @@ static int biquad_init_coeffs(void *avc, struct FFIIRFilterCoeffs *c,
     // during filtering, the delay state will include the gain multiplication
     c->cx[0] = lrintf(x0 / c->gain);
     c->cx[1] = lrintf(x1 / c->gain);
-    c->cy[0] /= c->gain;
-    c->cy[1] /= c->gain;
 
     return 0;
 }