aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2023-05-03 15:01:23 +0200
committerlaforge <laforge@osmocom.org>2023-05-04 00:10:47 +0000
commit4cf72df3f9518ff306a0ecd89a890c9095addeac (patch)
tree6227416f75c94af2db065e8f1dcab7cab8d03647 /include
parentbeb7c1741ee8f39a96d5fab6845f415b232d5fb4 (diff)
codec: add define constants for RFC5993 and TS101318
The difference between the RFC5993 and the TS101318 format is only that RFC5993 has one additional ToC (Table of contents) byte at the beginning. However it can be difficult to remember which of the two formats has the ToC byte at at the beginning and which hasn't. Let's add a constant that defines the length for both formats so that we can make it more clear in the code which format we are refering to. Related: OS#5688 Change-Id: I125ef9cdab98c073971841c175b1a7dcd927f9c2
Diffstat (limited to 'include')
-rw-r--r--include/osmocom/codec/codec.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/osmocom/codec/codec.h b/include/osmocom/codec/codec.h
index 364385b6..a656bcf6 100644
--- a/include/osmocom/codec/codec.h
+++ b/include/osmocom/codec/codec.h
@@ -15,6 +15,10 @@
/* TS 101318 Chapter 5.3: 244 bits + 4bit sig */
#define GSM_EFR_BYTES 31
+/* Number of bytes of an GSM_HR RTP payload */
+#define GSM_HR_BYTES_RTP_RFC5993 (GSM_HR_BYTES + 1)
+#define GSM_HR_BYTES_RTP_TS101318 (GSM_HR_BYTES)
+
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 */