📄 dec3iir.h
字号:
/* 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.15, f2: 0.16667, r: 0.5, a: 72, t: chebyshev *//*static const long lDec3IIRSize = 10l;static const float fpDec3IIRCoeffs[][5] = {{ // 0 0.205234253514393, 0.410468507028786, 0.205234253514393, 1.16785413526889, -0.988791149326458},{ // 1 0.195102566174706, 0.390205132349413, 0.195102566174706, 1.18627805084895, -0.966688315547777},{ // 2 0.177737827687996, 0.355475655375992, 0.177737827687996, 1.23399160039572, -0.944942911147706},{ // 3 0.154099624689978, 0.308199249379955, 0.154099624689978, 1.30720250542069, -0.923601004180597},{ // 4 0.12565595909824, 0.251311918196479, 0.12565595909824, 1.40028694844756, -0.90291078484052},{ // 5 0.0945035087026048, 0.18900701740521, 0.0945035087026048, 1.50536508729511, -0.883379122105524},{ // 6 0.0634071813715804, 0.126814362743161, 0.0634071813715804, 1.61216230556321, -0.865791031049534},{ // 7 0.0356575599864075, 0.071315119972815, 0.0356575599864075, 1.70852981180808, -0.851160051753707},{ // 8 0.0146679323911365, 0.0293358647822729, 0.0146679323911365, 1.7819124197207, -0.840584149285245},{ // 9 0.00333345430283358, 0.00666690860566716, 0.00333345430283358, 1.8216827274188, -0.835016544630132}};static const double dpDec3IIRCoeffs[][5] = {{ // 0 0.205234253514393, 0.410468507028786, 0.205234253514393, 1.16785413526889, -0.988791149326458},{ // 1 0.195102566174706, 0.390205132349413, 0.195102566174706, 1.18627805084895, -0.966688315547777},{ // 2 0.177737827687996, 0.355475655375992, 0.177737827687996, 1.23399160039572, -0.944942911147706},{ // 3 0.154099624689978, 0.308199249379955, 0.154099624689978, 1.30720250542069, -0.923601004180597},{ // 4 0.12565595909824, 0.251311918196479, 0.12565595909824, 1.40028694844756, -0.90291078484052},{ // 5 0.0945035087026048, 0.18900701740521, 0.0945035087026048, 1.50536508729511, -0.883379122105524},{ // 6 0.0634071813715804, 0.126814362743161, 0.0634071813715804, 1.61216230556321, -0.865791031049534},{ // 7 0.0356575599864075, 0.071315119972815, 0.0356575599864075, 1.70852981180808, -0.851160051753707},{ // 8 0.0146679323911365, 0.0293358647822729, 0.0146679323911365, 1.7819124197207, -0.840584149285245},{ // 9 0.00333345430283358, 0.00666690860566716, 0.00333345430283358, 1.8216827274188, -0.835016544630132}};*//* f1: 0.15833, f2: 0.16667, r: 0.5, a: 72, t: chebyshev */static const long lDec3IIRSize = 15l;static const float fpDec3IIRCoeffs[][5] = {{ // 0 0.227183883925248, 0.454367767850496, 0.227183883925248, 1.08572205416117, -0.994457589862163},{ // 1 0.221855994774946, 0.443711989549892, 0.221855994774946, 1.09601764367747, -0.98344162277725},{ // 2 0.212592980776955, 0.42518596155391, 0.212592980776955, 1.12211197854359, -0.972483901651414},{ // 3 0.199595930973311, 0.399191861946622, 0.199595930973311, 1.16317567449588, -0.961559398389121},{ // 4 0.18316075471287, 0.36632150942574, 0.18316075471287, 1.21802616326257, -0.950669182114051},{ // 5 0.163705706179478, 0.327411412358956, 0.163705706179478, 1.28502740000074, -0.939850224718655},{ // 6 0.141802351572512, 0.283604703145023, 0.141802351572512, 1.3619755269643, -0.92918493325435},{ // 7 0.118203876466788, 0.236407752933576, 0.118203876466788, 1.44599372092249, -0.918809226789646},{ // 8 0.093861773484246, 0.187723546968492, 0.093861773484246, 1.53347004284834, -0.908917136785328},{ // 9 0.0699194945061142, 0.139838989012228, 0.0699194945061142, 1.62008122059117, -0.899759198615628},{ // 10 0.0476712502362917, 0.0953425004725834, 0.0476712502362917, 1.7009467375224, -0.89163173846757},{ // 11 0.0284778725711403, 0.0569557451422807, 0.0284778725711403, 1.77094358324009, -0.884855073524649},{ // 12 0.0136409510384993, 0.0272819020769987, 0.0136409510384993, 1.8251771922945, -0.879740996448497},{ // 13 0.00425040107325392, 0.00850080214650783, 0.00425040107325392, 1.85955186596461, -0.876553470257628},{ // 14 0.0321672139532161, 0.0321672139532161, 0, 0.935665572093568, 0}};static const double dpDec3IIRCoeffs[][5] = {{ // 0 0.227183883925248, 0.454367767850496, 0.227183883925248, 1.08572205416117, -0.994457589862163},{ // 1 0.221855994774946, 0.443711989549892, 0.221855994774946, 1.09601764367747, -0.98344162277725},{ // 2 0.212592980776955, 0.42518596155391, 0.212592980776955, 1.12211197854359, -0.972483901651414},{ // 3 0.199595930973311, 0.399191861946622, 0.199595930973311, 1.16317567449588, -0.961559398389121},{ // 4 0.18316075471287, 0.36632150942574, 0.18316075471287, 1.21802616326257, -0.950669182114051},{ // 5 0.163705706179478, 0.327411412358956, 0.163705706179478, 1.28502740000074, -0.939850224718655},{ // 6 0.141802351572512, 0.283604703145023, 0.141802351572512, 1.3619755269643, -0.92918493325435},{ // 7 0.118203876466788, 0.236407752933576, 0.118203876466788, 1.44599372092249, -0.918809226789646},{ // 8 0.093861773484246, 0.187723546968492, 0.093861773484246, 1.53347004284834, -0.908917136785328},{ // 9 0.0699194945061142, 0.139838989012228, 0.0699194945061142, 1.62008122059117, -0.899759198615628},{ // 10 0.0476712502362917, 0.0953425004725834, 0.0476712502362917, 1.7009467375224, -0.89163173846757},{ // 11 0.0284778725711403, 0.0569557451422807, 0.0284778725711403, 1.77094358324009, -0.884855073524649},{ // 12 0.0136409510384993, 0.0272819020769987, 0.0136409510384993, 1.8251771922945, -0.879740996448497},{ // 13 0.00425040107325392, 0.00850080214650783, 0.00425040107325392, 1.85955186596461, -0.876553470257628},{ // 14 0.0321672139532161, 0.0321672139532161, 0, 0.935665572093568, 0}};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -