falconia has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-abis/+/43871?usp=email )


Change subject: trau2rtp_gen: add support for compressed CSD per TW-TS-007
......................................................................

trau2rtp_gen: add support for compressed CSD per TW-TS-007

trau2rtp_gen utility converts TRAU frames supplied in hex form
into RTP payloads also represented in hex form (TW-TS-005),
wrapping around osmo_trau2rtp() API.  Up until now this program
had no support for CSD modes: the default osmo_trau2rtp() output
format in these CSD modes is CLEARMODE with 160-byte payloads,
which are too big for TW-TS-005.  However, osmo_trau2rtp() now
also supports the option of TW-TS-007 output format for CSD,
and those compressed CSD payloads do fit within the limits of
TW-TS-005 hex format.  Add support for this compressed form of
CSD to trau2rtp_gen.

Change-Id: If8ae985672b33cf8867c9f2226bd15da719ab2e1
---
M tests/trau_conv/trau2rtp_gen.c
M tests/trau_conv/trau2rtp_gen.notes
2 files changed, 14 insertions(+), 7 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/71/43871/1

diff --git a/tests/trau_conv/trau2rtp_gen.c b/tests/trau_conv/trau2rtp_gen.c
index 0f36d15..fb514a8 100644
--- a/tests/trau_conv/trau2rtp_gen.c
+++ b/tests/trau_conv/trau2rtp_gen.c
@@ -180,7 +180,7 @@

        trau_8k_mode = false;
        direction = OSMO_TRAU_DIR_UL;
-       trau2rtp_st.rtp_extensions = 0;
+       trau2rtp_st.rtp_extensions = OSMO_RTP_EXT_TWTS007;
        while ((opt = getopt(argc, argv, "8dx")) != EOF) {
                switch (opt) {
                case '8':
@@ -190,7 +190,7 @@
                        direction = OSMO_TRAU_DIR_DL;
                        break;
                case 'x':
-                       trau2rtp_st.rtp_extensions =
+                       trau2rtp_st.rtp_extensions |=
                                OSMO_RTP_EXT_TWTS001 | OSMO_RTP_EXT_TWTS002;
                        break;
                default:
diff --git a/tests/trau_conv/trau2rtp_gen.notes 
b/tests/trau_conv/trau2rtp_gen.notes
index b6b3617..cba97bd 100644
--- a/tests/trau_conv/trau2rtp_gen.notes
+++ b/tests/trau_conv/trau2rtp_gen.notes
@@ -45,6 +45,10 @@
 HRv1   TRAU-16k        TS 48.061 sections 5.1.1.1 and 5.1.4.1.1
 HRv1   TRAU-8k         TS 48.061 sections 5.2.1.1 and 5.2.4.1

+CSD modes are also supported, in both TRAU-16k and TRAU-8k formats, with RTP
+output in the compressed format of TW-TS-007.  The resulting hex output follows
+TW-TS-005 Annex D.
+
 Input format and examples
 =========================

@@ -110,8 +114,8 @@
 At the level of command line utilities, a separate program exists that 
exercises
 the AMR-specific TRAU to RTP conversion APIs - see tests/amr/trau2rtp_amr.

-No CSD support yet
-==================
+CSD in TW-TS-007 format
+=======================

 When the input is a TRAU frame in one of CSD modes, the output from
 osmo_trau2rtp() can be either a 160-byte CLEARMODE payload or a much more
@@ -121,9 +125,12 @@
 _can_ be represented in TW-TS-005 hex - and the current version of TW-TS-005
 spec linked above includes Annex D that specifies such usage.

-trau2rtp_gen utility can be extended to enable TW-TS-007 output and thereby add
-support for at least one representation of GSM CSD in RTP - but no such
-modification has been made yet.
+trau2rtp_gen utility always produces output in TW-TS-007 format if the TRAU
+frame input is in any of CSD modes.  In the case of FR, HR and EFR speech the
+presence or absence of -x option selects whether or not the output will include
+RTP payload format extensions of TW-TS-001 or TW-TS-002 - but in the case of
+CSD, TW-TS-007 output format is used unconditionally because the more standard
+alternative of CLEARMODE cannot be supported in this environment.

 A need may also arise at some point to represent the bloated-but-standard
 CLEARMODE formats in hex as well.  TW-TS-005 cannot be used for that purpose,

--
To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/43871?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: newchange
Gerrit-Project: libosmo-abis
Gerrit-Branch: master
Gerrit-Change-Id: If8ae985672b33cf8867c9f2226bd15da719ab2e1
Gerrit-Change-Number: 43871
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <[email protected]>

Reply via email to