falconia has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/37180?usp=email )


Change subject: rtp2trau_hr16: set CRC bits correctly
......................................................................

rtp2trau_hr16: set CRC bits correctly

The code previously failed to set the CRC bits in the TRAU frame
output, containing a misleading comment that this operation is done
by the TRAU frame encoding function (it isn't).  Set these bits
correctly in the rtp2trau step, like we do for EFR.

Change-Id: I5c8aa5891e3862f978f14093bff46bd00b6702a5
---
M src/trau/trau_rtp_conv.c
1 file changed, 17 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/80/37180/1

diff --git a/src/trau/trau_rtp_conv.c b/src/trau/trau_rtp_conv.c
index e4aa885..d7b19e2 100644
--- a/src/trau/trau_rtp_conv.c
+++ b/src/trau/trau_rtp_conv.c
@@ -47,7 +47,7 @@


 /*
- * EFR TRAU parity
+ * EFR TRAU parity (also used for HR)
  *
  * g(x) = x^3 + x^1 + 1
  */
@@ -461,11 +461,12 @@
                tf->ufi = 0;
        else
                tf->ufi = 1;
-       /* CRC is computed by TRAU frame encoder */
        if (data_len)
                osmo_pbit2ubit(tf->d_bits, data, 112);
        else
                memset(tf->d_bits, 0, 112);
+       /* CRC is *not* computed by TRAU frame encoder - we have to do it */
+       osmo_crc8gen_set_bits(&gsm0860_efr_crc3, tf->d_bits, 44, tf->crc_bits);

        return 0;
 }

--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/37180?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: I5c8aa5891e3862f978f14093bff46bd00b6702a5
Gerrit-Change-Number: 37180
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <fal...@freecalypso.org>
Gerrit-MessageType: newchange

Reply via email to