aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-12-16 01:39:48 +0700
committerHarald Welte <laforge@gnumonks.org>2017-12-20 15:48:38 +0000
commite094157e125a70b9a384ba3cec01261624f4eb59 (patch)
treea714264f68ec809efc0b8775eca8349694aab8e2 /include
parent58a5665ecb72b2b4e2a9e33dde83d12060c41b4a (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/codec/codec.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/osmocom/codec/codec.h b/include/osmocom/codec/codec.h
index 3e62a013..6a1bf9fb 100644
--- a/include/osmocom/codec/codec.h
+++ b/include/osmocom/codec/codec.h
@@ -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 */