From b975db26342aeb7e84ec6f4f7da651cec68bbe17 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Thu, 26 Apr 2012 09:33:44 +0200 Subject: harris: Just increase convolution output pointer while writing to it Instead of calculating the index for each step. --- harris.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/harris.c b/harris.c index 1099f61..8602e0a 100644 --- a/harris.c +++ b/harris.c @@ -71,11 +71,11 @@ conv(GdkPixbuf *pixbuf, gint *operator, gint block_size) Y += v * operator[j*block_size + i]; } } - out[y * width + x] = Y/4; + *out++ = Y/4; } } - return out; + return out - width*height; } struct mat2 * -- cgit