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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/2/head
Michael Niedermayer 13 years ago
parent 2fee131b9e
commit 1d06608732
  1. 2
      libavfilter/vsrc_mandelbrot.c

@ -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;

Loading…
Cancel
Save