Digital Video Fundamentals - Lossy Compression

Basic Compression

Two of the most basic video comression strategies actually come from still image compression; compressed colorspaces and DCT (Discrete Cosine Transformation). They're important not only because they're used so universally, but also because they work well for video that needs to be edited later.

Colorspace Compression

By taking advantage of the human eye's limited chroma (color hue and saturation) sensitivity compared to luminosity (brightness) we can remove a great deal of chroma information and approximate it when decoding. This requires that we use a YUV colorspace of some kind and then remove U and V information for half or more of the pixels. By eliminating half the chroma this way we reduce the space required to store two pixels from 48bits to 32 bits - a savings of 1/3 - while maintaining decent quality for editing. Reducing the chroma to one pixel out of every four (like DVD and NTSC DV) you'll end up reducing video size by 50%.

YUY2 and YV12

The two most important compressed YUV colorspaces are YUY2 and YV12. YUY2 is a good editing format because it keeps half the chroma detail while greatly reducing file size. It's especially good for interlaced video because the position of chroma pixels never crosses field boundaries. YUY2 is generally preferred for distribution and playback becuase of its 50% size reduction. It's not particularly good for editing, and should generally be avoided for video that may need more than simple editing in the future.

DCT

Discrete Cosine Transform, or DCT, is a mathemetical process I don't pretend to understand, that divides images into 8x8 blocks of pixels which can be compared to each other mathematically. The resulting values are then quantized, another process that's over my head, resulting in values that are approximations of the originals, but include more identical groups of blocls now. Just like the area those pixels represent, the less precise the detail is, and the more similar the 8x8 blocks are to other blocks.

RLE

Once DCT values have been quantized to form regular patterns a final process called Run Length Encoding (RLE) can take place. This finds instances where a sequence of bits is identical, like two identical 8x8 DCT blocks, and replaces redundant data with a shorter series of bits. If the blocks weren't quantized first this wouldn't normally do much because of how much variation can occur betweem blocks.

Table of Contents

  1. Introduction
  2. General Concepts
  3. Colorspace and DCT
  4. Groups of Pictures
  5. Limitations
Advertisement - News comments available below the ad

© 2024 AfterDawn Oy

Hosted by
Powered by UpCloud