summaryrefslogtreecommitdiff
path: root/opencl
diff options
context:
space:
mode:
authorØyvind Kolås <pippin@gimp.org>2015-05-24 20:22:46 +0200
committerØyvind Kolås <pippin@gimp.org>2015-05-25 01:25:44 +0200
commitaf5361ca8d5083297803e4930398eb3c646eeaaf (patch)
treeffb2e5befe948067d8fb865ecf2e64f1d249fd7e /opencl
parent5d715eee845ef1ab30490259a114902d0b6533ed (diff)
buffer: Add an abyss argument to gegl_buffer_copy, this changes the API but
doesn't add the implementation defaulting to GEGL_ABYSS_NONE all the time (and passing it, in almost all places, some could proably use CLAMP)
Diffstat (limited to 'opencl')
-rw-r--r--opencl/colors-8bit-lut.cl.h6
-rw-r--r--opencl/colors.cl.h6
-rw-r--r--opencl/texturize-canvas.cl.h62
3 files changed, 37 insertions, 37 deletions
diff --git a/opencl/colors-8bit-lut.cl.h b/opencl/colors-8bit-lut.cl.h
index 368c2027..a63ba7ff 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.22248840f) \n"
-"#define RGB_LUMINANCE_GREEN (0.71690369f) \n"
-"#define RGB_LUMINANCE_BLUE (0.06060791f) \n"
+"#define RGB_LUMINANCE_RED (0.222491f) \n"
+"#define RGB_LUMINANCE_GREEN (0.716888f) \n"
+"#define RGB_LUMINANCE_BLUE (0.060621f) \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 8e976e8c..9431fc30 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.22248840f) \n"
-"#define RGB_LUMINANCE_GREEN (0.71690369f) \n"
-"#define RGB_LUMINANCE_BLUE (0.06060791f) \n"
+"#define RGB_LUMINANCE_RED (0.222491f) \n"
+"#define RGB_LUMINANCE_GREEN (0.716888f) \n"
+"#define RGB_LUMINANCE_BLUE (0.060621f) \n"
" \n"
"/* RGBA float -> YA float */ \n"
"__kernel void rgbaf_to_yaf (__global const float4 * in, \n"
diff --git a/opencl/texturize-canvas.cl.h b/opencl/texturize-canvas.cl.h
index 52ac2434..5fa1566b 100644
--- a/opencl/texturize-canvas.cl.h
+++ b/opencl/texturize-canvas.cl.h
@@ -1,32 +1,32 @@
-static const char *texturize_canvas_cl_source =
-"#define CLAMP(val,lo,hi) (val < lo) ? lo : ((hi < val) ? hi : val ) \n"
-"__kernel void cl_texturize_canvas(__global const float * in, \n"
-" __global float * out, \n"
-" __global const float * sdata, \n"
-" const int x, \n"
-" const int y, \n"
-" const int xm, \n"
-" const int ym, \n"
-" const int offs, \n"
-" const float mult, \n"
-" const int components, \n"
-" const int has_alpha) \n"
-"{ \n"
-" int col = get_global_id(0); \n"
-" int row = get_global_id(1); \n"
-" int step = components + has_alpha; \n"
-" int index = step * (row * get_global_size(0) + col); \n"
-" int canvas_index = ((x + col) & 127) * xm + \n"
-" ((y + row) & 127) * ym + offs; \n"
-" float color; \n"
-" int i; \n"
-" float tmp = mult * sdata[canvas_index]; \n"
-" for(i=0; i<components; ++i) \n"
-" { \n"
-" color = tmp + in[index]; \n"
-" out[index++] = CLAMP(color,0.0f,1.0f); \n"
-" } \n"
-" if(has_alpha) \n"
-" out[index] = in[index]; \n"
-"} \n"
+static const char* texturize_canvas_cl_source =
+"#define CLAMP(val,lo,hi) (val < lo) ? lo : ((hi < val) ? hi : val ) \n"
+"__kernel cl_texturize_canvas(__global const float * in, \n"
+" __global float * out, \n"
+" __global float * sdata, \n"
+" const int x, \n"
+" const int y, \n"
+" const int xm, \n"
+" const int ym, \n"
+" const int offs, \n"
+" const float mult, \n"
+" const int components, \n"
+" const int has_alpha) \n"
+"{ \n"
+" int col = get_global_id(0); \n"
+" int row = get_global_id(1); \n"
+" int step = components + has_alpha; \n"
+" int index = step * (row * get_global_size(0) + col); \n"
+" int canvas_index = ((x + col) & 127) * xm + \n"
+" ((y + row) & 127) * ym + offs; \n"
+" float color; \n"
+" int i; \n"
+" float tmp = mult * sdata[canvas_index]; \n"
+" for(i=0; i<components; ++i) \n"
+" { \n"
+" color = tmp + src[index]; \n"
+" out[index++] = CLAMP(color,0.0f,1.0f); \n"
+" } \n"
+" if(has_alpha) \n"
+" out[index] = in[index]; \n"
+"} \n"
;