Vectorize color space conversion for HaldCLUT

Vectorize color space conversion for HaldCLUT depending on the
definition of `VECTLENSP`. It's not fully AVX compatible because `F2V`,
`LVF`, and `STVF` are SSE only.
This commit is contained in:
Flössie
2016-04-29 20:35:37 +02:00
parent 29fe23e517
commit beaea22779
3 changed files with 98 additions and 14 deletions

View File

@@ -819,6 +819,15 @@ void Color::rgbxyz (float r, float g, float b, float &x, float &y, float &z, con
z = ((xyz_rgb[2][0] * r + xyz_rgb[2][1] * g + xyz_rgb[2][2] * b)) ;
}
#ifdef __SSE2__
void Color::rgbxyz (vfloat r, vfloat g, vfloat b, vfloat &x, vfloat &y, vfloat &z, const vfloat xyz_rgb[3][3])
{
x = ((xyz_rgb[0][0] * r + xyz_rgb[0][1] * g + xyz_rgb[0][2] * b)) ;
y = ((xyz_rgb[1][0] * r + xyz_rgb[1][1] * g + xyz_rgb[1][2] * b)) ;
z = ((xyz_rgb[2][0] * r + xyz_rgb[2][1] * g + xyz_rgb[2][2] * b)) ;
}
#endif
void Color::xyz2rgb (float x, float y, float z, float &r, float &g, float &b, const double rgb_xyz[3][3])
{
//Transform to output color. Standard sRGB is D65, but internal representation is D50