Skip to content

Add SSE4.1 optimizations of ImagePngLoader decode line handlers - #948

Merged
ermig1979 merged 1 commit into
devfrom
cursor/sse41-png-decode-line-83e0
Sep 8, 2026
Merged

Add SSE4.1 optimizations of ImagePngLoader decode line handlers#948
ermig1979 merged 1 commit into
devfrom
cursor/sse41-png-decode-line-83e0

Conversation

@ermig1979

@ermig1979 ermig1979 commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Adds SSE4.1 implementations of PNG unfiltering handlers _decodeLine[0..6] for Sse41::ImagePngLoader, matching the base DecodeLine0DecodeLine6 functions in SimdBaseImageLoadPng.cpp.

Changes

  • Vectorize PNG filter reconstruction (None, Sub, Up, Average, Paeth, and first-row Average/Paeth) in SimdSse41ImageLoadPng.cpp.
  • Wire the new handlers from Sse41::ImagePngLoader::SetHandlers().
  • Document the improvement in release 7.2.166 (docs/2026.html).

Testing

  • Isolated decode-line comparison against the base implementations for srcN in {1,2,3,4,6,8}, equal and expand (srcN != dstN) paths, and a range of row widths: all passed.
  • ./Test -m=s -fi=ImageLoadFromMemory: ImageLoadFromMemorySpecialTest passed on the PNG test suite (Base vs SIMD).
  • ./Test -m=a -fi=ImageLoadFromMemory: ImageLoadFromMemoryAutoTest passed for Gray8/Bgr24/Bgra32/Rgb24/Rgba32 PNG (Base, SSE4.1, AVX2).
Open in Web Open in Cursor 

Vectorize PNG unfiltering (_decodeLine[0..6]) in Sse41::ImagePngLoader
and document the change in release 7.2.166.

Co-authored-by: igor.ermolaev <igor.ermolaev@altezza.org>
@ermig1979
ermig1979 marked this pull request as ready for review September 8, 2026 07:48
@ermig1979
ermig1979 merged commit f49268f into dev Sep 8, 2026
2 checks 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