[gegl] Change sRGB Y values to match sRGB built-in profiles



commit 9fe71b517dec055b6070dd75f45d5384ae114958
Author: Elle Stone <ellestone ninedegreesbelow com>
Date:   Sat Feb 7 12:17:28 2015 -0500

    Change sRGB Y values to match sRGB built-in profiles

 opencl/colors-8bit-lut.cl.h           |    6 +++---
 opencl/colors.cl.h                    |    6 +++---
 operations/workshop/box-percentile.c  |    6 +++---
 operations/workshop/disc-percentile.c |    6 +++---
 operations/workshop/snn-percentile.c  |    6 +++---
 5 files changed, 15 insertions(+), 15 deletions(-)
---
diff --git a/opencl/colors-8bit-lut.cl.h b/opencl/colors-8bit-lut.cl.h
index a63ba7f..368c202 100644
--- a/opencl/colors-8bit-lut.cl.h
+++ b/opencl/colors-8bit-lut.cl.h
@@ -278,9 +278,9 @@ static const char* colors_8bit_lut_cl_source =
 "};                                                                            \n"
 "                                                                              \n"
 "/* babl reference file: babl/base/rgb-constants.h */                          \n"
-"#define RGB_LUMINANCE_RED    (0.222491f)                                      \n"
-"#define RGB_LUMINANCE_GREEN  (0.716888f)                                      \n"
-"#define RGB_LUMINANCE_BLUE   (0.060621f)                                      \n"
+"#define RGB_LUMINANCE_RED    (0.22248840f)                                    \n"
+"#define RGB_LUMINANCE_GREEN  (0.71690369f)                                    \n"
+"#define RGB_LUMINANCE_BLUE   (0.06060791f)                                    \n"
 "                                                                              \n"
 "/* R'G'B' u8 -> RGBA float */                                                 \n"
 "__kernel void rgb_gamma_u8_to_rgbaf (__global const uchar  * in,              \n"
diff --git a/opencl/colors.cl.h b/opencl/colors.cl.h
index 9431fc3..8e976e8 100644
--- a/opencl/colors.cl.h
+++ b/opencl/colors.cl.h
@@ -419,9 +419,9 @@ static const char* colors_cl_source =
 "/* -- YA float -- */                                                          \n"
 "                                                                              \n"
 "/* babl reference file: babl/base/rgb-constants.h */                          \n"
-"#define RGB_LUMINANCE_RED    (0.222491f)                                      \n"
-"#define RGB_LUMINANCE_GREEN  (0.716888f)                                      \n"
-"#define RGB_LUMINANCE_BLUE   (0.060621f)                                      \n"
+"#define RGB_LUMINANCE_RED    (0.22248840f)                                    \n"
+"#define RGB_LUMINANCE_GREEN  (0.71690369f)                                    \n"
+"#define RGB_LUMINANCE_BLUE   (0.06060791f)                                    \n"
 "                                                                              \n"
 "/* RGBA float -> YA float */                                                  \n"
 "__kernel void rgbaf_to_yaf (__global const float4 * in,                       \n"
diff --git a/operations/workshop/box-percentile.c b/operations/workshop/box-percentile.c
index f4ba570..2f80e3d 100644
--- a/operations/workshop/box-percentile.c
+++ b/operations/workshop/box-percentile.c
@@ -195,9 +195,9 @@ median (GeglBuffer *src,
                   v >= 0 && v < gegl_buffer_get_height (dst))
                 {
                   gfloat *src_pix = src_buf + (u+(v * gegl_buffer_get_width (src))) * 4;
-                  gfloat luma = (src_pix[0] * 0.212671 +
-                                 src_pix[1] * 0.715160 +
-                                 src_pix[2] * 0.072169);
+                  gfloat luma = (src_pix[0] * 0.22248840 +
+                                 src_pix[1] * 0.71690369 +
+                                 src_pix[2] * 0.06060791);
                   list_add (&list, luma, src_pix);
                 }
             }
diff --git a/operations/workshop/disc-percentile.c b/operations/workshop/disc-percentile.c
index dae6322..d0402a1 100644
--- a/operations/workshop/disc-percentile.c
+++ b/operations/workshop/disc-percentile.c
@@ -164,9 +164,9 @@ median (GeglBuffer *src,
                   )
                 {
                   gfloat *src_pix = src_buf + (u+(v * gegl_buffer_get_width (src))) * 4;
-                  gfloat luma = (src_pix[0] * 0.212671 +
-                                 src_pix[1] * 0.715160 +
-                                 src_pix[2] * 0.072169);
+                  gfloat luma = (src_pix[0] * 0.22248840 +
+                                 src_pix[1] * 0.71690369 +
+                                 src_pix[2] * 0.06060791);
                   list_add (&list, luma, src_pix);
                 }
             }
diff --git a/operations/workshop/snn-percentile.c b/operations/workshop/snn-percentile.c
index 9891526..0fbb157 100644
--- a/operations/workshop/snn-percentile.c
+++ b/operations/workshop/snn-percentile.c
@@ -46,9 +46,9 @@ property_double (percentile, _("Percentile"), 50.0)
 #include "gegl-op.h"
 #include <math.h>
 
-#define RGB_LUMINANCE_RED    (0.222491)
-#define RGB_LUMINANCE_GREEN  (0.716888)
-#define RGB_LUMINANCE_BLUE   (0.060621)
+#define RGB_LUMINANCE_RED    (0.22248840)
+#define RGB_LUMINANCE_GREEN  (0.71690369)
+#define RGB_LUMINANCE_BLUE   (0.06060791)
 
 /* XXX: Use babl for this? */
 static inline gfloat rgb2luminance (gfloat *pix)


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