What is H.264?

A New Standard for Digital Video

DivX® 7 is based on the H.264 standard, the state-of-the-art digital encoding format for high definition video. Why is H.264 so great? Well, to make a long story short, H.264 provides powerful compression technology that delivers a superior video experience at a low bit rate.

If you want to get more detailed, we should tell you that the standard’s flexible bit stream control enables H.264 to deliver high-quality video to a variety of devices ranging from low-powered cell phones to high-powered Blu-ray devices. That’s why the H.264 standard is set to supersede some of the formats that are commonplace today such as DV, the standard used by many consumer video cameras, and MPEG-2, the standard for DVD video and some types of cable TV and digital broadcast. In a nutshell, H.264 is suited to any platform — handheld to high def.

A note of caution before proceeding: If you’re only interested in a high-level overview of what H.264 is and why we think it’s so great, you have hopefully been enlightened by the above paragraphs. If, on the other hand, you’re hungering for a more technical discussion of the intricacies of video compression and the advancements that H.264 brings to the dark art of video encoding, the next 900 words or so are for you.

Digital Video Compression: The Basics

Digital video is compressed to economize on space, whether it is bandwidth or media, and a codec (compression-decompression) does the encoding and decoding. By improving the compression standards upon which the codec is based, we can transmit higher quality video using the same bandwidth as before.

The H.264 standard reduces the amount of information required to reproduce a video. Encoders process each frame, subdividing the picture into a grid of blocks and searching previous or future frames for each block for matching texture, a technique known as motion estimation. When a suitable match is found, a decoder can reproduce the texture of the block in the current frame using only a vector pointing to the matching reference texture along with some information to correct any small texture differences. Where motion estimation fails to find suitable matches, encoders use the texture of nearby blocks in the same frame to predict the block texture and store the difference between the prediction and the actual texture. This is more efficient than storing the texture directly but is more costly than motion estimation. The encoders act as “lossy” compressors; their goal is not to reproduce the original picture exactly but instead to choose the optimal means to reduce the data rate while preserving visual quality as best as possible. With suitable settings differences can be imperceivable even when compression over raw input approaches 100:1.

The H.264 standard offers substantial performance improvements over its predecessors. For example: A standard DVD can hold one two-hour movie compressed using the MPEG-2 (the popular standard for DVD movies) codec and four hours of movies using an H.264 codec. The new DivX 7 codec featuring H.264 is even far more efficient than the DivX 6 codec, which is based on the MPEG-4 ASP standard, H.264’s predecessor.

What’s New in H.264?

H.264 has a variety of new features that improve picture quality and compression over the DivX 6 (ASP) codec:

  • In-loop deblocking: Deblocking is a CPU-intensive technique that attempts to remove blocking artifacts in the decoded caused picture. The DivX ASP decoder uses deblocking as an optional post-processing technique to improve quality during playback, typically applied depending on the availability of the CPU. This allows fast computers to see the best possible picture and slower computer to dial back post-processing to achieve smoother playback.

    H.264 enforces deblocking on every frame during both encoding and decoding. The result is that encoding becomes more efficient because there is less noise present in reference pictures. However, it is not possible to turn deblocking off to improve playback performance on slower systems.
  • Quarter-pixel motion estimation: When the DivX ASP encoder searches for blocks in past and future frames it determines motion vectors down to a half-pixel precision. Half-pixel searches can be performed quickly during encoding and reconstructing the texture from motion vectors with half-pixel precision during playback is also fast.

    H.264 uses quarter-pixel precision for motion search and this leads to longer search times during encoding as well as more complex texture reconstruction during playback. Although the processing requirements are higher, more accurate prediction leads to sharper pictures and improved efficiency.
  • Smaller block sizes, improved prediction: Both ASP and H.264 use 16x16 pixel blocks as their fundamental block sizes. Under ASP blocks can be subdivided into four 8x8 partitions, but H.264 allows for block subdivisions down to 4x4 pixels. Smaller block sizes are beneficial in areas of low spatial resolution and therefore particularly useful for standard definition and mobile content. H.264 also offers much greater flexibility in intra-frame prediction so when motion estimation fails or keyframes are coded block texture can be stored with greater efficiency than the ASP standard allows.
  • More reference pictures: The ASP and H.264 standards both use motion estimation to efficiently code each frame, reconstructing new frames by moving texture from already decoded pictures around. Under the ASP standard the only inter-frame references permitted are to the next or previous frames, and frames that make both references cannot serve as references themselves. These restrictions are significant because they limit the memory required to decode any stream as well as reducing the number of reference frames an encoder might spend time on during the motion search. The H.264 standard vastly expands the system of reference pictures by allowing a single frame to reference many past and future frames and all frame types to serve as reference pictures. This creates opportunities for encoders to achieve greater efficiency by finding better matches during motion search but also increases the search time. Decoders must also provide more memory to store reference pictures. When playing video at 1080p, six times as much memory is required per reference picture than for standard definition video.
What’s Special About the DivX 7 Implementation of H.264?

It is a common misconception that H.264 is a format with only a single form. Different profiles of H.264 present different feature sets that are not strict subsets of one another. This leads to problems of interoperability. We want to unify the H.264 format into one form so that users can create and play their digital media on their video cameras, portable media players and TVs—seamlessly. The H.264 format’s powerful compression and scalability allows us to deliver on the promise of the true cinematic viewing on your computer, in the living room and on the go.

Still reading? Check out DivX Labs to keep up with the DivX community.