libosmocore/src
Vadim Yanitskiy 7790459c8e 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.

An AHS_SID_UPDATE frame consists of two halves (228 bits each):

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

The first half contains coded in-band signalling data (16 bits) and
the identification marker (212 bits), which allows to detect that
it's an AHS_SID_UPDATE.  This half is carried by even bits of the
first two bursts and odd bits of the last two bursts.

The other half also contains the in-band data (16 bits), while the
remaining 212 bits contain encoded SID_UPDATE (212 bits).  This
half is carried by even bits of the last two bursts and odd bits
of the first two bursts.

Current implementation 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
2022-05-25 13:34:31 +00:00
..
codec libosmocodec: osmo_hr_check_sid(): simplify the logic 2022-03-10 13:57:39 +03:00
coding coding: fix decoding of AHS_SID_UPDATE frames (BER ~50%) 2022-05-25 13:34:31 +00:00
ctrl treewide: remove FSF address 2021-12-14 12:44:03 +01:00
gb bssgp_bvc_fsm: Add a hook to notify when a reset was acknowledged 2022-03-30 18:00:56 +02:00
gsm Use internal <osmocom/core/talloc.h> everywhere 2022-04-27 12:42:15 +00:00
pseudotalloc pseudotalloc: Simplistic wrapper of talloc_named() 2019-07-31 10:16:07 +02:00
sim reader: more meaningful null pointer check in get_sw 2022-05-24 17:59:40 +02:00
usb usb: Match device by VID/PID without path/addr if it is unique 2022-03-03 17:48:51 +01:00
vty fsm_vty: use unsigned int when left-shifting 31 bits! 2022-05-17 09:09:19 +00:00
Makefile.am select: gather statistics for TCP connections 2021-12-23 14:52:15 +00:00
application.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
backtrace.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
base64.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
bitcomp.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
bits.c bits.c: Fix -Wsign-compare warnings 2022-01-09 12:04:22 +01:00
bitvec.c bitvec: Fix -Wsign-compare warnings 2022-01-09 12:04:16 +01:00
context.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
conv.c src/conv.c: Align better with Osmocom coding style 2022-01-05 20:36:34 +00:00
conv_acc.c conv: Fix the traceback for tail biting codes 2022-01-05 20:24:49 +00:00
conv_acc_generic.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
conv_acc_neon.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
conv_acc_neon_impl.h treewide: remove FSF address 2021-12-14 12:44:03 +01:00
conv_acc_sse.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
conv_acc_sse_avx.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
conv_acc_sse_impl.h treewide: remove FSF address 2021-12-14 12:44:03 +01:00
counter.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
crc16.c Fix/Update copyright notices; Add SPDX annotation 2017-11-13 01:35:12 +09:00
crcXXgen.c.tpl treewide: remove FSF address 2021-12-14 12:44:03 +01:00
exec.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
fsm.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
gsmtap_util.c VTY: implement 'no log gsmtap [HOSTNAME]' command 2022-01-05 09:51:34 +00:00
isdnhdlc.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
it_q.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
logging.c logging: fix printing of '\0' when filename printed last 2022-01-31 16:56:09 +00:00
logging_gsmtap.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
logging_syslog.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
logging_systemd.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
loggingrb.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
macaddr.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
mnl.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
msgb.c msgb: Fix -Wsign-compare warnings 2022-01-10 10:53:06 +01:00
msgfile.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
panic.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
plugin.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
prbs.c Fix/Update copyright notices; Add SPDX annotation 2017-11-13 01:35:12 +09:00
prim.c Fix/Update copyright notices; Add SPDX annotation 2017-11-13 01:35:12 +09:00
probes.d support for stats static userspace probes via systemtap 2021-02-22 09:58:00 +01:00
rate_ctr.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
rbtree.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
select.c socket, select: Fix -Wsign-compare warnings 2022-01-10 10:53:03 +01:00
sercomm.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
serial.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
signal.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
sockaddr_str.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
socket.c add osmo_sockaddr_set_port() 2022-03-01 16:33:40 +00:00
stat_item.c stat_item: tolerate NULL pointer argument in osmo_stat_item_group_free 2021-12-15 11:13:24 +01:00
stat_item_internal.h refactor stat_item: get rid of FIFO and "skipped" error 2021-09-30 18:33:43 +00:00
stats.c stats: Avoid NULL pointer deref in allocation failure paths. 2022-05-08 10:02:43 +02:00
stats_statsd.c stats: Avoid NULL pointer deref in allocation failure paths. 2022-05-08 10:02:43 +02:00
stats_tcp.c stats: use tcp stat names as provided 2022-02-24 06:22:55 -08:00
strrb.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
tdef.c tdef: fix wrong path in documentation: tests/vty -> tests/tdef 2021-11-17 20:17:59 +00:00
thread.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
time_cc.c osmo_time_cc: rate_ctr presence should not affect counting 2022-03-08 23:41:23 +01:00
timer.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
timer_clockgettime.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
timer_gettimeofday.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
use_count.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00
utils.c add osmo_quote_str_buf3, osmo_escape_str_buf3 2022-02-07 22:10:29 +01:00
write_queue.c treewide: remove FSF address 2021-12-14 12:44:03 +01:00