-
-
Notifications
You must be signed in to change notification settings - Fork 848
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
Much Faster sRGB Companding #1481
Conversation
@saucecontrol can we use this approach for pixel blending? Seems cheaper than #1433. |
Codecov Report
@@ Coverage Diff @@
## master #1481 +/- ##
==========================================
+ Coverage 83.48% 83.52% +0.03%
==========================================
Files 741 741
Lines 32575 32664 +89
Branches 3652 3661 +9
==========================================
+ Hits 27194 27281 +87
- Misses 4668 4669 +1
- Partials 713 714 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
Let's make the lazy code thread-safe + a major concern regarding tests.
Can't comment on the SIMD code (too much time to review properly), but I trust the test coverage as usual.
tests/ImageSharp.Tests/PixelFormats/PixelOperations/PixelOperationsTests.cs
Outdated
Show resolved
Hide resolved
Yep, I use it for all my linear pixel conversions. It also works great in combination with fixed-point math, which I still use as a fallback on non-RyuJIT netfx. In that case, you can have a 15-bit LUT with direct lookups and no interpolation. |
Much Faster sRGB Companding
Prerequisites
Description
Updates the bulk sRGB Companding method to use the similar LUT approach as MagicScaler (thanks @saucecontrol ! )
Results are awesome. Massive speedup in real world scenarios.
I noticed some oddities (I'd previously introduced) in the existing unit tests during the work which I cleaned up also.