babl: rename new space scRGB
authorØyvind Kolås <pippin@gimp.org>
Fri, 1 Feb 2019 14:25:09 +0000 (15:25 +0100)
committerØyvind Kolås <pippin@gimp.org>
Fri, 1 Feb 2019 14:27:28 +0000 (15:27 +0100)
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
babl/babl-fish-reference.c
babl/babl-icc.c
babl/babl-space.c

index b4af91034ed567aa6a6c0e0043dbfe23010861f0..2428780e8777eff9de8b73aaf80f52af82537fea 100644 (file)
 #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,
index 81aa9b20a592e3748b815cd3ef3c1b2812b9a3fa..ab5b2fd2a3f959a4d278e3969af78a2af7bfc6c9 100644 (file)
@@ -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);
index 67c98e6c58b50f17628dd8a2bc8431cf5c01dd29..a87def578d4346d72feb2f40b52c474a72656fa0 100644 (file)
@@ -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);
        }
 
index 174afc5c589af5369c242b27e924ba80277efd3c..e475b52b858ea5213a8b8da498fc805b13195bac 100644 (file)
@@ -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,