FFmpeg swscale Rewrite Begins Landing With 2.6x Faster Overall, As Much As 254x
FFmpeg's swscale/libswscale code is used for image scaling, colorspace conversion, and related operations. FFmpeg developer Niklas Haas has spent the past few months working on a new framework around swscale. This swscale rewrite is less dependent upon compiler auto vectorization and introduced a new x86 SIMD back-end. This new code can be a major win for performance but the rewrite is also being done to help with maintainability, extensibility, and correctness of the code.
The performance results are very exciting with on the patch series during development, Niklas Haas reported that the single-threaded code was 2.1x faster overall and as much as 40.3x faster. For the multi-threaded usage it was 2.6x faster overall and as much as 254x faster! Some big wins too in the other results he shared from his AMD Ryzen 9 9950X3D system:
👁 FFmpeg swscale rewrite benchmark results
Merged yesterday was introducing the new framework, the x86 SIMD back-end, and other commits for this libswscale rewrite.
👁 FFmpeg swscale rewrite patches merged
This code also adds a new "--enable-unstable" build-time option for including "unstable" features for FFmpeg. This is initially used for allowing the disabling of the currently-experimental swscale but could also be expanded to cover experimental codecs and other features moving forward.
