diff options
author | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2014-04-07 23:54:13 +0000 |
---|---|---|
committer | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> | 2014-04-07 23:54:13 +0000 |
commit | 09c482df59a49146379d1ba8626f4572003a038c (patch) | |
tree | 2774e8416bbc821c3efd62289836752f7417de57 /graphics/gimp-refocus-plugin/files/patch-src__util.c | |
parent | New port ez-perspective 0.1.2: GIMP plugin to sharpen by increasing contrast ... (diff) |
New port Refocus 0.9.0: GIMP plugin to "refocus" images through FIR Wiener filtering
Approved by: eadler (mentor)
Obtained from: gentoo portage (patches)
Notes
Notes:
svn path=/head/; revision=350554
Diffstat (limited to 'graphics/gimp-refocus-plugin/files/patch-src__util.c')
-rw-r--r-- | graphics/gimp-refocus-plugin/files/patch-src__util.c | 49 |
1 files changed, 49 insertions, 0 deletions
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 <stdio.h> + #include "util.h" + #include <string.h> + #include <math.h> +@@ -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)); + } + |