Commit 28943c4d authored by Michael Niedermayer's avatar Michael Niedermayer

vf_noise: Fix av_lfg_get() maximum value

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 62447248
......@@ -126,8 +126,8 @@ static int init_noise(NoiseContext *n, int comp)
} else {
double x1, x2, w, y1;
do {
x1 = 2.0 * av_lfg_get(lfg) / (float)RAND_MAX - 1.0;
x2 = 2.0 * av_lfg_get(lfg) / (float)RAND_MAX - 1.0;
x1 = 2.0 * av_lfg_get(lfg) / (float)UINT_MAX - 1.0;
x2 = 2.0 * av_lfg_get(lfg) / (float)UINT_MAX - 1.0;
w = x1 * x1 + x2 * x2;
} while (w >= 1.0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment