Mercurial > libavutil.hg
comparison random.c @ 633:8c48a1b999a3 libavutil
spelling/grammar/consistency review part I
author | diego |
---|---|
date | Wed, 28 Jan 2009 00:16:05 +0000 |
parents | ed203c477511 |
children | c04808220c83 |
comparison
equal
deleted
inserted
replaced
632:f9884e1112d0 | 633:8c48a1b999a3 |
---|---|
27 */ | 27 */ |
28 #include <stdio.h> | 28 #include <stdio.h> |
29 #include "random.h" | 29 #include "random.h" |
30 | 30 |
31 | 31 |
32 /* Period parameters */ | 32 /* period parameters */ |
33 #define M 397 | 33 #define M 397 |
34 #define A 0x9908b0df /* constant vector a */ | 34 #define A 0x9908b0df /* constant vector a */ |
35 #define UPPER_MASK 0x80000000 /* most significant w-r bits */ | 35 #define UPPER_MASK 0x80000000 /* most significant w-r bits */ |
36 #define LOWER_MASK 0x7fffffff /* least significant r bits */ | 36 #define LOWER_MASK 0x7fffffff /* least significant r bits */ |
37 | 37 |
38 /** initializes mt[AV_RANDOM_N] with a seed */ | 38 /** Initializes mt[AV_RANDOM_N] with a seed. */ |
39 void av_random_init(AVRandomState *state, unsigned int seed) | 39 void av_random_init(AVRandomState *state, unsigned int seed) |
40 { | 40 { |
41 int index; | 41 int index; |
42 | 42 |
43 /* | 43 /* |
44 This differs from the wikipedia article. Source is from the | 44 This differs from the Wikipedia article. Source is from the |
45 Makoto Matsumoto and Takuji Nishimura code, with the following comment: | 45 Makoto Matsumoto and Takuji Nishimura code, with the following comment: |
46 */ | 46 */ |
47 /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */ | 47 /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */ |
48 /* In the previous versions, MSBs of the seed affect */ | 48 /* In the previous versions, MSBs of the seed affect */ |
49 /* only MSBs of the array mt[]. */ | 49 /* only MSBs of the array mt[]. */ |