aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-07-30 23:17:41 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-07-30 23:17:41 +0000
commitf39e8b03c8a7f8387804097279160b0ac2c3d017 (patch)
treee0575035730ca446280fcec42c2bf18e722cc720
parent310d442456881e448d22afa9d8b1a8687b5dd2bf (diff)
downloadffmpeg-f39e8b03c8a7f8387804097279160b0ac2c3d017.tar.gz
1000l typo my new PRNG converged to -1.
Originally committed as revision 14479 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavutil/lfg.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavutil/lfg.h b/libavutil/lfg.h
index 3d3f9332ab..36f94e64b1 100644
--- a/libavutil/lfg.h
+++ b/libavutil/lfg.h
@@ -48,7 +48,7 @@ static inline unsigned int av_lfg_get(AVLFG *c){
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