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.
interpolatorsif.h
Go to the documentation of this file.
1 // Copyright (C) 2019 Edouard Griffiths, F4EXB //
3 // //
4 // This program is free software; you can redistribute it and/or modify //
5 // it under the terms of the GNU General Public License as published by //
6 // the Free Software Foundation as version 3 of the License, or //
7 // (at your option) any later version. //
8 // //
9 // This program is distributed in the hope that it will be useful, //
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
12 // GNU General Public License V3 for more details. //
13 // //
14 // You should have received a copy of the GNU General Public License //
15 // along with this program. If not, see <http://www.gnu.org/licenses/>. //
17 
18 #ifndef INCLUDE_SDRBASE_DSP_INTERPOLATORSIF_H_
19 #define INCLUDE_SDRBASE_DSP_INTERPOLATORSIF_H_
20 
21 #include "dsp/dsptypes.h"
22 #ifdef USE_SSE4_1
24 #else
26 #endif
27 
28 #define INTERPOLATORS_HB_FILTER_ORDER_FIRST 64
29 #define INTERPOLATORS_HB_FILTER_ORDER_SECOND 32
30 #define INTERPOLATORS_HB_FILTER_ORDER_NEXT 16
31 
32 template<uint OutBits, uint InBits>
34 {
35  static constexpr float post1 = 1.0f;
36  static const uint pre2 = 0;
37  static constexpr float post2 = 1.0f;
38  static const uint pre4 = 0;
39  static constexpr float post4 = 1.0f;
40  static const uint pre8 = 0;
41  static constexpr float post8 = 1.0f;
42  static const uint pre16 = 0;
43  static constexpr float post16 = 1.0f;
44  static const uint pre32 = 0;
45  static constexpr float post32 = 1.0f;
46  static const uint pre64 = 0;
47  static constexpr float post64 = 1.0f;
48 };
49 
50 template<>
52 {
53  static constexpr float post1 = (1<<0)*32768.0f;
54  static const uint pre2 = 1;
55  static constexpr float post2 = (1<<1)*32768.0f;
56  static const uint pre4 = 2;
57  static constexpr float post4 = (1<<2)*32768.0f;
58  static const uint pre8 = 3;
59  static constexpr float post8 = (1<<3)*32768.0f;
60  static const uint pre16 = 3;
61  static constexpr float post16 = (1<<3)*32768.0f;
62  static const uint pre32 = 3;
63  static constexpr float post32 = (1<<3)*32768.0f;
64  static const uint pre64 = 3;
65  static constexpr float post64 = (1<<3)*32768.0f;
66 };
67 
68 template<>
69 struct interpolation_shifts_float<16, 12> // never used, just an example
70 {
71  static constexpr float post1 = (1<<4)*2048.0f;
72  static const uint pre2 = 1;
73  static constexpr float post2 = (1<<5)*2048.0f;
74  static const uint pre4 = 2;
75  static constexpr float post4 = (1<<6)*2048.0f;
76  static const uint pre8 = 3;
77  static constexpr float post8 = (1<<7)*2048.0f;
78  static const uint pre16 = 3;
79  static constexpr float post16 = (1<<7)*2048.0f;
80  static const uint pre32 = 3;
81  static constexpr float post32 = (1<<7)*2048.0f;
82  static const uint pre64 = 3;
83  static constexpr float post64 = (1<<7)*2048.0f;
84 };
85 
86 template<uint OutBits, uint InBits>
88 {
89 public:
90  // interleaved I/Q input buffer
91  void interpolate1(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ = false);
92 
93  void interpolate2_cen(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ = false);
94  void interpolate2_inf(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ = false);
95  void interpolate2_sup(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ = false);
96 
97  void interpolate4_cen(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ = false);
98  void interpolate4_inf(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ = false);
99  void interpolate4_sup(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ = false);
100 
101  void interpolate8_cen(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ = false);
102  void interpolate8_inf(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ = false);
103  void interpolate8_sup(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ = false);
104 
105  void interpolate16_cen(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ = false);
106  void interpolate16_inf(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ = false);
107  void interpolate16_sup(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ = false);
108 
109  void interpolate32_cen(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ = false);
110  void interpolate32_inf(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ = false);
111  void interpolate32_sup(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ = false);
112 
113  void interpolate64_cen(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ = false);
114  void interpolate64_inf(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ = false);
115  void interpolate64_sup(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ = false);
116 
117 private:
118 #ifdef USE_SSE4_1
119  IntHalfbandFilterEO1<INTERPOLATORS_HB_FILTER_ORDER_FIRST> m_interpolator2; // 1st stages
121  IntHalfbandFilterEO1<INTERPOLATORS_HB_FILTER_ORDER_NEXT> m_interpolator8; // 3rd stages
122  IntHalfbandFilterEO1<INTERPOLATORS_HB_FILTER_ORDER_NEXT> m_interpolator16; // 4th stages
123  IntHalfbandFilterEO1<INTERPOLATORS_HB_FILTER_ORDER_NEXT> m_interpolator32; // 5th stages
124  IntHalfbandFilterEO1<INTERPOLATORS_HB_FILTER_ORDER_NEXT> m_interpolator64; // 6th stages
125 #else
132 #endif
133 };
134 
135 template<uint OutBits, uint InBits>
136 void InterpolatorsIF<OutBits, InBits>::interpolate1(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ)
137 {
138  if (invertIQ)
139  {
140  for (int pos = 0; pos < len - 1; pos += 2)
141  {
142  buf[pos+1] = (**it).m_real / interpolation_shifts<OutBits, InBits>::post1;
143  buf[pos+0] = (**it).m_imag / interpolation_shifts<OutBits, InBits>::post1;
144  ++(*it);
145  }
146  }
147  else
148  {
149  for (int pos = 0; pos < len - 1; pos += 2)
150  {
151  buf[pos+0] = (**it).m_real / interpolation_shifts<OutBits, InBits>::post1;
152  buf[pos+1] = (**it).m_imag / interpolation_shifts<OutBits, InBits>::post1;
153  ++(*it);
154  }
155  }
156 }
157 
158 template<uint OutBits, uint InBits>
159 void InterpolatorsIF<OutBits, InBits>::interpolate2_cen(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ)
160 {
161  qint32 intbuf[4];
162  qint32 *bufI, *bufQ;
163 
164  if (invertIQ)
165  {
166  bufI = &intbuf[1];
167  bufQ = &intbuf[0];
168  }
169  else
170  {
171  bufI = &intbuf[0];
172  bufQ = &intbuf[1];
173  }
174 
175  for (int pos = 0; pos < len - 3; pos += 4)
176  {
177  *bufI = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre2;
178  *bufQ = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre2;
179 // intbuf[2] = 0;
180 // intbuf[3] = 0;
181 
182  m_interpolator2.myInterpolate(&intbuf[0], &intbuf[1], &intbuf[2], &intbuf[3]);
183 
184  buf[pos+0] = (float) (intbuf[0] / interpolation_shifts<OutBits, InBits>::post2);
185  buf[pos+1] = (float) (intbuf[1] / interpolation_shifts<OutBits, InBits>::post2);
186  buf[pos+2] = (float) (intbuf[2] / interpolation_shifts<OutBits, InBits>::post2);
187  buf[pos+3] = (float) (intbuf[3] / interpolation_shifts<OutBits, InBits>::post2);
188 
189  ++(*it);
190  }
191 }
192 
193 template<uint OutBits, uint InBits>
194 void InterpolatorsIF<OutBits, InBits>::interpolate2_inf(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ)
195 {
196  qint32 intbuf[8];
197  qint32 *bufI0, *bufQ0, *bufI1, *bufQ1;
198 
199  if (invertIQ)
200  {
201  bufI0 = &intbuf[1];
202  bufQ0 = &intbuf[0];
203  bufI1 = &intbuf[5];
204  bufQ1 = &intbuf[4];
205  }
206  else
207  {
208  bufI0 = &intbuf[0];
209  bufQ0 = &intbuf[1];
210  bufI1 = &intbuf[4];
211  bufQ1 = &intbuf[5];
212  }
213 
214  for (int pos = 0; pos < len - 7; pos += 8)
215  {
216  memset(intbuf, 0, 8*sizeof(qint32));
217 
218  *bufI0 = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre2;
219  *bufQ0 = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre2;
220  ++(*it);
221  *bufI1 = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre2;
222  *bufQ1 = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre2;
223  ++(*it);
224 
225  m_interpolator2.myInterpolateInf(&intbuf[0], &intbuf[1], &intbuf[2], &intbuf[3], &intbuf[4], &intbuf[5], &intbuf[6], &intbuf[7]);
226 
227  buf[pos+0] = (float) (intbuf[0] / interpolation_shifts<OutBits, InBits>::post2);
228  buf[pos+1] = (float) (intbuf[1] / interpolation_shifts<OutBits, InBits>::post2);
229  buf[pos+2] = (float) (intbuf[2] / interpolation_shifts<OutBits, InBits>::post2);
230  buf[pos+3] = (float) (intbuf[3] / interpolation_shifts<OutBits, InBits>::post2);
231  buf[pos+4] = (float) (intbuf[4] / interpolation_shifts<OutBits, InBits>::post2);
232  buf[pos+5] = (float) (intbuf[5] / interpolation_shifts<OutBits, InBits>::post2);
233  buf[pos+6] = (float) (intbuf[6] / interpolation_shifts<OutBits, InBits>::post2);
234  buf[pos+7] = (float) (intbuf[7] / interpolation_shifts<OutBits, InBits>::post2);
235  }
236 }
237 
238 template<uint OutBits, uint InBits>
239 void InterpolatorsIF<OutBits, InBits>::interpolate2_sup(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ)
240 {
241  qint32 intbuf[8];
242  qint32 *bufI0, *bufQ0, *bufI1, *bufQ1;
243 
244  if (invertIQ)
245  {
246  bufI0 = &intbuf[1];
247  bufQ0 = &intbuf[0];
248  bufI1 = &intbuf[5];
249  bufQ1 = &intbuf[4];
250  }
251  else
252  {
253  bufI0 = &intbuf[0];
254  bufQ0 = &intbuf[1];
255  bufI1 = &intbuf[4];
256  bufQ1 = &intbuf[5];
257  }
258 
259  for (int pos = 0; pos < len - 7; pos += 8)
260  {
261  memset(intbuf, 0, 8*sizeof(qint32));
262 
263  *bufI0 = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre2;
264  *bufQ0 = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre2;
265  ++(*it);
266  *bufI1 = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre2;
267  *bufQ1 = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre2;
268  ++(*it);
269 
270  m_interpolator2.myInterpolateSup(&intbuf[0], &intbuf[1], &intbuf[2], &intbuf[3], &intbuf[4], &intbuf[5], &intbuf[6], &intbuf[7]);
271 
272  buf[pos+0] = (float) (intbuf[0] / interpolation_shifts<OutBits, InBits>::post2);
273  buf[pos+1] = (float) (intbuf[1] / interpolation_shifts<OutBits, InBits>::post2);
274  buf[pos+2] = (float) (intbuf[2] / interpolation_shifts<OutBits, InBits>::post2);
275  buf[pos+3] = (float) (intbuf[3] / interpolation_shifts<OutBits, InBits>::post2);
276  buf[pos+4] = (float) (intbuf[4] / interpolation_shifts<OutBits, InBits>::post2);
277  buf[pos+5] = (float) (intbuf[5] / interpolation_shifts<OutBits, InBits>::post2);
278  buf[pos+6] = (float) (intbuf[6] / interpolation_shifts<OutBits, InBits>::post2);
279  buf[pos+7] = (float) (intbuf[7] / interpolation_shifts<OutBits, InBits>::post2);
280  }
281 }
282 
283 template<uint OutBits, uint InBits>
284 void InterpolatorsIF<OutBits, InBits>::interpolate4_cen(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ)
285 {
286  qint32 intbuf[8];
287  qint32 *bufI, *bufQ;
288 
289  if (invertIQ)
290  {
291  bufI = &intbuf[1];
292  bufQ = &intbuf[0];
293  }
294  else
295  {
296  bufI = &intbuf[0];
297  bufQ = &intbuf[1];
298  }
299 
300  for (int pos = 0; pos < len - 7; pos += 8)
301  {
302  memset(intbuf, 0, 8*sizeof(qint32));
303  *bufI = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre4;
304  *bufQ = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre4;
305 
306  m_interpolator2.myInterpolate(&intbuf[0], &intbuf[1], &intbuf[4], &intbuf[5]);
307 
308  m_interpolator4.myInterpolate(&intbuf[0], &intbuf[1], &intbuf[2], &intbuf[3]);
309  m_interpolator4.myInterpolate(&intbuf[4], &intbuf[5], &intbuf[6], &intbuf[7]);
310 
311  buf[pos+0] = (float) (intbuf[0] / interpolation_shifts<OutBits, InBits>::post4);
312  buf[pos+1] = (float) (intbuf[1] / interpolation_shifts<OutBits, InBits>::post4);
313  buf[pos+2] = (float) (intbuf[2] / interpolation_shifts<OutBits, InBits>::post4);
314  buf[pos+3] = (float) (intbuf[3] / interpolation_shifts<OutBits, InBits>::post4);
315  buf[pos+4] = (float) (intbuf[4] / interpolation_shifts<OutBits, InBits>::post4);
316  buf[pos+5] = (float) (intbuf[5] / interpolation_shifts<OutBits, InBits>::post4);
317  buf[pos+6] = (float) (intbuf[6] / interpolation_shifts<OutBits, InBits>::post4);
318  buf[pos+7] = (float) (intbuf[7] / interpolation_shifts<OutBits, InBits>::post4);
319 
320  ++(*it);
321  }
322 }
323 
324 template<uint OutBits, uint InBits>
325 void InterpolatorsIF<OutBits, InBits>::interpolate4_inf(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ)
326 {
327  qint32 intbuf[16];
328  qint32 *bufI0, *bufQ0, *bufI1, *bufQ1;
329 
330  if (invertIQ)
331  {
332  bufI0 = &intbuf[1];
333  bufQ0 = &intbuf[0];
334  bufI1 = &intbuf[9];
335  bufQ1 = &intbuf[8];
336  }
337  else
338  {
339  bufI0 = &intbuf[0];
340  bufQ0 = &intbuf[1];
341  bufI1 = &intbuf[8];
342  bufQ1 = &intbuf[9];
343  }
344 
345  for (int pos = 0; pos < len - 15; pos += 16)
346  {
347  memset(intbuf, 0, 16*sizeof(qint32));
348  *bufI0 = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre4;
349  *bufQ0 = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre4;
350  ++(*it);
351  *bufI1 = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre4;
352  *bufQ1 = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre4;
353  ++(*it);
354 
355  m_interpolator2.myInterpolateInf(&intbuf[0], &intbuf[1], &intbuf[4], &intbuf[5], &intbuf[8], &intbuf[9], &intbuf[12], &intbuf[13]);
356 
357  m_interpolator4.myInterpolateInf(&intbuf[0], &intbuf[1], &intbuf[2], &intbuf[3], &intbuf[4], &intbuf[5], &intbuf[6], &intbuf[7]);
358  m_interpolator4.myInterpolateInf(&intbuf[8], &intbuf[9], &intbuf[10], &intbuf[11], &intbuf[12], &intbuf[13], &intbuf[14], &intbuf[15]);
359 
360  for (int i = 0; i < 16; i++) {
361  buf[pos+i] = (float) (intbuf[i] / interpolation_shifts<OutBits, InBits>::post4);
362  }
363  }
364 }
365 
366 template<uint OutBits, uint InBits>
367 void InterpolatorsIF<OutBits, InBits>::interpolate4_sup(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ)
368 {
369  qint32 intbuf[16];
370  qint32 *bufI0, *bufQ0, *bufI1, *bufQ1;
371 
372  if (invertIQ)
373  {
374  bufI0 = &intbuf[1];
375  bufQ0 = &intbuf[0];
376  bufI1 = &intbuf[9];
377  bufQ1 = &intbuf[8];
378  }
379  else
380  {
381  bufI0 = &intbuf[0];
382  bufQ0 = &intbuf[1];
383  bufI1 = &intbuf[8];
384  bufQ1 = &intbuf[9];
385  }
386 
387  for (int pos = 0; pos < len - 15; pos += 16)
388  {
389  memset(intbuf, 0, 16*sizeof(qint32));
390  *bufI0 = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre4;
391  *bufQ0 = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre4;
392  ++(*it);
393  *bufI1 = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre4;
394  *bufQ1 = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre4;
395  ++(*it);
396 
397  m_interpolator2.myInterpolateSup(&intbuf[0], &intbuf[1], &intbuf[4], &intbuf[5], &intbuf[8], &intbuf[9], &intbuf[12], &intbuf[13]);
398 
399  m_interpolator4.myInterpolateSup(&intbuf[0], &intbuf[1], &intbuf[2], &intbuf[3], &intbuf[4], &intbuf[5], &intbuf[6], &intbuf[7]);
400  m_interpolator4.myInterpolateSup(&intbuf[8], &intbuf[9], &intbuf[10], &intbuf[11], &intbuf[12], &intbuf[13], &intbuf[14], &intbuf[15]);
401 
402  for (int i = 0; i < 16; i++) {
403  buf[pos+i] = (float) (intbuf[i] / interpolation_shifts<OutBits, InBits>::post4);
404  }
405  }
406 }
407 
408 template<uint OutBits, uint InBits>
409 void InterpolatorsIF<OutBits, InBits>::interpolate8_cen(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ)
410 {
411  qint32 intbuf[16];
412  qint32 *bufI, *bufQ;
413 
414  if (invertIQ)
415  {
416  bufI = &intbuf[1];
417  bufQ = &intbuf[0];
418  }
419  else
420  {
421  bufI = &intbuf[0];
422  bufQ = &intbuf[1];
423  }
424 
425  for (int pos = 0; pos < len - 15; pos += 16)
426  {
427  memset(intbuf, 0, 16*sizeof(qint32));
428  *bufI = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre8;
429  *bufQ = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre8;
430 
431  m_interpolator2.myInterpolate(&intbuf[0], &intbuf[1], &intbuf[8], &intbuf[9]);
432 
433  m_interpolator4.myInterpolate(&intbuf[0], &intbuf[1], &intbuf[4], &intbuf[5]);
434  m_interpolator4.myInterpolate(&intbuf[8], &intbuf[9], &intbuf[12], &intbuf[13]);
435 
436  m_interpolator8.myInterpolate(&intbuf[0], &intbuf[1], &intbuf[2], &intbuf[3]);
437  m_interpolator8.myInterpolate(&intbuf[4], &intbuf[5], &intbuf[6], &intbuf[7]);
438  m_interpolator8.myInterpolate(&intbuf[8], &intbuf[9], &intbuf[10], &intbuf[11]);
439  m_interpolator8.myInterpolate(&intbuf[12], &intbuf[13], &intbuf[14], &intbuf[15]);
440 
441  buf[pos+0] = (float) (intbuf[0] / interpolation_shifts<OutBits, InBits>::post8);
442  buf[pos+1] = (float) (intbuf[1] / interpolation_shifts<OutBits, InBits>::post8);
443  buf[pos+2] = (float) (intbuf[2] / interpolation_shifts<OutBits, InBits>::post8);
444  buf[pos+3] = (float) (intbuf[3] / interpolation_shifts<OutBits, InBits>::post8);
445  buf[pos+4] = (float) (intbuf[4] / interpolation_shifts<OutBits, InBits>::post8);
446  buf[pos+5] = (float) (intbuf[5] / interpolation_shifts<OutBits, InBits>::post8);
447  buf[pos+6] = (float) (intbuf[6] / interpolation_shifts<OutBits, InBits>::post8);
448  buf[pos+7] = (float) (intbuf[7] / interpolation_shifts<OutBits, InBits>::post8);
449  buf[pos+8] = (float) (intbuf[8] / interpolation_shifts<OutBits, InBits>::post8);
450  buf[pos+9] = (float) (intbuf[9] / interpolation_shifts<OutBits, InBits>::post8);
451  buf[pos+10] = (float) (intbuf[10] / interpolation_shifts<OutBits, InBits>::post8);
452  buf[pos+11] = (float) (intbuf[11] / interpolation_shifts<OutBits, InBits>::post8);
453  buf[pos+12] = (float) (intbuf[12] / interpolation_shifts<OutBits, InBits>::post8);
454  buf[pos+13] = (float) (intbuf[13] / interpolation_shifts<OutBits, InBits>::post8);
455  buf[pos+14] = (float) (intbuf[14] / interpolation_shifts<OutBits, InBits>::post8);
456  buf[pos+15] = (float) (intbuf[15] / interpolation_shifts<OutBits, InBits>::post8);
457 
458  ++(*it);
459  }
460 }
461 
462 template<uint OutBits, uint InBits>
463 void InterpolatorsIF<OutBits, InBits>::interpolate8_inf(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ)
464 {
465  qint32 intbuf[32];
466  qint32 *bufI0, *bufQ0, *bufI1, *bufQ1;
467 
468  if (invertIQ)
469  {
470  bufI0 = &intbuf[1];
471  bufQ0 = &intbuf[0];
472  bufI1 = &intbuf[17];
473  bufQ1 = &intbuf[16];
474  }
475  else
476  {
477  bufI0 = &intbuf[0];
478  bufQ0 = &intbuf[1];
479  bufI1 = &intbuf[16];
480  bufQ1 = &intbuf[17];
481  }
482 
483  for (int pos = 0; pos < len - 31; pos += 32)
484  {
485  memset(intbuf, 0, 32*sizeof(qint32));
486  *bufI0 = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre8;
487  *bufQ0 = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre8;
488  ++(*it);
489  *bufI1 = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre8;
490  *bufQ1 = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre8;
491  ++(*it);
492 
493  m_interpolator2.myInterpolateSup(&intbuf[0], &intbuf[1], &intbuf[8], &intbuf[9], &intbuf[16], &intbuf[17], &intbuf[24], &intbuf[25]);
494 
495  m_interpolator4.myInterpolateInf(&intbuf[0], &intbuf[1], &intbuf[4], &intbuf[5], &intbuf[8], &intbuf[9], &intbuf[12], &intbuf[13]);
496  m_interpolator4.myInterpolateInf(&intbuf[16], &intbuf[17], &intbuf[20], &intbuf[21], &intbuf[24], &intbuf[25], &intbuf[28], &intbuf[29]);
497 
498  m_interpolator8.myInterpolateInf(&intbuf[0], &intbuf[1], &intbuf[2], &intbuf[3], &intbuf[4], &intbuf[5], &intbuf[6], &intbuf[7]);
499  m_interpolator8.myInterpolateInf(&intbuf[8], &intbuf[9], &intbuf[10], &intbuf[11], &intbuf[12], &intbuf[13], &intbuf[14], &intbuf[15]);
500  m_interpolator8.myInterpolateInf(&intbuf[16], &intbuf[17], &intbuf[18], &intbuf[19], &intbuf[20], &intbuf[21], &intbuf[22], &intbuf[23]);
501  m_interpolator8.myInterpolateInf(&intbuf[24], &intbuf[25], &intbuf[26], &intbuf[27], &intbuf[28], &intbuf[29], &intbuf[30], &intbuf[31]);
502 
503  for (int i = 0; i < 32; i++) {
504  buf[pos+i] = (float) (intbuf[i] / interpolation_shifts<OutBits, InBits>::post8);
505  }
506  }
507 }
508 
509 template<uint OutBits, uint InBits>
510 void InterpolatorsIF<OutBits, InBits>::interpolate8_sup(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ)
511 {
512  qint32 intbuf[32];
513  qint32 *bufI0, *bufQ0, *bufI1, *bufQ1;
514 
515  if (invertIQ)
516  {
517  bufI0 = &intbuf[1];
518  bufQ0 = &intbuf[0];
519  bufI1 = &intbuf[17];
520  bufQ1 = &intbuf[16];
521  }
522  else
523  {
524  bufI0 = &intbuf[0];
525  bufQ0 = &intbuf[1];
526  bufI1 = &intbuf[16];
527  bufQ1 = &intbuf[17];
528  }
529 
530  for (int pos = 0; pos < len - 31; pos += 32)
531  {
532  memset(intbuf, 0, 32*sizeof(qint32));
533  *bufI0 = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre8;
534  *bufQ0 = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre8;
535  ++(*it);
536  *bufI1 = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre8;
537  *bufQ1 = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre8;
538  ++(*it);
539 
540  m_interpolator2.myInterpolateInf(&intbuf[0], &intbuf[1], &intbuf[8], &intbuf[9], &intbuf[16], &intbuf[17], &intbuf[24], &intbuf[25]);
541 
542  m_interpolator4.myInterpolateSup(&intbuf[0], &intbuf[1], &intbuf[4], &intbuf[5], &intbuf[8], &intbuf[9], &intbuf[12], &intbuf[13]);
543  m_interpolator4.myInterpolateSup(&intbuf[16], &intbuf[17], &intbuf[20], &intbuf[21], &intbuf[24], &intbuf[25], &intbuf[28], &intbuf[29]);
544 
545  m_interpolator8.myInterpolateSup(&intbuf[0], &intbuf[1], &intbuf[2], &intbuf[3], &intbuf[4], &intbuf[5], &intbuf[6], &intbuf[7]);
546  m_interpolator8.myInterpolateSup(&intbuf[8], &intbuf[9], &intbuf[10], &intbuf[11], &intbuf[12], &intbuf[13], &intbuf[14], &intbuf[15]);
547  m_interpolator8.myInterpolateSup(&intbuf[16], &intbuf[17], &intbuf[18], &intbuf[19], &intbuf[20], &intbuf[21], &intbuf[22], &intbuf[23]);
548  m_interpolator8.myInterpolateSup(&intbuf[24], &intbuf[25], &intbuf[26], &intbuf[27], &intbuf[28], &intbuf[29], &intbuf[30], &intbuf[31]);
549 
550  for (int i = 0; i < 32; i++) {
551  buf[pos+i] = (float) (intbuf[i] / interpolation_shifts<OutBits, InBits>::post8);
552  }
553  }
554 }
555 
556 template<uint OutBits, uint InBits>
557 void InterpolatorsIF<OutBits, InBits>::interpolate16_cen(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ)
558 {
559  qint32 intbuf[32];
560  qint32 *bufI, *bufQ;
561 
562  if (invertIQ)
563  {
564  bufI = &intbuf[1];
565  bufQ = &intbuf[0];
566  }
567  else
568  {
569  bufI = &intbuf[0];
570  bufQ = &intbuf[1];
571  }
572 
573  for (int pos = 0; pos < len - 31; pos += 32)
574  {
575  memset(intbuf, 0, 32*sizeof(qint32));
576  *bufI = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre16;
577  *bufQ = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre16;
578 
579  m_interpolator2.myInterpolate(&intbuf[0], &intbuf[1], &intbuf[16], &intbuf[17]);
580 
581  m_interpolator4.myInterpolate(&intbuf[0], &intbuf[1], &intbuf[8], &intbuf[9]);
582  m_interpolator4.myInterpolate(&intbuf[16], &intbuf[17], &intbuf[24], &intbuf[25]);
583 
584  m_interpolator8.myInterpolate(&intbuf[0], &intbuf[1], &intbuf[4], &intbuf[5]);
585  m_interpolator8.myInterpolate(&intbuf[8], &intbuf[9], &intbuf[12], &intbuf[13]);
586  m_interpolator8.myInterpolate(&intbuf[16], &intbuf[17], &intbuf[20], &intbuf[21]);
587  m_interpolator8.myInterpolate(&intbuf[24], &intbuf[25], &intbuf[28], &intbuf[29]);
588 
589  m_interpolator16.myInterpolate(&intbuf[0], &intbuf[1], &intbuf[2], &intbuf[3]);
590  m_interpolator16.myInterpolate(&intbuf[4], &intbuf[5], &intbuf[6], &intbuf[7]);
591  m_interpolator16.myInterpolate(&intbuf[8], &intbuf[9], &intbuf[10], &intbuf[11]);
592  m_interpolator16.myInterpolate(&intbuf[12], &intbuf[13], &intbuf[14], &intbuf[15]);
593  m_interpolator16.myInterpolate(&intbuf[16], &intbuf[17], &intbuf[18], &intbuf[19]);
594  m_interpolator16.myInterpolate(&intbuf[20], &intbuf[21], &intbuf[22], &intbuf[23]);
595  m_interpolator16.myInterpolate(&intbuf[24], &intbuf[25], &intbuf[26], &intbuf[27]);
596  m_interpolator16.myInterpolate(&intbuf[28], &intbuf[29], &intbuf[30], &intbuf[31]);
597 
598  buf[pos+0] = (float) (intbuf[0] / interpolation_shifts<OutBits, InBits>::post16);
599  buf[pos+1] = (float) (intbuf[1] / interpolation_shifts<OutBits, InBits>::post16);
600  buf[pos+2] = (float) (intbuf[2] / interpolation_shifts<OutBits, InBits>::post16);
601  buf[pos+3] = (float) (intbuf[3] / interpolation_shifts<OutBits, InBits>::post16);
602  buf[pos+4] = (float) (intbuf[4] / interpolation_shifts<OutBits, InBits>::post16);
603  buf[pos+5] = (float) (intbuf[5] / interpolation_shifts<OutBits, InBits>::post16);
604  buf[pos+6] = (float) (intbuf[6] / interpolation_shifts<OutBits, InBits>::post16);
605  buf[pos+7] = (float) (intbuf[7] / interpolation_shifts<OutBits, InBits>::post16);
606  buf[pos+8] = (float) (intbuf[8] / interpolation_shifts<OutBits, InBits>::post16);
607  buf[pos+9] = (float) (intbuf[9] / interpolation_shifts<OutBits, InBits>::post16);
608  buf[pos+10] = (float) (intbuf[10] / interpolation_shifts<OutBits, InBits>::post16);
609  buf[pos+11] = (float) (intbuf[11] / interpolation_shifts<OutBits, InBits>::post16);
610  buf[pos+12] = (float) (intbuf[12] / interpolation_shifts<OutBits, InBits>::post16);
611  buf[pos+13] = (float) (intbuf[13] / interpolation_shifts<OutBits, InBits>::post16);
612  buf[pos+14] = (float) (intbuf[14] / interpolation_shifts<OutBits, InBits>::post16);
613  buf[pos+15] = (float) (intbuf[15] / interpolation_shifts<OutBits, InBits>::post16);
614  buf[pos+16] = (float) (intbuf[16] / interpolation_shifts<OutBits, InBits>::post16);
615  buf[pos+17] = (float) (intbuf[17] / interpolation_shifts<OutBits, InBits>::post16);
616  buf[pos+18] = (float) (intbuf[18] / interpolation_shifts<OutBits, InBits>::post16);
617  buf[pos+19] = (float) (intbuf[19] / interpolation_shifts<OutBits, InBits>::post16);
618  buf[pos+20] = (float) (intbuf[20] / interpolation_shifts<OutBits, InBits>::post16);
619  buf[pos+21] = (float) (intbuf[21] / interpolation_shifts<OutBits, InBits>::post16);
620  buf[pos+22] = (float) (intbuf[22] / interpolation_shifts<OutBits, InBits>::post16);
621  buf[pos+23] = (float) (intbuf[23] / interpolation_shifts<OutBits, InBits>::post16);
622  buf[pos+24] = (float) (intbuf[24] / interpolation_shifts<OutBits, InBits>::post16);
623  buf[pos+25] = (float) (intbuf[25] / interpolation_shifts<OutBits, InBits>::post16);
624  buf[pos+26] = (float) (intbuf[26] / interpolation_shifts<OutBits, InBits>::post16);
625  buf[pos+27] = (float) (intbuf[27] / interpolation_shifts<OutBits, InBits>::post16);
626  buf[pos+28] = (float) (intbuf[28] / interpolation_shifts<OutBits, InBits>::post16);
627  buf[pos+29] = (float) (intbuf[29] / interpolation_shifts<OutBits, InBits>::post16);
628  buf[pos+30] = (float) (intbuf[30] / interpolation_shifts<OutBits, InBits>::post16);
629  buf[pos+31] = (float) (intbuf[31] / interpolation_shifts<OutBits, InBits>::post16);
630 
631  ++(*it);
632  }
633 }
634 
635 template<uint OutBits, uint InBits>
636 void InterpolatorsIF<OutBits, InBits>::interpolate16_inf(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ)
637 {
638  qint32 intbuf[64];
639  qint32 *bufI0, *bufQ0, *bufI1, *bufQ1;
640 
641  if (invertIQ)
642  {
643  bufI0 = &intbuf[1];
644  bufQ0 = &intbuf[0];
645  bufI1 = &intbuf[33];
646  bufQ1 = &intbuf[32];
647  }
648  else
649  {
650  bufI0 = &intbuf[0];
651  bufQ0 = &intbuf[1];
652  bufI1 = &intbuf[32];
653  bufQ1 = &intbuf[33];
654  }
655 
656  for (int pos = 0; pos < len - 63; pos += 64)
657  {
658  memset(intbuf, 0, 64*sizeof(qint32));
659  *bufI0 = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre16;
660  *bufQ0 = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre16;
661  ++(*it);
662  *bufI1 = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre16;
663  *bufQ1 = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre16;
664  ++(*it);
665 
666  m_interpolator2.myInterpolateInf(&intbuf[0], &intbuf[1], &intbuf[16], &intbuf[17], &intbuf[32], &intbuf[33], &intbuf[48], &intbuf[49]);
667 
668  m_interpolator4.myInterpolateSup(&intbuf[0], &intbuf[1], &intbuf[8], &intbuf[9], &intbuf[16], &intbuf[17], &intbuf[24], &intbuf[25]);
669  m_interpolator4.myInterpolateSup(&intbuf[32], &intbuf[33], &intbuf[40], &intbuf[41], &intbuf[48], &intbuf[49], &intbuf[56], &intbuf[57]);
670 
671  m_interpolator8.myInterpolateInf(&intbuf[0], &intbuf[1], &intbuf[4], &intbuf[5], &intbuf[8], &intbuf[9], &intbuf[12], &intbuf[13]);
672  m_interpolator8.myInterpolateInf(&intbuf[16], &intbuf[17], &intbuf[20], &intbuf[21], &intbuf[24], &intbuf[25], &intbuf[28], &intbuf[29]);
673  m_interpolator8.myInterpolateInf(&intbuf[32], &intbuf[33], &intbuf[36], &intbuf[37], &intbuf[40], &intbuf[41], &intbuf[44], &intbuf[45]);
674  m_interpolator8.myInterpolateInf(&intbuf[48], &intbuf[49], &intbuf[52], &intbuf[53], &intbuf[56], &intbuf[57], &intbuf[60], &intbuf[61]);
675 
676  m_interpolator16.myInterpolateInf(&intbuf[0], &intbuf[1], &intbuf[2], &intbuf[3], &intbuf[4], &intbuf[5], &intbuf[6], &intbuf[7]);
677  m_interpolator16.myInterpolateInf(&intbuf[8], &intbuf[9], &intbuf[10], &intbuf[11], &intbuf[12], &intbuf[13], &intbuf[14], &intbuf[15]);
678  m_interpolator16.myInterpolateInf(&intbuf[16], &intbuf[17], &intbuf[18], &intbuf[19], &intbuf[20], &intbuf[21], &intbuf[22], &intbuf[23]);
679  m_interpolator16.myInterpolateInf(&intbuf[24], &intbuf[25], &intbuf[26], &intbuf[27], &intbuf[28], &intbuf[29], &intbuf[30], &intbuf[31]);
680  m_interpolator16.myInterpolateInf(&intbuf[32], &intbuf[33], &intbuf[34], &intbuf[35], &intbuf[36], &intbuf[37], &intbuf[38], &intbuf[39]);
681  m_interpolator16.myInterpolateInf(&intbuf[40], &intbuf[41], &intbuf[42], &intbuf[43], &intbuf[44], &intbuf[45], &intbuf[46], &intbuf[47]);
682  m_interpolator16.myInterpolateInf(&intbuf[48], &intbuf[49], &intbuf[50], &intbuf[51], &intbuf[52], &intbuf[53], &intbuf[54], &intbuf[55]);
683  m_interpolator16.myInterpolateInf(&intbuf[56], &intbuf[57], &intbuf[58], &intbuf[59], &intbuf[60], &intbuf[61], &intbuf[62], &intbuf[63]);
684 
685  for (int i = 0; i < 64; i++) {
686  buf[pos+i] = (float) (intbuf[i] / interpolation_shifts<OutBits, InBits>::post16);
687  }
688  }
689 }
690 
691 template<uint OutBits, uint InBits>
692 void InterpolatorsIF<OutBits, InBits>::interpolate16_sup(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ)
693 {
694  qint32 intbuf[64];
695  qint32 *bufI0, *bufQ0, *bufI1, *bufQ1;
696 
697  if (invertIQ)
698  {
699  bufI0 = &intbuf[1];
700  bufQ0 = &intbuf[0];
701  bufI1 = &intbuf[33];
702  bufQ1 = &intbuf[32];
703  }
704  else
705  {
706  bufI0 = &intbuf[0];
707  bufQ0 = &intbuf[1];
708  bufI1 = &intbuf[32];
709  bufQ1 = &intbuf[33];
710  }
711 
712  for (int pos = 0; pos < len - 63; pos += 64)
713  {
714  memset(intbuf, 0, 64*sizeof(qint32));
715  *bufI0 = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre16;
716  *bufQ0 = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre16;
717  ++(*it);
718  *bufI1 = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre16;
719  *bufQ1 = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre16;
720  ++(*it);
721 
722  m_interpolator2.myInterpolateSup(&intbuf[0], &intbuf[1], &intbuf[16], &intbuf[17], &intbuf[32], &intbuf[33], &intbuf[48], &intbuf[49]);
723 
724  m_interpolator4.myInterpolateInf(&intbuf[0], &intbuf[1], &intbuf[8], &intbuf[9], &intbuf[16], &intbuf[17], &intbuf[24], &intbuf[25]);
725  m_interpolator4.myInterpolateInf(&intbuf[32], &intbuf[33], &intbuf[40], &intbuf[41], &intbuf[48], &intbuf[49], &intbuf[56], &intbuf[57]);
726 
727  m_interpolator8.myInterpolateSup(&intbuf[0], &intbuf[1], &intbuf[4], &intbuf[5], &intbuf[8], &intbuf[9], &intbuf[12], &intbuf[13]);
728  m_interpolator8.myInterpolateSup(&intbuf[16], &intbuf[17], &intbuf[20], &intbuf[21], &intbuf[24], &intbuf[25], &intbuf[28], &intbuf[29]);
729  m_interpolator8.myInterpolateSup(&intbuf[32], &intbuf[33], &intbuf[36], &intbuf[37], &intbuf[40], &intbuf[41], &intbuf[44], &intbuf[45]);
730  m_interpolator8.myInterpolateSup(&intbuf[48], &intbuf[49], &intbuf[52], &intbuf[53], &intbuf[56], &intbuf[57], &intbuf[60], &intbuf[61]);
731 
732  m_interpolator16.myInterpolateSup(&intbuf[0], &intbuf[1], &intbuf[2], &intbuf[3], &intbuf[4], &intbuf[5], &intbuf[6], &intbuf[7]);
733  m_interpolator16.myInterpolateSup(&intbuf[8], &intbuf[9], &intbuf[10], &intbuf[11], &intbuf[12], &intbuf[13], &intbuf[14], &intbuf[15]);
734  m_interpolator16.myInterpolateSup(&intbuf[16], &intbuf[17], &intbuf[18], &intbuf[19], &intbuf[20], &intbuf[21], &intbuf[22], &intbuf[23]);
735  m_interpolator16.myInterpolateSup(&intbuf[24], &intbuf[25], &intbuf[26], &intbuf[27], &intbuf[28], &intbuf[29], &intbuf[30], &intbuf[31]);
736  m_interpolator16.myInterpolateSup(&intbuf[32], &intbuf[33], &intbuf[34], &intbuf[35], &intbuf[36], &intbuf[37], &intbuf[38], &intbuf[39]);
737  m_interpolator16.myInterpolateSup(&intbuf[40], &intbuf[41], &intbuf[42], &intbuf[43], &intbuf[44], &intbuf[45], &intbuf[46], &intbuf[47]);
738  m_interpolator16.myInterpolateSup(&intbuf[48], &intbuf[49], &intbuf[50], &intbuf[51], &intbuf[52], &intbuf[53], &intbuf[54], &intbuf[55]);
739  m_interpolator16.myInterpolateSup(&intbuf[56], &intbuf[57], &intbuf[58], &intbuf[59], &intbuf[60], &intbuf[61], &intbuf[62], &intbuf[63]);
740 
741  for (int i = 0; i < 64; i++) {
742  buf[pos+i] = (float) (intbuf[i] / interpolation_shifts<OutBits, InBits>::post16);
743  }
744  }
745 }
746 
747 template<uint OutBits, uint InBits>
748 void InterpolatorsIF<OutBits, InBits>::interpolate32_cen(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ)
749 {
750  qint32 intbuf[64];
751  qint32 *bufI, *bufQ;
752 
753  if (invertIQ)
754  {
755  bufI = &intbuf[1];
756  bufQ = &intbuf[0];
757  }
758  else
759  {
760  bufI = &intbuf[0];
761  bufQ = &intbuf[1];
762  }
763 
764  for (int pos = 0; pos < len - 63; pos += 64)
765  {
766  memset(intbuf, 0, 64*sizeof(qint32));
767  *bufI = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre32;
768  *bufQ = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre32;
769  m_interpolator2.myInterpolate(&intbuf[0], &intbuf[1], &intbuf[32], &intbuf[33]);
770 
771  m_interpolator4.myInterpolate(&intbuf[0], &intbuf[1], &intbuf[16], &intbuf[17]);
772  m_interpolator4.myInterpolate(&intbuf[32], &intbuf[33], &intbuf[48], &intbuf[49]);
773 
774  m_interpolator8.myInterpolate(&intbuf[0], &intbuf[1], &intbuf[8], &intbuf[9]);
775  m_interpolator8.myInterpolate(&intbuf[16], &intbuf[17], &intbuf[24], &intbuf[25]);
776  m_interpolator8.myInterpolate(&intbuf[32], &intbuf[33], &intbuf[40], &intbuf[41]);
777  m_interpolator8.myInterpolate(&intbuf[48], &intbuf[49], &intbuf[56], &intbuf[57]);
778 
779  m_interpolator16.myInterpolate(&intbuf[0], &intbuf[1], &intbuf[4], &intbuf[5]);
780  m_interpolator16.myInterpolate(&intbuf[8], &intbuf[9], &intbuf[12], &intbuf[13]);
781  m_interpolator16.myInterpolate(&intbuf[16], &intbuf[17], &intbuf[20], &intbuf[21]);
782  m_interpolator16.myInterpolate(&intbuf[24], &intbuf[25], &intbuf[28], &intbuf[29]);
783  m_interpolator16.myInterpolate(&intbuf[32], &intbuf[33], &intbuf[36], &intbuf[37]);
784  m_interpolator16.myInterpolate(&intbuf[40], &intbuf[41], &intbuf[44], &intbuf[45]);
785  m_interpolator16.myInterpolate(&intbuf[48], &intbuf[49], &intbuf[52], &intbuf[53]);
786  m_interpolator16.myInterpolate(&intbuf[56], &intbuf[57], &intbuf[60], &intbuf[61]);
787 
788  m_interpolator32.myInterpolate(&intbuf[0], &intbuf[1], &intbuf[2], &intbuf[3]);
789  m_interpolator32.myInterpolate(&intbuf[4], &intbuf[5], &intbuf[6], &intbuf[7]);
790  m_interpolator32.myInterpolate(&intbuf[8], &intbuf[9], &intbuf[10], &intbuf[11]);
791  m_interpolator32.myInterpolate(&intbuf[12], &intbuf[13], &intbuf[14], &intbuf[15]);
792  m_interpolator32.myInterpolate(&intbuf[16], &intbuf[17], &intbuf[18], &intbuf[19]);
793  m_interpolator32.myInterpolate(&intbuf[20], &intbuf[21], &intbuf[22], &intbuf[23]);
794  m_interpolator32.myInterpolate(&intbuf[24], &intbuf[25], &intbuf[26], &intbuf[27]);
795  m_interpolator32.myInterpolate(&intbuf[28], &intbuf[29], &intbuf[30], &intbuf[31]);
796  m_interpolator32.myInterpolate(&intbuf[32], &intbuf[33], &intbuf[34], &intbuf[35]);
797  m_interpolator32.myInterpolate(&intbuf[36], &intbuf[37], &intbuf[38], &intbuf[39]);
798  m_interpolator32.myInterpolate(&intbuf[40], &intbuf[41], &intbuf[42], &intbuf[43]);
799  m_interpolator32.myInterpolate(&intbuf[44], &intbuf[45], &intbuf[46], &intbuf[47]);
800  m_interpolator32.myInterpolate(&intbuf[48], &intbuf[49], &intbuf[50], &intbuf[51]);
801  m_interpolator32.myInterpolate(&intbuf[52], &intbuf[53], &intbuf[54], &intbuf[55]);
802  m_interpolator32.myInterpolate(&intbuf[56], &intbuf[57], &intbuf[58], &intbuf[59]);
803  m_interpolator32.myInterpolate(&intbuf[60], &intbuf[61], &intbuf[62], &intbuf[63]);
804 
805  buf[pos+0] = (float) (intbuf[0] / interpolation_shifts<OutBits, InBits>::post32);
806  buf[pos+1] = (float) (intbuf[1] / interpolation_shifts<OutBits, InBits>::post32);
807  buf[pos+2] = (float) (intbuf[2] / interpolation_shifts<OutBits, InBits>::post32);
808  buf[pos+3] = (float) (intbuf[3] / interpolation_shifts<OutBits, InBits>::post32);
809  buf[pos+4] = (float) (intbuf[4] / interpolation_shifts<OutBits, InBits>::post32);
810  buf[pos+5] = (float) (intbuf[5] / interpolation_shifts<OutBits, InBits>::post32);
811  buf[pos+6] = (float) (intbuf[6] / interpolation_shifts<OutBits, InBits>::post32);
812  buf[pos+7] = (float) (intbuf[7] / interpolation_shifts<OutBits, InBits>::post32);
813  buf[pos+8] = (float) (intbuf[8] / interpolation_shifts<OutBits, InBits>::post32);
814  buf[pos+9] = (float) (intbuf[9] / interpolation_shifts<OutBits, InBits>::post32);
815  buf[pos+10] = (float) (intbuf[10] / interpolation_shifts<OutBits, InBits>::post32);
816  buf[pos+11] = (float) (intbuf[11] / interpolation_shifts<OutBits, InBits>::post32);
817  buf[pos+12] = (float) (intbuf[12] / interpolation_shifts<OutBits, InBits>::post32);
818  buf[pos+13] = (float) (intbuf[13] / interpolation_shifts<OutBits, InBits>::post32);
819  buf[pos+14] = (float) (intbuf[14] / interpolation_shifts<OutBits, InBits>::post32);
820  buf[pos+15] = (float) (intbuf[15] / interpolation_shifts<OutBits, InBits>::post32);
821  buf[pos+16] = (float) (intbuf[16] / interpolation_shifts<OutBits, InBits>::post32);
822  buf[pos+17] = (float) (intbuf[17] / interpolation_shifts<OutBits, InBits>::post32);
823  buf[pos+18] = (float) (intbuf[18] / interpolation_shifts<OutBits, InBits>::post32);
824  buf[pos+19] = (float) (intbuf[19] / interpolation_shifts<OutBits, InBits>::post32);
825  buf[pos+20] = (float) (intbuf[20] / interpolation_shifts<OutBits, InBits>::post32);
826  buf[pos+21] = (float) (intbuf[21] / interpolation_shifts<OutBits, InBits>::post32);
827  buf[pos+22] = (float) (intbuf[22] / interpolation_shifts<OutBits, InBits>::post32);
828  buf[pos+23] = (float) (intbuf[23] / interpolation_shifts<OutBits, InBits>::post32);
829  buf[pos+24] = (float) (intbuf[24] / interpolation_shifts<OutBits, InBits>::post32);
830  buf[pos+25] = (float) (intbuf[25] / interpolation_shifts<OutBits, InBits>::post32);
831  buf[pos+26] = (float) (intbuf[26] / interpolation_shifts<OutBits, InBits>::post32);
832  buf[pos+27] = (float) (intbuf[27] / interpolation_shifts<OutBits, InBits>::post32);
833  buf[pos+28] = (float) (intbuf[28] / interpolation_shifts<OutBits, InBits>::post32);
834  buf[pos+29] = (float) (intbuf[29] / interpolation_shifts<OutBits, InBits>::post32);
835  buf[pos+30] = (float) (intbuf[30] / interpolation_shifts<OutBits, InBits>::post32);
836  buf[pos+31] = (float) (intbuf[31] / interpolation_shifts<OutBits, InBits>::post32);
837  buf[pos+32] = (float) (intbuf[32] / interpolation_shifts<OutBits, InBits>::post32);
838  buf[pos+33] = (float) (intbuf[33] / interpolation_shifts<OutBits, InBits>::post32);
839  buf[pos+34] = (float) (intbuf[34] / interpolation_shifts<OutBits, InBits>::post32);
840  buf[pos+35] = (float) (intbuf[35] / interpolation_shifts<OutBits, InBits>::post32);
841  buf[pos+36] = (float) (intbuf[36] / interpolation_shifts<OutBits, InBits>::post32);
842  buf[pos+37] = (float) (intbuf[37] / interpolation_shifts<OutBits, InBits>::post32);
843  buf[pos+38] = (float) (intbuf[38] / interpolation_shifts<OutBits, InBits>::post32);
844  buf[pos+39] = (float) (intbuf[39] / interpolation_shifts<OutBits, InBits>::post32);
845  buf[pos+40] = (float) (intbuf[40] / interpolation_shifts<OutBits, InBits>::post32);
846  buf[pos+41] = (float) (intbuf[41] / interpolation_shifts<OutBits, InBits>::post32);
847  buf[pos+42] = (float) (intbuf[42] / interpolation_shifts<OutBits, InBits>::post32);
848  buf[pos+43] = (float) (intbuf[43] / interpolation_shifts<OutBits, InBits>::post32);
849  buf[pos+44] = (float) (intbuf[44] / interpolation_shifts<OutBits, InBits>::post32);
850  buf[pos+45] = (float) (intbuf[45] / interpolation_shifts<OutBits, InBits>::post32);
851  buf[pos+46] = (float) (intbuf[46] / interpolation_shifts<OutBits, InBits>::post32);
852  buf[pos+47] = (float) (intbuf[47] / interpolation_shifts<OutBits, InBits>::post32);
853  buf[pos+48] = (float) (intbuf[48] / interpolation_shifts<OutBits, InBits>::post32);
854  buf[pos+49] = (float) (intbuf[49] / interpolation_shifts<OutBits, InBits>::post32);
855  buf[pos+50] = (float) (intbuf[50] / interpolation_shifts<OutBits, InBits>::post32);
856  buf[pos+51] = (float) (intbuf[51] / interpolation_shifts<OutBits, InBits>::post32);
857  buf[pos+52] = (float) (intbuf[52] / interpolation_shifts<OutBits, InBits>::post32);
858  buf[pos+53] = (float) (intbuf[53] / interpolation_shifts<OutBits, InBits>::post32);
859  buf[pos+54] = (float) (intbuf[54] / interpolation_shifts<OutBits, InBits>::post32);
860  buf[pos+55] = (float) (intbuf[55] / interpolation_shifts<OutBits, InBits>::post32);
861  buf[pos+56] = (float) (intbuf[56] / interpolation_shifts<OutBits, InBits>::post32);
862  buf[pos+57] = (float) (intbuf[57] / interpolation_shifts<OutBits, InBits>::post32);
863  buf[pos+58] = (float) (intbuf[58] / interpolation_shifts<OutBits, InBits>::post32);
864  buf[pos+59] = (float) (intbuf[59] / interpolation_shifts<OutBits, InBits>::post32);
865  buf[pos+60] = (float) (intbuf[60] / interpolation_shifts<OutBits, InBits>::post32);
866  buf[pos+61] = (float) (intbuf[61] / interpolation_shifts<OutBits, InBits>::post32);
867  buf[pos+62] = (float) (intbuf[62] / interpolation_shifts<OutBits, InBits>::post32);
868  buf[pos+63] = (float) (intbuf[63] / interpolation_shifts<OutBits, InBits>::post32);
869 
870  ++(*it);
871  }
872 }
873 
874 template<uint OutBits, uint InBits>
875 void InterpolatorsIF<OutBits, InBits>::interpolate32_inf(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ)
876 {
877  qint32 intbuf[128];
878  qint32 *bufI0, *bufQ0, *bufI1, *bufQ1;
879 
880  if (invertIQ)
881  {
882  bufI0 = &intbuf[1];
883  bufQ0 = &intbuf[0];
884  bufI1 = &intbuf[65];
885  bufQ1 = &intbuf[64];
886  }
887  else
888  {
889  bufI0 = &intbuf[0];
890  bufQ0 = &intbuf[1];
891  bufI1 = &intbuf[64];
892  bufQ1 = &intbuf[65];
893  }
894 
895  for (int pos = 0; pos < len - 127; pos += 128)
896  {
897  memset(intbuf, 0, 128*sizeof(qint32));
898  *bufI0 = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre32;
899  *bufQ0 = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre32;
900  ++(*it);
901  *bufI1 = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre32;
902  *bufQ1 = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre32;
903  ++(*it);
904 
905  m_interpolator2.myInterpolateSup(&intbuf[0], &intbuf[1], &intbuf[32], &intbuf[33], &intbuf[64], &intbuf[65], &intbuf[96], &intbuf[97]);
906 
907  m_interpolator4.myInterpolateInf(&intbuf[0], &intbuf[1], &intbuf[16], &intbuf[17], &intbuf[32], &intbuf[33], &intbuf[48], &intbuf[49]);
908  m_interpolator4.myInterpolateInf(&intbuf[64], &intbuf[65], &intbuf[80], &intbuf[81], &intbuf[96], &intbuf[97], &intbuf[112], &intbuf[113]);
909 
910  m_interpolator8.myInterpolateSup(&intbuf[0], &intbuf[1], &intbuf[8], &intbuf[9], &intbuf[16], &intbuf[17], &intbuf[24], &intbuf[25]);
911  m_interpolator8.myInterpolateSup(&intbuf[32], &intbuf[33], &intbuf[40], &intbuf[41], &intbuf[48], &intbuf[49], &intbuf[56], &intbuf[57]);
912  m_interpolator8.myInterpolateSup(&intbuf[64], &intbuf[65], &intbuf[72], &intbuf[73], &intbuf[80], &intbuf[81], &intbuf[88], &intbuf[89]);
913  m_interpolator8.myInterpolateSup(&intbuf[96], &intbuf[97], &intbuf[104], &intbuf[105], &intbuf[112], &intbuf[113], &intbuf[120], &intbuf[121]);
914 
915  m_interpolator16.myInterpolateInf(&intbuf[0], &intbuf[1], &intbuf[4], &intbuf[5], &intbuf[8], &intbuf[9], &intbuf[12], &intbuf[13]);
916  m_interpolator16.myInterpolateInf(&intbuf[16], &intbuf[17], &intbuf[20], &intbuf[21], &intbuf[24], &intbuf[25], &intbuf[28], &intbuf[29]);
917  m_interpolator16.myInterpolateInf(&intbuf[32], &intbuf[33], &intbuf[36], &intbuf[37], &intbuf[40], &intbuf[41], &intbuf[44], &intbuf[45]);
918  m_interpolator16.myInterpolateInf(&intbuf[48], &intbuf[49], &intbuf[52], &intbuf[53], &intbuf[56], &intbuf[57], &intbuf[60], &intbuf[61]);
919  m_interpolator16.myInterpolateInf(&intbuf[64], &intbuf[65], &intbuf[68], &intbuf[69], &intbuf[72], &intbuf[73], &intbuf[76], &intbuf[77]);
920  m_interpolator16.myInterpolateInf(&intbuf[80], &intbuf[81], &intbuf[84], &intbuf[85], &intbuf[88], &intbuf[89], &intbuf[92], &intbuf[93]);
921  m_interpolator16.myInterpolateInf(&intbuf[96], &intbuf[97], &intbuf[100], &intbuf[101], &intbuf[104], &intbuf[105], &intbuf[108], &intbuf[109]);
922  m_interpolator16.myInterpolateInf(&intbuf[112], &intbuf[113], &intbuf[116], &intbuf[117], &intbuf[120], &intbuf[121], &intbuf[124], &intbuf[125]);
923 
924  m_interpolator32.myInterpolateInf(&intbuf[0], &intbuf[1], &intbuf[2], &intbuf[3], &intbuf[4], &intbuf[5], &intbuf[6], &intbuf[7]);
925  m_interpolator32.myInterpolateInf(&intbuf[8], &intbuf[9], &intbuf[10], &intbuf[11], &intbuf[12], &intbuf[13], &intbuf[14], &intbuf[15]);
926  m_interpolator32.myInterpolateInf(&intbuf[16], &intbuf[17], &intbuf[18], &intbuf[19], &intbuf[20], &intbuf[21], &intbuf[22], &intbuf[23]);
927  m_interpolator32.myInterpolateInf(&intbuf[24], &intbuf[25], &intbuf[26], &intbuf[27], &intbuf[28], &intbuf[29], &intbuf[30], &intbuf[31]);
928  m_interpolator32.myInterpolateInf(&intbuf[32], &intbuf[33], &intbuf[34], &intbuf[35], &intbuf[36], &intbuf[37], &intbuf[38], &intbuf[39]);
929  m_interpolator32.myInterpolateInf(&intbuf[40], &intbuf[41], &intbuf[42], &intbuf[43], &intbuf[44], &intbuf[45], &intbuf[46], &intbuf[47]);
930  m_interpolator32.myInterpolateInf(&intbuf[48], &intbuf[49], &intbuf[50], &intbuf[51], &intbuf[52], &intbuf[53], &intbuf[54], &intbuf[55]);
931  m_interpolator32.myInterpolateInf(&intbuf[56], &intbuf[57], &intbuf[58], &intbuf[59], &intbuf[60], &intbuf[61], &intbuf[62], &intbuf[63]);
932  m_interpolator32.myInterpolateInf(&intbuf[64], &intbuf[65], &intbuf[66], &intbuf[67], &intbuf[68], &intbuf[69], &intbuf[70], &intbuf[71]);
933  m_interpolator32.myInterpolateInf(&intbuf[72], &intbuf[73], &intbuf[74], &intbuf[75], &intbuf[76], &intbuf[77], &intbuf[78], &intbuf[79]);
934  m_interpolator32.myInterpolateInf(&intbuf[80], &intbuf[81], &intbuf[82], &intbuf[83], &intbuf[84], &intbuf[85], &intbuf[86], &intbuf[87]);
935  m_interpolator32.myInterpolateInf(&intbuf[88], &intbuf[89], &intbuf[90], &intbuf[91], &intbuf[92], &intbuf[93], &intbuf[94], &intbuf[95]);
936  m_interpolator32.myInterpolateInf(&intbuf[96], &intbuf[97], &intbuf[98], &intbuf[99], &intbuf[100], &intbuf[101], &intbuf[102], &intbuf[103]);
937  m_interpolator32.myInterpolateInf(&intbuf[104], &intbuf[105], &intbuf[106], &intbuf[107], &intbuf[108], &intbuf[109], &intbuf[110], &intbuf[111]);
938  m_interpolator32.myInterpolateInf(&intbuf[112], &intbuf[113], &intbuf[114], &intbuf[115], &intbuf[116], &intbuf[117], &intbuf[118], &intbuf[119]);
939  m_interpolator32.myInterpolateInf(&intbuf[120], &intbuf[121], &intbuf[122], &intbuf[123], &intbuf[124], &intbuf[125], &intbuf[126], &intbuf[127]);
940 
941  for (int i = 0; i < 128; i++) {
943  }
944  }
945 }
946 
947 template<uint OutBits, uint InBits>
948 void InterpolatorsIF<OutBits, InBits>::interpolate32_sup(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ)
949 {
950  qint32 intbuf[128];
951  qint32 *bufI0, *bufQ0, *bufI1, *bufQ1;
952 
953  if (invertIQ)
954  {
955  bufI0 = &intbuf[1];
956  bufQ0 = &intbuf[0];
957  bufI1 = &intbuf[65];
958  bufQ1 = &intbuf[64];
959  }
960  else
961  {
962  bufI0 = &intbuf[0];
963  bufQ0 = &intbuf[1];
964  bufI1 = &intbuf[64];
965  bufQ1 = &intbuf[65];
966  }
967 
968  for (int pos = 0; pos < len - 127; pos += 128)
969  {
970  memset(intbuf, 0, 128*sizeof(qint32));
971  *bufI0 = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre32;
972  *bufQ0 = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre32;
973  ++(*it);
974  *bufI1 = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre32;
975  *bufQ1 = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre32;
976  ++(*it);
977 
978  m_interpolator2.myInterpolateInf(&intbuf[0], &intbuf[1], &intbuf[32], &intbuf[33], &intbuf[64], &intbuf[65], &intbuf[96], &intbuf[97]);
979 
980  m_interpolator4.myInterpolateSup(&intbuf[0], &intbuf[1], &intbuf[16], &intbuf[17], &intbuf[32], &intbuf[33], &intbuf[48], &intbuf[49]);
981  m_interpolator4.myInterpolateSup(&intbuf[64], &intbuf[65], &intbuf[80], &intbuf[81], &intbuf[96], &intbuf[97], &intbuf[112], &intbuf[113]);
982 
983  m_interpolator8.myInterpolateInf(&intbuf[0], &intbuf[1], &intbuf[8], &intbuf[9], &intbuf[16], &intbuf[17], &intbuf[24], &intbuf[25]);
984  m_interpolator8.myInterpolateInf(&intbuf[32], &intbuf[33], &intbuf[40], &intbuf[41], &intbuf[48], &intbuf[49], &intbuf[56], &intbuf[57]);
985  m_interpolator8.myInterpolateInf(&intbuf[64], &intbuf[65], &intbuf[72], &intbuf[73], &intbuf[80], &intbuf[81], &intbuf[88], &intbuf[89]);
986  m_interpolator8.myInterpolateInf(&intbuf[96], &intbuf[97], &intbuf[104], &intbuf[105], &intbuf[112], &intbuf[113], &intbuf[120], &intbuf[121]);
987 
988  m_interpolator16.myInterpolateSup(&intbuf[0], &intbuf[1], &intbuf[4], &intbuf[5], &intbuf[8], &intbuf[9], &intbuf[12], &intbuf[13]);
989  m_interpolator16.myInterpolateSup(&intbuf[16], &intbuf[17], &intbuf[20], &intbuf[21], &intbuf[24], &intbuf[25], &intbuf[28], &intbuf[29]);
990  m_interpolator16.myInterpolateSup(&intbuf[32], &intbuf[33], &intbuf[36], &intbuf[37], &intbuf[40], &intbuf[41], &intbuf[44], &intbuf[45]);
991  m_interpolator16.myInterpolateSup(&intbuf[48], &intbuf[49], &intbuf[52], &intbuf[53], &intbuf[56], &intbuf[57], &intbuf[60], &intbuf[61]);
992  m_interpolator16.myInterpolateSup(&intbuf[64], &intbuf[65], &intbuf[68], &intbuf[69], &intbuf[72], &intbuf[73], &intbuf[76], &intbuf[77]);
993  m_interpolator16.myInterpolateSup(&intbuf[80], &intbuf[81], &intbuf[84], &intbuf[85], &intbuf[88], &intbuf[89], &intbuf[92], &intbuf[93]);
994  m_interpolator16.myInterpolateSup(&intbuf[96], &intbuf[97], &intbuf[100], &intbuf[101], &intbuf[104], &intbuf[105], &intbuf[108], &intbuf[109]);
995  m_interpolator16.myInterpolateSup(&intbuf[112], &intbuf[113], &intbuf[116], &intbuf[117], &intbuf[120], &intbuf[121], &intbuf[124], &intbuf[125]);
996 
997  m_interpolator32.myInterpolateSup(&intbuf[0], &intbuf[1], &intbuf[2], &intbuf[3], &intbuf[4], &intbuf[5], &intbuf[6], &intbuf[7]);
998  m_interpolator32.myInterpolateSup(&intbuf[8], &intbuf[9], &intbuf[10], &intbuf[11], &intbuf[12], &intbuf[13], &intbuf[14], &intbuf[15]);
999  m_interpolator32.myInterpolateSup(&intbuf[16], &intbuf[17], &intbuf[18], &intbuf[19], &intbuf[20], &intbuf[21], &intbuf[22], &intbuf[23]);
1000  m_interpolator32.myInterpolateSup(&intbuf[24], &intbuf[25], &intbuf[26], &intbuf[27], &intbuf[28], &intbuf[29], &intbuf[30], &intbuf[31]);
1001  m_interpolator32.myInterpolateSup(&intbuf[32], &intbuf[33], &intbuf[34], &intbuf[35], &intbuf[36], &intbuf[37], &intbuf[38], &intbuf[39]);
1002  m_interpolator32.myInterpolateSup(&intbuf[40], &intbuf[41], &intbuf[42], &intbuf[43], &intbuf[44], &intbuf[45], &intbuf[46], &intbuf[47]);
1003  m_interpolator32.myInterpolateSup(&intbuf[48], &intbuf[49], &intbuf[50], &intbuf[51], &intbuf[52], &intbuf[53], &intbuf[54], &intbuf[55]);
1004  m_interpolator32.myInterpolateSup(&intbuf[56], &intbuf[57], &intbuf[58], &intbuf[59], &intbuf[60], &intbuf[61], &intbuf[62], &intbuf[63]);
1005  m_interpolator32.myInterpolateSup(&intbuf[64], &intbuf[65], &intbuf[66], &intbuf[67], &intbuf[68], &intbuf[69], &intbuf[70], &intbuf[71]);
1006  m_interpolator32.myInterpolateSup(&intbuf[72], &intbuf[73], &intbuf[74], &intbuf[75], &intbuf[76], &intbuf[77], &intbuf[78], &intbuf[79]);
1007  m_interpolator32.myInterpolateSup(&intbuf[80], &intbuf[81], &intbuf[82], &intbuf[83], &intbuf[84], &intbuf[85], &intbuf[86], &intbuf[87]);
1008  m_interpolator32.myInterpolateSup(&intbuf[88], &intbuf[89], &intbuf[90], &intbuf[91], &intbuf[92], &intbuf[93], &intbuf[94], &intbuf[95]);
1009  m_interpolator32.myInterpolateSup(&intbuf[96], &intbuf[97], &intbuf[98], &intbuf[99], &intbuf[100], &intbuf[101], &intbuf[102], &intbuf[103]);
1010  m_interpolator32.myInterpolateSup(&intbuf[104], &intbuf[105], &intbuf[106], &intbuf[107], &intbuf[108], &intbuf[109], &intbuf[110], &intbuf[111]);
1011  m_interpolator32.myInterpolateSup(&intbuf[112], &intbuf[113], &intbuf[114], &intbuf[115], &intbuf[116], &intbuf[117], &intbuf[118], &intbuf[119]);
1012  m_interpolator32.myInterpolateSup(&intbuf[120], &intbuf[121], &intbuf[122], &intbuf[123], &intbuf[124], &intbuf[125], &intbuf[126], &intbuf[127]);
1013 
1014  for (int i = 0; i < 128; i++) {
1015  buf[pos+i] = (float) (intbuf[i] / interpolation_shifts<OutBits, InBits>::post32);
1016  }
1017  }
1018 }
1019 
1020 template<uint OutBits, uint InBits>
1021 void InterpolatorsIF<OutBits, InBits>::interpolate64_cen(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ)
1022 {
1023  qint32 intbuf[128];
1024  qint32 *bufI, *bufQ;
1025 
1026  if (invertIQ)
1027  {
1028  bufI = &intbuf[1];
1029  bufQ = &intbuf[0];
1030  }
1031  else
1032  {
1033  bufI = &intbuf[0];
1034  bufQ = &intbuf[1];
1035  }
1036 
1037  for (int pos = 0; pos < len - 127; pos += 128)
1038  {
1039  memset(intbuf, 0, 128*sizeof(qint32));
1040  *bufI = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre64;
1041  *bufQ = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre64;
1042  m_interpolator2.myInterpolate(&intbuf[0], &intbuf[1], &intbuf[64], &intbuf[65]);
1043 
1044  m_interpolator4.myInterpolate(&intbuf[0], &intbuf[1], &intbuf[32], &intbuf[33]);
1045  m_interpolator4.myInterpolate(&intbuf[64], &intbuf[65], &intbuf[96], &intbuf[97]);
1046 
1047  m_interpolator8.myInterpolate(&intbuf[0], &intbuf[1], &intbuf[16], &intbuf[17]);
1048  m_interpolator8.myInterpolate(&intbuf[32], &intbuf[33], &intbuf[48], &intbuf[49]);
1049  m_interpolator8.myInterpolate(&intbuf[64], &intbuf[65], &intbuf[80], &intbuf[81]);
1050  m_interpolator8.myInterpolate(&intbuf[96], &intbuf[97], &intbuf[112], &intbuf[113]);
1051 
1052  m_interpolator16.myInterpolate(&intbuf[0], &intbuf[1], &intbuf[8], &intbuf[9]);
1053  m_interpolator16.myInterpolate(&intbuf[16], &intbuf[17], &intbuf[24], &intbuf[25]);
1054  m_interpolator16.myInterpolate(&intbuf[32], &intbuf[33], &intbuf[40], &intbuf[41]);
1055  m_interpolator16.myInterpolate(&intbuf[48], &intbuf[49], &intbuf[56], &intbuf[57]);
1056  m_interpolator16.myInterpolate(&intbuf[64], &intbuf[65], &intbuf[72], &intbuf[73]);
1057  m_interpolator16.myInterpolate(&intbuf[80], &intbuf[81], &intbuf[88], &intbuf[89]);
1058  m_interpolator16.myInterpolate(&intbuf[96], &intbuf[97], &intbuf[104], &intbuf[105]);
1059  m_interpolator16.myInterpolate(&intbuf[112], &intbuf[113], &intbuf[120], &intbuf[121]);
1060 
1061  m_interpolator32.myInterpolate(&intbuf[0], &intbuf[1], &intbuf[4], &intbuf[5]);
1062  m_interpolator32.myInterpolate(&intbuf[8], &intbuf[9], &intbuf[12], &intbuf[13]);
1063  m_interpolator32.myInterpolate(&intbuf[16], &intbuf[17], &intbuf[20], &intbuf[21]);
1064  m_interpolator32.myInterpolate(&intbuf[24], &intbuf[25], &intbuf[28], &intbuf[29]);
1065  m_interpolator32.myInterpolate(&intbuf[32], &intbuf[33], &intbuf[36], &intbuf[37]);
1066  m_interpolator32.myInterpolate(&intbuf[40], &intbuf[41], &intbuf[44], &intbuf[45]);
1067  m_interpolator32.myInterpolate(&intbuf[48], &intbuf[49], &intbuf[52], &intbuf[53]);
1068  m_interpolator32.myInterpolate(&intbuf[56], &intbuf[57], &intbuf[60], &intbuf[61]);
1069  m_interpolator32.myInterpolate(&intbuf[64], &intbuf[65], &intbuf[68], &intbuf[69]);
1070  m_interpolator32.myInterpolate(&intbuf[72], &intbuf[73], &intbuf[76], &intbuf[77]);
1071  m_interpolator32.myInterpolate(&intbuf[80], &intbuf[81], &intbuf[84], &intbuf[85]);
1072  m_interpolator32.myInterpolate(&intbuf[88], &intbuf[89], &intbuf[92], &intbuf[93]);
1073  m_interpolator32.myInterpolate(&intbuf[96], &intbuf[97], &intbuf[100], &intbuf[101]);
1074  m_interpolator32.myInterpolate(&intbuf[104], &intbuf[105], &intbuf[108], &intbuf[109]);
1075  m_interpolator32.myInterpolate(&intbuf[112], &intbuf[113], &intbuf[116], &intbuf[117]);
1076  m_interpolator32.myInterpolate(&intbuf[120], &intbuf[121], &intbuf[124], &intbuf[125]);
1077 
1078  m_interpolator64.myInterpolate(&intbuf[0], &intbuf[1], &intbuf[2], &intbuf[3]);
1079  m_interpolator64.myInterpolate(&intbuf[4], &intbuf[5], &intbuf[6], &intbuf[7]);
1080  m_interpolator64.myInterpolate(&intbuf[8], &intbuf[9], &intbuf[10], &intbuf[11]);
1081  m_interpolator64.myInterpolate(&intbuf[12], &intbuf[13], &intbuf[14], &intbuf[15]);
1082  m_interpolator64.myInterpolate(&intbuf[16], &intbuf[17], &intbuf[18], &intbuf[19]);
1083  m_interpolator64.myInterpolate(&intbuf[20], &intbuf[21], &intbuf[22], &intbuf[23]);
1084  m_interpolator64.myInterpolate(&intbuf[24], &intbuf[25], &intbuf[26], &intbuf[27]);
1085  m_interpolator64.myInterpolate(&intbuf[28], &intbuf[29], &intbuf[30], &intbuf[31]);
1086  m_interpolator64.myInterpolate(&intbuf[32], &intbuf[33], &intbuf[34], &intbuf[35]);
1087  m_interpolator64.myInterpolate(&intbuf[36], &intbuf[37], &intbuf[38], &intbuf[39]);
1088  m_interpolator64.myInterpolate(&intbuf[40], &intbuf[41], &intbuf[42], &intbuf[43]);
1089  m_interpolator64.myInterpolate(&intbuf[44], &intbuf[45], &intbuf[46], &intbuf[47]);
1090  m_interpolator64.myInterpolate(&intbuf[48], &intbuf[49], &intbuf[50], &intbuf[51]);
1091  m_interpolator64.myInterpolate(&intbuf[52], &intbuf[53], &intbuf[54], &intbuf[55]);
1092  m_interpolator64.myInterpolate(&intbuf[56], &intbuf[57], &intbuf[58], &intbuf[59]);
1093  m_interpolator64.myInterpolate(&intbuf[60], &intbuf[61], &intbuf[62], &intbuf[63]);
1094  m_interpolator64.myInterpolate(&intbuf[64], &intbuf[65], &intbuf[66], &intbuf[67]);
1095  m_interpolator64.myInterpolate(&intbuf[68], &intbuf[69], &intbuf[70], &intbuf[71]);
1096  m_interpolator64.myInterpolate(&intbuf[72], &intbuf[73], &intbuf[74], &intbuf[75]);
1097  m_interpolator64.myInterpolate(&intbuf[76], &intbuf[77], &intbuf[78], &intbuf[79]);
1098  m_interpolator64.myInterpolate(&intbuf[80], &intbuf[81], &intbuf[82], &intbuf[83]);
1099  m_interpolator64.myInterpolate(&intbuf[84], &intbuf[85], &intbuf[86], &intbuf[87]);
1100  m_interpolator64.myInterpolate(&intbuf[88], &intbuf[89], &intbuf[90], &intbuf[91]);
1101  m_interpolator64.myInterpolate(&intbuf[92], &intbuf[93], &intbuf[94], &intbuf[95]);
1102  m_interpolator64.myInterpolate(&intbuf[96], &intbuf[97], &intbuf[98], &intbuf[99]);
1103  m_interpolator64.myInterpolate(&intbuf[100], &intbuf[101], &intbuf[102], &intbuf[103]);
1104  m_interpolator64.myInterpolate(&intbuf[104], &intbuf[105], &intbuf[106], &intbuf[107]);
1105  m_interpolator64.myInterpolate(&intbuf[108], &intbuf[109], &intbuf[110], &intbuf[111]);
1106  m_interpolator64.myInterpolate(&intbuf[112], &intbuf[113], &intbuf[114], &intbuf[115]);
1107  m_interpolator64.myInterpolate(&intbuf[116], &intbuf[117], &intbuf[118], &intbuf[119]);
1108  m_interpolator64.myInterpolate(&intbuf[120], &intbuf[121], &intbuf[122], &intbuf[123]);
1109  m_interpolator64.myInterpolate(&intbuf[124], &intbuf[125], &intbuf[126], &intbuf[127]);
1110 
1111  buf[pos+0] = (float) (intbuf[0] / interpolation_shifts<OutBits, InBits>::post64);
1112  buf[pos+1] = (float) (intbuf[1] / interpolation_shifts<OutBits, InBits>::post64);
1113  buf[pos+2] = (float) (intbuf[2] / interpolation_shifts<OutBits, InBits>::post64);
1114  buf[pos+3] = (float) (intbuf[3] / interpolation_shifts<OutBits, InBits>::post64);
1115  buf[pos+4] = (float) (intbuf[4] / interpolation_shifts<OutBits, InBits>::post64);
1116  buf[pos+5] = (float) (intbuf[5] / interpolation_shifts<OutBits, InBits>::post64);
1117  buf[pos+6] = (float) (intbuf[6] / interpolation_shifts<OutBits, InBits>::post64);
1118  buf[pos+7] = (float) (intbuf[7] / interpolation_shifts<OutBits, InBits>::post64);
1119  buf[pos+8] = (float) (intbuf[8] / interpolation_shifts<OutBits, InBits>::post64);
1120  buf[pos+9] = (float) (intbuf[9] / interpolation_shifts<OutBits, InBits>::post64);
1121  buf[pos+10] = (float) (intbuf[10] / interpolation_shifts<OutBits, InBits>::post64);
1122  buf[pos+11] = (float) (intbuf[11] / interpolation_shifts<OutBits, InBits>::post64);
1123  buf[pos+12] = (float) (intbuf[12] / interpolation_shifts<OutBits, InBits>::post64);
1124  buf[pos+13] = (float) (intbuf[13] / interpolation_shifts<OutBits, InBits>::post64);
1125  buf[pos+14] = (float) (intbuf[14] / interpolation_shifts<OutBits, InBits>::post64);
1126  buf[pos+15] = (float) (intbuf[15] / interpolation_shifts<OutBits, InBits>::post64);
1127  buf[pos+16] = (float) (intbuf[16] / interpolation_shifts<OutBits, InBits>::post64);
1128  buf[pos+17] = (float) (intbuf[17] / interpolation_shifts<OutBits, InBits>::post64);
1129  buf[pos+18] = (float) (intbuf[18] / interpolation_shifts<OutBits, InBits>::post64);
1130  buf[pos+19] = (float) (intbuf[19] / interpolation_shifts<OutBits, InBits>::post64);
1131  buf[pos+20] = (float) (intbuf[20] / interpolation_shifts<OutBits, InBits>::post64);
1132  buf[pos+21] = (float) (intbuf[21] / interpolation_shifts<OutBits, InBits>::post64);
1133  buf[pos+22] = (float) (intbuf[22] / interpolation_shifts<OutBits, InBits>::post64);
1134  buf[pos+23] = (float) (intbuf[23] / interpolation_shifts<OutBits, InBits>::post64);
1135  buf[pos+24] = (float) (intbuf[24] / interpolation_shifts<OutBits, InBits>::post64);
1136  buf[pos+25] = (float) (intbuf[25] / interpolation_shifts<OutBits, InBits>::post64);
1137  buf[pos+26] = (float) (intbuf[26] / interpolation_shifts<OutBits, InBits>::post64);
1138  buf[pos+27] = (float) (intbuf[27] / interpolation_shifts<OutBits, InBits>::post64);
1139  buf[pos+28] = (float) (intbuf[28] / interpolation_shifts<OutBits, InBits>::post64);
1140  buf[pos+29] = (float) (intbuf[29] / interpolation_shifts<OutBits, InBits>::post64);
1141  buf[pos+30] = (float) (intbuf[30] / interpolation_shifts<OutBits, InBits>::post64);
1142  buf[pos+31] = (float) (intbuf[31] / interpolation_shifts<OutBits, InBits>::post64);
1143  buf[pos+32] = (float) (intbuf[32] / interpolation_shifts<OutBits, InBits>::post64);
1144  buf[pos+33] = (float) (intbuf[33] / interpolation_shifts<OutBits, InBits>::post64);
1145  buf[pos+34] = (float) (intbuf[34] / interpolation_shifts<OutBits, InBits>::post64);
1146  buf[pos+35] = (float) (intbuf[35] / interpolation_shifts<OutBits, InBits>::post64);
1147  buf[pos+36] = (float) (intbuf[36] / interpolation_shifts<OutBits, InBits>::post64);
1148  buf[pos+37] = (float) (intbuf[37] / interpolation_shifts<OutBits, InBits>::post64);
1149  buf[pos+38] = (float) (intbuf[38] / interpolation_shifts<OutBits, InBits>::post64);
1150  buf[pos+39] = (float) (intbuf[39] / interpolation_shifts<OutBits, InBits>::post64);
1151  buf[pos+40] = (float) (intbuf[40] / interpolation_shifts<OutBits, InBits>::post64);
1152  buf[pos+41] = (float) (intbuf[41] / interpolation_shifts<OutBits, InBits>::post64);
1153  buf[pos+42] = (float) (intbuf[42] / interpolation_shifts<OutBits, InBits>::post64);
1154  buf[pos+43] = (float) (intbuf[43] / interpolation_shifts<OutBits, InBits>::post64);
1155  buf[pos+44] = (float) (intbuf[44] / interpolation_shifts<OutBits, InBits>::post64);
1156  buf[pos+45] = (float) (intbuf[45] / interpolation_shifts<OutBits, InBits>::post64);
1157  buf[pos+46] = (float) (intbuf[46] / interpolation_shifts<OutBits, InBits>::post64);
1158  buf[pos+47] = (float) (intbuf[47] / interpolation_shifts<OutBits, InBits>::post64);
1159  buf[pos+48] = (float) (intbuf[48] / interpolation_shifts<OutBits, InBits>::post64);
1160  buf[pos+49] = (float) (intbuf[49] / interpolation_shifts<OutBits, InBits>::post64);
1161  buf[pos+50] = (float) (intbuf[50] / interpolation_shifts<OutBits, InBits>::post64);
1162  buf[pos+51] = (float) (intbuf[51] / interpolation_shifts<OutBits, InBits>::post64);
1163  buf[pos+52] = (float) (intbuf[52] / interpolation_shifts<OutBits, InBits>::post64);
1164  buf[pos+53] = (float) (intbuf[53] / interpolation_shifts<OutBits, InBits>::post64);
1165  buf[pos+54] = (float) (intbuf[54] / interpolation_shifts<OutBits, InBits>::post64);
1166  buf[pos+55] = (float) (intbuf[55] / interpolation_shifts<OutBits, InBits>::post64);
1167  buf[pos+56] = (float) (intbuf[56] / interpolation_shifts<OutBits, InBits>::post64);
1168  buf[pos+57] = (float) (intbuf[57] / interpolation_shifts<OutBits, InBits>::post64);
1169  buf[pos+58] = (float) (intbuf[58] / interpolation_shifts<OutBits, InBits>::post64);
1170  buf[pos+59] = (float) (intbuf[59] / interpolation_shifts<OutBits, InBits>::post64);
1171  buf[pos+60] = (float) (intbuf[60] / interpolation_shifts<OutBits, InBits>::post64);
1172  buf[pos+61] = (float) (intbuf[61] / interpolation_shifts<OutBits, InBits>::post64);
1173  buf[pos+62] = (float) (intbuf[62] / interpolation_shifts<OutBits, InBits>::post64);
1174  buf[pos+63] = (float) (intbuf[63] / interpolation_shifts<OutBits, InBits>::post64);
1175  buf[pos+64] = (float) (intbuf[64] / interpolation_shifts<OutBits, InBits>::post64);
1176  buf[pos+65] = (float) (intbuf[65] / interpolation_shifts<OutBits, InBits>::post64);
1177  buf[pos+66] = (float) (intbuf[66] / interpolation_shifts<OutBits, InBits>::post64);
1178  buf[pos+67] = (float) (intbuf[67] / interpolation_shifts<OutBits, InBits>::post64);
1179  buf[pos+68] = (float) (intbuf[68] / interpolation_shifts<OutBits, InBits>::post64);
1180  buf[pos+69] = (float) (intbuf[69] / interpolation_shifts<OutBits, InBits>::post64);
1181  buf[pos+70] = (float) (intbuf[70] / interpolation_shifts<OutBits, InBits>::post64);
1182  buf[pos+71] = (float) (intbuf[71] / interpolation_shifts<OutBits, InBits>::post64);
1183  buf[pos+72] = (float) (intbuf[72] / interpolation_shifts<OutBits, InBits>::post64);
1184  buf[pos+73] = (float) (intbuf[73] / interpolation_shifts<OutBits, InBits>::post64);
1185  buf[pos+74] = (float) (intbuf[74] / interpolation_shifts<OutBits, InBits>::post64);
1186  buf[pos+75] = (float) (intbuf[75] / interpolation_shifts<OutBits, InBits>::post64);
1187  buf[pos+76] = (float) (intbuf[76] / interpolation_shifts<OutBits, InBits>::post64);
1188  buf[pos+77] = (float) (intbuf[77] / interpolation_shifts<OutBits, InBits>::post64);
1189  buf[pos+78] = (float) (intbuf[78] / interpolation_shifts<OutBits, InBits>::post64);
1190  buf[pos+79] = (float) (intbuf[79] / interpolation_shifts<OutBits, InBits>::post64);
1191  buf[pos+80] = (float) (intbuf[80] / interpolation_shifts<OutBits, InBits>::post64);
1192  buf[pos+81] = (float) (intbuf[81] / interpolation_shifts<OutBits, InBits>::post64);
1193  buf[pos+82] = (float) (intbuf[82] / interpolation_shifts<OutBits, InBits>::post64);
1194  buf[pos+83] = (float) (intbuf[83] / interpolation_shifts<OutBits, InBits>::post64);
1195  buf[pos+84] = (float) (intbuf[84] / interpolation_shifts<OutBits, InBits>::post64);
1196  buf[pos+85] = (float) (intbuf[85] / interpolation_shifts<OutBits, InBits>::post64);
1197  buf[pos+86] = (float) (intbuf[86] / interpolation_shifts<OutBits, InBits>::post64);
1198  buf[pos+87] = (float) (intbuf[87] / interpolation_shifts<OutBits, InBits>::post64);
1199  buf[pos+88] = (float) (intbuf[88] / interpolation_shifts<OutBits, InBits>::post64);
1200  buf[pos+89] = (float) (intbuf[89] / interpolation_shifts<OutBits, InBits>::post64);
1201  buf[pos+90] = (float) (intbuf[90] / interpolation_shifts<OutBits, InBits>::post64);
1202  buf[pos+91] = (float) (intbuf[91] / interpolation_shifts<OutBits, InBits>::post64);
1203  buf[pos+92] = (float) (intbuf[92] / interpolation_shifts<OutBits, InBits>::post64);
1204  buf[pos+93] = (float) (intbuf[93] / interpolation_shifts<OutBits, InBits>::post64);
1205  buf[pos+94] = (float) (intbuf[94] / interpolation_shifts<OutBits, InBits>::post64);
1206  buf[pos+95] = (float) (intbuf[95] / interpolation_shifts<OutBits, InBits>::post64);
1207  buf[pos+96] = (float) (intbuf[96] / interpolation_shifts<OutBits, InBits>::post64);
1208  buf[pos+97] = (float) (intbuf[97] / interpolation_shifts<OutBits, InBits>::post64);
1209  buf[pos+98] = (float) (intbuf[98] / interpolation_shifts<OutBits, InBits>::post64);
1210  buf[pos+99] = (float) (intbuf[99] / interpolation_shifts<OutBits, InBits>::post64);
1211  buf[pos+100] = (float) (intbuf[100] / interpolation_shifts<OutBits, InBits>::post64);
1212  buf[pos+101] = (float) (intbuf[101] / interpolation_shifts<OutBits, InBits>::post64);
1213  buf[pos+102] = (float) (intbuf[102] / interpolation_shifts<OutBits, InBits>::post64);
1214  buf[pos+103] = (float) (intbuf[103] / interpolation_shifts<OutBits, InBits>::post64);
1215  buf[pos+104] = (float) (intbuf[104] / interpolation_shifts<OutBits, InBits>::post64);
1216  buf[pos+105] = (float) (intbuf[105] / interpolation_shifts<OutBits, InBits>::post64);
1217  buf[pos+106] = (float) (intbuf[106] / interpolation_shifts<OutBits, InBits>::post64);
1218  buf[pos+107] = (float) (intbuf[107] / interpolation_shifts<OutBits, InBits>::post64);
1219  buf[pos+108] = (float) (intbuf[108] / interpolation_shifts<OutBits, InBits>::post64);
1220  buf[pos+109] = (float) (intbuf[109] / interpolation_shifts<OutBits, InBits>::post64);
1221  buf[pos+110] = (float) (intbuf[110] / interpolation_shifts<OutBits, InBits>::post64);
1222  buf[pos+111] = (float) (intbuf[111] / interpolation_shifts<OutBits, InBits>::post64);
1223  buf[pos+112] = (float) (intbuf[112] / interpolation_shifts<OutBits, InBits>::post64);
1224  buf[pos+113] = (float) (intbuf[113] / interpolation_shifts<OutBits, InBits>::post64);
1225  buf[pos+114] = (float) (intbuf[114] / interpolation_shifts<OutBits, InBits>::post64);
1226  buf[pos+115] = (float) (intbuf[115] / interpolation_shifts<OutBits, InBits>::post64);
1227  buf[pos+116] = (float) (intbuf[116] / interpolation_shifts<OutBits, InBits>::post64);
1228  buf[pos+117] = (float) (intbuf[117] / interpolation_shifts<OutBits, InBits>::post64);
1229  buf[pos+118] = (float) (intbuf[118] / interpolation_shifts<OutBits, InBits>::post64);
1230  buf[pos+119] = (float) (intbuf[119] / interpolation_shifts<OutBits, InBits>::post64);
1231  buf[pos+120] = (float) (intbuf[120] / interpolation_shifts<OutBits, InBits>::post64);
1232  buf[pos+121] = (float) (intbuf[121] / interpolation_shifts<OutBits, InBits>::post64);
1233  buf[pos+122] = (float) (intbuf[122] / interpolation_shifts<OutBits, InBits>::post64);
1234  buf[pos+123] = (float) (intbuf[123] / interpolation_shifts<OutBits, InBits>::post64);
1235  buf[pos+124] = (float) (intbuf[124] / interpolation_shifts<OutBits, InBits>::post64);
1236  buf[pos+125] = (float) (intbuf[125] / interpolation_shifts<OutBits, InBits>::post64);
1237  buf[pos+126] = (float) (intbuf[126] / interpolation_shifts<OutBits, InBits>::post64);
1238  buf[pos+127] = (float) (intbuf[127] / interpolation_shifts<OutBits, InBits>::post64);
1239 
1240  ++(*it);
1241  }
1242 }
1243 
1244 template<uint OutBits, uint InBits>
1245 void InterpolatorsIF<OutBits, InBits>::interpolate64_inf(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ)
1246 {
1247  qint32 intbuf[256];
1248  qint32 *bufI0, *bufQ0, *bufI1, *bufQ1;
1249 
1250  if (invertIQ)
1251  {
1252  bufI0 = &intbuf[1];
1253  bufQ0 = &intbuf[0];
1254  bufI1 = &intbuf[129];
1255  bufQ1 = &intbuf[128];
1256  }
1257  else
1258  {
1259  bufI0 = &intbuf[0];
1260  bufQ0 = &intbuf[1];
1261  bufI1 = &intbuf[128];
1262  bufQ1 = &intbuf[129];
1263  }
1264 
1265  for (int pos = 0; pos < len - 255; pos += 256)
1266  {
1267  memset(intbuf, 0, 256*sizeof(qint32));
1268  *bufI0 = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre64;
1269  *bufQ0 = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre64;
1270  ++(*it);
1271  *bufI1 = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre64;
1272  *bufQ1 = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre64;
1273  ++(*it);
1274 
1275  m_interpolator2.myInterpolateSup(&intbuf[0], &intbuf[1], &intbuf[64], &intbuf[65], &intbuf[128], &intbuf[129], &intbuf[192], &intbuf[193]);
1276 
1277  m_interpolator4.myInterpolateInf(&intbuf[0], &intbuf[1], &intbuf[32], &intbuf[33], &intbuf[64], &intbuf[65], &intbuf[96], &intbuf[97]);
1278  m_interpolator4.myInterpolateInf(&intbuf[128], &intbuf[129], &intbuf[160], &intbuf[161], &intbuf[192], &intbuf[193], &intbuf[224], &intbuf[225]);
1279 
1280  m_interpolator8.myInterpolateSup(&intbuf[0], &intbuf[1], &intbuf[16], &intbuf[17], &intbuf[32], &intbuf[33], &intbuf[48], &intbuf[49]);
1281  m_interpolator8.myInterpolateSup(&intbuf[64], &intbuf[65], &intbuf[80], &intbuf[81], &intbuf[96], &intbuf[97], &intbuf[112], &intbuf[113]);
1282  m_interpolator8.myInterpolateSup(&intbuf[128], &intbuf[129], &intbuf[144], &intbuf[145], &intbuf[160], &intbuf[161], &intbuf[176], &intbuf[177]);
1283  m_interpolator8.myInterpolateSup(&intbuf[192], &intbuf[193], &intbuf[208], &intbuf[209], &intbuf[224], &intbuf[225], &intbuf[240], &intbuf[241]);
1284 
1285  m_interpolator16.myInterpolateInf(&intbuf[0], &intbuf[1], &intbuf[8], &intbuf[9], &intbuf[16], &intbuf[17], &intbuf[24], &intbuf[25]);
1286  m_interpolator16.myInterpolateInf(&intbuf[32], &intbuf[33], &intbuf[40], &intbuf[41], &intbuf[48], &intbuf[49], &intbuf[56], &intbuf[57]);
1287  m_interpolator16.myInterpolateInf(&intbuf[64], &intbuf[65], &intbuf[72], &intbuf[73], &intbuf[80], &intbuf[81], &intbuf[88], &intbuf[89]);
1288  m_interpolator16.myInterpolateInf(&intbuf[96], &intbuf[97], &intbuf[104], &intbuf[105], &intbuf[112], &intbuf[113], &intbuf[120], &intbuf[121]);
1289  m_interpolator16.myInterpolateInf(&intbuf[128], &intbuf[129], &intbuf[136], &intbuf[137], &intbuf[144], &intbuf[145], &intbuf[152], &intbuf[153]);
1290  m_interpolator16.myInterpolateInf(&intbuf[160], &intbuf[161], &intbuf[168], &intbuf[169], &intbuf[176], &intbuf[177], &intbuf[184], &intbuf[185]);
1291  m_interpolator16.myInterpolateInf(&intbuf[192], &intbuf[193], &intbuf[200], &intbuf[201], &intbuf[208], &intbuf[209], &intbuf[216], &intbuf[217]);
1292  m_interpolator16.myInterpolateInf(&intbuf[224], &intbuf[225], &intbuf[232], &intbuf[233], &intbuf[240], &intbuf[241], &intbuf[248], &intbuf[249]);
1293 
1294  for (int i = 0; i < 16; i++) {
1295  m_interpolator32.myInterpolateSup(
1296  &intbuf[16*i+0],
1297  &intbuf[16*i+1],
1298  &intbuf[16*i+4],
1299  &intbuf[16*i+5],
1300  &intbuf[16*i+8],
1301  &intbuf[16*i+9],
1302  &intbuf[16*i+12],
1303  &intbuf[16*i+13]);
1304  }
1305 
1306  for (int i = 0; i < 32; i++) {
1307  m_interpolator64.myInterpolateInf(
1308  &intbuf[8*i+0],
1309  &intbuf[8*i+1],
1310  &intbuf[8*i+2],
1311  &intbuf[8*i+3],
1312  &intbuf[8*i+4],
1313  &intbuf[8*i+5],
1314  &intbuf[8*i+6],
1315  &intbuf[8*i+7]);
1316  }
1317 
1318  for (int i = 0; i < 256; i++) {
1319  buf[pos+i] = (float) (intbuf[i] / interpolation_shifts<OutBits, InBits>::post64);
1320  }
1321  }
1322 }
1323 
1324 template<uint OutBits, uint InBits>
1325 void InterpolatorsIF<OutBits, InBits>::interpolate64_sup(SampleVector::iterator* it, float* buf, qint32 len, bool invertIQ)
1326 {
1327  qint32 intbuf[256];
1328  qint32 *bufI0, *bufQ0, *bufI1, *bufQ1;
1329 
1330  if (invertIQ)
1331  {
1332  bufI0 = &intbuf[1];
1333  bufQ0 = &intbuf[0];
1334  bufI1 = &intbuf[129];
1335  bufQ1 = &intbuf[128];
1336  }
1337  else
1338  {
1339  bufI0 = &intbuf[0];
1340  bufQ0 = &intbuf[1];
1341  bufI1 = &intbuf[128];
1342  bufQ1 = &intbuf[129];
1343  }
1344 
1345  for (int pos = 0; pos < len - 255; pos += 256)
1346  {
1347  memset(intbuf, 0, 256*sizeof(qint32));
1348  *bufI0 = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre64;
1349  *bufQ0 = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre64;
1350  ++(*it);
1351  *bufI1 = (**it).m_real << interpolation_shifts<OutBits, InBits>::pre64;
1352  *bufQ1 = (**it).m_imag << interpolation_shifts<OutBits, InBits>::pre64;
1353  ++(*it);
1354 
1355  m_interpolator2.myInterpolateInf(&intbuf[0], &intbuf[1], &intbuf[64], &intbuf[65], &intbuf[128], &intbuf[129], &intbuf[192], &intbuf[193]);
1356 
1357  m_interpolator4.myInterpolateSup(&intbuf[0], &intbuf[1], &intbuf[32], &intbuf[33], &intbuf[64], &intbuf[65], &intbuf[96], &intbuf[97]);
1358  m_interpolator4.myInterpolateSup(&intbuf[128], &intbuf[129], &intbuf[160], &intbuf[161], &intbuf[192], &intbuf[193], &intbuf[224], &intbuf[225]);
1359 
1360  m_interpolator8.myInterpolateInf(&intbuf[0], &intbuf[1], &intbuf[16], &intbuf[17], &intbuf[32], &intbuf[33], &intbuf[48], &intbuf[49]);
1361  m_interpolator8.myInterpolateInf(&intbuf[64], &intbuf[65], &intbuf[80], &intbuf[81], &intbuf[96], &intbuf[97], &intbuf[112], &intbuf[113]);
1362  m_interpolator8.myInterpolateInf(&intbuf[128], &intbuf[129], &intbuf[144], &intbuf[145], &intbuf[160], &intbuf[161], &intbuf[176], &intbuf[177]);
1363  m_interpolator8.myInterpolateInf(&intbuf[192], &intbuf[193], &intbuf[208], &intbuf[209], &intbuf[224], &intbuf[225], &intbuf[240], &intbuf[241]);
1364 
1365  m_interpolator16.myInterpolateSup(&intbuf[0], &intbuf[1], &intbuf[8], &intbuf[9], &intbuf[16], &intbuf[17], &intbuf[24], &intbuf[25]);
1366  m_interpolator16.myInterpolateSup(&intbuf[32], &intbuf[33], &intbuf[40], &intbuf[41], &intbuf[48], &intbuf[49], &intbuf[56], &intbuf[57]);
1367  m_interpolator16.myInterpolateSup(&intbuf[64], &intbuf[65], &intbuf[72], &intbuf[73], &intbuf[80], &intbuf[81], &intbuf[88], &intbuf[89]);
1368  m_interpolator16.myInterpolateSup(&intbuf[96], &intbuf[97], &intbuf[104], &intbuf[105], &intbuf[112], &intbuf[113], &intbuf[120], &intbuf[121]);
1369  m_interpolator16.myInterpolateSup(&intbuf[128], &intbuf[129], &intbuf[136], &intbuf[137], &intbuf[144], &intbuf[145], &intbuf[152], &intbuf[153]);
1370  m_interpolator16.myInterpolateSup(&intbuf[160], &intbuf[161], &intbuf[168], &intbuf[169], &intbuf[176], &intbuf[177], &intbuf[184], &intbuf[185]);
1371  m_interpolator16.myInterpolateSup(&intbuf[192], &intbuf[193], &intbuf[200], &intbuf[201], &intbuf[208], &intbuf[209], &intbuf[216], &intbuf[217]);
1372  m_interpolator16.myInterpolateSup(&intbuf[224], &intbuf[225], &intbuf[232], &intbuf[233], &intbuf[240], &intbuf[241], &intbuf[248], &intbuf[249]);
1373 
1374  for (int i = 0; i < 16; i++) {
1375  m_interpolator32.myInterpolateInf(
1376  &intbuf[16*i+0],
1377  &intbuf[16*i+1],
1378  &intbuf[16*i+4],
1379  &intbuf[16*i+5],
1380  &intbuf[16*i+8],
1381  &intbuf[16*i+9],
1382  &intbuf[16*i+12],
1383  &intbuf[16*i+13]);
1384  }
1385 
1386  for (int i = 0; i < 32; i++) {
1387  m_interpolator64.myInterpolateSup(
1388  &intbuf[8*i+0],
1389  &intbuf[8*i+1],
1390  &intbuf[8*i+2],
1391  &intbuf[8*i+3],
1392  &intbuf[8*i+4],
1393  &intbuf[8*i+5],
1394  &intbuf[8*i+6],
1395  &intbuf[8*i+7]);
1396  }
1397 
1398  for (int i = 0; i < 256; i++) {
1399  buf[pos+i] = (float) (intbuf[i] / interpolation_shifts<OutBits, InBits>::post64);
1400  }
1401  }
1402 }
1403 
1404 #endif // INCLUDE_SDRBASE_DSP_INTERPOLATORSIF_H_
static constexpr float post64
static constexpr float post16
void interpolate4_inf(SampleVector::iterator *it, float *buf, qint32 len, bool invertIQ=false)
void interpolate16_cen(SampleVector::iterator *it, float *buf, qint32 len, bool invertIQ=false)
void interpolate32_inf(SampleVector::iterator *it, float *buf, qint32 len, bool invertIQ=false)
void interpolate8_cen(SampleVector::iterator *it, float *buf, qint32 len, bool invertIQ=false)
static constexpr float post1
void interpolate8_inf(SampleVector::iterator *it, float *buf, qint32 len, bool invertIQ=false)
void interpolate2_inf(SampleVector::iterator *it, float *buf, qint32 len, bool invertIQ=false)
IntHalfbandFilterDB< qint32, INTERPOLATORS_HB_FILTER_ORDER_NEXT > m_interpolator64
void interpolate16_inf(SampleVector::iterator *it, float *buf, qint32 len, bool invertIQ=false)
void interpolate4_cen(SampleVector::iterator *it, float *buf, qint32 len, bool invertIQ=false)
void interpolate64_cen(SampleVector::iterator *it, float *buf, qint32 len, bool invertIQ=false)
IntHalfbandFilterDB< qint32, INTERPOLATORS_HB_FILTER_ORDER_NEXT > m_interpolator16
static constexpr float post2
static constexpr float post32
IntHalfbandFilterDB< qint32, INTERPOLATORS_HB_FILTER_ORDER_NEXT > m_interpolator32
void interpolate8_sup(SampleVector::iterator *it, float *buf, qint32 len, bool invertIQ=false)
void interpolate2_sup(SampleVector::iterator *it, float *buf, qint32 len, bool invertIQ=false)
int32_t i
Definition: decimators.h:244
IntHalfbandFilterDB< qint32, INTERPOLATORS_HB_FILTER_ORDER_SECOND > m_interpolator4
IntHalfbandFilterDB< qint32, INTERPOLATORS_HB_FILTER_ORDER_NEXT > m_interpolator8
void interpolate32_sup(SampleVector::iterator *it, float *buf, qint32 len, bool invertIQ=false)
void interpolate16_sup(SampleVector::iterator *it, float *buf, qint32 len, bool invertIQ=false)
void interpolate2_cen(SampleVector::iterator *it, float *buf, qint32 len, bool invertIQ=false)
void interpolate32_cen(SampleVector::iterator *it, float *buf, qint32 len, bool invertIQ=false)
static constexpr float post8
void interpolate1(SampleVector::iterator *it, float *buf, qint32 len, bool invertIQ=false)
void interpolate4_sup(SampleVector::iterator *it, float *buf, qint32 len, bool invertIQ=false)
static constexpr float post4
void interpolate64_sup(SampleVector::iterator *it, float *buf, qint32 len, bool invertIQ=false)
IntHalfbandFilterDB< qint32, INTERPOLATORS_HB_FILTER_ORDER_FIRST > m_interpolator2
void interpolate64_inf(SampleVector::iterator *it, float *buf, qint32 len, bool invertIQ=false)