[gegl] box-blur: Fix syntax error and wrong abyss in OpenCL version
- From: Daniel Sabo <daniels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] box-blur: Fix syntax error and wrong abyss in OpenCL version
- Date: Sat, 19 Oct 2013 11:10:51 +0000 (UTC)
commit 2edc129baffa8aec2c9ac5d1e003caf758ac0a8f
Author: Daniel Sabo <DanielSabo gmail com>
Date: Sat Oct 19 02:52:51 2013 -0700
box-blur: Fix syntax error and wrong abyss in OpenCL version
opencl/box-blur.cl | 4 ++--
opencl/box-blur.cl.h | 4 ++--
operations/common/box-blur.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/opencl/box-blur.cl b/opencl/box-blur.cl
index f99856e..e99bea4 100644
--- a/opencl/box-blur.cl
+++ b/opencl/box-blur.cl
@@ -17,7 +17,7 @@ __kernel void kernel_blur_hor (__global const float4 *in,
{
mean += in[in_index + i];
}
- aux[aux_index] = mean / (2 * radius + 1);
+ aux[aux_index] = mean / (float)(2 * radius + 1);
}
}
@@ -40,6 +40,6 @@ __kernel void kernel_blur_ver (__global const float4 *aux,
mean += aux[aux_index];
aux_index += width;
}
- out[out_index] = mean / (2 * radius + 1);
+ out[out_index] = mean / (float)(2 * radius + 1);
}
}
diff --git a/opencl/box-blur.cl.h b/opencl/box-blur.cl.h
index 3d168fb..bfed601 100644
--- a/opencl/box-blur.cl.h
+++ b/opencl/box-blur.cl.h
@@ -18,7 +18,7 @@ static const char* box_blur_cl_source =
" { \n"
" mean += in[in_index + i]; \n"
" } \n"
-" aux[aux_index] = mean / (2 * radius + 1); \n"
+" aux[aux_index] = mean / (float)(2 * radius + 1); \n"
" } \n"
"} \n"
" \n"
@@ -41,7 +41,7 @@ static const char* box_blur_cl_source =
" mean += aux[aux_index]; \n"
" aux_index += width; \n"
" } \n"
-" out[out_index] = mean / (2 * radius + 1); \n"
+" out[out_index] = mean / (float)(2 * radius + 1); \n"
" } \n"
"} \n"
;
diff --git a/operations/common/box-blur.c b/operations/common/box-blur.c
index 11449c7..1113194 100644
--- a/operations/common/box-blur.c
+++ b/operations/common/box-blur.c
@@ -276,7 +276,7 @@ cl_process (GeglOperation *operation,
op_area->right,
op_area->top,
op_area->bottom,
- GEGL_ABYSS_NONE);
+ GEGL_ABYSS_CLAMP);
gint aux = gegl_buffer_cl_iterator_add_2 (i,
NULL,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]