comparison random.h @ 612:84d82b1dcd99 libavutil

Drop the deprecated av_init_random() at the next libavutil major bump.
author stefano
date Sun, 18 Jan 2009 23:07:30 +0000
parents 70367460f323
children ed203c477511
comparison
equal deleted inserted replaced
611:a837b715e7d6 612:84d82b1dcd99
24 #ifndef AVUTIL_RANDOM_H 24 #ifndef AVUTIL_RANDOM_H
25 #define AVUTIL_RANDOM_H 25 #define AVUTIL_RANDOM_H
26 26
27 #define AV_RANDOM_N 624 27 #define AV_RANDOM_N 624
28 28
29 #include "avutil.h"
29 #include "common.h" 30 #include "common.h"
30 31
31 typedef struct { 32 typedef struct {
32 unsigned int mt[AV_RANDOM_N]; ///< the array for the state vector 33 unsigned int mt[AV_RANDOM_N]; ///< the array for the state vector
33 int index; ///< Current untempered value we use as the base. 34 int index; ///< Current untempered value we use as the base.
34 } AVRandomState; 35 } AVRandomState;
35 36
36 37
38 #if LIBAVUTIL_VERSION_MAJOR < 50
37 attribute_deprecated void av_init_random(unsigned int seed, AVRandomState *state); 39 attribute_deprecated void av_init_random(unsigned int seed, AVRandomState *state);
40 #endif
38 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. 41 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.
39 void av_random_generate_untempered_numbers(AVRandomState *state); ///< Regenerate the untempered numbers (must be done every 624 iterations, or it will loop). 42 void av_random_generate_untempered_numbers(AVRandomState *state); ///< Regenerate the untempered numbers (must be done every 624 iterations, or it will loop).
40 43
41 /** 44 /**
42 * Generates a random number from the interval [0,0xffffffff]. 45 * Generates a random number from the interval [0,0xffffffff].