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 588180 - Create Upsharp sampler for GEGL
Create Upsharp sampler for GEGL
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-09 18:18 UTC by Eric Daoust
Modified: 2010-02-18 14:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch implementing upsharp sampler (26.22 KB, application/x-gzip)
2009-07-09 19:22 UTC, Eric Daoust
Details
time results of GEGL samplers (549 bytes, text/plain)
2009-07-09 19:32 UTC, Eric Daoust
Details
first test case: sample xml file (161 bytes, application/xml)
2009-07-09 19:33 UTC, Eric Daoust
Details
second test case: sample xml file (166 bytes, application/xml)
2009-07-09 19:34 UTC, Eric Daoust
Details
fourth test case: sample xml file (550 bytes, application/xml)
2009-07-09 19:42 UTC, Eric Daoust
Details
Patch implementing upsharp sampler (29.71 KB, application/x-gzip)
2009-07-13 19:12 UTC, Eric Daoust
Details
Upsharpfast patch implementation (123 bytes, application/x-gzip)
2009-07-21 16:13 UTC, Eric Daoust
Details
Replacing empty patch, this is the upsharpfast patch. (15.47 KB, application/x-gzip)
2009-07-21 16:46 UTC, Eric Daoust
Details
New patch fixing minmod so that the images display correctly (17.52 KB, application/x-gzip)
2009-07-27 01:42 UTC, Eric Daoust
Details
better minmod (consistent with forward branch likely) (17.75 KB, application/x-gzip)
2009-07-30 20:47 UTC, Eric Daoust
Details
better minmod (consistent with forward branch likely) (17.75 KB, application/x-gzip)
2009-07-30 20:48 UTC, Eric Daoust
Details
New upsharpfast (MP-quadratic method) (15.85 KB, application/x-gzip)
2009-08-04 16:46 UTC, Eric Daoust
Details
Upsharp sampler with code duplication removal (added mp_quadratic function) (23.46 KB, application/x-gzip)
2009-08-12 20:22 UTC, Eric Daoust
Details
New patch for upsharp (24.01 KB, application/x-gzip)
2009-08-19 18:14 UTC, Eric Daoust
Details

Description Eric Daoust 2009-07-09 18:18:36 UTC
Create Upsharp sampler for GEGL.  This is a name change from the original nohalo1 (formerly sharp) sampler.
Comment 1 Eric Daoust 2009-07-09 19:22:48 UTC
Created attachment 138137 [details]
Patch implementing upsharp sampler

Patch implementing upsharp sampler.  This is a faster replacement for the original sharp sampler.
Comment 2 Eric Daoust 2009-07-09 19:32:18 UTC
Created attachment 138138 [details]
time results of GEGL samplers

This compares the execution time of each sampler in 4 test cases:

1) x scaled by factor of 1.19, y scaled by factor of 0.97
2) both x and y scaled by factor of 4.19
3) repeat first test on very large image (3600x3600)
4) 7 degree rotation
Comment 3 Eric Daoust 2009-07-09 19:33:32 UTC
Created attachment 138139 [details]
first test case: sample xml file

Example file for the first test case.  Note: specify your own image in the file
Comment 4 Eric Daoust 2009-07-09 19:34:42 UTC
Created attachment 138140 [details]
second test case: sample xml file

Example xml file for second test case.  Note: specify your own image in the xml file
Comment 5 Eric Daoust 2009-07-09 19:42:39 UTC
Created attachment 138141 [details]
fourth test case: sample xml file

Sample xml file for fourth test case (rotate). Note: select your own image when using this file.
Comment 6 Eric Daoust 2009-07-13 19:12:38 UTC
Created attachment 138356 [details]
Patch implementing upsharp sampler

Note: Use gfloat instead of gdouble whenever sensible.
Comment 7 Eric Daoust 2009-07-21 16:13:13 UTC
Created attachment 138920 [details]
Upsharpfast patch implementation

Changes to fast_minmod and pre-computations

Also made naming changes so that internally the sampler is called nohalo1 and externally it is called upsharpfast.
Comment 8 Eric Daoust 2009-07-21 16:46:23 UTC
Created attachment 138925 [details]
Replacing empty patch, this is the upsharpfast patch.
Comment 9 Eric Daoust 2009-07-27 01:42:33 UTC
Created attachment 139258 [details]
New patch fixing minmod so that the images display correctly

-Fixed minmod so that it functions correctly
-Changed naming convention so that it is consistent with GEGL
-Added upsharpfast to list of samplers in affine.c
Comment 10 Eric Daoust 2009-07-30 20:47:47 UTC
Created attachment 139588 [details]
better minmod (consistent with forward branch likely)
Comment 11 Eric Daoust 2009-07-30 20:48:36 UTC
Created attachment 139589 [details]
better minmod (consistent with forward branch likely)
Comment 12 Eric Daoust 2009-08-04 16:46:45 UTC
Created attachment 139877 [details]
New upsharpfast (MP-quadratic method)
Comment 13 Eric Daoust 2009-08-12 20:22:59 UTC
Created attachment 140583 [details]
Upsharp sampler with code duplication removal (added mp_quadratic function)

Added mp_quadratic function to reduce large code duplication as several variables were calculated using identical steps.
Comment 14 Eric Daoust 2009-08-19 18:14:46 UTC
Created attachment 141176 [details]
New patch for upsharp

Cosmetic changes so that method declaration and implementation in gegl-sampler-upsharp.c are identical.
Comment 15 Nicolas Robidoux 2009-09-04 11:29:56 UTC
This patch is ready to commit.

Timings (somewhat irrelevant given that Chantal Racette found a major algorithm simplification):


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
upsharp:    1.412s
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
upsharp:    18.263s
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
upsharp:    2.081s   
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
upsharp:    2.052s
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
upsharp:    15.117s 
upsize:     14.990s
upsmooth:   15.892s
Comment 16 Øyvind Kolås (pippin) 2010-02-18 14:43:33 UTC
commit 130c793c70195cf900017f74505b863a3c29a6d5
Author: Adam Turcotte <adam.turcotte@gmail.com>
Date:   Fri Jan 15 17:33:13 2010 -0500

    Add new samplers from gsoc