mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-25 18:02:10 +08:00
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
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user