| draft-ietf-cellar-ffv1-16.txt | draft-ietf-cellar-ffv1-17.txt | |||
|---|---|---|---|---|
| cellar M. Niedermayer | cellar M. Niedermayer | |||
| Internet-Draft | Internet-Draft | |||
| Intended status: Informational D. Rice | Intended status: Informational D. Rice | |||
| Expires: 3 January 2021 | Expires: 22 February 2021 | |||
| J. Martinez | J. Martinez | |||
| 2 July 2020 | 21 August 2020 | |||
| FFV1 Video Coding Format Version 0, 1, and 3 | FFV1 Video Coding Format Version 0, 1, and 3 | |||
| draft-ietf-cellar-ffv1-16 | draft-ietf-cellar-ffv1-17 | |||
| Abstract | Abstract | |||
| This document defines FFV1, a lossless intra-frame video encoding | This document defines FFV1, a lossless intra-frame video encoding | |||
| format. FFV1 is designed to efficiently compress video data in a | format. FFV1 is designed to efficiently compress video data in a | |||
| variety of pixel formats. Compared to uncompressed video, FFV1 | variety of pixel formats. Compared to uncompressed video, FFV1 | |||
| offers storage compression, frame fixity, and self-description, which | offers storage compression, frame fixity, and self-description, which | |||
| makes FFV1 useful as a preservation or intermediate video format. | makes FFV1 useful as a preservation or intermediate video format. | |||
| Status of This Memo | Status of This Memo | |||
| skipping to change at page 1, line 36 ¶ | skipping to change at page 1, line 36 ¶ | |||
| Internet-Drafts are working documents of the Internet Engineering | Internet-Drafts are working documents of the Internet Engineering | |||
| Task Force (IETF). Note that other groups may also distribute | Task Force (IETF). Note that other groups may also distribute | |||
| working documents as Internet-Drafts. The list of current Internet- | working documents as Internet-Drafts. The list of current Internet- | |||
| Drafts is at https://datatracker.ietf.org/drafts/current/. | Drafts is at https://datatracker.ietf.org/drafts/current/. | |||
| Internet-Drafts are draft documents valid for a maximum of six months | Internet-Drafts are draft documents valid for a maximum of six months | |||
| and may be updated, replaced, or obsoleted by other documents at any | and may be updated, replaced, or obsoleted by other documents at any | |||
| time. It is inappropriate to use Internet-Drafts as reference | time. It is inappropriate to use Internet-Drafts as reference | |||
| material or to cite them other than as "work in progress." | material or to cite them other than as "work in progress." | |||
| This Internet-Draft will expire on 3 January 2021. | This Internet-Draft will expire on 22 February 2021. | |||
| Copyright Notice | Copyright Notice | |||
| Copyright (c) 2020 IETF Trust and the persons identified as the | Copyright (c) 2020 IETF Trust and the persons identified as the | |||
| document authors. All rights reserved. | document authors. All rights reserved. | |||
| This document is subject to BCP 78 and the IETF Trust's Legal | This document is subject to BCP 78 and the IETF Trust's Legal | |||
| Provisions Relating to IETF Documents (https://trustee.ietf.org/ | Provisions Relating to IETF Documents (https://trustee.ietf.org/ | |||
| license-info) in effect on the date of publication of this document. | license-info) in effect on the date of publication of this document. | |||
| Please review these documents carefully, as they describe your rights | Please review these documents carefully, as they describe your rights | |||
| skipping to change at page 2, line 26 ¶ | skipping to change at page 2, line 26 ¶ | |||
| 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 | 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 4 | |||
| 2. Notation and Conventions . . . . . . . . . . . . . . . . . . 5 | 2. Notation and Conventions . . . . . . . . . . . . . . . . . . 5 | |||
| 2.1. Definitions . . . . . . . . . . . . . . . . . . . . . . . 5 | 2.1. Definitions . . . . . . . . . . . . . . . . . . . . . . . 5 | |||
| 2.2. Conventions . . . . . . . . . . . . . . . . . . . . . . . 5 | 2.2. Conventions . . . . . . . . . . . . . . . . . . . . . . . 5 | |||
| 2.2.1. Pseudo-code . . . . . . . . . . . . . . . . . . . . . 6 | 2.2.1. Pseudo-code . . . . . . . . . . . . . . . . . . . . . 6 | |||
| 2.2.2. Arithmetic Operators . . . . . . . . . . . . . . . . 6 | 2.2.2. Arithmetic Operators . . . . . . . . . . . . . . . . 6 | |||
| 2.2.3. Assignment Operators . . . . . . . . . . . . . . . . 7 | 2.2.3. Assignment Operators . . . . . . . . . . . . . . . . 7 | |||
| 2.2.4. Comparison Operators . . . . . . . . . . . . . . . . 7 | 2.2.4. Comparison Operators . . . . . . . . . . . . . . . . 7 | |||
| 2.2.5. Mathematical Functions . . . . . . . . . . . . . . . 7 | 2.2.5. Mathematical Functions . . . . . . . . . . . . . . . 7 | |||
| 2.2.6. Order of Operation Precedence . . . . . . . . . . . . 8 | 2.2.6. Order of Operation Precedence . . . . . . . . . . . . 8 | |||
| 2.2.7. Range . . . . . . . . . . . . . . . . . . . . . . . . 8 | 2.2.7. Range . . . . . . . . . . . . . . . . . . . . . . . . 9 | |||
| 2.2.8. NumBytes . . . . . . . . . . . . . . . . . . . . . . 9 | 2.2.8. NumBytes . . . . . . . . . . . . . . . . . . . . . . 9 | |||
| 2.2.9. Bitstream Functions . . . . . . . . . . . . . . . . . 9 | 2.2.9. Bitstream Functions . . . . . . . . . . . . . . . . . 9 | |||
| 3. Sample Coding . . . . . . . . . . . . . . . . . . . . . . . . 9 | 3. Sample Coding . . . . . . . . . . . . . . . . . . . . . . . . 9 | |||
| 3.1. Border . . . . . . . . . . . . . . . . . . . . . . . . . 9 | 3.1. Border . . . . . . . . . . . . . . . . . . . . . . . . . 10 | |||
| 3.2. Samples . . . . . . . . . . . . . . . . . . . . . . . . . 10 | 3.2. Samples . . . . . . . . . . . . . . . . . . . . . . . . . 10 | |||
| 3.3. Median Predictor . . . . . . . . . . . . . . . . . . . . 11 | 3.3. Median Predictor . . . . . . . . . . . . . . . . . . . . 11 | |||
| 3.4. Context . . . . . . . . . . . . . . . . . . . . . . . . . 12 | 3.4. Quantization Table Sets . . . . . . . . . . . . . . . . . 12 | |||
| 3.5. Quantization Table Sets . . . . . . . . . . . . . . . . . 12 | 3.5. Context . . . . . . . . . . . . . . . . . . . . . . . . . 12 | |||
| 3.6. Quantization Table Set Indexes . . . . . . . . . . . . . 12 | 3.6. Quantization Table Set Indexes . . . . . . . . . . . . . 12 | |||
| 3.7. Color spaces . . . . . . . . . . . . . . . . . . . . . . 13 | 3.7. Color spaces . . . . . . . . . . . . . . . . . . . . . . 13 | |||
| 3.7.1. YCbCr . . . . . . . . . . . . . . . . . . . . . . . . 13 | 3.7.1. YCbCr . . . . . . . . . . . . . . . . . . . . . . . . 13 | |||
| 3.7.2. RGB . . . . . . . . . . . . . . . . . . . . . . . . . 14 | 3.7.2. RGB . . . . . . . . . . . . . . . . . . . . . . . . . 14 | |||
| 3.8. Coding of the Sample Difference . . . . . . . . . . . . . 15 | 3.8. Coding of the Sample Difference . . . . . . . . . . . . . 15 | |||
| 3.8.1. Range Coding Mode . . . . . . . . . . . . . . . . . . 16 | 3.8.1. Range Coding Mode . . . . . . . . . . . . . . . . . . 16 | |||
| 3.8.2. Golomb Rice Mode . . . . . . . . . . . . . . . . . . 21 | 3.8.2. Golomb Rice Mode . . . . . . . . . . . . . . . . . . 21 | |||
| 4. Bitstream . . . . . . . . . . . . . . . . . . . . . . . . . . 26 | 4. Bitstream . . . . . . . . . . . . . . . . . . . . . . . . . . 26 | |||
| 4.1. Quantization Table Set . . . . . . . . . . . . . . . . . 27 | 4.1. Quantization Table Set . . . . . . . . . . . . . . . . . 27 | |||
| 4.1.1. quant_tables . . . . . . . . . . . . . . . . . . . . 28 | 4.1.1. quant_tables . . . . . . . . . . . . . . . . . . . . 28 | |||
| skipping to change at page 8, line 24 ¶ | skipping to change at page 8, line 24 ¶ | |||
| "max(a,b)" means the largest of two values a and b. | "max(a,b)" means the largest of two values a and b. | |||
| "median(a,b,c)" means the numerical middle value in a data set of a, | "median(a,b,c)" means the numerical middle value in a data set of a, | |||
| b, and c, i.e. a+b+c-min(a,b,c)-max(a,b,c). | b, and c, i.e. a+b+c-min(a,b,c)-max(a,b,c). | |||
| "A <== B" means B implies A. | "A <== B" means B implies A. | |||
| "A <==> B" means A <== B , B <== A. | "A <==> B" means A <== B , B <== A. | |||
| a_(b) means the b-th value of a sequence of a | ||||
| a_(b,c) means the 'b,c'-th value of a sequence of a | ||||
| 2.2.6. Order of Operation Precedence | 2.2.6. Order of Operation Precedence | |||
| When order of precedence is not indicated explicitly by use of | When order of precedence is not indicated explicitly by use of | |||
| parentheses, operations are evaluated in the following order (from | parentheses, operations are evaluated in the following order (from | |||
| top to bottom, operations of same precedence being evaluated from | top to bottom, operations of same precedence being evaluated from | |||
| left to right). This order of operations is based on the order of | left to right). This order of operations is based on the order of | |||
| operations used in Standard C. | operations used in Standard C. | |||
| a++, a-- | a++, a-- | |||
| !a, -a | !a, -a | |||
| skipping to change at page 12, line 8 ¶ | skipping to change at page 12, line 8 ¶ | |||
| configuration of all known implementations being impacted is 16-bit | configuration of all known implementations being impacted is 16-bit | |||
| YCbCr with no Pixel transformation with Range Coder coder, as other | YCbCr with no Pixel transformation with Range Coder coder, as other | |||
| potentially impacted configurations (e.g. 15/16-bit JPEG2000-RCT with | potentially impacted configurations (e.g. 15/16-bit JPEG2000-RCT with | |||
| Range Coder coder, or 16-bit content with Golomb Rice coder) were | Range Coder coder, or 16-bit content with Golomb Rice coder) were | |||
| implemented nowhere [ISO.15444-1.2016]. In the meanwhile, 16-bit | implemented nowhere [ISO.15444-1.2016]. In the meanwhile, 16-bit | |||
| JPEG2000-RCT with Range Coder coder was implemented without this | JPEG2000-RCT with Range Coder coder was implemented without this | |||
| issue in one implementation and validated by one conformance checker. | issue in one implementation and validated by one conformance checker. | |||
| It is expected (to be confirmed) to remove this exception for the | It is expected (to be confirmed) to remove this exception for the | |||
| median predictor in the next version of the FFV1 bitstream. | median predictor in the next version of the FFV1 bitstream. | |||
| 3.4. Context | 3.4. Quantization Table Sets | |||
| Relative to any "Sample" "X", the Quantized Sample Differences "L-l", | ||||
| "l-tl", "tl-t", "T-t", and "t-tr" are used as context: | ||||
| context = Q_{0}[l - tl] + | ||||
| Q_{1}[tl - t] + | ||||
| Q_{2}[t - tr] + | ||||
| Q_{3}[L - l] + | ||||
| Q_{4}[T - t] | ||||
| Figure 4 | ||||
| If "context >= 0" then "context" is used and the difference between | ||||
| the "Sample" and its predicted value is encoded as is, else | ||||
| "-context" is used and the difference between the "Sample" and its | ||||
| predicted value is encoded with a flipped sign. | ||||
| 3.5. Quantization Table Sets | ||||
| The FFV1 bitstream contains one or more Quantization Table Sets. | The FFV1 bitstream contains one or more Quantization Table Sets. | |||
| Each Quantization Table Set contains exactly 5 Quantization Tables | Each Quantization Table Set contains exactly 5 Quantization Tables | |||
| with each Quantization Table corresponding to one of the five | with each Quantization Table corresponding to one of the five | |||
| Quantized Sample Differences. For each Quantization Table, both the | Quantized Sample Differences. For each Quantization Table, both the | |||
| number of quantization steps and their distribution are stored in the | number of quantization steps and their distribution are stored in the | |||
| FFV1 bitstream; each Quantization Table has exactly 256 entries, and | FFV1 bitstream; each Quantization Table has exactly 256 entries, and | |||
| the 8 least significant bits of the Quantized Sample Difference are | the 8 least significant bits of the Quantized Sample Difference are | |||
| used as index: | used as index: | |||
| Q_{j}[k] = quant_tables[i][j][k&255] | Q_(j)[k] = quant_tables[i][j][k&255] | |||
| Figure 5 | Figure 4 | |||
| In this formula, "i" is the Quantization Table Set index, "j" is the | In this formula, "i" is the Quantization Table Set index, "j" is the | |||
| Quantized Table index, "k" the Quantized Sample Difference. | Quantized Table index, "k" the Quantized Sample Difference. | |||
| 3.5. Context | ||||
| Relative to any "Sample" "X", the Quantized Sample Differences "L-l", | ||||
| "l-tl", "tl-t", "T-t", and "t-tr" are used as context: | ||||
| context = Q_(0)[l - tl] + | ||||
| Q_(1)[tl - t] + | ||||
| Q_(2)[t - tr] + | ||||
| Q_(3)[L - l] + | ||||
| Q_(4)[T - t] | ||||
| Figure 5 | ||||
| If "context >= 0" then "context" is used and the difference between | ||||
| the "Sample" and its predicted value is encoded as is, else | ||||
| "-context" is used and the difference between the "Sample" and its | ||||
| predicted value is encoded with a flipped sign. | ||||
| 3.6. Quantization Table Set Indexes | 3.6. Quantization Table Set Indexes | |||
| For each "Plane" of each slice, a Quantization Table Set is selected | For each "Plane" of each slice, a Quantization Table Set is selected | |||
| from an index: | from an index: | |||
| * For Y "Plane", "quant_table_set_index[ 0 ]" index is used | * For Y "Plane", "quant_table_set_index[ 0 ]" index is used | |||
| * For Cb and Cr "Planes", "quant_table_set_index[ 1 ]" index is used | * For Cb and Cr "Planes", "quant_table_set_index[ 1 ]" index is used | |||
| * For extra "Plane", "quant_table_set_index[ (version <= 3 || | * For extra "Plane", "quant_table_set_index[ (version <= 3 || | |||
| chroma_planes) ? 2 : 1 ]" index is used | chroma_planes) ? 2 : 1 ]" index is used | |||
| skipping to change at page 16, line 15 ¶ | skipping to change at page 16, line 15 ¶ | |||
| 3.8.1. Range Coding Mode | 3.8.1. Range Coding Mode | |||
| Early experimental versions of FFV1 used the CABAC Arithmetic coder | Early experimental versions of FFV1 used the CABAC Arithmetic coder | |||
| from H.264 as defined in [ISO.14496-10.2014] but due to the uncertain | from H.264 as defined in [ISO.14496-10.2014] but due to the uncertain | |||
| patent/royalty situation, as well as its slightly worse performance, | patent/royalty situation, as well as its slightly worse performance, | |||
| CABAC was replaced by a Range coder based on an algorithm defined by | CABAC was replaced by a Range coder based on an algorithm defined by | |||
| G. Nigel and N. Martin in 1979 [range-coding]. | G. Nigel and N. Martin in 1979 [range-coding]. | |||
| 3.8.1.1. Range Binary Values | 3.8.1.1. Range Binary Values | |||
| To encode binary digits efficiently a Range coder is used. "C(i)" is | To encode binary digits efficiently a Range coder is used. C_(i) is | |||
| the i-th Context. "B(i)" is the i-th byte of the bytestream. "b(i)" | the i-th Context. B_(i) is the i-th byte of the bytestream. b_(i) is | |||
| is the i-th Range coded binary value, "S(0,i)" is the i-th initial | the i-th Range coded binary value, S_(0, i) is the i-th initial | |||
| state. The length of the bytestream encoding n binary symbols is | state. The length of the bytestream encoding n binary symbols is | |||
| "j(n)" bytes. | j_(n) bytes. | |||
| r_{i} = floor( ( R_{i} * S_{i,C_{i}} ) / 2 ^ 8 ) | r_(i) = floor( ( R_(i) * S_(i, C_(i)) ) / 2 ^ 8 ) | |||
| Figure 9 | Figure 9 | |||
| S_{i+1,C_{i}} = zero_state_{S_{i,C_{i}}} AND | S_(i + 1, C_(i)) = zero_state_(S_(i, C_(i))) AND | |||
| l_i = L_i AND | l_(i) = L_(i) AND | |||
| t_i = R_i - r_i <== | t_(i) = R_(i) - r_(i) <== | |||
| b_i = 0 <==> | b_(i) = 0 <==> | |||
| L_i < R_i - r_i | L_(i) < R_(i) - r_(i) | |||
| S_{i+1,C_{i}} = one_state_{S_{i,C_{i}}} AND | S_(i + 1, C_(i)) = one_state_(S_(i, C_(i))) AND | |||
| l_i = L_i - R_i + r_i AND | l_(i) = L_(i) - R_(i) + r_(i) AND | |||
| t_i = r_i <== | t_(i) = r_(i) <== | |||
| b_i = 1 <==> | b_(i) = 1 <==> | |||
| L_i >= R_i - r_i | L_(i) >= R_(i) - r_(i) | |||
| Figure 10 | Figure 10 | |||
| S_{i+1,k} = S_{i,k} <== C_i != k | S_(i + 1, k) = S_(i, k) <== C_(i) != k | |||
| Figure 11 | Figure 11 | |||
| R_{i+1} = 2 ^ 8 * t_{i} AND | R_(i + 1) = 2 ^ 8 * t_(i) AND | |||
| L_{i+1} = 2 ^ 8 * l_{i} + B_{j_{i}} AND | L_(i + 1) = 2 ^ 8 * l_(i) + B_(j_(i)) AND | |||
| j_{i+1} = j_{i} + 1 <== | j_(i + 1) = j_(i) + 1 <== | |||
| t_{i} < 2 ^ 8 | t_(i) < 2 ^ 8 | |||
| R_{i+1} = t_{i} AND | R_(i + 1) = t_(i) AND | |||
| L_{i+1} = l_{i} AND | L_(i + 1) = l_(i) AND | |||
| j_{i+1} = j_{i} <== | j_(i + 1) = j_(i) <== | |||
| t_{i} >= 2 ^ 8 | t_(i) >= 2 ^ 8 | |||
| Figure 12 | Figure 12 | |||
| R_{0} = 65280 | R_(0) = 65280 | |||
| Figure 13 | Figure 13 | |||
| L_{0} = 2 ^ 8 * B_{0} + B_{1} | L_(0) = 2 ^ 8 * B_(0) + B_(1) | |||
| Figure 14 | Figure 14 | |||
| j_{0} = 2 | j_(0) = 2 | |||
| Figure 15 | Figure 15 | |||
| 3.8.1.1.1. Termination | 3.8.1.1.1. Termination | |||
| The range coder can be used in three modes. | The range coder can be used in three modes. | |||
| * In "Open mode" when decoding, every symbol the reader attempts to | * In "Open mode" when decoding, every symbol the reader attempts to | |||
| read is available. In this mode arbitrary data can have been | read is available. In this mode arbitrary data can have been | |||
| appended without affecting the range coder output. This mode is | appended without affecting the range coder output. This mode is | |||
| skipping to change at page 19, line 8 ¶ | skipping to change at page 19, line 8 ¶ | |||
| return a; | return a; | |||
| } | } | |||
| } | } | |||
| Figure 16: A pseudo-code description of the contexts of Range Non | Figure 16: A pseudo-code description of the contexts of Range Non | |||
| Binary Values. | Binary Values. | |||
| "get_symbol" is used for the read out of "sample_difference" | "get_symbol" is used for the read out of "sample_difference" | |||
| indicated in Figure 8. | indicated in Figure 8. | |||
| "get_rac" is the process described in Section 3.8.1.1. | "get_rac" returns a boolean, computed from the bytestream as | |||
| described in Section 3.8.1.1. | ||||
| 3.8.1.3. Initial Values for the Context Model | 3.8.1.3. Initial Values for the Context Model | |||
| At keyframes all Range coder state variables are set to their initial | At keyframes all Range coder state variables are set to their initial | |||
| state. | state. | |||
| 3.8.1.4. State Transition Table | 3.8.1.4. State Transition Table | |||
| one_state_{i} = | one_state_(i) = | |||
| default_state_transition_{i} + state_transition_delta_{i} | default_state_transition_(i) + state_transition_delta_(i) | |||
| Figure 17 | Figure 17 | |||
| zero_state_{i} = 256 - one_state_{256-i} | zero_state_(i) = 256 - one_state_(256-i) | |||
| Figure 18 | Figure 18 | |||
| 3.8.1.5. default_state_transition | 3.8.1.5. default_state_transition | |||
| 0, 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, 27, | 0, 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, 27, | |||
| 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 37, 38, 39, 40, 41, 42, | 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 37, 38, 39, 40, 41, 42, | |||
| 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 56, 57, | 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 56, 57, | |||
| skipping to change at page 48, line 29 ¶ | skipping to change at page 48, line 29 ¶ | |||
| Implementations of the FFV1 codec need to take appropriate security | Implementations of the FFV1 codec need to take appropriate security | |||
| considerations into account, as outlined in [RFC4732]. It is | considerations into account, as outlined in [RFC4732]. It is | |||
| extremely important for the decoder to be robust against malicious | extremely important for the decoder to be robust against malicious | |||
| payloads. Malicious payloads must not cause the decoder to overrun | payloads. Malicious payloads must not cause the decoder to overrun | |||
| its allocated memory or to take an excessive amount of resources to | its allocated memory or to take an excessive amount of resources to | |||
| decode. The same applies to the encoder, even though problems in | decode. The same applies to the encoder, even though problems in | |||
| encoders are typically rarer. Malicious video streams must not cause | encoders are typically rarer. Malicious video streams must not cause | |||
| the encoder to misbehave because this would allow an attacker to | the encoder to misbehave because this would allow an attacker to | |||
| attack transcoding gateways. A frequent security problem in image | attack transcoding gateways. A frequent security problem in image | |||
| and video codecs is also to not check for integer overflows in | and video codecs is also to not check for integer overflows, for | |||
| "Pixel" count computations, that is to allocate width * height | example to allocate "frame_pixel_width * frame_pixel_height" in | |||
| without considering that the multiplication result may have | "Pixel" count computations without considering that the | |||
| overflowed the arithmetic types range. The range coder could, if | multiplication result may have overflowed the arithmetic types range. | |||
| implemented naively, read one byte over the end. The implementation | The range coder could, if implemented naively, read one byte over the | |||
| must ensure that no read outside allocated and initialized memory | end. The implementation must ensure that no read outside allocated | |||
| occurs. | and initialized memory occurs. | |||
| None of the content carried in FFV1 is intended to be executable. | ||||
| The reference implementation [REFIMPL] contains no known buffer | The reference implementation [REFIMPL] contains no known buffer | |||
| overflow or cases where a specially crafted packet or video segment | overflow or cases where a specially crafted packet or video segment | |||
| could cause a significant increase in CPU load. | could cause a significant increase in CPU load. | |||
| The reference implementation [REFIMPL] was validated in the following | The reference implementation [REFIMPL] was validated in the following | |||
| conditions: | conditions: | |||
| * Sending the decoder valid packets generated by the reference | * Sending the decoder valid packets generated by the reference | |||
| encoder and verifying that the decoder's output matches the | encoder and verifying that the decoder's output matches the | |||
| skipping to change at page 50, line 46 ¶ | skipping to change at page 50, line 48 ¶ | |||
| 9. Changelog | 9. Changelog | |||
| See https://github.com/FFmpeg/FFV1/commits/master | See https://github.com/FFmpeg/FFV1/commits/master | |||
| (https://github.com/FFmpeg/FFV1/commits/master) | (https://github.com/FFmpeg/FFV1/commits/master) | |||
| [RFC Editor: Please remove this Changelog section prior to | [RFC Editor: Please remove this Changelog section prior to | |||
| publication.] | publication.] | |||
| 10. Normative References | 10. Normative References | |||
| [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type | [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | |||
| Specifications and Registration Procedures", BCP 13, | Requirement Levels", BCP 14, RFC 2119, | |||
| RFC 6838, DOI 10.17487/RFC6838, January 2013, | DOI 10.17487/RFC2119, March 1997, | |||
| <https://www.rfc-editor.org/info/rfc6838>. | <https://www.rfc-editor.org/info/rfc2119>. | |||
| [ISO.9899.2018] | [ISO.9899.2018] | |||
| International Organization for Standardization, | International Organization for Standardization, | |||
| "Programming languages - C", 2018. | "Programming languages - C", ISO Standard 9899, 2018. | |||
| [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC | ||||
| 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, | ||||
| May 2017, <https://www.rfc-editor.org/info/rfc8174>. | ||||
| [RFC6716] Valin, JM., Vos, K., and T. Terriberry, "Definition of the | [RFC6716] Valin, JM., Vos, K., and T. Terriberry, "Definition of the | |||
| Opus Audio Codec", RFC 6716, DOI 10.17487/RFC6716, | Opus Audio Codec", RFC 6716, DOI 10.17487/RFC6716, | |||
| September 2012, <https://www.rfc-editor.org/info/rfc6716>. | September 2012, <https://www.rfc-editor.org/info/rfc6716>. | |||
| [ISO.9899.1990] | [RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type | |||
| International Organization for Standardization, | Specifications and Registration Procedures", BCP 13, | |||
| "Programming languages - C", 1990. | RFC 6838, DOI 10.17487/RFC6838, January 2013, | |||
| <https://www.rfc-editor.org/info/rfc6838>. | ||||
| [ISO.15444-1.2016] | [RFC4855] Casner, S., "Media Type Registration of RTP Payload | |||
| International Organization for Standardization, | Formats", RFC 4855, DOI 10.17487/RFC4855, February 2007, | |||
| "Information technology -- JPEG 2000 image coding system: | <https://www.rfc-editor.org/info/rfc4855>. | |||
| Core coding system", October 2016. | ||||
| [Matroska] IETF, "Matroska", 2019, <https://datatracker.ietf.org/doc/ | [ISO.9899.1990] | |||
| draft-ietf-cellar-matroska/>. | International Organization for Standardization, | |||
| "Programming languages - C", ISO Standard 9899, 1990. | ||||
| [RFC4732] Handley, M., Ed., Rescorla, E., Ed., and IAB, "Internet | [RFC4732] Handley, M., Ed., Rescorla, E., Ed., and IAB, "Internet | |||
| Denial-of-Service Considerations", RFC 4732, | Denial-of-Service Considerations", RFC 4732, | |||
| DOI 10.17487/RFC4732, December 2006, | DOI 10.17487/RFC4732, December 2006, | |||
| <https://www.rfc-editor.org/info/rfc4732>. | <https://www.rfc-editor.org/info/rfc4732>. | |||
| [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate | [Matroska] IETF, "Matroska", 2019, <https://datatracker.ietf.org/doc/ | |||
| Requirement Levels", BCP 14, RFC 2119, | draft-ietf-cellar-matroska/>. | |||
| DOI 10.17487/RFC2119, March 1997, | ||||
| <https://www.rfc-editor.org/info/rfc2119>. | ||||
| [RFC4855] Casner, S., "Media Type Registration of RTP Payload | ||||
| Formats", RFC 4855, DOI 10.17487/RFC4855, February 2007, | ||||
| <https://www.rfc-editor.org/info/rfc4855>. | ||||
| [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC | [ISO.15444-1.2016] | |||
| 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, | International Organization for Standardization, | |||
| May 2017, <https://www.rfc-editor.org/info/rfc8174>. | "Information technology -- JPEG 2000 image coding system: | |||
| Core coding system", October 2016. | ||||
| 11. Informative References | 11. Informative References | |||
| [FFV1_V3] Niedermayer, M., "Commit to mark FFV1 version 3 as non- | [AVI] Microsoft, "AVI RIFF File Reference", undated, | |||
| experimental", August 2013, <https://git.videolan.org/?p=f | <https://msdn.microsoft.com/en-us/library/windows/desktop/ | |||
| fmpeg.git;a=commit;h=abe76b851c05eea8743f6c899cbe5f7409b0f | dd318189%28v=vs.85%29.aspx>. | |||
| 301>. | ||||
| [ISO.14496-12.2015] | ||||
| International Organization for Standardization, | ||||
| "Information technology -- Coding of audio-visual objects | ||||
| -- Part 12: ISO base media file format", December 2015. | ||||
| [NUT] Niedermayer, M., "NUT Open Container Format", December | [NUT] Niedermayer, M., "NUT Open Container Format", December | |||
| 2013, <https://ffmpeg.org/~michael/nut.txt>. | 2013, <https://ffmpeg.org/~michael/nut.txt>. | |||
| [range-coding] | [range-coding] | |||
| Nigel, G. and N. Martin, "Range encoding: an algorithm for | Nigel, G. and N. Martin, "Range encoding: an algorithm for | |||
| removing redundancy from a digitised message.", July 1979. | removing redundancy from a digitised message.", | |||
| Proceedings of the Conference on Video and Data | ||||
| [AVI] Microsoft, "AVI RIFF File Reference", undated, | Recording. Institution of Electronic and Radio Engineers, | |||
| <https://msdn.microsoft.com/en-us/library/windows/desktop/ | Hampshire, England, July 1979. | |||
| dd318189%28v=vs.85%29.aspx>. | ||||
| [FFV1_V0] Niedermayer, M., "Commit to mark FFV1 version 0 as non- | ||||
| experimental", April 2006, <https://git.videolan.org/?p=ff | ||||
| mpeg.git;a=commit;h=b548f2b91b701e1235608ac882ea6df915167c | ||||
| 7e>. | ||||
| [YCbCr] Wikipedia, "YCbCr", undated, | ||||
| <https://en.wikipedia.org/w/index.php?title=YCbCr>. | ||||
| [HuffYUV] Rudiak-Gould, B., "HuffYUV", December 2003, | ||||
| <https://web.archive.org/web/20040402121343/ | ||||
| http://cultact-server.novi.dk/kpo/huffyuv/huffyuv.html>. | ||||
| [REFIMPL] Niedermayer, M., "The reference FFV1 implementation / the | [REFIMPL] Niedermayer, M., "The reference FFV1 implementation / the | |||
| FFV1 codec in FFmpeg", undated, <https://ffmpeg.org>. | FFV1 codec in FFmpeg", undated, <https://ffmpeg.org>. | |||
| [FFV1_V1] Niedermayer, M., "Commit to release FFV1 version 1", April | [Address-Sanitizer] | |||
| 2009, <https://git.videolan.org/?p=ffmpeg.git;a=commit;h=6 | The Clang Team, "ASAN AddressSanitizer website", undated, | |||
| 8f8d33becbd73b4d0aa277f472a6e8e72ea6849>. | <https://clang.llvm.org/docs/AddressSanitizer.html>. | |||
| [VALGRIND] Valgrind Developers, "Valgrind website", undated, | ||||
| <https://valgrind.org/>. | ||||
| [ISO.14496-10.2014] | [ISO.14496-10.2014] | |||
| International Organization for Standardization, | International Organization for Standardization, | |||
| "Information technology -- Coding of audio-visual objects | "Information technology -- Coding of audio-visual objects | |||
| -- Part 10: Advanced Video Coding", September 2014. | -- Part 10: Advanced Video Coding", September 2014. | |||
| [Address-Sanitizer] | [VALGRIND] Valgrind Developers, "Valgrind website", undated, | |||
| The Clang Team, "ASAN AddressSanitizer website", undated, | <https://valgrind.org/>. | |||
| <https://clang.llvm.org/docs/AddressSanitizer.html>. | ||||
| [FFV1_V0] Niedermayer, M., "Commit to mark FFV1 version 0 as non- | ||||
| experimental", April 2006, <https://git.videolan.org/?p=ff | ||||
| mpeg.git;a=commit;h=b548f2b91b701e1235608ac882ea6df915167c | ||||
| 7e>. | ||||
| [FFV1_V1] Niedermayer, M., "Commit to release FFV1 version 1", April | ||||
| 2009, <https://git.videolan.org/?p=ffmpeg.git;a=commit;h=6 | ||||
| 8f8d33becbd73b4d0aa277f472a6e8e72ea6849>. | ||||
| [ISO.14495-1.1999] | [ISO.14495-1.1999] | |||
| International Organization for Standardization, | International Organization for Standardization, | |||
| "Information technology -- Lossless and near-lossless | "Information technology -- Lossless and near-lossless | |||
| compression of continuous-tone still images: Baseline", | compression of continuous-tone still images: Baseline", | |||
| December 1999. | December 1999. | |||
| [HuffYUV] Rudiak-Gould, B., "HuffYUV", December 2003, | ||||
| <https://web.archive.org/web/20040402121343/ | ||||
| http://cultact-server.novi.dk/kpo/huffyuv/huffyuv.html>. | ||||
| [FFV1_V3] Niedermayer, M., "Commit to mark FFV1 version 3 as non- | ||||
| experimental", August 2013, <https://git.videolan.org/?p=f | ||||
| fmpeg.git;a=commit;h=abe76b851c05eea8743f6c899cbe5f7409b0f | ||||
| 301>. | ||||
| [YCbCr] Wikipedia, "YCbCr", undated, | ||||
| <https://en.wikipedia.org/w/index.php?title=YCbCr>. | ||||
| [ISO.14496-12.2015] | ||||
| International Organization for Standardization, | ||||
| "Information technology -- Coding of audio-visual objects | ||||
| -- Part 12: ISO base media file format", December 2015. | ||||
| Appendix A. Multi-theaded decoder implementation suggestions | Appendix A. Multi-theaded decoder implementation suggestions | |||
| This appendix is informative. | This appendix is informative. | |||
| The FFV1 bitstream is parsable in two ways: in sequential order as | The FFV1 bitstream is parsable in two ways: in sequential order as | |||
| described in this document or with the pre-analysis of the footer of | described in this document or with the pre-analysis of the footer of | |||
| each slice. Each slice footer contains a "slice_size" field so the | each slice. Each slice footer contains a "slice_size" field so the | |||
| boundary of each slice is computable without having to parse the | boundary of each slice is computable without having to parse the | |||
| slice content. That allows multi-threading as well as independence | slice content. That allows multi-threading as well as independence | |||
| of slice content (a bitstream error in a slice header or slice | of slice content (a bitstream error in a slice header or slice | |||
| skipping to change at page 54, line 4 ¶ | skipping to change at page 53, line 49 ¶ | |||
| avoiding to add 40 bits of content after "SliceContent" if "version" | avoiding to add 40 bits of content after "SliceContent" if "version" | |||
| == 0 or "version" == 1. Else a decoder conforming to the revised | == 0 or "version" == 1. Else a decoder conforming to the revised | |||
| specification could not distinguish between a revised bitstream and | specification could not distinguish between a revised bitstream and | |||
| such buggy bitstream in the wild. | such buggy bitstream in the wild. | |||
| Authors' Addresses | Authors' Addresses | |||
| Michael Niedermayer | Michael Niedermayer | |||
| Email: michael@niedermayer.cc | Email: michael@niedermayer.cc | |||
| Dave Rice | ||||
| Dave Rice | ||||
| Email: dave@dericed.com | Email: dave@dericed.com | |||
| Jerome Martinez | Jerome Martinez | |||
| Email: jerome@mediaarea.net | Email: jerome@mediaarea.net | |||
| End of changes. 41 change blocks. | ||||
| 128 lines changed or deleted | 138 lines changed or added | |||
This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ | ||||