freePCtech (click here to return to the first page) Search the
    siteHelp on using this siteHome

    Articles / Reviews

What does a Video Codec do?

by Mystic Overclocker

Anybody who has played-back a movie on their computer knows that the video is choppy and low resolution. The reason is that current PC technology simply can't handle the amount of data required to display uncompressed full-screen video. To understand why, we just have to look at the amount of data contained in a video clip. If we want to record a standard video signal for digital playback, we have to digitize it at about 640x480 pixels/frame. At a refresh rate of 30 fps (frames per second), and true color (16.7 million) we would be pumping 640x480x30x3 = 28 Mbytes/s through our computer. At that data rate, a 650 Mbyte CD-ROM would hold only 23 seconds of video! CD-ROM reader and hard drive technologies don't allow us to transfer data at such high rates, so in order to display digital video it is compressed for storage.

Compressed video streams are read from a hard drive or CD-ROM, then are decompressed before being displayed. This decompression is very CPU intensive, and displaying the resulting video pushes the limits of the peripheral bus (usually ISA, VLB or PCI) and video cards. If any of the hard drive/CD-ROM reader, CPU, bus or video card can't keep up with the high amount of data, the video clip appears choppy, or is displayed very small.

The software or hardware that performs the decompression (or compression when recording video) is called a codec (coder- decoder). Dedicated hardware codecs are available either as add-in cards or are integrated into video cards. The advantage of such hardware is that it is optimized specifically for the quick decompression and display of video data, so can provide higher frame rates and larger images than a computer using a purely software-based codec routine. Hardware codecs also reduce the computing load on the system CPU, allowing it to perform other tasks.

Several types of compressed video formats exist, including MPEG (Motion Pictures Experts Group), AVI, MOV, Indeo, MS-Video, Cinepak and Quicktime. In addition, different versions of these formats exist, some incorporating sound. Under optimal conditions, some of these formats can provide compression ratios of up to 100:1 while still providing good quality video.

Some hardware codecs are optimized to work best with a particular video format, but most support the basic operations required to display compressed digital video streams.

Any given digital video accelerator may support some or all of the following operations:

Codec - Decompression of compressed video from various formats.

Color space conversion - Conversion of the video signal from YUV color space to computer-display-compatible RGB. The YUV color space is derived from the composite video signal that is the source of most video clips.

Image clipping, filtering and scaling - Filtering reduces the amount of graininess in the image. Scaling can be of different types:

Pixel replication - This simply means that pixels are doubled in both the x and y directions - a 320x240 image is displayed as a 640x480 image with larger pixels. This results in poor quality video.

Pixel interpolation - Uses an image processing filter (usually an averaging algorithm) to interpolate pixel values. This provides a smoother image than direct pixel replication.


Articles / Reviews



Free PC Tech

Copyright The NOSPIN Group, Inc. 1991-2006.  All rights reserved.