aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2009-03-08 14:46:10 +0000
committerMichael Niedermayer <michaelni@gmx.at>2009-03-08 14:46:10 +0000
commit52a6632a2b88b8a7171a47c796fa5f26db1ed490 (patch)
tree3cbd01dc42072f7b30b8adc11022f629a81d12fe
parentc957c8542676d092af1a812860c0b379738b7f01 (diff)
downloadffmpeg-52a6632a2b88b8a7171a47c796fa5f26db1ed490.tar.gz
Deprecate the Mersenne Twister.
Please use an ALFG, MLFG, LCG or KISS99 generator, MLFG&KISS99 provide higher quality numbers and all should be faster. Originally committed as revision 17874 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavutil/random.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavutil/random.h b/libavutil/random.h
index 4d16eb92df..90378822b2 100644
--- a/libavutil/random.h
+++ b/libavutil/random.h
@@ -38,8 +38,8 @@ typedef struct {
#if LIBAVUTIL_VERSION_MAJOR < 50
attribute_deprecated void av_init_random(unsigned int seed, AVRandomState *state);
#endif
-void av_random_init(AVRandomState *state, unsigned int seed); ///< To be inlined, the struct must be visible. So it does not 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).
+attribute_deprecated void av_random_init(AVRandomState *state, unsigned int seed); ///< To be inlined, the struct must be visible. So it does not make sense to try and keep it opaque with malloc/free-like calls.
+attribute_deprecated 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 from the interval [0,0xffffffff].
@@ -49,7 +49,7 @@ void av_random_generate_untempered_numbers(AVRandomState *state); ///< Regenerat
* 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)
+attribute_deprecated static inline unsigned int av_random(AVRandomState *state)
{
unsigned int y;
@@ -70,7 +70,7 @@ static inline unsigned int av_random(AVRandomState *state)
}
/** Returns a random number in the range [0-1] as double. */
-static inline double av_random_real1(AVRandomState *state)
+attribute_deprecated static inline double av_random_real1(AVRandomState *state)
{
/* divided by 2^32-1 */
return av_random(state) * (1.0 / 4294967296.0);