Alexander Chemeris has uploaded this change for review. (
https://gerrit.osmocom.org/9997
Change subject: coding: Correctly count bits when decoding EDGE bursts with MCS
>= 7.
......................................................................
coding: Correctly count bits when decoding EDGE bursts with MCS >= 7.
They consist of two blocks, so we should count both blocks.
Change-Id: I560de192212dae4705054a1665726369b83d213a
---
M src/coding/gsm0503_coding.c
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/97/9997/1
diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c
index 6be4001..527e9cb 100644
--- a/src/coding/gsm0503_coding.c
+++ b/src/coding/gsm0503_coding.c
@@ -982,6 +982,9 @@
if (rc < 0)
return -EFAULT;
} else {
+ /* Bit counters for the second block */
+ int n_errors2, n_bits_total2;
+
/* MCS-7,8,9 block 1 */
rc = egprs_decode_data(l2_data, c1, cps.mcs, cps.p[0],
0, n_errors, n_bits_total);
@@ -991,6 +994,8 @@
/* MCS-7,8,9 block 2 */
rc = egprs_decode_data(l2_data, c2, cps.mcs, cps.p[1],
1, n_errors, n_bits_total);
+ if (n_errors) *n_errors += n_errors2;
+ if (n_bits_total) *n_bits_total += n_bits_total2;
if (rc < 0)
return -EFAULT;
}
--
To view, visit https://gerrit.osmocom.org/9997
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I560de192212dae4705054a1665726369b83d213a
Gerrit-Change-Number: 9997
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Chemeris <[email protected]>