From 3a5917bd5044eaf5327d15766a2ef900433b6627 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Thu, 12 Mar 2020 13:22:53 +0100 Subject: gsm690: Fix amr speech bit length table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. Related: OS#2978 Change-Id: Icf330450981b32be5d1cee5b10aa92bac4cb72f5 --- src/codec/gsm690.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/codec/gsm690.c') diff --git a/src/codec/gsm690.c b/src/codec/gsm690.c index 19557164..8ab1df12 100644 --- a/src/codec/gsm690.c +++ b/src/codec/gsm690.c @@ -216,8 +216,9 @@ const uint16_t gsm690_4_75_bitorder[95] = { 92, 31, 52, 65, 86, }; +/* See also RFC 4867 §3.6, Table 1, Column "Total speech bits" */ static const uint8_t amr_len_by_ft[16] = { - 12, 13, 15, 17, 19, 20, 26, 31, 7, 0, 0, 0, 0, 0, 0, 0 + 12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0, 0, 0 }; const struct value_string osmo_amr_type_names[] = { -- cgit v1.2.3