Changes of Revision 151

libosmocore.spec Changed
x
 
1
@@ -14,13 +14,13 @@
2
 
3
 Name:           libosmocore
4
 Requires: osmocom-master
5
-Version: 1.8.0.134.a9c2
6
+Version: 1.8.0.137.57a3
7
 Release:        0
8
 Summary:        The Open Source Mobile Communications Core Library
9
 License:        GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND AGPL-3.0-or-later
10
 Group:          Productivity/Telephony/Utilities
11
 Url:            https://osmocom.org/projects/libosmocore/wiki/Libosmocore
12
-Source: libosmocore_1.8.0.134.a9c2.tar.xz
13
+Source: libosmocore_1.8.0.137.57a3.tar.xz
14
 Source1: rpmlintrc
15
 BuildRequires:  automake >= 1.6
16
 BuildRequires:  libtool >= 2
17
commit_57a3b3a51fff40cff46c632285cd91e7458bf84e.txt Added
commit_a9c29b45ea00dd0f9395326e49110be7cae8dcaa.txt Deleted
libosmocore_1.8.0.134.a9c2.dsc -> libosmocore_1.8.0.137.57a3.dsc Changed
22
 
1
@@ -2,7 +2,7 @@
2
 Source: libosmocore
3
 Binary: libosmocore, libosmocodec0, libosmocodec-doc, libosmocoding0, libosmocoding-doc, libosmocore20, libosmocore-doc, libosmogb14, libosmogb-doc, libosmogsm18, libosmogsm-doc, libosmoisdn0, libosmoisdn-doc, libosmovty9, libosmovty-doc, libosmoctrl0, libosmoctrl-doc, libosmosim2, libosmosim-doc, libosmousb0, libosmousb-doc, libosmocore-dev, libosmocore-utils, libosmocore-dbg
4
 Architecture: any all
5
-Version: 1.8.0.134.a9c2
6
+Version: 1.8.0.137.57a3
7
 Maintainer: Osmocom team <openbsc@lists.osmocom.org>
8
 Homepage: https://projects.osmocom.org/projects/libosmocore
9
 Standards-Version: 3.9.8
10
@@ -35,8 +35,8 @@
11
  libosmovty-doc deb doc optional arch=all
12
  libosmovty9 deb libs optional arch=any
13
 Checksums-Sha1:
14
- 002ef495ace602278818e827149379848e0b274f 1043768 libosmocore_1.8.0.134.a9c2.tar.xz
15
+ 0c34858e2c5d17ed726543f4cf51b0d341e67e1c 1043904 libosmocore_1.8.0.137.57a3.tar.xz
16
 Checksums-Sha256:
17
- 1d915eb1d25afade3adb0e918204ee482e6a5051bf3a399a3782925257448065 1043768 libosmocore_1.8.0.134.a9c2.tar.xz
18
+ 88ac3acd213f551a2e18703c783f5c5dad8fcffcddd8011922684e43a0f76919 1043904 libosmocore_1.8.0.137.57a3.tar.xz
19
 Files:
20
- 212a8adba0bebdc8351768ce05ed769e 1043768 libosmocore_1.8.0.134.a9c2.tar.xz
21
+ 39d5ea0678452b136c02c1cc6dbf362f 1043904 libosmocore_1.8.0.137.57a3.tar.xz
22
libosmocore_1.8.0.134.a9c2.tar.xz/.tarball-version -> libosmocore_1.8.0.137.57a3.tar.xz/.tarball-version Changed
4
 
1
@@ -1 +1 @@
2
-1.8.0.134-a9c2
3
+1.8.0.137-57a3
4
libosmocore_1.8.0.134.a9c2.tar.xz/TODO-RELEASE -> libosmocore_1.8.0.137.57a3.tar.xz/TODO-RELEASE Changed
7
 
1
@@ -11,3 +11,5 @@
2
 libosmocore ADD     new defines in osmocom/gsm/protocol/gsm_04_08.h (old ones marked deprecated)
3
 libosmovty drop API        drop struct vty_parent_node from public API, it should never have been public
4
 libosmocore ADD     new API osmo_io_*()
5
+libosmocoding  ADD new gsm0503_tch_hr_decode2() public API, previous API
6
+           gsm0503_tch_hr_decode() marked as deprecated
7
libosmocore_1.8.0.134.a9c2.tar.xz/debian/changelog -> libosmocore_1.8.0.137.57a3.tar.xz/debian/changelog Changed
12
 
1
@@ -1,8 +1,8 @@
2
-libosmocore (1.8.0.134.a9c2) unstable; urgency=medium
3
+libosmocore (1.8.0.137.57a3) unstable; urgency=medium
4
 
5
   * Automatically generated changelog entry for building the Osmocom master feed
6
 
7
- -- Osmocom OBS scripts <info@osmocom.org>  Mon, 22 May 2023 15:42:17 +0000
8
+ -- Osmocom OBS scripts <info@osmocom.org>  Tue, 23 May 2023 18:09:31 +0000
9
 
10
 libosmocore (1.8.0) unstable; urgency=medium
11
 
12
libosmocore_1.8.0.134.a9c2.tar.xz/include/osmocom/coding/gsm0503_coding.h -> libosmocore_1.8.0.137.57a3.tar.xz/include/osmocom/coding/gsm0503_coding.h Changed
11
 
1
@@ -50,6 +50,9 @@
2
 
3
 int gsm0503_tch_hr_encode(ubit_t *bursts, const uint8_t *tch_data, int len);
4
 int gsm0503_tch_hr_decode(uint8_t *tch_data, const sbit_t *bursts, int odd,
5
+   int *n_errors, int *n_bits_total)
6
+   OSMO_DEPRECATED("Use gsm0503_tch_hr_decode2() instead");
7
+int gsm0503_tch_hr_decode2(uint8_t *tch_data, const sbit_t *bursts, int odd,
8
    int *n_errors, int *n_bits_total);
9
 
10
 int gsm0503_tch_afs_encode(ubit_t *bursts, const uint8_t *tch_data, int len,
11
libosmocore_1.8.0.134.a9c2.tar.xz/src/coding/gsm0503_coding.c -> libosmocore_1.8.0.137.57a3.tar.xz/src/coding/gsm0503_coding.c Changed
124
 
1
@@ -1572,24 +1572,22 @@
2
    }
3
 }
4
 
5
-/* assemble a HR codec frame in format as used inside RTP */
6
+/* assemble a HR codec frame in the canonical format of ETSI TS 101 318 */
7
 static void tch_hr_reassemble(uint8_t *tch_data, const ubit_t *b_bits)
8
 {
9
-   int i, j;
10
-
11
-   tch_data0 = 0x00; /* F = 0, FT = 000 */
12
-   memset(tch_data + 1, 0, 14);
13
+   int i;
14
 
15
-   for (i = 0, j = 8; i < 112; i++, j++)
16
-       tch_dataj >> 3 |= (b_bitsi << (7 - (j & 7)));
17
+   memset(tch_data, 0, GSM_HR_BYTES);
18
+   for (i = 0; i < 112; i++)
19
+       tch_datai >> 3 |= (b_bitsi << (7 - (i & 7)));
20
 }
21
 
22
 static void tch_hr_disassemble(ubit_t *b_bits, const uint8_t *tch_data)
23
 {
24
-   int i, j;
25
+   int i;
26
 
27
-   for (i = 0, j = 8; i < 112; i++, j++)
28
-       b_bitsi = (tch_dataj >> 3 >> (7 - (j & 7))) & 1;
29
+   for (i = 0; i < 112; i++)
30
+       b_bitsi = (tch_datai >> 3 >> (7 - (i & 7))) & 1;
31
 }
32
 
33
 /* assemble a EFR codec frame in format as used inside RTP */
34
@@ -1977,13 +1975,13 @@
35
 }
36
 
37
 /*! Perform channel decoding of a HR(v1) channel according TS 05.03
38
- *  \paramout tch_data Codec frame in RTP payload format
39
+ *  \paramout tch_data Codec frame in TS 101 318 canonical format
40
  *  \paramin bursts buffer containing the symbols of 8 bursts
41
  *  \paramin odd Odd (1) or even (0) frame number
42
  *  \paramout n_errors Number of detected bit errors
43
  *  \paramout n_bits_total Total number of bits
44
  *  \returns length of bytes used in \a tch_data output buffer; negative on error */
45
-int gsm0503_tch_hr_decode(uint8_t *tch_data, const sbit_t *bursts, int odd,
46
+int gsm0503_tch_hr_decode2(uint8_t *tch_data, const sbit_t *bursts, int odd,
47
    int *n_errors, int *n_bits_total)
48
 {
49
    sbit_t iB912, cB456, h;
50
@@ -1997,7 +1995,7 @@
51
            steal -= h;
52
        }
53
 
54
-       for (i = 2; i < 5; i++) {
55
+       for (i = 2; i < 6; i++) {
56
            gsm0503_tch_burst_unmap(NULL, &burstsi * 116, &h, 1);
57
            steal -= h;
58
        }
59
@@ -2050,7 +2048,35 @@
60
 
61
    tch_hr_reassemble(tch_data, b);
62
 
63
-   return 15;
64
+   return GSM_HR_BYTES;
65
+}
66
+
67
+/*! Perform channel decoding of a HR(v1) channel according TS 05.03,
68
+ *  deprecated legacy API.
69
+ *  \paramout tch_data Codec frame in pseudo-RFC5993 format
70
+ *  \paramin bursts buffer containing the symbols of 8 bursts
71
+ *  \paramin odd Odd (1) or even (0) frame number
72
+ *  \paramout n_errors Number of detected bit errors
73
+ *  \paramout n_bits_total Total number of bits
74
+ *  \returns length of bytes used in \a tch_data output buffer; negative on error
75
+ *
76
+ *  The HR1 codec frame format returned by this function is pseudo-RFC5993,
77
+ *  not true RFC 5993, as there is no SID classification being done
78
+ *  and the FT bits in the ToC octet are always set to 0 - but this
79
+ *  arguably-bogus format is the legacy public API.
80
+ */
81
+int gsm0503_tch_hr_decode(uint8_t *tch_data, const sbit_t *bursts, int odd,
82
+   int *n_errors, int *n_bits_total)
83
+{
84
+   int rc;
85
+
86
+   rc = gsm0503_tch_hr_decode2(tch_data, bursts, odd, n_errors,
87
+                   n_bits_total);
88
+   if (rc != GSM_HR_BYTES)
89
+       return rc;
90
+   memmove(tch_data + 1, tch_data, GSM_HR_BYTES);
91
+   tch_data0 = 0x00;   /* FT=0, note absence of SID classification */
92
+   return GSM_HR_BYTES_RTP_RFC5993;
93
 }
94
 
95
 /*! Perform channel encoding on a TCH/HS channel according to TS 05.03
96
@@ -2065,7 +2091,10 @@
97
    int i;
98
 
99
    switch (len) {
100
-   case 15: /* TCH HR */
101
+   case GSM_HR_BYTES_RTP_RFC5993:  /* TCH HR with RFC 5993 prefix */
102
+       tch_data++;
103
+       /* fall-through */
104
+   case GSM_HR_BYTES:  /* TCH HR in "pure" form */
105
        tch_hr_disassemble(b, tch_data);
106
 
107
        tch_hr_b_to_d(d, b);
108
@@ -2086,7 +2115,6 @@
109
            gsm0503_tch_burst_map(&iBi * 114,
110
                &burstsi * 116, &h, i >> 1);
111
        }
112
-
113
        break;
114
    case GSM_MACBLOCK_LEN: /* FACCH */
115
        _xcch_encode_cB(cB, tch_data);
116
@@ -2104,7 +2132,6 @@
117
            gsm0503_tch_burst_map(&iBi * 114 + 456,
118
                &burstsi * 116, &h, 1);
119
        }
120
-
121
        break;
122
    default:
123
        return -1;
124