Commit Graph

13 Commits

Author SHA1 Message Date
Vadim Yanitskiy 462a93d30b utils/conv_codes_gsm.py: fix inconsistent formatting
Change-Id: Ida99f0fe149b234c738875527dd64b610d33e050
2024-01-31 21:44:49 +07:00
Sylvain Munaut c87c6a3a73 gsm: Improve the TCH/H2.4 coding routines
The spec isn't super clear, but basically the conv coding is done
in two blocks of 72 bits.

The way it's currently implemented isn't "wrong" in the sense it will
produce correct output given no bit errors, but it's better to do the
decoding in two blocks because this then it makes use of the fact we
know the state of the encoder after the 72 bits, which improves the
corrective ability of the code.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: Id2551ffe2a0ebfd0a6df0e1d288a6f0af7e1eda7
2023-07-07 16:06:26 +02:00
Sylvain Munaut c27a8ae3d9 gsm: Fix comment for TCH/F4.8 code
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I62f6d0e9fec180138be5f37664969d56e79f3c13
2023-07-07 15:55:21 +02:00
Vadim Yanitskiy ce484eb035 gsm: fix convolutional code definition for TCH/F4.8
The block length for TCH/F4.8 is off by 4 bits.  Value 152 matches
with what TS 45.003 section 3.4.3 defines, but for some reason the
encoder generates more bits (468) than it must (456).  This results
in buffer overruns when encoding TCH/F4.8.

All block length values in conv_codes_gsm.py are 4 bits less than
the respective values in TS 45.003.  I have no idea why...

Change-Id: Id86d1aa0fd6791a8be431b5547bb723c74c35757
Related: OS#1572
2023-05-25 19:08:53 +07:00
Harald Welte 65e0edc73f convolutional coding for CSD
This patch adds the convolutional code definitions for CSD (circuit
switched data) on TCH/F channels with user bit rates of 2400, 4800, 9600
and 14400 bps.

Related: OS#4396, OS#1572
Change-Id: I412131d7ee2e676402bf8d88394af17c4447b664
2023-02-25 19:37:44 +01:00
Philipp Maier 31c29ea051 conv: add convolutional coder for AMR SID UPDATE frames
AMR SID update frames are protected using an 1/4 convolutional coder,
wich is similar to the one used with 6,7 kbit voice frames. Except that
there is no puncturing and the length is different.

Change-Id: Ia35ed4178a7f0d816052b7e5d6478b93a1d9744f
Related: OS#2978
2020-03-09 13:40:27 +01:00
Oliver Smith a47d37c946 debian, utils: switch to python 3
Make build and external tests work with python3, so we can drop
the python2 dependency.

This should be merged shortly after osmo-python-tests was migrated to
python3, and the jenkins build slaves were (automatically) updated to
have the new osmo-python-tests installed.

Related: OS#2819
Depends: osmo-python-tests I3ffc3519bf6c22536a49dad7a966188ddad351a7
Change-Id: I84ef43f700e125c7a65f92347f12844e07e65655
2019-12-12 09:24:04 +00:00
Vadim Yanitskiy 94c0031297 Don't enforce Python 2 for utilities
The conv_gen.py utility was tested against both Python 2 and 3,
so there is no need to enforce Python 2. Also, having:

  #!/usr/local/bin/python{2|3}

is a bad idea, because Python may be installed in a different location.

Change-Id: I6007d481047b584db13d6eda70fb99f11f9ddaa1
2018-07-02 20:30:31 +07:00
Harald Welte 4e4521b3d5 Revert "Use python 3 for utilities"
This reverts commit 76c6c50405, which broke the obs builds. I'm really starting to get annoyed by ongoing python related breakage without ever fixing any bugs!

Change-Id: I4d76e897d4f746ff9ea4e06f2efc708a12cc2944
2018-02-09 08:49:26 +00:00
Max 76c6c50405 Use python 3 for utilities
There're no python2-specific code in there so we can switch right away
without waiting till 2020 for python 2 deprecation.

Related: OS#2819
Change-Id: I8d34aed124b00c5dd2ab1bcc84bbfa8c620282cc
2018-02-08 09:31:04 +00:00
Max 32e5641dbb Add functions for extended RACH coding
Add support for extended RACH (11 bit) according 3GPP TS 45.003 §5.3.2:

* convolutional code with puncturing
* encoding/decoding routines
* corresponding tests

Change-Id: I85a34a82d5cd39a594ee89d91a2338226066ab5d
Related: OS#1548
2017-12-11 10:36:47 +00:00
Vadim Yanitskiy 3262f820b5 libosmocoding: migrate transcoding routines from OsmoBTS
There are some projects, such as GR-GSM and OsmocomBB, which would
benefit from using one shared implementation of GSM 05.03 code. So,
this commit introduces a new sub-library called libosmocoding, which
(for now) provides GSM, GPRS and EDGE transcoding routines, migrated
from OsmoBTS.

The original GSM 05.03 code from OsmoBTS was relicensed under
GPLv2-or-later with permission of copyright holders (Andreas Eversberg,
Alexander Chemeris and Tom Tsou).

The following data types are currently supported:

 - xCCH
 - PDTCH (CS 1-4 and MCS 1-9)
 - TCH/FR
 - TCH/HR
 - TCH/AFS
 - RCH/AHS
 - RACH
 - SCH

Change-Id: I0c3256b87686d878e4e716d12393cad5924fdfa1
2017-03-07 01:06:38 +07:00
Vadim Yanitskiy 15492bcb26 utils/conv_gen.py: separate code definitions
This change separates the convolutional code definitions from the code
generator logic, allowing us to make further changes in more specific
way. For example, adding some new codes, you change the conv_codes.py
only because such change isn't related to the generator.

Change-Id: I3428561251b7d7a180d1e9b6fcaad50bdbbc37fa
2016-12-24 17:12:49 +00:00