The Lagarith Lossless Video
Lagarith is able to work in multiple color spaces - RGB24, RGB32, RGBA, YUY2 and YV12. For DVD video compression usually only 10-30% better than Huffyuv. But clearly for high static scenes or highly compressible scenes, Lagarith exceeds Huffyuv.
A comparison for various types of video available here. Lagarith is able to surpass Huffyuv due to the fact that they have a much better compression. Pixel values are first predicted using median prediction (using the same method, "Betting Median" is selected in Huffyuv).
This results in a much more compressible data stream. In Huffyuv, this byte stream would then compressed with Huffman compression. In Lagarith, the data stream can be subjected to a modified Run Length Encoding if it results in better compression.
The resulting byte stream from which is then compressed using Arithmetic compression can, in contrast, fractional Huffman compression, use bits per symbol. This allows the compressed size is very close to the entropy of the data and why Lagarith, simple images compress much better than Huffyuv, and prevent the development of high static video.
In addition, Lagarith support for null frames if the previous frame is mathematically identical to the current, the current frame is discarded and the decoder simply use the previous frame again.
The trade-off for this improved compression is speed. On a single processor system Lagarith can significantly slower than on typical Huffyuv video. Also tends to decode encryption speed to be slower than the speed, this is due to the nature of Arithmetic compression and the prediction algorithm.
Fortunately for the situations where the codec, the advantages over Huffyuv, tends to reduce speed difference between the two, and Lagarith is much faster for simple video. For multiple processor systems can take advantage Lagarith 1.3.0 of the additional processors, not during Huffyuv can. On such systems can be faster than Lagarith Huffyuv.
This codec was construction Huffyuv source as a template, and uses some Huffyuv code to carry out above all the routine to upsample YUY2 video to RGB and pixel prediction on YUY2 video. Other colorspace conversion routines were taken from AviSynth.
What's new in