/* IIR Decimation filter for rate 3 (highpass) 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.33333, f2: 0.36667, r: 0.1, a: 96, t: chebyshev */ static const long lDec3hpIIRSize = 10l; static const float fpDec3hpIIRCoeffs[][5] = { { // 0 0.165659780429826, -0.331319560859653, 0.165659780429826, -1.32082211727018, -0.983461238989489 }, { // 1 0.155731136244846, -0.311462272489693, 0.155731136244846, -1.32827931359428, -0.951203858573669 }, { // 2 0.139427805667894, -0.278855611335789, 0.139427805667894, -1.36236989687593, -0.92008111954751 }, { // 3 0.117953815091953, -0.235907630183906, 0.117953815091953, -1.41849366916396, -0.890308929531773 }, { // 4 0.0930095426315344, -0.186019085263069, 0.0930095426315344, -1.4903302676734, -0.86236843819954 }, { // 5 0.0668186078603916, -0.133637215720783, 0.0668186078603916, -1.56977415648028, -0.837048587921845 }, { // 6 0.0420495608397998, -0.0840991216795996, 0.0420495608397998, -1.64722173560865, -0.815419978967847 }, { // 7 0.0215688056338112, -0.0431376112676223, 0.0215688056338112, -1.7124397602221, -0.79871498275735 }, { // 8 0.00801312960521743, -0.0160262592104349, 0.00801312960521743, -1.7560600728404, -0.788112591261268 }, { // 9 0.057147595912789, -0.057147595912789, 0, -0.885704808174422, 0 } }; static const double dpDec3hpIIRCoeffs[][5] = { { // 0 0.165659780429826, -0.331319560859653, 0.165659780429826, -1.32082211727018, -0.983461238989489 }, { // 1 0.155731136244846, -0.311462272489693, 0.155731136244846, -1.32827931359428, -0.951203858573669 }, { // 2 0.139427805667894, -0.278855611335789, 0.139427805667894, -1.36236989687593, -0.92008111954751 }, { // 3 0.117953815091953, -0.235907630183906, 0.117953815091953, -1.41849366916396, -0.890308929531773 }, { // 4 0.0930095426315344, -0.186019085263069, 0.0930095426315344, -1.4903302676734, -0.86236843819954 }, { // 5 0.0668186078603916, -0.133637215720783, 0.0668186078603916, -1.56977415648028, -0.837048587921845 }, { // 6 0.0420495608397998, -0.0840991216795996, 0.0420495608397998, -1.64722173560865, -0.815419978967847 }, { // 7 0.0215688056338112, -0.0431376112676223, 0.0215688056338112, -1.7124397602221, -0.79871498275735 }, { // 8 0.00801312960521743, -0.0160262592104349, 0.00801312960521743, -1.7560600728404, -0.788112591261268 }, { // 9 0.057147595912789, -0.057147595912789, 0, -0.885704808174422, 0 } }; /* f1: 0.33333, f2: 0.35, r: 0.1, a: 96, t: chebyshev */ /*static const long lDec3hpIIRSize = 14l; static const float fpDec3hpIIRCoeffs[][5] = { { // 0 0.20612381560143, -0.41224763120286, 0.20612381560143, -1.16655653140295, -0.991051793808671 }, { // 1 0.199956923120078, -0.399913846240156, 0.199956923120078, -1.17353927246339, -0.973366964943707 }, { // 2 0.189687762426555, -0.379375524853111, 0.189687762426555, -1.19717435026578, -0.955925399971997 }, { // 3 0.175623636079266, -0.351247272158532, 0.175623636079266, -1.2362163802201, -0.938710924537166 }, { // 4 0.158198347032725, -0.316396694065451, 0.158198347032725, -1.28896470202014, -0.921758090151041 }, { // 5 0.138000902722861, -0.276001805445722, 0.138000902722861, -1.35316505184281, -0.905168662734252 }, { // 6 0.115803473284191, -0.231606946568382, 0.115803473284191, -1.4259115081258, -0.889125401262565 }, { // 7 0.0925789944055267, -0.185157988811053, 0.0925789944055267, -1.50358434370774, -0.873900321329847 }, { // 8 0.0694962089224376, -0.138992417844875, 0.0694962089224376, -1.58186857525216, -0.859853410941906 }, { // 9 0.0478793602979917, -0.0957587205959835, 0.0478793602979917, -1.65589991979591, -0.847417360987876 }, { // 10 0.0291234398087895, -0.0582468796175789, 0.0291234398087895, -1.72057137841201, -0.837065137647169 }, { // 11 0.0145655023994335, -0.0291310047988669, 0.0145655023994335, -1.77099876568531, -0.829260775283047 }, { // 12 0.00532730800397217, -0.0106546160079443, 0.00532730800397217, -1.8030900620617, -0.824399294077589 }, { // 13 0.0464728891735737, -0.0464728891735737, 0, -0.907054221652853, 0 } }; static const double dpDec3hpIIRCoeffs[][5] = { { // 0 0.20612381560143, -0.41224763120286, 0.20612381560143, -1.16655653140295, -0.991051793808671 }, { // 1 0.199956923120078, -0.399913846240156, 0.199956923120078, -1.17353927246339, -0.973366964943707 }, { // 2 0.189687762426555, -0.379375524853111, 0.189687762426555, -1.19717435026578, -0.955925399971997 }, { // 3 0.175623636079266, -0.351247272158532, 0.175623636079266, -1.2362163802201, -0.938710924537166 }, { // 4 0.158198347032725, -0.316396694065451, 0.158198347032725, -1.28896470202014, -0.921758090151041 }, { // 5 0.138000902722861, -0.276001805445722, 0.138000902722861, -1.35316505184281, -0.905168662734252 }, { // 6 0.115803473284191, -0.231606946568382, 0.115803473284191, -1.4259115081258, -0.889125401262565 }, { // 7 0.0925789944055267, -0.185157988811053, 0.0925789944055267, -1.50358434370774, -0.873900321329847 }, { // 8 0.0694962089224376, -0.138992417844875, 0.0694962089224376, -1.58186857525216, -0.859853410941906 }, { // 9 0.0478793602979917, -0.0957587205959835, 0.0478793602979917, -1.65589991979591, -0.847417360987876 }, { // 10 0.0291234398087895, -0.0582468796175789, 0.0291234398087895, -1.72057137841201, -0.837065137647169 }, { // 11 0.0145655023994335, -0.0291310047988669, 0.0145655023994335, -1.77099876568531, -0.829260775283047 }, { // 12 0.00532730800397217, -0.0106546160079443, 0.00532730800397217, -1.8030900620617, -0.824399294077589 }, { // 13 0.0464728891735737, -0.0464728891735737, 0, -0.907054221652853, 0 } };*/