]>
Simple LDPC-Staircase Forward Error Correction (FEC) Scheme for FECFRAME
INRIA655, av. de l'EuropeInovallee; MontbonnotST ISMIER cedex38334Francevincent.roca@inria.frhttp://planete.inrialpes.fr/people/roca/NICTAAustraliamathieu.cunche@nicta.com.auhttp://mathieu.cunche.free.fr/ISAE/LAAS-CNRS1, place Emile BlouinToulouse31056Francejerome.lacan@isae.frhttp://dmi.ensica.fr/auteur.php3?id_auteur=5
Transport
FecFrameI-DInternet-DraftForward Error CorrectionLDPC-Staircase
This document describes a fully-specified simple FEC scheme for LDPC-Staircase codes
that can be used to protect media streams along the lines defined by the FECFRAME framework.
These codes have many interesting properties:
they are systematic codes, they perform close to ideal codes in many use-cases and they also
feature very high encoding and decoding throughputs.
LDPC-Staircase codes are therefore a good solution to protect a single high bitrate source
flow, or to protect globally several mid-rate flows within a single FECFRAME instance.
They are also a good solution whenever the processing load of a software encoder or
decoder must be kept to a minimum.
The use of Forward Error Correction (FEC) codes is a classic solution to improve the reliability
of unicast, multicast and broadcast Content Delivery Protocols (CDP) and applications
.
The document describes a generic framework to use FEC schemes
with media delivery applications, and for instance with real-time streaming media applications based
on the RTP real-time protocol.
Similarly the document describes a generic framework to use FEC schemes
with with objects (e.g., files) delivery applications based on the ALC
and NORM reliable multicast transport protocols.
More specifically, the (Raptor) and (LDPC-Staircase
and LDPC-Triangle) FEC schemes introduce erasure codes based on sparse parity check matrices for object
delivery protocols like ALC and NORM.
Similarly, the document introduces Reed-Solomon codes based on Vandermonde
matrices for the same object delivery protocols.
All these codes are systematic codes, meaning that the k source symbols are part of the n encoding symbols.
Additionally, the Reed-Solomon FEC codes belong to the class of Maximum Distance Separable (MDS) codes that
are optimal in terms of erasure recovery capabilities.
It means that a receiver can recover the k source symbols from any set of exactly k encoding symbols out of n.
This is not the case with either Raptor or LDPC-Staircase codes, and these codes require a certain
number of encoding symbols in excess to k.
However, this number is small in practice when an appropriate decoding scheme is used at the
receiver .
Another key difference is the high encoding/decoding complexity of Reed-Solomon codecs compared to
Raptor or LDPC-Staircase codes.
A difference of one or more orders of magnitude or more in terms of encoding/decoding speed exists between
the Reed-Solomon and LDPC-Staircase software codecs .
Finally, Raptor and LDPC-Staircase codes are large block FEC codes, in the sense of ,
since they can efficiently deal with a large number of source symbols.
The present document focuses on LDPC-Staircase codes, that belong to the well-known class of
"Low Density Parity Check" codes.
Because of their key features, these codes are a good solution in many situations, as detailed
in .
This documents inherits from the specifications of the core LDPC-Staircase codes.
Therefore this document specifies only the information specific to the FECFRAME context and
refers to for the core specifications of the codes.
To that purpose, the present document introduces:
the Fully-Specified FEC Scheme with FEC Encoding ID XXX that specifies a simple way
of using LDPC-Staircase codes in order to protect arbitrary ADU flows.
Finally, publicly available reference implementations of these codes are available .
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 .This document uses the following terms and definitions.
Some of them are FEC scheme specific and are in line with :
unit of data used during the encoding process.
In this specification, there is always one source symbol per ADU. unit of data generated by the encoding process.
With systematic codes, source symbols are part
of the encoding symbols. encoding symbol that is not a source symbol. the k/n ratio, i.e., the ratio between the number
of source symbols and the number of encoding symbols.
By definition, the code rate is such that: 0 < code rate ≤ 1.
A code rate close to 1 indicates that a small number of repair
symbols have been produced during the encoding process. FEC code in which the source symbols are part
of the encoding symbols. The LDPC-Staircase codes
introduced in this document are systematic. a block of k source symbols that are considered
together for the encoding.
a communication path where packets are either
dropped (e.g., by a congested router, or because the
number of transmission errors exceeds the correction
capabilities of the physical layer codes) or
received. When a packet is received, it is assumed
that this packet is not corrupted.
Some of them are FECFRAME framework specific and are in line with
:
The unit of source data provided as payload to the transport layer.
Depending on the use-case, an ADU may use an RTP encapsulation.
A sequence of ADUs associated with a transport-layer flow
identifier (such as the standard 5-tuple {Source IP address, source
port, destination IP address, destination port, transport protocol}).
Depending on the use-case, several ADU flows may be protected
together by the FECFRAME framework. a set of ADUs that are considered together by the FECFRAME
instance for the purpose of the FEC scheme.
Along with the F[], L[], and Pad[] fields, they form the set
of source symbols over which FEC encoding will be performed.
a unit of data constituted by the ADU and the associated
Flow ID, Length and Padding fields ().
This is the unit of data that is used as source symbol.
Information which controls the operation of the FEC Framework.
The FFCI enables the synchronization of the FECFRAME sender
and receiver instances.
At a sender (respectively, at a receiver) a
payload submitted to (respectively, received from) the transport
protocol containing an ADU along with an optional Explicit Source FEC
Payload ID.
At a sender (respectively, at a receiver) a
payload submitted to (respectively, received from) the transport
protocol containing one repair symbol along with a Repair FEC
Payload ID and possibly an RTP header.
The above terminology is illustrated in
(sender's point of view):
This document uses the following notations:
Some of them are FEC scheme specific:
denotes the number of source symbols in a source block. denotes the maximum number of source symbols for any source block. denotes the number of encoding symbols generated for a source block. denotes the encoding symbol length in bytes. denotes the "code rate", i.e., the k/n ratio. denotes the target number of "1s" per column in the left side of
the parity check matrix. denotes the value N1 - 3. denotes a raised to the power b.
Some of them are FECFRAME framework specific:
denotes the number of ADUs per ADU block. denotes the maximum number of ADUs for any ADU block.This document uses the following abbreviations:
stands for Application Data Unit. stands for Encoding Symbol ID. stands for Forward Error (or Erasure) Correction code. stands for FEC Framework Configuration Information. stands for FEC Scheme Specific Information. stands for Low Density Parity Check. stands for Maximum Distance Separable code.
This section introduces the procedures that are used during the ADU block and the related
source block creation, for the FEC scheme considered.
This specification has the following restrictions:
there MUST be exactly one source symbol per ADUI, and therefore per ADU; there MUST be exactly one repair symbol per FEC Repair Packet; there MUST be exactly one source block per ADU block; the use of the LDPC-Staircase scheme is such that there MUST be exactly one encoding symbol per group,
i.e., G MUST be equal to 1 ;
Two kinds of limitations MUST be considered, that impact the ADU block creation:
at the FEC Scheme level: the FEC Scheme and the FEC codec have limitations that
define a maximum source block size; at the FECFRAME instance level: the target use-case MAY have real-time constraints
that MAY define a maximum ADU block size;
Note that terminology "maximum source block size" and "maximum ADU block size"
depends on the point of view that is adopted (FEC Scheme versus FECFRAME instance).
However, in this document, both refer to the same value since
requires there is exactly one source symbol per ADU.
We now detail each of these aspects.
The maximum source block size in symbols, max_k, depends on several parameters:
the code rate (CR), the Encoding Symbol ID (ESI) field length in the Explicit
Source/Repair FEC Payload ID (16 bits), as well as possible internal codec limitations.
More specifically, max_k cannot be larger than the following values, derived
from the ESI field size limitation, for a given code rate:
max1_k = 2^^(16 - ceil(Log2(1/CR)))
Some common max1_k values are:
CR == 1 (no repair symbol): max1_k = 2^^16 = 65536 symbols1/2 ≤ CR < 1: max1_k = 2^^15 = 32,768 symbols1/4 ≤ CR < 1/2: max1_k = 2^^14 = 16,384 symbolsAdditionally, a codec MAY impose other limitations on the maximum source
block size, for instance, because of a limited working memory size.
This decision MUST be clarified at implementation time, when the target
use-case is known. This results in a max2_k limitation.
Then, max_k is given by:
max_k = min(max1_k, max2_k)
Note that this calculation is only required at the encoder (sender), since the
actual k parameter (k ≤ max_k) is communicated to the decoder (receiver) through
the Explicit Source/Repair FEC Payload ID.
The source ADU flows MAY have real-time constraints.
In that case the maximum number of ADUs of an ADU block must not exceed a certain
threshold since it directly impacts the decoding delay.
The larger the ADU block size, the longer a decoder may have to wait until it has received
a sufficient number of encoding symbols for decoding to succeed, and therefore
the larger the decoding delay.
When the target use-case is known, these real-time constraints result in an upper bound to
the ADU block size, max_rt.
For instance, if the use-case specifies a maximum decoding latency, l, and if each
source ADU covers a duration d of a continuous media (we assume here the simple case
of a constant bit rate ADU flow), then the ADU block size must not exceed:
max_rt = floor(l / d)
After encoding, this block will produce a set of at most n = max_rt / CR encoding symbols.
These n encoding symbols will have to be sent at a rate of n / l packets per second.
For instance, with d = 10 ms, l = 1 s, max_rt = 100 ADUs.
If we take into account all these constraints, we find:
max_B = min(max_k, max_rt)
This max_B parameter is an upper bound to the number of ADUs that can constitute an ADU block.
In its most general form the FECFRAME framework and the LDPC-Staircase FEC scheme
are meant to protect a set of independent flows.
Since the flows have no relationship to one another, the ADU size of each
flow can potentially vary significantly.
Even in the special case of a single flow, the ADU sizes can largely
vary (e.g., the various frames of a "Group of Pictures (GOP) of an H.264 flow).
This diversity must be addressed since the LDPC-Staircase FEC scheme requires a constant
encoding symbol size (E parameter) per source block.
Since this specification requires that there is only one source symbol per ADU,
E must be large enough to contain all the ADUs of an ADU block along
with their prepended 3 bytes (see below).
In situations where E is determined per source block
(default, specified by the FFCI/FSSI with S = 0, ),
E is equal to the size of the largest ADU of this source block plus three (for the
prepended 3 bytes, see below).
In this case, upon receiving the first FEC Repair Packet for this source block,
since this packet MUST contain a single repair symbol (),
a receiver determines the E parameter used for this source block.
In situations where E is fixed
(specified by the FFCI/FSSI with S = 1, ),
then E must be greater or equal to the size of the largest ADU of this source block
plus three (for the prepended 3 bytes, see below).
If this is not the case, an error is returned.
How to handle this error is use-case specific (e.g., a larger E parameter may be
communicated to the receivers in an updated FFCI message, using an appropriate
mechanism) and is not considered by this specification.
The ADU block is always encoded as a single source block.
There are a total of B ≤ max_B ADUs in this ADU block.
For the ADU i, with 0 ≤ i ≤ B-1, 3 bytes are prepended
():
The first byte, FID[i] (Flow ID), contains the integer identifier
associated to the source ADU flow to which this ADU
belongs to.
It is assumed that a single byte is sufficient, or said
differently, that no more than 256 flows will be protected by
a single instance of the FECFRAME framework.
The following two bytes, L[i] (Length), contain the length of this
ADU, in network byte order (i.e., big endian).
This length is for the ADU itself and does not include the
FID[i], L[i], or Pad[i] fields.
Then zero padding is added to ADU i (if needed) in field Pad[i], for alignment purposes
up to a size of exactly E bytes.
The data unit resulting from the ADU i and the F[i], L[i] and Pad[i] fields, is called
ADU Information (or ADUI).
Each ADUI contributes to exactly one source symbol to the source block.
Note that neither the initial 3 bytes nor the optional padding
are sent over the network.
However, they are considered during FEC encoding.
It means that a receiver who lost a certain FEC source packet (e.g., the
UDP datagram containing this FEC source packet) will be able to recover the ADUI
if FEC decoding succeeds.
Thanks to the initial 3 bytes, this receiver will get rid of the padding (if any)
and identify the corresponding ADU flow.
The FEC Framework Configuration Information (or FFCI) includes information
that MUST be communicated between the sender and receiver(s).
More specifically, it enables the synchronization of the FECFRAME sender
and receiver instances.
It includes both mandatory elements and scheme-specific elements,
as detailed below.
the value assigned to this fully-specified FEC scheme MUST be XXX,
as assigned by IANA ().
When SDP is used to communicate the FFCI, this FEC Encoding ID is carried in
the 'encoding-id' parameter.
The FEC Scheme Specific Information (FSSI) includes elements that are specific
to the present FEC scheme. More precisely:
a non-negative 32 bit integer used as the seed of the Pseudo Random Number
Generator, as defined in .
a non-negative integer that indicates
either the length of each encoding symbol in bytes (strict mode, i.e., if S = 1),
or the maximum length of any encoding symbol (i.e., if S = 0).
when set to 1 this flag indicates that the E parameter is the actual encoding symbol
length value for each block of the session
(unless otherwise notified by an updated FFCI if this possibility is considered by the use-case or CDP).
When set to 0 this flag indicates that the E parameter is the maximum encoding symbol
length value for each block of the session
(unless otherwise notified by an updated FFCI if this possibility is considered by the use-case or CDP).
an integer between 0 (default) and 7, inclusive.
The number of "1s" per column in the left side of the parity check matrix, N1, is then
equal to N1m3 + 3, as specified in .
These elements are required both by the sender (LDPC-Staircase encoder) and the receiver(s) (LDPC-Staircase decoder).
When SDP is used to communicate the FFCI, this FEC scheme-specific information is carried in
the 'fssi' parameter in textual representation as specified in .
For instance:
fssi=seed:1234,E:1400,S:0,n1m3:0
If another mechanism requires the FSSI to be carried as an opaque octet string
(for instance after a Base64 encoding), the encoding format consists of the following 7 octets:
PRNG seed (seed): 32 bit field. Encoding symbol length (E): 16 bit field. Strict (S) flag: 1 bit field. Reserved: a 4 bit field that MUST be set to zero. N1m3 parameter (n1m3): 3 bit field.
A FEC source packet MUST contain an Explicit Source FEC Payload ID that is appended to the
end of the packet as illustrated in .
More precisely, the Explicit Source FEC Payload ID is composed of the following fields
():
this field identifies the source block to which this FEC source packet belongs.
this field identifies the source symbol contained in this FEC source packet.
This value is such that 0 ≤ ESI ≤ k - 1 for source symbols.
this field provides the number of source symbols for this source block, i.e., the k parameter.
A FEC repair packet MUST contain a Repair FEC Payload ID that is prepended to the
repair symbol(s) as illustrated in .
There MUST be a single repair symbol per FEC repair packet.
More precisely, the Repair FEC Payload ID is composed of the following fields:
():
this field identifies the source block to which the FEC repair packet belongs.
this field identifies the repair symbol contained in this FEC repair packet.
This value is such that k ≤ ESI ≤ n - 1 for repair symbols.
this field provides the number of source symbols for this source block,
i.e., the k parameter.
this field provides the number of encoding symbols for this source block,
i.e., the n parameter.
The following procedures apply:
The source block creation procedures are specified in
.
The SBN value is incremented for each new source block, starting at
0 for the first block of the ADU flow.
Wrapping to zero will happen for long sessions, after value 2^^16 - 1.
The ESI of encoding symbols is managed sequentially, starting at
0 for the first symbol.
The first k values (0 ≤ ESI ≤ k - 1) identify source symbols, whereas
the last n-k values (k ≤ ESI ≤ n - 1) identify repair symbols.
The FEC repair packet creation procedures are specified in
.
The present document inherits from the specification of the
core LDPC-Staircase codes for a packet erasure transmission channel.
Because of the requirement to have exactly one encoding symbol per group,
i.e., because G MUST be equal to 1 (),
several parts of are useless.
In particular, this is the case of Section 5.6. "Identifying the G Symbols of an Encoding Symbol Group".
The FEC Framework document provides a comprehensive
analysis of security considerations applicable to FEC schemes.
Therefore the present section follows the security considerations section of
and only discusses topics that are specific
to the use of LDPC-Staircase codes.
The LDPC-Staircase FEC Scheme specified in this document does not change the
recommendations of .
To summarize, if confidentiality is a concern, it is RECOMMENDED that one of the
solutions mentioned in is used, with special
considerations to the way this solution is applied (e.g., before versus after
FEC protection, and within the end-system versus in a middlebox), to the operational
constraints (e.g., performing FEC decoding in a protected environment may be
complicated or even impossible) and to the threat model.
The LDPC-Staircase FEC Scheme specified in this document does not change the
recommendations of .
To summarize, it is RECOMMENDED that one of the solutions mentioned in
is used on both the FEC Source and Repair Packets.
The FEC Scheme specified in this document defines parameters that
can be the basis of several attacks.
More specifically, the following parameters of the FFCI may be modified
by an attacker ():
FEC Encoding ID:
changing this parameter leads the receiver to consider a different
FEC Scheme, which enables an attacker to create a Denial of Service (DoS).
Encoding symbol length (E):
setting this E parameter to a value smaller than the valid one enables
an attacker to create a DoS since the repair symbols and certain source
symbols will be larger than E, which is an incoherency for the receiver.
Setting this E parameter to a value larger than the valid one has
similar impacts when S=1 since the received repair symbol size will be
smaller than expected. On the opposite it will not lead to any incoherency
when S=0 since the actual symbol length value for the block is determined
by the size of any received repair symbol, as long as this value is smaller
than E.
However setting this E parameter to a larger value may have impacts on
receivers that pre-allocate memory space in advance to store incoming
symbols.
Strict (S) flag:
flipping this S flag from 0 to 1 (i.e., E is now considered as
a strict value) enables an attacker to mislead the receiver if the
actual symbol size varies over different source blocks.
Flipping this S flag from 1 to 0 has no major consequences unless the
receiver requires to have a fixed E value (e.g., because the receiver
pre-allocates memory space).
N1 minus 3 (n1m3):
changing this parameter leads the receiver to consider a different
code, which enables an attacker to create a DoS.
It is therefore RECOMMENDED that security measures are taken to
guarantee the FFCI integrity, as specified in .
How to achieve this depends on the way the FFCI is communicated from the sender
to the receiver, which is not specified in this document.
Similarly, attacks are possible against the Explicit Source FEC Payload ID
and Repair FEC Payload ID: by modifying the Source Block Number (SBN), or the
Encoding Symbol ID (ESI), or the Source Block Length (k), or the Number Encoding Symbols (n),
an attacker can easily corrupt the block identified by the SBN.
Other consequences, that are use-case and/or CDP dependant, may also happen.
It is therefore RECOMMENDED that security measures are taken to guarantee the
FEC Source and Repair Packets as stated in .
The LDPC-Staircase FEC Scheme specified in this document does not change the
recommendations of .The LDPC-Staircase FEC Scheme specified in this document does not change the
recommendations of concerning the use of
the IPsec/ESP security protocol as a mandatory to implement (but not mandatory
to use) security scheme.
This is well suited to situations where the only insecure domain is the one
over which the FEC Framework operates.
The FEC Framework document provides a comprehensive
analysis of operations and management considerations applicable to FEC schemes.
Therefore the present section only discusses topics that are specific to the use of
LDPC-Staircase codes as specified in this document.
LDPC-Staircase codes have excellent erasure recovery capabilities with
large source blocks, close to ideal MDS codes.
For instance, independently of FECFRAME, with source block size k=1024, CR=2/3, N1=5, G=1, with a hybrid
ITerative/Maximum Likelihood (IT/ML) decoding approach (see below) and when all symbols
are sent in a random order (see below), the average overhead
amounts to 0.64% (corresponding to 6.5 symbols in addition to k) and receiving
1046 symbols (corresponding to a 2.1% overhead) is sufficient to reduce the decoding
failure probability to 5.9*10^^-5.
This is why these codes are a good solution to protect a
single high bitrate source flow as in ,
or to protect globally several mid-rate source flows within a single FECFRAME
instance: in both cases the source block size can be assumed to be equal to a few
hundreds (or more) source symbols.
LDPC-Staircase codes are also a good solution whenever processing
requirements at a software encoder or decoder must be kept to a minimum.
This is true when the decoder uses an IT decoding algorithm,
or an ML algorithm (we use a Gaussian Elimination as the ML algorithm) when
this latter is carefully implemented and the source block size kept reasonable,
or a mixture of both techniques which is the recommended solution
.
For instance an average decoding speed between 1.3 Gbps (corresponding to a very
bad channel, close to the theoretical decoding limit and requiring an ML decoding)
and 4.3 Gbps (corresponding to a medium quality channel where IT decoding is sufficient)
are easily achieved with a source block size composed of k=1024 source symbols,
a code rate CR=2/3 (i.e., 512 repair symbols), 1024 byte long symbols, G=1, and N1=5,
on an Intel Xeon 5120/1.86GHz workstation running Linux/64 bits.
Additionally, with a hybrid IT/ML approach, a receiver can decide if and when
ML decoding is used, depending on local criteria (e.g., battery or CPU
capabilities), independently from other receivers.
As the source block size decreases, the erasure recovery capabilities
of LDPC codes in general also decrease.
In the case of LDPC-Staircase codes, in order to compensate this phenomenon,
it is recommended to increase the N1 parameter (e.g., experiments carried
out in use N1=7 if k=170 symbols, and N1=5 otherwise)
and to use a hybrid IT/ML decoding approach.
For instance, independently of FECFRAME, with a small source block size k=256 symbols, CR=2/3, N1=7, and G=1,
8he average overhead amounts to 0.71% (corresponding to 1.8 symbols in addition to k),
and receiving 271 symbols (corresponding to a 5.9% overhead)
is sufficient to reduce the decoding failure probability to 5.9*10^^-5.
Using N1=9 or 10 further improves these results if need be, which also enables
to use LDPC-Staircase codes with k=100 symbols for instance.
With very small source blocks (e.g., a few tens symbols), using for instance
Reed-Solomon codes or 2D parity check codes
MAY be more appropriate.
The way the FEC Repair Packets are transmitted is of high importance.
A good strategy, that works well for any kind of channel loss model, consists
in sending FEC Repair Packets in random order (rather than in sequence) while
FEC Source Packets are sent first and in sequence.
Sending all packets in a random order is another possibility, but it requires
that all repair symbols for a source block be produced first, which adds some
extra delay at a sender.
Values of FEC Encoding IDs are subject to IANA registration.
defines general guidelines on IANA
considerations.
In particular it defines a registry called FEC Framework (FECFRAME) FEC Encoding IDs
whose values are granted on an IETF Consensus basis.
This document registers one value in the FEC Framework (FECFRAME)
FEC Encoding IDs registry as follows:
XXX refers to the Simple LDPC-Staircase FEC Scheme for Arbitrary Packet Flows.
The authors want to thank K. Matsuzono, J. Detchart and H. Asaeda for their
contributions in evaluating the use of LDPC-Staircase codes in the context
of FECFRAME .
Key words for use in RFCs to Indicate Requirement LevelsLow Density Parity Check (LDPC) Forward Error CorrectionForward Error Correction (FEC) FrameworkSession Description Protocol Elements for the Forward Error Correction (FEC) FrameworkThe Use of Forward Error Correction (FEC) in Reliable MulticastForward Error Correction (FEC) Building BlockReed-Solomon Forward Error Correction (FEC) SchemesSimple Reed-Solomon Forward Error Correction (FEC) Scheme for FECFRAMERaptor Forward Error Correction SchemeOptimizing the Error Recovery Capabilities of LDPC-Staircase Codes
Featuring a Gaussian Elimination Decoding SchemeHigh performances AL-FEC codes for the erasure channel : variation around LDPC codesPerformance Analysis of a High-Performance Real-Time Application with Several AL-FEC SchemesLDPC-Staircase/LDPC-Triangle Codec Reference ImplementationThe OpenFEC project