22 #ifndef INCLUDE_INTHALFBANDFILTER_DBFI_H 23 #define INCLUDE_INTHALFBANDFILTER_DBFI_H 30 template<
typename AccuType,
typename SampleType, u
int32_t HBFilterOrder>
109 doInterpolateFIR(SampleOut);
112 m_samplesDB[m_ptr][0] = sampleIn->
real();
113 m_samplesDB[m_ptr][1] = sampleIn->
imag();
196 doInterpolateFIR(&s);
201 m_samplesDB[m_ptr][0] = sampleIn->
real();
202 m_samplesDB[m_ptr][1] = sampleIn->
imag();
225 doInterpolateFIR(&s);
230 m_samplesDB[m_ptr][0] = sampleIn->
real();
231 m_samplesDB[m_ptr][1] = sampleIn->
imag();
395 doInterpolateFIR(&s);
400 m_samplesDB[m_ptr][0] = sampleIn->
real();
401 m_samplesDB[m_ptr][1] = sampleIn->
imag();
424 doInterpolateFIR(&s);
429 m_samplesDB[m_ptr][0] = sampleIn->
real();
430 m_samplesDB[m_ptr][1] = sampleIn->
imag();
537 void myDecimate(AccuType x1, AccuType y1, AccuType *x2, AccuType *y2)
539 storeSampleAccu(x1, y1);
542 storeSampleAccu(*x2, *y2);
563 m_samplesDB[m_ptr][0] = *x1;
564 m_samplesDB[m_ptr][1] = *y1;
580 doInterpolateFIR(x2, y2);
583 void myInterpolateInf(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2, qint32 *x3, qint32 *y3, qint32 *x4, qint32 *y4)
585 myInterpolate(x1, y1, x2, y2);
586 myInterpolate(x3, y3, x4, y4);
599 void myInterpolateSup(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2, qint32 *x3, qint32 *y3, qint32 *x4, qint32 *y4)
601 myInterpolate(x1, y1, x2, y2);
602 myInterpolate(x3, y3, x4, y4);
631 m_samplesDB[m_ptr][0] = x;
632 m_samplesDB[m_ptr][1] = y;
633 m_samplesDB[m_ptr + m_size][0] = x;
634 m_samplesDB[m_ptr + m_size][1] = y;
639 m_ptr = m_ptr + 1 < m_size ? m_ptr + 1: 0;
644 int a = m_ptr + m_size;
649 for (
int i = 0; i < HBFIRFilterTraits<HBFilterOrder>::hbOrder / 4;
i++)
661 sample->
setImag(qAcc*SDR_RX_SCALED);
666 int a = m_ptr + m_size;
671 for (
int i = 0; i < HBFIRFilterTraits<HBFilterOrder>::hbOrder / 4;
i++)
679 iAcc += m_samplesDB[b-1][0] / 2.0;
680 qAcc += m_samplesDB[b-1][1] / 2.0;
695 for (
int i = 0; i < HBFIRFilterTraits<HBFilterOrder>::hbOrder / 4;
i++)
704 sample->
setImag(qAcc * SDR_RX_SCALED);
716 for (
int i = 0; i < HBFIRFilterTraits<HBFilterOrder>::hbOrder / 4;
i++)
729 template<
typename AccuType,
typename SampleType, u
int32_t HBFilterOrder>
734 for (
int i = 0;
i < m_size;
i++)
736 m_samplesDB[
i][0] = 0;
737 m_samplesDB[
i][1] = 0;
744 #endif // INCLUDE_INTHALFBANDFILTER_DBF_H void myDecimate(AccuType x1, AccuType y1, AccuType *x2, AccuType *y2)
bool workInterpolateCenter(Sample *sampleIn, Sample *SampleOut)
void myInterpolateInf(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2, qint32 *x3, qint32 *y3, qint32 *x4, qint32 *y4)
void myDecimate(const Sample *sample1, Sample *sample2)
bool workInterpolateLowerHalfZeroStuffing(Sample *sampleIn, Sample *sampleOut)
void doInterpolateFIR(Sample *sample)
void myInterpolate(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2)
bool workInterpolateCenterZeroStuffing(Sample *sampleIn, Sample *SampleOut)
void storeSampleAccu(AccuType x, AccuType y)
bool workInterpolateUpperHalfZeroStuffing(Sample *sampleIn, Sample *sampleOut)
bool workInterpolateUpperHalf(Sample *sampleIn, Sample *sampleOut)
bool workDecimateUpperHalf(Sample *sample)
void storeSampleFixReal(const FixReal &sampleI, const FixReal &sampleQ)
void doFIRAccu(AccuType *x, AccuType *y)
void myInterpolateSup(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2, qint32 *x3, qint32 *y3, qint32 *x4, qint32 *y4)
bool workDecimateLowerHalf(Sample *sample)
void doInterpolateFIR(qint32 *x, qint32 *y)
bool workDecimateCenter(Sample *sample)
void myInterpolateZeroStuffing(Sample *sample1, Sample *sample2)
void doFIR(Sample *sample)
bool workInterpolateLowerHalf(Sample *sampleIn, Sample *sampleOut)