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

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Fri Jul 20 12:04:18 UTC 2018


Pau Espin Pedrol has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/73/10073/1

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: newchange
Gerrit-Change-Id: I1624b7c6574f53d0593a61645d4fdc5d56cabe96
Gerrit-Change-Number: 10073
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180720/49147417/attachment.htm>


More information about the gerrit-log mailing list