summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2014-10-10 14:06:51 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2014-10-10 14:06:51 +0200
commit3ae264aa4cf28ac8c860ad3f74fdc1c68b1a854e (patch)
tree8c3cad1a816a25b27d2386cd1a7eb35c3563f2f3
parent398081ba13003b963f9ac9abc5c8df9b4968d3e9 (diff)
downloaddabmod-3ae264aa4cf28ac8c860ad3f74fdc1c68b1a854e.tar.gz
dabmod-3ae264aa4cf28ac8c860ad3f74fdc1c68b1a854e.tar.bz2
dabmod-3ae264aa4cf28ac8c860ad3f74fdc1c68b1a854e.zip
Fix Non-SSE QpskSymbolMapper
-rw-r--r--src/QpskSymbolMapper.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/QpskSymbolMapper.cpp b/src/QpskSymbolMapper.cpp
index 2a8ebe9..05d847c 100644
--- a/src/QpskSymbolMapper.cpp
+++ b/src/QpskSymbolMapper.cpp
@@ -109,7 +109,6 @@ int QpskSymbolMapper::process(Buffer* const dataIn, Buffer* dataOut)
inOffset += d_carriers / 8;
}
#else // !__SSE__
-#error "Code section not verified"
const unsigned char* in = reinterpret_cast<const unsigned char*>(dataIn->getData());
float* out = reinterpret_cast<float*>(dataOut->getData());
if (dataIn->getLength() % (d_carriers / 4) != 0) {
@@ -142,7 +141,6 @@ int QpskSymbolMapper::process(Buffer* const dataIn, Buffer* dataOut)
size_t inOffset = 0;
size_t outOffset = 0;
unsigned char tmp;
- fprintf(stderr, "TODO: Validate QpskSymbolMapper::process without SSE\n");
for (size_t i = 0; i < dataIn->getLength(); i += d_carriers / 4) {
for (size_t j = 0; j < d_carriers / 8; ++j) {
tmp = (in[inOffset] & 0xc0) >> 4;
@@ -150,15 +148,15 @@ int QpskSymbolMapper::process(Buffer* const dataIn, Buffer* dataOut)
memcpy(&out[outOffset], symbols[tmp], sizeof(float) * 4);
tmp = (in[inOffset] & 0x30) >> 2;
tmp |= (in[inOffset + (d_carriers / 8)] & 0x30) >> 4;
- memcpy(&out[outOffset + 1], symbols[tmp], sizeof(float) * 4);
+ memcpy(&out[outOffset + 4], symbols[tmp], sizeof(float) * 4);
tmp = (in[inOffset] & 0x0c);
tmp |= (in[inOffset + (d_carriers / 8)] & 0x0c) >> 2;
- memcpy(&out[outOffset + 2], symbols[tmp], sizeof(float) * 4);
+ memcpy(&out[outOffset + 8], symbols[tmp], sizeof(float) * 4);
tmp = (in[inOffset] & 0x03) << 2;
tmp |= (in[inOffset + (d_carriers / 8)] & 0x03);
- memcpy(&out[outOffset + 3], symbols[tmp], sizeof(float) * 4);
+ memcpy(&out[outOffset + 12], symbols[tmp], sizeof(float) * 4);
++inOffset;
- outOffset += 4;
+ outOffset += 4*4;
}
inOffset += d_carriers / 8;
}
@@ -166,3 +164,4 @@ int QpskSymbolMapper::process(Buffer* const dataIn, Buffer* dataOut)
return 1;
}
+