Skip to content
Success

Changes

Summary

  1. AMR codec: add conversion between s-bits and codec parameters (details)
  2. AMR codec: add decoder homing frame const patterns (details)
Commit 76a10bb50ca95f1101fb487ccfceb1f362cf91c1 by falcon
AMR codec: add conversion between s-bits and codec parameters

At the lowest level of frame information content, before introducing
higher layers of RTP or TRAU frame or other encoding, an AMR codec
frame (speech or SID) can be represented in 3 fundamental ways:

* 35 to 244 s-bits as defined theoretically in TS 26.090 & 26.092
  and used in practice in 2G TRAU frames;

* 39 to 244 d-bits as defined theoretically in TS 26.101 and used in
  practice in 3G IuUP and in RTP;

* 5 to 57 codec parameters, each fitting into uint16_t, as implemented
  in 3GPP reference C code (TS 26.073) and assumed by the same spec
  in its listing of decoder homing frame bit patterns.

libosmocodec previously provided conversion functions between s-bits
and d-bits, as well as a table that gives the number of d-bits per
mode - but no conversion to or from arrays of codec parameters.
Add the latter functionality.

Change-Id: I28eae702204d7f7ff164e17c5e26152a94a12cba
The file was modifiedinclude/osmocom/codec/codec.h
The file was modifiedsrc/codec/gsm690.c
Commit 4ff65d694509bc108cbe59a74b79e8a7d89ce26c by falcon
AMR codec: add decoder homing frame const patterns

ETSI-defined decoder homing frames for HRv1 and EFR are already
captured in osmo_gsm620_homing_frame[] and osmo_gsm660_homing_frame[];
now add 3GPP-defined DHFs for AMR, all 8 modes.

These AMR DHFs are useful to have in libosmocodec:

* Future AMR-capable tw-e1abis-mgw will emit DHFs toward the BTS/CCU
  during prolonged absence of RTP input - needed because the alternative
  of emitting an endless stream of No_Data frames may produce undesirable
  effects on Um with some E1 BTS models.  If it is desired to bring
  tw-e1abis-mgw functionality into mainline Osmocom at some point,
  DHF bits need to reside somewhere in libosmo*.

* In future improvements of AMR support in osmo-bts-trx, it may be
  likewise desirable to transmit DHFs on Um downlink during the same
  conditions of prolonged absence of RTP input.

Change-Id: I1f8f8ec36cc13270a1d1fa633583107317abe894
The file was modifiedinclude/osmocom/codec/codec.h
The file was modifiedsrc/codec/gsm690.c