Change in libosmo-netif[master]: Revert "amr: Fix OA<->BWE conversion."

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

neels gerrit-no-reply at lists.osmocom.org
Thu May 14 23:22:59 UTC 2020


Hello dexter, pespin, ipse, laforge, Jenkins Builder,

I'd like you to do a code review. Please visit

    https://gerrit.osmocom.org/c/libosmo-netif/+/18264

to review the following change.


Change subject: Revert "amr: Fix OA<->BWE conversion."
......................................................................

Revert "amr: Fix OA<->BWE conversion."

This reverts commit 002a51e2180cf19bf5e11e16d78271998d0b3f5c.

Reason for revert: amr_test fails with sanitizer build:

Sample No.: 6
   bw-efficient:  a7bfc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03f
                  1010011110111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111
../../../src/libosmo-netif/src/amr.c:63:24: runtime error: index 15 out of bounds for type 'size_t [9]'
../../../src/libosmo-netif/src/amr.c:63:24: runtime error: load of address 0x7f69498e56b8 with insufficient space for an object of type 'size_t'
0x7f69498e56b8: note: pointer points here
 00 00 00 00  00 00 00 00 00 00 00 00  5f 00 00 00 00 00 00 00  67 00 00 00 00 00 00 00  76 00 00 00
              ^ 
=================================================================
==489935==ERROR: AddressSanitizer: global-buffer-overflow on address 0x7f69498e56b8 at pc 0x7f69498abec7 bp 0x7ffeafb35330 sp 0x7ffeafb35328
READ of size 8 at 0x7f69498e56b8 thread T0
    #0 0x7f69498abec6 in osmo_amr_bytes ../../../src/libosmo-netif/src/amr.c:63
    #1 0x7f69498ac661 in osmo_amr_bwe_to_oa ../../../src/libosmo-netif/src/amr.c:193
    #2 0x5648b11afb96 in osmo_amr_bwe_to_oa_test ../../../src/libosmo-netif/tests/amr/amr_test.c:134
    #3 0x5648b11af31d in main ../../../src/libosmo-netif/tests/amr/amr_test.c:235
    #4 0x7f6948d5de0a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x26e0a)
    #5 0x5648b11af3d9 in _start (/n/s/dev/make/libosmo-netif/tests/amr/amr_test+0x43d9)

0x7f69498e56b8 is located 8 bytes to the left of global variable 'amr_ft_to_bits' defined in '../../../src/libosmo-netif/src/amr.c:32:15' (0x7f69498e56c0) of size 72
0x7f69498e56b8 is located 48 bytes to the right of global variable 'amr_ft_to_bytes' defined in '../../../src/libosmo-netif/src/amr.c:44:15' (0x7f69498e5640) of size 72
SUMMARY: AddressSanitizer: global-buffer-overflow ../../../src/libosmo-netif/src/amr.c:63 in osmo_amr_bytes

Change-Id: I8232521c513722435e71dc90bdbfee10f8f83496
---
M include/osmocom/netif/amr.h
M src/amr.c
M tests/amr/amr_test.c
M tests/amr/amr_test.ok
4 files changed, 74 insertions(+), 144 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/64/18264/1

diff --git a/include/osmocom/netif/amr.h b/include/osmocom/netif/amr.h
index c5a8e28..6e37c99 100644
--- a/include/osmocom/netif/amr.h
+++ b/include/osmocom/netif/amr.h
@@ -78,34 +78,20 @@
 #define AMR_FT_SID	8	/* SID */
 #define AMR_FT_MAX	9
 
-/* AMR voice frame length (in bits).
- * See also RFC 3267, chapter 3.6.
- *
- * NOTE: These constants refer to the length of one AMR speech frame-block,
- * not counting CMR, TOC. */
-#define AMR_FT_0_LEN_BITS	95	/* 4.75 */
-#define AMR_FT_1_LEN_BITS	103	/* 5.15 */
-#define AMR_FT_2_LEN_BITS	118	/* 5.90 */
-#define AMR_FT_3_LEN_BITS	134	/* 6.70 */
-#define AMR_FT_4_LEN_BITS	148	/* 7.40 */
-#define AMR_FT_5_LEN_BITS	159	/* 7.95 */
-#define AMR_FT_6_LEN_BITS	204	/* 10.2 */
-#define AMR_FT_7_LEN_BITS	244	/* 12.2 */
-#define AMR_FT_SID_LEN_BITS	39	/* SID */
+/* AMR voice frame length (in bytes, rounded),
+ * See also RFC 3267, chapter 3.6 */
+#define AMR_FT_0_LEN	12	/* 4.75 */
+#define AMR_FT_1_LEN	13	/* 5.15 */
+#define AMR_FT_2_LEN	15	/* 5.90 */
+#define AMR_FT_3_LEN	17	/* 6.70 */
+#define AMR_FT_4_LEN	19	/* 7.40 */
+#define AMR_FT_5_LEN	20	/* 7.95 */
+#define AMR_FT_6_LEN	26	/* 10.2 */
+#define AMR_FT_7_LEN	31	/* 12.2 */
+#define AMR_FT_SID_LEN	5	/* SID */
 
-/* AMR voice frame length (in bytes, rounded).
- *
- * NOTE: These constants refer to the length of one AMR speech frame-block,
+/* NOTE: the above constant refers to the length of one AMR speech frame-block,
  * not counting CMR, TOC. */
-#define AMR_FT_0_LEN	((AMR_FT_0_LEN_BITS+7)/8)	/* 4.75 */
-#define AMR_FT_1_LEN	((AMR_FT_1_LEN_BITS+7)/8)	/* 5.15 */
-#define AMR_FT_2_LEN	((AMR_FT_2_LEN_BITS+7)/8)	/* 5.90 */
-#define AMR_FT_3_LEN	((AMR_FT_3_LEN_BITS+7)/8)	/* 6.70 */
-#define AMR_FT_4_LEN	((AMR_FT_4_LEN_BITS+7)/8)	/* 7.40 */
-#define AMR_FT_5_LEN	((AMR_FT_5_LEN_BITS+7)/8)	/* 7.95 */
-#define AMR_FT_6_LEN	((AMR_FT_6_LEN_BITS+7)/8)	/* 10.2 */
-#define AMR_FT_7_LEN	((AMR_FT_7_LEN_BITS+7)/8)	/* 12.2 */
-#define AMR_FT_SID_LEN	((AMR_FT_SID_LEN_BITS+7)/8)	/* SID */
 
 int osmo_amr_ft_valid(uint8_t amr_ft);
 size_t osmo_amr_bytes(uint8_t amr_cmr);
diff --git a/src/amr.c b/src/amr.c
index a6b8361..5609c46 100644
--- a/src/amr.c
+++ b/src/amr.c
@@ -29,18 +29,6 @@
  *      7         12.20      244    31
  */
 
-static size_t amr_ft_to_bits[AMR_FT_MAX] = {
-	[AMR_FT_0]	= AMR_FT_0_LEN_BITS,
-	[AMR_FT_1]	= AMR_FT_1_LEN_BITS,
-	[AMR_FT_2]	= AMR_FT_2_LEN_BITS,
-	[AMR_FT_3]	= AMR_FT_3_LEN_BITS,
-	[AMR_FT_4]	= AMR_FT_4_LEN_BITS,
-	[AMR_FT_5]	= AMR_FT_5_LEN_BITS,
-	[AMR_FT_6]	= AMR_FT_6_LEN_BITS,
-	[AMR_FT_7]	= AMR_FT_7_LEN_BITS,
-	[AMR_FT_SID]	= AMR_FT_SID_LEN_BITS,
-};
-
 static size_t amr_ft_to_bytes[AMR_FT_MAX] = {
 	[AMR_FT_0]	= AMR_FT_0_LEN,
 	[AMR_FT_1]	= AMR_FT_1_LEN,
@@ -53,11 +41,6 @@
 	[AMR_FT_SID]	= AMR_FT_SID_LEN,
 };
 
-size_t osmo_amr_bits(uint8_t amr_ft)
-{
-	return amr_ft_to_bits[amr_ft];
-}
-
 size_t osmo_amr_bytes(uint8_t amr_ft)
 {
 	return amr_ft_to_bytes[amr_ft];
@@ -136,10 +119,8 @@
 int osmo_amr_oa_to_bwe(uint8_t *payload, unsigned int payload_len)
 {
 	struct amr_hdr *oa_hdr = (struct amr_hdr *)payload;
-	unsigned int ft = oa_hdr->ft;
 	unsigned int frame_len = payload_len - sizeof(struct amr_hdr);
 	unsigned int i;
-	int bwe_payload_len;
 
 	/* This implementation is not capable to handle multi-frame
 	 * packets, so we need to make sure that the frame we operate on
@@ -156,10 +137,8 @@
 		payload[i + 2] = payload[i + 2] << 6;
 	}
 
-	/* Calculate new payload length */
-	bwe_payload_len = (10 + osmo_amr_bits(ft) + 7) / 8;
-
-	return bwe_payload_len;
+	/* The overall saving is one byte! */
+	return payload_len - 1;
 }
 
 /*! Convert an AMR frame from bandwith-efficient mode to octet-aligned mode.
@@ -171,10 +150,8 @@
 		       unsigned int payload_maxlen)
 {
 	uint8_t buf[256];
-	/* The header is only valid after shifting first two bytes to OA mode */
-	struct amr_hdr *oa_hdr;
+	unsigned int frame_len = payload_len - 1;
 	unsigned int i;
-	int oa_payload_len;
 
 	memset(buf, 0, sizeof(buf));
 
@@ -188,16 +165,12 @@
 	buf[1] = payload[0] << 4;
 	buf[1] |= (payload[1] >> 4) & 0x0c;
 
-	/* Calculate new payload length */
-	oa_hdr = (struct amr_hdr *)buf;
-	oa_payload_len = 2 + osmo_amr_bytes(oa_hdr->ft);
-
-	for (i = 0; i < oa_payload_len - 2; i++) {
+	for (i = 0; i < frame_len - 1; i++) {
 		buf[i + 2] = payload[i + 1] << 2;
 		buf[i + 2] |= payload[i + 2] >> 6;
 	}
 	buf[i + 2] = payload[i + 1] << 2;
 
-	memcpy(payload, buf, oa_payload_len);
-	return oa_payload_len;
+	memcpy(payload, buf, payload_len + 1);
+	return payload_len + 1;
 }
diff --git a/tests/amr/amr_test.c b/tests/amr/amr_test.c
index af10289..fff686c 100644
--- a/tests/amr/amr_test.c
+++ b/tests/amr/amr_test.c
@@ -44,9 +44,6 @@
 	"100c4e9ba850e30d5d53d04de41e7c",
 	"100c6c18e7b7fff53aeb055e7d1c54",
 	"100c1fb967f7f1fdf547bf2e61c060",
-	"0004f89d67f1160935bde1996840",
-	"0004633cc7f0630439ffe0000000",
-	"0004eb81fc0758973b9edc782552",
 	"a038ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00fc",	/* test pattern */
 	"END",
 };
@@ -90,6 +87,7 @@
 			return;
 		printf("\n");
 		printf("Sample No.: %i\n", i);
+		len = strlen(oa_amr_samples[i]);
 
 		len = osmo_hexparse(oa_amr_samples[i], buf, sizeof(buf));
 		OSMO_ASSERT(len > 0);
@@ -104,6 +102,11 @@
 		dump_bits(buf, rc);
 		printf("\n");
 		printf("   rc: %i\n", rc);
+
+		if (rc > 0) {
+			OSMO_ASSERT(rc == len - 1);
+			OSMO_ASSERT(buf[len - 1] == 0x00);
+		}
 		i++;
 	}
 }
@@ -123,6 +126,7 @@
 			return;
 		printf("\n");
 		printf("Sample No.: %i\n", i);
+		len = strlen(bwe_amr_samples[i]);
 
 		len = osmo_hexparse(bwe_amr_samples[i], buf, sizeof(buf));
 		OSMO_ASSERT(len > 0);
@@ -138,6 +142,7 @@
 		printf("\n");
 		printf("   rc: %i\n", rc);
 
+		OSMO_ASSERT(rc == len + 1);
 		i++;
 	}
 }
@@ -146,8 +151,6 @@
 {
 	uint8_t buf[256];
 	uint8_t buf_chk[256];
-	struct amr_hdr *oa_hd = (struct amr_hdr *)buf;
-	unsigned int ft;
 
 	unsigned int i = 0;
 	int len;
@@ -160,21 +163,16 @@
 	while (1) {
 		if (strcmp(oa_amr_samples[i], "END") == 0)
 			return;
-		printf("Sample No.: %i...", i);
+		printf("Sample No.: %i...\n", i);
+		len = strlen(oa_amr_samples[i]);
 
 		len = osmo_hexparse(oa_amr_samples[i], buf, sizeof(buf));
 		OSMO_ASSERT(len > 0);
-		ft = oa_hd->ft;
-		OSMO_ASSERT(osmo_amr_bytes(ft) + 2 == len);
-		printf(" AMR mode: %d, OA: %d bytes,", ft, len);
 		memcpy(buf_chk, buf, sizeof(buf));
 
 		rc = osmo_amr_oa_to_bwe(buf, len);
 		OSMO_ASSERT(rc > 0);
-		printf(" BE: %d bytes,", rc);
 		rc = osmo_amr_bwe_to_oa(buf, rc, sizeof(buf));
-		printf(" OA: %d bytes\n", rc);
-		OSMO_ASSERT(len == rc);
 		OSMO_ASSERT(memcmp(buf, buf_chk, len) == 0);
 		i++;
 	}
diff --git a/tests/amr/amr_test.ok b/tests/amr/amr_test.ok
index 692563d..ea34fea 100644
--- a/tests/amr/amr_test.ok
+++ b/tests/amr/amr_test.ok
@@ -47,23 +47,23 @@
 Sample No.: 6
    octet aligned: 502c98ab841e491ff7a1a555016a32a3c7f913210630
                   01010000001011001001100010101011100001000001111001001001000111111111011110100001101001010101010100000001011010100011001010100011110001111111100100010011001000010000011000110000
-   bw-efficient:  52e62ae1079247fde86955405a8ca8f1fe44c8418c00
-                  01010010111001100010101011100001000001111001001001000111111111011110100001101001010101010100000001011010100011001010100011110001111111100100010011001000010000011000110000000000
-   rc: 22
+   bw-efficient:  52e62ae1079247fde86955405a8ca8f1fe44c8418c
+                  010100101110011000101010111000010000011110010010010001111111110111101000011010010101010101000000010110101000110010101000111100011111111001000100110010000100000110001100
+   rc: 21
 
 Sample No.: 7
    octet aligned: 502cc5459a0d200e7097c4dfe86ec8d27f1756d776f0
                   01010000001011001100010101000101100110100000110100100000000011100111000010010111110001001101111111101000011011101100100011010010011111110001011101010110110101110111011011110000
-   bw-efficient:  52f151668348039c25f137fa1bb2349fc5d5b5ddbc00
-                  01010010111100010101000101100110100000110100100000000011100111000010010111110001001101111111101000011011101100100011010010011111110001011101010110110101110111011011110000000000
-   rc: 22
+   bw-efficient:  52f151668348039c25f137fa1bb2349fc5d5b5ddbc
+                  010100101111000101010001011001101000001101001000000000111001110000100101111100010011011111111010000110111011001000110100100111111100010111010101101101011101110110111100
+   rc: 21
 
 Sample No.: 8
    octet aligned: 502c42b332081813d7e916e7aa5e80d7fde812b8c080
                   01010000001011000100001010110011001100100000100000011000000100111101011111101001000101101110011110101010010111101000000011010111111111011110100000010010101110001100000010000000
-   bw-efficient:  52d0accc820604f5fa45b9ea97a035ff7a04ae302000
-                  01010010110100001010110011001100100000100000011000000100111101011111101001000101101110011110101010010111101000000011010111111111011110100000010010101110001100000010000000000000
-   rc: 22
+   bw-efficient:  52d0accc820604f5fa45b9ea97a035ff7a04ae3020
+                  010100101101000010101100110011001000001000000110000001001111010111111010010001011011100111101010100101111010000000110101111111110111101000000100101011100011000000100000
+   rc: 21
 
 Sample No.: 9
    octet aligned: 40240343e959c79bacd20c77501054880a718db200
@@ -110,46 +110,25 @@
 Sample No.: 15
    octet aligned: 100c4e9ba850e30d5d53d04de41e7c
                   000100000000110001001110100110111010100001010000111000110000110101011101010100111101000001001101111001000001111001111100
-   bw-efficient:  10d3a6ea1438c35754f41379079f00
-                  000100001101001110100110111010100001010000111000110000110101011101010100111101000001001101111001000001111001111100000000
-   rc: 15
+   bw-efficient:  10d3a6ea1438c35754f41379079f
+                  0001000011010011101001101110101000010100001110001100001101010111010101001111010000010011011110010000011110011111
+   rc: 14
 
 Sample No.: 16
    octet aligned: 100c6c18e7b7fff53aeb055e7d1c54
                   000100000000110001101100000110001110011110110111111111111111010100111010111010110000010101011110011111010001110001010100
-   bw-efficient:  10db0639edfffd4ebac1579f471500
-                  000100001101101100000110001110011110110111111111111111010100111010111010110000010101011110011111010001110001010100000000
-   rc: 15
+   bw-efficient:  10db0639edfffd4ebac1579f4715
+                  0001000011011011000001100011100111101101111111111111110101001110101110101100000101010111100111110100011100010101
+   rc: 14
 
 Sample No.: 17
    octet aligned: 100c1fb967f7f1fdf547bf2e61c060
                   000100000000110000011111101110010110011111110111111100011111110111110101010001111011111100101110011000011100000001100000
-   bw-efficient:  10c7ee59fdfc7f7d51efcb98701800
-                  000100001100011111101110010110011111110111111100011111110111110101010001111011111100101110011000011100000001100000000000
-   rc: 15
+   bw-efficient:  10c7ee59fdfc7f7d51efcb987018
+                  0001000011000111111011100101100111111101111111000111111101111101010100011110111111001011100110000111000000011000
+   rc: 14
 
 Sample No.: 18
-   octet aligned: 0004f89d67f1160935bde1996840
-                  0000000000000100111110001001110101100111111100010001011000001001001101011011110111100001100110010110100001000000
-   bw-efficient:  007e2759fc45824d6f78665a1000
-                  0000000001111110001001110101100111111100010001011000001001001101011011110111100001100110010110100001000000000000
-   rc: 14
-
-Sample No.: 19
-   octet aligned: 0004633cc7f0630439ffe0000000
-                  0000000000000100011000110011110011000111111100000110001100000100001110011111111111100000000000000000000000000000
-   bw-efficient:  0058cf31fc18c10e7ff800000000
-                  0000000001011000110011110011000111111100000110001100000100001110011111111111100000000000000000000000000000000000
-   rc: 14
-
-Sample No.: 20
-   octet aligned: 0004eb81fc0758973b9edc782552
-                  0000000000000100111010111000000111111100000001110101100010010111001110111001111011011100011110000010010101010010
-   bw-efficient:  007ae07f01d625cee7b71e095480
-                  0000000001111010111000000111111100000001110101100010010111001110111001111011011100011110000010010101010010000000
-   rc: 14
-
-Sample No.: 21
    octet aligned: a038ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00fc
                   101000000011100011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111100
    bw-efficient:  a3bfc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03f
@@ -162,16 +141,16 @@
 Sample No.: 0
    bw-efficient:  f4495c7cda8f80
                   11110100010010010101110001111100110110101000111110000000
-   octet aligned: f0442571f36a3e
-                  11110000010001000010010101110001111100110110101000111110
-   rc: 7
+   octet aligned: f0442571f36a3e00
+                  1111000001000100001001010111000111110011011010100011111000000000
+   rc: 8
 
 Sample No.: 1
    bw-efficient:  f44aaa6c969780
                   11110100010010101010101001101100100101101001011110000000
-   octet aligned: f0442aa9b25a5e
-                  11110000010001000010101010101001101100100101101001011110
-   rc: 7
+   octet aligned: f0442aa9b25a5e00
+                  1111000001000100001010101010100110110010010110100101111000000000
+   rc: 8
 
 Sample No.: 2
    bw-efficient:  f3d09c20e32da600c025a72e0a9b360386e40f87e19282094adc1a11e397d1d4
@@ -204,34 +183,31 @@
 Sample No.: 6
    bw-efficient:  a7bfc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03fc03f
                   1010011110111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111
-   octet aligned: a078ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00fc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-                  10100000011110001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-   rc: 136
+   octet aligned: a078ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00ff00fc
+                  101000000111100011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111111000000001111111100000000111111110000000011111100
+   rc: 33
 
 
 Testing conversion from octet-aligned to bw-efficient and inverse:
-Sample No.: 0... AMR mode: 7, OA: 33 bytes, BE: 32 bytes, OA: 33 bytes
-Sample No.: 1... AMR mode: 7, OA: 33 bytes, BE: 32 bytes, OA: 33 bytes
-Sample No.: 2... AMR mode: 7, OA: 33 bytes, BE: 32 bytes, OA: 33 bytes
-Sample No.: 3... AMR mode: 6, OA: 28 bytes, BE: 27 bytes, OA: 28 bytes
-Sample No.: 4... AMR mode: 6, OA: 28 bytes, BE: 27 bytes, OA: 28 bytes
-Sample No.: 5... AMR mode: 6, OA: 28 bytes, BE: 27 bytes, OA: 28 bytes
-Sample No.: 6... AMR mode: 5, OA: 22 bytes, BE: 22 bytes, OA: 22 bytes
-Sample No.: 7... AMR mode: 5, OA: 22 bytes, BE: 22 bytes, OA: 22 bytes
-Sample No.: 8... AMR mode: 5, OA: 22 bytes, BE: 22 bytes, OA: 22 bytes
-Sample No.: 9... AMR mode: 4, OA: 21 bytes, BE: 20 bytes, OA: 21 bytes
-Sample No.: 10... AMR mode: 4, OA: 21 bytes, BE: 20 bytes, OA: 21 bytes
-Sample No.: 11... AMR mode: 4, OA: 21 bytes, BE: 20 bytes, OA: 21 bytes
-Sample No.: 12... AMR mode: 2, OA: 17 bytes, BE: 16 bytes, OA: 17 bytes
-Sample No.: 13... AMR mode: 2, OA: 17 bytes, BE: 16 bytes, OA: 17 bytes
-Sample No.: 14... AMR mode: 2, OA: 17 bytes, BE: 16 bytes, OA: 17 bytes
-Sample No.: 15... AMR mode: 1, OA: 15 bytes, BE: 15 bytes, OA: 15 bytes
-Sample No.: 16... AMR mode: 1, OA: 15 bytes, BE: 15 bytes, OA: 15 bytes
-Sample No.: 17... AMR mode: 1, OA: 15 bytes, BE: 15 bytes, OA: 15 bytes
-Sample No.: 18... AMR mode: 0, OA: 14 bytes, BE: 14 bytes, OA: 14 bytes
-Sample No.: 19... AMR mode: 0, OA: 14 bytes, BE: 14 bytes, OA: 14 bytes
-Sample No.: 20... AMR mode: 0, OA: 14 bytes, BE: 14 bytes, OA: 14 bytes
-Sample No.: 21... AMR mode: 7, OA: 33 bytes, BE: 32 bytes, OA: 33 bytes
+Sample No.: 0...
+Sample No.: 1...
+Sample No.: 2...
+Sample No.: 3...
+Sample No.: 4...
+Sample No.: 5...
+Sample No.: 6...
+Sample No.: 7...
+Sample No.: 8...
+Sample No.: 9...
+Sample No.: 10...
+Sample No.: 11...
+Sample No.: 12...
+Sample No.: 13...
+Sample No.: 14...
+Sample No.: 15...
+Sample No.: 16...
+Sample No.: 17...
+Sample No.: 18...
 
 
 Testing detection of octet-aligned mode payloads:
@@ -254,9 +230,6 @@
 Sample No.: 16 ==>octet aligned
 Sample No.: 17 ==>octet aligned
 Sample No.: 18 ==>octet aligned
-Sample No.: 19 ==>octet aligned
-Sample No.: 20 ==>octet aligned
-Sample No.: 21 ==>octet aligned
 Sample No.: 0 ==>bandwith efficient
 Sample No.: 1 ==>bandwith efficient
 Sample No.: 2 ==>bandwith efficient

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

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: I8232521c513722435e71dc90bdbfee10f8f83496
Gerrit-Change-Number: 18264
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: ipse <Alexander.Chemeris at gmail.com>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200514/0bc6c901/attachment.htm>


More information about the gerrit-log mailing list