Change in osmo-trx[master]: detectBurst(): Clear downsampling code path

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/.

pespin gerrit-no-reply at lists.osmocom.org
Wed Sep 1 17:43:40 UTC 2021


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-trx/+/25315 )


Change subject: detectBurst(): Clear downsampling code path
......................................................................

detectBurst(): Clear downsampling code path

downsampleBurst() and the Resampler below it clearly only support or are
confgiured for 1<->4 setup currently.

Change-Id: Iebaff7a34bd24e56627f148182859918accbfa82
---
M Transceiver52M/sigProcLib.cpp
1 file changed, 12 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/15/25315/1

diff --git a/Transceiver52M/sigProcLib.cpp b/Transceiver52M/sigProcLib.cpp
index b7c41ba..ff5e32f 100644
--- a/Transceiver52M/sigProcLib.cpp
+++ b/Transceiver52M/sigProcLib.cpp
@@ -34,6 +34,7 @@
 #include "Resampler.h"
 
 extern "C" {
+#include <osmocom/core/panic.h>
 #include "convolve.h"
 #include "scale.h"
 #include "mult.h"
@@ -1500,12 +1501,18 @@
   complex xcorr;
   int rc = 1;
 
-  if (sps == 4) {
-    dec = downsampleBurst(burst);
-    corr_in = dec;
-    sps = 1;
-  } else {
+  switch (sps) {
+  case 1:
     corr_in = &burst;
+    break;
+  case 4:
+    dec = downsampleBurst(burst);
+     /* Running at the downsampled rate at this point: */
+     corr_in = dec;
+     sps = 1;
+     break;
+  default:
+     osmo_panic("%s:%d SPS %d not supported! Only 1 or 4 supported", __FILE__, __LINE__, sps);
   }
 
   /* Correlate */
@@ -1515,9 +1522,6 @@
     goto del_ret;
   }
 
-  /* Running at the downsampled rate at this point */
-  sps = 1;
-
   /* Peak detection - place restrictions at correlation edges */
   ebp->amp = fastPeakDetect(corr, &ebp->toa);
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/25315
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Iebaff7a34bd24e56627f148182859918accbfa82
Gerrit-Change-Number: 25315
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210901/2781cc94/attachment.htm>


More information about the gerrit-log mailing list