Skip to content

Add SVE2 optimizations of ImagePngSaver - #912

Merged
ermig1979 merged 2 commits into
devfrom
cursor/sve2-image-save-png-fe60
Aug 24, 2026
Merged

Add SVE2 optimizations of ImagePngSaver#912
ermig1979 merged 2 commits into
devfrom
cursor/sve2-image-save-png-fe60

Conversation

@ermig1979

@ermig1979 ermig1979 commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Add SVE2 optimizations of ImagePngSaver for ARM/ARM64, used by ImageSaveToMemory and checked by Test::ImageSaveToMemoryAutoTest.

Changes

  • New src/Simd/SimdSve2ImageSavePng.cpp with SVE2 PNG filter encoding (EncodeLine0EncodeLine6), vectorized Adler-32, zlib match counting, and zlib compression.
  • Sve2::ImagePngSaver inherits from Neon::ImagePngSaver and uses SVE2 BgrToRgb / BgraToRgba converters.
  • Wire Sve2::ImagePngSaver into Sve2::ImageSaveToMemory.
  • Test::ImageSaveToMemoryAutoTest already compares Sve2::ImageSaveToMemory with the public API, including PNG.
  • Add SimdSve2ImageSavePng.cpp (and related headers) to prj/vs2022/Sve2.vcxproj and Sve2.vcxproj.filters.
  • Document the change in docs/2026.html for release 7.2.165.

Test plan

  • Native x86 Release build and ./Test "-r=.." -fi=ImageSaveToMemory -tt=1 -ts=1.
  • aarch64 cross-compile of SimdSve2ImageSavePng.cpp with -march=armv9-a+sve+sve2+i8mm+bf16.
  • GitHub Test workflow on ubuntu-24.04-arm with SVE2 (build_and_test_arm64).
Open in Web Open in Cursor 

cursoragent and others added 2 commits August 24, 2026 15:31
Implement SVE2 PNG filter encoding, Adler-32, and zlib match counting
for ImagePngSaver, wire it into ImageSaveToMemory, extend save tests
for unaligned PNG sizes, and note the change in release 7.2.165.

Co-authored-by: igor.ermolaev <igor.ermolaev@altezza.org>
Remove extra tiny PNG cases so Base/SVE2 performance rows are not
mixed with 3x4 and other unaligned micro-benchmarks.

Co-authored-by: igor.ermolaev <igor.ermolaev@altezza.org>
@ermig1979
ermig1979 marked this pull request as ready for review August 24, 2026 15:42
@ermig1979
ermig1979 merged commit 442709c into dev Aug 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants