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


Change subject: ms: sch: drop intermediate softvector
......................................................................

ms: sch: drop intermediate softvector

Change-Id: Iadc8f224f9e43282339197b11f388fc574656299
---
M Transceiver52M/ms/ms.h
M Transceiver52M/ms/ms_rx_lower.cpp
2 files changed, 15 insertions(+), 10 deletions(-)



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

diff --git a/Transceiver52M/ms/ms.h b/Transceiver52M/ms/ms.h
index 9245fa5..466812a 100644
--- a/Transceiver52M/ms/ms.h
+++ b/Transceiver52M/ms/ms.h
@@ -289,7 +289,7 @@

        bool handle_sch_or_nb();
        bool handle_sch(bool first = false);
-       bool decode_sch(float *bits, bool update_global_clock);
+       bool decode_sch(char *bits, bool update_global_clock);
        SCH_STATE search_for_sch(dev_buf_t *rcd);
        void grab_bursts(dev_buf_t *rcd);

diff --git a/Transceiver52M/ms/ms_rx_lower.cpp 
b/Transceiver52M/ms/ms_rx_lower.cpp
index 1872c6c..5a07df5 100644
--- a/Transceiver52M/ms/ms_rx_lower.cpp
+++ b/Transceiver52M/ms/ms_rx_lower.cpp
@@ -51,15 +51,16 @@
 #endif

 #define PRINT_Q_OVERFLOW
-bool ms_trx::decode_sch(float *bits, bool update_global_clock)
+
+bool ms_trx::decode_sch(char *bits, bool update_global_clock)
 {
        int fn;
        struct sch_info sch;
        ubit_t info[GSM_SCH_INFO_LEN];
        sbit_t data[GSM_SCH_CODED_LEN];

-       float_to_sbit(&bits[3], &data[0], 1, 39);
-       float_to_sbit(&bits[106], &data[39], 1, 39);
+       memcpy(&data[0], &bits[3], 39);
+       memcpy(&data[39], &bits[106], 39);

        if (!gsm_sch_decode(info, data)) {
                gsm_sch_parse(info, &sch);
@@ -171,12 +172,7 @@
        }
        detect_burst(&ss[start], &channel_imp_resp[0], 0, sch_demod_bits);

-       SoftVector bitss(148);
-       for (int i = 0; i < 148; i++) {
-               bitss[i] = (sch_demod_bits[i]);
-       }
-
-       auto sch_decode_success = decode_sch(bitss.begin(), is_first_sch_acq);
+       auto sch_decode_success = decode_sch(sch_demod_bits, is_first_sch_acq);

        if (sch_decode_success) {
                const auto ts_offset_symb = 0;

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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Iadc8f224f9e43282339197b11f388fc574656299
Gerrit-Change-Number: 32956
Gerrit-PatchSet: 1
Gerrit-Owner: Hoernchen <[email protected]>
Gerrit-MessageType: newchange

Reply via email to