Expand description
Color space conversion routines
This files exposes functions to convert one colorspace to another in a jpeg image
Currently supported conversions are
YCbCr
toRGB,RGBA,GRAYSCALE,RGBX
.
Hey there, if your reading this it means you probably need something, so let me help you.
There are 3 supported cpu extensions here.
- Scalar
- SSE
- AVX
There are two types of the color convert functions
- Acts on 16 pixels.
- Acts on 8 pixels.
The reason for this is because when implementing the AVX part it occurred to me that we can actually
do better and process 2 MCU’s if we change IDCT return type to be i16's
, since a lot of
CPU’s these days support AVX extensions, it becomes nice if we optimize for that path ,
therefore AVX routines can process 16 pixels directly and SSE and Scalar just compensate.
By compensating, I mean I wrote the 16 pixels version operating on the 8 pixel version twice.
Therefore if your looking to optimize some routines, probably start there.
Re-exports§
pub use scalar::ycbcr_to_grayscale;
pub use crate::color_convert::avx::ycbcr_to_rgb_avx2;
pub use crate::color_convert::avx::ycbcr_to_rgba_avx2;