AVX-512 Optimization for FFmpeg Shows Wild Improvement on AMD Ryzen (2025)

tosh1 pts0 comments

Latest AVX-512 Optimization For FFmpeg Shows Wild Improvement On AMD Ryzen - Phoronix

Articles & Reviews

News Archive

Forums

Premium Ad-Free<br>Contact

Popular Categories

Close

Articles & Reviews

News Archive

Forums

Premium

Contact

Categories

Computers Display Drivers Graphics Cards Linux Gaming Memory Motherboards Processors Software Storage Operating Systems Peripherals

Latest AVX-512 Optimization For FFmpeg Shows Wild Improvement On AMD Ryzen

Written by Michael Larabel in Multimedia on 18 February 2025 at 08:28 PM EST. 60 Comments

Merged today for the widely-used FFmpeg open-source multimedia library was yet another AVX-512 optimized code path... Compared to the pure C code, the AVX2 code path was 10.98x faster while this new AVX-512 code path clocks in at 18x the performance of the common C code.

The latest FFmpeg code seeing the AVX-512 treatment is the uyvytoyuv422 function for UYVY to YUV422 format conversion. The AVX-512 optimized code path via hand-written Assembly is a great benefit here. AVX-512 namely found with Intel Xeon processors or all AMD Ryzen and EPYC processors since Zen 4. The benchmarks posted for this patch were carried out with an AMD Ryzen 9 7950X.

The gains are very beneficial with this AVX-512 code path hitting 18.02x the performance of the common C path while the AVX2 only path goes at 10.98x.

Shreesh Adiga who authored the patch explained:<br>"The scalar loop is replaced with masked AVX512 instructions. For extracting the Y from UYVY, vperm2b is used instead of various AND and packuswb.

Instead of loading the vectors with interleaved lanes as done in AVX2 version, normal load is used. At the end of packuswb, for U and V, an extra permute operation is done to get the required layout."

A nice win for the next FFmpeg release assuming your CPU supports AVX-512. That's especially true for AMD Zen 4 and even more so with the great AVX-512 AMD Zen 5 showing across their entire CPU product stack.

60 Comments

Tweet

FFmpeg Introduces Vulkan Accelerated Decoding For APV Video<br>FFmpeg Introduces Apple ProRes RAW Vulkan-Powered Video Acceleration<br>Turtle Beach WaveFront ISA Sound Cards Seeing Suspend/Resume Support On Linux In 2026<br>VideoLAN Publishes Dav2d For Open-Source AV2 Decoder<br>Shotcut 26.4 Released With Timeline Improvements, Vulkan Accelerated Speech-To-Text<br>Libcamera 0.7.1 Released With Improved Software ISP

Michael Larabel is the principal author of Phoronix.com 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 OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

OpenZFS 2.4.2 Released With Linux 7.0 Kernel Support, Many Bug Fixes<br>Wine Wayland Driver Merges Pointer Warp Support<br>AMD & Intel Roll Out New Linux Updates For Today's Patch Tuesday<br>FreeBSD 15.2 Will Aim For The Nice KDE Desktop Installation Experience<br>DXVK-NVAPI 0.9.2 Further Improves NVIDIA Integration For Steam Play Linux Gaming<br>IBM s390 Is The Latest Architecture Seeing Rust Linux Kernel Support<br>Linux's Latest Vulnerability Allows Reading Root-Owned Files By Unprivileged Users<br>Fragnesia Made Public As Latest Linux Local Privilege Escalation Vulnerability

Ryzen AI AMDXDNA Driver Adding Expandable Heap Support With Linux 7.2

VKD3D 2.0 Released For Wine's Direct3D 12 Implementation Atop Vulkan

AlmaLinux To Unveil Media/Entertainment Linux OS Edition

More AMDGPU Driver Fixes Prepped For Linux 7.2

chipStar 1.3 Released For Running HIP/CUDA Code On SPIR-V With OpenCL

New Patches Allow The Microsoft Surface Pro 9 5G To Be More Useful Under Linux

AMDGPU HDMI 2.1 FRL To Be Initially Disabled-By-Default

The Very Exciting Cache Aware Scheduling Looks Like It Will Land For Linux 7.2

Firefox 153 Nightly Rolls Out New Settings UI

RHEL 10.2 Released With New AI Command Line Assistance

Greg KH Calls For More Rust Linux Developers

HP Now Sponsoring The Linux Vendor Firmware Service / Fwupd

FFmpeg Introduces Vulkan Accelerated Decoding For APV Video

Phoronix Premium allows ad-free access to the site, multi-page articles on a single page, and other features while supporting this site's continued operations.

Initial Benchmarks Of The SpacemiT K3 RVA23 RISC-V CPU With The K3 Pico-ITX

Linux 6.6 LTS To Linux 7.1 Bechmarks: Performance Up 13% On AMD Threadripper Over Three Years

ROCm 7.0.0 vs. ROCm 7.2.3 Performance On The AMD Radeon AI PRO R9700

GCC 16 Produces Faster Binaries Than GCC 15, Competitive Race With LLVM Clang 22

Running Four Intel Graphics Cards Under Linux On Ubuntu 26.04

The mission at Phoronix since 2004 has centered around enriching the Linux hardware experience. In addition to supporting our site through advertisements, you can help by subscribing...

linux ffmpeg code path ryzen latest

Related Articles