view doc/AMR-hex-utils @ 608:d4e42ec4a688 default tip

hrutil: new program gsmhr-decode-r
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 05 Dec 2025 09:01:14 +0000
parents 24aba0e7aa35
children
line wrap: on
line source

As Themyscira Wireless work extends further into AMR, we now have the option of
storing sequences of AMR RTP payloads in a TW-TS-005 hexadecimal file.  (See
TW-TS-005 article.)  TW-TS-005 was originally intended for FR/EFR and HRv1
codecs, but beginning with spec version 1.1.0, newly added Annex C specifies
how TW-TS-005 hex format may be used for AMR.  As explained in that annex, any
workflow involving TW-TS-005 Annex C hex files requires out-of-band knowledge
as to which RTP payload format is captured: bandwidth-efficient (BWE) or
octet-aligned (OA).

The following format conversion utilities are provided for working with
TW-TS-005 Annex C hex files:

amr-hex-bwe2oa	Both input and output are hex files; input is BWE, output is OA.

amr-hex-oa2bwe	Both input and output are hex files; input is OA, output is BWE.

amr-hexoa2ietf	Input is a hex file in OA format, output is RFC 4867 storage
		format (binary *.amr).

amr-ietf2hexoa	Input is RFC 4867 storage format (binary *.amr), output is
		TW-TS-005 hex with RTP payloads in OA format.

Input to amr-hex-oa2bwe and amr-hexoa2ietf conversion utilities may be either
standard RFC 4867 OA or TW-TS-006 OAX (OA extended) - however, extended
information content in OAX format cannot be converted to BWE or RFC 4867 storage
format, hence any such extended info will be lost.  However, in the absence of
OAX, using only standard RTP payload formats per RFC 4867, conversion between
BWE and OA is lossless.

Conversion from TW-TS-005 Annex C to RFC 4867 storage format is lossy: CMR field
exists in RTP and thus in TW-TS-005 hex recordings, but not in RFC 4867 storage
format.  amr-ietf2hexoa conversion utility sets CMR to 15 (NO_DATA); if some
other CMR is desired, the desired effect can be trivially achieved by applying
sed to amr-ietf2hexoa output.