# HG changeset patch # User michael # Date 1217260026 0 # Node ID 4ea718352036398573d489523213941803dd6ac8 # Parent 0f5a73051b259291ba72788369165be7ddad8468 Document av_lfg_get(). diff -r 0f5a73051b25 -r 4ea718352036 lfg.h --- a/lfg.h Mon Jul 28 15:44:00 2008 +0000 +++ b/lfg.h Mon Jul 28 15:47:06 2008 +0000 @@ -29,6 +29,12 @@ void av_lfg_init(AVLFG *c, unsigned int seed); +/** + * Gets the next random unsigned 32bit number. + * + * Please also consider a simple LCG like state= state*1664525+1013904223, + * it may be good enough and faster for your specific use case. + */ static inline unsigned int av_lfg_get(AVLFG *c){ c->state[c->index & 63] = c->state[(c->index-24) & 63] + c->state[(c->index-55) & 63]; return c->state[c->index++ & 63];