Change in libosmocore[master]: libosmocodec: FR err concealment: Fix too many silent frames generated

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Sat Jul 21 07:40:20 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/10073 )

Change subject: libosmocodec: FR err concealment: Fix too many silent frames generated
......................................................................

libosmocodec: FR err concealment: Fix too many silent frames generated

As stated in its own documentation, reduce_xmaxcr_all() should only
return true when ALL XMAXC fields return true. However, previous
implementation returned true when at least one of them returned true.

As a result, if any of the sections is silent (for instance because one
of the bursts was lost), the whole frame is silenced, returning a zeroed buffer.

Related: OS#2700
Fixes: 40def49ac4b8babbd1b17c232137ce50a428706b ("libosmocodec: implement ECU (Error Concealment Unit) for FR")
Change-Id: I1624b7c6574f53d0593a61645d4fdc5d56cabe96
---
M src/codec/ecu_fr.c
1 file changed, 5 insertions(+), 9 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Vadim Yanitskiy: Looks good to me, but someone else must approve
  dexter: Looks good to me, but someone else must approve
  Stefan Sperling: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/src/codec/ecu_fr.c b/src/codec/ecu_fr.c
index d4ea741..784a5b8 100644
--- a/src/codec/ecu_fr.c
+++ b/src/codec/ecu_fr.c
@@ -64,16 +64,12 @@
  */
 static bool reduce_xmaxcr_all(struct bitvec *frame_bitvec)
 {
-	bool silent = false;
+	bool silent = true;
 
-	if (reduce_xmaxcr(frame_bitvec, GSM610_RTP_XMAXC00))
-		silent = true;
-	if (reduce_xmaxcr(frame_bitvec, GSM610_RTP_XMAXC10))
-		silent = true;
-	if (reduce_xmaxcr(frame_bitvec, GSM610_RTP_XMAXC20))
-		silent = true;
-	if (reduce_xmaxcr(frame_bitvec, GSM610_RTP_XMAXC30))
-		silent = true;
+	silent &= reduce_xmaxcr(frame_bitvec, GSM610_RTP_XMAXC00);
+	silent &= reduce_xmaxcr(frame_bitvec, GSM610_RTP_XMAXC10);
+	silent &= reduce_xmaxcr(frame_bitvec, GSM610_RTP_XMAXC20);
+	silent &= reduce_xmaxcr(frame_bitvec, GSM610_RTP_XMAXC30);
 
 	return silent;
 }

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I1624b7c6574f53d0593a61645d4fdc5d56cabe96
Gerrit-Change-Number: 10073
Gerrit-PatchSet: 3
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Stefan Sperling <ssperling at sysmocom.de>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180721/fe0b0fee/attachment.htm>


More information about the gerrit-log mailing list