[gegl/samplers] lohalo: beginning to set up higher mipmap access
- From: Nicolas Robidoux <nrobidoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/samplers] lohalo: beginning to set up higher mipmap access
- Date: Wed, 22 Jun 2011 18:54:26 +0000 (UTC)
commit 90f97c502f78bb4b6a13d33c8621a86175d4da62
Author: Nicolas Robidoux <nicolas robidoux gmail com>
Date: Wed Jun 22 14:54:16 2011 -0400
lohalo: beginning to set up higher mipmap access
gegl/buffer/gegl-sampler-lohalo.c | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/gegl/buffer/gegl-sampler-lohalo.c b/gegl/buffer/gegl-sampler-lohalo.c
index bfbaaad..0e9156a 100644
--- a/gegl/buffer/gegl-sampler-lohalo.c
+++ b/gegl/buffer/gegl-sampler-lohalo.c
@@ -244,9 +244,27 @@ gegl_sampler_lohalo_class_init (GeglSamplerLohaloClass *klass)
sampler_class->get = gegl_sampler_lohalo_get;
}
+/*
+ * 5x5 is the smallest "level 0" context_rect that works with the
+ * LBB-Nohalo component of the sampler. If you use something else for
+ * level 0, you need to change the code.
+ */
+#define LOHALO_CONTEXT_RECT_SIZE (5)
+#define LOHALO_CONTEXT_RECT_SHIFT (5)
-#define LOHALO_CONTEXT_RECT_SIZE 5
-#define LOHALO_CONTEXT_RECT_SHIFT ( ( 1 - (LOHALO_CONTEXT_RECT_SIZE) ) / 2 )
+/*
+ * Use odd sizes for the higher mipmap context_rects. Generally, a
+ * higher mipmap context_rects should be larger than half the lower
+ * one. (Nicolas has not figured out the exact relationship that makes
+ * things work.)
+ *
+ * Every time one "jumps" a mipmap level, "switching" artifacts
+ * appear. It is probably a good thing to minimize the total number of
+ * mipmap levels used. On the other hand, large context_rects slow
+ * things down, since they prevent "buffer reuse."
+ */
+#define LOHALO_CONTEXT_RECT_SIZE_1 (7)
+#define LOHALO_CONTEXT_RECT_SHIFT_1 ( ( 1 - (LOHALO_CONTEXT_RECT_SIZE_1) ) / 2 )
static void
gegl_sampler_lohalo_init (GeglSamplerLohalo *self)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]