[gegl/pippin/wip/mipmap-prerenders: 3/4] add level argument to gegl_buffer_set signature
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/pippin/wip/mipmap-prerenders: 3/4] add level argument to gegl_buffer_set signature
- Date: Mon, 13 Jun 2011 11:33:16 +0000 (UTC)
commit 7c25229558922b7ebd8e884d3dc94c3643fe3fdc
Author: �yvind Kolås <pippin gimp org>
Date: Fri Jun 10 22:35:23 2011 +0100
add level argument to gegl_buffer_set signature
gegl/buffer/gegl-buffer-access.c | 3 ++-
gegl/buffer/gegl-buffer-iterator.c | 5 ++---
gegl/buffer/gegl-buffer-linear.c | 2 +-
gegl/buffer/gegl-buffer.h | 3 ++-
gegl/process/gegl-processor.c | 2 +-
gegl/property-types/gegl-path.c | 2 +-
operations/affine/affine.c | 4 ++--
operations/common/bilateral-filter.c | 2 +-
operations/common/box-blur.c | 4 ++--
operations/common/c2g.c | 2 +-
operations/common/edge-laplace.c | 2 +-
operations/common/edge-sobel.c | 2 +-
operations/common/exp-combine.c | 2 +-
operations/common/fattal02.c | 2 +-
operations/common/fractal-explorer.c | 2 +-
operations/common/gaussian-blur.c | 8 ++++----
operations/common/mantiuk06.c | 2 +-
operations/common/mblur.c | 4 ++--
operations/common/mirrors.c | 2 +-
operations/common/mono-mixer.c | 2 +-
operations/common/motion-blur.c | 2 +-
operations/common/pixelise.c | 2 +-
operations/common/raw-load.c | 2 +-
operations/common/reinhard05.c | 2 +-
operations/common/snn-mean.c | 2 +-
operations/common/stress.c | 2 +-
operations/common/stretch-contrast.c | 2 +-
operations/external/jpg-load.c | 2 +-
operations/external/pixbuf.c | 2 +-
operations/external/png-load.c | 2 +-
operations/external/ppm-load.c | 21 ++++++++++-----------
operations/external/ppm-save.c | 3 +--
operations/external/rgbe-load.c | 2 +-
operations/external/svg-load.c | 2 +-
operations/external/text.c | 2 +-
operations/external/vector-fill.c | 18 +++++++++---------
operations/workshop/box-max.c | 4 ++--
operations/workshop/box-min.c | 4 ++--
operations/workshop/box-percentile.c | 2 +-
operations/workshop/color-reduction.c | 10 +++++-----
operations/workshop/demosaic-bimedian.c | 2 +-
operations/workshop/demosaic-simple.c | 2 +-
operations/workshop/disc-percentile.c | 2 +-
operations/workshop/external/line-profile.c | 2 +-
operations/workshop/hstack.c | 2 +-
operations/workshop/kuwahara-max.c | 2 +-
operations/workshop/kuwahara-min.c | 2 +-
operations/workshop/kuwahara.c | 2 +-
operations/workshop/lens-correct.c | 2 +-
operations/workshop/mandelbrot.c | 2 +-
operations/workshop/noise-spread.c | 2 +-
operations/workshop/rawbayer-load.c | 2 +-
operations/workshop/snn-percentile.c | 2 +-
operations/workshop/whirl-pinch.c | 2 +-
tests/buffer/buffer-test.c | 8 ++++----
55 files changed, 90 insertions(+), 91 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer-access.c b/gegl/buffer/gegl-buffer-access.c
index 6bc6a2d..369b239 100644
--- a/gegl/buffer/gegl-buffer-access.c
+++ b/gegl/buffer/gegl-buffer-access.c
@@ -617,7 +617,8 @@ gegl_buffer_set (GeglBuffer *buffer,
const GeglRectangle *rect,
const Babl *format,
void *src,
- gint rowstride)
+ gint rowstride,
+ gint level) /* adding it here seems a bit wrong */
{
g_return_if_fail (GEGL_IS_BUFFER (buffer));
diff --git a/gegl/buffer/gegl-buffer-iterator.c b/gegl/buffer/gegl-buffer-iterator.c
index 5a5a8eb..b6d5993 100644
--- a/gegl/buffer/gegl-buffer-iterator.c
+++ b/gegl/buffer/gegl-buffer-iterator.c
@@ -406,8 +406,7 @@ gboolean gegl_buffer_iterator_next (GeglBufferIterator *iterator)
if (i->flags[no] & GEGL_BUFFER_SCAN_COMPATIBLE &&
i->flags[no] & GEGL_BUFFER_FORMAT_COMPATIBLE &&
i->roi[no].width == i->i[no].buffer->tile_storage->tile_width && (i->flags[no] & GEGL_BUFFER_FORMAT_COMPATIBLE))
- {
- /* direct access, don't need to do anything */
+ { /* direct access, don't need to do anything */
#if DEBUG_DIRECT
direct_write += i->roi[no].width * i->roi[no].height;
#endif
@@ -423,7 +422,7 @@ gboolean gegl_buffer_iterator_next (GeglBufferIterator *iterator)
/* XXX: should perhaps use _set_unlocked, and keep the lock in the
* iterator.
*/
- gegl_buffer_set (i->buffer[no], &(i->roi[no]), i->format[no], i->buf[no], GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (i->buffer[no], &(i->roi[no]), i->format[no], i->buf[no], GEGL_AUTO_ROWSTRIDE, 0); /* XXX: use correct level */
}
}
}
diff --git a/gegl/buffer/gegl-buffer-linear.c b/gegl/buffer/gegl-buffer-linear.c
index 739fc16..2d57f61 100644
--- a/gegl/buffer/gegl-buffer-linear.c
+++ b/gegl/buffer/gegl-buffer-linear.c
@@ -238,7 +238,7 @@ gegl_buffer_linear_close (GeglBuffer *buffer,
g_mutex_unlock (buffer->tile_storage->mutex);
/* XXX: potential race */
- gegl_buffer_set (buffer, &info->extent, info->format, info->buf, 0);
+ gegl_buffer_set (buffer, &info->extent, info->format, info->buf, 0, 0);
g_mutex_lock (buffer->tile_storage->mutex);
break;
}
diff --git a/gegl/buffer/gegl-buffer.h b/gegl/buffer/gegl-buffer.h
index d4a97c2..ae2ebbc 100644
--- a/gegl/buffer/gegl-buffer.h
+++ b/gegl/buffer/gegl-buffer.h
@@ -251,7 +251,8 @@ void gegl_buffer_set (GeglBuffer *buffer,
const GeglRectangle *rect,
const Babl *format,
void *src,
- gint rowstride);
+ gint rowstride,
+ gint level); /* level should perhaps be scale? */
/**
diff --git a/gegl/process/gegl-processor.c b/gegl/process/gegl-processor.c
index c73d43c..eef64c1 100644
--- a/gegl/process/gegl-processor.c
+++ b/gegl/process/gegl-processor.c
@@ -481,7 +481,7 @@ render_rectangle (GeglProcessor *processor)
/* copy the buffer data into the cache */
gegl_buffer_set (GEGL_BUFFER (cache), dr, cache->format, buf,
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0); /* XXX: deal with the level */
/* tells the cache that the rectangle (dr) has been computed */
gegl_cache_computed (cache, dr);
diff --git a/gegl/property-types/gegl-path.c b/gegl/property-types/gegl-path.c
index 383f9c4..604c75e 100644
--- a/gegl/property-types/gegl-path.c
+++ b/gegl/property-types/gegl-path.c
@@ -1836,7 +1836,7 @@ static void gegl_buffer_accumulate (GeglBuffer *buffer,
for (j=0; j<4; j++)
buf[i*4 + j] += col[j];
}
- gegl_buffer_set (buffer, roi, format, buf, 0);
+ gegl_buffer_set (buffer, roi, format, buf, 0, 0);
}
diff --git a/operations/affine/affine.c b/operations/affine/affine.c
index 9cb5262..8339b33 100644
--- a/operations/affine/affine.c
+++ b/operations/affine/affine.c
@@ -813,7 +813,7 @@ gegl_affine_fast_reflect_x (GeglBuffer *dest,
}
}
- gegl_buffer_set (dest, dest_rect, format, buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (dest, dest_rect, format, buf, GEGL_AUTO_ROWSTRIDE, 0);
g_free (buf);
}
@@ -859,7 +859,7 @@ gegl_affine_fast_reflect_y (GeglBuffer *dest,
}
}
- gegl_buffer_set (dest, dest_rect, format, buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (dest, dest_rect, format, buf, GEGL_AUTO_ROWSTRIDE, 0);
g_free (buf);
}
diff --git a/operations/common/bilateral-filter.c b/operations/common/bilateral-filter.c
index 3aa0efc..4fa002e 100644
--- a/operations/common/bilateral-filter.c
+++ b/operations/common/bilateral-filter.c
@@ -159,7 +159,7 @@ bilateral_filter (GeglBuffer *src,
offset++;
}
gegl_buffer_set (dst, dst_rect, babl_format ("RGBA float"), dst_buf,
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
g_free (src_buf);
g_free (dst_buf);
}
diff --git a/operations/common/box-blur.c b/operations/common/box-blur.c
index c58761b..932a7dc 100644
--- a/operations/common/box-blur.c
+++ b/operations/common/box-blur.c
@@ -156,7 +156,7 @@ hor_blur (GeglBuffer *src,
dst_buf [offset++] = components[i];
}
- gegl_buffer_set (dst, dst_rect, babl_format ("RaGaBaA float"), dst_buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (dst, dst_rect, babl_format ("RaGaBaA float"), dst_buf, GEGL_AUTO_ROWSTRIDE, 0);
g_free (src_buf);
g_free (dst_buf);
}
@@ -200,7 +200,7 @@ ver_blur (GeglBuffer *src,
dst_buf [offset++] = components[c];
}
- gegl_buffer_set (dst, dst_rect, babl_format ("RaGaBaA float"), dst_buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (dst, dst_rect, babl_format ("RaGaBaA float"), dst_buf, GEGL_AUTO_ROWSTRIDE, 0);
g_free (src_buf);
g_free (dst_buf);
}
diff --git a/operations/common/c2g.c b/operations/common/c2g.c
index ced5e98..d0217e7 100644
--- a/operations/common/c2g.c
+++ b/operations/common/c2g.c
@@ -122,7 +122,7 @@ static void c2g (GeglBuffer *src,
}
}
}
- gegl_buffer_set (dst, dst_rect, babl_format ("YA float"), dst_buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (dst, dst_rect, babl_format ("YA float"), dst_buf, GEGL_AUTO_ROWSTRIDE, 0);
g_free (src_buf);
g_free (dst_buf);
}
diff --git a/operations/common/edge-laplace.c b/operations/common/edge-laplace.c
index 30995f9..2cc16b9 100644
--- a/operations/common/edge-laplace.c
+++ b/operations/common/edge-laplace.c
@@ -218,7 +218,7 @@ edge_laplace (GeglBuffer *src,
}
gegl_buffer_set (dst, dst_rect, babl_format ("RGBA float"), dst_buf,
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
g_free (src_buf);
g_free (temp_buf);
g_free (dst_buf);
diff --git a/operations/common/edge-sobel.c b/operations/common/edge-sobel.c
index a8c735d..5b6831f 100644
--- a/operations/common/edge-sobel.c
+++ b/operations/common/edge-sobel.c
@@ -177,7 +177,7 @@ edge_sobel (GeglBuffer *src,
}
gegl_buffer_set (dst, dst_rect, babl_format ("RGBA float"), dst_buf,
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
g_free (src_buf);
g_free (dst_buf);
}
diff --git a/operations/common/exp-combine.c b/operations/common/exp-combine.c
index efb36d2..0f5983d 100644
--- a/operations/common/exp-combine.c
+++ b/operations/common/exp-combine.c
@@ -1200,7 +1200,7 @@ gegl_expcombine_process (GeglOperation *operation,
/* Save the HDR components to the output buffer. */
gegl_buffer_set (output, full_roi, babl_format (PAD_FORMAT), hdr,
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
gegl_cache_computed (gegl_node_get_cache (operation->node), full_roi);
/* Cleanup */
diff --git a/operations/common/fattal02.c b/operations/common/fattal02.c
index 2d9220f..cbfcce3 100644
--- a/operations/common/fattal02.c
+++ b/operations/common/fattal02.c
@@ -1292,7 +1292,7 @@ fattal02_process (GeglOperation *operation,
}
gegl_buffer_set (output, result, babl_format (OUTPUT_FORMAT), pix,
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
return TRUE;
}
diff --git a/operations/common/fractal-explorer.c b/operations/common/fractal-explorer.c
index 1371629..96ca1b9 100644
--- a/operations/common/fractal-explorer.c
+++ b/operations/common/fractal-explorer.c
@@ -446,7 +446,7 @@ process (GeglOperation *operation,
}
gegl_buffer_set (output, NULL, babl_format ("R'G'B' u8"), buf,
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
g_free (buf);
return TRUE;
diff --git a/operations/common/gaussian-blur.c b/operations/common/gaussian-blur.c
index 4c95ded..4e0be6a 100644
--- a/operations/common/gaussian-blur.c
+++ b/operations/common/gaussian-blur.c
@@ -180,7 +180,7 @@ iir_young_hor_blur (GeglBuffer *src,
}
gegl_buffer_set (dst, src_rect, babl_format ("RaGaBaA float"),
- buf, GEGL_AUTO_ROWSTRIDE);
+ buf, GEGL_AUTO_ROWSTRIDE, 0);
g_free (buf);
g_free (w);
}
@@ -222,7 +222,7 @@ iir_young_ver_blur (GeglBuffer *src,
}
gegl_buffer_set (dst, src_rect,
- babl_format ("RaGaBaA float"), buf, GEGL_AUTO_ROWSTRIDE);
+ babl_format ("RaGaBaA float"), buf, GEGL_AUTO_ROWSTRIDE, 0);
g_free (buf);
g_free (w);
}
@@ -341,7 +341,7 @@ fir_hor_blur (GeglBuffer *src,
}
gegl_buffer_set (dst, dst_rect, babl_format ("RaGaBaA float"),
- dst_buf, GEGL_AUTO_ROWSTRIDE);
+ dst_buf, GEGL_AUTO_ROWSTRIDE, 0);
g_free (src_buf);
g_free (dst_buf);
}
@@ -386,7 +386,7 @@ fir_ver_blur (GeglBuffer *src,
}
gegl_buffer_set (dst, dst_rect, babl_format ("RaGaBaA float"),
- dst_buf, GEGL_AUTO_ROWSTRIDE);
+ dst_buf, GEGL_AUTO_ROWSTRIDE, 0);
g_free (src_buf);
g_free (dst_buf);
}
diff --git a/operations/common/mantiuk06.c b/operations/common/mantiuk06.c
index 404c624..562e1c2 100644
--- a/operations/common/mantiuk06.c
+++ b/operations/common/mantiuk06.c
@@ -1607,7 +1607,7 @@ mantiuk06_process (GeglOperation *operation,
/* Cleanup and set the output */
gegl_buffer_set (output, result, babl_format (OUTPUT_FORMAT), pix,
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
g_free (pix);
g_free (lum);
diff --git a/operations/common/mblur.c b/operations/common/mblur.c
index e910a02..9f7742f 100644
--- a/operations/common/mblur.c
+++ b/operations/common/mblur.c
@@ -93,8 +93,8 @@ process (GeglOperation *operation,
for (c=0;c<4;c++)
acc[i*4+c]=acc[i*4+c]*dampness + buf[i*4+c]*(1.0-dampness);
}
- gegl_buffer_set (p->acc, result, babl_format ("RGBA float"), acc, GEGL_AUTO_ROWSTRIDE);
- gegl_buffer_set (output, result, babl_format ("RGBA float"), acc, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (p->acc, result, babl_format ("RGBA float"), acc, GEGL_AUTO_ROWSTRIDE, 0);
+ gegl_buffer_set (output, result, babl_format ("RGBA float"), acc, GEGL_AUTO_ROWSTRIDE, 0);
g_free (buf);
g_free (acc);
}
diff --git a/operations/common/mirrors.c b/operations/common/mirrors.c
index 0fcee48..7b5ea25 100644
--- a/operations/common/mirrors.c
+++ b/operations/common/mirrors.c
@@ -250,7 +250,7 @@ apply_mirror (double mirror_angle,
gegl_buffer_sample_cleanup(src);
/* Store dst pixels. */
- gegl_buffer_set (dst, roi, format, dst_buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (dst, roi, format, dst_buf, GEGL_AUTO_ROWSTRIDE, 0);
gegl_buffer_flush(dst);
diff --git a/operations/common/mono-mixer.c b/operations/common/mono-mixer.c
index 0e4e20d..8d25234 100644
--- a/operations/common/mono-mixer.c
+++ b/operations/common/mono-mixer.c
@@ -78,7 +78,7 @@ process (GeglOperation *operation,
}
gegl_buffer_set (output, result, babl_format ("YA float"), out_buf,
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
g_free (in_buf);
g_free (out_buf);
diff --git a/operations/common/motion-blur.c b/operations/common/motion-blur.c
index 1117696..c315261 100644
--- a/operations/common/motion-blur.c
+++ b/operations/common/motion-blur.c
@@ -146,7 +146,7 @@ process (GeglOperation *operation,
}
}
- gegl_buffer_set (output, roi, babl_format ("RaGaBaA float"), out_buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (output, roi, babl_format ("RaGaBaA float"), out_buf, GEGL_AUTO_ROWSTRIDE, 0);
g_free (in_buf);
g_free (out_buf);
diff --git a/operations/common/pixelise.c b/operations/common/pixelise.c
index 85865ef..0907e3c 100644
--- a/operations/common/pixelise.c
+++ b/operations/common/pixelise.c
@@ -155,7 +155,7 @@ process (GeglOperation *operation,
pixelise(buf, roi, o->xsize, o->ysize);
- gegl_buffer_set (output, roi, babl_format ("RaGaBaA float"), buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (output, roi, babl_format ("RaGaBaA float"), buf, GEGL_AUTO_ROWSTRIDE, 0);
g_free (buf);
diff --git a/operations/common/raw-load.c b/operations/common/raw-load.c
index 4690bc2..249dea0 100644
--- a/operations/common/raw-load.c
+++ b/operations/common/raw-load.c
@@ -98,7 +98,7 @@ load_buffer (GeglChantO *op_raw_load)
babl_component ("R"),
NULL),
buf,
- GEGL_AUTO_ROWSTRIDE
+ GEGL_AUTO_ROWSTRIDE, 0
);
g_free (buf);
}
diff --git a/operations/common/reinhard05.c b/operations/common/reinhard05.c
index 271dd34..d4f7039 100644
--- a/operations/common/reinhard05.c
+++ b/operations/common/reinhard05.c
@@ -242,7 +242,7 @@ reinhard05_process (GeglOperation *operation,
/* Cleanup and set the output */
gegl_buffer_set (output, result, babl_format (OUTPUT_FORMAT), pix,
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
g_free (pix);
g_free (lum);
diff --git a/operations/common/snn-mean.c b/operations/common/snn-mean.c
index 45cd96e..7a55ecb 100644
--- a/operations/common/snn-mean.c
+++ b/operations/common/snn-mean.c
@@ -203,7 +203,7 @@ snn_mean (GeglBuffer *src,
}
}
gegl_buffer_set (dst, dst_rect, babl_format ("RGBA float"), dst_buf,
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
g_free (src_buf);
g_free (dst_buf);
}
diff --git a/operations/common/stress.c b/operations/common/stress.c
index cfa16b1..3583d7e 100644
--- a/operations/common/stress.c
+++ b/operations/common/stress.c
@@ -119,7 +119,7 @@ static void stress (GeglBuffer *src,
dst_offset+=4;
}
}
- gegl_buffer_set (dst, dst_rect, babl_format ("RGBA float"), dst_buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (dst, dst_rect, babl_format ("RGBA float"), dst_buf, GEGL_AUTO_ROWSTRIDE, 0);
g_free (src_buf);
g_free (dst_buf);
}
diff --git a/operations/common/stretch-contrast.c b/operations/common/stretch-contrast.c
index c769010..38d96d3 100644
--- a/operations/common/stretch-contrast.c
+++ b/operations/common/stretch-contrast.c
@@ -128,7 +128,7 @@ process (GeglOperation *operation,
gegl_buffer_get (input, 1.0, &line, babl_format ("RGBA float"), buf, GEGL_AUTO_ROWSTRIDE);
inner_process (min, max, buf, result->width * chunk, level);
gegl_buffer_set (output, &line, babl_format ("RGBA float"), buf,
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
consumed+=chunk;
}
g_free (buf);
diff --git a/operations/external/jpg-load.c b/operations/external/jpg-load.c
index c6624b1..34eb811 100644
--- a/operations/external/jpg-load.c
+++ b/operations/external/jpg-load.c
@@ -126,7 +126,7 @@ gegl_jpg_load_buffer_import_jpg (GeglBuffer *gegl_buffer,
jpeg_read_scanlines (&cinfo, buffer, 1);
gegl_buffer_set (gegl_buffer, &rect, babl_format ("R'G'B' u8"), buffer[0],
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
}
jpeg_destroy_decompress (&cinfo);
fclose (infile);
diff --git a/operations/external/pixbuf.c b/operations/external/pixbuf.c
index b873738..18f0f19 100644
--- a/operations/external/pixbuf.c
+++ b/operations/external/pixbuf.c
@@ -76,7 +76,7 @@ process (GeglOperation *operation,
extent.height = gdk_pixbuf_get_height (o->pixbuf);
gegl_buffer_set (output, &extent, NULL, gdk_pixbuf_get_pixels (o->pixbuf),
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
}
return TRUE;
}
diff --git a/operations/external/png-load.c b/operations/external/png-load.c
index dcf622e..03a2348 100644
--- a/operations/external/png-load.c
+++ b/operations/external/png-load.c
@@ -232,7 +232,7 @@ gegl_buffer_import_png (GeglBuffer *gegl_buffer,
png_read_rows (load_png_ptr, &pixels, NULL, 1);
gegl_buffer_set (gegl_buffer, &rect, format, pixels,
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
}
}
}
diff --git a/operations/external/ppm-load.c b/operations/external/ppm-load.c
index f3b8700..31ec1b9 100644
--- a/operations/external/ppm-load.c
+++ b/operations/external/ppm-load.c
@@ -57,12 +57,12 @@ ppm_load_read_header(FILE *fp,
{
/* PPM Headers Variable Declaration */
gchar *ptr;
- gchar *retval;
+ //gchar *retval;
gchar header[MAX_CHARS_IN_ROW];
gint maxval;
/* Check the PPM file Type P2 or P5 */
- retval = fgets (header,MAX_CHARS_IN_ROW,fp);
+ fgets (header,MAX_CHARS_IN_ROW,fp);
if (header[0] != ASCII_P ||
(header[1] != PIXMAP_ASCII &&
@@ -75,10 +75,10 @@ ppm_load_read_header(FILE *fp,
img->type = header[1];
/* Check the Comments */
- retval = fgets (header,MAX_CHARS_IN_ROW,fp);
+ fgets (header,MAX_CHARS_IN_ROW,fp);
while(header[0] == '#')
{
- retval = fgets (header,MAX_CHARS_IN_ROW,fp);
+ fgets (header,MAX_CHARS_IN_ROW,fp);
}
/* Get Width and Height */
@@ -86,7 +86,7 @@ ppm_load_read_header(FILE *fp,
img->height = atoi (ptr);
img->numsamples = img->width * img->height * CHANNEL_COUNT;
- retval = fgets (header,MAX_CHARS_IN_ROW,fp);
+ fgets (header,MAX_CHARS_IN_ROW,fp);
maxval = strtol (header,&ptr,0);
if ((maxval != 255) && (maxval != 65535))
@@ -117,11 +117,10 @@ ppm_load_read_image(FILE *fp,
pnm_struct *img)
{
guint i;
- gint retval;
if (img->type == PIXMAP_RAW)
{
- retval = fread (img->data, img->bpc, img->numsamples, fp);
+ fread (img->data, img->bpc, img->numsamples, fp);
/* Fix endianness if necessary */
if (img->bpc > 1)
@@ -146,7 +145,7 @@ ppm_load_read_image(FILE *fp,
for (i = 0; i < img->numsamples; i++)
{
guint sample;
- retval = fscanf (fp, " %u", &sample);
+ fscanf (fp, " %u", &sample);
*ptr++ = sample;
}
}
@@ -157,7 +156,7 @@ ppm_load_read_image(FILE *fp,
for (i = 0; i < img->numsamples; i++)
{
guint sample;
- retval = fscanf (fp, " %u", &sample);
+ fscanf (fp, " %u", &sample);
*ptr++ = sample;
}
}
@@ -258,12 +257,12 @@ process (GeglOperation *operation,
{
case 1:
gegl_buffer_set (output, &rect, babl_format ("R'G'B' u8"), img.data,
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
break;
case 2:
gegl_buffer_set (output, &rect, babl_format ("R'G'B' u16"), img.data,
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
break;
default:
diff --git a/operations/external/ppm-save.c b/operations/external/ppm-save.c
index 4e05d8e..2f3779b 100644
--- a/operations/external/ppm-save.c
+++ b/operations/external/ppm-save.c
@@ -54,7 +54,6 @@ ppm_save_write(FILE *fp,
map_type type)
{
guint i;
- gint retval;
/* Write the header */
fprintf (fp, "P%c\n%d %d\n", type, width, height );
@@ -75,7 +74,7 @@ ppm_save_write(FILE *fp,
}
}
- retval = fwrite (data, bpc, numsamples, fp);
+ fwrite (data, bpc, numsamples, fp);
}
else
{
diff --git a/operations/external/rgbe-load.c b/operations/external/rgbe-load.c
index ddb9f16..026525f 100644
--- a/operations/external/rgbe-load.c
+++ b/operations/external/rgbe-load.c
@@ -97,7 +97,7 @@ gegl_rgbe_load_process (GeglOperation *operation,
goto cleanup;
gegl_buffer_set (output, result, babl_format (FORMAT), pixels,
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
success = TRUE;
cleanup:
diff --git a/operations/external/svg-load.c b/operations/external/svg-load.c
index 9511c1d..933ba47 100644
--- a/operations/external/svg-load.c
+++ b/operations/external/svg-load.c
@@ -96,7 +96,7 @@ instead.
rect.height = height;
pixeldata = gdk_pixbuf_get_pixels (pixbuf);
- gegl_buffer_set (gegl_buffer, &rect, babl_format ("R'G'B'A u8"), pixeldata, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (gegl_buffer, &rect, babl_format ("R'G'B'A u8"), pixeldata, GEGL_AUTO_ROWSTRIDE, 0);
}
rsvg_term();
diff --git a/operations/external/text.c b/operations/external/text.c
index b09cb55..b8d9c40 100644
--- a/operations/external/text.c
+++ b/operations/external/text.c
@@ -190,7 +190,7 @@ process (GeglOperation *operation,
text_layout_text (self, cr, 0, NULL, NULL);
gegl_buffer_set (output, result, babl_format ("B'aG'aR'aA u8"), data,
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
cairo_destroy (cr);
cairo_surface_destroy (surface);
diff --git a/operations/external/vector-fill.c b/operations/external/vector-fill.c
index e516c8e..6cfc762 100644
--- a/operations/external/vector-fill.c
+++ b/operations/external/vector-fill.c
@@ -59,15 +59,15 @@ static void path_changed (GeglPath *path,
const GeglRectangle *roi,
gpointer userdata)
{
- GeglChantO *o = GEGL_CHANT_PROPERTIES (userdata);
- GeglRectangle rect;
- gdouble x0, x1, y0, y1;
-
- gegl_path_get_bounds(o->d, &x0, &x1, &y0, &y1);
- rect.x = x0;
- rect.y = y0;
- rect.width = x1 - x0;
- rect.height = y1 - y0;
+ //GeglChantO *o = GEGL_CHANT_PROPERTIES (userdata);
+ //GeglRectangle rect;
+ //gdouble x0, x1, y0, y1;
+
+ // gegl_path_get_bounds(o->d, &x0, &x1, &y0, &y1);
+ // rect.x = x0;
+ // rect.y = y0;
+ // rect.width = x1 - x0;
+ // rect.height = y1 - y0;
gegl_operation_invalidate (userdata, roi, TRUE);
};
diff --git a/operations/workshop/box-max.c b/operations/workshop/box-max.c
index f4b08ce..1bb654b 100644
--- a/operations/workshop/box-max.c
+++ b/operations/workshop/box-max.c
@@ -103,7 +103,7 @@ hor_max (GeglBuffer *src,
}
gegl_buffer_set (dst, dst_rect, babl_format ("RGBA float"), dst_buf,
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
g_free (src_buf);
g_free (dst_buf);
}
@@ -145,7 +145,7 @@ ver_max (GeglBuffer *src,
}
gegl_buffer_set (dst, dst_rect, babl_format ("RGBA float"), dst_buf,
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
g_free (src_buf);
g_free (dst_buf);
}
diff --git a/operations/workshop/box-min.c b/operations/workshop/box-min.c
index 8b4a9ba..8b177ee 100644
--- a/operations/workshop/box-min.c
+++ b/operations/workshop/box-min.c
@@ -103,7 +103,7 @@ hor_min (GeglBuffer *src,
}
gegl_buffer_set (dst, dst_rect, babl_format ("RGBA float"), dst_buf,
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
g_free (src_buf);
g_free (dst_buf);
}
@@ -145,7 +145,7 @@ ver_min (GeglBuffer *src,
}
gegl_buffer_set (dst, dst_rect, babl_format ("RGBA float"), dst_buf,
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
g_free (src_buf);
g_free (dst_buf);
}
diff --git a/operations/workshop/box-percentile.c b/operations/workshop/box-percentile.c
index 192bd79..c4ffee6 100644
--- a/operations/workshop/box-percentile.c
+++ b/operations/workshop/box-percentile.c
@@ -204,7 +204,7 @@ median (GeglBuffer *src,
offset++;
}
gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf,
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
g_free (src_buf);
g_free (dst_buf);
}
diff --git a/operations/workshop/color-reduction.c b/operations/workshop/color-reduction.c
index 4c47ac0..7d8033b 100644
--- a/operations/workshop/color-reduction.c
+++ b/operations/workshop/color-reduction.c
@@ -167,7 +167,7 @@ process_floyd_steinberg (GeglBuffer *input,
/* Push output row */
- gegl_buffer_set (output, &line_rect, babl_format ("RGBA u16"), line_buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (output, &line_rect, babl_format ("RGBA u16"), line_buf, GEGL_AUTO_ROWSTRIDE, 0);
line_rect.y++;
}
@@ -235,7 +235,7 @@ process_bayer (GeglBuffer *input,
}
}
- gegl_buffer_set (output, &line_rect, babl_format ("RGBA u16"), line_buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (output, &line_rect, babl_format ("RGBA u16"), line_buf, GEGL_AUTO_ROWSTRIDE, 0);
line_rect.y++;
}
@@ -290,7 +290,7 @@ process_random_covariant (GeglBuffer *input,
}
}
- gegl_buffer_set (output, &line_rect, babl_format ("RGBA u16"), line_buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (output, &line_rect, babl_format ("RGBA u16"), line_buf, GEGL_AUTO_ROWSTRIDE, 0);
line_rect.y++;
}
@@ -344,7 +344,7 @@ process_random (GeglBuffer *input,
}
}
- gegl_buffer_set (output, &line_rect, babl_format ("RGBA u16"), line_buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (output, &line_rect, babl_format ("RGBA u16"), line_buf, GEGL_AUTO_ROWSTRIDE, 0);
line_rect.y++;
}
@@ -390,7 +390,7 @@ process_no_dither (GeglBuffer *input,
}
}
- gegl_buffer_set (output, &line_rect, babl_format ("RGBA u16"), line_buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (output, &line_rect, babl_format ("RGBA u16"), line_buf, GEGL_AUTO_ROWSTRIDE, 0);
line_rect.y++;
}
diff --git a/operations/workshop/demosaic-bimedian.c b/operations/workshop/demosaic-bimedian.c
index f8eb4b0..34a03ba 100644
--- a/operations/workshop/demosaic-bimedian.c
+++ b/operations/workshop/demosaic-bimedian.c
@@ -167,7 +167,7 @@ demosaic (GeglChantO *op,
offset+=2;
}
- gegl_buffer_set (dst, dst_rect, babl_format ("RGB float"), dst_buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (dst, dst_rect, babl_format ("RGB float"), dst_buf, GEGL_AUTO_ROWSTRIDE, 0);
g_free (src_buf);
g_free (dst_buf);
}
diff --git a/operations/workshop/demosaic-simple.c b/operations/workshop/demosaic-simple.c
index 561a687..539c163 100644
--- a/operations/workshop/demosaic-simple.c
+++ b/operations/workshop/demosaic-simple.c
@@ -103,7 +103,7 @@ demosaic (GeglChantO *op,
}
}
- gegl_buffer_set (dst, dst_rect, babl_format ("RGB float"), dst_buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (dst, dst_rect, babl_format ("RGB float"), dst_buf, GEGL_AUTO_ROWSTRIDE, 0);
g_free (src_buf);
g_free (dst_buf);
}
diff --git a/operations/workshop/disc-percentile.c b/operations/workshop/disc-percentile.c
index bb3b5bd..2884939 100644
--- a/operations/workshop/disc-percentile.c
+++ b/operations/workshop/disc-percentile.c
@@ -173,7 +173,7 @@ median (GeglBuffer *src,
dst_buf[offset*4+u] = median_pix[u];
offset++;
}
- gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf, GEGL_AUTO_ROWSTRIDE, 0);
g_free (src_buf);
g_free (dst_buf);
}
diff --git a/operations/workshop/external/line-profile.c b/operations/workshop/external/line-profile.c
index dfcfe4f..b477013 100644
--- a/operations/workshop/external/line-profile.c
+++ b/operations/workshop/external/line-profile.c
@@ -132,7 +132,7 @@ process (GeglOperation *operation,
cairo_line_to (cr, o->x1, o->y1);
cairo_stroke (cr);
- gegl_buffer_set (output, NULL, babl_format ("B'aG'aR'aA u8"), buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (output, NULL, babl_format ("B'aG'aR'aA u8"), buf, GEGL_AUTO_ROWSTRIDE, 0);
}
return TRUE;
diff --git a/operations/workshop/hstack.c b/operations/workshop/hstack.c
index 2f2d47a..4cd1a46 100644
--- a/operations/workshop/hstack.c
+++ b/operations/workshop/hstack.c
@@ -142,7 +142,7 @@ process (GeglOperation *operation,
}
}
gegl_buffer_set (output, NULL, babl_format ("RGBA float"), buf,
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
g_free (buf);
g_free (bufB);
diff --git a/operations/workshop/kuwahara-max.c b/operations/workshop/kuwahara-max.c
index 5adbe31..c12470e 100644
--- a/operations/workshop/kuwahara-max.c
+++ b/operations/workshop/kuwahara-max.c
@@ -190,7 +190,7 @@ kuwahara (GeglBuffer *src,
offset++;
}
- gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf, GEGL_AUTO_ROWSTRIDE, 0);
g_free (src_buf);
g_free (dst_buf);
}
diff --git a/operations/workshop/kuwahara-min.c b/operations/workshop/kuwahara-min.c
index 64e5157..116e016 100644
--- a/operations/workshop/kuwahara-min.c
+++ b/operations/workshop/kuwahara-min.c
@@ -190,7 +190,7 @@ kuwahara (GeglBuffer *src,
offset++;
}
- gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf, GEGL_AUTO_ROWSTRIDE, 0);
g_free (src_buf);
g_free (dst_buf);
}
diff --git a/operations/workshop/kuwahara.c b/operations/workshop/kuwahara.c
index ca279a4..09ab5a3 100644
--- a/operations/workshop/kuwahara.c
+++ b/operations/workshop/kuwahara.c
@@ -190,7 +190,7 @@ kuwahara (GeglBuffer *src,
offset++;
}
- gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf, GEGL_AUTO_ROWSTRIDE, 0);
g_free (src_buf);
g_free (dst_buf);
}
diff --git a/operations/workshop/lens-correct.c b/operations/workshop/lens-correct.c
index 2794b30..41b6c5d 100644
--- a/operations/workshop/lens-correct.c
+++ b/operations/workshop/lens-correct.c
@@ -294,7 +294,7 @@ copy_through_lens (LensCorrectionModel *oip,
}
/* Store dst pixels. */
- gegl_buffer_set (dst, NULL, babl_format ("RGB float"), dst_buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (dst, NULL, babl_format ("RGB float"), dst_buf, GEGL_AUTO_ROWSTRIDE, 0);
/* Free acquired storage. */
g_free (src_buf);
diff --git a/operations/workshop/mandelbrot.c b/operations/workshop/mandelbrot.c
index a84d654..9b012f8 100644
--- a/operations/workshop/mandelbrot.c
+++ b/operations/workshop/mandelbrot.c
@@ -118,7 +118,7 @@ process (GeglOperation *operation,
}
gegl_buffer_set (output, NULL, babl_format ("Y float"), buf,
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
g_free (buf);
return TRUE;
diff --git a/operations/workshop/noise-spread.c b/operations/workshop/noise-spread.c
index 956b9ef..cc49686 100644
--- a/operations/workshop/noise-spread.c
+++ b/operations/workshop/noise-spread.c
@@ -99,7 +99,7 @@ apply_spread (gint x_amount,
gegl_buffer_sample_cleanup (src);
/* Store dst pixels. */
- gegl_buffer_set (dst, roi, format, dst_buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (dst, roi, format, dst_buf, GEGL_AUTO_ROWSTRIDE, 0);
gegl_buffer_flush(dst);
diff --git a/operations/workshop/rawbayer-load.c b/operations/workshop/rawbayer-load.c
index 49c7a16..e9b5041 100644
--- a/operations/workshop/rawbayer-load.c
+++ b/operations/workshop/rawbayer-load.c
@@ -88,7 +88,7 @@ load_buffer (GeglChantO *op_raw_load)
babl_component ("B"),
NULL),
buf,
- GEGL_AUTO_ROWSTRIDE);
+ GEGL_AUTO_ROWSTRIDE, 0);
g_free (buf);
}
fclose (pfp);
diff --git a/operations/workshop/snn-percentile.c b/operations/workshop/snn-percentile.c
index 4a0e088..8372340 100644
--- a/operations/workshop/snn-percentile.c
+++ b/operations/workshop/snn-percentile.c
@@ -212,7 +212,7 @@ snn_percentile (GeglBuffer *src,
}
offset++;
}
- gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (dst, NULL, babl_format ("RGBA float"), dst_buf, GEGL_AUTO_ROWSTRIDE, 0);
g_free (src_buf);
g_free (dst_buf);
}
diff --git a/operations/workshop/whirl-pinch.c b/operations/workshop/whirl-pinch.c
index c07e003..abd0a3a 100644
--- a/operations/workshop/whirl-pinch.c
+++ b/operations/workshop/whirl-pinch.c
@@ -156,7 +156,7 @@ apply_whirl_pinch (gdouble whirl, gdouble pinch, gdouble radius,
gegl_buffer_sample_cleanup (src);
/* Store dst pixels. */
- gegl_buffer_set (dst, roi, format, dst_buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (dst, roi, format, dst_buf, GEGL_AUTO_ROWSTRIDE, 0);
gegl_buffer_flush(dst);
diff --git a/tests/buffer/buffer-test.c b/tests/buffer/buffer-test.c
index 3c1fbfc..6b58fe5 100644
--- a/tests/buffer/buffer-test.c
+++ b/tests/buffer/buffer-test.c
@@ -177,7 +177,7 @@ fill (GeglBuffer *buffer,
buf[i++]=value;
}
}
- gegl_buffer_set (buffer, NULL, babl_format ("Y float"), buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (buffer, NULL, babl_format ("Y float"), buf, GEGL_AUTO_ROWSTRIDE, 0);
g_free (buf);
}
@@ -222,7 +222,7 @@ static void checkerboard (GeglBuffer *buffer,
}
}
- gegl_buffer_set (buffer, NULL, babl_format ("Y float"), buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (buffer, NULL, babl_format ("Y float"), buf, GEGL_AUTO_ROWSTRIDE, 0);
g_free (buf);
}
@@ -249,7 +249,7 @@ static void vgrad (GeglBuffer *buffer)
buf[i++]= (1.0*y)/height;
}
}
- gegl_buffer_set (buffer, NULL, babl_format ("Y float"), buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (buffer, NULL, babl_format ("Y float"), buf, GEGL_AUTO_ROWSTRIDE, 0);
g_free (buf);
}
@@ -259,7 +259,7 @@ static void fill_rect (GeglBuffer *buffer,
)
{
GeglBufferIterator *gi;
- gi = gegl_buffer_iterator_new (buffer, roi, NULL, GEGL_BUFFER_WRITE);
+ gi = gegl_buffer_iterator_new (buffer, roi, NULL, GEGL_BUFFER_WRITE, 0);
while (gegl_buffer_iterator_next (gi))
{
gfloat *buf = gi->data[0];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]