summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-07-28 15:44:00 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-07-28 15:44:00 +0000
commite80d47411902929c3acecb7c2e3a8116095f4c70 (patch)
tree1b090982e40399441fbb819626de528e1c98df4d
parentaa6a89aa792ec62dfa08d44e29406ad96aa8103e (diff)
Warning about MTs speed.
Originally committed as revision 14460 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavutil/random.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/libavutil/random.h b/libavutil/random.h
index 25eaf589da..1e10ae48e5 100644
--- a/libavutil/random.h
+++ b/libavutil/random.h
@@ -35,7 +35,14 @@ typedef struct {
void av_init_random(unsigned int seed, AVRandomState *state); ///< to be inlined, the struct must be visible, so it doesn't make sense to try and keep it opaque with malloc/free like calls
void av_random_generate_untempered_numbers(AVRandomState *state); ///< Regenerate the untempered numbers (must be done every 624 iterations, or it will loop)
-/** generates a random number on [0,0xffffffff]-interval */
+/**
+ * generates a random number on [0,0xffffffff]-interval
+ *
+ * Please do NOT use the mersenne twister, it is slow, use the random generator
+ * from lfg.c/h or a simple LCG like state= state*1664525+1013904223.
+ * If you still choose to use MT, expect that you will have to provide
+ * some evidence that it makes a difference for the case where you use it.
+ */
static inline unsigned int av_random(AVRandomState *state)
{
unsigned int y;