[babl] babl: rename new space scRGB



commit bf28b22e853894b1a468121983823a71877336a8
Author: Øyvind Kolås <pippin gimp org>
Date:   Fri Feb 1 15:25:09 2019 +0100

    babl: rename new space scRGB
    
    The newly addes space is scRGB, babl is still missing scRGB specific
    16bit storage, similar to what already exists for CIE Lab in u8.

 babl/babl-conversion.c     | 11 -----------
 babl/babl-fish-reference.c |  4 ++--
 babl/babl-icc.c            |  2 +-
 babl/babl-space.c          |  5 ++++-
 4 files changed, 7 insertions(+), 15 deletions(-)
---
diff --git a/babl/babl-conversion.c b/babl/babl-conversion.c
index b4af910..2428780 100644
--- a/babl/babl-conversion.c
+++ b/babl/babl-conversion.c
@@ -26,17 +26,6 @@
 #include "babl-db.h"
 #include "babl-ref-pixels.h"
 
-#if 0
-static int model_is_rgba (const Babl *model)
-{
-  const Babl *RGBA = babl_model_from_id (BABL_RGBA);
-  if (model == RGBA || model->model.model == RGBA)
-    return 1;
-  return 0;
-}
-#endif
-
-
 static void
 babl_conversion_plane_process (BablConversion *conversion,
                                const void     *source,
diff --git a/babl/babl-fish-reference.c b/babl/babl-fish-reference.c
index 81aa9b2..ab5b2fd 100644
--- a/babl/babl-fish-reference.c
+++ b/babl/babl-fish-reference.c
@@ -1001,14 +1001,14 @@ babl_fish_reference_process_double (const Babl *babl,
     }
 
     /* color space conversions */
-     if ((babl_space ("babl-rgb")!=
+     if ((babl_space ("scRGB")!=
         ((babl->fish.destination)->format.space)))
     {
       double matrix[9];
       double *rgba = rgba_double_buf;
       babl_matrix_mul_matrix (
         (babl->fish.destination)->format.space->space.XYZtoRGB,
-        babl_space("babl-rgb")->space.RGBtoXYZ,
+        babl_space("scRGB")->space.RGBtoXYZ,
         matrix);
 
       babl_matrix_mul_vector_buf4 (matrix, rgba, rgba, n);
diff --git a/babl/babl-icc.c b/babl/babl-icc.c
index 67c98e6..a87def5 100644
--- a/babl/babl-icc.c
+++ b/babl/babl-icc.c
@@ -767,7 +767,7 @@ babl_space_from_icc (const char   *icc_data,
 #ifdef HAVE_LCMS
        if (sRGBProfile == 0)
        {
-         const Babl *rgb = babl_space("babl-rgb"); /* should use a forced linear profile */
+         const Babl *rgb = babl_space("scRGB"); /* should use a forced linear profile */
          sRGBProfile = cmsOpenProfileFromMem(rgb->space.icc_profile, rgb->space.icc_length);
        }
 
diff --git a/babl/babl-space.c b/babl/babl-space.c
index 174afc5..e475b52 100644
--- a/babl/babl-space.c
+++ b/babl/babl-space.c
@@ -452,7 +452,10 @@ babl_space_class_init (void)
                 0);
   /* hard-coded pre-quantized values - to match exactly what is used in standards see issue #18 */
 #endif
-  babl_space_from_chromaticities ("babl-rgb",
+
+  /* sRGB with linear TRCs is scRGB.
+   */
+  babl_space_from_chromaticities ("scRGB",
                 0.3127,  0.3290, /* D65 */
                 0.639998686, 0.330010138,
                 0.300003784, 0.600003357,


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