2.2.2.4 RTP Packet Header FEC Extension

The fields in the RTP payload format header are transmitted in big-endian byte order, also called network byte order. The syntax of the RTP payload format header is as follows.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

SN Base

Length Recovery

E

PT Recovery

Mask

TS Recovery

Padding1

FecIndex

Padding2

FecPktSpan

Padding3

ExFlags

Reserved

SN Base (2 bytes): This field MUST be set to the value of the Sequence Number field in the RTP header ([RFC3550] section 5.1) of the first source RTP packet that is encoded in this FEC RTP packet.

Length Recovery (2 bytes): This field MUST be set to the result of applying the FEC algorithm to a virtual 16-bit integer field in each source RTP packet. This virtual field, referred to here as the payload length field, MUST specify the payload length in bytes of each source RTP packet. The value of the payload length field MUST include the size of the RTP payload itself, as well as the sizes of the contributing source (CSRC, specified in [RFC3550] section 5.1) list, RTP extension, and RTP padding, if any. The Length Recovery field allows a receiver to recover the size of a reconstructed source RTP packet and makes it possible to use the FEC algorithms when the sizes of the source RTP packets vary.

E (1 bit): This field MUST be set to 0.

PT Recovery (7 bits): This field MUST be set to the result of applying the FEC algorithm to the value of the Payload Type field in the RTP header in each source RTP packet.

Mask (3 bytes): The purpose of this field is to indicate what source RTP packets are encoded into this FEC RTP packet. For each source RTP packet that is encoded into this FEC RTP packet, the bit with index I in the Mask field MUST be set to 1 where I is computed as the unsigned difference between the value of the Sequence Number field (defined in [RFC3550] section 5.1) in the source RTP packet and the value of the SN Base field in this FEC RTP packet. All other bits in the Mask field MUST be set to 0. Index 0 MUST correspond to the least significant bit in the Mask field and index 23 to the most significant bit.

TS Recovery (4 bytes): This field MUST be set to the result of applying the FEC algorithm to the value of the Timestamp field in the RTP header in each source RTP packet.

Padding1 (3 bits): This field MUST be ignored.

FecIndex (5 bits): This field MUST be set to the index of this FEC RTP packet among the FEC RTP packets that are transmitted for the current span (group) of source RTP packets. The first FEC RTP packet in the span has index 0, the second has index 1, and so on.

Padding2 (3 bits): This field MUST be ignored.

FecPktSpan (5 bits): This field MUST be set to the number of FEC RTP packets that are transmitted for the current span (group) of source RTP packets or set to 0 if the span is unspecified. If the span is specified, the current FEC RTP packet MUST be included in the count of FEC RTP packets.

Padding3 (3 bits): This field MUST be ignored.

ExFlags (5 bits): This field MUST be set to 0.

Reserved (1 byte): This field MUST be set to 0.