After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 592515 - Add upsmooth sampler (snohalo level 2)
Add upsmooth sampler (snohalo level 2)
Status: RESOLVED FIXED
Product: GEGL
Classification: Other
Component: GeglBuffer
git master
Other Linux
: Normal normal
: ---
Assigned To: Default Gegl Component Owner
Default Gegl Component Owner
Depends on:
Blocks:
 
 
Reported: 2009-08-20 21:22 UTC by Adam Turcotte
Modified: 2010-02-18 14:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to add upsmooth sampler (56.11 KB, patch)
2009-08-20 21:23 UTC, Adam Turcotte
none Details | Review
XML testcases for upsmooth sampler (509 bytes, application/x-gzip)
2009-08-20 21:26 UTC, Adam Turcotte
  Details
Updated version of the upsmooth sampler (56.28 KB, patch)
2009-08-21 17:56 UTC, Adam Turcotte
none Details | Review

Description Adam Turcotte 2009-08-20 21:22:56 UTC
I have implemented the upsmooth sampler, which is the GEGL version of snohalo
level 2.
Comment 1 Adam Turcotte 2009-08-20 21:23:39 UTC
Created attachment 141296 [details] [review]
Patch to add upsmooth sampler
Comment 2 Adam Turcotte 2009-08-20 21:26:18 UTC
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.
Comment 3 Adam Turcotte 2009-08-21 17:56:49 UTC
Created attachment 141365 [details] [review]
Updated version of the upsmooth sampler
Comment 4 Eric Daoust 2009-08-21 20:06:50 UTC
I was successfully able to install this patch.
Comment 5 Nicolas Robidoux 2009-09-04 01:29:21 UTC
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
Comment 6 Øyvind Kolås (pippin) 2010-02-18 14:39:24 UTC
commit 130c793c70195cf900017f74505b863a3c29a6d5
Author: Adam Turcotte <adam.turcotte@gmail.com>
Date:   Fri Jan 15 17:33:13 2010 -0500

    Add new samplers from gsoc