GNOME Bugzilla – Bug 592515
Add upsmooth sampler (snohalo level 2)
Last modified: 2010-02-18 14:39:24 UTC
I have implemented the upsmooth sampler, which is the GEGL version of snohalo level 2.
Created attachment 141296 [details] [review] Patch to add upsmooth sampler
Created attachment 141297 [details] XML testcases for upsmooth sampler These five testcases look for images big.png and small.png to be resampled using the upsize sampler.
Created attachment 141365 [details] [review] Updated version of the upsmooth sampler
I was successfully able to install this patch.
In summary: Good enough for committing, but most likely not the final version. Results look good but Adam and I both have a nagging suspicion that there is something not quite right in the code. It has to be very subtle (some slightly off folded coefficient?) because the results DO look very good (although they are a bit less smooth looking than I was hoping). For example, enlargements are less blurry and at the same time less aliased than those produced by the current GEGL bicubic sampler (smoothing B-splines). If a thorough code check does not improve things, adding blur between the two subdivision stages (already half programmed by Adam) and/or replacing the final bilinear by MP-quadratic (or possibly Lanczos) will. Neither Adam nor I have the time to do this before a bit. Timing results: Summary: A bit slower than GEGL bicubic and upsize, as should be given the larger footprint (and complexity). Colour original is a 325x325 png (the "map") except for the downsampling tests for which the original is a 1680x1680 png (the "baby") reduce (downsample) a lot (gegl:scale with x=y=.061): bicubic: 1.455s downsharp: 1.730s downsize: 1.731s downsmooth: 2.347s linear: 1.376s upsize: 1.418s upsmooth: 1.417s reduce (gegl:scale with x=y=.53): bicubic: 17.672s downsharp: 17.573s downsize: 17.937s downsmooth: 17.351s linear: 17.276s upsize: 18.139s upsmooth: 18.284s rotate (gegl:rotate with degrees=7): bicubic: 2.054s downsharp: 2.013s downsize: 2.095s downsmooth: 2.042s linear: 1.910s upsize: 2.084s upsmooth: 2.123s enlarge (upsample) (gegl:scale with x=y=1.81): bicubic: 2.003s downsharp: 1.933s downsize: 1.892s downsmooth: 1.895s linear: 1.618s upsize: 2.028s upsmooth: 2.147s enlarge a lot (gegl:scale with x=y=5.19): bicubic: 14.526s downsharp: 13.731s downsize: 13.744s downsmooth: 13.753s linear: 11.767s upsize: 14.990s upsmooth: 15.892s
commit 130c793c70195cf900017f74505b863a3c29a6d5 Author: Adam Turcotte <adam.turcotte@gmail.com> Date: Fri Jan 15 17:33:13 2010 -0500 Add new samplers from gsoc