[gegl] buffer: remove unneeded copy in nearest sampler



commit 7a949426aa9eee5c9a85570fe0778d65897dc390
Author: Øyvind Kolås <pippin gimp org>
Date:   Thu Jun 12 00:45:42 2014 +0200

    buffer: remove unneeded copy in nearest sampler

 gegl/buffer/gegl-sampler-nearest.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)
---
diff --git a/gegl/buffer/gegl-sampler-nearest.c b/gegl/buffer/gegl-sampler-nearest.c
index 6f5c26f..c34e41a 100644
--- a/gegl/buffer/gegl-sampler-nearest.c
+++ b/gegl/buffer/gegl-sampler-nearest.c
@@ -77,16 +77,10 @@ gegl_sampler_nearest_get (      GeglSampler*    restrict  self,
    * located at (.5,.5) (instead of (0,0) as it would be if absolute
    * positions were center-based).
    */
-  const gint channels = 4;
-  gfloat newval[channels];
   const gfloat* restrict in_bptr =
     gegl_sampler_get_ptr (self,
                           (gint) floor ((double) absolute_x),
                           (gint) floor ((double) absolute_y),
                           repeat_mode);
-  newval[0] = *in_bptr++;
-  newval[1] = *in_bptr++;
-  newval[2] = *in_bptr++;
-  newval[3] = *in_bptr;
-  babl_process (self->fish, newval, output, 1);
+  babl_process (self->fish, in_bptr, output, 1);
 }


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