summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2012-04-26 09:33:44 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-04-26 09:43:16 +0200
commitb975db26342aeb7e84ec6f4f7da651cec68bbe17 (patch)
tree53cdf905fa7c911529e31c3c1a84a4ddbe2d9b0b
parentd2dd6636ce6298fce17c72b91a48c0d9db630db3 (diff)
downloadcv-b975db26342aeb7e84ec6f4f7da651cec68bbe17.tar.gz
cv-b975db26342aeb7e84ec6f4f7da651cec68bbe17.tar.bz2
cv-b975db26342aeb7e84ec6f4f7da651cec68bbe17.zip
harris: Just increase convolution output pointer while writing to it
Instead of calculating the index for each step.
-rw-r--r--harris.c4
1 files 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 *