RTP Payload Format for mU-law EMbedded Codec for Low-delay IP Communication (UEMCLIP) Speech Codec
Extracted elements (23)
The G.711 u-law bitstream (Layer a) is always embedded as the UEMCLIP core layer, reducing transcoding from UEMCLIP to G.711 to a simple bitstream extraction rather than full decode/re-encode. This is intended to minimize transcoding cost in RTCP-terminating MCUs where narrowband and wideband terminals coexist.
The PLC information field carries speech feature parameters (pitch, VAD, power) for a past frame identified by offset K, rather than for the current frame. This design choice maintains speech quality by allowing the decoder to use PLC parameters associated with a prior frame during packet loss recovery.
Modes 1 and 4 (16-kHz sampling) MUST NOT be specified in an SDP payload type with a clock rate of 8000; only Modes 0 and 3 are usable at 8-kHz clock rates. This constraint arises because SDP binds a payload type to a specific sampling frequency.
Transcoding from UEMCLIP to G.711 requires finding the sub-layer with layer index 0x00 and extracting 160 bytes (SB=160 for a 20-ms frame); the core layer is not guaranteed to immediately follow the main header. The reverse (G.711 to UEMCLIP) can only produce Mode 0, and A-law input must first be converted to u-law.
A transcoding device performing UEMCLIP/G.711 conversion acting as a Media Translator or RTCP-terminating MCU MUST rewrite RTCP packets together with the RTP media packets.
All frames contained in a single RTP packet MUST be of the same mode, and frames MUST NOT be split between RTP packets. A single RTP packet SHOULD NOT include more frames than fit in the path MTU.
Any modes not defined in Table 2 MUST NOT be used, for compatibility and interoperability reasons.
For applications with discontinuous transmission (DTX), the first packet after a silence period SHOULD have the RTP marker bit set to one; the marker bit in all other packets MUST be zero. Applications without DTX MUST set the marker bit to zero.
Mode and sampling frequency are not included in the bitstream and MUST be exchanged while establishing a connection, for example by means of SDP.
SDP offer-answer procedures MUST follow RFC 3264. An answerer MUST answer back mode number(s) as a subset of what was offered; the offerer MUST NOT send in modes it did not offer. Unknown fmtp parameters MUST be ignored and MUST be deleted from the answer.
The 'a=ptime' value SHOULD be a multiple of 20 ms (matching the UEMCLIP frame length), and SHOULD default to 20 when not listed. The encoding parameters (channel count) SHOULD default to 1.
The core layer (Layer a) MUST always be included as a sub-layer in a UEMCLIP frame. The decoder MUST always refer to the layer indices for proper decoding because the order of sub-layers is arbitrary.
The RTP timestamp for UEMCLIP MUST advance based on a clock at either 8000 or 16000 Hz. When the audio sampling rate can change during a session, the RTP timestamp rate MUST be equal to the maximum rate given in the mode range, and MUST NOT change during a session.
When mode specification is missing from SDP, the payload type MUST default to a single mode: Mode 0 for 8000 Hz clock rate, Mode 1 for 16000 Hz clock rate. The offerer/answerer MUST NOT assume default modes are available when not in the specified mode list.
The 'Rate' SDP parameter is required and MUST be either 8000 or 16000. The optional 'mode' parameter is a comma-separated list of modes (0, 1, 3, 4) indicating dynamically changeable modes; if absent, the session defaults to a single fixed mode per Table 4.
UEMCLIP defines four operational modes (0, 1, 3, 4); Modes 2 and 5 are reserved for future 32-kHz sampling extensions. Mode 0 is narrowband 64 kbit/s; Mode 1 is wideband 80 kbit/s; Mode 3 is narrowband enhanced 80 kbit/s; Mode 4 is wideband full 96 kbit/s.
UEMCLIP operates at a 20-ms frame with three sub-layers: Layer a (G.711 core at 64 kbit/s, u-law PCM), Layer b (lower-band enhancement at 16 kbit/s, time domain block quantization), and Layer c (higher-band enhancement at 16 kbit/s, MDCT block quantization).
IANA registered one new media subtype: audio/UEMCLIP, with required parameter 'Rate' (8000 or 16000) and optional parameters 'ptime', 'maxptime', and 'mode'. The media type is only defined for transfer via RTP.
Memory attacks via illegal layer indices or byte sizes in sub-layer headers may cause a decoder to read beyond bitstream boundaries. Decoder implementations SHOULD reject layers with out-of-bounds indices. Additionally, RTP packets are subject to the security considerations of RFC 3550, requiring encryption for confidentiality.
Each sub-layer (SL) begins with a 2-byte sub-header: CI channel index (2b), FI frequency index (2b), QI quality index (2b), R4 reserved (2b), SB sub-layer byte size (8b), followed by SB*8 bits of layer data (LD).
The Mixing Information field (MX) is 8 bits: C1 (1 bit validity flag), R1 (1 bit reserved), V1 (1 bit VAD flag), and PW1 (5 bits signal power code computed as PW1 = ((~R)>>2) & 0x1F where R is the G.711 u-law encoded RMS).
The PLC Information field (PC) is 40 bits: C2 (1b), R2 (2b), V2 (1b), K frame-offset indicator (4b), U1 V/UV flag (1b), P1 pitch lag (7b), U2 V/UV flag (1b), P2 pitch lag (7b), PW2 power code (8b), R3 reserved (8b).
The UEMCLIP main header (MH) is 6 bytes: an 8-bit Mixing Information field (MX) followed by a 40-bit Packet-loss Concealment information field (PC). All numbers in the bitstream are encoded in network byte order.