|Age||Commit message (Collapse)||Author||Files||Lines|
These functions implement re-ordering of bits as per TS 06.90 / 26.101
based on the already existing tables we've had in libosmocoding.
The table amr_len_by_ft represents the length of the raw AMR speech bits
in bytes. The table is based on the Table found in RFC 4867 §3.6, Table 1,
Column "Total speech bits". The number of bits is divided by 8 and then
rounded up to get the number of consumed octets.
An AMR SID frame (including STI and MI) takes up 39 bits, this will
result in 5 octets, not in 7. Lets correct this.
The ECU implementation for FR is currently tested by calling the related
functions directly and by using the generic ECU abstraction layer. However,
the test "test_fr_concealment" only tests directly. Lets add a version
that uses the generic ECU abstraction layer as well.
The generic ECU abstraction layer obsolets the public API functions
osmo_ecu_fr_reset() and osmo_ecu_fr_conceal(), lets tag those functions
We don't want to expose the details of a given ECU implementation to
the user (e.g. osmo-bts), but have a generic abstraction layer where
an ECU implementation can simply register a few call-back functions
with the generic core.
As the developer and copyright holder of the related code, I hereby
state that any ECU implementation using 'struct osmo_ecu_ops' and
registering with the 'osmo_ecu_register()' function shall not be
considered as a derivative work under any applicable copyright law;
the copyleft terms of GPLv2 shall hence not apply to any such ECU
The intent of the above exception is to allow anyone to combine
third party Error Concealment Unit implementations with libosmocore,
including but not limited to such published by ETSI.
This buffer verifies that all XMAXC fields must be zero before the
entire buffer is considered as silent by osmo_ecu_fr_conceal().
This makes it easy to debug how XMAXC fields are decreased every
iteration in osmo_ecu_fr_conceal().
When a bad GSM voice frame is received, it's being replaced
by a silence frame. This may cause unpleasant audio effects.
This change implements a functionality to craft a replacement
frame from the last known good frame. Currently, only FR is
supported, support for other codecs may be added latter.
Let's fix some erroneous/accidential references to wrong license,
update copyright information where applicable and introduce a
SPDX-License-Identifier to all files.
Based on ETSI TS 101 318 section 5.1.2 the 95 bits SID code word
is not detected correctly due to a wrongful offset in the bits
our code is actually wrong, so let's skip the test until the fix is
applied in a follow-up patch.
Max's note: adjusted test output.
Check that RTP payload we're about to decode is not NULL and return
proper error code instead of segfaulting. Add corresponding test case.
Add functions which check if given FR or HR frame (packed in RTP)
contains SID (SIlence Descriptor) and corresponding tests.
Tested-by: Jenkins Builder
Reviewed-by: Harald Welte <firstname.lastname@example.org>
* add functions to encode/decode various codec paramters from RTP payload with
AMR frame according to RFC 4867
* those functions are extended version based on code from osmo-bts'
amr.c by Andreas Eversberg
* add corresponding enum types and strings for logging
* add regression tests
It's useful both to replace manual parsing in osmo-bts with fuctions
covered by test suite and as a debugging helpers for issues related to
Tested-by: Jenkins Builder
Reviewed-by: Holger Freyther <email@example.com>