[babl] babl: add single precision cmm matrices



commit 3dc004d4042f8069baca54373da3c2cb14fd9cf3
Author: Øyvind Kolås <pippin gimp org>
Date:   Sat Aug 26 22:55:28 2017 +0200

    babl: add single precision cmm matrices

 babl/babl-space.c |    3 +++
 babl/babl-space.h |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/babl/babl-space.c b/babl/babl-space.c
index b3385b6..77d4d42 100644
--- a/babl/babl-space.c
+++ b/babl/babl-space.c
@@ -183,6 +183,9 @@ babl_space_from_rgbxyz_matrix (const char *name,
   space.RGBtoXYZ[8] = bz;
   babl_matrix_invert (space.RGBtoXYZ, space.XYZtoRGB);
 
+  babl_matrix_to_float (space.RGBtoXYZ, space.RGBtoXYZf);
+  babl_matrix_to_float (space.XYZtoRGB, space.XYZtoRGBf);
+
   space_db[i]=space;
   space_db[i].instance.name = space_db[i].name;
   if (name)
diff --git a/babl/babl-space.h b/babl/babl-space.h
index a6065dd..c256ac2 100644
--- a/babl/babl-space.h
+++ b/babl/babl-space.h
@@ -46,8 +46,11 @@ typedef struct
   const Babl      *trc[3];
   char             name[128];
   double whitepoint[3]; /* CIE XYZ whitepoint */
+
   double RGBtoXYZ[9]; /* matrices for conversions */
   double XYZtoRGB[9];
+  float  RGBtoXYZf[9]; /* matrices for conversions */
+  float  XYZtoRGBf[9];
 
   /* the space should contain matrix to/from XYZ */
   /* and before converting a span, all that needs to be


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]