Mercurial > libavutil.hg
diff lfg.h @ 798:41da9d9d39b7 libavutil
Implement av_bmg_next(), a Box-Muller Gaussian random generator.
See the thread:
"[FFmpeg-devel] [PATCH] Box-Muller gaussian generator".
author | stefano |
---|---|
date | Sat, 12 Dec 2009 16:24:37 +0000 |
parents | 8c48a1b999a3 |
children | e34e8d654ded |
line wrap: on
line diff
--- a/lfg.h Thu Dec 03 18:15:54 2009 +0000 +++ b/lfg.h Sat Dec 12 16:24:37 2009 +0000 @@ -51,4 +51,12 @@ return c->state[c->index++ & 63] = 2*a*b+a+b; } +/** + * Gets the next two numbers generated by a Box-Muller Gaussian + * generator using the random numbers issued by lfg. + * + * @param out[2] array where are placed the two generated numbers + */ +void av_bmg_get(AVLFG *lfg, double out[2]); + #endif /* AVUTIL_LFG_H */