[gegl] opencl: colors-8bit-lut typos



commit c556f4323a9fc9c18b78596afd0357d0b4a52d90
Author: Massimo Valentini <mvalentini src gnome org>
Date:   Mon Dec 9 18:18:01 2013 +0100

    opencl: colors-8bit-lut typos
    
    in GIMP gaussian-blurring (FIR) an image "R'G'B'A u8" used to
    produce a grayscale image when OpenCL was enabled

 opencl/colors-8bit-lut.cl   |   10 +++++-----
 opencl/colors-8bit-lut.cl.h |    8 ++++----
 2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/opencl/colors-8bit-lut.cl b/opencl/colors-8bit-lut.cl
index 93c00a7..c3058e8 100644
--- a/opencl/colors-8bit-lut.cl
+++ b/opencl/colors-8bit-lut.cl
@@ -348,8 +348,8 @@ __kernel void rgba_gamma_u8_to_ragabaf (__global const uchar4 * in,
   float4 tmp_v;
 
   tmp_v = (float4)(u8_gamma_to_linear_lut[(int)in_v.x],
-                   u8_gamma_to_linear_lut[(int)in_v.x],
-                   u8_gamma_to_linear_lut[(int)in_v.x],
+                   u8_gamma_to_linear_lut[(int)in_v.y],
+                   u8_gamma_to_linear_lut[(int)in_v.z],
                    in_v.w / 255.0f);
 
   out_v   = tmp_v * tmp_v.w;
@@ -366,8 +366,8 @@ __kernel void rgba_gamma_u8_to_yaf (__global const uchar4 * in,
   uchar4 in_v  = in[gid];
   float4 tmp_v;
   tmp_v = (float4)(u8_gamma_to_linear_lut[(int)in_v.x],
-                   u8_gamma_to_linear_lut[(int)in_v.x],
-                   u8_gamma_to_linear_lut[(int)in_v.x],
+                   u8_gamma_to_linear_lut[(int)in_v.y],
+                   u8_gamma_to_linear_lut[(int)in_v.z],
                    in_v.w / 255.0f);
   float2 out_v;
 
@@ -379,4 +379,4 @@ __kernel void rgba_gamma_u8_to_yaf (__global const uchar4 * in,
   out_v.y = tmp_v.w;
 
   out[gid] = out_v;
-}
\ No newline at end of file
+}
diff --git a/opencl/colors-8bit-lut.cl.h b/opencl/colors-8bit-lut.cl.h
index 0567a78..a63ba7f 100644
--- a/opencl/colors-8bit-lut.cl.h
+++ b/opencl/colors-8bit-lut.cl.h
@@ -349,8 +349,8 @@ static const char* colors_8bit_lut_cl_source =
 "  float4 tmp_v;                                                               \n"
 "                                                                              \n"
 "  tmp_v = (float4)(u8_gamma_to_linear_lut[(int)in_v.x],                       \n"
-"                   u8_gamma_to_linear_lut[(int)in_v.x],                       \n"
-"                   u8_gamma_to_linear_lut[(int)in_v.x],                       \n"
+"                   u8_gamma_to_linear_lut[(int)in_v.y],                       \n"
+"                   u8_gamma_to_linear_lut[(int)in_v.z],                       \n"
 "                   in_v.w / 255.0f);                                          \n"
 "                                                                              \n"
 "  out_v   = tmp_v * tmp_v.w;                                                  \n"
@@ -367,8 +367,8 @@ static const char* colors_8bit_lut_cl_source =
 "  uchar4 in_v  = in[gid];                                                     \n"
 "  float4 tmp_v;                                                               \n"
 "  tmp_v = (float4)(u8_gamma_to_linear_lut[(int)in_v.x],                       \n"
-"                   u8_gamma_to_linear_lut[(int)in_v.x],                       \n"
-"                   u8_gamma_to_linear_lut[(int)in_v.x],                       \n"
+"                   u8_gamma_to_linear_lut[(int)in_v.y],                       \n"
+"                   u8_gamma_to_linear_lut[(int)in_v.z],                       \n"
 "                   in_v.w / 255.0f);                                          \n"
 "  float2 out_v;                                                               \n"
 "                                                                              \n"


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