mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-09-27 15:26:33 -04:00
Facepalm.
This commit is contained in:
parent
b68e76a66d
commit
1a46bf391e
@ -77,7 +77,7 @@ void RTLSDRThread::run()
|
||||
void RTLSDRThread::decimate2(SampleVector::iterator* it, const quint8* buf, qint32 len)
|
||||
{
|
||||
qint16 xreal, yimag;
|
||||
for (int pos = 0; pos < len + 7; pos += 8) {
|
||||
for (int pos = 0; pos < len - 7; pos += 8) {
|
||||
xreal = buf[pos+0] - buf[pos+3];
|
||||
yimag = buf[pos+1] + buf[pos+2] - 255;
|
||||
Sample s( xreal << 3, yimag << 3 );
|
||||
@ -93,7 +93,7 @@ void RTLSDRThread::decimate2(SampleVector::iterator* it, const quint8* buf, qint
|
||||
void RTLSDRThread::decimate4(SampleVector::iterator* it, const quint8* buf, qint32 len)
|
||||
{
|
||||
qint16 xreal, yimag;
|
||||
for (int pos = 0; pos < len + 7; pos += 8) {
|
||||
for (int pos = 0; pos < len - 7; pos += 8) {
|
||||
xreal = buf[pos+0] - buf[pos+3] + buf[pos+7] - buf[pos+4];
|
||||
yimag = buf[pos+1] - buf[pos+5] + buf[pos+2] - buf[pos+6];
|
||||
Sample s( xreal << 4, yimag << 4 );
|
||||
@ -105,7 +105,7 @@ void RTLSDRThread::decimate4(SampleVector::iterator* it, const quint8* buf, qint
|
||||
void RTLSDRThread::decimate8(SampleVector::iterator* it, const quint8* buf, qint32 len)
|
||||
{
|
||||
qint16 xreal, yimag;
|
||||
for (int pos = 0; pos < len + 15; pos += 8) {
|
||||
for (int pos = 0; pos < len - 15; pos += 8) {
|
||||
xreal = buf[pos+0] - buf[pos+3] + buf[pos+7] - buf[pos+4];
|
||||
yimag = buf[pos+1] - buf[pos+5] + buf[pos+2] - buf[pos+6];
|
||||
pos += 8;
|
||||
|
Loading…
Reference in New Issue
Block a user