[gegl/samplers] No longer incrementing input_bptr in lohalo sampler.



commit b8f2e7225c6f0b13029965ad2567988a45184a8d
Author: Adam Turcotte <aturcotte src gnome org>
Date:   Mon May 9 15:34:36 2011 -0400

    No longer incrementing input_bptr in lohalo sampler.

 gegl/buffer/gegl-sampler-lohalo.c |  136 +++++++++++++++++--------------------
 1 files changed, 63 insertions(+), 73 deletions(-)
---
diff --git a/gegl/buffer/gegl-sampler-lohalo.c b/gegl/buffer/gegl-sampler-lohalo.c
index 6f9e77a..d1c312c 100644
--- a/gegl/buffer/gegl-sampler-lohalo.c
+++ b/gegl/buffer/gegl-sampler-lohalo.c
@@ -1018,8 +1018,6 @@ gegl_sampler_lohalo_get (      GeglSampler* restrict self,
   const gfloat* restrict input_bptr =
     (gfloat*) gegl_sampler_get_ptr (self, ix_0, iy_0);
 
-  // ADAM: MAKE A COPY OF input_bptr to be used for "tent" filtering.
-
   const gfloat x_0 = absolute_x - ix_0;
   const gfloat y_0 = absolute_y - iy_0;
 
@@ -1254,32 +1252,28 @@ gegl_sampler_lohalo_get (      GeglSampler* restrict self,
 
     /*
      * Second channel:
-     *
-     * Shift input pointer by one channel:
      */
-    input_bptr++;
-
-    nohalo_subdivision (input_bptr[ uno_two_shift ],
-                        input_bptr[ uno_thr_shift ],
-                        input_bptr[ uno_fou_shift ],
-                        input_bptr[ dos_one_shift ],
-                        input_bptr[ dos_two_shift ],
-                        input_bptr[ dos_thr_shift ],
-                        input_bptr[ dos_fou_shift ],
-                        input_bptr[ dos_fiv_shift ],
-                        input_bptr[ tre_one_shift ],
-                        input_bptr[ tre_two_shift ],
-                        input_bptr[ tre_thr_shift ],
-                        input_bptr[ tre_fou_shift ],
-                        input_bptr[ tre_fiv_shift ],
-                        input_bptr[ qua_one_shift ],
-                        input_bptr[ qua_two_shift ],
-                        input_bptr[ qua_thr_shift ],
-                        input_bptr[ qua_fou_shift ],
-                        input_bptr[ qua_fiv_shift ],
-                        input_bptr[ cin_two_shift ],
-                        input_bptr[ cin_thr_shift ],
-                        input_bptr[ cin_fou_shift ],
+    nohalo_subdivision (input_bptr[ uno_two_shift + 1 ],
+                        input_bptr[ uno_thr_shift + 1 ],
+                        input_bptr[ uno_fou_shift + 1 ],
+                        input_bptr[ dos_one_shift + 1 ],
+                        input_bptr[ dos_two_shift + 1 ],
+                        input_bptr[ dos_thr_shift + 1 ],
+                        input_bptr[ dos_fou_shift + 1 ],
+                        input_bptr[ dos_fiv_shift + 1 ],
+                        input_bptr[ tre_one_shift + 1 ],
+                        input_bptr[ tre_two_shift + 1 ],
+                        input_bptr[ tre_thr_shift + 1 ],
+                        input_bptr[ tre_fou_shift + 1 ],
+                        input_bptr[ tre_fiv_shift + 1 ],
+                        input_bptr[ qua_one_shift + 1 ],
+                        input_bptr[ qua_two_shift + 1 ],
+                        input_bptr[ qua_thr_shift + 1 ],
+                        input_bptr[ qua_fou_shift + 1 ],
+                        input_bptr[ qua_fiv_shift + 1 ],
+                        input_bptr[ cin_two_shift + 1 ],
+                        input_bptr[ cin_thr_shift + 1 ],
+                        input_bptr[ cin_fou_shift + 1 ],
                         &uno_one_1,
                         &uno_two_1,
                         &uno_thr_1,
@@ -1331,29 +1325,27 @@ gegl_sampler_lohalo_get (      GeglSampler* restrict self,
                  qua_thr_1,
                  qua_fou_1 );
 
-    input_bptr++;
-
-    nohalo_subdivision (input_bptr[ uno_two_shift ],
-                        input_bptr[ uno_thr_shift ],
-                        input_bptr[ uno_fou_shift ],
-                        input_bptr[ dos_one_shift ],
-                        input_bptr[ dos_two_shift ],
-                        input_bptr[ dos_thr_shift ],
-                        input_bptr[ dos_fou_shift ],
-                        input_bptr[ dos_fiv_shift ],
-                        input_bptr[ tre_one_shift ],
-                        input_bptr[ tre_two_shift ],
-                        input_bptr[ tre_thr_shift ],
-                        input_bptr[ tre_fou_shift ],
-                        input_bptr[ tre_fiv_shift ],
-                        input_bptr[ qua_one_shift ],
-                        input_bptr[ qua_two_shift ],
-                        input_bptr[ qua_thr_shift ],
-                        input_bptr[ qua_fou_shift ],
-                        input_bptr[ qua_fiv_shift ],
-                        input_bptr[ cin_two_shift ],
-                        input_bptr[ cin_thr_shift ],
-                        input_bptr[ cin_fou_shift ],
+    nohalo_subdivision (input_bptr[ uno_two_shift + 2 ],
+                        input_bptr[ uno_thr_shift + 2 ],
+                        input_bptr[ uno_fou_shift + 2 ],
+                        input_bptr[ dos_one_shift + 2 ],
+                        input_bptr[ dos_two_shift + 2 ],
+                        input_bptr[ dos_thr_shift + 2 ],
+                        input_bptr[ dos_fou_shift + 2 ],
+                        input_bptr[ dos_fiv_shift + 2 ],
+                        input_bptr[ tre_one_shift + 2 ],
+                        input_bptr[ tre_two_shift + 2 ],
+                        input_bptr[ tre_thr_shift + 2 ],
+                        input_bptr[ tre_fou_shift + 2 ],
+                        input_bptr[ tre_fiv_shift + 2 ],
+                        input_bptr[ qua_one_shift + 2 ],
+                        input_bptr[ qua_two_shift + 2 ],
+                        input_bptr[ qua_thr_shift + 2 ],
+                        input_bptr[ qua_fou_shift + 2 ],
+                        input_bptr[ qua_fiv_shift + 2 ],
+                        input_bptr[ cin_two_shift + 2 ],
+                        input_bptr[ cin_thr_shift + 2 ],
+                        input_bptr[ cin_fou_shift + 2 ],
                         &uno_one_2,
                         &uno_two_2,
                         &uno_thr_2,
@@ -1405,29 +1397,27 @@ gegl_sampler_lohalo_get (      GeglSampler* restrict self,
                  qua_thr_2,
                  qua_fou_2 );
 
-    input_bptr++;
-
-    nohalo_subdivision (input_bptr[ uno_two_shift ],
-                        input_bptr[ uno_thr_shift ],
-                        input_bptr[ uno_fou_shift ],
-                        input_bptr[ dos_one_shift ],
-                        input_bptr[ dos_two_shift ],
-                        input_bptr[ dos_thr_shift ],
-                        input_bptr[ dos_fou_shift ],
-                        input_bptr[ dos_fiv_shift ],
-                        input_bptr[ tre_one_shift ],
-                        input_bptr[ tre_two_shift ],
-                        input_bptr[ tre_thr_shift ],
-                        input_bptr[ tre_fou_shift ],
-                        input_bptr[ tre_fiv_shift ],
-                        input_bptr[ qua_one_shift ],
-                        input_bptr[ qua_two_shift ],
-                        input_bptr[ qua_thr_shift ],
-                        input_bptr[ qua_fou_shift ],
-                        input_bptr[ qua_fiv_shift ],
-                        input_bptr[ cin_two_shift ],
-                        input_bptr[ cin_thr_shift ],
-                        input_bptr[ cin_fou_shift ],
+    nohalo_subdivision (input_bptr[ uno_two_shift + 3 ],
+                        input_bptr[ uno_thr_shift + 3 ],
+                        input_bptr[ uno_fou_shift + 3 ],
+                        input_bptr[ dos_one_shift + 3 ],
+                        input_bptr[ dos_two_shift + 3 ],
+                        input_bptr[ dos_thr_shift + 3 ],
+                        input_bptr[ dos_fou_shift + 3 ],
+                        input_bptr[ dos_fiv_shift + 3 ],
+                        input_bptr[ tre_one_shift + 3 ],
+                        input_bptr[ tre_two_shift + 3 ],
+                        input_bptr[ tre_thr_shift + 3 ],
+                        input_bptr[ tre_fou_shift + 3 ],
+                        input_bptr[ tre_fiv_shift + 3 ],
+                        input_bptr[ qua_one_shift + 3 ],
+                        input_bptr[ qua_two_shift + 3 ],
+                        input_bptr[ qua_thr_shift + 3 ],
+                        input_bptr[ qua_fou_shift + 3 ],
+                        input_bptr[ qua_fiv_shift + 3 ],
+                        input_bptr[ cin_two_shift + 3 ],
+                        input_bptr[ cin_thr_shift + 3 ],
+                        input_bptr[ cin_fou_shift + 3 ],
                         &uno_one_3,
                         &uno_two_3,
                         &uno_thr_3,



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