Microsoft Speeds Up Mesa VA-API Video Acceleration For FFmpeg

Written by Michael Larabel in Mesa on 22 September 2022 at 06:00 AM EDT. 32 Comments
A Microsoft engineer has landed an improvement to the Mesa Gallium3D Video Acceleration "VA" state tracker that can allow for faster video processing times and greater GPU utilization.

FFmpeg supports an "async_depth" option with the VA-API encoder to increase the maximum processing parallelism but depends upon the VA-API driver supporting the vaSyncBuffer function. Sil Vilerino of Microsoft has wired up the vaSyncBuffer support to Gallium3D's VA front-end. In turn supporting this vaSyncBuffer functionality can mean a nice speed-up for performance and better GPU utilization due to the increased parallelism.

While this merge request adds the support to Gallium3D VA, it also requires the individual drivers supporting the new capability (PIPE_VIDEO_CAP_ENC_SUPPORTS_ASYNC_OPERATION). With the Microsoft merge request, only their Direct3D 12 Mesa driver is supporting this cap. So no other drivers will benefit now until being updated to expose the support too. But when wired up, the results are looking good with this change:
Quick testing on a couple video clips with the d3d12 driver show 66% more relative GPU utilization and 30% to 50% faster times when FFmpeg detects async support.

It was just last week as well that Microsoft added HEVC encode/decode to their Mesa driver for use with VA-API. These latest Microsoft-led changes will be part of the Q4 release, Mesa 22.3.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week