From 834e2ac0ead4544c207ed365151c8c898b5a949c Mon Sep 17 00:00:00 2001 From: Niro Mahasinghe Date: Fri, 3 Nov 2017 12:22:34 +0100 Subject: gsm0503_coding.c: Fix tch_efr_unreorder() of one bit There's an error in tch_efr_unreorder() function in gsm0503_coding.c that results in increased RBER. One of the indices used by repetition bit recombining in this function doesn't match 3GPP TS 45.003 section 3.1.1.3, specifically "w(k) = s(223) for k = 231 and 232". This bug resulted in RBER even under ideal conditions, with no fading or AWGN present. Change-Id: I153da7bbc1bb3e01ed31eb5a7417e90841cfcde3 --- src/coding/gsm0503_coding.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/coding') diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c index 5213dc5f..c4bdb816 100644 --- a/src/coding/gsm0503_coding.c +++ b/src/coding/gsm0503_coding.c @@ -1751,7 +1751,7 @@ static void tch_efr_unreorder(ubit_t *s, ubit_t *p, const ubit_t *w) sum = s[172] + w[178] + w[179]; s[172] = (sum > 2); memcpy(s + 174, w + 180, 50); - sum = s[220] + w[230] + w[231]; + sum = s[222] + w[230] + w[231]; s[222] = (sum > 2); memcpy(s + 224, w + 232, 20); memcpy(p, w + 252, 8); -- cgit v1.2.3