Sunday, December 29, 2013

H.265 vs VP9

They are competing next generation video compression formats that claim to be twice as efficient as H.264, the current industry standard. They will be crucial in getting 4K ‘Ultra HD’ content to our televisions, PCs and tablets over the next few years. They also halve the file size of 720p and 1080p content making it far easier to download or stream HD video over slow connections.
Performance compression at following IEEE paper
http://iphome.hhi.de/marpe/download/Performance_HEVC_VP9_X264_PCS_2013_preprint.pdf

Some things to note from this video:
• Google is planning to introduce VP9 to WebRTC by year-end
• VP9 already accounts for 60% of all YouTube videos delivered
• 100 hours of video gets uploaded to YouTube every minute
This shows the ubiquity of VP9 in both encoding and decoding, and how this is used outside of labs and research centers in real, live production systems today.
Competition from H.265, on the other hand, is rather late to the party. The dominant MPEG camp is huddled around H.264 these days, with spotty support of H.265 here and there. The only references I could find for H.265 include a Netflix announcement of planned support of H.264 in 4K resolutions and many codec vendors coming up with H.265 support.

H.265 and VP9 support 8K content as well and with physical media on the wane, this makes them quite frankly the future of television and video, which is why they're so important.

H.265 and VP9 support 8K content as well and with physical media on the wane, this makes them quite frankly the future of television and video, which is why they're so important.
H.265 was originally developed as the ‘HEVC’ (High Efficiency Video Coding) format jointly by the Video Coding Experts Group (VCEG) and the Moving Picture Experts Group (MPEG). It was approved as the official successor to H.264 in April 2013. Like H.264, the codec must be licenced with hardware manufacturers and software developers paying a fee.

By contrast VP9 is open source and royalty free. It was developed by Google as a successor to VP8, the moderately successful alternative to H.264. During its development VP9 was dubbed ‘NGOV’ (Next Gen Open Video) and Google has already integrated support into the Chrome browser and YouTube.

How do they work?

By doing the opposite of what you might expect. While 4K video increases picture quality by making individual pixels smaller, effectively what H.265 does is make them bigger to reduce the bitrate (and therefore file size). It then performs a vast array of processing tricks on the video as it is played to get the detail back.

For context H.264 could grab a 16x16 ‘macroblock’ of pixels and perform nine ‘intra-prediction directions’ – aka educated guesses – that allowed the pixels to be rebuilt within each block. H.265 can grab 64x64 ‘superblocks’ and perform 35 infra-prediction directions to rebuild them. Like H.264, H.265 varies the size of blocks it takes. For example, it would take much smaller blocks (down to 4x4 pixels) around detailed areas like facial features and much bigger blocks of the sky or a relatively plain background. VP9 is similar on the surface. It can also take 64x64 superblocks, but unlike H.265 these don’t need to be square so it can sample 64x32 or 4x8 blocks for greater efficiency. On the flip side it only has 10 prediction modes to rebuild them. Cynics argue VP9 changes H.265 just enough for it to avoid copyright infringement.

Needless to say both standards require more computational power than H.264 and VP8 for all this rebuilding. But given the increase in computing power since those formats were launched in 2003 and 2008 respectively, this isn’t a great problem.

Which is better?

The first thing to say is we are greatly simplifying these formats, but – despite similar file sizes - initial reports suggest H.265 has higher image quality while VP9 is more reliable for streaming.

The greater prediction modes in H.265 are what give it the edge visually, while VP9 enforces stricter rules on decoding which appears to make streams more consistent and reliable. This would make sense given the focus of the standards’ respective creators, though officially both sides dispute there is any downside to their format.

Who is supporting what?

H.265 versus VP9 is a little like HDMI versus DisplayPort in that the latter’s royalty free approach should give it the edge, but the former’s ubiquitous legacy means it has widespread industry support. Previously this made H.264 an easy winner over VP8.

This time around things are closer. Google used CES 2014 to show VP9 has support from LG, Panasonic, Sony, Samsung, Toshiba, Philips, Sharp, ARM, Intel, Nvidia, Qualcomm, Realtek Semiconductor and Mozilla. As mentioned, Google has also built VP9 support into its Chrome browser and YouTube.

The flip side is all these companies have also backed H.265 and even Google will support it in Chrome and hasn’t ruled out YouTube support. In fact, this led to an amusing quote from Francisco Varela, YouTube global head of platform partnerships, that "We are not announcing that we will not support HEVC."

Consequently most companies look like they will support both formats, much like you’d be hard pressed to find an audio player that doesn’t support both MP3 and AAC.