23 #ifndef SDRBASE_DSP_INTHALFBANDFILTEREO1_H_ 24 #define SDRBASE_DSP_INTHALFBANDFILTEREO1_H_ 32 template<u
int32_t HBFilterOrder>
624 void myInterpolateInf(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2, qint32 *x3, qint32 *y3, qint32 *x4, qint32 *y4)
640 void myInterpolateSup(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2, qint32 *x3, qint32 *y3, qint32 *x4, qint32 *y4)
667 if ((m_ptr % 2) == 0)
669 m_even[0][m_ptr/2] = sampleI;
670 m_even[1][m_ptr/2] = sampleQ;
671 m_even[0][m_ptr/2 +
m_size] = sampleI;
672 m_even[1][m_ptr/2 +
m_size] = sampleQ;
676 m_odd[0][m_ptr/2] = sampleI;
677 m_odd[1][m_ptr/2] = sampleQ;
678 m_odd[0][m_ptr/2 +
m_size] = sampleI;
679 m_odd[1][m_ptr/2 +
m_size] = sampleQ;
685 if ((m_ptr % 2) == 0)
687 m_even[0][m_ptr/2] = x;
688 m_even[1][m_ptr/2] = y;
689 m_even[0][m_ptr/2 +
m_size] = x;
690 m_even[1][m_ptr/2 +
m_size] = y;
694 m_odd[0][m_ptr/2] = x;
695 m_odd[1][m_ptr/2] = y;
696 m_odd[0][m_ptr/2 +
m_size] = x;
697 m_odd[1][m_ptr/2 +
m_size] = y;
703 m_ptr = m_ptr + 1 < 2*m_size ? m_ptr + 1: 0;
708 return (RAND_MAX/2 - std::rand()) % mod;
719 for (
int i = 0; i < HBFIRFilterTraits<HBFilterOrder>::hbOrder / 4;
i++)
721 if ((m_ptr % 2) == 0)
736 if ((m_ptr % 2) == 0)
759 for (
int i = 0; i < HBFIRFilterTraits<HBFilterOrder>::hbOrder / 4;
i++)
761 if ((m_ptr % 2) == 0)
776 if ((m_ptr % 2) == 0)
800 for (
int i = 0; i < HBFIRFilterTraits<HBFilterOrder>::hbOrder / 4;
i++)
821 for (
int i = 0; i < HBFIRFilterTraits<HBFilterOrder>::hbOrder / 4;
i++)
834 template<u
int32_t HBFilterOrder>
int32_t rand(int32_t mod)
bool workDecimateUpperHalf(Sample *sample)
void myDecimate(int32_t x1, int32_t y1, int32_t *x2, int32_t *y2)
bool workInterpolateCenter(Sample *sampleIn, Sample *SampleOut)
void storeSample(const FixReal &sampleI, const FixReal &sampleQ)
int32_t m_even[2][HBFIRFilterTraits< HBFilterOrder >::hbOrder]
bool workDecimateCenter(Sample *sample)
bool workInterpolateUpperHalf(Sample *sampleIn, Sample *sampleOut)
void myInterpolate(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2)
bool workInterpolateLowerHalf(Sample *sampleIn, Sample *sampleOut)
void doFIR(Sample *sample)
void doInterpolateFIR(qint32 *x, qint32 *y)
int32_t m_samples[HBFIRFilterTraits< HBFilterOrder >::hbOrder][2]
void myInterpolateZeroStuffing(int32_t *x1, int32_t *y1, int32_t *x2, int32_t *y2)
void myInterpolateInf(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2, qint32 *x3, qint32 *y3, qint32 *x4, qint32 *y4)
bool workDecimateLowerHalf(Sample *sample)
void myInterpolateSup(qint32 *x1, qint32 *y1, qint32 *x2, qint32 *y2, qint32 *x3, qint32 *y3, qint32 *x4, qint32 *y4)
void myInterpolateZeroStuffing(Sample *sample1, Sample *sample2)
bool workInterpolateUpperHalfZeroStuffing(Sample *sampleIn, Sample *sampleOut)
void storeSample32(int32_t x, int32_t y)
void doInterpolateFIR(Sample *sample)
int32_t m_odd[2][HBFIRFilterTraits< HBFilterOrder >::hbOrder]
bool workInterpolateLowerHalfZeroStuffing(Sample *sampleIn, Sample *sampleOut)
bool workInterpolateCenterZeroStuffing(Sample *sampleIn, Sample *SampleOut)
bool workDecimateCenter(int32_t *x, int32_t *y)
void doFIR(int32_t *x, int32_t *y)
void myDecimate(const Sample *sample1, Sample *sample2)