H.264 vs H.265 - What's the difference?

H.264 vs H.265 - What's the difference?



Also known as High Efficiency Video Coding (HVEC) and MPEG-H Part 2,  H.265  is a video compression standard designed for the newest generations of high-resolution video. It’s a successor to the widely-used H.264 codec (also called AVC or MPEG-4 Part 10) and offers some major improvements over that now-aging compression scheme. H.265 was developed by the Joint Collaborative Team on Video Coding (JCT-VC), a group of video coding experts that started working on the compression standard back in 2010.

The H.265 codec offers some major improvements over the H.264 codec, which was first developed in the hazy days of 2003. There are far more improvements that we can cover here, but these are the highlights for consumers.

Better compression

H.265 offers massively improved compression over H.264. The newer codec can achieve nearly double the compression of its predecessor. With H.265, a video of the same apparent visual quality would take up only half as much space. Alternatively, a video of the same file size and bit rate could be significantly better looking. Part of this improvement comes from an increased macroblock size. H.264 allows for only 16 x 16 pixel macroblocks which are too small to be truly efficient in higher-resolution video. H.265 provides for 64 x 64 pixel macroblocks (now called coding tree units or CTUs), allowing for greater encoding efficiency at all resolutions.


Improved intraframe motion prediction

Video compression relies on predicting motion between frames. When there’s no change in a pixel, a video codec can save space by referencing it, rather than reproducing it. So improved motion prediction means improved file size and compression quality. Alongside the improved compression standards in H.265, we also find major improvements in motion prediction and compensation.

Improved intraframe prediction

Video compression also benefits from analyzing “movement” within individual frames, allowing single frames of video to be compressed more efficiently. This can be achieved by essentially describing pixels with a mathematical function rather than actual pixel values. The function takes up less space than pixel data, shrinking file size. However, the codec must support a sufficiently advanced mathematical function for this technique to be truly useful. H.265’s intraframe prediction function is far more detailed than H.264’s, allowing for 33 directions of motion over H.264’s nine directions.

Parallel processing

H.265 uses tiles and slices which can be decoded independently from the rest of a frame. This means that the decoding process can be split up across multiple parallel process threads, taking advantage of more efficient decoding opportunities on now-standard multi-core processors. With video resolutions getting higher, this kind of improved efficiency is required to decode video at a watchable pace on lower-end hardware.

Higher maximum frame size

The world is getting higher-res, and H.265 supports that. With H.265, video can be encoded at up to 8K UHD or 8192 pixels × 4320 pixels. Currently, only a handful of cameras can even produce 8K video, and very few monitors can display that kind of resolution. But just as HD is today’s standard, we can expect 4K and eventually 8K to rise to similar prominence eventually.


Conclusion: Where Is H.265 Found?

H.265 is still less common than H.264, but it’s rapidly gaining market share.  In Surveillance, the amount of data generated depends on several factors.  However, in most critical environments higher resolution is required at full frame rate, which adds the need for much more space than typical applications.  Where a typical 2 Megapixel camera recording at full frame rate in H.264 format would require 4mbps, H.265 can cut that in less than half at 1.5mbps without sacrificing quality.  This is huge when you talk about requiring 14-30 days worth of recorded video on up to 1,000 video channels.

With H.265’s greater efficiency, we’re likely to see that codec dominate the marketplace in the years to come.