Go to the source code of this file.
Data Structures | |
struct | AVLFG |
Functions | |
void | av_lfg_init (AVLFG *c, unsigned int seed) |
static unsigned int | av_lfg_get (AVLFG *c) |
Gets the next random unsigned 32-bit number using an ALFG. | |
static unsigned int | av_mlfg_get (AVLFG *c) |
Gets the next random unsigned 32-bit number using a MLFG. |
static unsigned int av_lfg_get | ( | AVLFG * | c | ) | [inline, static] |
Gets the next random unsigned 32-bit number using an ALFG.
Please also consider a simple LCG like state= state*1664525+1013904223, it may be good enough and faster for your specific use case.
Definition at line 38 of file lfg.h.
Referenced by ac3_decode_transform_coeffs_ch(), and ff_eac3_decode_transform_coeffs_aht_ch().
void av_lfg_init | ( | AVLFG * | c, | |
unsigned int | seed | |||
) |
static unsigned int av_mlfg_get | ( | AVLFG * | c | ) | [inline, static] |
Gets the next random unsigned 32-bit number using a MLFG.
Please also consider av_lfg_get() above, it is faster.