Compression Fundamentals

Printer-friendly versionPrinter-friendly version
Author: 

Andrew Balis

Resource Type: 
Article
Discussion Topic(s) Overview: 
Company (software) and/or General Subject Area: 
General Topic(s): 

Compression Overview

Since all digital video is compressed in one way or another, and different compression techniques result in different levels of actual or perceived quality, let's take a look at the basics of compression and types of compression that are used.

The Short Answer

Compression reduces the amount of digital data used to describe a video or graphic image. Compressed video requires lower bandwidth than uncompressed video. In other words, the compressed video requires lower data rates (bit rates) for transmission, and takes up less storage space. The overall goal in compression is to reduce the amount of data with as little compromise to image quality as possible for the given application. An image is compressed for recording/storage, and decompressed for display. This process is also referred to as encoding and decoding.

More Info

Some compression formats discard information but still produce visually lossless results upon display, in other words, on decompression the video looks as good as it did before compression. Other compression schemes discard enough information that the results show noticeable artifacts to one degree or another- these compression formats are usually designed for delivery purposes like the internet, digital cable and DVD. Although there are some acquisition formats like HDV video that discard a lot of information upon initial recording to create video that will "fit" on MiniDV tapes and will create small digital files once captured into an editing system. Some highly compressed formats are used for video editing purposes as a way to store as much video as possible for an editing system. The final edit (the "master") will be reconstructed from the original video sources with less compression (or uncompressed) for final mastering (referred to as online editing).

Common methods used for compressing video images:

  • Chroma sub-sampling is used to reduce the amount of color data describing each frame. (See Color Spaces for more information).

  • Spatial compression is used to reduce the amount of data describing each frame.

  • Temporal compression is time-based compression to reduce redundant information from multiple video frames.

  • Anamorphic recording is a method of compression where the frame size is reduced (in the horizontal direction) for recording. This also lowers the bandwidth of the video. (See Aspect Ratio for more information).

A few terms of importance:

Bandwidth: The term has different connotations when working with analog and digital video, but the overall concept is the same. It’s the available pipeline for a video signal. With analog video, it describes the range of frequencies used for a video signal and is measured in Hertz. For example, NTSC transmitted video has a total bandwidth of 6 MHz (megahertz). In digital video, the term relates more to the rate at which bits of data can be transferred or processed. It is used to describe the bit rate (described below) of a video signal or the storage medium used to store and transmit the video- the higher the bandwidth of the video, the more hard drive storage space is required. As the bandwidth needs increase, the hard drives also need to be faster to accommodate all that data.

Codec
: Stands for compress/decompress, or encode/decode. Also called compressor. The specific mathematical algorithm for a given format used to compress and decompress video for storage, display, transmission, editing, manipulation, etc. Can be hardware or software based. When working with uncompressed video, the term codec may still be used: in that case it stands for code/decode or encoder/decoder. In later sections on specific video formats, the term codec will be used interchangeably when describing a particular format. Although we often think of a codec as a computer version of a particular format, when video is recorded to a tape deck, there is a hardware codec used to compress the video for that device.

Compression Ratio: The ratio of the amount of data in the original image compared to the amount of data after compression. The higher the ratio the greater the compression and less detail to describe the image. For example: DV video has a compression ratio of 5:1. Digital BETACAM has a compression ratio of 2:1. In other words, the DV video is more compressed than Digital BETACAM.

Lossless Compression
: A method of compression where the original data can be decoded/decompressed exactly as it was before compression or creates looks that are lossless to the human eye. There are several codecs that claim to be visually lossless, but mathematically they are less than lossless. Standard definition D5 videotape decks record uncompressed, in other words, lossless. Digital BETACAM is a format that records 2:1 compression, yet produces visually lossless results.

Lossy Compression: A method of compression where the end result can't be decoded/decompressed as accurately, resulting in a lack of fidelity in the image. Most videotape formats (and computer data formats) incorporate some type of lossy compression. DV videotape is a format that uses lossy compression.

Spatial and Temporal Compression

Video data is compressed by one or both of these two methods. In summary, spatial compression reduces the data of individual frames to lower the bandwidth of the image. Each frame is compressed individually and doesn't rely on other video frames. This type of video, referred to as I-frame video, is relatively easy for computer non-linear editing systems as each frame can be accessed without relying on information from any other frame.

Temporal compression on the other hand is time based compression, compressing, or eliminating redundant information from nearby frames to lower overall bandwidth needs.  This type of video is generally more complex with a non-linear video editing system as each frame can not be decoded on its own, and instead multiple frames need to be accessed to interpret any given frame.

Spatial Compression (Intraframe)

Spatial Compression is also referred to as Intraframe compression. The data from a single frame is reduced by a sophisticated mathematical technique, called an algorithm. DCT compression is a type of intraframe compression used in formats like DV and DVCPRO HD where spatial detail is transformed into 8x8 blocks of pixels known as macroblocks (other types of macroblocks are also used in various formats- 8x8 pixel macroblocks is just one type). More information on DCT compression is in the section Compression Formats.

Common video formats that use spatial compression:

  • DV
  • Digital BETACAM
  • DVCPRO HD
  • HDCAM
  • HD D5

Another variation of spatial compression is intrafield compression, which is helpful when compressing interlaced images.

Temporal Compression (Interframe)

Temporal Compression is also referred to as Interframe compression (not to be confused with Intraframe, which is spatial compression). These compression techniques use data of multiple frames from before and after the current frame to "represent" the current frame. It works partially on the principle that certain information in different nearby frames would be the same. These compression schemes work on identifying and storing those differences between the different frames, lowering the overall bandwidth.

Common uses of interframe (temporal) compression. Most of the following examples use the MPEG-2 compression format:

  • Used in standard definition DVD's
  • Digital cable transmission
  • HDV video recording
  • AVCHD consumer HD camcorders (uses MPEG-4 compression)
  • Consumer DVR's

Constant And Variable Bit Rate Compression

Constant Bit Rate
: (CBR) Used to describe an encoding method where the bit rate remains constant. The quality level will vary based on the complexity of the image, leading to lower quality with images with more detail and movement.

Variable Bit Rate: (VBR) Encoding method where the bit rates varies based on the complexity of the material. Simple images use lower bit rates where more complex images use higher bit rates, allowing for the possibility of better quality in these segments.

An example of CBR and VBR encoding involves the creation of standard definition DVD's, which use MPEG-2 compression. Generally, VBR encoding will be more efficient and create better overall results than CBR because of its flexibility to adapt the bit rate to more complex scenes. Sony's XDCAM HD is another VBR format, and because of that flexibility, it is arguably going to create better results in some cases than HDV video which uses CBR compression, because the XDCAM is more flexible to adapt to the subject matter.

Next: Bit Rates

site hit counter

©1995–2010 Moviola Digital
All logos and trademarks on this site are property of their respective owners.