Revision b0973124

View differences:

libavutil/avutil.h
35 35
#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
36 36

  
37 37
#define LIBAVUTIL_VERSION_MAJOR 49
38
#define LIBAVUTIL_VERSION_MINOR 13
38
#define LIBAVUTIL_VERSION_MINOR 14
39 39
#define LIBAVUTIL_VERSION_MICRO  0
40 40

  
41 41
#define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
libavutil/random.c
36 36
#define LOWER_MASK 0x7fffffff /* least significant r bits */
37 37

  
38 38
/** initializes mt[AV_RANDOM_N] with a seed */
39
void av_init_random(unsigned int seed, AVRandomState *state)
39
void av_random_init(AVRandomState *state, unsigned int seed)
40 40
{
41 41
    int index;
42 42

  
......
55 55
    state->index= index; // will cause it to generate untempered numbers the first iteration
56 56
}
57 57

  
58
void av_init_random(unsigned int seed, AVRandomState *state)
59
{
60
    av_random_init(state, seed);
61
}
62

  
58 63
/** generate AV_RANDOM_N words at one time (which will then be tempered later) (av_random calls this; you shouldn't) */
59 64
void av_random_generate_untempered_numbers(AVRandomState *state)
60 65
{
libavutil/random.h
26 26

  
27 27
#define AV_RANDOM_N 624
28 28

  
29
#include "common.h"
30

  
29 31
typedef struct {
30 32
    unsigned int mt[AV_RANDOM_N]; ///< the array for the state vector
31 33
    int index; ///< Current untempered value we use as the base.
32 34
} AVRandomState;
33 35

  
34 36

  
35
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.
37
attribute_deprecated void av_init_random(unsigned int seed, AVRandomState *state);
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.
36 39
void av_random_generate_untempered_numbers(AVRandomState *state); ///< Regenerate the untempered numbers (must be done every 624 iterations, or it will loop).
37 40

  
38 41
/**

Also available in: Unified diff