Attention is currently required from: fixeria, pespin.

fixeria uploaded patch set #3 to this change.

View Change

coding: fix decoding of AHS_SID_UPDATE frames (BER ~50%)

As was demonstrated in [1], there is a TCH/AHS specific problem in
libosmocoding causing unexpected BER ~50% in decoded AHS_SID_UPDATE
frames. The reason is that A[H]S_SID_UPDATE employs quite tricky
interleaving algorithm, which is different from the algorithm used
by normal TCH/AHS speech frames or A[F]S_SID_UPDATE frames.

+---------+--------------------+---------+--------------------+
| in-band | SID marker | in-band | coded data |
+---------+--------------------+---------+--------------------+
| 16 bits | 212 bits | 16 bits | 212 bits |

* AHS_SID_UPDATE is interleaved over 456 bits (4 Normal Bursts):
** both halves (228 bits each) contain coded in-band data (16 bits),
** the first half contains the identification marker (212 bits),
** the second half contains the encoded SID_UPDATE (212 bits).

The first half (containing the SID marker) is carried by even bits
of the first two bursts and odd bits of the last two bursts. The
marker allows us to detect that it's an AHS_SID_UPDATE.

The other half is carried by even bits of the last two bursts and
odd bits of the first two bursts. However, the current code does
not use odd bits of the first two bursts at all, so buffer cB[]
in gsm0503_tch_ahs_decode_dtx() contains only 114 out of 228 bits.

This patch changes the logic, so that gsm0503_tch_ahs_decode_dtx()
would not split AHS_SID_UPDATE onto two frames anymore like its
TCH/AFS equivalent does, but attempt to deinterleave the second
half and attempt to decode the payload immediately.

Change-Id: I8686d895e96fa0e606c1898b6574cc80a8f46983
Related: [1] I434157e2091a306c039123cea08d84bd8533c937
Related: SYS#5853
---
M src/coding/gsm0503_coding.c
M tests/dtx/dtx_gsm0503_test.ok
2 files changed, 27 insertions(+), 15 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/66/28166/3

To view, visit change 28166. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I8686d895e96fa0e606c1898b6574cc80a8f46983
Gerrit-Change-Number: 28166
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin@sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Attention: pespin <pespin@sysmocom.de>
Gerrit-MessageType: newpatchset