Code cleanup in unsharp-mask.c and possible speed enhancement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I took a look at the svn history of unsharp-mask.c (I'm the original author) and saw that the fix for bug #166406 stopped using a lookup table called ctable. This was because it slowed things down a lot for large values of radius, due to cache overloading.
http://bugzilla.gnome.org/show_bug.cgi?id=166406

After the fix, the lookup table is no longer being used for the blurring algorithm, but it's still being generated and traversed during the blur, so I have a patch that removes all that useless code, without affecting functionality at all. What's the best way to submit it, as I can't commit to the SVN repository?



Also, I've read recently that a three-pass box blur is close to a true gaussian blur (within 3% when std_dev>2.0) so I'm considering implementing that for the unsharp mask. It should be much faster while still looking very good.

More info on the 3-pass box blur here:
http://www.w3.org/TR/SVG/filters.html#feGaussianBlur
The algorithm listed here, d = floor(s * 3*sqrt(2*pi)/4 + 0.5), doesn't have infinite precision; the smallest step (in standard deviations, AKA radius) it can take is 0.42 pixels, so I think maybe it would be best to use the triple-box-blur for values of s that are, say, 10 and higher, and use the true gaussian for smaller values. But if there's a good reason to use a different threshold value, please let me know.

Thoughts on all this?

_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux