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 628817 - Optimized Despeckle plug-in
Optimized Despeckle plug-in
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
git master
Other All
: Normal enhancement
: 2.8
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2010-09-05 14:07 UTC by kermidt.zed
Modified: 2010-09-05 17:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that introduces the optimization (13.99 KB, application/octet-stream)
2010-09-05 14:07 UTC, kermidt.zed
Details

Description kermidt.zed 2010-09-05 14:07:07 UTC
Created attachment 169507 [details]
Patch that introduces the optimization

Hi,

As a part of my student project for "Optimizing Open-Source Applications" at
Warsaw University I have speed up despeckle plug-in for gimp.

Original version of the plugin run 56seconds for 1024x768 image with
despeckle radius 30 and adaptive flag turned off (on my Intel Macbook
2.1GHz). My optimized version with the same settings completes the task in
3.5 seconds with the same image quality.

I'm attaching patch to this bug report but the whole file can be downloaded from here
http://students.mimuw.edu.pl/~pz248275/despeckle.c
http://students.mimuw.edu.pl/~pz248275/0001-Included-optimized-version-of-despeckle-plug-in.patch

There is also a thread on gimp-developer@lists.xcf.berkeley.edu "Optimized Despeckle plug-in" regarding this change (https://lists.xcf.berkeley.edu/lists/gimp-developer/2010-July/025015.html)

Optimization will not pass simple golden image tests against the non-optimized version because of the nature of the filter itself (filter sorts pixels based on their luma and takes a pixel that falls into median luma bucket, since there can be several pixels that fall into the same luma bucket, the resulting pixel might differ).

Hope the enchantment will be useful.

Regards,
Przemyslaw Zych
Comment 1 Sven Neumann 2010-09-05 17:40:58 UTC
Thanks. Pushed to master with some additional cleanups:

commit ee31bd1c4dbc1ad38cee25ec215203c661e0067d
Author: Sven Neumann <sven@gimp.org>
Date:   Sun Sep 5 19:32:57 2010 +0200

    plug-ins: whitespace and coding style cleanups
    
    Apply whitespace and coding style cleanups to the new optimized
    code. Also sprinkle with const qualifiers.

commit 6a99cf7ed4ae925e7dcbe8b26e73da892fa6b879
Author: KermiDT <KermiDT@KermiDTs-MacBook.local>
Date:   Sun Sep 5 15:38:44 2010 +0200

    Bug 628817 - Optimized Despeckle plug-in
    
    Included optimized version of despeckle plug-in.