libavutil/lfg.h File Reference

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.


Function Documentation

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 
)

Definition at line 27 of file lfg.c.

Referenced by ac3_decode_init().

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.

Definition at line 48 of file lfg.h.


Generated on Fri Oct 26 02:35:46 2012 for FFmpeg by  doxygen 1.5.8