aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding
diff options
context:
space:
mode:
authorMychaela N. Falconia <falcon@freecalypso.org>2023-05-17 18:58:40 +0000
committerlaforge <laforge@osmocom.org>2023-05-19 08:44:35 +0000
commitf3e4745603971f144f5f522cc366b10b297d4e02 (patch)
tree0a8babf0105f6fc6390eb862e0f754ccd68342bc /src/coding
parentd9d61b01887c2c366df1b09226e7ecff65cc0adb (diff)
coding: fix decoding of EFR triplicated bits
In GSM 05.03 channel coding for EFR, there are 4 bits out of the 244-bit EFR codec frame that are triplicated before FR-like encoding, and the decoder needs to apply a 2-out-of-3 majority voting function to each of these triplicated bits after the FR-like decoding step. For one of those 4 bits, this majority voting function was wrong in the decoder implemented in gsm0503_tch_fr_decode() - fix it. Change-Id: I47def75cdb066ed6372df4567404cc828589ed53
Diffstat (limited to 'src/coding')
-rw-r--r--src/coding/gsm0503_coding.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c
index 07c8c980..1ef63939 100644
--- a/src/coding/gsm0503_coding.c
+++ b/src/coding/gsm0503_coding.c
@@ -1804,7 +1804,7 @@ static void tch_efr_unreorder(ubit_t *s, ubit_t *p, const ubit_t *w)
s[119] = (sum >= 2);
memcpy(s + 121, w + 125, 53);
sum = s[172] + w[178] + w[179];
- s[172] = (sum > 2);
+ s[172] = (sum >= 2);
memcpy(s + 174, w + 180, 50);
sum = s[222] + w[230] + w[231];
s[222] = (sum >= 2);