Eric Smith
August 13, 2025
Reading time:
The recent Mesa 25.2 release has many interesting new features. One notable feature added to the Panfrost driver for ARM Mali GPUs is support for AFBC compressed YUV textures.
What does this mean? AFBC stands for "Arm Frame Buffer Compression", a lossless image compression scheme invented by Arm to reduce memory bandwidth and power consumption on embedded systems. Reducing bandwidth and power consumption is particularly important in scenarios like video playback, where huge amounts of data must be transferred between memory and the CPU, GPU, and video decoder.
YUV is the color space typically used for video content. It encodes color data in terms of luminance (which the eye is particularly sensitive to) and chroma. By storing fewer bits for chroma video encoders can save space without sacrificing much quality.
The combination of AFBC and YUV potentially opens large savings in the amount of data the chip processes when decoding a video and using the resulting image as a 3D texture. But until recently the Mesa 3D graphics drivers did not support using them together, or allowed it only for restricted combinations. This meant that in order to use decoded video as a texture, applications would either have to convert the images from YUV to RGB (which takes time and memory bandwidth) or leave the images in linear form (thereby greatly reducing the memory efficiency of the texture accesses).
All of this changes in the Panfrost Mesa driver in 25.2.0. Now OpenGL applications may use various YUV formats together with AFBC. In particular, the very useful YU08 fourcc format, which requires AFBC and is generated by Rockchip video decoders, is now supported. This will allow applications such as video compositors or movie players to take full advantage of GPU acceleration. In the past to do efficient hardware decoding, they were limited to displaying the video directly in full-screen. Now they can use the video as a texture and scale, rotate, and apply other effects in real time without using too much memory bandwidth.
This change has actually been in the works for a long time. The first merge request for it was created in December of 2024. The initial impressions were positive, and we got some useful feedback from early adopters using Kodi and FFmpeg on Rockchip hardware. Unfortunately, this early code was quite ugly and required a lot of special cases which reviewers (rightly) objected to. Collabora's own Boris Brezillon undertook the tedious but necessary job of refactoring and rewriting the Panfrost image layout code to make it easier to integrate the "oddball" formats like YU08. The result is much cleaner code in general and a better base for future developments. The initial version of the code is for OpenGL, but the refactor will help us to bring AFBC support to Vulkan as well in the future.
This Mesa release provides support AFBC for both 8 and 10-bit YUV images subsampled at 4:2:0 (with chroma at 1/4 the resolution of the luma). We are continuing to work in this area, and in upcoming releases will support AFBC for YUV 4:2:2 images (chroma at half the resolution of luma), which is not as common as 4:2:0 but has applications in higher quality video output. We're also looking into supporting additional YUV formats, of which there are many.
13/08/2025
The Mesa 25.2 release introduces support for AFBC compressed YUV textures in the Panfrost driver for ARM Mali GPUs, enabling more efficient…
04/08/2025
Starting with Mesa 25.2, NVK will now advertise support for Blackwell (RTX 50xx series) and Kepler (most GT and GTX 600 series, most GTX…
31/07/2025
The latest Linux kernel brings enhanced MediaTek Platform enablement, Rockchip performance, and more. Collabora contributed to this release…
Comments (0)
Add a Comment