We're hiring!
*

Adding HEVC/H.265 support for NXP's i.MX 8M

Benjamin Gaignard avatar

Benjamin Gaignard
February 17, 2021

Share this post:

One of the platforms we have been working on at Collabora is VeriSilicon's Hantro Codec. This video IP is present on a number of popular SoCs (Rockchip, i.MX8, Microchip) and is marketed as a small and power efficient device, but it also has a feature that makes it specially attractive for open source developers: it is a stateless accelerator.

Stateless devices do not need firmware to operate, making them more robust and better suited for open source platforms, where having full control over the system is desirable. In this case, the support is split in two: a kernel driver (which is provided by a Video4Linux2 Hantro driver), and a userspace component (which can be provided by frameworks such as GStreamer and FFMPEG).

Our recent efforts on the Hantro kernel driver have resulted in the addition of H.264 decoding support and multiple performance improvements. Continuing this work, we are now introducing High Efficiency Video Coding (HEVC), also known as H.265, decoding support on NXP's i.MX8 M chipset.

Unlike the currently supported codecs (JPEG, MPEG-2, VP8 and H.264), HEVC doesn't rely on the G1 hardware block but on the second video processor unit: the G2.

For this first step, the driver supports the basic HEVC features up to level 5.1. Enhance features like 10-bits depth per sample with 4:2:0 chroma sampling, scaling or tile decoding could be added later. Another possible evolution is to take benefit of the hardware capability to use compressed buffers to limit the memory bandwidth consumption.

Supporting HEVC on the Hantro driver will help mature the HEVC V4L2 stateless API enough to be able to remove it from the staging directory. Getting HEVC as a stable API is an important requirement for the userland stacks that are relying on it.

More work is in the pipeline in the kernel side and in GStreamer, to improve CODEC support. For instance, we are working on VP9 decoding and V4L2 hardware accelerated encoding. Want to know more? Get in touch!

Comments (1)

  1. Amos Batto:
    Feb 19, 2021 at 01:50 AM

    I'm really excited that we will have working H.265 and VP9 on the Librem 5 smartphone, that uses the i.MX 8M Quad processor. As someone who preordered the Librem 5, I'm overjoyed that weI will have decent video on the device.

    How much support did you get from VeriSilicon (or NXP/Rockchip/Microchip) to make this possible? Did you have any help from chipmakers figuring out how the Hantro G2 decoder works?

    Reply to this comment

    Reply to this comment


Add a Comment






Allowed tags: <b><i><br>Add a new comment:


Search the newsroom

Latest Blog Posts

Mainline Linux gains accelerated video decoding for Microchip's SAMA5D4

11/05/2021

The Hantro Video4Linux2 (V4L2) kernel module has gained support for another SoC! The Microchip SAMA5D4 features a single decode unit supporting…

Quick hack: Patching kernel modules using DKMS

05/05/2021

DKMS is a framework that is mostly used to build and install external kernel modules. It can also be used to install a specific patch to…

Build your own application with GTK 4 as a Meson subproject!

29/04/2021

Building GTK 4 as a Meson subproject for your own application is not only useful for Windows builds, but also for many Linux distributions…

Profiling virtualized GPU acceleration with Perfetto

22/04/2021

Recently, we have been using Perfetto to successfully profile Apitrace traces in crosvm through VirGL renderer. We have now added perfetto…

Continuous 3D Hand Pose Tracking using Machine Learning & Monado OpenXR

20/04/2021

As part of a project backed by INVEST-AI, a program managed by IVADO Labs, we have developed a multi-stage neural network-based solution…

An easy to use MTP implementation for your next embedded Linux project

13/04/2021

Did you know you could run a permissively-licensed MTP implementation with minimal dependencies on an embedded device? Here's a step-by-step…

Open Since 2005 logo

We use cookies on this website to ensure that you get the best experience. By continuing to use this website you are consenting to the use of these cookies. To find out more please follow this link.

Collabora Ltd © 2005-2021. All rights reserved. Privacy Notice. Sitemap.

Collabora Limited is registered in England and Wales. Company Registration number: 5513718. Registered office: The Platinum Building, St John's Innovation Park, Cambridge, CB4 0DS, United Kingdom. VAT number: 874 1630 19.