Internet-Draft | SLC FEC Scheme | December 2021 |
Wang, et al. | Expires 16 June 2022 | [Page] |
RFC8680 describes a framework for using Sliding Window Forward Error Correction(FEC) codes to protection against packet loss, the framework significantly improves FEC efficiency and reduces FEC-related added latency compared to block FEC codes defined in RFC 6363. RFC8681 further describes two fully specified FEC schemes for Sliding Window Random Linear Codes(RLC), the schemes rely on an encoding window that slides over a continuous set of source symbols, generating new repair symbols whenever needed. This document describes a fully specified FEC scheme for Sliding Window Selective Linear Code(SLC) over the Galois Field GF (2^^8) , compared to RFC8681, this framework use a discrete encoding window which can protect arbitrary media streams selectively, and has better recovery performance in scenarios such as layered video coding or mixed streams for video streaming applications.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 16 June 2022.¶
Copyright (c) 2021 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
The use of Application-Level Forward Erasure Correction (AL-FEC) codes is a widely-used error control method used to improve the reliability of unicast, multicast, and broadcast transmissions.¶
The [RFC5052] document describes a general framework to use FEC in Content Delivery Protocols (CDPs), and it is suitable for FEC schemes based on building blocks. Based on this framework, the [RFC5170] describes two fully-specified FEC Schemes, Low-Density Parity Check (LDPC) Staircase and LDPC Triangle, and the [RFC5510] describes one Fully-Specified FEC Scheme for the special case of Reed-Solomon (RS) over GF (2^^8).¶
The [RFC6363] document describes a general framework used to protect arbitrary media streams along the lines defined by FECFRAME. The FEC scheme defined by the framework does not limit the type of input data, but only processes the data.¶
Similar to [RFC5052], [RFC6363] only considers block FEC schemes, which requires that the input stream be divided into a series of blocks according to the block partitioning algorithm defined in [RFC5052]. The [RFC6681], [RFC6816], and [RFC6865] are FEC schemes based on this framework. The value for the block size affects the packet loss resistance and the encoding and decoding delay of the FEC scheme. At the same code rate, the FEC scheme with larger size blocks have higher robustness (e.g., in case of long packet erasure bursts), but it has higher decoding delay which is unacceptable for real-time video streaming application.¶
The framework described in [RFC8680] provides support for FEC codes based on a sliding coding window. The FEC scheme in this framework [RFC8681] is advantageous for real-time flows because of its high robustness and low additional delay.¶
In general video coding, all frames in a GOP follow the rule of the frame by frame reference, that is, the reconstruction of the current video frame relies on the preceding frame. In that case, all frames in the encoding window are beneficial to the decoding of the current frame. However, for layered video coding, video frames may not reference the preceding frames, but the upper layer frames. When non-reference frames are encoded, the recovered packets will not help the decoding of the current frame, and even have a negative effect on the FEC error correction ability in extreme cases.¶
This document introduces one fully specified FEC scheme, it is capable to protect streams selectively by adding a filter into the FEC coding window management. The Sliding Window SLC FEC scheme described in this document belongs to the broad class of Sliding Window AL-FEC Codes (a.k.a., convolutional codes) [RFC8406]. The encoding process is based on an encoding window, and the source symbols are encoded by sliding the encoding window. However, the encoding window does not slide directly over the set of the source symbols. Instead, it filters the source symbols according to the rule defined by application (e.g., video frame dependency, or stream type) and then slide over the set of these filtered source symbols. Repair symbols are generated on-the-fly, by the computation of a linear combination of source symbols present in the current encoding window and passed to the transport layer.¶
When the loss of source symbol is detected at the receiver, the SLC decoder will recover the lost source symbol according to the linear combination of the source symbols and each received repair symbol (when the rank of the equations involved is solvable).¶
This fully-specified FEC scheme follows the structure required by [RFC6363], Section 5.6 ("FEC Scheme Requirements"), namely:¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119] [RFC8174].¶
This document uses the following terms and definitions. Some of these terms and definitions are FEC scheme-specific and are in line with [RFC5052] [RFC6363]:¶
This document uses the following notations and some of them are FEC scheme-specific:¶
This document uses the following abbreviations, and some of them are FEC scheme-specific:¶
This section describes the format of FEC Framework Configuration Information (or FFCI) and FEC Payload IDs, which are carried in "big-endian" or "network order" format.¶
The FFCI needs to be shared between FECFRAME sender and receiver instances to ensure the synchronization of information. It includes mandatory elements (e.g., FEC Encoding ID) and scheme-specific elements (e.g., Encoding Symbol size).¶
The FEC scheme-specific information (FSSI) of this scheme is as follows:¶
These elements are required both by the encoder and decoder.¶
When SDP is used to communicate the FFCI, this FEC Scheme-Specific Information MUST be carried in the 'fssi' parameter in textual representation specified in [RFC6364]. For instance:¶
fssi=E:1500,cw_size_max:128,gc_max:4¶
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 four octets:¶
The encoding format consists of the following 4 octets of Figure 1:¶
A FEC Source Packet MUST contain an Explicit Source FEC Payload ID that is appended to the end of the packet as illustrated in Figure 2.¶
More precisely, the Explicit Source FEC Payload ID is composed of the following field:¶
A FEC repair packet MUST contain a Repair FEC Payload ID prepended to the repair symbol as illustrated in Figure 4. There MUST be a single repair symbol per FEC repair packet.¶
More precisely, the SLC decoder scheme require the following information from the Repair FEC Payload ID:¶
The length of the Repair FEC Payload ID depends on the gc parameter.¶
This specification has the following restrictions:¶
Before FEC coding, the mapping from ADU to AUDI needs to be established. When multiple source flows (e.g., media streams) are mapped onto the same FECFRAME instance, each flow is assigned its Flow ID value. The Flow ID needs to be included in the ADUI. Then, the recovered ADU can be allocated to the corresponding source flow by its Flow ID.¶
Because the length of each ADU may be inconsistent, to ensure that the decoder can extract ADU from ADUI, the original ADU length also needs to be added to ADUI.¶
For each incoming ADU, an ADUI MUST be created as follows. First of all, 3 bytes are prepended (Figure 6):¶
Then, zero padding is added to the ADU if needed:¶
The data unit resulting from the ADU and the F, L, and Pad fields is called ADUI. An ADUI always contributes to an integral number of source symbols.¶
Whenever an ADU arrives, ADU-to-source symbols mapping will be performed. Then, the source symbols will be added to the array source_symbol_history. Whenever a repair symbol needs to be generated, the SLC FEC encoder will search backward in the source_symbol_history, and the source symbols that conforms the rules defined by the application will be put into the encoding window. When the encoding window cw_size is equal to its maximum value cw_size_max or the symbol group count gc is equal to its maximum value gc_max, the search is stopped and the FEC coding will be performed on the source symbols in the encoding window.¶
Taking Figure 7 as an example, the coding dependency between frames is used as the rule of source symbol selection, and frame I is the reference frame of frame P1, so I and P1 are placed in the encoding window when generating Repair2. However, P1 is not the reference frame of P2 under the SVC mode, so P1 is skipped, I and P2 are put into the encoding window to generate Repair3. The same process is performed to produce Rapair4 and Repair5.¶
Note that each time the encoding window slides, cm_r will update. The update rules are as follows:¶
Compared with the RLC FEC encoder, which depends on a pseudorandom number generator to compute the coding coefficients, the SLC FEC encoder uses a fixed coding matrix to reduce overhead. The elements of the coding matrix used during the encoding process are generated at the SLC FEC encoder each time a new repair symbol needs to be produced. The cm_r and cm_c parameters control these elements. The values of cm_c between 0 (the minimum value) and cw_size_max-1 (the maximum value). And the values of cm_r between 0 and 255-cw_size_max.¶
where cm_r represents the row number in the matrix, cm_c represents the col number in the matrix, cw_size_max represents the maximum value of the encoding window, x_r = cm_r, y_c = cw_size_max+cm_c. The basic operations of the above equations are carried out in the GF (2^^8).¶
In Section 5.4, the elements of coding matrix G(cm_r, cm_c) are obtained. Then, a repair symbol is generated by the computation of a linear combination of source symbols.¶
A linear combination of the cw_size source symbols present in the encoding window, say src_0 to src_cw_size_1, is computed as follows. For each byte of position i in each source and the repair symbol, where i belongs to [0; E-1].¶
where * is the multiplication over GF (2^^8), + is the addition over GF (2^^8). In this document, the following irreducible polynomial is used for GF(2^^8).¶
For decoding side, it is assumed that the repair symbol protects cw_size source symbols, among which j source symbols are lost, then,¶
It is assumed that in the linear system maintained by the decoding side, there is a symbol sequence S = {lost_src_1, lost_src_2, ... , lost_src_N} consisting of N lost source symbols, a symbol sequence R = {repair_1, repair_2, ... , repair_N} consisting of N repair symbols¶
There is a matrix A whose row represents the position of the repair symbol in R and whose column represents the position of the lost source symbol in S. A[row][col] represents the matrix element of lost_src_row corresponding to repair_col (if it does not exist, then A[row][col] = 0).¶
where cm_r can be extracted from the Repair FEC Payload ID, cm_c represents the position of the lost source symbol in the encoding window.¶
Therefore, there is a linear system of equation as follows:¶
The inverse matrix of A can be obtained by Gauss elimination method, and finally S can be recovered:¶
1. Whenever a new repair symbol needs to be produced, the source symbols are put into the sliding encoding window according to the rule defined by application (e.g., coding dependency between frames).¶
2. The SLC FEC encoder gathers the cw_size source symbols currently in the sliding encoding window.¶
3. The elements of the coding matrix are determined according to the parameters cm_r and cm_c (Section 5.4).¶
4. The SLC FEC encoder computes the repair symbol by a linear combination of the cw_size source symbols present in the encoding window using the coding matrix (Section 5.5.1).¶
When encoding, the execution object is ADUI composed of Flow ID, Length, ADU, Padding.¶
1. A linear system composed of source symbols, elements of the coding matrix, and repair symbols MUST to be maintained to recover the lost source packets.¶
2. When a repair symbol is received, it detects whether there is loss in the protected source symbols. If at least one of the corresponding source symbols has been lost, an equation composed of the repair symbol, the corresponding source symbols, and the elements of the coding matrix will be added to the linear system (the elements of the coding matrix are generated by the method provided in Section 5.4).¶
3. When the linear system covering one or more lost source symbols is full, decoding is performed in order to recover lost source symbols (Section 5.5.2).¶
4. Each time an ADUI can be totally recovered, padding is removed (thanks to the Length field, L, of the ADUI), and the ADU will be assigned to the corresponding flow.¶
Note that the recovered source symbols can be directly passed to the application through the callback function, or passed to the application after receiving a certain number of source symbols, which depends on the operation decision of the application.¶
The FEC Framework document [RFC6363] provides a comprehensive analysis of security considerations applicable to FEC schemes. Therefore, the present section follows the security considerations section of [RFC6363] and only discusses specific topics.¶
The Sliding Window SLC FEC scheme specified in this document does not change the recommendations of [RFC6363]. To summarize, if confidentiality is a concern, it is RECOMMENDED that one of the solutions mentioned in [RFC6363] is used with special considerations to the way this solution is applied (e.g., is encryption applied before or after FEC protection, within the end system or in a middlebox), to the operational constrains (e.g., performing FEC decoding in a protected environment may be complicated or even impossible) and to the threat model.¶
The Sliding Window SLC FEC scheme specified in this document does not change the recommendations of [RFC6363]. To summarize, it is RECOMMENDED that one of the solutions mentioned in [RFC6363] is used on both the FEC Source and Repair Packets.¶
The Sliding Window SLC FEC scheme specified in this document defines parameters that can be the basis of attacks. More specifically, the following parameters of the FEC Framework Configuration Information may be modified by an attacker (Section 4.1):¶
Therefore, it is RECOMMENDED that security measures be taken to guarantee the FFCI integrity, as specified in [RFC6363]. How to achieve this depends on how 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. More specifically, in the case of an FEC Source Packet, the following value can be modified by an attacker who targets receivers:¶
Therefore, it is RECOMMENDED that security measures are taken to guarantee the FEC Source and Repair Packets as stated in [RFC6363].¶
The Sliding Window SLC FEC scheme specified in this document does not change the recommendations of [RFC6363].¶
The Sliding Window SLC FEC scheme specified in this document does not change the recommendations of [RFC6363] concerning the use of the IPsec/Encapsulating Security Payload (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 FECFRAME document [RFC6363] provides a comprehensive analysis of operations and management considerations applicable to FEC schemes. Therefore, the present section only discusses specific topics.¶
The Sliding Window SLC FEC scheme specified in this document defines the maximum number of groups participating in encoding, called gc_max, reflecting the maximum number of source symbols that the coding window can hold. Gc_max is directly proportional to the computational complexity of FEC encoding. If gc_max is too large, the time complexity of FEC encoding will be too high, and the CPU overhead will be too large. Generally, it is appropriate to associate gc_max with cw_size_max.¶
For example, in real-time video streaming applications, the frame rate (FR) and bit rate (BR) is determined by transmitting the video frames. The possible number of packets per frame can be calculated according to FR and BR, and they can calculate the maximum number of symbols in the coding window.¶
Where MTU denotes Maximum Transmission Unit.¶
This document registers one values in the "FEC Framework (FECFRAME) FEC Encoding IDs" sub-registry as follows:¶
The authors would like to thank the FEC Framework Design Team for providing a great FEC Framework. The authors would also like to thank Shie Qian for reviewing the earlier draft versions of this document.¶