-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfilter.h
43 lines (40 loc) · 4.25 KB
/
filter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* FIR polyphase filter coefs */
#define PFIRSZ 91
#define FIRLEN ((PFIRSZ-1)/3)
const static float zCoef[PFIRSZ] = {
0.00011531169903949103, -0.000047796088218874284, -0.0001814031505924209, -0.00039992432983169095, -0.0006596583370030032,
-0.0011008279924583071, -0.0009853692031785324, -0.0007770798991236011, -0.00024185411365957758, 0.0005218962796111535,
0.001685993230879008, 0.0018898499977811876, 0.0018200668377591795, 0.0009871752712286553, -0.0004588476660566669,
-0.002694033314884264, -0.00350302953346837, -0.003751905639581275, -0.002539580515093401, -0.000042389934932404475,
0.003865527448273767, 0.005867202602944082, 0.0068575585310144925, 0.005298743953549785, 0.0013139002562382784,
-0.005097137756428803, -0.009252615713784487, -0.011746404026769134, -0.010036948781363788, -0.00397600295766527,
0.006259223326510233, 0.01433001954630984, 0.01988327125488691, 0.018646187075539375, 0.009563683982538871,
-0.007215095761854727, -0.023415109990717806, -0.0364385793601381, -0.03830866974046933, -0.024434870243299107,
0.00784356695667104, 0.051012144342450744, 0.10168656244864546, 0.1484143235403162, 0.1814456104579968,
0.1919374342363347,
0.1814456104579968, 0.1484143235403162, 0.10168656244864546, 0.051012144342450744, 0.00784356695667104,
-0.024434870243299107, -0.03830866974046933, -0.0364385793601381, -0.023415109990717806, -0.007215095761854727,
0.009563683982538871, 0.018646187075539375, 0.01988327125488691, 0.01433001954630984, 0.006259223326510233,
-0.00397600295766527, -0.010036948781363788, -0.011746404026769134, -0.009252615713784487, -0.005097137756428803,
0.0013139002562382784, 0.005298743953549785, 0.0068575585310144925, 0.005867202602944082, 0.003865527448273767,
-0.000042389934932404475, -0.002539580515093401, -0.003751905639581275, -0.00350302953346837, -0.002694033314884264,
-0.0004588476660566669, 0.0009871752712286553, 0.0018200668377591795, 0.0018898499977811876, 0.001685993230879008,
0.0005218962796111535, -0.00024185411365957758, -0.0007770798991236011, -0.0009853692031785324, -0.0011008279924583071,
-0.0006596583370030032, -0.00039992432983169095, -0.0001814031505924209, -0.000047796088218874284, 0.00011531169903949103
};
const uint32_t hbfsz[8] = {3,3,3,5,5,7,9,13};
const double hbfilter[8][32]={
{ 0.24995723856654292, 0.49991014065802347, 0.24995723856654292, 0.24995723856654292, 0.49991014065802347, 0.24995723856654292 },
{ 0.24982904347198642, 0.49964075009446846, 0.24982904347198642, 0.24982904347198642, 0.49964075009446846, 0.24982904347198642 },
{ 0.24931759748447950, 0.49856599193780340, 0.24931759748447950, 0.24931759748447950, 0.49856599193780340, 0.24931759748447950 },
{ 0.05968894368803268, 0.2501388426961336, 0.38088701426882043, 0.2501388426961336, 0.05968894368803268,
0.05968894368803268, 0.2501388426961336, 0.38088701426882043, 0.2501388426961336, 0.05968894368803268 },
{ 0.05988819090626456, 0.2505559881722098, 0.381284402697305, 0.2505559881722098, 0.05988819090626456,
0.05988819090626456, 0.2505559881722098, 0.381284402697305, 0.2505559881722098, 0.05988819090626456 },
{ -0.027927171054675654, 0.008264934046470855, 0.27821053017263203, 0.48406419909643106, 0.27821053017263203, 0.008264934046470855, -0.027927171054675654,
-0.027927171054675654, 0.008264934046470855, 0.27821053017263203, 0.48406419909643106, 0.27821053017263203, 0.008264934046470855, -0.027927171054675654 },
{ -0.01294023472957459, -0.03479865419330619, 0.0447465197578069, 0.28455009858469293, 0.4359132041368942, 0.28455009858469293, 0.0447465197578069, -0.03479865419330619, -0.01294023472957459,
-0.01294023472957459, -0.03479865419330619, 0.0447465197578069, 0.28455009858469293, 0.4359132041368942, 0.28455009858469293, 0.0447465197578069, -0.03479865419330619, -0.01294023472957459 },
{ 0.005690697106193996, 0.01145333652623816, -0.019409772887540092, -0.0619892019939379, 0.0347291944665908, 0.3004168449318583, 0.45781152111406354, 0.3004168449318583, 0.0347291944665908, -0.0619892019939379, -0.019409772887540092, 0.01145333652623816, 0.005690697106193996,
0.005690697106193996, 0.01145333652623816, -0.019409772887540092, -0.0619892019939379, 0.0347291944665908, 0.3004168449318583, 0.45781152111406354, 0.3004168449318583, 0.0347291944665908, -0.0619892019939379, -0.019409772887540092, 0.01145333652623816, 0.005690697106193996 }
} ;