Skip to main content

Codecs push the compression envelope

It seems as if we have just gotten used to MPEG-2 coding, and we are already facing a palette of new coding methods. Even the growing number of applications of MPEG-2 — terrestrial, cable and satellite broadcast, DVD, DV tape, and others — could not satiate the technical community's appetite for more efficient codecs. Primarily driven by the growing demands for more (and cheaper) bandwidth, this proliferation is an inevitable consequence of technological progress. This month, we'll look at the most prominent of these codecs.

MPEG-4

With the efficiency of MPEG-2 codecs reaching its asymptote, researchers look to new methods to increase compression efficiency. MPEG-4's impetus was a technique — object coding — that promised large improvements in efficiency. (An MPEG-3 codec was also under development but was abandoned when its primary focus — HDTV coding — was incorporated within MPEG-2.) Essentially, the MPEG-4 object-coding scheme works by identifying and isolating objects in the image, coding them separately and then coding instructions on how those objects translate through an image.

As with the preceding standards, MPEG-4 uses an organization of profiles and levels in order to provide varying capabilities for different applications. The desire to maximize this functionality resulted in 21 defined profiles for the standard known as MPEG-4 Part 2, MPEG-4 Visual or just MPEG-4. This complexity could be one reason for the limited deployment of MPEG-4 equipment in the professional market. However, much of MPEG-4 was developed for low-bit-rate applications; one growing market is 3G mobile-phone video.

MPEG-4/AVC/H.264

The MPEG committee, together with the ITU, proceeded to develop an essentially different codec for wider use. The resulting codec carries the dual designations MPEG-4 Part 10: Advanced Video Coding (AVC) and ITU H.264. For this reason, the codec is usually referred to as MPEG-4/H.264, MPEG-4/AVC or simply AVC. (AVC is backwards compatible with MPEG-2, so all AVC decoders can decode MPEG-2.) The AVC codec made it possible to double coding efficiency, which allows high-quality SDTV pictures to be transmitted with as little as 1Mb/s to 2Mb/s and HDTV with as little as 9Mb/s to 10Mb/s.

The AVC codec shares basic elements with MPEG-2. (See Figure 1.) In order to increase compression efficiency, AVC introduced several new elements to MPEG coding, as shown in Table 1.

For example, intra estimation is a new technique that predicts the current intra-coded block by extrapolating the neighboring pixels along a horizontal or vertical row. The difference between the predicted block and the actual block is then coded and forms a residual. (See Figure 2.)

In contrast with the 8 × 8 discrete cosine transform (DCT) used in MPEG-2, AVC uses a two-step 4 × 4 DCT-like transform to code 16 × 16 blocks. Lossless macroblock coding is an adaptive scheme that allows the encoder to bypass the intra estimation and simply transmit the spatial values (i.e., luminance and chrominance) of the pixels themselves. While this requires more bits to encode the blocks, the method results in high-quality video when the instantaneous bit rate is available. The Fidelity Range Extension (FRExt) amendment to AVC adds a toolset that supports additional color spaces, video formats and bit depths, and stereo-view video.

AVC also adds multiple-reference P- and B-frames, which allow the encoder to readily process certain scene changes, such as repetitive music video or stroboscopic changes where two scenes are rapidly alternated. A new deblocking loop filter is also available that lessens the visibility of edges of blocks. In addition, while MPEG-2 uses 8 × 8 floating-point coefficients in the DCT, AVC uses smaller blocks with integer coefficients. This reduces blocking and ringing artifacts caused by rounding errors.

VC-1

At the same time the work on AVC was proceeding, another similar codec was under development at Microsoft. First called Windows Media 9 (WM9), the codec was standardized as SMPTE 421M and is commonly known as VC-1. While an increase in compression efficiency was one motivation for developing this codec, an equally important factor was lower computational complexity. This means that software implementations of codecs (on PCs, for example) could provide high-quality compression at reasonable processor speeds.

Although generally attributed to Microsoft, the patent pool for VC-1 encompasses more than a dozen companies. The HD DVD and Blu-ray Disc specifications require support for AVC, VC-1 and MPEG-2 in all compliant decoders; however, content developers are free to encode using any of these. The primary unique features of VC-1 are listed in Table 2.

Although similar to AVC, VC-1 incorporates notable differences. VC-1 employs an adaptive block-size transform and a modified deblocking filter that can aid in compressing areas of high detail. VC-1 also has a special mode for handling interlaced video, where data from both fields is used to predict motion compensation in interpolated frames. Another unique feature of VC-1 is fading compensation, which improves compression efficiency for sequences with fades and other large-scale illumination changes.

AVC and VC-1 to displace MPEG-2?

Already, AVC is the preferred technology for ADSL-delivered IPTV. The low bandwidth requirements and server-side content provision make it well suited to the emerging business of video delivery over telco lines. Cable and satellite — entrenched with MPEG-2 technology — are slowly switching their plants to AVC. However, they have an additional burden: a vast deployment of legacy set-top boxes. Terrestrial DTV using ATSC is also firmly footed on MPEG-2 technology. At press time, however, the ATSC was considering the possibility of specifying AVC and VC-1 as amendments to the E-VSB specification of the ATSC Digital Television Standard.

The others

Other codecs that have garnered attention are DivX, RealVideo and Xvid. While all of these were developed primarily for Internet applications, one has picked up support in some DVD players. DivX (no relation to the similarly named, ill-fated pay-per-view DVD service) is a codec that has emerged as a viable technology for Internet video distribution and sharing. Based on the MPEG-4 Visual Advanced Simple Profile (ASP), the proprietary codec uses a non-standard set of profiles, with licensing managed through a certification process.

Little is known about the coding method employed in the proprietary RealVideo codec developed by RealNetworks. Perhaps this is why its application so far has been limited to Web-based video. Although company literature implies that the codec does not use block-based compression, other sources claim it does not use fractal or wavelet compression, either.

Xvid is an open-source codec that uses a specific set of MPEG-4 ASP features. It essentially competes with DivX for similar applications.

By keeping abreast of the latest developments in codec technology, we not only understand the best tools with which we can deliver content, but also we get an appreciation of what the competition is up to — and how quickly one must adapt.

Aldo Cugnini is a consultant in the digital television industry.

MPEG-4/AVC FEATURES MPEG-4 BENEFITS Intra estimation Improves I-frame compression 4 × 4 transform blocks, lossless macroblock coding, macroblock adaptive field-frame mode Greater versatility when individually coding blocks 4 × 4 motion compensation blocks Better selection of block matches Quarter-pel motion vector precision Lower residual (interframe) energy Multiple-reference P- and B-frames Ability to track rapid, repetitive scene changes Deblocking filters Reduces visibility of block-edge artifacts Various entropy coding algorithms Clever ways of reducing length of code words Fidelity Range Extension Supports more color spaces and bit depths Table 1. New MPEG-4/AVC features and benefits VC-1 FEATURES VC-1 BENEFITS Adaptive block-size transform, modified deblocking filter Improves detail Less complex VLC Speeds computation Interlaced prediction modes Aids motion vector search Fading compensation Improves scene fades Table 2. New VC-1 features and benefits

Send questions and comments to:aldo.cugnini@penton.com