audiofx: Use most common convention for definitions of IIR filter coefficients.
authorLeo Singer <leo.singer@ligo.org>
Wed, 20 Oct 2010 09:17:43 +0000 (02:17 -0700)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 11 Jan 2012 14:24:00 +0000 (15:24 +0100)
commit56353e24d2f404269c7662eb4549b4c58b449d49
tree3ed9264de32b53c5b60744930396c2b91375757c
parente3c8c4f8b0af4120131eb7b80babd7124c77efa8
audiofx: Use most common convention for definitions of IIR filter coefficients.

Most signal processing texts, including MATLAB, use the following convention for IIR filter coefficients:

a_0 y[n] + a_1 y[n-1] + ... + a_M y[n-M] = b_0 x[n] + b_1 x[n-1] + ... + b[N] x[n-N]

Usually, a_0 is set to 1 because the coefficients can always be rescaled, giving

y[n] = b_0 x[n] + b_1 x[n-1] + ... + b[N] x[n-N] - a_1 y[n-1] - ... - a_M y[n-M]

The convention that was previously used by audiofxbaseiirfilter and derived class had the a and b coefficients swapped, and did not have the minus signs.

This change makes the audiofx plugin use the more common convention described above.
gst/audiofx/audiochebband.c
gst/audiofx/audiocheblimit.c
gst/audiofx/audiofxbaseiirfilter.c
gst/audiofx/audioiirfilter.c
tests/check/elements/audioiirfilter.c