avfilter/vf_noise: Use a separate seed for each plane
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 16 Oct 2014 13:05:17 +0000 (15:05 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 16 Oct 2014 13:05:17 +0000 (15:05 +0200)
This should reduce the correlation between planes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/vf_noise.c

index a7ef35c..6218ed0 100644 (file)
@@ -110,7 +110,7 @@ static av_cold int init_noise(NoiseContext *n, int comp)
     if (!noise)
         return AVERROR(ENOMEM);
 
-    av_lfg_init(&fp->lfg, fp->seed);
+    av_lfg_init(&fp->lfg, fp->seed + comp*31415U);
 
     for (i = 0, j = 0; i < MAX_NOISE; i++, j++) {
         if (flags & NOISE_UNIFORM) {