buffer: add abyss policy API

parent 2a8ef46d
......@@ -1067,7 +1067,8 @@ gegl_buffer_get (GeglBuffer *buffer,
gdouble scale,
const Babl *format,
gpointer dest_buf,
gint rowstride)
gint rowstride,
GeglAbyssPolicy repeat_mode)
{
g_return_if_fail (GEGL_IS_BUFFER (buffer));
gegl_buffer_get_unlocked (buffer, scale, rect, format, dest_buf, rowstride);
......@@ -1091,7 +1092,8 @@ gegl_buffer_sample (GeglBuffer *buffer,
GeglMatrix2 *scale,
gpointer dest,
const Babl *format,
GeglSamplerType sampler_type)
GeglSamplerType sampler_type,
GeglAbyssPolicy repeat_mode)
{
GType desired_type;
g_return_if_fail (GEGL_IS_BUFFER (buffer));
......@@ -1125,7 +1127,7 @@ gegl_buffer_sample (GeglBuffer *buffer,
gegl_sampler_prepare (buffer->sampler);
}
gegl_sampler_get (buffer->sampler, x, y, scale, dest);
gegl_sampler_get (buffer->sampler, x, y, scale, dest, GEGL_ABYSS_NONE);
}
void
......
......@@ -276,7 +276,8 @@ gegl_buffer_cl_cache_from (GeglBuffer *buffer,
1.0,
format,
dest_buf,
rowstride);
rowstride,
GEGL_ABYSS_NONE);
return TRUE;
}
}
......@@ -325,7 +326,8 @@ gegl_buffer_cl_cache_from (GeglBuffer *buffer,
1.0,
format,
dest_buf,
rowstride);
rowstride,
GEGL_ABYSS_NONE);
if (tex_dest) gegl_clReleaseMemObject (tex_dest);
......
......@@ -349,7 +349,7 @@ gegl_buffer_cl_iterator_next (GeglBufferClIterator *iterator, gboolean *err)
if (cl_err != CL_SUCCESS) CL_ERROR;
/* color conversion using BABL */
gegl_buffer_get (i->buffer[no], &i->roi[no][j], 1.0, i->format[no], data, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (i->buffer[no], &i->roi[no][j], 1.0, i->format[no], data, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
cl_err = gegl_clEnqueueUnmapMemObject (gegl_cl_get_command_queue(), i->tex_op[no][j], data,
0, NULL, NULL);
......@@ -384,7 +384,7 @@ gegl_buffer_cl_iterator_next (GeglBufferClIterator *iterator, gboolean *err)
if (cl_err != CL_SUCCESS) CL_ERROR;
/* color conversion will be performed in the GPU later */
gegl_buffer_get (i->buffer[no], &i->roi[no][j], 1.0, i->buffer[no]->format, data, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (i->buffer[no], &i->roi[no][j], 1.0, i->buffer[no]->format, data, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
cl_err = gegl_clEnqueueUnmapMemObject (gegl_cl_get_command_queue(), i->tex_buf[no][j], data,
0, NULL, NULL);
......@@ -420,7 +420,7 @@ gegl_buffer_cl_iterator_next (GeglBufferClIterator *iterator, gboolean *err)
if (cl_err != CL_SUCCESS) CL_ERROR;
/* color conversion will be performed in the GPU later */
gegl_buffer_get (i->buffer[no], &i->roi[no][j], 1.0, i->buffer[no]->format, data, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (i->buffer[no], &i->roi[no][j], 1.0, i->buffer[no]->format, data, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
cl_err = gegl_clEnqueueUnmapMemObject (gegl_cl_get_command_queue(), i->tex_buf[no][j], data,
0, NULL, NULL);
......
......@@ -22,6 +22,7 @@
#include <glib-object.h>
#include <babl/babl.h>
#include <gegl-matrix.h>
#include <gegl-enums.h>
G_BEGIN_DECLS
......@@ -226,6 +227,9 @@ gboolean gegl_buffer_set_extent (GeglBuffer *buffer,
* depends on the requested BablFormat.
* @rowstride: rowstride in bytes, or GEGL_AUTO_ROWSTRIDE to compute the
* rowstride based on the width and bytes per pixel for the specified format.
* @repeat_mode: how request outside the buffer extent are handled.
* Valid values: GEGL_ABYSS_NONE_CLAMP, GEGL_ABYSS_NONE_LOOP,
* GEGL_ABYSS_NONE_BLACK, GEGL_ABYSS_NONE_WHITE, GEGL_ABYSS_NONE.
*
* Fetch a rectangular linear buffer of pixel data from the GeglBuffer, the
* data is converted to the desired BablFormat, if the BablFormat stored and
......@@ -237,7 +241,8 @@ void gegl_buffer_get (GeglBuffer *buffer,
gdouble scale,
const Babl *format,
gpointer dest,
gint rowstride);
gint rowstride,
GeglAbyssPolicy repeat_mode);
/**
* gegl_buffer_set:
......@@ -358,6 +363,9 @@ GeglBuffer * gegl_buffer_dup (GeglBuffer *buffer);
* to be ported from working code. Valid values: GEGL_SAMPLER_NEAREST,
* GEGL_SAMPLER_LINEAR, GEGL_SAMPLER_CUBIC,
* GEGL_SAMPLER_LANCZOS and GEGL_SAMPLER_LOHALO
* @repeat_mode: how request outside the buffer extent are handled.
* valid values: GEGL_ABYSS_NONE_CLAMP, GEGL_ABYSS_NONE_LOOP,
* GEGL_ABYSS_NONE_BLACK, GEGL_ABYSS_NONE_WHITE, GEGL_ABYSS_NONE.
*
* Query interpolate pixel values at a given coordinate using a specified form
* of interpolation. The samplers used cache for a small neighbourhood of the
......@@ -369,7 +377,8 @@ void gegl_buffer_sample (GeglBuffer *buffer,
GeglMatrix2 *scale,
gpointer dest,
const Babl *format,
GeglSamplerType sampler_type);
GeglSamplerType sampler_type,
GeglAbyssPolicy repeat_mode);
......@@ -419,6 +428,9 @@ GeglSampler * gegl_buffer_sampler_new (GeglBuffer *buffer,
* @y: y coordinate to sample
* @scale: matrix representing extent of sampling area in source buffer.
* @output: memory location for output data.
* @repeat_mode: how request outside the buffer extent are handled.
* valid values: GEGL_ABYSS_NONE_CLAMP, GEGL_ABYSS_NONE_LOOP,
* GEGL_ABYSS_NONE_BLACK, GEGL_ABYSS_NONE_WHITE, GEGL_ABYSS_NONE.
*
* Perform a sampling with the provided @sampler.
*/
......@@ -426,7 +438,8 @@ void gegl_sampler_get (GeglSampler *sampler,
gdouble x,
gdouble y,
GeglMatrix2 *scale,
void *output);
void *output,
GeglAbyssPolicy repeat_mode);
/**
* gegl_sampler_get_context_rect:
......
......@@ -120,7 +120,8 @@ gegl_sampler_get (GeglSampler *self,
gdouble x,
gdouble y,
GeglMatrix2 *scale,
void *output)
void *output,
GeglAbyssPolicy repeat_mode)
{
self->get (self, x, y, scale, output);
}
......@@ -281,7 +282,8 @@ gegl_sampler_get_ptr (GeglSampler *const sampler,
1.0,
sampler->interpolate_format,
sampler->sampler_buffer[0],
GEGL_AUTO_ROWSTRIDE);
GEGL_AUTO_ROWSTRIDE,
GEGL_ABYSS_NONE);
sampler->sampler_rectangle[0] = fetch_rectangle;
}
......@@ -355,7 +357,8 @@ gegl_sampler_get_from_buffer (GeglSampler *const sampler,
1.0,
sampler->interpolate_format,
sampler->sampler_buffer[0],
GEGL_AUTO_ROWSTRIDE);
GEGL_AUTO_ROWSTRIDE,
GEGL_ABYSS_NONE);
sampler->sampler_rectangle[0] = fetch_rectangle;
}
......@@ -450,7 +453,8 @@ gegl_sampler_get_from_mipmap (GeglSampler *const sampler,
scale,
sampler->interpolate_format,
sampler->sampler_buffer[level],
GEGL_AUTO_ROWSTRIDE);
GEGL_AUTO_ROWSTRIDE,
GEGL_ABYSS_NONE);
sampler->sampler_rectangle[level] = fetch_rectangle;
}
......
......@@ -86,7 +86,8 @@ void gegl_sampler_get (GeglSampler *self,
gdouble x,
gdouble y,
GeglMatrix2 *scale,
void *output);
void *output,
GeglAbyssPolicy repeat_mode);
gfloat * gegl_sampler_get_from_buffer (GeglSampler *sampler,
gint x,
......
......@@ -41,6 +41,12 @@ typedef enum {
GType gegl_sampler_type_get_type (void) G_GNUC_CONST;
#define GEGL_TYPE_SAMPLER_TYPE (gegl_sampler_type_get_type())
typedef enum {
GEGL_ABYSS_NONE
} GeglAbyssPolicy;
GType gegl_repeat_mode_get_type (void) G_GNUC_CONST;
#define GEGL_ABYSS_NONE_TYPE (gegl_repeat_mode_get_type())
/*
* Operation specific enum
*/
......
......@@ -896,7 +896,8 @@ static void spawnrender (gpointer data,
if ((buffer ) && td->destination_buf)
{
gegl_buffer_get (buffer, &td->roi, 1.0, td->format, td->destination_buf, td->rowstride);
gegl_buffer_get (buffer, &td->roi, 1.0, td->format, td->destination_buf, td->rowstride,
GEGL_ABYSS_NONE);
}
/* and unrefing to ultimately clean it off from the graph */
......@@ -1057,7 +1058,8 @@ gegl_node_blit (GeglNode *self,
if (destination_buf && cache)
{
gegl_buffer_get (GEGL_BUFFER (cache), roi, scale,
format, destination_buf, rowstride);
format, destination_buf, rowstride,
GEGL_ABYSS_NONE);
}
}
}
......
......@@ -767,7 +767,7 @@ gegl_affine_fast_reflect_x (GeglBuffer *dest,
gint i;
guchar *buf = (guchar *) g_malloc (src_rect->height * rowstride);
gegl_buffer_get (src, src_rect, 1.0, format, buf, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (src, src_rect, 1.0, format, buf, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
for (i = 0; i < src_rect->height / 2; i++)
{
......@@ -804,7 +804,7 @@ gegl_affine_fast_reflect_y (GeglBuffer *dest,
gint i;
guchar *buf = (guchar *) g_malloc (src_rect->height * rowstride);
gegl_buffer_get (src, src_rect, 1.0, format, buf, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (src, src_rect, 1.0, format, buf, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
for (i = 0; i < src_rect->height; i++)
{
......
......@@ -103,7 +103,8 @@ bilateral_filter (GeglBuffer *src,
src_buf = g_new0 (gfloat, src_rect->width * src_rect->height * 4);
dst_buf = g_new0 (gfloat, dst_rect->width * dst_rect->height * 4);
gegl_buffer_get (src, src_rect, 1.0, babl_format ("RGBA float"), src_buf, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (src, src_rect, 1.0, babl_format ("RGBA float"), src_buf, GEGL_AUTO_ROWSTRIDE,
GEGL_ABYSS_NONE);
offset = 0;
......
......@@ -135,7 +135,8 @@ hor_blur (GeglBuffer *src,
src_buf = g_new0 (gfloat, src_rect->width * src_rect->height * 4);
dst_buf = g_new0 (gfloat, dst_rect->width * dst_rect->height * 4);
gegl_buffer_get (src, src_rect, 1.0, babl_format ("RaGaBaA float"), src_buf, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (src, src_rect, 1.0, babl_format ("RaGaBaA float"), src_buf, GEGL_AUTO_ROWSTRIDE,
GEGL_ABYSS_NONE);
offset = 0;
for (v=0; v<dst_rect->height; v++)
......@@ -179,7 +180,8 @@ ver_blur (GeglBuffer *src,
src_buf = g_new0 (gfloat, src_rect->width * src_rect->height * 4);
dst_buf = g_new0 (gfloat, dst_rect->width * dst_rect->height * 4);
gegl_buffer_get (src, src_rect, 1.0, babl_format ("RaGaBaA float"), src_buf, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (src, src_rect, 1.0, babl_format ("RaGaBaA float"), src_buf, GEGL_AUTO_ROWSTRIDE,
GEGL_ABYSS_NONE);
offset=0;
for (v=0; v<dst_rect->height; v++)
......
......@@ -67,7 +67,8 @@ static void c2g (GeglBuffer *src,
src_buf = g_new0 (gfloat, src_rect->width * src_rect->height * 4);
dst_buf = g_new0 (gfloat, dst_rect->width * dst_rect->height * 2);
gegl_buffer_get (src, src_rect, 1.0, babl_format ("RGBA float"), src_buf, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (src, src_rect, 1.0, babl_format ("RGBA float"), src_buf, GEGL_AUTO_ROWSTRIDE,
GEGL_ABYSS_NONE);
for (y=radius; y<dst_rect->height+radius; y++)
{
......
......@@ -134,7 +134,8 @@ edge_laplace (GeglBuffer *src,
dst_buf = g_new0 (gfloat, dst_rect->width * dst_rect->height * 4);
gegl_buffer_get (src, src_rect, 1.0,
babl_format ("RGBA float"), src_buf, GEGL_AUTO_ROWSTRIDE);
babl_format ("RGBA float"), src_buf, GEGL_AUTO_ROWSTRIDE,
GEGL_ABYSS_NONE);
for (y=0; y<dst_rect->height; y++)
for (x=0; x<dst_rect->width; x++)
......
......@@ -108,7 +108,8 @@ edge_sobel (GeglBuffer *src,
src_buf = g_new0 (gfloat, src_rect->width * src_rect->height * 4);
dst_buf = g_new0 (gfloat, dst_rect->width * dst_rect->height * 4);
gegl_buffer_get (src, src_rect, 1.0, babl_format ("RGBA float"), src_buf, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (src, src_rect, 1.0, babl_format ("RGBA float"), src_buf, GEGL_AUTO_ROWSTRIDE,
GEGL_ABYSS_NONE);
offset = 0;
......
......@@ -956,7 +956,8 @@ gegl_expcombine_get_exposures (GeglOperation *operation,
full_roi->height *
components);
gegl_buffer_get (buffer, full_roi, 1.0, babl_format (PAD_FORMAT),
e->pixels[PIXELS_FULL], GEGL_AUTO_ROWSTRIDE);
e->pixels[PIXELS_FULL], GEGL_AUTO_ROWSTRIDE,
GEGL_ABYSS_NONE);
g_return_val_if_fail (scale <= 1.0f, NULL);
if (scale == 1.0f)
......@@ -968,7 +969,8 @@ gegl_expcombine_get_exposures (GeglOperation *operation,
scaled_roi->height *
components));
gegl_buffer_get (buffer, scaled_roi, scale, babl_format (PAD_FORMAT),
e->pixels[PIXELS_SCALED], GEGL_AUTO_ROWSTRIDE);
e->pixels[PIXELS_SCALED], GEGL_AUTO_ROWSTRIDE,
GEGL_ABYSS_NONE);
}
e->pixels[PIXELS_ACTIVE] = e->pixels[PIXELS_FULL];
......
......@@ -1277,11 +1277,11 @@ fattal02_process (GeglOperation *operation,
lum_out = g_new (gfloat, result->width * result->height);
gegl_buffer_get (input, result, 1.0, babl_format ("Y float"),
lum_in, GEGL_AUTO_ROWSTRIDE);
lum_in, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
pix = g_new (gfloat, result->width * result->height * pix_stride);
gegl_buffer_get (input, result, 1.0, babl_format (OUTPUT_FORMAT),
pix, GEGL_AUTO_ROWSTRIDE);
pix, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
fattal02_tonemap (lum_in, result, lum_out, o->alpha, o->beta, noise);
......
......@@ -162,7 +162,7 @@ iir_young_hor_blur (GeglBuffer *src,
w = g_new0 (gfloat, src_rect->width);
gegl_buffer_get (src, src_rect, 1.0, babl_format ("RaGaBaA float"),
buf, GEGL_AUTO_ROWSTRIDE);
buf, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
w_len = src_rect->width;
for (v=0; v<src_rect->height; v++)
......@@ -204,7 +204,7 @@ iir_young_ver_blur (GeglBuffer *src,
w = g_new0 (gfloat, src_rect->height);
gegl_buffer_get (src, src_rect, 1.0, babl_format ("RaGaBaA float"),
buf, GEGL_AUTO_ROWSTRIDE);
buf, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
w_len = src_rect->height;
for (u=0; u<dst_rect->width; u++)
......@@ -324,7 +324,7 @@ fir_hor_blur (GeglBuffer *src,
dst_buf = g_new0 (gfloat, dst_rect->height * dst_rect->width * 4);
gegl_buffer_get (src, src_rect, 1.0, babl_format ("RaGaBaA float"),
src_buf, GEGL_AUTO_ROWSTRIDE);
src_buf, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
offset = 0;
for (v=0; v<dst_rect->height; v++)
......@@ -369,7 +369,7 @@ fir_ver_blur (GeglBuffer *src,
dst_buf = g_new0 (gfloat, dst_rect->width * dst_rect->height * 4);
gegl_buffer_get (src, src_rect, 1.0, babl_format ("RaGaBaA float"),
src_buf, GEGL_AUTO_ROWSTRIDE);
src_buf, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
offset=0;
for (v=0; v< dst_rect->height; v++)
......
......@@ -1596,11 +1596,11 @@ mantiuk06_process (GeglOperation *operation,
/* Obtain the pixel data */
lum = g_new (gfloat, result->width * result->height),
gegl_buffer_get (input, result, 1.0, babl_format ("Y float"),
lum, GEGL_AUTO_ROWSTRIDE);
lum, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
pix = g_new (gfloat, result->width * result->height * pix_stride);
gegl_buffer_get (input, result, 1.0, babl_format (OUTPUT_FORMAT),
pix, GEGL_AUTO_ROWSTRIDE);
pix, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
mantiuk06_contmap (result->width, result->height, pix, lum,
o->contrast, o->saturation, FALSE, 200, 1e-3, NULL);
......
......@@ -404,8 +404,8 @@ matting_process (GeglOperation *operation,
trimap = g_new (guchar, w * h * COMPONENTS_AUX);
output = g_new0 (gfloat, w * h * COMPONENTS_OUTPUT);
gegl_buffer_get (input_buf, result, 1.0, babl_format (FORMAT_INPUT), input, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get ( aux_buf, result, 1.0, babl_format (FORMAT_AUX), trimap, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (input_buf, result, 1.0, babl_format (FORMAT_INPUT), input, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
gegl_buffer_get ( aux_buf, result, 1.0, babl_format (FORMAT_AUX), trimap, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
foreground_samples = g_array_new(FALSE, FALSE, sizeof(ColorSample));
background_samples = g_array_new(FALSE, FALSE, sizeof(ColorSample));
......
......@@ -84,8 +84,8 @@ process (GeglOperation *operation,
gfloat *acc = g_new (gfloat, pixels * 4);
gfloat dampness;
gint i;
gegl_buffer_get (p->acc, result, 1.0, babl_format ("RGBA float"), acc, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (temp_in, result, 1.0, babl_format ("RGBA float"), buf, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (p->acc, result, 1.0, babl_format ("RGBA float"), acc, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
gegl_buffer_get (temp_in, result, 1.0, babl_format ("RGBA float"), buf, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
dampness = o->dampness;
for (i=0;i<pixels;i++)
{
......
......@@ -234,7 +234,7 @@ apply_mirror (double mirror_angle,
#ifndef DO_NOT_USE_BUFFER_SAMPLE
gegl_buffer_sample (src, cx, cy, NULL, &dst_buf[(row * roi->width + col) * 4], format, GEGL_SAMPLER_LINEAR);
gegl_buffer_sample (src, cx, cy, NULL, &dst_buf[(row * roi->width + col) * 4], format, GEGL_SAMPLER_LINEAR, GEGL_ABYSS_NONE);
#endif
#ifdef DO_NOT_USE_BUFFER_SAMPLE
......
......@@ -64,7 +64,7 @@ process (GeglOperation *operation,
in_buf = g_new (gfloat, 4 * num_pixels);
out_buf = g_new (gfloat, 2 * num_pixels);
gegl_buffer_get (input, result, 1.0, babl_format ("RGBA float"), in_buf, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (input, result, 1.0, babl_format ("RGBA float"), in_buf, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
in_pixel = in_buf;
out_pixel = out_buf;
......
......@@ -101,7 +101,7 @@ process (GeglOperation *operation,
out_buf = g_new0 (gfloat, roi->width * roi->height * 4);
out_pixel = out_buf;
gegl_buffer_get (input, &src_rect, 1.0, babl_format ("RaGaBaA float"), in_buf, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (input, &src_rect, 1.0, babl_format ("RaGaBaA float"), in_buf, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
for (y=0; y<roi->height; ++y)
{
......
......@@ -178,7 +178,7 @@ process (GeglOperation *operation,
rect.width += o->iterations*2;
rect.height += o->iterations*2;
gegl_buffer_get (input, &rect, 1.0, babl_format ("R'G'B'A float"),
src_buf, stride * 4 * 4);
src_buf, stride * 4 * 4, GEGL_ABYSS_NONE);
}
for (iteration = 0; iteration < o->iterations; iteration++)
......
......@@ -151,7 +151,7 @@ process (GeglOperation *operation,
buf = g_new0 (gfloat, src_rect.width * src_rect.height * 4);
gegl_buffer_get (input, &src_rect, 1.0, babl_format ("RaGaBaA float"), buf, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (input, &src_rect, 1.0, babl_format ("RaGaBaA float"), buf, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
pixelise(buf, roi, o->xsize, o->ysize);
......
......@@ -159,11 +159,11 @@ reinhard05_process (GeglOperation *operation,
/* Obtain the pixel data */
lum = g_new (gfloat, result->width * result->height),
gegl_buffer_get (input, result, 1.0, babl_format ("Y float"),
lum, GEGL_AUTO_ROWSTRIDE);
lum, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
pix = g_new (gfloat, result->width * result->height * pix_stride);
gegl_buffer_get (input, result, 1.0, babl_format (OUTPUT_FORMAT),
pix, GEGL_AUTO_ROWSTRIDE);
pix, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
/* Collect the image stats, averages, etc */
reinhard05_stats_start (&world_lin);
......
......@@ -123,7 +123,7 @@ snn_mean (GeglBuffer *src,
src_buf = g_new0 (gfloat, gegl_buffer_get_pixel_count (src) * 4);
dst_buf = g_new0 (gfloat, dst_rect->width * dst_rect->height * 4);
gegl_buffer_get (src, NULL, 1.0, babl_format ("RGBA float"), src_buf, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (src, NULL, 1.0, babl_format ("RGBA float"), src_buf, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
offset = 0;
......
......@@ -79,7 +79,7 @@ static void stress (GeglBuffer *src,
src_buf = g_new0 (gfloat, src_rect->width * src_rect->height * 4);
dst_buf = g_new0 (gfloat, dst_rect->width * dst_rect->height * 4);
gegl_buffer_get (src, src_rect, 1.0, babl_format ("RGBA float"), src_buf, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (src, src_rect, 1.0, babl_format ("RGBA float"), src_buf, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
for (y=radius; y<dst_rect->height+radius; y++)
{
......
......@@ -61,7 +61,7 @@ buffer_get_min_max (GeglBuffer *buffer,
gfloat *buf = g_new0 (gfloat, 4 * gegl_buffer_get_pixel_count (buffer));
gint i;
gegl_buffer_get (buffer, NULL, 1.0, babl_format ("RGBA float"), buf, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (buffer, NULL, 1.0, babl_format ("RGBA float"), buf, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
for (i=0;i< gegl_buffer_get_pixel_count (buffer);i++)
{
gint component;
......@@ -125,7 +125,7 @@ process (GeglOperation *operation,
line.width = result->width;
line.height = chunk;
gegl_buffer_get (input, &line, 1.0, babl_format ("RGBA float"), buf, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (input, &line, 1.0, babl_format ("RGBA float"), buf, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
inner_process (min, max, buf, result->width * chunk, level);
gegl_buffer_set (output, &line, 0, babl_format ("RGBA float"), buf,
GEGL_AUTO_ROWSTRIDE);
......
......@@ -236,7 +236,8 @@ fix_saturation (GeglBuffer *buf,
for (y=0; y<2; y++)
{
gegl_rectangle_set (&rect, 0,y, gegl_buffer_get_width (buf), 1);
gegl_buffer_get (buf, &rect, 1.0, NULL, row[y+1], GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (buf, &rect, 1.0, NULL, row[y+1], GEGL_AUTO_ROWSTRIDE,
GEGL_ABYSS_NONE);
}
fix_saturation_row (row[1], row[1], row[2], yw, gegl_buffer_get_width (buf), nc);
......@@ -250,7 +251,8 @@ fix_saturation (GeglBuffer *buf,
}
gegl_rectangle_set (&rect, 0,y+1, gegl_buffer_get_width (buf), 1);
gegl_buffer_get (buf, &rect, 1.0, NULL, row[0], GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (buf, &rect, 1.0, NULL, row[0], GEGL_AUTO_ROWSTRIDE,
GEGL_ABYSS_NONE);
tmp = row[0];
row[0] = row[1];
......@@ -331,7 +333,8 @@ reconstruct_chroma (GeglBuffer *buf,
for (i=0; i<gegl_buffer_get_height (buf); i+=2)
{
gegl_rectangle_set (&rect, 0, i, gegl_buffer_get_width (buf), 1);
gegl_buffer_get (buf, &rect, 1.0, NULL, pixels, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (buf, &rect, 1.0, NULL, pixels, GEGL_AUTO_ROWSTRIDE,
GEGL_ABYSS_NONE);
reconstruct_chroma_row (pixels, gegl_buffer_get_width (buf), has_alpha, tmp);
gegl_buffer_set (buf, &rect, 0, NULL, pixels, GEGL_AUTO_ROWSTRIDE);
......@@ -340,7 +343,8 @@ reconstruct_chroma (GeglBuffer *buf,
for (i=0; i<gegl_buffer_get_width (buf); i++)
{
gegl_rectangle_set (&rect, i, 0, 1, gegl_buffer_get_height (buf));
gegl_buffer_get (buf, &rect, 1.0, NULL, pixels, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (buf, &rect, 1.0, NULL, pixels, GEGL_AUTO_ROWSTRIDE,
GEGL_ABYSS_NONE);
reconstruct_chroma_row (pixels, gegl_buffer_get_height (buf), has_alpha, tmp);
gegl_buffer_set (buf, &rect, 0, NULL, pixels, GEGL_AUTO_ROWSTRIDE);
......@@ -368,7 +372,8 @@ convert_yca_to_rgba (GeglBuffer *buf,
for (row=0; row<gegl_buffer_get_height (buf); row++)
{
gegl_rectangle_set (&rect, 0, row, gegl_buffer_get_width (buf), 1);
gegl_buffer_get (buf, &rect, 1.0, NULL, pixels, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (buf, &rect, 1.0, NULL, pixels, GEGL_AUTO_ROWSTRIDE,
GEGL_ABYSS_NONE);
pxl = (gfloat*) pixels;
for (i=0; i<gegl_buffer_get_width (buf); i++)
......
......@@ -213,7 +213,7 @@ gegl_exr_save_process (GeglOperation *operation,
return FALSE;
}
gegl_buffer_get (input, rect, 1.0, babl_format (output_format.c_str ()),
pixels, GEGL_AUTO_ROWSTRIDE);
pixels, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
bool status;
try
{
......
......@@ -140,7 +140,8 @@ gegl_buffer_export_jpg (GeglBuffer *gegl_buffer,
rect.height = 1;
gegl_buffer_get (gegl_buffer, &rect, 1.0, format,
row_pointer[0], GEGL_AUTO_ROWSTRIDE);
row_pointer[0], GEGL_AUTO_ROWSTRIDE,
GEGL_ABYSS_NONE);
jpeg_write_scanlines (&cinfo, row_pointer, 1);
}
......
......@@ -228,7 +228,7 @@ gegl_buffer_import_png (GeglBuffer *gegl_buffer,
gegl_rectangle_set (&rect, 0, i, width, 1);
if (pass != 0)
gegl_buffer_get (gegl_buffer, &rect, 1.0, format, pixels, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (gegl_buffer, &rect, 1.0, format, pixels, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
png_read_rows (load_png_ptr, &pixels, NULL, 1);
gegl_buffer_set (gegl_buffer, &rect, 0, format, pixels,
......
......@@ -183,7 +183,7 @@ gegl_buffer_export_png (GeglBuffer *gegl_buffer,
rect.width = width;
rect.height = 1;
gegl_buffer_get (gegl_buffer, &rect, 1.0, babl_format (format_string), pixels, GEGL_AUTO_ROWSTRIDE);
gegl_buffer_get (gegl_buffer, &rect, 1.0, babl_format (format_string), pixels, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);