gegl r2389 - in trunk: . gegl/buffer gegl/operation operations/generated



Author: ok
Date: Fri Jun  6 01:12:49 2008
New Revision: 2389
URL: http://svn.gnome.org/viewvc/gegl?rev=2389&view=rev

Log:
* gegl/buffer/gegl-buffer-iterator.[ch]: made each iterated buffer
have it's own roi argument.
Updated the following files according to iterator API.
* gegl/operation/gegl-operation-point-composer.h: added output roi to
process() argument.
* gegl/operation/gegl-operation-point-composer.c:
* gegl/operation/gegl-operation-point-filter.c:
* gegl/operation/gegl-operation-point-filter.h:
* gegl/operation/gegl-operation-point-render.c:
* operations/generated/math.rb:
* operations/generated/other-blend.rb:
* operations/generated/svg-12-blend.rb:
* operations/generated/svg-12-porter-duff.rb:


Modified:
   trunk/ChangeLog
   trunk/gegl/buffer/gegl-buffer-iterator.c
   trunk/gegl/buffer/gegl-buffer-iterator.h
   trunk/gegl/operation/gegl-operation-point-composer.c
   trunk/gegl/operation/gegl-operation-point-composer.h
   trunk/gegl/operation/gegl-operation-point-filter.c
   trunk/gegl/operation/gegl-operation-point-filter.h
   trunk/gegl/operation/gegl-operation-point-render.c
   trunk/operations/generated/math.rb
   trunk/operations/generated/other-blend.rb
   trunk/operations/generated/svg-12-blend.rb
   trunk/operations/generated/svg-12-porter-duff.rb

Modified: trunk/gegl/buffer/gegl-buffer-iterator.c
==============================================================================
--- trunk/gegl/buffer/gegl-buffer-iterator.c	(original)
+++ trunk/gegl/buffer/gegl-buffer-iterator.c	Fri Jun  6 01:12:49 2008
@@ -65,16 +65,17 @@
 
 typedef struct GeglBufferIterators
 {
-  GeglRectangle  roi;                /* current region of interest */
-  gint           length;             /* length of current data in pixels */
-  gpointer       data       [GEGL_BUFFER_MAX_ITERATORS]; 
+  /* current region of interest */
+  gint          length;             /* length of current data in pixels */
+  gpointer      data[GEGL_BUFFER_MAX_ITERATORS]; 
+  GeglRectangle roi[GEGL_BUFFER_MAX_ITERATORS];                 
 
-  gint           iterators;
   /* the following is private: */
+  gint           iterators;
   gint           iteration_no;
   GeglRectangle  rect       [GEGL_BUFFER_MAX_ITERATORS];
   const Babl    *format     [GEGL_BUFFER_MAX_ITERATORS];
-  Babl          *fish       [GEGL_BUFFER_MAX_ITERATORS];
+  Babl          *fish_from  [GEGL_BUFFER_MAX_ITERATORS];
   Babl          *fish_to    [GEGL_BUFFER_MAX_ITERATORS];
   GeglBuffer    *buffer     [GEGL_BUFFER_MAX_ITERATORS];
   guint          flags      [GEGL_BUFFER_MAX_ITERATORS];
@@ -94,13 +95,45 @@
                                                  GeglRectangle           roi,
                                                  gboolean                write);
 static gboolean  gegl_buffer_scan_iterator_next (GeglBufferScanIterator *i);
-static gboolean  gegl_buffer_scan_compatible    (GeglBuffer             *input,
-                                                 gint                    x0,
-                                                 gint                    y0,
-                                                 GeglBuffer             *output,
-                                                 gint                    x1,
-                                                 gint                    y1);
 
+/*
+ *  check whether iterations on two buffers starting from the given coordinates with
+ *  the same width and height would be able to run parallell.
+ */
+static gboolean gegl_buffer_scan_compatible (GeglBuffer *bufferA,
+                                             gint        xA,
+                                             gint        yA,
+                                             GeglBuffer *bufferB,
+                                             gint        xB,
+                                             gint        yB)
+{ 
+  return FALSE;
+  if (bufferA->tile_storage->tile_width !=
+      bufferB->tile_storage->tile_width)
+    return FALSE;
+  if (bufferA->tile_storage->tile_height !=
+      bufferB->tile_storage->tile_height)
+    return FALSE;
+
+
+  /* FIXME: incorporate the shift with the difference below to
+   * allow some more combinations to be considered scan compatible
+   */
+
+  if (bufferA->shift_x !=
+      bufferB->shift_x)
+    return FALSE;
+  if (bufferA->shift_y !=
+      bufferB->shift_y)
+    return FALSE;
+  if (xA!=xB || yA!=yB)
+    return FALSE;
+  if ( (abs(xA - xB) % bufferA->tile_storage->tile_width) != 0)
+    return FALSE;
+  if ( (abs(yA - yB) % bufferA->tile_storage->tile_height) != 0)
+    return FALSE;
+  return TRUE;
+}
 
 static void gegl_buffer_tile_iterator_init (GeglBufferTileIterator *i,
                                             GeglBuffer             *buffer,
@@ -122,123 +155,23 @@
   i->write = write;
 }
 
-static void gegl_buffer_scan_iterator_init (GeglBufferScanIterator *i,
-                                            GeglBuffer             *buffer,
-                                            GeglRectangle           roi,
-                                            gboolean                write)
-{
-  GeglBufferTileIterator *tile_i = (GeglBufferTileIterator*)i;
-  g_assert (i);
-  memset (i, 0, sizeof (GeglBufferScanIterator));
-  gegl_buffer_tile_iterator_init (tile_i, buffer, roi, write);
-  i->max_size = tile_i->buffer->tile_storage->tile_width *
-                tile_i->buffer->tile_storage->tile_height *
-                tile_i->buffer->format->format.bytes_per_pixel;
-  i->row = 0;
-  if (write)
-    gegl_buffer_lock (buffer);
-}
-
-static gboolean
-gegl_buffer_scan_iterator_next (GeglBufferScanIterator *i)
-{
-  GeglBufferTileIterator *tile_i = (GeglBufferTileIterator*)i;
-
-  if (tile_i->tile==NULL)
-    {
-      gulp:
-      if (!gegl_buffer_tile_iterator_next (tile_i))
-        return FALSE; /* this is where the scan iterator terminates */
-
-      i->length = tile_i->subrect.width;
-      i->next_row = 0;
-      i->row = 0;
-
-      i->roi.x      = tile_i->roi.x + tile_i->col;
-      i->roi.y      = tile_i->roi.y+ tile_i->row+ i->row;
-      i->roi.width  = tile_i->subrect.width;
-      i->roi.height = tile_i->subrect.height;
-    }
-  /* we should now have a valid tile */
-
-  if (i->next_row < tile_i->subrect.height)
-    {
-      if (tile_i->subrect.width == tile_i->buffer->tile_storage->tile_width)
-        /* the entire contents of the tile can be expressed as one long scan */
-        {
-          i->length = tile_i->subrect.width * tile_i->subrect.height;
-          i->data = tile_i->sub_data;
-          i->row = 0;
-          i->next_row = tile_i->subrect.height;
-          return TRUE;
-        }
-      else 
-        /* iterate thorugh the scanlines in the subrect */
-        {
-          guchar *data = tile_i->sub_data;
-
-          i->roi.height = 1;
-
-          i->data = data + i->next_row * tile_i->rowstride;
-          i->row = i->next_row;
-          i->next_row ++;
-          return TRUE;
-        }
-    }
-  else
-    { /* we're done with that tile go get another one if possible */
-      goto gulp;
-    }
-
-  return FALSE;
-}
-
-
-static gboolean gegl_buffer_scan_compatible (GeglBuffer *input,
-                                             gint        x0,
-                                             gint        y0,
-                                             GeglBuffer *output,
-                                             gint        x1,
-                                             gint        y1)
-{ 
-  if (input->tile_storage->tile_width !=
-      output->tile_storage->tile_width)
-    return FALSE;
-  if (input->tile_storage->tile_height !=
-      output->tile_storage->tile_height)
-    return FALSE;
-  if (input->shift_x !=
-      output->shift_x)
-    return FALSE;
-  if (input->shift_y !=
-      output->shift_y)
-    return FALSE;
-  if (x0!=x1 || y0!=y1)
-    return FALSE;
-  if ( (abs(x0 - x1) % input->tile_storage->tile_width) != 0)
-    return FALSE;
-  if ( (abs(y0 - y1) % input->tile_storage->tile_height) != 0)
-    return FALSE;
-  return TRUE;
-}
-
 static gboolean
 gegl_buffer_tile_iterator_next (GeglBufferTileIterator *i)
 {
-  GeglBuffer *buffer = i->buffer;
-  gint  tile_width   = buffer->tile_storage->tile_width;
-  gint  tile_height  = buffer->tile_storage->tile_height;
+  GeglBuffer *buffer   = i->buffer;
+  gint  tile_width     = buffer->tile_storage->tile_width;
+  gint  tile_height    = buffer->tile_storage->tile_height;
   gint  buffer_shift_x = buffer->shift_x;
   gint  buffer_shift_y = buffer->shift_y;
-  gint  buffer_x       = buffer->extent.x + buffer_shift_x;
-  gint  buffer_y       = buffer->extent.y + buffer_shift_y;
+  gint  buffer_x       = buffer->extent.x + buffer_shift_x/* + i->roi.x*/;
+  gint  buffer_y       = buffer->extent.y + buffer_shift_y/* + i->roi.y*/;
 
   if (i->roi.width == 0 || i->roi.height == 0)
     return FALSE;
 
 gulp:
 
-  /* unref previous held tile */
+  /* unref previously held tile */
   if (i->tile)
     {
       if (i->write)
@@ -316,6 +249,81 @@
   return FALSE;
 }
 
+static void gegl_buffer_scan_iterator_init (GeglBufferScanIterator *i,
+                                            GeglBuffer             *buffer,
+                                            GeglRectangle           roi,
+                                            gboolean                write)
+{
+  GeglBufferTileIterator *tile_i = (GeglBufferTileIterator*)i;
+  g_assert (i);
+  memset (i, 0, sizeof (GeglBufferScanIterator));
+  gegl_buffer_tile_iterator_init (tile_i, buffer, roi, write);
+  i->max_size = tile_i->buffer->tile_storage->tile_width *
+                tile_i->buffer->tile_storage->tile_height *
+                tile_i->buffer->format->format.bytes_per_pixel;
+  i->row = 0;
+  if (write)
+    gegl_buffer_lock (buffer);
+}
+
+static gboolean
+gegl_buffer_scan_iterator_next (GeglBufferScanIterator *i)
+{
+  GeglBufferTileIterator *tile_i = (GeglBufferTileIterator*)i;
+
+  if (tile_i->tile==NULL)
+    {
+      gulp:
+      if (!gegl_buffer_tile_iterator_next (tile_i))
+        return FALSE; /* this is where the scan iterator terminates */
+
+      i->length = tile_i->subrect.width;
+      i->next_row = 0;
+      i->row = 0;
+
+      i->roi.x      = tile_i->roi.x + tile_i->col;
+      i->roi.y      = tile_i->roi.y + tile_i->row + i->row;
+      i->roi.width  = tile_i->subrect.width;
+      i->roi.height = tile_i->subrect.height;
+    }
+  /* we should now have a valid tile */
+
+  if (i->next_row < tile_i->subrect.height)
+    {
+      if (tile_i->subrect.width == tile_i->buffer->tile_storage->tile_width)
+        /* the entire contents of the tile can be expressed as one long scan */
+        {
+          i->length = tile_i->subrect.width * tile_i->subrect.height;
+          i->data = tile_i->sub_data;
+          i->row = 0;
+          i->next_row = tile_i->subrect.height;
+          return TRUE;
+        }
+      else 
+        /* iterate thorugh the scanlines in the subrect */
+        {
+          guchar *data = tile_i->sub_data;
+
+          i->roi.height = 1;
+          if (i->next_row!=0)
+            i->roi.y++;
+
+          i->data = data + i->next_row * tile_i->rowstride;
+          i->row = i->next_row;
+          i->next_row ++;
+          return TRUE;
+        }
+    }
+  else
+    { /* we're done with that tile go get another one if possible */
+      goto gulp;
+    }
+
+  return FALSE;
+}
+
+
+
 
 gint
 gegl_buffer_iterator_add (GeglBufferIterator  *iterator,
@@ -353,28 +361,31 @@
     }
   else
     {
+      /* we make all subsequently added iterators share the width and height of the first one */
       i->rect[self].width = i->rect[0].width;
       i->rect[self].height = i->rect[0].height;
+
       if (gegl_buffer_scan_compatible (i->buffer[0], i->rect[0].x, i->rect[0].y,
                                        i->buffer[self], i->rect[self].x, i->rect[self].y))
         {
           i->compatible[self] = TRUE;
           gegl_buffer_scan_iterator_init (&i->i[self], i->buffer[self], i->rect[self], ((i->flags[self] & GEGL_BUFFER_WRITE) != 0));
         }
-      else
-        {
-          i->buf[self] = gegl_malloc (i->format[self]->format.bytes_per_pixel *
-                                      i->i[0].max_size);
-        }
     }
 
+  /* the iterator needs to allocate a buffer if the desired pixel format and
+   * the buffers pixel format differ or the scan iterators are not compatible.
+   */
   if (i->format[self] != i->buffer[self]->format ||
       i->compatible[self] == FALSE)
     {
       i->buf[self] = gegl_malloc (i->format[self]->format.bytes_per_pixel *
                                   i->i[0].max_size);
+
+      g_assert (i->flags[self]);
+      /* create babl fishes needed for desired operations */
       if (i->flags[self] & GEGL_BUFFER_READ)
-        i->fish[self] = babl_fish (i->buffer[self]->format, i->format[self]);
+        i->fish_from[self] = babl_fish (i->buffer[self]->format, i->format[self]);
       if (i->flags[self] & GEGL_BUFFER_WRITE)
         i->fish_to[self] = babl_fish (i->format[self], i->buffer[self]->format);
      }
@@ -404,10 +415,10 @@
                 }
               else
                 {
-                  GeglRectangle rect = i->roi;
-                  rect.x += (i->rect[no].x-i->rect[0].x);
-                  rect.y += (i->rect[no].y-i->rect[0].y);
-                  gegl_buffer_set (i->buffer[no], &rect, i->format[no], i->buf[no], GEGL_AUTO_ROWSTRIDE);
+#define DRUMROLL(message) {gboolean message = FALSE; g_assert (message);}
+
+                  DRUMROLL(just_remove_this_when_reached);
+                  gegl_buffer_set (i->buffer[no], &(i->roi[no]), i->format[no], i->buf[no], GEGL_AUTO_ROWSTRIDE);
                 }
             }
         }
@@ -425,41 +436,49 @@
           if (no == 0)
             {
               result = res;
-              i->roi = i->i->roi; /* the "clock" we're operating from is
-                                     the first buffer*/
-              i->length = i->i->length;
+              i->length = i->i[0].length;
             }
           else
             {
-              g_assert (i->length == i->i->length);
+              g_assert (i->length == i->i[0].length);
             }
+          i->roi[no] = i->i[no].roi;
 
           /* since they were scan compatible this should be true */
           if (res != result)
             {
-              g_print ("%i %i %i\n", res, result);
+              g_print ("%i==%i != 0==%i\n", no, res, result);
              } 
           g_assert (res == result);
 
           if (i->buf[no]!=NULL)
             {
-              if (i->flags[no] & GEGL_BUFFER_READ)
-                babl_process (i->fish[no], i->i[no].data, i->buf[no], i->i[no].length);
+              /* convert to temporary buffer if temporary buffer is present,
+               * the presence indicates that the desired format is different
+               * from the native one
+               */
+              if (i->fish_from[no])
+                babl_process (i->fish_from[no], i->i[no].data, i->buf[no], i->i[no].length);
               i->data[no]=i->buf[no];
             }
           else
             {
+              /* ideal situation, direct data access */
               i->data[no]=i->i[no].data;
             }
         }
       else
         {
-          GeglRectangle rect = i->roi;
-          rect.x += (i->rect[no].x-i->rect[0].x);
-          rect.y += (i->rect[no].y-i->rect[0].y);
+          /* we copy the roi from iterator 0  */
+          i->roi[no] = i->roi[0];
+          i->roi[no].x += (i->rect[no].x-i->rect[0].x);
+          i->roi[no].y += (i->rect[no].y-i->rect[0].y);
+
+          g_assert (i->length == i->roi[no].width * i->roi[no].height);
+
           g_assert (i->buf[no]);
 
-          gegl_buffer_get (i->buffer[no], 1.0, &rect, i->format[no], i->buf[no], GEGL_AUTO_ROWSTRIDE);
+          gegl_buffer_get (i->buffer[no], 1.0, &(i->roi[no]), i->format[no], i->buf[no], GEGL_AUTO_ROWSTRIDE);
           i->data[no]=i->buf[no];
         }
     }
@@ -478,6 +497,13 @@
       g_free (i);
     }
 
+  /*g_print ("%i: %i,%i %ix%i\n", 
+   i->iteration_no,
+   i->roi[0].x,
+   i->roi[0].y,
+   i->roi[0].width,
+   i->roi[0].height);*/
+
   return result;
 }
 

Modified: trunk/gegl/buffer/gegl-buffer-iterator.h
==============================================================================
--- trunk/gegl/buffer/gegl-buffer-iterator.h	(original)
+++ trunk/gegl/buffer/gegl-buffer-iterator.h	Fri Jun  6 01:12:49 2008
@@ -30,9 +30,9 @@
 
 typedef struct GeglBufferIterator
 {
-  GeglRectangle  roi;
-  gint           length;
-  gpointer       data[GEGL_BUFFER_MAX_ITERATORS];
+  gint          length;
+  gpointer      data[GEGL_BUFFER_MAX_ITERATORS];
+  GeglRectangle roi[GEGL_BUFFER_MAX_ITERATORS];
 } GeglBufferIterator;
 
 

Modified: trunk/gegl/operation/gegl-operation-point-composer.c
==============================================================================
--- trunk/gegl/operation/gegl-operation-point-composer.c	(original)
+++ trunk/gegl/operation/gegl-operation-point-composer.c	Fri Jun  6 01:12:49 2008
@@ -209,14 +209,14 @@
 
           while (gegl_buffer_iterator_next (i))
             {
-               point_composer_class->process (operation, i->data[read], i->data[foo], i->data[0], i->length);
+               point_composer_class->process (operation, i->data[read], i->data[foo], i->data[0], i->length, &(i->roi[0]));
             }
         }
       else
         {
           while (gegl_buffer_iterator_next (i))
             {
-               point_composer_class->process (operation, i->data[read], NULL, i->data[0], i->length);
+               point_composer_class->process (operation, i->data[read], NULL, i->data[0], i->length, &(i->roi[0]));
             }
         }
       return TRUE;

Modified: trunk/gegl/operation/gegl-operation-point-composer.h
==============================================================================
--- trunk/gegl/operation/gegl-operation-point-composer.h	(original)
+++ trunk/gegl/operation/gegl-operation-point-composer.h	Fri Jun  6 01:12:49 2008
@@ -43,11 +43,13 @@
 {
   GeglOperationComposerClass parent_class;
 
-  gboolean (* process) (GeglOperation *self,      /* for parameters      */
-                        void          *in,
-                        void          *aux,
-                        void          *out,
-                        glong          samples);  /* number of samples   */
+  gboolean (* process) (GeglOperation       *self,      /* for parameters      */
+                        void                *in,
+                        void                *aux,
+                        void                *out,
+                        glong                samples, /* number of samples   */
+                        const GeglRectangle *roi      /* rectangular region in output buffer */
+                        ); 
 
 };
 

Modified: trunk/gegl/operation/gegl-operation-point-filter.c
==============================================================================
--- trunk/gegl/operation/gegl-operation-point-filter.c	(original)
+++ trunk/gegl/operation/gegl-operation-point-filter.c	Fri Jun  6 01:12:49 2008
@@ -78,7 +78,7 @@
       GeglBufferIterator *i = gegl_buffer_iterator_new (output, *result, out_format, GEGL_BUFFER_WRITE);
       gint read  = gegl_buffer_iterator_add (i, input,  *result, in_format, GEGL_BUFFER_READ);
       while (gegl_buffer_iterator_next (i))
-           point_filter_class->process (operation, i->data[read], i->data[0], i->length, &i->roi);
+           point_filter_class->process (operation, i->data[read], i->data[0], i->length, &i->roi[0]);
 
     }
   return TRUE;

Modified: trunk/gegl/operation/gegl-operation-point-filter.h
==============================================================================
--- trunk/gegl/operation/gegl-operation-point-filter.h	(original)
+++ trunk/gegl/operation/gegl-operation-point-filter.h	Fri Jun  6 01:12:49 2008
@@ -41,13 +41,14 @@
 {
   GeglOperationFilterClass parent_class;
 
-  gboolean (* process) (GeglOperation *self,      /* for parameters    */
-                        void          *in_buf,    /* input buffer      */
-                        void          *out_buf,   /* output buffer     */
-                        glong          samples,   /* number of samples */
-                        GeglRectangle *roi);      /* rectangle out_buf spans in
-                                                     in buffer, see the checkerboard
-                                                     op for semantics */
+  gboolean (* process) (GeglOperation      *self,    /* for parameters    */
+                        void               *in_buf,  /* input buffer      */
+                        void               *out_buf, /* output buffer     */
+                        glong               samples, /* number of samples */
+                        const GeglRectangle *roi);   /* rectangle out_buf spans
+                                                        in in buffer, see the
+                                                        checkerboard op for
+                                                        semantics */
 };
 
 GType gegl_operation_point_filter_get_type (void) G_GNUC_CONST;

Modified: trunk/gegl/operation/gegl-operation-point-render.c
==============================================================================
--- trunk/gegl/operation/gegl-operation-point-render.c	(original)
+++ trunk/gegl/operation/gegl-operation-point-render.c	Fri Jun  6 01:12:49 2008
@@ -61,7 +61,7 @@
   operation_class->prepare = prepare;
 
   operation_class->detect = detect;
-  operation_class->no_cache = TRUE;
+  operation_class->no_cache = FALSE;
   operation_class->get_cached_region = NULL; /* we are able to compute anything
                                                  anywhere when we're our kind
                                                  of class */
@@ -94,12 +94,10 @@
 
   if ((result->width > 0) && (result->height > 0))
     {
-      GeglBufferIterator *i = gegl_buffer_iterator_new (output, *result, out_format, GEGL_BUFFER_WRITE);
+      GeglBufferIterator *i = gegl_buffer_iterator_new (output, *result, out_format, GEGL_BUFFER_WRITE);      
 
       while (gegl_buffer_iterator_next (i))
-        {
-          point_render_class->process (operation, i->data[0], i->length, &i->roi);
-        }
+          point_render_class->process (operation, i->data[0], i->length, &i->roi[0]);
     }
   return TRUE;
-}
+}
\ No newline at end of file

Modified: trunk/operations/generated/math.rb
==============================================================================
--- trunk/operations/generated/math.rb	(original)
+++ trunk/operations/generated/math.rb	Fri Jun  6 01:12:49 2008
@@ -24,13 +24,13 @@
  */'
 
 a = [
-      ['add',          'c = c + value', 0],
-      ['subtract',     'c = c - value', 0],
-      ['multiply',     'c = c * value', 1.0],
-      ['divide',       'c = value==0.0?0.0:c/value', 1.0],
-      ['gamma',        'c = powf (c, value)', 1.0],
-#     ['threshold',    'c = c>=value?1.0:0.0', 0.5],
-#     ['invert',       'c = 1.0-c']
+      ['add',       'c = c + value', 0],
+      ['subtract',  'c = c - value', 0],
+      ['multiply',  'c = c * value', 1.0],
+      ['divide',    'c = value==0.0?0.0:c/value', 1.0],
+      ['gamma',     'c = powf (c, value)', 1.0],
+#     ['threshold', 'c = c>=value?1.0:0.0', 0.5],
+#     ['invert',    'c = 1.0-c']
     ]
     
 a.each do
@@ -76,11 +76,12 @@
 }
 
 static gboolean
-process (GeglOperation *op,
-          void         *in_buf,
-          void         *aux_buf,
-          void         *out_buf,
-          glong         n_pixels)
+process (GeglOperation        *op,
+          void                *in_buf,
+          void                *aux_buf,
+          void                *out_buf,
+          glong                n_pixels,
+          const GeglRectangle *roi)
 {
   gfloat *in = in_buf;
   gfloat *out = out_buf;

Modified: trunk/operations/generated/other-blend.rb
==============================================================================
--- trunk/operations/generated/other-blend.rb	(original)
+++ trunk/operations/generated/other-blend.rb	Fri Jun  6 01:12:49 2008
@@ -61,11 +61,12 @@
 }
 
 static gboolean
-process (GeglOperation *op,
-          void          *in_buf,
-          void          *aux_buf,
-          void          *out_buf,
-          glong          n_pixels)
+process (GeglOperation        *op,
+          void                *in_buf,
+          void                *aux_buf,
+          void                *out_buf,
+          glong                n_pixels,
+          const GeglRectangle *roi)
 {
   gint i;
   gfloat *in = in_buf;
@@ -157,11 +158,12 @@
 #ifdef HAS_G4FLOAT
 
 static gboolean
-process_gegl4float (GeglOperation *op,
-                    void          *in_buf,
-                    void          *aux_buf,
-                    void          *out_buf,
-                    glong          n_pixels)
+process_gegl4float (GeglOperation      *op,
+                    void               *in_buf,
+                    void                *aux_buf,
+                    void                *out_buf,
+                    glong                n_pixels,
+                    const GeglRectangle *roi)
 {
   g4float *A = aux_buf;
   g4float *B = in_buf;

Modified: trunk/operations/generated/svg-12-blend.rb
==============================================================================
--- trunk/operations/generated/svg-12-blend.rb	(original)
+++ trunk/operations/generated/svg-12-blend.rb	Fri Jun  6 01:12:49 2008
@@ -88,11 +88,12 @@
 }
 
 static gboolean
-process (GeglOperation *op,
-          void         *in_buf,
-          void         *aux_buf,
-          void         *out_buf,
-          glong         n_pixels)
+process (GeglOperation       *op,
+         void                *in_buf,
+         void                *aux_buf,
+         void                *out_buf,
+         glong                n_pixels,
+         const GeglRectangle *roi)
 {
   gfloat *in = in_buf;
   gfloat *aux = aux_buf;

Modified: trunk/operations/generated/svg-12-porter-duff.rb
==============================================================================
--- trunk/operations/generated/svg-12-porter-duff.rb	(original)
+++ trunk/operations/generated/svg-12-porter-duff.rb	Fri Jun  6 01:12:49 2008
@@ -90,11 +90,12 @@
 }
 
 static gboolean
-process (GeglOperation *op,
-          void          *in_buf,
-          void          *aux_buf,
-          void          *out_buf,
-          glong          n_pixels)
+process (GeglOperation        *op,
+          void                *in_buf,
+          void                *aux_buf,
+          void                *out_buf,
+          glong                n_pixels,
+          const GeglRectangle *roi)
 {
   gint i;
   gfloat *in = in_buf;
@@ -121,7 +122,7 @@
 
 #ifdef HAS_G4FLOAT
   gegl_operation_class_add_processor (operation_class,
-                                      G_CALLBACK (process_gegl4float), "simd");
+                                      G_CALLBACK (process_simd), "simd");
 #endif
 
 '
@@ -186,11 +187,12 @@
 #ifdef HAS_G4FLOAT
 
 static gboolean
-process_gegl4float (GeglOperation *op,
-                    void          *in_buf,
-                    void          *aux_buf,
-                    void          *out_buf,
-                    glong          n_pixels)
+process_simd (GeglOperation       *op,
+              void                *in_buf,
+              void                *aux_buf,
+              void                *out_buf,
+              glong                n_pixels,
+              const GeglRectangle *roi)
 {
   g4float *A = aux_buf;
   g4float *B = in_buf;



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