[gegl] gegl: 2x2 down generic, keep fish around between rows
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gegl: 2x2 down generic, keep fish around between rows
- Date: Thu, 11 May 2017 17:19:09 +0000 (UTC)
commit 729499c5b1808f7cbe6184980789268068296d79
Author: Øyvind Kolås <pippin gimp org>
Date: Thu May 11 19:18:35 2017 +0200
gegl: 2x2 down generic, keep fish around between rows
gegl/gegl-algorithms.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/gegl/gegl-algorithms.c b/gegl/gegl-algorithms.c
index fe712bb..de60929 100644
--- a/gegl/gegl-algorithms.c
+++ b/gegl/gegl-algorithms.c
@@ -79,8 +79,9 @@ gegl_downscale_2x2_generic (const Babl *format,
{
gint y;
const Babl *tmp_format = gegl_babl_rgbA_linear_float ();
- void *in_tmp = gegl_malloc (src_height * src_rowstride * 4 * 4);
- void *out_tmp = gegl_malloc (src_height * src_rowstride * 4 * 4);
+ const Babl *to_fish = babl_fish (tmp_format, format);
+ void *in_tmp = gegl_malloc (src_height * src_rowstride * 4 * 4);
+ void *out_tmp = gegl_malloc (src_height * src_rowstride * 4 * 4);
guchar *src = out_tmp;
guchar *dst = dst_data;
@@ -91,9 +92,7 @@ gegl_downscale_2x2_generic (const Babl *format,
out_tmp, src_width * 4 * 4);
for (y = 0; y < src_height / 2; y++)
{
- babl_process (babl_fish (tmp_format, format),
- src, dst, src_width / 2);
-
+ babl_process (to_fish, src, dst, src_width / 2);
dst += dst_rowstride;
src += (src_width * 4 * 4);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]