[gegl] [op:grey] Add a dummy value copying loop to process()



commit 81ad086e863b04eafaf0ffd02ceeb134cbc0095a
Author: �yvind Kolås <pippin gimp org>
Date:   Tue Nov 24 18:27:22 2009 +0000

    [op:grey] Add a dummy value copying loop to process()

 operations/common/grey.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/operations/common/grey.c b/operations/common/grey.c
index 2c969d6..7c61695 100644
--- a/operations/common/grey.c
+++ b/operations/common/grey.c
@@ -39,6 +39,8 @@ static void prepare (GeglOperation *operation)
   gegl_operation_set_format (operation, "output", format);
 }
 
+/* XXX: could be sped up by special casing op-filter behavior */
+
 static gboolean
 process (GeglOperation       *op,
          void                *in_buf,
@@ -46,6 +48,14 @@ process (GeglOperation       *op,
          glong                samples,
          const GeglRectangle *roi)
 {
+  float *in = in_buf;
+  float *out = out_buf;
+  while (samples--)
+    {
+      *out++ = *in++;
+      *out++ = *in++;
+    }
+
   return TRUE;
 }
 



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