SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
hbfiltertraits.cpp
Go to the documentation of this file.
1 // Copyright (C) 2016 F4EXB //
3 // written by Edouard Griffiths //
4 // //
5 // This program is free software; you can redistribute it and/or modify //
6 // it under the terms of the GNU General Public License as published by //
7 // the Free Software Foundation as version 3 of the License, or //
8 // (at your option) any later version. //
9 // //
10 // This program is distributed in the hope that it will be useful, //
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
13 // GNU General Public License V3 for more details. //
14 // //
15 // You should have received a copy of the GNU General Public License //
16 // along with this program. If not, see <http://www.gnu.org/licenses/>. //
18 
19 
20 #include "dsp/hbfiltertraits.h"
21 
23  15,16,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,0,1,2
24 };
25 
27  //* Firwin as in https://www.dsprelated.com/showcode/270.php */
28  (int32_t)(-0.0052391810630145274965685509016566356877 * (1 << hbShift)), // /190 => hbShift = 8
29  (int32_t)(0.0232111017863650750947535073009930783883 * (1 << hbShift)),
30  (int32_t)(-0.0761058457486735451258397233686991967261 * (1 << hbShift)),
31  (int32_t)(0.3076987787367443383246268240327481180429 * (1 << hbShift)),
32 };
33 
34 const double HBFIRFilterTraits<16>::hbCoeffsF[4] = {
35  -0.0052391810630145274965685509016566356877,
36  0.0232111017863650750947535073009930783883,
37  -0.0761058457486735451258397233686991967261,
38  0.3076987787367443383246268240327481180429,
39 };
40 
42  31,32,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19, 20,21,22,
43  23,24,25,26,27,28,29,30,31,32,0,1,2
44 };
45 
46 
48  //* Firwin as in https://www.dsprelated.com/showcode/270.php */
49  (int32_t)(-0.0018878783958199373254477348993418672762 * (1 << hbShift)), // ~1/529 => hbShift = 10
50  (int32_t)( 0.0038624783041994003966734805288751886110 * (1 << hbShift)),
51  (int32_t)(-0.0082424665965482504098593707908548822161 * (1 << hbShift)),
52  (int32_t)( 0.0159471139705940345709933581019868142903 * (1 << hbShift)),
53  (int32_t)(-0.0286765592339759019246958615667608682998 * (1 << hbShift)),
54  (int32_t)( 0.0507185615622293764492845014046906726435 * (1 << hbShift)),
55  (int32_t)(-0.0980159074728618323613105189906491432339 * (1 << hbShift)),
56  (int32_t)( 0.3159417644358786247948955860920250415802 * (1 << hbShift)),
57 
58 // (qint32)(-0.015956912844043127236437484839370881673 * (1 << hbShift)),
59 // (qint32)( 0.013023031678944928940522274274371739011 * (1 << hbShift)),
60 // (qint32)(-0.01866942273717486777684371190844103694 * (1 << hbShift)),
61 // (qint32)( 0.026550887571157304190005987720724078827 * (1 << hbShift)),
62 // (qint32)(-0.038350314277854319344740474662103224546 * (1 << hbShift)),
63 // (qint32)( 0.058429248652825838128421764849917963147 * (1 << hbShift)),
64 // (qint32)(-0.102889802028955756885153505209018476307 * (1 << hbShift)),
65 // (qint32)( 0.317237706405931241260276465254719369113 * (1 << hbShift))
66 };
67 
68 const double HBFIRFilterTraits<32>::hbCoeffsF[8] = {
69  -0.0018878783958199373254477348993418672762,
70  0.0038624783041994003966734805288751886110,
71  -0.0082424665965482504098593707908548822161,
72  0.0159471139705940345709933581019868142903,
73  -0.0286765592339759019246958615667608682998,
74  0.0507185615622293764492845014046906726435,
75  -0.0980159074728618323613105189906491432339,
76  0.3159417644358786247948955860920250415802,
77 };
78 
80  47,48,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,
81  24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,
82  47,48,0,1,2
83 };
84 
85 
87  //* Firwin as in https://www.dsprelated.com/showcode/270.php */
88  (int32_t)(-0.0011627994808655962074434020436797254661 * (1 << hbShift)), // ~1/859 => hbShift = 10
89  (int32_t)( 0.0017451165792459334517860991553561689216 * (1 << hbShift)),
90  (int32_t)(-0.0029357205890606303047563052643909031758 * (1 << hbShift)),
91  (int32_t)( 0.0048726090910227891003780875678330630763 * (1 << hbShift)),
92  (int32_t)(-0.0077313759655872928144848543752232217230 * (1 << hbShift)),
93  (int32_t)( 0.0117637971494846688830238079503942572046 * (1 << hbShift)),
94  (int32_t)(-0.0173810771817523163074170611253066454083 * (1 << hbShift)),
95  (int32_t)( 0.0253500636065296450216699497559602605179 * (1 << hbShift)),
96  (int32_t)(-0.0373266939135983855102551842719549313188 * (1 << hbShift)),
97  (int32_t)( 0.0576685041500848358242414803953579394147 * (1 << hbShift)),
98  (int32_t)(-0.1024912545928038654086122960507054813206 * (1 << hbShift)),
99  (int32_t)( 0.3173768238826674692454332671331940218806 * (1 << hbShift)),
100 
101 // (qint32)(-0.004102576237611492253332112767338912818 * (1 << hbShift)),
102 // (qint32)( 0.003950551047979387886410762575906119309 * (1 << hbShift)),
103 // (qint32)(-0.005807875789391703583164350277456833282 * (1 << hbShift)),
104 // (qint32)( 0.00823497890520805998770814682075069868 * (1 << hbShift)),
105 // (qint32)(-0.011372226513199541059195851744334504474 * (1 << hbShift)),
106 // (qint32)( 0.015471557140973646315984524335362948477 * (1 << hbShift)),
107 // (qint32)(-0.020944996398689276484450516591095947661 * (1 << hbShift)),
108 // (qint32)( 0.028568078132034283034279553703527199104 * (1 << hbShift)),
109 // (qint32)(-0.040015143905614086738964374490024056286 * (1 << hbShift)),
110 // (qint32)( 0.059669519431831075095828964549582451582 * (1 << hbShift)),
111 // (qint32)(-0.103669138691865420076609893840213771909 * (1 << hbShift)),
112 // (qint32)( 0.317491986549921390015072120149852707982 * (1 << hbShift))
113 };
114 
115 const double HBFIRFilterTraits<48>::hbCoeffsF[12] = {
116  -0.0011627994808655962074434020436797254661,
117  0.0017451165792459334517860991553561689216,
118  -0.0029357205890606303047563052643909031758,
119  0.0048726090910227891003780875678330630763,
120  -0.0077313759655872928144848543752232217230,
121  0.0117637971494846688830238079503942572046,
122  -0.0173810771817523163074170611253066454083,
123  0.0253500636065296450216699497559602605179,
124  -0.0373266939135983855102551842719549313188,
125  0.0576685041500848358242414803953579394147,
126  -0.1024912545928038654086122960507054813206,
127  0.3173768238826674692454332671331940218806,
128 };
129 
131  63,64,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,
132  24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,
133  47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,0,1,2
134 };
135 
136 
138  //* Remez as in https://www.dsprelated.com/showcode/270.php */
139  (int32_t)(-0.0004653050334792540416659067936677729449 * (1 << hbShift)), // ~1/2149 => hbShift = 12
140  (int32_t)( 0.0007120490624526883919470643391491648799 * (1 << hbShift)),
141  (int32_t)(-0.0012303473710125558716887983479182366864 * (1 << hbShift)),
142  (int32_t)( 0.0019716520179919017584369012041634050547 * (1 << hbShift)),
143  (int32_t)(-0.0029947484165425580261710170049127555103 * (1 << hbShift)),
144  (int32_t)( 0.0043703902150498061263128590780979720876 * (1 << hbShift)),
145  (int32_t)(-0.0061858352927315653213558022116558277048 * (1 << hbShift)),
146  (int32_t)( 0.0085554408639278121950777489246320328675 * (1 << hbShift)),
147  (int32_t)(-0.0116397924445187355563247066925214312505 * (1 << hbShift)),
148  (int32_t)( 0.0156852221106748394852115069397768820636 * (1 << hbShift)),
149  (int32_t)(-0.0211070832238078286147153761476147337817 * (1 << hbShift)),
150  (int32_t)( 0.0286850846890029896607554604770484729670 * (1 << hbShift)),
151  (int32_t)(-0.0400956173930921908055147184768429724500 * (1 << hbShift)),
152  (int32_t)( 0.0597215923200692666572564348825835622847 * (1 << hbShift)),
153  (int32_t)(-0.1036982054813635201195864965484361164272 * (1 << hbShift)),
154  (int32_t)( 0.3175014394028848885298543791577685624361 * (1 << hbShift)),
155 
156 // (qint32)(-0.001114417441601693505720538368564120901 * (1 << hbShift)),
157 // (qint32)( 0.001268007827185253051302527005361753254 * (1 << hbShift)),
158 // (qint32)(-0.001959831378850490895410230152151598304 * (1 << hbShift)),
159 // (qint32)( 0.002878308307661380308073439948657323839 * (1 << hbShift)),
160 // (qint32)(-0.004071361818258721100571850826099762344 * (1 << hbShift)),
161 // (qint32)( 0.005597288494657440618973431867289036745 * (1 << hbShift)),
162 // (qint32)(-0.007532345003308904551886371336877346039 * (1 << hbShift)),
163 // (qint32)( 0.009980346844667375288961963519795972388 * (1 << hbShift)),
164 // (qint32)(-0.013092614174300500062830820979797863401 * (1 << hbShift)),
165 // (qint32)( 0.01710934914871829748417297878404497169 * (1 << hbShift)),
166 // (qint32)(-0.022443558692997273018576720460259821266 * (1 << hbShift)),
167 // (qint32)( 0.029875811511593811098386197500076377764 * (1 << hbShift)),
168 // (qint32)(-0.041086352085710403647667021687084343284 * (1 << hbShift)),
169 // (qint32)( 0.060465467462665789533104998554335907102 * (1 << hbShift)),
170 // (qint32)(-0.104159517495977321788203084906854201108 * (1 << hbShift)),
171 // (qint32)( 0.317657589850154464805598308885237202048 * (1 << hbShift)),
172 };
173 
174 const float HBFIRFilterTraits<64>::hbCoeffsF[16] = {
175  -0.0004653050334792540416659067936677729449,
176  0.0007120490624526883919470643391491648799,
177  -0.0012303473710125558716887983479182366864,
178  0.0019716520179919017584369012041634050547,
179  -0.0029947484165425580261710170049127555103,
180  0.0043703902150498061263128590780979720876,
181  -0.0061858352927315653213558022116558277048,
182  0.0085554408639278121950777489246320328675,
183  -0.0116397924445187355563247066925214312505,
184  0.0156852221106748394852115069397768820636,
185  -0.0211070832238078286147153761476147337817,
186  0.0286850846890029896607554604770484729670,
187  -0.0400956173930921908055147184768429724500,
188  0.0597215923200692666572564348825835622847,
189  -0.1036982054813635201195864965484361164272,
190  0.3175014394028848885298543791577685624361,
191 };
192 
194  79,80,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,
195  24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,
196  47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,
197  70,71,72,73,74,75,76,77,78,79,80,0,1,2
198 };
199 
200 
202  //* Remez as in https://www.dsprelated.com/showcode/270.php */
203  (int32_t)(-0.0001054430663706784843331246137587697831 * (1 << hbShift)), // ~1/9483 => hbShift = 14
204  (int32_t)( 0.0001895717826405601933066613629108587702 * (1 << hbShift)),
205  (int32_t)(-0.0003519516996893227891822497621632237497 * (1 << hbShift)),
206  (int32_t)( 0.0005975111594421821190753485453228677216 * (1 << hbShift)),
207  (int32_t)(-0.0009524124279789792160699768430731637636 * (1 << hbShift)),
208  (int32_t)( 0.0014474605824692796454677967687985074008 * (1 << hbShift)),
209  (int32_t)(-0.0021186428821101787461911314380813564640 * (1 << hbShift)),
210  (int32_t)( 0.0030082068742630901220236339099756150972 * (1 << hbShift)),
211  (int32_t)(-0.0041664004891296358909502650647027621744 * (1 << hbShift)),
212  (int32_t)( 0.0056547140936428538088298623165428580251 * (1 << hbShift)),
213  (int32_t)(-0.0075518323360079901707120342280177283101 * (1 << hbShift)),
214  (int32_t)( 0.0099644038858163180155669280679830990266 * (1 << hbShift)),
215  (int32_t)(-0.0130470841719700410971105597468522319105 * (1 << hbShift)),
216  (int32_t)( 0.0170422818715445859028001507340377429500 * (1 << hbShift)),
217  (int32_t)(-0.0223637819225956900603957677731159492396 * (1 << hbShift)),
218  (int32_t)( 0.0297925991327811050257690084208661573939 * (1 << hbShift)),
219  (int32_t)(-0.0410092859102263174175817539435229264200 * (1 << hbShift)),
220  (int32_t)( 0.0604034694948822267757115866970707429573 * (1 << hbShift)),
221  (int32_t)(-0.1041194584045879306666293473426776472479 * (1 << hbShift)),
222  (int32_t)( 0.3176437752925042046214798574510496109724 * (1 << hbShift)),
223 };
224 
225 const double HBFIRFilterTraits<80>::hbCoeffsF[20] = {
226  -0.0001054430663706784843331246137587697831, // ~1/9483 => hbShift = 14
227  0.0001895717826405601933066613629108587702,
228  -0.0003519516996893227891822497621632237497,
229  0.0005975111594421821190753485453228677216,
230  -0.0009524124279789792160699768430731637636,
231  0.0014474605824692796454677967687985074008,
232  -0.0021186428821101787461911314380813564640,
233  0.0030082068742630901220236339099756150972,
234  -0.0041664004891296358909502650647027621744,
235  0.0056547140936428538088298623165428580251,
236  -0.0075518323360079901707120342280177283101,
237  0.0099644038858163180155669280679830990266,
238  -0.0130470841719700410971105597468522319105,
239  0.0170422818715445859028001507340377429500,
240  -0.0223637819225956900603957677731159492396,
241  0.0297925991327811050257690084208661573939,
242  -0.0410092859102263174175817539435229264200,
243  0.0604034694948822267757115866970707429573,
244  -0.1041194584045879306666293473426776472479,
245  0.3176437752925042046214798574510496109724,
246 };
247 
249  95,96,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,
250  24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,
251  47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,
252  70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,
253  93,94,95,96,0,1,2
254 };
255 
256 
258  //* Remez as in https://www.dsprelated.com/showcode/270.php */
259  (int32_t)(-0.0000243052463317893968695708462046667364 * (1 << hbShift)), // 1/41143 => hbShift = 16
260  (int32_t)( 0.0000503567741519847557611806732058568059 * (1 << hbShift)),
261  (int32_t)(-0.0001002354600628052128195172310043403741 * (1 << hbShift)),
262  (int32_t)( 0.0001801275832684542921834081052878673290 * (1 << hbShift)),
263  (int32_t)(-0.0003014864432246496970743687704441526876 * (1 << hbShift)),
264  (int32_t)( 0.0004783148860127731604417744559754055445 * (1 << hbShift)),
265  (int32_t)(-0.0007274200147704492930983422027679807798 * (1 << hbShift)),
266  (int32_t)( 0.0010686503612886001472748187524075547117 * (1 << hbShift)),
267  (int32_t)(-0.0015251456116906108098629779590282851132 * (1 << hbShift)),
268  (int32_t)( 0.0021238131085570461677181075543785482296 * (1 << hbShift)),
269  (int32_t)(-0.0028960654265650425873146467381502588978 * (1 << hbShift)),
270  (int32_t)( 0.0038789688077727475616629515542399531114 * (1 << hbShift)),
271  (int32_t)(-0.0051173875903961539915454359572777320864 * (1 << hbShift)),
272  (int32_t)( 0.0066675444490017317031305132957186287967 * (1 << hbShift)),
273  (int32_t)(-0.0086031967328669932404405784609480178915 * (1 << hbShift)),
274  (int32_t)( 0.0110268456349653827530676863943881471641 * (1 << hbShift)),
275  (int32_t)(-0.0140900919878225727721599014330422505736 * (1 << hbShift)),
276  (int32_t)( 0.0180336055419063577553995258995200856589 * (1 << hbShift)),
277  (int32_t)(-0.0232708957455770061584221508610426099040 * (1 << hbShift)),
278  (int32_t)( 0.0305843805330435619671547442521841730922 * (1 << hbShift)),
279  (int32_t)(-0.0416576245224431485070226699463091790676 * (1 << hbShift)),
280  (int32_t)( 0.0608846679850302968661779345893592108041 * (1 << hbShift)),
281  (int32_t)(-0.1044156487571061137087369274922821205109 * (1 << hbShift)),
282  (int32_t)( 0.3177437550265513332981015537370694801211 * (1 << hbShift)),
283 };
284 
285 const double HBFIRFilterTraits<96>::hbCoeffsF[24] = {
286  -0.0000243052463317893968695708462046667364,
287  0.0000503567741519847557611806732058568059,
288  -0.0001002354600628052128195172310043403741,
289  0.0001801275832684542921834081052878673290,
290  -0.0003014864432246496970743687704441526876,
291  0.0004783148860127731604417744559754055445,
292  -0.0007274200147704492930983422027679807798,
293  0.0010686503612886001472748187524075547117,
294  -0.0015251456116906108098629779590282851132,
295  0.0021238131085570461677181075543785482296,
296  -0.0028960654265650425873146467381502588978,
297  0.0038789688077727475616629515542399531114,
298  -0.0051173875903961539915454359572777320864,
299  0.0066675444490017317031305132957186287967,
300  -0.0086031967328669932404405784609480178915,
301  0.0110268456349653827530676863943881471641,
302  -0.0140900919878225727721599014330422505736,
303  0.0180336055419063577553995258995200856589,
304  -0.0232708957455770061584221508610426099040,
305  0.0305843805330435619671547442521841730922,
306  -0.0416576245224431485070226699463091790676,
307  0.0608846679850302968661779345893592108041,
308  -0.1044156487571061137087369274922821205109,
309  0.3177437550265513332981015537370694801211,
310 };
311 
312 const int16_t HBFIRFilterTraits<112>::hbMod[112+6] = {
313  111,112,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,
314  24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,
315  47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,
316  70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,
317  93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,
318  112,0,1,2
319 };
320 
321 
323  //* Remez as in https://www.dsprelated.com/showcode/270.php */
324  (int32_t)(-0.0000057182612173497993884982611156875265 * (1 << hbShift)), // ~1/174878 => hbShift = 18
325  (int32_t)( 0.0000134089330475142792093150995169636985 * (1 << hbShift)),
326  (int32_t)(-0.0000285019056923813186876261183133607346 * (1 << hbShift)),
327  (int32_t)( 0.0000540489980941085909355720007241075109 * (1 << hbShift)),
328  (int32_t)(-0.0000947833751586818473982426480617391462 * (1 << hbShift)),
329  (int32_t)( 0.0001567867952902222809536542103003853299 * (1 << hbShift)),
330  (int32_t)(-0.0002476681450895876299839182266282477940 * (1 << hbShift)),
331  (int32_t)( 0.0003767405865262860096935593201550318554 * (1 << hbShift)),
332  (int32_t)(-0.0005551920408570068304551781146471967077 * (1 << hbShift)),
333  (int32_t)( 0.0007962529081739059839267769191906154447 * (1 << hbShift)),
334  (int32_t)(-0.0011153731476064448775026294313761354715 * (1 << hbShift)),
335  (int32_t)( 0.0015304714714705458088878087252737714152 * (1 << hbShift)),
336  (int32_t)(-0.0020622467141092528514212389723070373293 * (1 << hbShift)),
337  (int32_t)( 0.0027347048425079849461039049884902851772 * (1 << hbShift)),
338  (int32_t)(-0.0035759786171320282616159502708796935622 * (1 << hbShift)),
339  (int32_t)( 0.0046196952795832949348331375460929848487 * (1 << hbShift)),
340  (int32_t)(-0.0059072308383088713984454543037827534135 * (1 << hbShift)),
341  (int32_t)( 0.0074914857942512255370437479484735376900 * (1 << hbShift)),
342  (int32_t)(-0.0094433233524672671732602680094714742154 * (1 << hbShift)),
343  (int32_t)( 0.0118628557280401076418074879370578855742 * (1 << hbShift)),
344  (int32_t)(-0.0149000865720731560937206694461565348320 * (1 << hbShift)),
345  (int32_t)( 0.0187949228094094408780811988890491193160 * (1 << hbShift)),
346  (int32_t)(-0.0239611153097040799342387629167205886915 * (1 << hbShift)),
347  (int32_t)( 0.0311823240686547251132587632582726655528 * (1 << hbShift)),
348  (int32_t)(-0.0421443341867254184229807378869736567140 * (1 << hbShift)),
349  (int32_t)( 0.0612443342926724393349147135268140118569 * (1 << hbShift)),
350  (int32_t)(-0.1046363792986205604185201423206308390945 * (1 << hbShift)),
351  (int32_t)( 0.3178181645034457436516106554336147382855 * (1 << hbShift)),
352 };
353 
354 const double HBFIRFilterTraits<112>::hbCoeffsF[28] = {
355  -0.0000057182612173497993884982611156875265,
356  0.0000134089330475142792093150995169636985,
357  -0.0000285019056923813186876261183133607346,
358  0.0000540489980941085909355720007241075109,
359  -0.0000947833751586818473982426480617391462,
360  0.0001567867952902222809536542103003853299,
361  -0.0002476681450895876299839182266282477940,
362  0.0003767405865262860096935593201550318554,
363  -0.0005551920408570068304551781146471967077,
364  0.0007962529081739059839267769191906154447,
365  -0.0011153731476064448775026294313761354715,
366  0.0015304714714705458088878087252737714152,
367  -0.0020622467141092528514212389723070373293,
368  0.0027347048425079849461039049884902851772,
369  -0.0035759786171320282616159502708796935622,
370  0.0046196952795832949348331375460929848487,
371  -0.0059072308383088713984454543037827534135,
372  0.0074914857942512255370437479484735376900,
373  -0.0094433233524672671732602680094714742154,
374  0.0118628557280401076418074879370578855742,
375  -0.0149000865720731560937206694461565348320,
376  0.0187949228094094408780811988890491193160,
377  -0.0239611153097040799342387629167205886915,
378  0.0311823240686547251132587632582726655528,
379  -0.0421443341867254184229807378869736567140,
380  0.0612443342926724393349147135268140118569,
381  -0.1046363792986205604185201423206308390945,
382  0.3178181645034457436516106554336147382855,
383 };
384 
385 const int16_t HBFIRFilterTraits<128>::hbMod[128+6] = {
386  127,128,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,
387  24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,
388  47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,
389  70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,
390  93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,
391  112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,0,1,2
392 };
393 
394 
396  //* Remez as in https://www.dsprelated.com/showcode/270.php */
397  (int32_t)(-0.0000013530084481063586964138655693856705 * (1 << hbShift)), // ~1/739098 => hbShift = 20
398  (int32_t)( 0.0000035468835939308468221931557040615957 * (1 << hbShift)),
399  (int32_t)(-0.0000080263259193852748679242486984364291 * (1 << hbShift)),
400  (int32_t)( 0.0000160249362715262112246382419922241525 * (1 << hbShift)),
401  (int32_t)(-0.0000293930772937943995460653712203935584 * (1 << hbShift)),
402  (int32_t)( 0.0000506245785103059592661099708177374623 * (1 << hbShift)),
403  (int32_t)(-0.0000829848508757281692112955928664064231 * (1 << hbShift)),
404  (int32_t)( 0.0001306421953216197048494584542766006052 * (1 << hbShift)),
405  (int32_t)(-0.0001988007175677746298826653603697423023 * (1 << hbShift)),
406  (int32_t)( 0.0002938302746977689504891129157471141298 * (1 << hbShift)),
407  (int32_t)(-0.0004233934809845499216279796073081342911 * (1 << hbShift)),
408  (int32_t)( 0.0005965709177428588560684885599982862914 * (1 << hbShift)),
409  (int32_t)(-0.0008239883872841064762701512869114139903 * (1 << hbShift)),
410  (int32_t)( 0.0011179618447797630680778935285957231827 * (1 << hbShift)),
411  (int32_t)(-0.0014926744261021872121897313689942166093 * (1 << hbShift)),
412  (int32_t)( 0.0019644262679035678388628216595179765136 * (1 << hbShift)),
413  (int32_t)(-0.0025520032927806384458191413244776413194 * (1 << hbShift)),
414  (int32_t)( 0.0032772538071471992750238744207536001340 * (1 << hbShift)),
415  (int32_t)(-0.0041660018952565701713663948169141804101 * (1 << hbShift)),
416  (int32_t)( 0.0052495120038521464814196271220225753495 * (1 << hbShift)),
417  (int32_t)(-0.0065668614662222155736737150277804175857 * (1 << hbShift)),
418  (int32_t)( 0.0081688408784787811672822854802689107601 * (1 << hbShift)),
419  (int32_t)(-0.0101245136956070701239607245724982931279 * (1 << hbShift)),
420  (int32_t)( 0.0125326183062810583845880785247572930530 * (1 << hbShift)),
421  (int32_t)(-0.0155423066893098579810406079104723175988 * (1 << hbShift)),
422  (int32_t)( 0.0193932322698959942741669948418348212726 * (1 << hbShift)),
423  (int32_t)(-0.0244995384963461564076236953724219347350 * (1 << hbShift)),
424  (int32_t)( 0.0316459368298866380864176051090908003971 * (1 << hbShift)),
425  (int32_t)(-0.0425198999626832385700936356442980468273 * (1 << hbShift)),
426  (int32_t)( 0.0615208850123762293615747864805598510429 * (1 << hbShift)),
427  (int32_t)(-0.1048057030317238041972061068918264936656 * (1 << hbShift)),
428  (int32_t)( 0.3178751792920155860855402352171950042248 * (1 << hbShift)),
429 };
430 
431 const double HBFIRFilterTraits<128>::hbCoeffsF[32] = {
432  //* Remez as in https://www.dsprelated.com/showcode/270.php */
433  -0.0000013530084481063586964138655693856705, // ~1/739098 => hbShift = 20
434  0.0000035468835939308468221931557040615957,
435  -0.0000080263259193852748679242486984364291,
436  0.0000160249362715262112246382419922241525,
437  -0.0000293930772937943995460653712203935584,
438  0.0000506245785103059592661099708177374623,
439  -0.0000829848508757281692112955928664064231,
440  0.0001306421953216197048494584542766006052,
441  -0.0001988007175677746298826653603697423023,
442  0.0002938302746977689504891129157471141298,
443  -0.0004233934809845499216279796073081342911,
444  0.0005965709177428588560684885599982862914,
445  -0.0008239883872841064762701512869114139903,
446  0.0011179618447797630680778935285957231827,
447  -0.0014926744261021872121897313689942166093,
448  0.0019644262679035678388628216595179765136,
449  -0.0025520032927806384458191413244776413194,
450  0.0032772538071471992750238744207536001340,
451  -0.0041660018952565701713663948169141804101,
452  0.0052495120038521464814196271220225753495,
453  -0.0065668614662222155736737150277804175857,
454  0.0081688408784787811672822854802689107601,
455  -0.0101245136956070701239607245724982931279,
456  0.0125326183062810583845880785247572930530,
457  -0.0155423066893098579810406079104723175988,
458  0.0193932322698959942741669948418348212726,
459  -0.0244995384963461564076236953724219347350,
460  0.0316459368298866380864176051090908003971,
461  -0.0425198999626832385700936356442980468273,
462  0.0615208850123762293615747864805598510429,
463  -0.1048057030317238041972061068918264936656,
464  0.3178751792920155860855402352171950042248,
465 };
466 
467 
short int16_t
Definition: rtptypes_win.h:43
int int32_t
Definition: rtptypes_win.h:45