diff lfg.h @ 538:cdbdd48471aa libavutil

1000l typo my new PRNG converged to -1.
author michael
date Wed, 30 Jul 2008 23:17:41 +0000
parents 2862fa9da110
children bd4052d9050c
line wrap: on
line diff
--- a/lfg.h	Wed Jul 30 23:08:07 2008 +0000
+++ b/lfg.h	Wed Jul 30 23:17:41 2008 +0000
@@ -48,7 +48,7 @@
 static inline unsigned int av_mlfg_get(AVLFG *c){
     unsigned int a= c->state[(c->index-55) & 63];
     unsigned int b= c->state[(c->index-24) & 63];
-    return c->state[c->index++ & 63] = a*b+a+b;
+    return c->state[c->index++ & 63] = 2*a*b+a+b;
 }
 
 #endif //FFMPEG_LFG_H