[FFmpeg-cvslog] mandelbrot: use period detection depening on left pixel and not the

Michael Niedermayer git at videolan.org
Sun Nov 13 17:05:37 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Nov 13 15:14:25 2011 +0100| [2fee131b9e5fa17b2fac023eaac53984a9d7cb40] | committer: Michael Niedermayer

mandelbrot: use period detection depening on left pixel and not the
previous calculated pixel, this is more accurate due to the last
calculated often being farther away.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2fee131b9e5fa17b2fac023eaac53984a9d7cb40
---

 libavfilter/vsrc_mandelbrot.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libavfilter/vsrc_mandelbrot.c b/libavfilter/vsrc_mandelbrot.c
index 375ec7c..7bcf3b7 100644
--- a/libavfilter/vsrc_mandelbrot.c
+++ b/libavfilter/vsrc_mandelbrot.c
@@ -178,6 +178,8 @@ static void draw_mandelbrot(AVFilterContext *ctx, uint32_t *color, int linesize,
             if(color[x + y*linesize] & 0xFF000000)
                 continue;
 
+            use_zyklus= (x==0 || color[x-1 + y*linesize] == 0xFF000000);
+
             for(i=0; i<mb->maxiter; i++){
                 double t;
                 if(zr*zr + zi*zi > mb->bailout){
@@ -198,7 +200,6 @@ static void draw_mandelbrot(AVFilterContext *ctx, uint32_t *color, int linesize,
                     mb->zyklus[i][1]= zi;
                 }
             }
-            use_zyklus = !c;
             c |= 0xFF000000;
             color[x + y*linesize]= c;
             if(next_cidx < mb->cache_allocated){



More information about the ffmpeg-cvslog mailing list