19 #ifndef INCLUDE_INTHALFBANDFILTER_H 20 #define INCLUDE_INTHALFBANDFILTER_H 27 template<
typename AccuType, u
int32_t HBFilterOrder>
34 for (
int i = 0; i < HBFIRFilterTraits<HBFilterOrder>::hbOrder + 1;
i++)
45 m_samples[m_ptr][0] = sample->
real();
46 m_samples[m_ptr][1] = sample->
imag();
82 m_samples[m_ptr][0] = 0;
83 m_samples[m_ptr][1] = 0;
99 m_samples[m_ptr][0] = sampleIn->
real();
100 m_samples[m_ptr][1] = sampleIn->
imag();
130 doInterpolateFIR(SampleOut);
133 m_samples[m_ptr][0] = sampleIn->
real();
134 m_samples[m_ptr][1] = sampleIn->
imag();
228 m_samples[m_ptr][0] = -sample->
imag();
229 m_samples[m_ptr][1] = sample->
real();
242 m_samples[m_ptr][0] = -sample->
real();
243 m_samples[m_ptr][1] = -sample->
imag();
259 m_samples[m_ptr][0] = sample->
imag();
260 m_samples[m_ptr][1] = -sample->
real();
273 m_samples[m_ptr][0] = sample->
real();
274 m_samples[m_ptr][1] = sample->
imag();
299 m_samples[m_ptr][0] = 0;
300 m_samples[m_ptr][1] = 0;
318 m_samples[m_ptr][0] = sampleIn->
real();
319 m_samples[m_ptr][1] = sampleIn->
imag();
337 m_samples[m_ptr][0] = 0;
338 m_samples[m_ptr][1] = 0;
356 m_samples[m_ptr][0] = sampleIn->
real();
357 m_samples[m_ptr][1] = sampleIn->
imag();
391 doInterpolateFIR(&s);
396 m_samples[m_ptr][0] = sampleIn->
real();
397 m_samples[m_ptr][1] = sampleIn->
imag();
420 doInterpolateFIR(&s);
425 m_samples[m_ptr][0] = sampleIn->
real();
426 m_samples[m_ptr][1] = sampleIn->
imag();
449 m_samples[m_ptr][0] = sample->
imag();
450 m_samples[m_ptr][1] = -sample->
real();
463 m_samples[m_ptr][0] = -sample->
real();
464 m_samples[m_ptr][1] = -sample->
imag();
480 m_samples[m_ptr][0] = -sample->
imag();
481 m_samples[m_ptr][1] = sample->
real();
494 m_samples[m_ptr][0] = sample->
real();
495 m_samples[m_ptr][1] = sample->
imag();
520 m_samples[m_ptr][0] = 0;
521 m_samples[m_ptr][1] = 0;
539 m_samples[m_ptr][0] = sampleIn->
real();
540 m_samples[m_ptr][1] = sampleIn->
imag();
558 m_samples[m_ptr][0] = 0;
559 m_samples[m_ptr][1] = 0;
577 m_samples[m_ptr][0] = sampleIn->
real();
578 m_samples[m_ptr][1] = sampleIn->
imag();
612 doInterpolateFIR(&s);
617 m_samples[m_ptr][0] = sampleIn->
real();
618 m_samples[m_ptr][1] = sampleIn->
imag();
641 doInterpolateFIR(&s);
646 m_samples[m_ptr][0] = sampleIn->
real();
647 m_samples[m_ptr][1] = sampleIn->
imag();
665 m_samples[m_ptr][0] = sample1->
real();
666 m_samples[m_ptr][1] = sample1->
imag();
669 m_samples[m_ptr][0] = sample2->
real();
670 m_samples[m_ptr][1] = sample2->
imag();
677 void myDecimate(qint32 x1, qint32 y1, qint32 *x2, qint32 *y2)
679 m_samples[m_ptr][0] = x1;
680 m_samples[m_ptr][1] = y1;
683 m_samples[m_ptr][0] = *x2;
684 m_samples[m_ptr][1] = *y2;
694 m_samples[m_ptr][0] = sample1->
real();
695 m_samples[m_ptr][1] = sample1->
imag();
701 m_samples[m_ptr][0] = 0;
702 m_samples[m_ptr][1] = 0;
712 m_samples[m_ptr][0] = *x1;
713 m_samples[m_ptr][1] = *y1;
719 m_samples[m_ptr][0] = 0;
720 m_samples[m_ptr][1] = 0;
731 m_samples[m_ptr][0] = *x1;
732 m_samples[m_ptr][1] = *y1;
748 doInterpolateFIR(x2, y2);
751 void myInterpolateInf(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2, qint32 *x3, qint32 *y3, qint32 *x4, qint32 *y4)
753 myInterpolate(x1, y1, x2, y2);
754 myInterpolate(x3, y3, x4, y4);
767 void myInterpolateSup(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2, qint32 *x3, qint32 *y3, qint32 *x4, qint32 *y4)
769 myInterpolate(x1, y1, x2, y2);
770 myInterpolate(x3, y3, x4, y4);
798 for (
int i = 0; i < HBFIRFilterTraits<HBFilterOrder>::hbOrder / 4;
i++)
829 for (
int i = 0; i < HBFIRFilterTraits<HBFilterOrder>::hbOrder / 4;
i++)
850 for (
int i = 0; i < HBFIRFilterTraits<HBFilterOrder>::hbOrder / 4;
i++)
878 for (
int i = 0; i < HBFIRFilterTraits<HBFilterOrder>::hbOrder / 4;
i++)
915 #endif // INCLUDE_INTHALFBANDFILTER_H void doInterpolateFIR(Sample *sample)
bool workInterpolateCenter(Sample *sampleIn, Sample *SampleOut)
void doFIR(Sample *sample)
void myInterpolate(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2)
void myDecimate(qint32 x1, qint32 y1, qint32 *x2, qint32 *y2)
bool workInterpolateLowerHalfZeroStuffing(Sample *sampleIn, Sample *sampleOut)
bool workDecimateLowerHalf(Sample *sample)
bool workDecimateCenter(Sample *sample)
void doInterpolateFIR(qint32 *x, qint32 *y)
bool workInterpolateUpperHalfZeroStuffing(Sample *sampleIn, Sample *sampleOut)
bool workDecimateUpperHalf(Sample *sample)
void myDecimate(const Sample *sample1, Sample *sample2)
bool workInterpolateUpperHalf(Sample *sampleIn, Sample *sampleOut)
bool workInterpolateCenterZeroStuffing(Sample *sampleIn, Sample *SampleOut)
void myInterpolateSup(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2, qint32 *x3, qint32 *y3, qint32 *x4, qint32 *y4)
void myInterpolateInf(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2, qint32 *x3, qint32 *y3, qint32 *x4, qint32 *y4)
void myInterpolateZeroStuffing(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2)
void myInterpolateZeroStuffing(Sample *sample1, Sample *sample2)
void doFIR(qint32 *x, qint32 *y)
bool workInterpolateLowerHalf(Sample *sampleIn, Sample *sampleOut)