Guide to HEVC/H.265 Encoding and Playback

Guide to HEVC / H.265 Playback

image

 

For many years, H.264 has been the de-facto video compression standard for a number of reasons. It provides very good quality at relatively low bitrates, and its widespread use means it is supported by nearly every video playback device made in the past five to ten years. It is also very versatile, allowing compression to small file sizes, as well as high quality, high bitrate files that are suitable for use on Blu-ray discs.

While H.264 is a very good compression engine, there is a better standard out there that offers similar quality at even smaller file sizes. The standard is called HEVC, or High Efficiency Video Codec and it first appeared in 2013 as a true successor to H.264. For this reason, HEVC is also known as H.265, or MPEG-H Part 2.

The main advantage of HEVC over H.264 is that it offers roughly double the compression ratio for the same quality. This means that a video file encoded with HEVC can occupy half the space of its H.264 equivalent with no noticeable change in quality, or the same amount of space with improved quality.

HEVC is able to compress files to a greater extent than before by evolving upon the H.264 standard. In both of these standards, motion compensated prediction is used to find areas that are redundant within a single frame or in the frames that follow. When redundant blocks of pixels are identified, they are encoded by referencing another area in the same or following frames. In H.264, these blocks can be up to 16x16 pixels in size, but a big improvement in compression has been made by increasing this to 64x64 in HEVC.

Other improvements also help HEVC achieve greater levels of compression, including better variable-block-size segmentation, improved de-blocking and motion compensation filters, sample adaptive offset filtering, and better motion vector prediction and precision. This page here from the x265 group has a great explanation of these terms and how it can improve HEVC’s efficiency.

As HEVC is relatively new, it is not as compatible with existing playback devices as H.264. Many such devices have dedicated hardware for decoding H.264 streams, while the equivalent hardware for decoding HEVC is significantly less common. It is still possible to decode HEVC on today’s devices as software playback is still possible on a wide variety of hardware, and some hardware decoding solutions exist.

Here is a list of well-known hardware that includes dedicated HEVC decoding blocks and supports efficient HEVC playback:

  • Intel 6th-generation ‘Skylake’ Core processors or newer
  • AMD 6th-generation ‘Carizzo’ APUs or newer
  • AMD ‘Fiji’ GPUs (Radeon R9 Fury/Fury X/Nano) or newer
  • Nvidia GM206 GPUs (GeForce GTX 960/950) or newer
  • Other Nvidia GeForce GTX 900 series GPUs have partial HEVC hardware decoding support
  • Qualcomm Snapdragon 805/615/410/208 SoCs or newer. Support ranges from 720p decoding on low-end parts to 4K playback on high-end parts.
  • Nvidia Tegra X1 SoCs or newer
  • Samsung Exynos 5 Octa 5430 SoCs or newer
  • Apple A8 SoCs or newer
  • Some MediaTek SoCs from mid-2014 onwards

Most desktop hardware released in 2015 and mobile hardware from late 2014 onwards, supports dedicated HEVC playback. Hardware designers have been more focused on getting HEVC decoding blocks into mobile hardware first, as the CPUs in these products typically are not fast enough for software decoding. Support in desktop hardware has been marginally slower as most desktop-class parts are powerful enough to decode HEVC without dedicated decoding blocks.

Even some entry-level CPUs can still software decode HEVC video streams. The Intel BayTrail and Qualcomm Snapdragon 801 devices are more than capable of decoding HEVC with smooth playback in some circumstances (albeit at a high CPU utilisation rate).

Where you rarely find HEVC playback support is in one of the many dedicated media players on the market today. These products either do not support HEVC hardware decoding, have too low power SoCs to support smooth software playback, or only support a small handful of popular video formats without the ability to run wide format playback software like VLC.

Here is a list of popular media playing devices that do not support HEVC:

  • Google Chromecast (first and second generations)
  • Apple TV (although some reports suggest 1080p HEVC playback is possible by running VLC on a 4th-gen model)
  • Roku (third-gen models and earlier)
  • Amazon Fire TV (2014) and Fire TV Stick
  • Any Western Digital WD TV products
  • All PlayStation consoles
  • Xbox 360

And here are the media players that do support HEVC:

  • Roku 4
  • Amazon Fire TV (2015)
  • Xbox One

This is not an exhaustive list, but it can be seen that there is just a handful of very recent devices that support native HEVC playback. The Xbox One is the only console to support playback, although support for HEVC was added through a software update, presumably utilising software decoding.

So while the benefits of HEVC encoding are clear, playback is currently restricted to PCs, high-end smartphones and tablets and a very small range of media players and consoles. At this point in time, compatibility is a disadvantage to encoding your media library in HEVC.

There are many options for software that can playback HEVC-encoded files. On Windows 10, it is possible using the default Films & TV app or through Windows Media Player. Alternatively, it is possible to use VLC or MPC-HC for playback, which support older operating systems, or popular media centre apps like XBMC/Kodi (version 14 onwards) and Plex Media Player (not Home Theatre).

On Android devices, it is possible to play back HEVC files using MX Player through software decoding if the device is fast enough, or if it (and the version of Android) supports native HEVC playback. Note that some devices have HEVC decoding blocks in their SoCs but don’t support native playback at this time.

 

HEVC Versus H.264 Playback Performance

For devices that can decode HEVC video, performance is a concern. HEVC compresses video streams to a greater extent than H.264 and therefore requires more processing power to decompress. This is a typical trade off when it comes to compression algorithms.

The difference in hardware utilisation is particularly significant when comparing HEVC software playback to H.264 hardware-accelerated playback. This is a situation that is common to most current-generation devices, as HEVC hardware decoding is only just becoming available.

For mobile devices, the greater performance requirements of HEVC leads to a greater strain on battery life. This is a trade-off that users will have to consider when encoding or playing HEVC content. The standard may allow viewing of 4K streams while consuming less bandwidth, but there is an impact on battery life.

To see just how HEVC and H.264 differ from a performance perspective during playback, here are some benchmarks on a collection of more recent hardware.

Across the four systems, there was only a small increase in CPU utilisation when playing back the HEVC files. On an older Ivy Bridge Intel Core i5-3570 desktop, CPU utilisation roughly doubled, but still sat at under 10 percent.

The Skylake system was the only device that had support for hardware HEVC decoding. This resulted in very low CPU utilisation while decoding HEVC and even though utilisation was noticeably higher than decoding H.264, it was still low enough to not be of concern.

On a low-performance system using an Intel ‘Ivy Bridge’ Celeron G1820, decoding HEVC was not an issue either, despite CPU utilisation sitting in the 45 to 65 percent range. Even though this may sound quite high, no stuttering or decoding issues were seen.

The median clock speeds that each processor sat at while decoding both H.264 and HEVC were also recorded. In most circumstances, there was only a small rise in clock speed while decoding HEVC, which helps with power consumption. As CPU utilisation was below 100% in each case, the CPU never ran at its full clock speed while decoding these files.

Battery life tests were carried out using two smartphones that supported hardware HEVC decoding: the Snapdragon 810-powered Sony Xperia Z5, and the Exynos 7420-powered Samsung Galaxy S6. While playing back the same Game of Thrones video on both handsets, encoded in either H.264 or HEVC, there was essentially no difference in battery life.

On a Broadwell based laptop without HEVC hardware decoding, there was a reduction in battery life of four hours. This is a significant drop, and highlights the importance of having hardware decoding support in a battery powered system. As a comparison, a newer Skylake based laptop with hardware decoding showed no significant difference in battery life.