[FFmpeg-cvslog] r14461 - trunk/libavutil/lfg.h

michael subversion
Mon Jul 28 17:47:06 CEST 2008


Author: michael
Date: Mon Jul 28 17:47:06 2008
New Revision: 14461

Log:
Document av_lfg_get().


Modified:
   trunk/libavutil/lfg.h

Modified: trunk/libavutil/lfg.h
==============================================================================
--- trunk/libavutil/lfg.h	(original)
+++ trunk/libavutil/lfg.h	Mon Jul 28 17:47:06 2008
@@ -29,6 +29,12 @@ typedef struct {
 
 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];




More information about the ffmpeg-cvslog mailing list