FFV1, which stands for "FF video codec 1", is a lossless intra-frame video codec. It can use either variable length codingorarithmetic coding for entropy coding. The encoder and decoder are part of the free, open-source library libavcodec in the project FFmpeg since 2003[1]. FFV1 is also included in ffdshow, which makes the video codec available to any Windows application that uses system-wide codecs.
FFV1 is not strictly an intra-frame format; despite not using inter-frame prediction, it allows the context model to adapt over multiple frames. This can be useful for compression due to the very large size of the context table, but can be disabled to force the encoder to generate a strictly intra-frame bitstream. During progressive scanning of a frame, the difference between a current pixel and its predicted value, judging by neighboring pixels, is sent to the entropy-coding process. The prediction is done as follows:
The third value, "Top + Left - TopLeft", is also known as the gradient, so in simple terms the prediction is the median of the top, left, and gradient prediction methods. For improved performance and simplicity, the edges of the frame are assumed to be zero to avoid special cases. The prediction in encoding and decoding is managed using a ring buffer.
The residuals are coded using either variable-length coding or arithmetic coding. Both options use a very large context model. The "small" context model uses (11*11*11+1)/2=666 contexts based on the neighboring values of (Left-TopLeft), (TopLeft-Top), and (Top-TopRight). The "large" context model uses (11*11*5*5*5+1)/2=7563 contexts based on the same values as before, but also (TopTop - Top) and (LeftLeft-Left), where "TopTop" is the pixel two above the current one vertically, and "LeftLeft" is the pixel two to the left of the current one. In arithmetic coding, each "context" actually has 32 sub-contexts used for various portions of coding each residual, resulting in a grand total of 242,016 contexts for the "large" model.
Since March 2010, the codec is no longer marked as experimental[1]. The bitstream is fixed, but documentation remains incomplete.
Data compression software
| |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Archivers with compression (comparison) |
| ||||||||||||
Non-archiving compressors |
| ||||||||||||
Audio compression (comparison) |
| ||||||||||||
Video compression (comparison) |
| ||||||||||||
|