[gegl] sobel: Rename property keep_signal to keep_sign



commit b6027c99ba338403db6470c6bc7aa6208cdf8f6f
Author: Mukund Sivaraman <muks banu com>
Date:   Wed Oct 8 14:16:21 2014 +0530

    sobel: Rename property keep_signal to keep_sign

 opencl/edge-sobel.cl           |    4 ++--
 opencl/edge-sobel.cl.h         |    4 ++--
 operations/common/edge-sobel.c |   19 ++++++++++---------
 3 files changed, 14 insertions(+), 13 deletions(-)
---
diff --git a/opencl/edge-sobel.cl b/opencl/edge-sobel.cl
index ed8aed6..c41a290 100644
--- a/opencl/edge-sobel.cl
+++ b/opencl/edge-sobel.cl
@@ -3,7 +3,7 @@ kernel void kernel_edgesobel(global float4 *in,
                              global float4 *out,
                              const int horizontal,
                              const int vertical,
-                             const int keep_signal,
+                             const int keep_sign,
                              const int has_alpha)
 {
     int gidx = get_global_id(0);
@@ -52,7 +52,7 @@ kernel void kernel_edgesobel(global float4 *in,
     }
     else
     {
-        if (keep_signal)
+        if (keep_sign)
             gradient = hor_grad + ver_grad;
         else
             gradient = fabs(hor_grad + ver_grad);
diff --git a/opencl/edge-sobel.cl.h b/opencl/edge-sobel.cl.h
index 6f1816b..2dc5b0c 100644
--- a/opencl/edge-sobel.cl.h
+++ b/opencl/edge-sobel.cl.h
@@ -4,7 +4,7 @@ static const char* edge_sobel_cl_source =
 "                             global float4 *out,                              \n"
 "                             const int horizontal,                            \n"
 "                             const int vertical,                              \n"
-"                             const int keep_signal,                           \n"
+"                             const int keep_sign,                             \n"
 "                             const int has_alpha)                             \n"
 "{                                                                             \n"
 "    int gidx = get_global_id(0);                                              \n"
@@ -53,7 +53,7 @@ static const char* edge_sobel_cl_source =
 "    }                                                                         \n"
 "    else                                                                      \n"
 "    {                                                                         \n"
-"        if (keep_signal)                                                      \n"
+"        if (keep_sign)                                                        \n"
 "            gradient = hor_grad + ver_grad;                                   \n"
 "        else                                                                  \n"
 "            gradient = fabs(hor_grad + ver_grad);                             \n"
diff --git a/operations/common/edge-sobel.c b/operations/common/edge-sobel.c
index 50d4b6d..df34955 100644
--- a/operations/common/edge-sobel.c
+++ b/operations/common/edge-sobel.c
@@ -28,7 +28,7 @@ property_boolean (horizontal,  _("Horizontal"), TRUE)
 
 property_boolean (vertical,  _("Vertical"), TRUE)
 
-property_boolean (keep_signal,  _("Keep Signal"), TRUE)
+property_boolean (keep_sign,  _("Keep Sign"), TRUE)
      description (_("Keep negative values in result, when off the absolute value of the result is used 
instead."))
 
 #else
@@ -49,7 +49,7 @@ edge_sobel (GeglBuffer          *src,
             const GeglRectangle *dst_rect,
             gboolean            horizontal,
             gboolean            vertical,
-            gboolean            keep_signal,
+            gboolean            keep_sign,
             gboolean            has_alpha);
 
 
@@ -85,13 +85,13 @@ cl_edge_sobel (cl_mem              in_tex,
                const GeglRectangle *roi,
                gboolean            horizontal,
                gboolean            vertical,
-               gboolean            keep_signal,
+               gboolean            keep_sign,
                gboolean            has_alpha)
 {
   const size_t gbl_size[2] = {roi->width, roi->height};
   cl_int n_horizontal  = horizontal;
   cl_int n_vertical    = vertical;
-  cl_int n_keep_signal = keep_signal;
+  cl_int n_keep_sign = keep_sign;
   cl_int n_has_alpha   = has_alpha;
   cl_int cl_err = 0;
 
@@ -110,7 +110,7 @@ cl_edge_sobel (cl_mem              in_tex,
   CL_CHECK;
   cl_err = gegl_clSetKernelArg(cl_data->kernel[0], 3, sizeof(cl_int), (void*)&n_vertical);
   CL_CHECK;
-  cl_err = gegl_clSetKernelArg(cl_data->kernel[0], 4, sizeof(cl_int), (void*)&n_keep_signal);
+  cl_err = gegl_clSetKernelArg(cl_data->kernel[0], 4, sizeof(cl_int), (void*)&n_keep_sign);
   CL_CHECK;
   cl_err = gegl_clSetKernelArg(cl_data->kernel[0], 5, sizeof(cl_int), (void*)&n_has_alpha);
   CL_CHECK;
@@ -167,7 +167,7 @@ cl_process (GeglOperation       *operation,
                           &i->roi[0],
                           o->horizontal,
                           o->vertical,
-                          o->keep_signal,
+                          o->keep_sign,
                           has_alpha);
 
       if (err) return FALSE;
@@ -194,7 +194,8 @@ process (GeglOperation       *operation,
     if (cl_process (operation, input, output, result, has_alpha))
       return TRUE;
 
-  edge_sobel (input, &compute, output, result, o->horizontal, o->vertical, o->keep_signal, has_alpha);
+  edge_sobel (input, &compute, output, result,
+              o->horizontal, o->vertical, o->keep_sign, has_alpha);
   return TRUE;
 }
 
@@ -211,7 +212,7 @@ edge_sobel (GeglBuffer          *src,
             const GeglRectangle *dst_rect,
             gboolean            horizontal,
             gboolean            vertical,
-            gboolean            keep_signal,
+            gboolean            keep_sign,
             gboolean            has_alpha)
 {
 
@@ -273,7 +274,7 @@ edge_sobel (GeglBuffer          *src,
           }
         else
           {
-            if (keep_signal)
+            if (keep_sign)
               {
                 for (c=0;c<3;c++)
                   gradient[c] = hor_grad[c]+ver_grad[c];


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