We're hiring!
*

Video codecs: Adding AV1 stateless video decoder support to Linux

Benjamin Gaignard avatar

Benjamin Gaignard
September 07, 2023

Share this post:

Reading time:

The latest mainline Linux kernel (v6.5) includes 22 patches that enable support for the AV1 uAPI and for two stateless video decoders: one for the Rockchip RK3588 and one for MT8195, a MediaTek SoC. This is the result of several years of efforts by Collabora to bring up this new codec for stateless video decoding.

After also bringing support for VP8, H.264, VP9 and HEVC, our team is now well-versed in the requirements for adding a new video codec. As was the case for AV1, it requires a stable uAPI and at least two drivers using it on different hardware. The two drivers are needed as they help prove that the uAPI can meet the various hardware needs for hardware from different vendors. As a matter of fact, having more drivers would have been even better in terms of testing and coverage, but there are currently only two hardware IP blocks known to include a stateless AV1 decoder.

We also needed to prove that drivers can work with the new uAPI to generate valid frames. For this purpose, Daniel Almeida has upstreamed AV1 test files to Fluster (a video conformance test framework) in November 2021. He has also worked on the AV1 support in v4l2codecs, a GStreamer element that uses the V4L2 stateless decoder interface to decode video on hardware. This means that there is userspace support to drive the new pieces we have added to the kernel. GStreamer support has also been merged and will land on version 2.24, likely to be available to the general public around October 2023.

AV1 journey in numbers

The first uAPI tentatives started back in March 2021 and needed 7 versions on the mailing list before being considered as stable in June 2023. The Rockchip AV1 driver needed the addition of 8800 lines of code and took 10 versions (and 1 year of work) to be accepted. In total, 305 conformance test files have been added to Fluster to cover a maximum of AV1 features including 10-bit pixel-format support and film grain, a process in which newer codecs like AV1 remove a pattern known as "grain" from the picture, owing to its random nature and thus poor compressibility.

All in all, having AV1 support heavily benefits the open source community, as AV1 itself is an open source codec. This means that AV1 has a royalty-free licensing model that makes it suitable for adoption in various open source projects. It was also designed to solve long-standing patent litigation issues that were common in other codecs in the industry. Furthermore, V4L2 support comes at a time when AV1 hardware designs are starting to become more common in consumer devices. This means that users can better leverage the capabilities of the hardware they have paid for while using Linux.

 

Comments (0)


Add a Comment






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


 

Search the newsroom

Latest News & Events

Academically inclining at NeurIPS 2024

09/12/2024

Collabora will be at NeurIPs this week to dive into the latest academic findings in machine learning and research advancements that are…

Apertis v2024: the new Bookworm-based release for industrial embedded devices

05/12/2024

Now based on Debian Bookworm, Apertis is a collaborative OS platform that includes an operating system, but also tools and cloud services…

Initial upstream support for the Rockchip RK3576

03/12/2024

Initial support for Rockchip's RK3576, a new SoC introduced earlier this year, has landed in Linux kernel 6.12. With the main target being…

Open Since 2005 logo

Our website only uses a strictly necessary session cookie provided by our CMS system. To find out more please follow this link.

Collabora Limited © 2005-2024. All rights reserved. Privacy Notice. Sitemap.