-
-
Notifications
You must be signed in to change notification settings - Fork 888
Add AVX version of TransformColor and TransformColorInverse #1830
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1830 +/- ##
======================================
- Coverage 87% 87% -1%
======================================
Files 937 937
Lines 48385 48420 +35
Branches 6048 6054 +6
======================================
- Hits 42285 42217 -68
- Misses 5097 5196 +99
- Partials 1003 1007 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
{ | ||
int numPixels = pixelData.Length; | ||
fixed (uint* p = pixelData) | ||
int i; |
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.
int i; | |
nint i; |
? As well on the other loop-variables to avoid the movsxd
machine-instruction.
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.
The slice down below requires an int
. Is it still worth using nint
here and cast with the slice or should i keep it rather int
then? The Slice is outside of the loop and only for the leftover.
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.
I'd cast to int
in the slice. It's actually a nop in machine code.
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.
ok will do that then, thx!
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.
@brianpopow I went ahead and did the nint
change.
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.
thanks, i was unsure in some places, if I should go for it or not.
Co-authored-by: Günther Foidl <[email protected]>
Co-authored-by: Günther Foidl <[email protected]>
Prerequisites
Description
This PR add AVX2 versions of
TransformColor
andTransformColorInverse
which are used during webp encoding and decoding.Relates to #1786
Profiling results:
master:
PR: