GNOME Bugzilla – Bug 588193
Implement upsmooth sampler, which was originally snohalo1
Last modified: 2010-02-18 14:44:07 UTC
Implement upsmooth sampler, which was originally snohalo1 (smooth nohalo1). This method is a parameter-less version of snohalo1 because "blur" is always equal to 1.
Created attachment 138149 [details] Upsmooth patch This is the implementation for upsmooth (formerly snohalo1).
Created attachment 138406 [details] Changed sampler name to upsmoothfast -Changed sampler name to upsmoothfast -Changed gdouble to gfloat wherever sensible
Created attachment 138929 [details] Upsmooth patch - changed MINMOD and its pre-calculations
Created attachment 138938 [details] Patch replacement for invalid previous patch.
Created attachment 138946 [details] Upsmoothfast patch - changed float constant number values to .f
Created attachment 139012 [details] Naming consistency, added new upsizefast sampler Upsmoothfast patch containing both upsmoothfast (snohalo level 1) and upsizefast samplers. The upsizefast sampler is a middle-point between the upsharpfast (nohalo1) and upsmoothfast (snohalo1) samplers.
Created attachment 139308 [details] Several changes, including fixing minmod -Fixed minmod so that it works correctly -Fixed inconsistency in naming conventions -added upsmoothfast and upsizefast to affine.c
Created attachment 139590 [details] better minmod (consistent with forward branch likely)
Created attachment 140151 [details] New patch with upsmoothfast (snohalo1), upsizefast (nohalo1) and upsharpfast (Catmull-Rom) minmod changes so that it is no longer needed to precalculate its input values, changed upsizefast sampler so that it is the former upsharpfast, added new upsharpfast (Catmull-Rom)
Created attachment 140705 [details] Upsmoothfast, Upsharpfast, Upsizefast Added comments to make the 3 samplers consistent with one another.
Created attachment 141253 [details] Test files for upsharpfast Test xml files uses two of your own images: big.png: a larger image, preferably 1500x1500 or larger small.png: a much smaller image (mine was about 300x300)
Created attachment 141254 [details] Test files for upsizefast Test xml files uses two of your own images: big.png: a larger image, preferably 1500x1500 or larger small.png: a much smaller image (mine was about 300x300)
Created attachment 141255 [details] Test files for upsmoothfast Test xml files uses two of your own images: big.png: a larger image, preferably 1500x1500 or larger small.png: a much smaller image (mine was about 300x300)
I'm not sure, but there seems to be a small bug in the upsmoothfast code, mostly manifest at the boundary. Also, upsmoothfast's output looks too much like bilinear's. I'll do more careful checks when I have a minute. The other samplers seem ready to merge with trunk. Nicolas Robidoux Laurentian University
I am pretty sure that I know what the bug is: From the patch (gegl-sampler-upsmoothfast.c code): + GEGL_SAMPLER (self)->context_rect.x = -1; + GEGL_SAMPLER (self)->context_rect.y = -1; + GEGL_SAMPLER (self)->context_rect.width = 6; + GEGL_SAMPLER (self)->context_rect.height = 6; width and height are correct, but x and y should be -2 instead of -1, because you shift back two rows and two pixels. Nicolas Robidoux Universite Laurentienne
In some of the downsamples from the gallery http://socghop.appspot.com/document/show/user/ericdaoust/gsoc I see some of the glitches of the type which Adam Turcotte discovered in his own downsamplers (which are "higher level" versions of Eric Daoust's), and which he fixed by adding an extra "one pixel wide unused (in principle) border" to the context_rect. There are few additional changes which are required as a result of this fix. I think the simplest way to deal with this is to have Adam have a patch to Eric's patch which implements the fix, since he did it already for his samplers. There is no need, then, to do the fix from my previous comment since it can be done at the same time. Nicolas Robidoux Universite Laurentienne
Apologies: Ignore my last comment: I only see the glitches in the downsmoothfast resamples, and they should disappear once Eric or Adam has changed the context_rect.x and .y to -2. Nicolas Robidoux Laurentian University
Comment 16 is actually correct, but it is relevant to the downsizesmooth patch, not this one. I'm moving it to the right spot.
commit 130c793c70195cf900017f74505b863a3c29a6d5 Author: Adam Turcotte <adam.turcotte@gmail.com> Date: Fri Jan 15 17:33:13 2010 -0500 Add new samplers from gsoc