FFV1
Encyclopedia
FFV1, which stands for "FF video codec 1", is a lossless intra-frame video codec
Video codec
A video codec is a device or software that enables video compression and/or decompression for digital video. The compression usually employs lossy data compression. Historically, video was stored as an analog signal on magnetic tape...

. It can use either variable length coding or arithmetic coding
Arithmetic coding
Arithmetic coding is a form of variable-length entropy encoding used in lossless data compression. Normally, a string of characters such as the words "hello there" is represented using a fixed number of bits per character, as in the ASCII code...

 for entropy coding. The encoder and decoder are part of the free, open-source library libavcodec in the project FFmpeg
FFmpeg
FFmpeg is a free software project that produces libraries and programs for handling multimedia data. The most notable parts of FFmpeg are libavcodec, an audio/video codec library used by several other projects, libavformat, an audio/video container mux and demux library, and the ffmpeg command line...

 since June 2003.
FFV1 is also included in ffdshow
Ffdshow
ffdshow is a media decoder and encoder mainly used for the fast and high-quality decoding of video in the MPEG-4 ASP and AVC formats, but it supports numerous other video and audio formats as well...

, which makes the video codec available to any Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 application that uses system-wide codecs.

Prediction process

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:
Prediction = Median( Top, Left, Top + Left - TopLeft )

The third value, "Top + Left - TopLeft", is also known as the gradient, so in simple terms the prediction is the median
Median
In probability theory and statistics, a median is described as the numerical value separating the higher half of a sample, a population, or a probability distribution, from the lower half. The median of a finite list of numbers can be found by arranging all the observations from lowest value to...

 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.

Entropy coding process

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. The arithmetic coder of FFV1 is very similar to (and based on) that of h.264.

Status

Since March 2010, the codec is no longer marked as experimental. The bitstream is fixed, but documentation remains incomplete.

See also

  • FFmpeg
    FFmpeg
    FFmpeg is a free software project that produces libraries and programs for handling multimedia data. The most notable parts of FFmpeg are libavcodec, an audio/video codec library used by several other projects, libavformat, an audio/video container mux and demux library, and the ffmpeg command line...

  • list of lossless codecs
  • Snow (codec)
  • NUT Container

External links


The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK