Add Abgr32 pixel type, extend IPixel<T>#1886
Add Abgr32 pixel type, extend IPixel<T>#1886JimBobSquarePants merged 12 commits intoSixLabors:masterfrom
Conversation
|
@antonfirsov there seem to be failing tests on macos, which may be related to #1730, could you take a look at this: Failing Tests |
| /// <summary> | ||
| /// Provides optimized overrides for bulk operations. | ||
| /// </summary> | ||
| internal partial class PixelOperations : PixelOperations<Abgr32> |
There was a problem hiding this comment.
Can this be sealed?
Sealing would open the door in the JIT to allow de-virtualization, especially with dynamic profile guided optimizaiton (D-PGO).
...elFormats/PixelImplementations/PixelOperations/Generated/Abgr32.PixelOperations.Generated.cs
Outdated
Show resolved
Hide resolved
src/ImageSharp/PixelFormats/PixelImplementations/PixelOperations/Generated/_Common.ttinclude
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #1886 +/- ##
=======================================
Coverage 87% 87%
=======================================
Files 957 960 +3
Lines 50474 50972 +498
Branches 6291 6310 +19
=======================================
+ Hits 44252 44731 +479
- Misses 5185 5202 +17
- Partials 1037 1039 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
antonfirsov
left a comment
There was a problem hiding this comment.
LGTM, thanks!
This is a breaking change due to IPixel<T> interface extension.
Prerequisites
Description
This adds the Abgr32 Pixel Format, as described in issue #1345.
For most of its implementation, I took inspiration from the Bgra32 pixel format code. It includes the SIMD conversions to other RGB based formats, so conversion performance should be pretty good.
I also fixed, what I think is a bug, in IComponentShuffle. Please check if my understanding of byte shuffling is correct.
I've not added Benchmarks, as there weren't any for Bgra32 also. I expect the performance will be similar to the other RGBA Pixel Formats. Let me know if you want me to add benchmarks.