mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-04 06:54:39 -04:00
Deep redesign: fixed decimation bit shifts and halfband filter decimation bit loss
This commit is contained in:
@@ -610,19 +610,19 @@ void BladerfThread::callback(const qint16* buf, qint32 len)
|
||||
switch (m_log2Decim)
|
||||
{
|
||||
case 1:
|
||||
m_decimators.decimate2(&it, buf, len);
|
||||
m_decimators.decimate2_inf(&it, buf, len);
|
||||
break;
|
||||
case 2:
|
||||
m_decimators.decimate4(&it, buf, len);
|
||||
m_decimators.decimate4_inf(&it, buf, len);
|
||||
break;
|
||||
case 3:
|
||||
m_decimators.decimate8(&it, buf, len);
|
||||
m_decimators.decimate8_inf(&it, buf, len);
|
||||
break;
|
||||
case 4:
|
||||
m_decimators.decimate16(&it, buf, len);
|
||||
m_decimators.decimate16_inf(&it, buf, len);
|
||||
break;
|
||||
case 5:
|
||||
m_decimators.decimate32(&it, buf, len);
|
||||
m_decimators.decimate32_inf(&it, buf, len);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -62,7 +62,7 @@ private:
|
||||
IntHalfbandFilter m_decimator32; // 5th stages
|
||||
*/
|
||||
|
||||
Decimators<qint16> m_decimators;
|
||||
Decimators<qint16, SDR_SAMP_SZ, 12> m_decimators;
|
||||
|
||||
void run();
|
||||
/*
|
||||
|
||||
@@ -91,16 +91,16 @@ void RTLSDRThread::callback(const quint8* buf, qint32 len)
|
||||
m_decimators.decimate1(&it, buf, len);
|
||||
break;
|
||||
case 1:
|
||||
m_decimators.decimate2(&it, buf, len);
|
||||
m_decimators.decimate2_inf(&it, buf, len);
|
||||
break;
|
||||
case 2:
|
||||
m_decimators.decimate4(&it, buf, len);
|
||||
m_decimators.decimate4_inf(&it, buf, len);
|
||||
break;
|
||||
case 3:
|
||||
m_decimators.decimate8(&it, buf, len);
|
||||
m_decimators.decimate8_inf(&it, buf, len);
|
||||
break;
|
||||
case 4:
|
||||
m_decimators.decimate16(&it, buf, len);
|
||||
m_decimators.decimate16_inf(&it, buf, len);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -50,7 +50,7 @@ private:
|
||||
int m_samplerate;
|
||||
unsigned int m_log2Decim;
|
||||
|
||||
Decimators<quint8> m_decimators;
|
||||
Decimators<quint8, SDR_SAMP_SZ, 8> m_decimators;
|
||||
|
||||
void run();
|
||||
void callback(const quint8* buf, qint32 len);
|
||||
|
||||
Reference in New Issue
Block a user