RTP Payload Format for IP-MR Speech Codec
Extracted elements (27)
IP-MR's fine-grained redundancy (retransmitting selected sensitivity classes of the base layer from preceding packets within the same RTP packet) avoids needing out-of-band signals or session-initialization procedures for packet-loss protection.
The media subtype name 'ip-mr_v2.5' was registered to specify an internal codec version; it was later frozen and published as 'IP-MR'. The subtype name is kept for implementation compatibility even though 'IP-MR' and 'IP-MR v2.5' are now synonyms.
The payload type for IP-MR MUST be bound dynamically per the applicable RTP profile, as no static payload type is assigned. The payload type encodes configuration including basic or interleaved mode and number of channels.
A decoder MUST discard the redundancy payload if the CL field is equal to 0 or 7.
Applications MUST assume that BR and GR for the redundancy payload are the same as for the current packet, as these parameters are not transmitted in the redundancy header.
Applications MUST set the E bit in the speech TOC to 0 if the frame is known to be damaged.
It is NOT RECOMMENDED for applications to increase the total bitrate when adding redundancy in response to packet loss, because gateways may freely drop coding layers or redundancy bits.
It is NOT RECOMMENDED to use high BR values for real-time communications, because coding quality depends on CR rather than BR.
Packets with BR = 6 or BR > CR MUST be discarded. The value 6 is reserved for the rate index; any packet received with this value MUST be discarded.
Redundancy data is only available if the base rates (BRs) and coding rates (CRs) of preceding and pre-preceding packets are the same as for the current packet.
The helper routine provided in Appendix A MUST be used to extract sensitivity classes' length for each frame when processing redundancy payload data.
The RTP clock rate in SDP a=rtpmap MUST be 16000 for IP-MR payloads.
The RTP header marker bit (M) SHALL be set to 1 whenever the first frame-block in the packet is the first frame-block in a talkspurt; for all other packets, M SHALL be set to zero.
The RTP timestamp clock frequency SHALL be 16 kHz, and the timestamp SHALL increase by 320 for each consecutive frame (20 ms at 16 kHz). The timestamp is also used to recover correct decoding order.
The T bit in the speech payload header MUST always be set to 0; the D bit MUST always be set to 1. Receivers MAY discard packets where T is not 0 or D is not 1.
To adjust outgoing bandwidth, the gateway MUST read the frame(s) structure from the payload header, define which enhancement layers to discard, and compose a new RTP packet according to the specification.
IP-MR defines 6 coding rates (indices 0-5) ranging from 7.7 kbps to 34.2 kbps. Rate index 6 is reserved and MUST be discarded; index 7 (NO_DATA) indicates no speech data in the payload.
IP-MR defines 6 sensitivity classes ('A' through 'F') for the base layer only. Class 'A' bits are most sensitive (damage causes significant artifacts); class 'F' bits are least sensitive. Enhancement layers are not classified.
The CR value of 7 (NO_DATA) in the speech payload header indicates no speech data and no speech TOC in the payload; this MAY be used to transmit redundancy data only.
The IP-MR RTP payload is structured as two payloads: a speech payload (Header, TOC, Data) and an optional redundancy payload (Header, TOC, Data). The redundancy payload carries data for preceding and pre-preceding packets.
One IANA media type registration is defined: audio/ip-mr_v2.5. Optional parameter 'ptime' specifies packet length in milliseconds with allowed values of 20, 40, 60, and 80.
RTP packets using this payload format require confidentiality (via payload encryption), integrity protection, and source authentication. SRTP is the recommended security mechanism; IPsec and TLS (for RTP over TCP) are also identified as options.
The IP-MR payload format does not exhibit significant non-uniformity in receiver-side computational complexity and is therefore unlikely to pose a denial-of-service threat through receipt of pathological data.
The Redundancy Payload Header is 6 bits: CL1 (3 bits) and CL2 (3 bits), specifying sensitivity classes available for preceding and pre-preceding packets respectively. CL values 0 (NONE) and 7 (reserved) indicate absent or invalid redundancy.
The Redundancy Payload TOC is a bitmask of 2*(GR+1) E-bits indicating frame presence for preceding and pre-preceding payloads. Only present when CL is not 0 or 7.
The Speech Payload Header is 12 bits: T (1 bit, reserved, must be 0), CR (3 bits, coding rate index), BR (3 bits, base rate index), D (1 bit, reserved, must be 1), A (1 bit, byte alignment), GR (2 bits, grouping size minus 1), R (1 bit, redundancy presence).
The Speech Payload TOC is a bitmask of GR+1 E-bits (1 bit each), where each E bit indicates presence of a compressed frame. TOC is only present when CR is not 7 (NO_DATA).