[gegl/samplers] Bugfix for lohalo sampler.



commit 75bedea3e76891d642b2525f6c387ceb4c3ac179
Author: Adam Turcotte <aturcotte src gnome org>
Date:   Thu May 12 15:57:44 2011 -0400

    Bugfix for lohalo sampler.

 gegl/buffer/gegl-sampler-lohalo.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gegl/buffer/gegl-sampler-lohalo.c b/gegl/buffer/gegl-sampler-lohalo.c
index c6c6d87..751eaf5 100644
--- a/gegl/buffer/gegl-sampler-lohalo.c
+++ b/gegl/buffer/gegl-sampler-lohalo.c
@@ -165,13 +165,14 @@ gegl_sampler_lohalo_class_init (GeglSamplerLohaloClass *klass)
 /*
  * Use an odd integer between 5 and 63 inclusive:
  */
-#define LOHALO_CONTEXT_RECT_SIZE 15
+#define LOHALO_CONTEXT_RECT_SIZE 17
+#define LOHALO_CONTEXT_RECT_SHIFT ( ( 1 - (LOHALO_CONTEXT_RECT_SIZE) ) / 2 )
 
 static void
 gegl_sampler_lohalo_init (GeglSamplerLohalo *self)
 {
-  GEGL_SAMPLER (self)->context_rect.x = 0;
-  GEGL_SAMPLER (self)->context_rect.y = 0;
+  GEGL_SAMPLER (self)->context_rect.x = LOHALO_CONTEXT_RECT_SHIFT;
+  GEGL_SAMPLER (self)->context_rect.y = LOHALO_CONTEXT_RECT_SHIFT;
   GEGL_SAMPLER (self)->context_rect.width  = LOHALO_CONTEXT_RECT_SIZE;
   GEGL_SAMPLER (self)->context_rect.height = LOHALO_CONTEXT_RECT_SIZE;
   GEGL_SAMPLER (self)->interpolate_format = babl_format ("RaGaBaA float");



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]