Change in libosmocore[master]: gsm690: Fix amr speech bit length table

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Thu Mar 12 12:29:46 UTC 2020


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/17470 )


Change subject: gsm690: Fix amr speech bit length table
......................................................................

gsm690: Fix amr speech bit length table

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
---
M src/codec/gsm690.c
1 file changed, 2 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/70/17470/1

diff --git a/src/codec/gsm690.c b/src/codec/gsm690.c
index 1955716..8ab1df1 100644
--- a/src/codec/gsm690.c
+++ b/src/codec/gsm690.c
@@ -216,8 +216,9 @@
 	 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[] = {

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17470
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Icf330450981b32be5d1cee5b10aa92bac4cb72f5
Gerrit-Change-Number: 17470
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200312/76e8f278/attachment.htm>


More information about the gerrit-log mailing list