libosmocodec: add FR/HR/EFR frame length definitions

There are some projects, such as OsmoBTS and OsmocomBB, which
are dealing with raw TCH payloads, so they need to have the
FR/HR/EFR frame length defined. At the moment, each project
defines them itself. Let's share these definitions.

Change-Id: Ib19dd1bf81712d034157f9ce061008be0000ef38
This commit is contained in:
Vadim Yanitskiy 2017-12-16 01:39:48 +07:00 committed by Harald Welte
parent 58a5665ecb
commit e094157e12
1 changed files with 7 additions and 0 deletions

View File

@ -7,6 +7,13 @@
#include <osmocom/core/utils.h>
/* TS 101318 Chapter 5.1: 260 bits + 4bit sig */
#define GSM_FR_BYTES 33
/* TS 101318 Chapter 5.2: 112 bits, no sig */
#define GSM_HR_BYTES 14
/* TS 101318 Chapter 5.3: 244 bits + 4bit sig */
#define GSM_EFR_BYTES 31
extern const uint16_t gsm610_bitorder[]; /* FR */
extern const uint16_t gsm620_unvoiced_bitorder[]; /* HR unvoiced */
extern const uint16_t gsm620_voiced_bitorder[]; /* HR voiced */