From 43058efa939f36069cdac82f356bdc94ee10d0fc Mon Sep 17 00:00:00 2001 From: Jean-Francois Dionne Date: Thu, 27 Apr 2017 10:11:31 -0400 Subject: Fix wrongful GSM FR codec SID frame detection in DTX. Based on ETSI TS 101 318 section 5.1.2 the 95 bits SID code word is not detected correctly due to a wrongful offset in the bits location indexes. Change-Id: I45d98c6edf267f313883503a65385190ffbc65ca --- src/codec/gsm610.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/codec/gsm610.c b/src/codec/gsm610.c index 47faea21..165484df 100644 --- a/src/codec/gsm610.c +++ b/src/codec/gsm610.c @@ -306,16 +306,16 @@ const uint16_t gsm610_bitorder[260] = { bool osmo_fr_check_sid(uint8_t *rtp_payload, size_t payload_len) { struct bitvec bv; - uint16_t i, z_bits[] = { 59, 60, 62, 63, 65, 66, 68, 69, 71, 72, 74, 75, - 77, 78, 80, 81, 83, 84, 86, 87, 89, 90, 92, 93, - 95, 96, 115, 116, 118, 119, 121, 122, 124, 125, - 127, 128, 130, 131, 133, 134, 136, 137, 139, - 140, 142, 143, 145, 146, 148, 149, 151, 152, - 171, 172, 174, 175, 177, 178, 180, 181, 183, - 184, 186, 187, 189, 190, 192, 193, 195, 196, - 198, 199, 201, 202, 204, 205, 207, 208, 227, - 228, 230, 231, 233, 234, 236, 237, 239, 242, - 245, 248, 251, 254, 257, 260, 263 }; + uint16_t i, z_bits[] = { 57, 58, 60, 61, 63, 64, 66, 67, 69, 70, 72, 73, + 75, 76, 78, 79, 81, 82, 84, 85, 87, 88, 90, 91, + 93, 94, 113, 114, 116, 117, 119, 120, 122, 123, + 125, 126, 128, 129, 131, 132, 134, 135, 137, + 138, 140, 141, 143, 144, 146, 147, 149, 150, + 169, 170, 172, 173, 175, 176, 178, 179, 181, + 182, 184, 185, 187, 188, 190, 191, 193, 194, + 196, 197, 199, 200, 202, 203, 205, 206, 225, + 226, 228, 229, 231, 232, 234, 235, 237, 240, + 243, 246, 249, 252, 255, 258, 261 }; /* signature does not match Full Rate SID */ if ((rtp_payload[0] >> 4) != 0xD) -- cgit v1.2.3