FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
lfg.c File Reference
#include <inttypes.h>
#include <limits.h>
#include <math.h>
#include "lfg.h"
#include "crc.h"
#include "md5.h"
#include "error.h"
#include "intreadwrite.h"
#include "attributes.h"

Go to the source code of this file.

Functions

av_cold void av_lfg_init (AVLFG *c, unsigned int seed)
 
void av_bmg_get (AVLFG *lfg, double out[2])
 Get the next two numbers generated by a Box-Muller Gaussian generator using the random numbers issued by lfg. More...
 
int av_lfg_init_from_data (AVLFG *c, const uint8_t *data, unsigned int length)
 Seed the state of the ALFG using binary data. More...
 

Function Documentation

av_cold void av_lfg_init ( AVLFG c,
unsigned int  seed 
)
void av_bmg_get ( AVLFG lfg,
double  out[2] 
)

Get the next two numbers generated by a Box-Muller Gaussian generator using the random numbers issued by lfg.

Parameters
outarray where the two generated numbers are placed

Definition at line 49 of file lfg.c.

Referenced by fill_with_noise(), and main().

int av_lfg_init_from_data ( AVLFG c,
const uint8_t data,
unsigned int  length 
)

Seed the state of the ALFG using binary data.

Return value: 0 on success, negative value (AVERROR) on failure.

Definition at line 64 of file lfg.c.

Referenced by ac3_decode_frame().