You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some analysis of the performance of the encoder based upon a breakdown of this benchmark indicates that encoding a large jpeg takes 80% of the entire processing time.
While this is faster than naïve per-pixel floating point calculation it can be heavily optimized.
Short Term Goal
Add AVX2? acceleration directly to the converter to optimize conversion for .NET Core 3.1+. This should be a few hours work for someone with SIMD knowledge.
Long Term Goal
Establish an architecture similar to the Jpeg decoder ColorConverters allowing incremental addition accelerated converters for all platforms and color spaces.
Some analysis of the performance of the encoder based upon a breakdown of this benchmark indicates that encoding a large jpeg takes 80% of the entire processing time.
https://github.com/kleisauke/net-vips/tree/master/tests/NetVips.Benchmarks
This is due to the lack of hardware acceleration in our color conversion approach.
The current Jpeg encoder utilizes predefined tables to convert a span of
Rgb24pixels into separate Y Cb CrBlock8x8Fplanes.ImageSharp/src/ImageSharp/Formats/Jpeg/Components/Encoder/YCbCrForwardConverter{TPixel}.cs
Lines 58 to 83 in f1a0fb6
While this is faster than naïve per-pixel floating point calculation it can be heavily optimized.
Short Term Goal
Add AVX2? acceleration directly to the converter to optimize conversion for .NET Core 3.1+. This should be a few hours work for someone with SIMD knowledge.
Long Term Goal
Establish an architecture similar to the Jpeg decoder ColorConverters allowing incremental addition accelerated converters for all platforms and color spaces.