mandelbrot: only check periodicity once for each period instead of twice.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-11-13 16:37:55 +01:00
parent 2fee131b9e
commit 1d06608732

View File

@ -194,7 +194,7 @@ static void draw_mandelbrot(AVFilterContext *ctx, uint32_t *color, int linesize,
zi= 2*zr*zi + ci;
zr= t + cr;
if(use_zyklus){
if(i && mb->zyklus[i>>1][0]==zr && mb->zyklus[i>>1][1]==zi)
if((i&1) && mb->zyklus[i>>1][0]==zr && mb->zyklus[i>>1][1]==zi)
break;
mb->zyklus[i][0]= zr;
mb->zyklus[i][1]= zi;