-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SIMD: Filter SSE4 & AVX2 #8301
Open
homm
wants to merge
12
commits into
python-pillow:main
Choose a base branch
from
uploadcare:simd-filter
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
SIMD: Filter SSE4 & AVX2 #8301
Conversation
This file contains 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
SIMD Filter. 5x5 implementation SIMD Filter. fast 3x3 filter SIMD Filter. a bit faster 5x5 filter SIMD Filter. improve locality in 5x5 filter SIMD Filter. rearrange 3x3 filter to match 5x5 SIMD Filter. use macros SIMD Filter. use macros in 3x3 SIMD Filter. 3x3 SSE4 singleband SIMD Filter. faster 3x3 singleband SSE4 SIMD Filter. reuse loaded values SIMD Filter. 3x3 SSE4 singleband: 2 lines SIMD Filter. First AVX try SIMD Filter. unroll AVX 2 times SIMD Filter. Macros for AVX SIMD Filter. unroll AVX (with no profit) SIMD Filter. consider last pixel in AVX SIMD Filter. 5x5 single channel SSE4 (tests failed) SIMD Filter. fix offset SIMD Filter. move ImagingFilterxxx functions to separate files SIMD Filter. 3x3i SIMD Filter. better macros SIMD Filter. better loading SIMD Filter. Rearrange instruction for speedup SIMD Filter. reduce number of registers SIMD Filter. rearrange operations SIMD Filter. avx2 version SIMD Filter. finish 3x3i_4u8 SIMD Filter. 5x5i_4u8 SSE4 SIMD Filter. advanced 5x5i_4u8 SSE4 SIMD Filter. 5x5i_4u8 AVX2 SIMD Filter. fix memory access for: 3x3f_u8 3x3i_4u8 5x5i_4u8 SIMD Filter. move files SIMD Filter. Correct offset for 3x3f_u8 # Conflicts: # src/libImaging/Filter.c
radarhere
reviewed
Oct 12, 2024
Comment on lines
+30
to
+34
/* 5 is number of bits enought to account all kernel coefficients (1<<5 > 25). | ||
8 is number of bits in result. | ||
Any coefficients delta smaller than this precision will have no effect. */ | ||
#define PRECISION_BITS (8 + 5) | ||
/* 16 is number of bis required for kernel storage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
/* 5 is number of bits enought to account all kernel coefficients (1<<5 > 25). | |
8 is number of bits in result. | |
Any coefficients delta smaller than this precision will have no effect. */ | |
#define PRECISION_BITS (8 + 5) | |
/* 16 is number of bis required for kernel storage. | |
/* 5 is enough bits to account for all kernel coefficients (1<<5 > 25). | |
8 is the number of bits in the result. | |
Any coefficients delta smaller than this precision will have no effect. */ | |
#define PRECISION_BITS (8 + 5) | |
/* 16 is the number of bits required for kernel storage. |
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.
Depends on #8209.
This is porting of Filter acceleration from Pillow-SIMD.
This PR includes required changes from #8209.