/* IIR Decimation filter for rate 3 Copyright (C) 2002 Jussi Laako This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifdef _MSC_VER #pragma warning(disable:4305) #endif /* f1: 0.1625, f2: 0.16667, r: 0.1, a: 96, t: elliptic */ /*static const long lDec3IIRSize = 9l; static const float fpDec3IIRCoeffs[][5] = { { // 0 0.0553592475772217, 0.058373986304096, 0.0553592475772217, 1.41200440567841, -0.581096887136946 }, { // 1 0.194732981262029, -0.0044378628822179, 0.194732981262029, 1.3080501174319, -0.693078217073741 }, { // 2 0.414789892503207, -0.228226012897661, 0.414789892503207, 1.20397555745957, -0.805329329568326 }, { // 3 0.62790544256367, -0.496800997404192, 0.62790544256367, 1.12828496567778, -0.887294853400925 }, { // 4 0.782669104604529, -0.70875361724853, 0.782669104604529, 1.08176961753189, -0.938354209492414 }, { // 5 0.877774458641298, -0.843788971512166, 0.877774458641298, 1.05612809645174, -0.967888042222167 }, { // 6 0.929803490904114, -0.918599848170477, 0.929803490904114, 1.04384280350973, -0.984849937147478 }, { // 7 0.953764494039992, -0.952548243134686, 0.953764494039992, 1.04058369517249, -0.995564440117791 }, { // 8 0.135482390020302, 0.135482390020302, 0, 0.729035219959397, 0 } }; static const double dpDec3IIRCoeffs[][5] = { { // 0 0.0553592475772217, 0.058373986304096, 0.0553592475772217, 1.41200440567841, -0.581096887136946 }, { // 1 0.194732981262029, -0.0044378628822179, 0.194732981262029, 1.3080501174319, -0.693078217073741 }, { // 2 0.414789892503207, -0.228226012897661, 0.414789892503207, 1.20397555745957, -0.805329329568326 }, { // 3 0.62790544256367, -0.496800997404192, 0.62790544256367, 1.12828496567778, -0.887294853400925 }, { // 4 0.782669104604529, -0.70875361724853, 0.782669104604529, 1.08176961753189, -0.938354209492414 }, { // 5 0.877774458641298, -0.843788971512166, 0.877774458641298, 1.05612809645174, -0.967888042222167 }, { // 6 0.929803490904114, -0.918599848170477, 0.929803490904114, 1.04384280350973, -0.984849937147478 }, { // 7 0.953764494039992, -0.952548243134686, 0.953764494039992, 1.04058369517249, -0.995564440117791 }, { // 8 0.135482390020302, 0.135482390020302, 0, 0.729035219959397, 0 } };*/ /* f1: 0.1625, f2: 0.16667, r: 0.1, a: 120, t: elliptic */ static const long lDec3IIRSize = 10l; static const float fpDec3IIRCoeffs[][5] = { { // 0 0.0195383874094136, 0.034709168326835, 0.0195383874094136, 1.52205680882593, -0.595842751971593 }, { // 1 0.0775083098356501, 0.0541083468341002, 0.0775083098356501, 1.44727914242865, -0.656404108934051 }, { // 2 0.215809128218758, -0.0245140773417836, 0.215809128218758, 1.33791094096574, -0.745015120061473 }, { // 3 0.406997186244864, -0.220384854604817, 0.406997186244864, 1.23493107901914, -0.828540596904051 }, { // 4 0.593321044027043, -0.451562255861173, 0.593321044027043, 1.15692017679011, -0.89200000898302 }, { // 5 0.739192079066588, -0.648281378458115, 0.739192079066588, 1.10471555556931, -0.934818335244372 }, { // 6 0.838926614711538, -0.788347948422064, 0.838926614711538, 1.07243308238359, -0.961938363384599 }, { // 7 0.901213028872304, -0.877551640777216, 0.901213028872304, 1.05384328046346, -0.978717697430855 }, { // 8 0.936888707969357, -0.9289095464048, 0.936888707969357, 1.044465973685, -0.989333843218918 }, { // 9 0.954070918585919, -0.953184503752558, 0.954070918585919, 1.04180879307493, -0.996766126494216 } }; static const double dpDec3IIRCoeffs[][5] = { { // 0 0.0195383874094136, 0.034709168326835, 0.0195383874094136, 1.52205680882593, -0.595842751971593 }, { // 1 0.0775083098356501, 0.0541083468341002, 0.0775083098356501, 1.44727914242865, -0.656404108934051 }, { // 2 0.215809128218758, -0.0245140773417836, 0.215809128218758, 1.33791094096574, -0.745015120061473 }, { // 3 0.406997186244864, -0.220384854604817, 0.406997186244864, 1.23493107901914, -0.828540596904051 }, { // 4 0.593321044027043, -0.451562255861173, 0.593321044027043, 1.15692017679011, -0.89200000898302 }, { // 5 0.739192079066588, -0.648281378458115, 0.739192079066588, 1.10471555556931, -0.934818335244372 }, { // 6 0.838926614711538, -0.788347948422064, 0.838926614711538, 1.07243308238359, -0.961938363384599 }, { // 7 0.901213028872304, -0.877551640777216, 0.901213028872304, 1.05384328046346, -0.978717697430855 }, { // 8 0.936888707969357, -0.9289095464048, 0.936888707969357, 1.044465973685, -0.989333843218918 }, { // 9 0.954070918585919, -0.953184503752558, 0.954070918585919, 1.04180879307493, -0.996766126494216 } };