lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

October 2025

  • 1 participants
  • 631 discussions
[XS] Change in osmo-ttcn3-hacks[master]: smdpp_Tests: add comments to mp_es9plus_server_port_ module parameters
by dexter 28 Oct '25

28 Oct '25
Attention is currently required from: dexter, osmith. Hello Jenkins Builder, osmith, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41272?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Code-Review+2 by osmith, Verified+1 by Jenkins Builder The change is no longer submittable: Code-Review and Verified are unsatisfied now. Change subject: smdpp_Tests: add comments to mp_es9plus_server_port_ module parameters ...................................................................... smdpp_Tests: add comments to mp_es9plus_server_port_ module parameters Let's add an explanatory comment to mp_es9plus_server_port_nist and mp_es9plus_server_port_brp Related: SYS#7339 Change-Id: I7e3f0292256b21a75da5b756ee9af6ec58318de1 --- M smdpp/smdpp_Tests.ttcn 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/72/41272/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41272?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I7e3f0292256b21a75da5b756ee9af6ec58318de1 Gerrit-Change-Number: 41272 Gerrit-PatchSet: 3 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: smdp_Tests: remove custom_tls_cert module parameters
by dexter 28 Oct '25

28 Oct '25
Attention is currently required from: Hoernchen, osmith. Hello Hoernchen, Jenkins Builder, osmith, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41271?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review+1 by osmith, Verified+1 by Jenkins Builder Change subject: smdp_Tests: remove custom_tls_cert module parameters ...................................................................... smdp_Tests: remove custom_tls_cert module parameters The module parameters mp_use_custom_tls_cert and mp_custom_tls_cert_path are no longer needed, so let's remove them. Change-Id: Ie37da6986410b663378531f4f0d50d95b3068964 Related: SYS#7339 --- M smdpp/smdpp_Tests.ttcn 1 file changed, 5 insertions(+), 10 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/71/41271/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41271?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ie37da6986410b663378531f4f0d50d95b3068964 Gerrit-Change-Number: 41271 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de>
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: smdpp_Tests/ES2Plus_Tests: move ES2+ code to smdpp_Tests.ttcn
by dexter 28 Oct '25

28 Oct '25
Attention is currently required from: Hoernchen, dexter, osmith. Hello Hoernchen, Jenkins Builder, osmith, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41270?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Code-Review+1 by osmith, Verified+1 by Jenkins Builder Change subject: smdpp_Tests/ES2Plus_Tests: move ES2+ code to smdpp_Tests.ttcn ...................................................................... smdpp_Tests/ES2Plus_Tests: move ES2+ code to smdpp_Tests.ttcn In smdp_Tests.ttcn, the ES9+ and ES2+ interface are intermingled. This is a problem since ES2+ and ES9+ are two independed interfaces and they may use different certificates and may even be reachable under a different FQDN from a different network interface. To untable ES2+ and ES9+ we can move the ES2+ code from ES2Plus_Tests.ttcn to smdpp_Tests.ttcn. Since ES2Plus_Tests.ttcn inherits from smdpp_Tests.ttcn the ES2+ code will still be available to ES2Plus_Tests.ttcn. This change will add the flexibility of ES2Plus_Tests.ttcn to smdpp_Tests.ttcn. This means we can now freely configure the FQDN and the certificates used with ES2+. Related: SYS#7339 Change-Id: Ib59568379a9d454ea99d66550d6da8fd203681db --- M smdpp/ES2Plus_Tests.cfg M smdpp/ES2Plus_Tests.ttcn M smdpp/smdpp_Tests.cfg M smdpp/smdpp_Tests.ttcn 4 files changed, 188 insertions(+), 178 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/70/41270/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41270?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ib59568379a9d454ea99d66550d6da8fd203681db Gerrit-Change-Number: 41270 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: smdp_Tests: remove custom_tls_cert module parameters
by dexter 28 Oct '25

28 Oct '25
Attention is currently required from: Hoernchen, osmith. dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41271?usp=email ) Change subject: smdp_Tests: remove custom_tls_cert module parameters ...................................................................... Patch Set 2: (1 comment) File smdpp/smdpp_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41271/comment/57050f2d_c3d9… : PS1, Line 67: > This can probably be ignored by now because the native rspclient cpp code recursively loads certs fr […] Thanks for the clarification, as far as I understand now those parameters have no real world use. I think we should then remove them altogether. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41271?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ie37da6986410b663378531f4f0d50d95b3068964 Gerrit-Change-Number: 41271 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Comment-Date: Tue, 28 Oct 2025 12:00:29 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: Hoernchen <ewild(a)sysmocom.de> Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
1 0
0 0
[M] Change in libosmocore[master]: AMR codec: add decoder homing frame const patterns
by falconia 28 Oct '25

28 Oct '25
falconia has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/41257?usp=email ) Change subject: AMR codec: add decoder homing frame const patterns ...................................................................... AMR codec: add decoder homing frame const patterns ETSI-defined decoder homing frames for HRv1 and EFR are already captured in osmo_gsm620_homing_frame[] and osmo_gsm660_homing_frame[]; now add 3GPP-defined DHFs for AMR, all 8 modes. These AMR DHFs are useful to have in libosmocodec: * Future AMR-capable tw-e1abis-mgw will emit DHFs toward the BTS/CCU during prolonged absence of RTP input - needed because the alternative of emitting an endless stream of No_Data frames may produce undesirable effects on Um with some E1 BTS models. If it is desired to bring tw-e1abis-mgw functionality into mainline Osmocom at some point, DHF bits need to reside somewhere in libosmo*. * In future improvements of AMR support in osmo-bts-trx, it may be likewise desirable to transmit DHFs on Um downlink during the same conditions of prolonged absence of RTP input. Change-Id: I1f8f8ec36cc13270a1d1fa633583107317abe894 --- M include/osmocom/codec/codec.h M src/codec/gsm690.c 2 files changed, 75 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/codec/codec.h b/include/osmocom/codec/codec.h index b697cfb..8ec9e62 100644 --- a/include/osmocom/codec/codec.h +++ b/include/osmocom/codec/codec.h @@ -98,6 +98,15 @@ int osmo_amr_sbits_to_param(uint16_t *param, const ubit_t *s_bits, enum osmo_amr_type mode); +extern const uint16_t osmo_amr_dhf_4_75[]; +extern const uint16_t osmo_amr_dhf_5_15[]; +extern const uint16_t osmo_amr_dhf_5_90[]; +extern const uint16_t osmo_amr_dhf_6_70[]; +extern const uint16_t osmo_amr_dhf_7_40[]; +extern const uint16_t osmo_amr_dhf_7_95[]; +extern const uint16_t osmo_amr_dhf_10_2[]; +extern const uint16_t osmo_amr_dhf_12_2[]; + /* SID ternary classification per GSM 06.31 & 06.81 section 6.1.1 */ enum osmo_gsm631_sid_class { OSMO_GSM631_SID_CLASS_SPEECH = 0, diff --git a/src/codec/gsm690.c b/src/codec/gsm690.c index 5730718..fc7e584 100644 --- a/src/codec/gsm690.c +++ b/src/codec/gsm690.c @@ -512,6 +512,72 @@ return 0; } +/* For each of the 8 modes of AMR codec, there exists a special encoded frame + * bit pattern which the speech decoder is required to recognize as a special + * decoder homing frame (DHF), as specified in TS 26.090 section 8.4. Bit + * patterns of these 8 DHFs are specified in TS 26.073 Tables 9a through 9h + * and captured in the following const arrays. Note that the canonical form + * of each DHF is an array of codec parameters; in order to emit any of these + * DHFs as an RTP payload or a TRAU frame, the application will need to + * convert it to s-bits with osmo_amr_param_to_sbits(), followed by + * osmo_amr_s_to_d() in the case of RTP output. + */ + +const uint16_t osmo_amr_dhf_4_75[17] = { + 0x00F8, 0x009D, 0x001C, 0x0066, 0x0000, 0x0003, 0x0028, 0x000F, + 0x0038, 0x0001, 0x000F, 0x0031, 0x0002, 0x0008, 0x000F, 0x0026, + 0x0003 +}; + +const uint16_t osmo_amr_dhf_5_15[19] = { + 0x00F8, 0x009D, 0x001C, 0x0066, 0x0000, 0x0003, 0x0037, 0x000F, + 0x0000, 0x0003, 0x0005, 0x000F, 0x0037, 0x0003, 0x0037, 0x000F, + 0x0023, 0x0003, 0x001F +}; + +const uint16_t osmo_amr_dhf_5_90[19] = { + 0x00F8, 0x00E3, 0x002F, 0x00BD, 0x0000, 0x0003, 0x0037, 0x000F, + 0x0001, 0x0003, 0x000F, 0x0060, 0x00F9, 0x0003, 0x0037, 0x000F, + 0x0000, 0x0003, 0x0037 +}; + +const uint16_t osmo_amr_dhf_6_70[19] = { + 0x00F8, 0x00E3, 0x002F, 0x00BD, 0x0002, 0x0007, 0x0000, 0x000F, + 0x0098, 0x0007, 0x0061, 0x0060, 0x05C5, 0x0007, 0x0000, 0x000F, + 0x0318, 0x0007, 0x0000 +}; + +const uint16_t osmo_amr_dhf_7_40[19] = { + 0x00F8, 0x00E3, 0x002F, 0x00BD, 0x0006, 0x000F, 0x0000, 0x001B, + 0x0208, 0x000F, 0x0062, 0x0060, 0x1BA6, 0x000F, 0x0000, 0x001B, + 0x0006, 0x000F, 0x0000 +}; + +const uint16_t osmo_amr_dhf_7_95[23] = { + 0x00C2, 0x00E3, 0x002F, 0x00BD, 0x0006, 0x000F, 0x000A, 0x0000, + 0x0039, 0x1C08, 0x0007, 0x000A, 0x000B, 0x0063, 0x11A6, 0x000F, + 0x0001, 0x0000, 0x0039, 0x09A0, 0x000F, 0x0002, 0x0001 +}; + +const uint16_t osmo_amr_dhf_10_2[39] = { + 0x00F8, 0x00E3, 0x002F, 0x0045, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x001B, 0x0000, 0x0001, 0x0000, + 0x0001, 0x0326, 0x00CE, 0x007E, 0x0051, 0x0062, 0x0000, 0x0000, + 0x0000, 0x0000, 0x015A, 0x0359, 0x0076, 0x0000, 0x001B, 0x0000, + 0x0000, 0x0000, 0x0000, 0x017C, 0x0215, 0x0038, 0x0030 +}; + +const uint16_t osmo_amr_dhf_12_2[57] = { + 0x0004, 0x002A, 0x00DB, 0x0096, 0x002A, 0x0156, 0x000B, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0000, 0x0000, 0x0036, 0x000B, 0x0000, 0x000F, 0x000E, 0x000C, + 0x000D, 0x0000, 0x0001, 0x0005, 0x0007, 0x0001, 0x0008, 0x0024, + 0x0000, 0x0001, 0x0000, 0x0005, 0x0006, 0x0001, 0x0002, 0x0004, + 0x0007, 0x0004, 0x0002, 0x0003, 0x0036, 0x000B, 0x0000, 0x0002, + 0x0004, 0x0000, 0x0003, 0x0006, 0x0001, 0x0007, 0x0006, 0x0005, + 0x0000 +}; + /* See also RFC 4867 §3.6, Table 1, Column "Total speech bits" */ static const uint8_t amr_len_by_ft[16] = { 12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0, 0, 0 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41257?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I1f8f8ec36cc13270a1d1fa633583107317abe894 Gerrit-Change-Number: 41257 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
[M] Change in libosmocore[master]: AMR codec: add conversion between s-bits and codec parameters
by falconia 28 Oct '25

28 Oct '25
falconia has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/41256?usp=email ) Change subject: AMR codec: add conversion between s-bits and codec parameters ...................................................................... AMR codec: add conversion between s-bits and codec parameters At the lowest level of frame information content, before introducing higher layers of RTP or TRAU frame or other encoding, an AMR codec frame (speech or SID) can be represented in 3 fundamental ways: * 35 to 244 s-bits as defined theoretically in TS 26.090 & 26.092 and used in practice in 2G TRAU frames; * 39 to 244 d-bits as defined theoretically in TS 26.101 and used in practice in 3G IuUP and in RTP; * 5 to 57 codec parameters, each fitting into uint16_t, as implemented in 3GPP reference C code (TS 26.073) and assumed by the same spec in its listing of decoder homing frame bit patterns. libosmocodec previously provided conversion functions between s-bits and d-bits, as well as a table that gives the number of d-bits per mode - but no conversion to or from arrays of codec parameters. Add the latter functionality. Change-Id: I28eae702204d7f7ff164e17c5e26152a94a12cba --- M include/osmocom/codec/codec.h M src/codec/gsm690.c 2 files changed, 198 insertions(+), 0 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/codec/codec.h b/include/osmocom/codec/codec.h index 008eab1..b697cfb 100644 --- a/include/osmocom/codec/codec.h +++ b/include/osmocom/codec/codec.h @@ -90,6 +90,14 @@ } } +extern const uint8_t osmo_amr_sbits_per_mode[AMR_NO_DATA+1]; +extern const uint8_t osmo_amr_params_per_mode[AMR_NO_DATA+1]; + +int osmo_amr_param_to_sbits(ubit_t *s_bits, const uint16_t *param, + enum osmo_amr_type mode); +int osmo_amr_sbits_to_param(uint16_t *param, const ubit_t *s_bits, + enum osmo_amr_type mode); + /* SID ternary classification per GSM 06.31 & 06.81 section 6.1.1 */ enum osmo_gsm631_sid_class { OSMO_GSM631_SID_CLASS_SPEECH = 0, diff --git a/src/codec/gsm690.c b/src/codec/gsm690.c index 3b2e669..5730718 100644 --- a/src/codec/gsm690.c +++ b/src/codec/gsm690.c @@ -322,6 +322,196 @@ return n_bits; } +/*! This table provides the number of s-bits (as defined in TS 26.090 and + * TS 26.092, clause 7 in each spec) for every possible speech or SID mode + * in AMR. It differs from gsm690_bitlength[] in the case of SID: there are + * 35 s-bits in the original 2G definition that started out as GSM 06.92, + * captured in this table, whereas 3G-oriented TS 26.101 AMR Core Frame + * definition captured in gsm690_bitlength[] has 39 d-bits for SID instead. + * + * The array is allocated up to AMR_NO_DATA in order to reduce the probability + * of buggy code making an out-of-bounds read access. + */ +const uint8_t osmo_amr_sbits_per_mode[AMR_NO_DATA+1] = { + [AMR_4_75] = 95, + [AMR_5_15] = 103, + [AMR_5_90] = 118, + [AMR_6_70] = 134, + [AMR_7_40] = 148, + [AMR_7_95] = 159, + [AMR_10_2] = 204, + [AMR_12_2] = 244, + [AMR_SID] = 35, +}; + +/*! This table provides the number of distinct codec parameters (groupings + * of s-bits into 16-bit parameter words as implemented in 3GPP reference + * C code and assumed in TS 26.073 definition of decoder homing frames) + * that exist for every possible speech or SID mode in AMR. + * + * The array is allocated up to AMR_NO_DATA in order to reduce the probability + * of buggy code making an out-of-bounds read access. + */ +const uint8_t osmo_amr_params_per_mode[AMR_NO_DATA+1] = { + [AMR_4_75] = 17, + [AMR_5_15] = 19, + [AMR_5_90] = 19, + [AMR_6_70] = 19, + [AMR_7_40] = 19, + [AMR_7_95] = 23, + [AMR_10_2] = 39, + [AMR_12_2] = 57, + [AMR_SID] = 5, +}; + +/* parameter sizes (# of bits), one table per mode */ + +static const uint8_t bit_counts_4_75[17] = { + 8, 8, 7, /* LSP VQ */ + 8, 7, 2, 8, /* 1st subframe */ + 4, 7, 2, /* 2nd subframe */ + 4, 7, 2, 8, /* 3rd subframe */ + 4, 7, 2, /* 4th subframe */ +}; + +static const uint8_t bit_counts_5_15[19] = { + 8, 8, 7, /* LSP VQ */ + 8, 7, 2, 6, /* 1st subframe */ + 4, 7, 2, 6, /* 2nd subframe */ + 4, 7, 2, 6, /* 3rd subframe */ + 4, 7, 2, 6, /* 4th subframe */ +}; + +static const uint8_t bit_counts_5_90[19] = { + 8, 9, 9, /* LSP VQ */ + 8, 9, 2, 6, /* 1st subframe */ + 4, 9, 2, 6, /* 2nd subframe */ + 8, 9, 2, 6, /* 3rd subframe */ + 4, 9, 2, 6, /* 4th subframe */ +}; + +static const uint8_t bit_counts_6_70[19] = { + 8, 9, 9, /* LSP VQ */ + 8, 11, 3, 7, /* 1st subframe */ + 4, 11, 3, 7, /* 2nd subframe */ + 8, 11, 3, 7, /* 3rd subframe */ + 4, 11, 3, 7, /* 4th subframe */ +}; + +static const uint8_t bit_counts_7_40[19] = { + 8, 9, 9, /* LSP VQ */ + 8, 13, 4, 7, /* 1st subframe */ + 5, 13, 4, 7, /* 2nd subframe */ + 8, 13, 4, 7, /* 3rd subframe */ + 5, 13, 4, 7, /* 4th subframe */ +}; + +static const uint8_t bit_counts_7_95[23] = { + 9, 9, 9, /* LSP VQ */ + 8, 13, 4, 4, 5, /* 1st subframe */ + 6, 13, 4, 4, 5, /* 2nd subframe */ + 8, 13, 4, 4, 5, /* 3rd subframe */ + 6, 13, 4, 4, 5, /* 4th subframe */ +}; + +static const uint8_t bit_counts_10_2[39] = { + 8, 9, 9, /* LSP VQ */ + 8, 1, 1, 1, 1, 10, 10, 7, 7, /* 1st subframe */ + 5, 1, 1, 1, 1, 10, 10, 7, 7, /* 2nd subframe */ + 8, 1, 1, 1, 1, 10, 10, 7, 7, /* 3rd subframe */ + 5, 1, 1, 1, 1, 10, 10, 7, 7, /* 4th subframe */ +}; + +static const uint8_t bit_counts_12_2[57] = { + 7, 8, 9, 8, 6, /* LSP VQ */ + 9, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 5, /* 1st subframe */ + 6, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 5, /* 2nd subframe */ + 9, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 5, /* 3rd subframe */ + 6, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 5, /* 4th subframe */ +}; + +static const uint8_t bit_counts_sid[5] = { 3, 8, 9, 9, 6 }; + +/* overall table with all parameter sizes for all modes */ +static const uint8_t * const bit_counts_per_mode[AMR_SID + 1] = { + bit_counts_4_75, + bit_counts_5_15, + bit_counts_5_90, + bit_counts_6_70, + bit_counts_7_40, + bit_counts_7_95, + bit_counts_10_2, + bit_counts_12_2, + bit_counts_sid, +}; + +/*! Convert AMR codec frame from parameters to s-bits + * + * \param[out] s_bits Caller-provided array of unpacked bits to be filled + * with s-bits of the converted codec frame. + * \param[in] param Array of AMR codec speech or SID parameters. + * \param[in] mode Speech or SID mode according to which conversion shall + * be performed. + * \returns 0 if successful, or negative if \ref mode is invalid. + */ +int osmo_amr_param_to_sbits(ubit_t *s_bits, const uint16_t *param, + enum osmo_amr_type mode) +{ + if (mode > AMR_SID) + return -EINVAL; + + const uint8_t *table = bit_counts_per_mode[mode]; + unsigned nparam = osmo_amr_params_per_mode[mode]; + unsigned n, p, mask; + ubit_t *b = s_bits; + + for (n = 0; n < nparam; n++) { + p = param[n]; + mask = 1 << (*table++ - 1); + for (; mask; mask >>= 1) { + if (p & mask) + *b++ = 1; + else + *b++ = 0; + } + } + return 0; +} + +/*! Convert AMR codec frame from s-bits to parameters + * + * \param[out] param Caller-provided buffer for array of AMR codec speech + * or SID parameters. + * \param[in] s_bits Unpacked s-bits of the frame to be converted. + * \param[in] mode Speech or SID mode according to which conversion shall + * be performed. + * \returns 0 if successful, or negative if \ref mode is invalid. + */ +int osmo_amr_sbits_to_param(uint16_t *param, const ubit_t *s_bits, + enum osmo_amr_type mode) +{ + if (mode > AMR_SID) + return -EINVAL; + + const ubit_t *bit = s_bits; + const uint8_t *table = bit_counts_per_mode[mode]; + unsigned nparam = osmo_amr_params_per_mode[mode]; + unsigned n, m, acc; + + for (n = 0; n < nparam; n++) { + acc = 0; + for (m = 0; m < *table; m++) { + acc <<= 1; + if (*bit) + acc |= 1; + bit++; + } + param[n] = acc; + table++; + } + return 0; +} + /* See also RFC 4867 §3.6, Table 1, Column "Total speech bits" */ static const uint8_t amr_len_by_ft[16] = { 12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0, 0, 0 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41256?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I28eae702204d7f7ff164e17c5e26152a94a12cba Gerrit-Change-Number: 41256 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: smdp_Tests: rename and document custom_tls_cert module parameters
by Hoernchen 28 Oct '25

28 Oct '25
Attention is currently required from: dexter. Hoernchen has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41271?usp=email ) Change subject: smdp_Tests: rename and document custom_tls_cert module parameters ...................................................................... Patch Set 1: (1 comment) File smdpp/smdpp_Tests.ttcn: https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41271/comment/4fe44bec_0c02… : PS1, Line 67: > @ewild@sysmocom.de Pleas check this comment. […] This can probably be ignored by now because the native rspclient cpp code recursively loads certs from the subdir and automatically uses self signed certs as root certs. The other option is to pass one concatenated cert file that contains the whole chain, but that is kinda pointless because the tls cert can either be tied to the gsma root cert or to a public root cert, which is why the certs are only added to the store and the default curl (system) cert store is not replaced. -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41271?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ie37da6986410b663378531f4f0d50d95b3068964 Gerrit-Change-Number: 41271 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 28 Oct 2025 08:15:50 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-ttcn3-hacks[master]: smdpp_Tests: add comments to mp_es9plus_server_port_ module parameters
by osmith 28 Oct '25

28 Oct '25
Attention is currently required from: dexter. osmith has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41272?usp=email ) Change subject: smdpp_Tests: add comments to mp_es9plus_server_port_ module parameters ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41272?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I7e3f0292256b21a75da5b756ee9af6ec58318de1 Gerrit-Change-Number: 41272 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 28 Oct 2025 07:17:25 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: smdp_Tests: rename and document custom_tls_cert module parameters
by osmith 28 Oct '25

28 Oct '25
Attention is currently required from: Hoernchen, dexter. osmith has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41271?usp=email ) Change subject: smdp_Tests: rename and document custom_tls_cert module parameters ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41271?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ie37da6986410b663378531f4f0d50d95b3068964 Gerrit-Change-Number: 41271 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 28 Oct 2025 07:17:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: smdpp_Tests/ES2Plus_Tests: move ES2+ code to smdpp_Tests.ttcn
by osmith 28 Oct '25

28 Oct '25
Attention is currently required from: dexter. osmith has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41270?usp=email ) Change subject: smdpp_Tests/ES2Plus_Tests: move ES2+ code to smdpp_Tests.ttcn ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/41270?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ib59568379a9d454ea99d66550d6da8fd203681db Gerrit-Change-Number: 41270 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Tue, 28 Oct 2025 07:16:18 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • ...
  • 64
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.