Attention is currently required from: falconia, neels. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/32078 )
Change subject: osmo_rtp2trau() for FR & EFR: correctly handle the no-data case ...................................................................... Patch Set 1: (2 comments) File src/trau/trau_rtp_conv.c: https://gerrit.osmocom.org/c/libosmo-abis/+/32078/comment/eb96d53c_4bc0cec9 PS1, Line 282: } else if (data_len == 0) { : /* C1 .. C5: idle speech */ : tf->c_bits[0] = 0; : tf->c_bits[1] = 1; : tf->c_bits[2] = 1; : tf->c_bits[3] = 1; : tf->c_bits[4] = 0; > Please read the rules of TS 48.060, particularly sections 6.5.2 and 6.5.3. […] I agree with your respons to neels' comment and I do know that the DL/UL are treated separtely. My objection was realted to the somewhat hard to follow control-flow where we have if (UL) {} else if {} (len ==0) else {}. It woul be better to split that up into a if (UL) { } else { /* DL*/ if (len == 0) { } else { } } so basically checking one thing per if/else, and not mixing two different things in one level. Alternatives would also be to use a switch statement for the UL/DL case. But in any case, don't mix the length check in the UL/DL decision. https://gerrit.osmocom.org/c/libosmo-abis/+/32078/comment/d0946b55_da56a8fd PS1, Line 441: if (data_len == 0 && tf->dir == OSMO_TRAU_DIR_DL) { > In the present case (EFR codec) the answer to the "why" question is > straightforward: because TS 48. […] Done -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/32078 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I7f21e2210bba9ef87f1af515a001a0cfc1c0a1d8 Gerrit-Change-Number: 32078 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: laforge <[email protected]> Gerrit-CC: neels <[email protected]> Gerrit-Attention: falconia <[email protected]> Gerrit-Attention: neels <[email protected]> Gerrit-Comment-Date: Fri, 31 Mar 2023 11:36:03 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: falconia <[email protected]> Comment-In-Reply-To: neels <[email protected]> Comment-In-Reply-To: laforge <[email protected]> Gerrit-MessageType: comment
