summaryrefslogtreecommitdiff
path: root/libavutil/random.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2009-01-18 22:50:57 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2009-01-18 22:50:57 +0000
commitb0973124927d8ea5c8564abfd8f9c087696408e8 (patch)
tree5fea6e7b2168712516208df1d561f96a8a88bd80 /libavutil/random.c
parentef4c0bb1dcbd8438ec9a6126cd92e4b97d859217 (diff)
Deprecate av_init_random() in favour of av_random_init(), with a more natural
name and order of parameters. Originally committed as revision 16679 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/random.c')
-rw-r--r--libavutil/random.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavutil/random.c b/libavutil/random.c
index 79919882ee..bafdf7a377 100644
--- a/libavutil/random.c
+++ b/libavutil/random.c
@@ -36,7 +36,7 @@ see http://en.wikipedia.org/wiki/Mersenne_twister for an explanation of this alg
#define LOWER_MASK 0x7fffffff /* least significant r bits */
/** initializes mt[AV_RANDOM_N] with a seed */
-void av_init_random(unsigned int seed, AVRandomState *state)
+void av_random_init(AVRandomState *state, unsigned int seed)
{
int index;
@@ -55,6 +55,11 @@ void av_init_random(unsigned int seed, AVRandomState *state)
state->index= index; // will cause it to generate untempered numbers the first iteration
}
+void av_init_random(unsigned int seed, AVRandomState *state)
+{
+ av_random_init(state, seed);
+}
+
/** generate AV_RANDOM_N words at one time (which will then be tempered later) (av_random calls this; you shouldn't) */
void av_random_generate_untempered_numbers(AVRandomState *state)
{