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 588016 - Add Nohalobox Sampler
Add Nohalobox Sampler
Status: RESOLVED FIXED
Product: GEGL
Classification: Other
Component: GeglBuffer
git master
Other All
: Normal enhancement
: ---
Assigned To: Default Gegl Component Owner
Default Gegl Component Owner
Depends on:
Blocks:
 
 
Reported: 2009-07-07 20:13 UTC by Adam Turcotte
Modified: 2010-02-18 14:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for Nohalobox (47.94 KB, patch)
2009-07-07 20:14 UTC, Adam Turcotte
none Details | Review
Revised patch that includes three versions of Nohalobox: downsize, downsharp, and downsmooth. (59.04 KB, patch)
2009-07-22 23:53 UTC, Adam Turcotte
none Details | Review
Five XML test cases for each of the three versions of Nohalobox. (836 bytes, application/x-compressed-tar)
2009-07-22 23:56 UTC, Adam Turcotte
  Details
Improved version of downsize, downsharp, and downsmooth (61.09 KB, patch)
2009-08-14 17:23 UTC, Adam Turcotte
none Details | Review
Improved version of downsize, downsharp, and downsmooth (fixed) (59.77 KB, patch)
2009-08-14 18:46 UTC, Adam Turcotte
none Details | Review
XML testcases for nohalobox samplers (807 bytes, application/x-gzip)
2009-08-20 20:01 UTC, Adam Turcotte
  Details

Description Adam Turcotte 2009-07-07 20:13:35 UTC
I have created a patch that adds the Nohalobox sampler. It makes use of the inverse jacobian matrix of the operation, so a GeglMatrix2 type was added for this reason and a parameter (inverse_jacobian) was added to gegl-sampler.[ch]. The inverse jacobian is passed during affine_generic ().

This sampler will also eventually make use of a smoothing parameter.
Comment 1 Adam Turcotte 2009-07-07 20:14:39 UTC
Created attachment 137991 [details] [review]
Patch for Nohalobox
Comment 2 Adam Turcotte 2009-07-22 23:53:42 UTC
Created attachment 139036 [details] [review]
Revised patch that includes three versions of Nohalobox: downsize, downsharp, and downsmooth.
Comment 3 Adam Turcotte 2009-07-22 23:56:29 UTC
Created attachment 139037 [details]
Five XML test cases for each of the three versions of Nohalobox.
Comment 4 Adam Turcotte 2009-08-14 17:23:48 UTC
Created attachment 140792 [details] [review]
Improved version of downsize, downsharp, and downsmooth

This is an improved version of the Nohalobox samplers (downsize, downsharp, and downsmooth). Another small improvement for each sampler is being developed, and downsmooth will eventually be re-written in the future.
Comment 5 Adam Turcotte 2009-08-14 18:46:49 UTC
Created attachment 140795 [details] [review]
Improved version of downsize, downsharp, and downsmooth (fixed)

This patch fixes some bugs from the previous patch that were re-instated by overriding a previous commit.
Comment 6 Adam Turcotte 2009-08-20 20:01:34 UTC
Created attachment 141283 [details]
XML testcases for nohalobox samplers

These five testcases look for images big.png and small.png to be resampled
using all three of the nohalobox samplers (downsharp, downsize, and downsmooth).
Comment 7 Eric Daoust 2009-08-21 18:00:09 UTC
I was successfully able to install this patch.
Comment 8 Nicolas Robidoux 2009-09-02 18:59:48 UTC
This patch is ready to merge.
Comment 9 Nicolas Robidoux 2009-09-02 22:07:20 UTC
I am pleasantly surprised by the speed (at least compared to other samplers). Except for downsmooth which, as mentioned on the gegl-developer list, is slated
for a major improvement both in terms of visual quality and speed, the new downsamplers are not much slower than bilinear, even when upsampling (for which they were not designed to be fast).

Benchmark results:

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.530s
downsharp:  1.730s
downsize:   1.731s
downsmooth: 2.347s
linear:     1.376s

reduce (gegl:scale with x=y=.53):

bicubic:    17.856s
downsharp:  17.573s
downsize:   17.937s
downsmooth: 17.351s
linear:     17.276s
 
rotate (gegl:rotate with degrees=7):

bicubic:    2.054s   
downsharp:  2.013s
downsize:   2.095s
downsmooth: 2.042s
linear:     1.910s

enlarge (upsample) (gegl:scale with x=y=1.81):

bicubic:    2.050s
downsharp:  1.933s
downsize:   1.892s
downsmooth: 1.895s
linear:     1.618s

enlarge a lot (gegl:scale with x=y=5.19):

bicubic:    14.587s   
downsharp:  13.731s
downsize:   13.744s
downsmooth: 13.753s
linear:     11.767s
Comment 10 Øyvind Kolås (pippin) 2010-02-18 14:42:57 UTC
commit 130c793c70195cf900017f74505b863a3c29a6d5
Author: Adam Turcotte <adam.turcotte@gmail.com>
Date:   Fri Jan 15 17:33:13 2010 -0500

    Add new samplers from gsoc