[gegl] Partially revert "buffer: fix source rect passed to gegl_resample_{linear, boxfilter}()"
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] Partially revert "buffer: fix source rect passed to gegl_resample_{linear, boxfilter}()"
- Date: Mon, 22 Oct 2018 15:57:43 +0000 (UTC)
commit 222068b408660013fb89eda366f249eefb028e46
Author: Ell <ell_se yahoo com>
Date: Mon Oct 22 11:39:52 2018 -0400
Partially revert "buffer: fix source rect passed to gegl_resample_{linear,boxfilter}()"
Commit a7c730cf6e841a46d3b4546b86a234ae59206e9c trimmed the sample-
buffer padding from the source-rect passed to the resampling
functions. This isn't strictly necessary, and has the negative
effect of preventing the same padding from being present in the
converted sample-buffer when using any of the _generic() resampling
functions, causing artifacts.
Revert the trimming of the resampling source-rect, though keep
avoiding reading padding-region data from the source buffer, which
should still be unnecessary.
gegl/buffer/gegl-buffer-access.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer-access.c b/gegl/buffer/gegl-buffer-access.c
index 259a185bb..5d4599e37 100644
--- a/gegl/buffer/gegl-buffer-access.c
+++ b/gegl/buffer/gegl-buffer-access.c
@@ -2234,8 +2234,8 @@ _gegl_buffer_get_unlocked (GeglBuffer *buffer,
sample_rect.x = x1;
sample_rect.y = y1;
- sample_rect.width = x2 - x1;
- sample_rect.height = y2 - y1;
+ sample_rect.width = x2 - x1 + 1;
+ sample_rect.height = y2 - y1 + 1;
gegl_resample_bilinear (dest_buf,
sample_buf,
@@ -2281,13 +2281,13 @@ _gegl_buffer_get_unlocked (GeglBuffer *buffer,
buf_width * bpp,
format, level, repeat_mode);
- sample_rect.x = x1;
- sample_rect.y = y1;
- sample_rect.width = x2 - x1;
- sample_rect.height = y2 - y1;
+ sample_rect.x = x1 - 1;
+ sample_rect.y = y1 - 1;
+ sample_rect.width = x2 - x1 + 2;
+ sample_rect.height = y2 - y1 + 2;
gegl_resample_boxfilter (dest_buf,
- (guchar*)sample_buf + offset,
+ sample_buf,
&rect2,
&sample_rect,
buf_width * bpp,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]