-
-
Notifications
You must be signed in to change notification settings - Fork 852
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
Component shuffling for RGB(A)-like formats with SIMD Intrinsics #1354
Comments
I'm gonna have a look at this. |
Btw, the Which means that the last two steps will be done automatically, if I'm not missing anything. Can't wait to see the |
@antonfirsov need to add a specific benchmark for that but I know for certain that even my |
@antonfirsov Here you go! ToVector4_Rgb24
Master
Branch
FromVector4_Rgb24
Master
Branch
|
@antonfirsov Pushed an update that affects
|
Looks great! @JimBobSquarePants there is one other important metric we need to check to set our expectations for #1410. Can be done by defining 2 new simple benchmark classes (baseline VS SIMD with Count = 2048):
The smaller the difference the bigger the happiness. |
Couldn't we pack directly into |
We'd need to have a method that goes direct to be able to cut into that since the pipeline is What I dream of is a combination of shuffle + convert. |
That's bad news :( I don't think going
I'd rather suggest to do the following:
=> Pro: likely still very fast, much more predictible amount of work, no regressions on old platforms |
Yeah... All my shuffle code has touched conversion between pixel formats only. The What do you mean by Color converters? The jpeg ones? |
Yes I meant that.
I think I misunderstood you on this one. I thought you want Jpeg color converters to convert directly into A one-step |
Just realized this was still open. |
We need cheap bulk-conversion between the following formats:
Argb32
,Bgra32
,Rgba32
,Bgr24
,Rgb24
We are especially interested in
Rgb24, Bgr24 <=> Rgba32
. I'm having sweat dreams about a community PR dealing with this problem. Should be easy for anyone having basic knowledge ofSystem.Runtime.Intrinsics
.Implementation should be added to new span-based methods in
PixelConverter.cs
, those could be invoked than from T4 generatedPixelOperations<TPixel>
implementors like here:https://github.com/SixLabors/ImageSharp/blob/78a584e8482b052d7a9885682299e2f37518d83d/src/ImageSharp/PixelFormats/PixelImplementations/Generated/Rgb24.PixelOperations.Generated.cs
If a PR would only add the
PixelConverter
helpers + tests, I'm happy to provide guidance or even finish the code for the rest of the work.@john-h-k @Sergio0694 any chance you are interested?
Tasks:
SimdUtils
SimdUtils
SimdUtils
Rgba32
compatible pixel operations to utilize new shuffle methods.Rgb24
compatible pixel operations to utilize new shuffle methods.The text was updated successfully, but these errors were encountered: