vsrc_mandelbrot: detect edges in interpol()
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 19 Nov 2011 21:22:21 +0000 (22:22 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 19 Nov 2011 21:22:21 +0000 (22:22 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/vsrc_mandelbrot.c

index 10e010f..629fae1 100644 (file)
@@ -252,6 +252,8 @@ static int interpol(MBContext *mb, uint32_t *color, int x, int y, int linesize)
         int ipolcd= (cc + dc);
         if(FFABS(ipolab - ipolcd) > 5)
             return 0;
+        if(FFABS(ac-bc)+FFABS(cc-dc) > 20)
+            return 0;
         ipol |= ((ipolab + ipolcd + 2)/4)<<s;
     }
     color[x + y*linesize]= ipol;