[M] Change in libosmo-abis[master]: trau_rtp_conv: add support for HRv1 in 8k format
Attention is currently required from: fixeria. falconia has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/37287?usp=email ) Change subject: trau_rtp_conv: add support for HRv1 in 8k format ...................................................................... Patch Set 2: (2 comments) File src/trau/trau_rtp_conv.c: https://gerrit.osmocom.org/c/libosmo-abis/+/37287/comment/0892ab9b_6b4aea97 PS2, Line 258: if (xc_bits[i]) : sum++;
Can we do `sum += xc_bits[i]` here? Theoretically, this should be better in terms of performance. […] Given that the input bits come from other Osmocom library layers (osmo_i460 demux followed by trau_sync module), I would say that requiring each ubit_t to be strictly either 0 or 1 (for performance benefit) is fine. I'll change the code to do direct summation like you suggested.
https://gerrit.osmocom.org/c/libosmo-abis/+/37287/comment/9ae58d6e_fe0a6172 PS2, Line 669: tf->xc_bits[0] = 0;
cosmetic: maybe use designated initializers to make it shorter / more readable? […] Shorter != more readable in this case, I would argue. The way I have each bit explicitly broken out, with a comment on xc_bits[5] saying that it is odd parity, makes it much easier IMO to visually verify correctness against the official word of the spec.
However, I just thought of another way to make the code shorter, yet retain direct correspondence (perhaps even more direct) to how the table appears in the TS 48.061 spec - see the next patchset iteration. -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/37287?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I8ee01b73360501ca380a8695cbc7070ceaaba1be Gerrit-Change-Number: 37287 Gerrit-PatchSet: 2 Gerrit-Owner: falconia <falcon@freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy@sysmocom.de> Gerrit-Comment-Date: Tue, 25 Jun 2024 17:57:49 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy@sysmocom.de> Gerrit-MessageType: comment
participants (1)
-
falconia