GNOME Bugzilla – Bug 628817
Optimized Despeckle plug-in
Last modified: 2010-09-05 17:40:58 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
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.