Auteur: Janne Liljeblad Datum: Aan: Minimalistic plugin API for video effects Onderwerp: Re: [Frei0r] "rgbnoise" plugin
I was able to fix "rgbnoise" to be a real time with the following method:
- create lookup table: static double gaussian_lookup[32767];
- fill it with original gaussian distributed random values at f0r_init(..)
- get values with gaussian_lookup[index++] when needed
- as an anti-pattern measure, randomize lookup range when index overflows
Now the filter is real time with no visible difference, cost is 32K *
sizeof(double) memory. I think we can afford it.