This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Alexander Chemeris gerrit-no-reply at lists.osmocom.orgReview at https://gerrit.osmocom.org/2138 sigProcLib: Slice SoftVector instead of signalVector for GMSK demod. This makes it similar to 8-PSK demod and also saves a bit of lines ofcode and should give us a tiny improvement in performance. Ideally we need to remove vector slicing at all, because in osmo-bts-trx we convert back to +-1.0 again (actually to +-127, but it doesn't mater). So we should rather transmit +-1.0 values to avoid double conversion. Change-Id: If9ed6f0f80fbe88c994b2f9c3cae91d0d57f4442 --- M Transceiver52M/sigProcLib.cpp M Transceiver52M/sigProcLib.h 2 files changed, 22 insertions(+), 26 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/38/2138/1 diff --git a/Transceiver52M/sigProcLib.cpp b/Transceiver52M/sigProcLib.cpp index 1653ee9..d82157e 100644 --- a/Transceiver52M/sigProcLib.cpp +++ b/Transceiver52M/sigProcLib.cpp @@ -737,20 +737,6 @@ return true; } -bool vectorSlicer(signalVector *x) -{ - - signalVector::iterator xP = x->begin(); - signalVector::iterator xPEnd = x->end(); - while (xP < xPEnd) { - *xP = (complex) (0.5*(xP->real()+1.0F)); - if (xP->real() > 1.0) *xP = 1.0; - if (xP->real() < 0.0) *xP = 0.0; - xP++; - } - return true; -} - static signalVector *rotateBurst(const BitVector &wBurst, int guardPeriodLength, int sps) { @@ -2021,6 +2007,22 @@ } /* + * Convert signalVector to SoftVector by taking real part of the signal. + */ +static SoftVector *signalToSoftVector(signalVector *dec) +{ + SoftVector *bits = new SoftVector(dec->size()); + + SoftVector::iterator bit_itr = bits->begin(); + signalVector::iterator burst_itr = dec->begin(); + + for (; burst_itr < dec->end(); burst_itr++) + *bit_itr++ = burst_itr->real(); + + return bits; +} + +/* * Shared portion of GMSK and EDGE demodulators consisting of timing * recovery and single tap channel correction. For 4 SPS (if activated), * the output is downsampled prior to the 1 SPS modulation specific @@ -2063,18 +2065,12 @@ /* Shift up by a quarter of a frequency */ GMSKReverseRotate(*dec, 1); - vectorSlicer(dec); - - bits = new SoftVector(dec->size()); - - SoftVector::iterator bit_itr = bits->begin(); - signalVector::iterator burst_itr = dec->begin(); - - for (; burst_itr < dec->end(); burst_itr++) - *bit_itr++ = burst_itr->real(); - + /* Take real part of the signal */ + bits = signalToSoftVector(dec); delete dec; + vectorSlicer(bits); + return bits; } diff --git a/Transceiver52M/sigProcLib.h b/Transceiver52M/sigProcLib.h index 7dca71f..ed72430 100644 --- a/Transceiver52M/sigProcLib.h +++ b/Transceiver52M/sigProcLib.h @@ -101,8 +101,8 @@ unsigned startIx = 0, unsigned len = 0); -/** Operate soft slicer on real-valued portion of vector */ -bool vectorSlicer(signalVector *x); +/** Operate soft slicer on a soft-bit vector */ +bool vectorSlicer(SoftVector *x); /** GMSK modulate a GSM burst of bits */ signalVector *modulateBurst(const BitVector &wBurst, -- To view, visit https://gerrit.osmocom.org/2138 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If9ed6f0f80fbe88c994b2f9c3cae91d0d57f4442 Gerrit-PatchSet: 1 Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Owner: Alexander Chemeris <Alexander.Chemeris at gmail.com>