Lagarith: Difference between revisions

From MultimediaWiki
Jump to navigation Jump to search
(added description of primary features)
(enumerate data encodings)
Line 16: Line 16:
=== 64-Bit Support ===
=== 64-Bit Support ===
A beta version of the codec is available for Windows 64. All features except reduced resolution mode are supported by the 64-bit version, and the 64-bit version is significantly faster than the 32-bit version on a 64-bit AMD processor. The output data is identical for the 32- and 64-bit versions.
A beta version of the codec is available for Windows 64. All features except reduced resolution mode are supported by the 64-bit version, and the 64-bit version is significantly faster than the 32-bit version on a 64-bit AMD processor. The output data is identical for the 32- and 64-bit versions.
== Data Format ==
LAGS data is typically transported in [[AVI]] files. If the frame is 0 bytes long then the frame is a NULL frame. Presumably, the frame is unchanged from the previous frame.
The first byte of an encoded chunk indicates the type of coding used to decode the remainder of the chunk. The supported types are:
* 1: Uncompressed
* 2: Unaligned RGB24
* 3: Arithmetic coded YUY2
* 4: Arithmetic coded RGB24
* 5: Solid greyscale color frame
* 6: Solid non-greyscale color frame
* 7: RGB keyframe (deprecated; maintained for backwards compatibility)
* 8: Arithmetic coded RGBA
* 9: RGBA pixel frame
* 10: Arithmetic coded YV12
* 11: Reduced resolution frame
Further, bit 6 (byte & 0x40) in this byte indicates interlaced video when set.


[[Category:Video Codecs]]
[[Category:Video Codecs]]
[[Category:Lossless Video Codecs]]
[[Category:Lossless Video Codecs]]

Revision as of 20:26, 21 April 2006

Lagarith is a lossless video codec intended for video editing and archiving. It is also suitable for video capture on high-end systems. It is capable of handling RGB24, RGB32, RGBA, YUY2, and YV12 input video. To facilitate editing, Lagarith only supports keyframes, and optional null frames. Other features that make it suitable for video editing include a simple configuration interface, a good compression to speed ratio, full backwards compatibility with earlier versions of the codec, and a reduced resolution mode that is useful for 'bait-and-switch' editing.

Features

Compression

If the image is RGB(A), the red and blue channels are converted to their difference from the green channel (YUY2 and YV12 cannot be similarly converted). The image then has median prediction applied to it to make it more compressible (similar to Huffyuv's median prediction). Next, each channel is compressed independently. The channels will have a modified run-length coding scheme applied to runs of 0 if it reduces the length of the byte sequence. Runs may be triggered by 1, 2 or 3 sequential 0 values depending on which (if any) reduces the length the most. Run-length coding typically improves both compression and speed. If the modified run-length coding does not reduce the sequence length, the sequence is passed through unchanged. Next, the frequency for the different values in the byte sequence is tabulated and stored using Fibonacci coding. Finally, the byte sequence is compressed using a range coder and the frequency table.

Additionally, in special cases where a frame is a solid color, the frame may be stored as just one uncompressed pixel.

Multithreading

The codec allows the user to specify if multiple threads should be used; this can be used on dual-core systems to significantly improve speed. The threading takes advantage of the fact that the channels are compressed independently & uses a separate thread for each channel. The output data is the same regardless of whether or not multithreading is enabled.

64-Bit Support

A beta version of the codec is available for Windows 64. All features except reduced resolution mode are supported by the 64-bit version, and the 64-bit version is significantly faster than the 32-bit version on a 64-bit AMD processor. The output data is identical for the 32- and 64-bit versions.

Data Format

LAGS data is typically transported in AVI files. If the frame is 0 bytes long then the frame is a NULL frame. Presumably, the frame is unchanged from the previous frame.

The first byte of an encoded chunk indicates the type of coding used to decode the remainder of the chunk. The supported types are:

  • 1: Uncompressed
  • 2: Unaligned RGB24
  • 3: Arithmetic coded YUY2
  • 4: Arithmetic coded RGB24
  • 5: Solid greyscale color frame
  • 6: Solid non-greyscale color frame
  • 7: RGB keyframe (deprecated; maintained for backwards compatibility)
  • 8: Arithmetic coded RGBA
  • 9: RGBA pixel frame
  • 10: Arithmetic coded YV12
  • 11: Reduced resolution frame

Further, bit 6 (byte & 0x40) in this byte indicates interlaced video when set.