Change in libosmocore[master]: parity: add amr crc14 definition

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/.

laforge gerrit-no-reply at lists.osmocom.org
Mon Mar 9 16:56:20 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/17325 )

Change subject: parity: add amr crc14 definition
......................................................................

parity: add amr crc14 definition

AMR not only specifies a 6 bit CRC for regular voice information. It also
specifies a 14 bit CRC to protect the comfort noise updates contained in
the SID_UPDATE frames.

Change-Id: I5cfd8ca806aba8d42cb9787f69605cea7de6e900
Related: OS#2978
---
M include/osmocom/coding/gsm0503_parity.h
M src/coding/gsm0503_parity.c
M src/coding/libosmocoding.map
3 files changed, 13 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/include/osmocom/coding/gsm0503_parity.h b/include/osmocom/coding/gsm0503_parity.h
index 28a5444..c35477f 100644
--- a/include/osmocom/coding/gsm0503_parity.h
+++ b/include/osmocom/coding/gsm0503_parity.h
@@ -19,5 +19,6 @@
 const struct osmo_crc8gen_code gsm0503_tch_fr_crc3;
 const struct osmo_crc8gen_code gsm0503_tch_efr_crc8;
 const struct osmo_crc8gen_code gsm0503_amr_crc6;
+const struct osmo_crc16gen_code gsm0503_amr_crc14;
 
 /*! @} */
diff --git a/src/coding/gsm0503_parity.c b/src/coding/gsm0503_parity.c
index 874114f..a8daacc 100644
--- a/src/coding/gsm0503_parity.c
+++ b/src/coding/gsm0503_parity.c
@@ -134,4 +134,15 @@
 	.remainder = 0x3f,
 };
 
+/*! GSM AMR parity (SID_UPDATE)
+ *
+ * g(x) = x^14 + x^13 + x^5 + x^3 + x^2 + 1
+ */
+const struct osmo_crc16gen_code gsm0503_amr_crc14 = {
+	.bits = 14,
+	.poly = 0x202d,
+	.init = 0x0000,
+	.remainder = 0x3fff,
+};
+
 /*! @} */
diff --git a/src/coding/libosmocoding.map b/src/coding/libosmocoding.map
index 87b3886..7f88111 100644
--- a/src/coding/libosmocoding.map
+++ b/src/coding/libosmocoding.map
@@ -56,6 +56,7 @@
 gsm0503_tch_fr_crc3;
 gsm0503_tch_efr_crc8;
 gsm0503_amr_crc6;
+gsm0503_amr_crc14;
 
 gsm0503_xcch_burst_unmap;
 gsm0503_xcch_burst_map;

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I5cfd8ca806aba8d42cb9787f69605cea7de6e900
Gerrit-Change-Number: 17325
Gerrit-PatchSet: 3
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200309/6575c9f9/attachment.htm>


More information about the gerrit-log mailing list