1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2025-06-17 13:52:47 -04:00

Merge branch 'dev' into dev

This commit is contained in:
f4exb 2018-05-11 10:11:28 +02:00 committed by GitHub
commit d9d69c2060
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -638,6 +638,7 @@ void Decimators<StorageType, T, SdrBits, InputBits>::decimate4_sup(SampleVector:
} }
} }
// No filtering: bad for Rx OK for signal tracking
//template<typename StorageType, typename T, uint SdrBits, uint InputBits> //template<typename StorageType, typename T, uint SdrBits, uint InputBits>
//void Decimators<StorageType, T, SdrBits, InputBits>::decimate4_inf(SampleVector::iterator* it, const T* buf, qint32 len) //void Decimators<StorageType, T, SdrBits, InputBits>::decimate4_inf(SampleVector::iterator* it, const T* buf, qint32 len)
//{ //{
@ -655,6 +656,7 @@ void Decimators<StorageType, T, SdrBits, InputBits>::decimate4_sup(SampleVector:
// } // }
//} //}
// No filtering: bad for Rx OK for signal tracking
//template<typename StorageType, typename T, uint SdrBits, uint InputBits> //template<typename StorageType, typename T, uint SdrBits, uint InputBits>
//void Decimators<StorageType, T, SdrBits, InputBits>::decimate4_sup(SampleVector::iterator* it, const T* buf, qint32 len) //void Decimators<StorageType, T, SdrBits, InputBits>::decimate4_sup(SampleVector::iterator* it, const T* buf, qint32 len)
//{ //{
@ -2608,31 +2610,27 @@ void Decimators<StorageType, T, SdrBits, InputBits>::decimate64_sup(SampleVector
template<typename StorageType, typename T, uint SdrBits, uint InputBits> template<typename StorageType, typename T, uint SdrBits, uint InputBits>
void Decimators<StorageType, T, SdrBits, InputBits>::decimate2_cen(SampleVector::iterator* it, const T* buf, qint32 len) void Decimators<StorageType, T, SdrBits, InputBits>::decimate2_cen(SampleVector::iterator* it, const T* buf, qint32 len)
{ {
StorageType xreal[2], yimag[2]; StorageType buf2[4];
for (int pos = 0; pos < len - 7; pos += 8) for (int pos = 0; pos < len - 7; pos += 8)
{ {
xreal[0] = buf[pos+2] << decimation_shifts<SdrBits, InputBits>::pre2;
yimag[0] = buf[pos+3] << decimation_shifts<SdrBits, InputBits>::pre2;
xreal[1] = buf[pos+6] << decimation_shifts<SdrBits, InputBits>::pre2;
yimag[1] = buf[pos+7] << decimation_shifts<SdrBits, InputBits>::pre2;
m_decimator2.myDecimateCen( m_decimator2.myDecimateCen(
buf[pos+0] << decimation_shifts<SdrBits, InputBits>::pre2, buf[pos+0] << decimation_shifts<SdrBits, InputBits>::pre2,
buf[pos+1] << decimation_shifts<SdrBits, InputBits>::pre2, buf[pos+1] << decimation_shifts<SdrBits, InputBits>::pre2,
&xreal[0], buf[pos+2] << decimation_shifts<SdrBits, InputBits>::pre2,
&yimag[0], buf[pos+3] << decimation_shifts<SdrBits, InputBits>::pre2,
buf[pos+4] << decimation_shifts<SdrBits, InputBits>::pre2, buf[pos+4] << decimation_shifts<SdrBits, InputBits>::pre2,
buf[pos+5] << decimation_shifts<SdrBits, InputBits>::pre2, buf[pos+5] << decimation_shifts<SdrBits, InputBits>::pre2,
&xreal[1], buf[pos+6] << decimation_shifts<SdrBits, InputBits>::pre2,
&yimag[1]); buf[pos+7] << decimation_shifts<SdrBits, InputBits>::pre2,
&buf2[0]);
(**it).setReal(xreal[0] >> decimation_shifts<SdrBits, InputBits>::post2); (**it).setReal(buf2[0] >> decimation_shifts<SdrBits, InputBits>::post2);
(**it).setImag(yimag[0] >> decimation_shifts<SdrBits, InputBits>::post2); (**it).setImag(buf2[1] >> decimation_shifts<SdrBits, InputBits>::post2);
++(*it); ++(*it);
(**it).setReal(xreal[1] >> decimation_shifts<SdrBits, InputBits>::post2); (**it).setReal(buf2[2] >> decimation_shifts<SdrBits, InputBits>::post2);
(**it).setImag(yimag[1] >> decimation_shifts<SdrBits, InputBits>::post2); (**it).setImag(buf2[3] >> decimation_shifts<SdrBits, InputBits>::post2);
++(*it); ++(*it);
} }
} }
@ -2662,35 +2660,43 @@ void Decimators<StorageType, T, SdrBits, InputBits>::decimate2_cen(SampleVector:
template<typename StorageType, typename T, uint SdrBits, uint InputBits> template<typename StorageType, typename T, uint SdrBits, uint InputBits>
void Decimators<StorageType, T, SdrBits, InputBits>::decimate4_cen(SampleVector::iterator* it, const T* buf, qint32 len) void Decimators<StorageType, T, SdrBits, InputBits>::decimate4_cen(SampleVector::iterator* it, const T* buf, qint32 len)
{ {
StorageType intbuf[4]; StorageType buf2[8], buf4[4];
for (int pos = 0; pos < len - 7; pos += 8) for (int pos = 0; pos < len - 15; pos += 16)
{ {
intbuf[0] = buf[pos+2] << decimation_shifts<SdrBits, InputBits>::pre4; m_decimator2.myDecimateCen(
intbuf[1] = buf[pos+3] << decimation_shifts<SdrBits, InputBits>::pre4; buf[pos+0] << decimation_shifts<SdrBits, InputBits>::pre4,
intbuf[2] = buf[pos+6] << decimation_shifts<SdrBits, InputBits>::pre4; buf[pos+1] << decimation_shifts<SdrBits, InputBits>::pre4,
intbuf[3] = buf[pos+7] << decimation_shifts<SdrBits, InputBits>::pre4; buf[pos+2] << decimation_shifts<SdrBits, InputBits>::pre4,
buf[pos+3] << decimation_shifts<SdrBits, InputBits>::pre4,
buf[pos+4] << decimation_shifts<SdrBits, InputBits>::pre4,
buf[pos+5] << decimation_shifts<SdrBits, InputBits>::pre4,
buf[pos+6] << decimation_shifts<SdrBits, InputBits>::pre4,
buf[pos+7] << decimation_shifts<SdrBits, InputBits>::pre4,
&buf2[0]);
m_decimator2.myDecimate( m_decimator2.myDecimateCen(
buf[pos+0] << decimation_shifts<SdrBits, InputBits>::pre4, buf[pos+8] << decimation_shifts<SdrBits, InputBits>::pre4,
buf[pos+1] << decimation_shifts<SdrBits, InputBits>::pre4, buf[pos+9] << decimation_shifts<SdrBits, InputBits>::pre4,
&intbuf[0], buf[pos+10] << decimation_shifts<SdrBits, InputBits>::pre4,
&intbuf[1]); buf[pos+11] << decimation_shifts<SdrBits, InputBits>::pre4,
m_decimator2.myDecimate( buf[pos+12] << decimation_shifts<SdrBits, InputBits>::pre4,
buf[pos+4] << decimation_shifts<SdrBits, InputBits>::pre4, buf[pos+13] << decimation_shifts<SdrBits, InputBits>::pre4,
buf[pos+5] << decimation_shifts<SdrBits, InputBits>::pre4, buf[pos+14] << decimation_shifts<SdrBits, InputBits>::pre4,
&intbuf[2], buf[pos+15] << decimation_shifts<SdrBits, InputBits>::pre4,
&intbuf[3]); &buf2[4]);
m_decimator4.myDecimate( m_decimator4.myDecimateCen(
intbuf[0], &buf2[0],
intbuf[1], &buf4[0]);
&intbuf[2],
&intbuf[3]);
(**it).setReal(intbuf[2] >> decimation_shifts<SdrBits, InputBits>::post4); (**it).setReal(buf4[0] >> decimation_shifts<SdrBits, InputBits>::post4);
(**it).setImag(intbuf[3] >> decimation_shifts<SdrBits, InputBits>::post4); (**it).setImag(buf4[1] >> decimation_shifts<SdrBits, InputBits>::post4);
++(*it); ++(*it);
(**it).setReal(buf4[2] >> decimation_shifts<SdrBits, InputBits>::post4);
(**it).setImag(buf4[3] >> decimation_shifts<SdrBits, InputBits>::post4);
++(*it);
} }
} }