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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
ix!();
impl crate::HalfRateFilterSSE {
pub fn load_steep_coefficients(&mut self, order: usize) {
match order {
12 => self.load_steep_rejection104db_tband0_01(),
10 => self.load_steep_rejection86db_tband0_01(),
8 => self.load_steep_rejection69db_tband0_01(),
6 => self.load_steep_rejection51db_tband0_01(),
4 => self.load_steep_rejection53db_tband0_05(),
2 => self.load_steep_rejection36db_tband0_1(),
_ => unreachable!(),
}
}
pub fn load_steep_rejection104db_tband0_01(&mut self) {
let mut a_coefficients: [f64; 6] =
[
0.036681502163648017,
0.2746317593794541,
0.5610989697879195,
0.769741833862266,
0.8922608180038789,
0.962094548378084
];
let mut b_coefficients: [f64; 6] = [
0.13654762463195771,
0.42313861743656667,
0.6775400499741616,
0.839889624849638,
0.9315419599631839,
0.9878163707328971
];
unsafe {
self.store_coefficients(
a_coefficients.as_mut_ptr(),
b_coefficients.as_mut_ptr());
}
}
pub fn load_steep_rejection86db_tband0_01(&mut self) {
let mut a_coefficients: [f64; 5] = [
0.051457617441190984,
0.35978656070567017,
0.6725475931034693,
0.8590884928249939,
0.9540209867860787
];
let mut b_coefficients: [f64; 5] = [
0.18621906251989334,
0.529951372847964,
0.7810257527489514,
0.9141815687605308,
0.985475023014907
];
unsafe {
self.store_coefficients(
a_coefficients.as_mut_ptr(),
b_coefficients.as_mut_ptr());
}
}
pub fn load_steep_rejection69db_tband0_01(&mut self) {
let mut a_coefficients: [f64; 4] = [
0.07711507983241622,
0.4820706250610472,
0.7968204713315797,
0.9412514277740471
];
let mut b_coefficients: [f64; 4] = [
0.2659685265210946,
0.6651041532634957,
0.8841015085506159,
0.9820054141886075
];
unsafe {
self.store_coefficients(
a_coefficients.as_mut_ptr(),
b_coefficients.as_mut_ptr());
}
}
pub fn load_steep_rejection51db_tband0_01(&mut self) {
let mut a_coefficients: [f64; 3] = [
0.1271414136264853,
0.6528245886369117,
0.9176942834328115
];
let mut b_coefficients: [f64; 3] = [
0.40056789819445626,
0.8204163891923343,
0.9763114515836773
];
unsafe {
self.store_coefficients(
a_coefficients.as_mut_ptr(),
b_coefficients.as_mut_ptr());
}
}
pub fn load_steep_rejection53db_tband0_05(&mut self) {
let mut a_coefficients: [f64; 2] = [
0.12073211751675449,
0.6632020224193995
];
let mut b_coefficients: [f64; 2] = [
0.3903621872345006,
0.890786832653497
];
unsafe {
self.store_coefficients(
a_coefficients.as_mut_ptr(),
b_coefficients.as_mut_ptr());
}
}
pub fn load_steep_rejection36db_tband0_1(&mut self) {
let mut a_coefficients: [f64; 1] = [ 0.23647102099689224 ];
let mut b_coefficients: [f64; 1] = [ 0.7145421497126001 ];
unsafe {
self.store_coefficients(
a_coefficients.as_mut_ptr(),
b_coefficients.as_mut_ptr());
}
}
}