Digital Video - November 2007 - (Page 46) MASTER&COMPRESSOR > CODECS COMPARED: MPEG-2, VC-1 AND AVC/H.264 o better examine the differences between the various new HD codecs, it helps to compare them with their predecessor, MPEG-2—the foundation upon which VC-1 and AVC/H.264 were built. MPEG-2 has a number of limitations which have been largely overcome by the new VC-1 and AVC (H.264) codecs. First, motion vectors are not always accurate, because they must track the movement of an entire macroblock. Many types of motion require greater precision than a group of 16x16 pixels can offer. For example, if a camera is zooming out, an object becomes progressively smaller in the frame, and cannot be described by the same macroblock from frame to frame of the zoom sequence. Other times an object in the frame overlaps part of a macroblock. In this case it would be helpful if the motion tracking scheme was not limited to a square shape, or could use smaller shapes. With fast motion over highly detailed areas (imagine a panning wide shot of people in the stands at a football game), MPEG-2 frequently produces macroblock errors, or “blocking.” These look like big pixels scattered throughout the image. The MPEG-2 compression process involves several other algorithms, one of which is entropy coding. This is often defined with an analogy to Morse code. The most common letter in English is e, which is assigned a single dot. Less common letters like q and y are assigned multiple dots and dashes (a longer symbol). Because Morse uses shorter lengths of data for common letters, and longer lengths for rarely seen letters, it is called a variable length coding system. As long as most of the code is short, a variable length system can be very efficient. In video compression, as in Morse code, common values are assigned fewer bits than uncommon values— saving space without creating artifacts. The newest codecs for HD optical discs have substantial improvements in coding efficiency over MPEG-2. They are also more adept at concealing artifacts, in particular blocking errors. Both can do multiple motion searches per macroblock (at a submacroblock level), yielding fewer motion estimation errors than MPEG-2. Capability-wise, VC-1 has more in common with AVC than with MPEG-2. VC-1 is a SMPTE standard codec pioneered by Microsoft. AVC/H.264 is approved by a number of other world standards organizations: the ISO, the International Telecommunications Union (ITU), and the Motion Picture Experts Group. VC-1 uses some less complicated algorithms than AVC, but I have not seen any conclusive head-to-head quality comparisons between the codecs. Their practical implementation can lead to different results, sometimes in favor of one codec over the other. Both of them are very young compared to MPEG-2, which is now well over 10 years old. Improvements in both are continually being implemented in the Sonic CineVision products, as well as in other systems. Here are few differences between AVC and VC-1. AVC uses two new forms of entropy coding, CAVLC and CABAC. The former is a type of variable length coding, which adapts its coding system depending upon statistical changes in the content. Imagine if Morse code had to switch between English and Polish. It could do COURTESY CLOCKDRIVE PRODUCTIONS T A section of an image with macroblock errors. This was an average 6Mb/s high-def H.264 encode, made in Episode Pro with the Deblocking filter turned off. Macroblock errors were intentionally exaggerated with a low bit rate to better illustrate this artifact. so if a new code table was introduced prior to the switch. VC-1 uses a similar form of entropy coding to CAVLC. However, AVC can also implement CABAC, or context-based adaptive binary arithmetic coding. This system is considered to be significantly more efficient than CAVLC, but it’s more computationally intensive. Then there’s quantization. The most basic form is the uniform linear scale. For example, if you were trying to quantize all numbers between 1 and 200, you might simplify things so that numbers between 1 and 50 were assigned a value of 25, all numbers from 51 to 100 were assigned to 75, numbers between 100 and 150 were assigned 125, and so on. This would be an incredibly coarse form of scaling (or “lossy compression”) where only four values are assigned to represent a range of 200 numbers. Most quantization is more detailed than this, but you get the picture. VC-1 uses something called dynamic quantization, which varies its degree of fineness depending upon the actual content in the macroblocks in each frame. AVC does this as well, but uses a logarithmic scale. Another difference between AVC and VC-1 are the B frames. Remember in MPEG-2 that B frames are constructed by referring to information found in P or I frames? This is pretty much the case in VC-1, but in AVC there are now two kinds of B frames, referred to as b (lower case) and B (upper case). They can refer to each other, and in some cases P frames can even use information from a B frame as reference. In addition, when coding P and B frames in AVC, up to four reference frames can be used. Remember blocking artifacts? Both VC-1 and AVC use a deblocking filter, which reduces blocking at medium-to-low bit rates without introducing obvious blurring. AVC’s deblocking filter is adjustable, in two different modes, whereas VC-1 only has an on-off switch. One other noteworthy distinction to AVC is a technology called Film Grain Simulation. This is a preprocessing scheme to eliminate unwanted film grain before the encode, and then to add idealized grain back in during playback. Film Grain Simulation capability has been proposed for the HD DVD format, but as of this writing has not been implemented in a player. —D.O.W. 46 dv november 2007 www.dv.com http://www.dv.com
For optimal viewing of this digital publication, please enable JavaScript and then refresh the page. If you would like to try to load the digital publication without using Flash Player detection, please click here.