Add SVE2 optimizations of ImageBmpSaver - #911
Merged
Merged
Conversation
Wire Sve2::ImageBmpSaver into ImageSaveToMemory using SVE2 BgrToRgb and BgraToRgba converters, matching the Neon/SSE41 BMP saver pattern, and note the change in release 7.2.165. Co-authored-by: igor.ermolaev <igor.ermolaev@altezza.org>
ermig1979
marked this pull request as ready for review
August 24, 2026 15:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wire SVE2
ImageBmpSaverintoImageSaveToMemoryso BMP encoding uses SVE2 color converters on ARM/ARM64.Changes
Sve2::ImageBmpSaver(inheritsNeon::ImageBmpSaver) inSimdImageSave.h.SimdSve2ImageSave.cpp: Gray8 stays a memcpy path; Rgb24 usesSve2::BgrToRgb; Rgba32 usesSve2::BgraToRgba. This matches the Neon/SSE41/AVX2 BMP saver pattern.SimdImageFileBmpthroughSve2::ImageBmpSaverinCreateImageSaver.docs/2026.html(release 7.2.165).Test::ImageSaveToMemoryAutoTestalready comparesSimd::Sve2::ImageSaveToMemorywithSimdImageSaveToMemory.SimdSve2ImageSave.cppis already listed inprj/vs2022/Sve2.vcxprojandSve2.vcxproj.filters.Testing
Test../Test "-r=.." -fi=ImageSaveToMemory -tt=1 -ts=1— all formats including BMP finished successfully (82.1 s).SimdSve2ImageSave.cppwithaarch64-linux-gnu-g++ -march=armv9-a+sve+sve2+i8mm+bf16. The constructor storesSve2::BgrToRgb/Sve2::BgraToRgbainto_convert.