[gegl] motion-blur-zoom: propagate space
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] motion-blur-zoom: propagate space
- Date: Fri, 6 Jul 2018 10:17:59 +0000 (UTC)
commit 232c785d1f7136f83a267815ebec3a71b4453830
Author: Øyvind Kolås <pippin gimp org>
Date: Fri Jul 6 12:06:27 2018 +0200
motion-blur-zoom: propagate space
operations/common-gpl3+/motion-blur-zoom.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/operations/common-gpl3+/motion-blur-zoom.c b/operations/common-gpl3+/motion-blur-zoom.c
index bb4ce2abe..e926c797f 100644
--- a/operations/common-gpl3+/motion-blur-zoom.c
+++ b/operations/common-gpl3+/motion-blur-zoom.c
@@ -71,6 +71,7 @@ prepare (GeglOperation *operation)
GeglOperationAreaFilter *op_area = GEGL_OPERATION_AREA_FILTER (operation);
GeglProperties *o = GEGL_PROPERTIES (operation);
GeglRectangle *whole_region;
+ const Babl *space = gegl_operation_get_source_space (operation, "input");
whole_region = gegl_operation_source_get_bounding_box (operation, "input");
@@ -99,8 +100,8 @@ prepare (GeglOperation *operation)
op_area->bottom = 0;
}
- gegl_operation_set_format (operation, "input", babl_format ("RaGaBaA float"));
- gegl_operation_set_format (operation, "output", babl_format ("RaGaBaA float"));
+ gegl_operation_set_format (operation, "input", babl_format_with_space ("RaGaBaA float", space));
+ gegl_operation_set_format (operation, "output", babl_format_with_space ("RaGaBaA float", space));
}
static inline gfloat *
@@ -127,6 +128,7 @@ process (GeglOperation *operation,
gint level)
{
GeglOperationAreaFilter *op_area = GEGL_OPERATION_AREA_FILTER (operation);
+ const Babl *format = gegl_operation_get_format (operation, "output");
GeglProperties *o = GEGL_PROPERTIES (operation);
gfloat *in_buf, *out_buf, *out_pixel;
gint x, y;
@@ -151,7 +153,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"),
+ gegl_buffer_get (input, &src_rect, 1.0, format,
in_buf, GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
for (y = roi->y; y < roi->height + roi->y; ++y)
@@ -216,8 +218,7 @@ process (GeglOperation *operation,
}
}
- gegl_buffer_set (output, roi, 0, babl_format ("RaGaBaA float"),
- out_buf, GEGL_AUTO_ROWSTRIDE);
+ gegl_buffer_set (output, roi, 0, format, out_buf, GEGL_AUTO_ROWSTRIDE);
g_free (in_buf);
g_free (out_buf);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]