:: Re: [Frei0r] "rgbnoise" plugin
Página Inicial
Delete this message
Reply to this message
Autor: Steinar H. Gunderson
Data:  
Para: Minimalistic plugin API for video effects
Assunto: Re: [Frei0r] "rgbnoise" plugin
On Fri, Sep 28, 2012 at 10:20:08AM +0300, Janne Liljeblad wrote:
> Port of Gimp Rgb Noise. Adds noise to image.


Two comments:

 1. If you really want to compute three Gaussian noise values per pixel,
    you should probably use the Ziggurat method for generating the random
    values; the ratio method is very slow. (That, and you should not
    do a divide per nextDouble()!)
 2. There's absolutely no point in counting downwards in a loop that doesn't
    use its index; it doesn't buy any speed, and has not since sometime
    during the nineties. The compiler is able to do such transformations if
    it is a win.


I'd probably suggest dropping the micro-optimization ala #2, and then instead
use a profiler to find the parts that are actually slow (and fix them).

/* Steinar */
--
Homepage: http://www.sesse.net/