[PATCH] Fix BENCHMARK_STOP call for AMR and FR

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/OpenBSC@lists.osmocom.org/.

Vadim Yanitskiy axilirator at gmail.com
Sun Sep 3 10:20:08 UTC 2017


---
 src/codec_amr.c | 4 ++--
 src/codec_fr.c  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/codec_amr.c b/src/codec_amr.c
index 4aae733..ca614ed 100644
--- a/src/codec_amr.c
+++ b/src/codec_amr.c
@@ -78,7 +78,7 @@ codec_amr_encode(void *state, uint8_t *cod, const uint8_t *pcm, unsigned int pcm
 		(unsigned char*) cod,
 		1
 	);
-	BENCHMARK_STOP(CODEC_EFR, 1);
+	BENCHMARK_STOP(CODEC_AMR, 1);
 
 	return rv;
 }
@@ -95,7 +95,7 @@ codec_amr_decode(void *state, uint8_t *pcm, const uint8_t *cod, unsigned int cod
 		(short *) pcm,
 		0
 	);
-	BENCHMARK_STOP(CODEC_EFR, 0);
+	BENCHMARK_STOP(CODEC_AMR, 0);
 
 	return PCM_CANON_LEN;
 }
diff --git a/src/codec_fr.c b/src/codec_fr.c
index 2ce44b4..917f34b 100644
--- a/src/codec_fr.c
+++ b/src/codec_fr.c
@@ -74,7 +74,7 @@ codec_fr_decode(void *state, uint8_t *pcm, const uint8_t *cod, unsigned int cod_
 	memcpy(cod_b, cod, FR_CANON_LEN);
 	BENCHMARK_START;
 	rc = gsm_decode(gh, (gsm_byte*)cod_b, (gsm_signal*)pcm);
-	BENCHMARK_STOP(CODEC_FR, 1);
+	BENCHMARK_STOP(CODEC_FR, 0);
 	if (rc < 0)
 		return rc;
 	return PCM_CANON_LEN;
-- 
2.14.1




More information about the OpenBSC mailing list