Mercurial > libavutil.hg
diff random.h @ 609:70367460f323 libavutil
Deprecate av_init_random() in favour of av_random_init(), with a more natural
name and order of parameters.
author | stefano |
---|---|
date | Sun, 18 Jan 2009 22:50:57 +0000 |
parents | bd4052d9050c |
children | 84d82b1dcd99 |
line wrap: on
line diff
--- a/random.h Sat Jan 17 12:21:01 2009 +0000 +++ b/random.h Sun Jan 18 22:50:57 2009 +0000 @@ -26,13 +26,16 @@ #define AV_RANDOM_N 624 +#include "common.h" + typedef struct { unsigned int mt[AV_RANDOM_N]; ///< the array for the state vector int index; ///< Current untempered value we use as the base. } AVRandomState; -void av_init_random(unsigned int seed, AVRandomState *state); ///< 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_init_random(unsigned int seed, AVRandomState *state); +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). /**