Keep scalar PNG Avg/Paeth unfilters for 1-byte pixels - #950
Merged
Conversation
Whole-vector Avg/Paeth is serial for n=1, so the SIMD path was slower than Base on Gray8. Leave grayscale Avg/Paeth/AvgFirst on the scalar fallback and keep vector paths for n>=2. Co-authored-by: igor.ermolaev <igor.ermolaev@altezza.org>
ermig1979
marked this pull request as ready for review
September 8, 2026 15:19
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.
Follow-up to #949.
Whole-vector Avg/Paeth unfilters are serial for
srcN == 1, so the SIMD path was slower than Base on Gray8 (~7.5 msvs~4.3 msinImageLoadFromMemoryAutoTest).This drops the
n=1Avg/Paeth/AvgFirst cases so grayscale uses the scalar fallback. Vector paths forn>=2(RGB/RGBA and 16-bit) stay as in #949.After this change, AutoTest Gray8 is
4.182 ms(Sse41) vs4.278 ms(Base). Color-format speedups from #949 are unchanged.