From 09c482df59a49146379d1ba8626f4572003a038c Mon Sep 17 00:00:00 2001 From: Mario Sergio Fujikawa Ferreira Date: Mon, 7 Apr 2014 23:54:13 +0000 Subject: New port Refocus 0.9.0: GIMP plugin to "refocus" images through FIR Wiener filtering Approved by: eadler (mentor) Obtained from: gentoo portage (patches) --- .../gimp-refocus-plugin/files/patch-src__util.c | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 graphics/gimp-refocus-plugin/files/patch-src__util.c (limited to 'graphics/gimp-refocus-plugin/files/patch-src__util.c') diff --git a/graphics/gimp-refocus-plugin/files/patch-src__util.c b/graphics/gimp-refocus-plugin/files/patch-src__util.c new file mode 100644 index 000000000000..c1dd86d9d7c0 --- /dev/null +++ b/graphics/gimp-refocus-plugin/files/patch-src__util.c @@ -0,0 +1,49 @@ +--- src/util.c 2014-03-27 20:00:17.000000000 -0300 ++++ src/util.c 2014-03-27 20:00:58.000000000 -0300 +@@ -18,6 +18,7 @@ + * Version $Id: util.c,v 1.1.1.1 2003/01/30 21:30:19 ernstl Exp $ + */ + ++#include + #include "util.h" + #include + #include +@@ -30,14 +31,38 @@ + gint + floorm (gint a, gint b) + /* return largest multiple of b that is <= a */ ++ /* ++ & & m = floorm(a,b) ++ & a = b*m + r ++ & 0 <= r < b ++ */ + { ++#ifdef RLXTEST ++ printf("floorm: a/b %d, fl %g\n", a/b, floor ((gdouble) a / b)); ++#endif + return (b * floor ((gdouble) a / b)); + } + + gint + ceilm (gint a, gint b) + /* return least multiple of b that is >= a */ ++ /* ++ & m = ceilm(a,b) ++ & a = b*m - r; ++ & m = a/b ++ % r = a%b ++ & -a = -b*m + r ++ ++ & ceilm = (r == 0 ? b*m : (b+1)*m) ++ */ + { ++#ifdef RLXTEST ++ printf("ceil: a %d, b %d, -(-a/b) %d,a/b+(a%b != 0 ? 1:0) %d, fl %g\n", ++ a,b, ++ -((-a)/b), ++ a/b+(a%b != 0 ? 1:0), ++ ceil ((gdouble) a / b) ); ++#endif + return (b * ceil ((gdouble) a / b)); + } + -- cgit v1.2.3