fixeria has submitted this change. (
https://gerrit.osmocom.org/c/libosmocore/+/33649 )
Change subject: coding: remove redundant memset()s in
gsm0503_tch_fr{96,144}_encode()
......................................................................
coding: remove redundant memset()s in gsm0503_tch_fr{96,144}_encode()
Convolutional codes terminated with CONV_TERM_FLUSH (the default)
always append k-1 zeroes at the end to "flush" the encoder state.
This is the case for both TCH/F9.6 and TCH/F14.4.
Change-Id: I4a77ecb9af72b2fd4ea92c42d6748879e73d2cf2
Related: OS#1572
---
M src/coding/gsm0503_coding.c
1 file changed, 16 insertions(+), 2 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c
index 1249ce9..3faa512 100644
--- a/src/coding/gsm0503_coding.c
+++ b/src/coding/gsm0503_coding.c
@@ -3322,7 +3322,7 @@
/* 3.3.2 Block code: b1(60) + b2(60) + b3(60) + b4(60) + pad(4) */
memcpy(&conv[0], &data[0], 4 * 60);
- memset(&conv[240], 0, 4);
+ /* pad(4) is set to 0 by osmo_conv_encode() below */
/* 3.3.3 Convolutional encoder */
osmo_conv_encode(&gsm0503_tch_f96, &conv[0], &cB[0]);
@@ -3543,7 +3543,7 @@
/* 3.8.2 Block code: b(290) + pad(4) */
memcpy(&conv[0], &data[0], 290);
- memset(&conv[290], 0, 4);
+ /* pad(4) is set to 0 by osmo_conv_encode() below */
/* 3.8.3 Convolutional encoder */
osmo_conv_encode(&gsm0503_tch_f144, &conv[0], &cB[0]);
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/33649
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I4a77ecb9af72b2fd4ea92c42d6748879e73d2cf2
Gerrit-Change-Number: 33649
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged