:: Re: [Frei0r] "rgbnoise" plugin
Pàgina inicial
Delete this message
Reply to this message
Autor: Janne Liljeblad
Data:  
A: Minimalistic plugin API for video effects
Assumpte: 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.

Patch attached, applies on top of previous ones.