GNOME Bugzilla – Bug 588016
Add Nohalobox Sampler
Last modified: 2010-02-18 14:42:57 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.
Created attachment 137991 [details] [review] Patch for Nohalobox
Created attachment 139036 [details] [review] Revised patch that includes three versions of Nohalobox: downsize, downsharp, and downsmooth.
Created attachment 139037 [details] Five XML test cases for each of the three versions of Nohalobox.
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.
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.
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).
I was successfully able to install this patch.
This patch is ready to merge.
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
commit 130c793c70195cf900017f74505b863a3c29a6d5 Author: Adam Turcotte <adam.turcotte@gmail.com> Date: Fri Jan 15 17:33:13 2010 -0500 Add new samplers from gsoc