formats

Lagarith Lossless Video Codec

The Lagarith codec offers some of the best and most excellent compression, the MSU Lossless Codec and FFV1 are the only two codecs that can outperform the Lagarith in terms of its compression.

It is able to operate in several colorspaces – RGB24, RGB32, RGBA, YUY2, and YV12. No the Lagarith codec will never down-sample video, preventing inadvertent quality loss. For DVD video, the compression is typically only 10-30% better than Huffyuv. However, for high static scenes or highly compressible scenes, Lagarith significantly outperforms Huffyuv. A comparison for various types of video can be found here.

Lagarith is able to outperform Huffyuv due to the fact that it uses a much better compression method. Pixel values are first predicted using median prediction (the same method used when “Predict Median” is selected in Huffyuv). This results in a much more compressible data stream. In Huffyuv, this byte stream would then be compress using Huffman compression. In Lagarith, the byte stream may be subjected to a modified Run Length Encoding if it will result in better compression. The resulting byte stream from that is then compressed using Arithmetic compression, which, unlike Huffman compression, can use fractional bits to encode a symbol. This allows the compressed size to be very close to the entropy of the data, and is why Lagarith can compress simple frames much better than Huffyuv, and avoid expanding high static video. Additionally, Lagarith has support for null frames; if the previous frame is mathematically identical to the current, the current frame is discarded and the decoder will simply use the previous frame again.

The trade-off for this improved compression is speed. Lagarith is significantly slower than Huffyuv on typical video. On my system, Lagarith tends to encode at about half the speed Huffyuv does. Additionally, the decode speed is slower than the encode speed; this is due to the nature of Arithmetic compression and the prediction algorithm. Fortunately, for the situations where the codec offers the most advantages over Huffyuv, the speed difference between the two tends to decrease, and Lagarith can be much faster for simple video.

This codec was build using the Huffyuv source as a template, and uses some Huffyuv code, most notably the routine to upsample YUY2 video to RGB. The function for upsampling YV12 to YUY2 was taken from AviSynth.

How to install Lagarith Lossless Video Codec :

- Uncompress the files from archive, right-click on the lagarith.inf file and select Install.

- That’s all! Now check the installed codec. See Checking Installed VIDEO and AUDIO Codecs In Windows XP guide.

Changes in Lagarith Lossless Video Codec 1.3.14 :

- Fixed a bug that would corrupt video when downsampling to YUY2 and the resolution was not a multiple of 32.

- Fixed a bug that would cause crashes when downsampling to YV12.

- Restored manual installation instructions to the readme for people having problems with the install.bat file.

Normal installation:

Right-click on lagarith.inf and select install to install the codec. If you
do not see an install option, make sure you extracted the files, and are using the extracted lagarith.inf file.

Installing the 32bit version on Windows 64
Extract all the files to a folder

Open up a command prompt (start->run: cmd)
Change directories to sysWOW64 (“cd C:\windows\syswow64″)
Type the following (replace example_path with the actual path to the extracted files), then hit enter: rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 0 c:\example_path\lagarith.inf
This method can also be used for installing other 32bit codecs such as Huffyuv that install via a .inf file.

If you find any errors in my codec, please let me know, my email is brg0853@rit.edu
and AIM is “slrlagsalot”

Format constraints:

All formats require a MMX capable processor. YUY2 should have a width divisible by 8 and YV12 should be divisible by 16; other
resolutions are accepted and may or may not work (or even crash) depending on encoding and decoding formats.

YV12 requires an even height. Reduced resolution and YV12 modes cannot be used with a UYVY video source UYVY encoding is not supported for Windows 64 yet.

VN:F [1.9.17_1161]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.17_1161]
Rating: 0 (from 0 votes)

Incoming search terms: