buffer: add abyss policy API

parent 2a8ef46d
...@@ -1067,7 +1067,8 @@ gegl_buffer_get (GeglBuffer *buffer, ...@@ -1067,7 +1067,8 @@ gegl_buffer_get (GeglBuffer *buffer,
gdouble scale, gdouble scale,
const Babl *format, const Babl *format,
gpointer dest_buf, gpointer dest_buf,
gint rowstride) gint rowstride,
GeglAbyssPolicy repeat_mode)
{ {
g_return_if_fail (GEGL_IS_BUFFER (buffer)); g_return_if_fail (GEGL_IS_BUFFER (buffer));
gegl_buffer_get_unlocked (buffer, scale, rect, format, dest_buf, rowstride); gegl_buffer_get_unlocked (buffer, scale, rect, format, dest_buf, rowstride);
...@@ -1091,7 +1092,8 @@ gegl_buffer_sample (GeglBuffer *buffer, ...@@ -1091,7 +1092,8 @@ gegl_buffer_sample (GeglBuffer *buffer,
GeglMatrix2 *scale, GeglMatrix2 *scale,
gpointer dest, gpointer dest,
const Babl *format, const Babl *format,
GeglSamplerType sampler_type) GeglSamplerType sampler_type,
GeglAbyssPolicy repeat_mode)
{ {
GType desired_type; GType desired_type;
g_return_if_fail (GEGL_IS_BUFFER (buffer)); g_return_if_fail (GEGL_IS_BUFFER (buffer));
...@@ -1125,7 +1127,7 @@ gegl_buffer_sample (GeglBuffer *buffer, ...@@ -1125,7 +1127,7 @@ gegl_buffer_sample (GeglBuffer *buffer,
gegl_sampler_prepare (buffer->sampler); 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 void
......
...@@ -276,7 +276,8 @@ gegl_buffer_cl_cache_from (GeglBuffer *buffer, ...@@ -276,7 +276,8 @@ gegl_buffer_cl_cache_from (GeglBuffer *buffer,
1.0, 1.0,
format, format,
dest_buf, dest_buf,
rowstride); rowstride,
GEGL_ABYSS_NONE);
return TRUE; return TRUE;
} }
} }
...@@ -325,7 +326,8 @@ gegl_buffer_cl_cache_from (GeglBuffer *buffer, ...@@ -325,7 +326,8 @@ gegl_buffer_cl_cache_from (GeglBuffer *buffer,
1.0, 1.0,
format, format,
dest_buf, dest_buf,
rowstride); rowstride,
GEGL_ABYSS_NONE);
if (tex_dest) gegl_clReleaseMemObject (tex_dest); if (tex_dest) gegl_clReleaseMemObject (tex_dest);
......
...@@ -349,7 +349,7 @@ gegl_buffer_cl_iterator_next (GeglBufferClIterator *iterator, gboolean *err) ...@@ -349,7 +349,7 @@ gegl_buffer_cl_iterator_next (GeglBufferClIterator *iterator, gboolean *err)
if (cl_err != CL_SUCCESS) CL_ERROR; if (cl_err != CL_SUCCESS) CL_ERROR;
/* color conversion using BABL */ /* 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, cl_err = gegl_clEnqueueUnmapMemObject (gegl_cl_get_command_queue(), i->tex_op[no][j], data,
0, NULL, NULL); 0, NULL, NULL);
...@@ -384,7 +384,7 @@ gegl_buffer_cl_iterator_next (GeglBufferClIterator *iterator, gboolean *err) ...@@ -384,7 +384,7 @@ gegl_buffer_cl_iterator_next (GeglBufferClIterator *iterator, gboolean *err)
if (cl_err != CL_SUCCESS) CL_ERROR; if (cl_err != CL_SUCCESS) CL_ERROR;
/* color conversion will be performed in the GPU later */ /* 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, cl_err = gegl_clEnqueueUnmapMemObject (gegl_cl_get_command_queue(), i->tex_buf[no][j], data,
0, NULL, NULL); 0, NULL, NULL);
...@@ -420,7 +420,7 @@ gegl_buffer_cl_iterator_next (GeglBufferClIterator *iterator, gboolean *err) ...@@ -420,7 +420,7 @@ gegl_buffer_cl_iterator_next (GeglBufferClIterator *iterator, gboolean *err)
if (cl_err != CL_SUCCESS) CL_ERROR; if (cl_err != CL_SUCCESS) CL_ERROR;
/* color conversion will be performed in the GPU later */ /* 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, cl_err = gegl_clEnqueueUnmapMemObject (gegl_cl_get_command_queue(), i->tex_buf[no][j], data,
0, NULL, NULL); 0, NULL, NULL);
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <glib-object.h> #include <glib-object.h>
#include <babl/babl.h> #include <babl/babl.h>
#include <gegl-matrix.h> #include <gegl-matrix.h>
#include <gegl-enums.h>
G_BEGIN_DECLS G_BEGIN_DECLS
...@@ -226,6 +227,9 @@ gboolean gegl_buffer_set_extent (GeglBuffer *buffer, ...@@ -226,6 +227,9 @@ gboolean gegl_buffer_set_extent (GeglBuffer *buffer,
* depends on the requested BablFormat. * depends on the requested BablFormat.
* @rowstride: rowstride in bytes, or GEGL_AUTO_ROWSTRIDE to compute the * @rowstride: rowstride in bytes, or GEGL_AUTO_ROWSTRIDE to compute the
* rowstride based on the width and bytes per pixel for the specified format. * 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 * Fetch a rectangular linear buffer of pixel data from the GeglBuffer, the
* data is converted to the desired BablFormat, if the BablFormat stored and * data is converted to the desired BablFormat, if the BablFormat stored and
...@@ -237,7 +241,8 @@ void gegl_buffer_get (GeglBuffer *buffer, ...@@ -237,7 +241,8 @@ void gegl_buffer_get (GeglBuffer *buffer,
gdouble scale, gdouble scale,
const Babl *format, const Babl *format,
gpointer dest, gpointer dest,
gint rowstride); gint rowstride,
GeglAbyssPolicy repeat_mode);
/** /**
* gegl_buffer_set: * gegl_buffer_set:
...@@ -358,6 +363,9 @@ GeglBuffer * gegl_buffer_dup (GeglBuffer *buffer); ...@@ -358,6 +363,9 @@ GeglBuffer * gegl_buffer_dup (GeglBuffer *buffer);
* to be ported from working code. Valid values: GEGL_SAMPLER_NEAREST, * to be ported from working code. Valid values: GEGL_SAMPLER_NEAREST,
* GEGL_SAMPLER_LINEAR, GEGL_SAMPLER_CUBIC, * GEGL_SAMPLER_LINEAR, GEGL_SAMPLER_CUBIC,
* GEGL_SAMPLER_LANCZOS and GEGL_SAMPLER_LOHALO * 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 * Query interpolate pixel values at a given coordinate using a specified form
* of interpolation. The samplers used cache for a small neighbourhood of the * of interpolation. The samplers used cache for a small neighbourhood of the
...@@ -369,7 +377,8 @@ void gegl_buffer_sample (GeglBuffer *buffer, ...@@ -369,7 +377,8 @@ void gegl_buffer_sample (GeglBuffer *buffer,
GeglMatrix2 *scale, GeglMatrix2 *scale,
gpointer dest, gpointer dest,
const Babl *format, const Babl *format,
GeglSamplerType sampler_type); GeglSamplerType sampler_type,
GeglAbyssPolicy repeat_mode);
...@@ -419,14 +428,18 @@ GeglSampler * gegl_buffer_sampler_new (GeglBuffer *buffer, ...@@ -419,14 +428,18 @@ GeglSampler * gegl_buffer_sampler_new (GeglBuffer *buffer,
* @y: y coordinate to sample * @y: y coordinate to sample
* @scale: matrix representing extent of sampling area in source buffer. * @scale: matrix representing extent of sampling area in source buffer.
* @output: memory location for output data. * @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. * Perform a sampling with the provided @sampler.
*/ */
void gegl_sampler_get (GeglSampler *sampler, void gegl_sampler_get (GeglSampler *sampler,
gdouble x, gdouble x,
gdouble y, gdouble y,
GeglMatrix2 *scale, GeglMatrix2 *scale,
void *output); void *output,
GeglAbyssPolicy repeat_mode);
/** /**
* gegl_sampler_get_context_rect: * gegl_sampler_get_context_rect:
......
...@@ -116,11 +116,12 @@ gegl_sampler_init (GeglSampler *self) ...@@ -116,11 +116,12 @@ gegl_sampler_init (GeglSampler *self)
} }
void void
gegl_sampler_get (GeglSampler *self, gegl_sampler_get (GeglSampler *self,
gdouble x, gdouble x,
gdouble y, gdouble y,
GeglMatrix2 *scale, GeglMatrix2 *scale,
void *output) void *output,
GeglAbyssPolicy repeat_mode)
{ {
self->get (self, x, y, scale, output); self->get (self, x, y, scale, output);
} }
...@@ -281,7 +282,8 @@ gegl_sampler_get_ptr (GeglSampler *const sampler, ...@@ -281,7 +282,8 @@ gegl_sampler_get_ptr (GeglSampler *const sampler,
1.0, 1.0,
sampler->interpolate_format, sampler->interpolate_format,
sampler->sampler_buffer[0], sampler->sampler_buffer[0],
GEGL_AUTO_ROWSTRIDE); GEGL_AUTO_ROWSTRIDE,
GEGL_ABYSS_NONE);
sampler->sampler_rectangle[0] = fetch_rectangle; sampler->sampler_rectangle[0] = fetch_rectangle;
} }
...@@ -355,7 +357,8 @@ gegl_sampler_get_from_buffer (GeglSampler *const sampler, ...@@ -355,7 +357,8 @@ gegl_sampler_get_from_buffer (GeglSampler *const sampler,
1.0, 1.0,
sampler->interpolate_format, sampler->interpolate_format,
sampler->sampler_buffer[0], sampler->sampler_buffer[0],
GEGL_AUTO_ROWSTRIDE); GEGL_AUTO_ROWSTRIDE,
GEGL_ABYSS_NONE);
sampler->sampler_rectangle[0] = fetch_rectangle; sampler->sampler_rectangle[0] = fetch_rectangle;
} }
...@@ -450,7 +453,8 @@ gegl_sampler_get_from_mipmap (GeglSampler *const sampler, ...@@ -450,7 +453,8 @@ gegl_sampler_get_from_mipmap (GeglSampler *const sampler,
scale, scale,
sampler->interpolate_format, sampler->interpolate_format,
sampler->sampler_buffer[level], sampler->sampler_buffer[level],
GEGL_AUTO_ROWSTRIDE); GEGL_AUTO_ROWSTRIDE,
GEGL_ABYSS_NONE);
sampler->sampler_rectangle[level] = fetch_rectangle; sampler->sampler_rectangle[level] = fetch_rectangle;
} }
......
...@@ -82,11 +82,12 @@ void gegl_sampler_prepare (GeglSampler *self); ...@@ -82,11 +82,12 @@ void gegl_sampler_prepare (GeglSampler *self);
void gegl_sampler_set_buffer (GeglSampler *self, void gegl_sampler_set_buffer (GeglSampler *self,
GeglBuffer *buffer); GeglBuffer *buffer);
void gegl_sampler_get (GeglSampler *self, void gegl_sampler_get (GeglSampler *self,
gdouble x, gdouble x,
gdouble y, gdouble y,
GeglMatrix2 *scale, GeglMatrix2 *scale,
void *output); void *output,
GeglAbyssPolicy repeat_mode);
gfloat * gegl_sampler_get_from_buffer (GeglSampler *sampler, gfloat * gegl_sampler_get_from_buffer (GeglSampler *sampler,
gint x, gint x,
......
...@@ -41,6 +41,12 @@ typedef enum { ...@@ -41,6 +41,12 @@ typedef enum {
GType gegl_sampler_type_get_type (void) G_GNUC_CONST; GType gegl_sampler_type_get_type (void) G_GNUC_CONST;
#define GEGL_TYPE_SAMPLER_TYPE (gegl_sampler_type_get_type()) #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 * Operation specific enum
*/ */
......
...@@ -896,7 +896,8 @@ static void spawnrender (gpointer data, ...@@ -896,7 +896,8 @@ static void spawnrender (gpointer data,
if ((buffer ) && td->destination_buf) 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 */ /* and unrefing to ultimately clean it off from the graph */
...@@ -1057,7 +1058,8 @@ gegl_node_blit (GeglNode *self, ...@@ -1057,7 +1058,8 @@ gegl_node_blit (GeglNode *self,
if (destination_buf && cache) if (destination_buf && cache)
{ {
gegl_buffer_get (GEGL_BUFFER (cache), roi, scale, 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, ...@@ -767,7 +767,7 @@ gegl_affine_fast_reflect_x (GeglBuffer *dest,
gint i; gint i;
guchar *buf = (guchar *) g_malloc (src_rect->height * rowstride); 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++) for (i = 0; i < src_rect->height / 2; i++)
{ {
...@@ -804,7 +804,7 @@ gegl_affine_fast_reflect_y (GeglBuffer *dest, ...@@ -804,7 +804,7 @@ gegl_affine_fast_reflect_y (GeglBuffer *dest,
gint i; gint i;
guchar *buf = (guchar *) g_malloc (src_rect->height * rowstride); 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++) for (i = 0; i < src_rect->height; i++)
{ {
......
...@@ -103,7 +103,8 @@ bilateral_filter (GeglBuffer *src, ...@@ -103,7 +103,8 @@ bilateral_filter (GeglBuffer *src,
src_buf = g_new0 (gfloat, src_rect->width * src_rect->height * 4); src_buf = g_new0 (gfloat, src_rect->width * src_rect->height * 4);
dst_buf = g_new0 (gfloat, dst_rect->width * dst_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; offset = 0;
......
...@@ -135,7 +135,8 @@ hor_blur (GeglBuffer *src, ...@@ -135,7 +135,8 @@ hor_blur (GeglBuffer *src,
src_buf = g_new0 (gfloat, src_rect->width * src_rect->height * 4); src_buf = g_new0 (gfloat, src_rect->width * src_rect->height * 4);
dst_buf = g_new0 (gfloat, dst_rect->width * dst_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; offset = 0;
for (v=0; v<dst_rect->height; v++) for (v=0; v<dst_rect->height; v++)
...@@ -179,7 +180,8 @@ ver_blur (GeglBuffer *src, ...@@ -179,7 +180,8 @@ ver_blur (GeglBuffer *src,
src_buf = g_new0 (gfloat, src_rect->width * src_rect->height * 4); src_buf = g_new0 (gfloat, src_rect->width * src_rect->height * 4);
dst_buf = g_new0 (gfloat, dst_rect->width * dst_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; offset=0;
for (v=0; v<dst_rect->height; v++) for (v=0; v<dst_rect->height; v++)
......
...@@ -67,7 +67,8 @@ static void c2g (GeglBuffer *src, ...@@ -67,7 +67,8 @@ static void c2g (GeglBuffer *src,
src_buf = g_new0 (gfloat, src_rect->width * src_rect->height * 4); src_buf = g_new0 (gfloat, src_rect->width * src_rect->height * 4);
dst_buf = g_new0 (gfloat, dst_rect->width * dst_rect->height * 2); 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++) for (y=radius; y<dst_rect->height+radius; y++)
{ {
......
...@@ -134,7 +134,8 @@ edge_laplace (GeglBuffer *src, ...@@ -134,7 +134,8 @@ edge_laplace (GeglBuffer *src,
dst_buf = g_new0 (gfloat, dst_rect->width * dst_rect->height * 4); dst_buf = g_new0 (gfloat, dst_rect->width * dst_rect->height * 4);
gegl_buffer_get (src, src_rect, 1.0, 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 (y=0; y<dst_rect->height; y++)
for (x=0; x<dst_rect->width; x++) for (x=0; x<dst_rect->width; x++)
......
...@@ -108,7 +108,8 @@ edge_sobel (GeglBuffer *src, ...@@ -108,7 +108,8 @@ edge_sobel (GeglBuffer *src,
src_buf = g_new0 (gfloat, src_rect->width * src_rect->height * 4); src_buf = g_new0 (gfloat, src_rect->width * src_rect->height * 4);
dst_buf = g_new0 (gfloat, dst_rect->width * dst_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; offset = 0;
......
...@@ -956,7 +956,8 @@ gegl_expcombine_get_exposures (GeglOperation *operation, ...@@ -956,7 +956,8 @@ gegl_expcombine_get_exposures (GeglOperation *operation,
full_roi->height * full_roi->height *
components); components);
gegl_buffer_get (buffer, full_roi, 1.0, babl_format (PAD_FORMAT), 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); g_return_val_if_fail (scale <= 1.0f, NULL);
if (scale == 1.0f) if (scale == 1.0f)
...@@ -968,7 +969,8 @@ gegl_expcombine_get_exposures (GeglOperation *operation, ...@@ -968,7 +969,8 @@ gegl_expcombine_get_exposures (GeglOperation *operation,
scaled_roi->height * scaled_roi->height *
components)); components));
gegl_buffer_get (buffer, scaled_roi, scale, babl_format (PAD_FORMAT), 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]; e->pixels[PIXELS_ACTIVE] = e->pixels[PIXELS_FULL];
......
...@@ -1277,11 +1277,11 @@ fattal02_process (GeglOperation *operation, ...@@ -1277,11 +1277,11 @@ fattal02_process (GeglOperation *operation,
lum_out = g_new (gfloat, result->width * result->height); lum_out = g_new (gfloat, result->width * result->height);
gegl_buffer_get (input, result, 1.0, babl_format ("Y float"), 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); pix = g_new (gfloat, result->width * result->height * pix_stride);
gegl_buffer_get (input, result, 1.0, babl_format (OUTPUT_FORMAT), 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); fattal02_tonemap (lum_in, result, lum_out, o->alpha, o->beta, noise);
......
...@@ -162,7 +162,7 @@ iir_young_hor_blur (GeglBuffer *src, ...@@ -162,7 +162,7 @@ iir_young_hor_blur (GeglBuffer *src,
w = g_new0 (gfloat, src_rect->width); w = g_new0 (gfloat, src_rect->width);
gegl_buffer_get (src, src_rect, 1.0, babl_format ("RaGaBaA float"), 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; w_len = src_rect->width;
for (v=0; v<src_rect->height; v++) for (v=0; v<src_rect->height; v++)
...@@ -204,7 +204,7 @@ iir_young_ver_blur (GeglBuffer *src, ...@@ -204,7 +204,7 @@ iir_young_ver_blur (GeglBuffer *src,
w = g_new0 (gfloat, src_rect->height); w = g_new0 (gfloat, src_rect->height);
gegl_buffer_get (src, src_rect, 1.0, babl_format ("RaGaBaA float"), 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; w_len = src_rect->height;
for (u=0; u<dst_rect->width; u++) for (u=0; u<dst_rect->width; u++)
...@@ -324,7 +324,7 @@ fir_hor_blur (GeglBuffer *src, ...@@ -324,7 +324,7 @@ fir_hor_blur (GeglBuffer *src,
dst_buf = g_new0 (gfloat, dst_rect->height * dst_rect->width * 4); dst_buf = g_new0 (gfloat, dst_rect->height * dst_rect->width * 4);
gegl_buffer_get (src, src_rect, 1.0, babl_format ("RaGaBaA float"), 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; offset = 0;
for (v=0; v<dst_rect->height; v++) for (v=0; v<dst_rect->height; v++)
...@@ -369,7 +369,7 @@ fir_ver_blur (GeglBuffer *src, ...@@ -369,7 +369,7 @@ fir_ver_blur (GeglBuffer *src,
dst_buf = g_new0 (gfloat, dst_rect->width * dst_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"), 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; offset=0;
for (v=0; v< dst_rect->height; v++) for (v=0; v< dst_rect->height; v++)
......
...@@ -1596,11 +1596,11 @@ mantiuk06_process (GeglOperation *operation, ...@@ -1596,11 +1596,11 @@ mantiuk06_process (GeglOperation *operation,
/* Obtain the pixel data */ /* Obtain the pixel data */
lum = g_new (gfloat, result->width * result->height), lum = g_new (gfloat, result->width * result->height),
gegl_buffer_get (input, result, 1.0, babl_format ("Y float"), 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); pix = g_new (gfloat, result->width * result->height * pix_stride);
gegl_buffer_get (input, result, 1.0, babl_format (OUTPUT_FORMAT), 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, mantiuk06_contmap (result->width, result->height, pix, lum,
o->contrast, o->saturation, FALSE, 200, 1e-3, NULL); o->contrast, o->saturation, FALSE, 200, 1e-3, NULL);
......
...@@ -404,8 +404,8 @@ matting_process (GeglOperation *operation, ...@@ -404,8 +404,8 @@ matting_process (GeglOperation *operation,
trimap = g_new (guchar, w * h * COMPONENTS_AUX); trimap = g_new (guchar, w * h * COMPONENTS_AUX);
output = g_new0 (gfloat, w * h * COMPONENTS_OUTPUT); output = g_new0 (gfloat, w * h * COMPONENTS_OUTPUT);