FFmpeg is known for carrying a lot of hand-optimized Assembly code for speeding up this widely-used multimedia library and taking advantage of AVX-512 and other modern CPU ISA capabilities. Merged yesterday was support for making use of AES-NI for those relying on Advanced Encryption Standard (AES) within FFmpeg for encrypted video streams.
AES-NI has been found on Intel and AMD processors for well more than a decade now… In fact, the better part of two decades. Surprisingly it’s taken until 2025 for FFmpeg’s libavutil code to add an AES-NI optimized code path within its AES routines.
In any event the performance results from this AES-NI optimized code are quite exciting for AMD/Intel systems if you are dealing with encrypted AES video buffers within FFmpeg. The commit landing the AES-NI optimized code cites a huge speed-up:
With this now-merged code, dropping from 17 seconds with the pure C version down to 0.59 seconds with the new AES-NI path within libavutil. This AES-NI libavutil path is also comparable to gcrypt and other AES crypto implementations too.