[FFmpeg-cvslog] mandelbrot: make mincol description and code match.

Michael Niedermayer git at videolan.org
Wed Nov 16 15:23:46 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Nov 16 04:22:36 2011 +0100| [974d25e2db96f95770f92a616b7508c9cbf62804] | committer: Michael Niedermayer

mandelbrot: make mincol description and code match.

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

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

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

diff --git a/libavfilter/vsrc_mandelbrot.c b/libavfilter/vsrc_mandelbrot.c
index 194d866..fb4bd35 100644
--- a/libavfilter/vsrc_mandelbrot.c
+++ b/libavfilter/vsrc_mandelbrot.c
@@ -98,7 +98,7 @@ static const AVOption mandelbrot_options[] = {
     {"black",       "set black mode",                0, AV_OPT_TYPE_CONST, {.dbl=BLACK}, INT_MIN, INT_MAX, 0, "inner" },
     {"period",      "set period mode",               0, AV_OPT_TYPE_CONST, {.dbl=PERIOD}, INT_MIN, INT_MAX, 0, "inner" },
     {"convergence", "show time until convergence",   0, AV_OPT_TYPE_CONST, {.dbl=CONVTIME}, INT_MIN, INT_MAX, 0, "inner" },
-    {"mincol",      "color based on point closest to the origin of the cycle",   0, AV_OPT_TYPE_CONST, {.dbl=MINCOL}, INT_MIN, INT_MAX, 0, "inner" },
+    {"mincol",      "color based on point closest to the origin of the iterations",   0, AV_OPT_TYPE_CONST, {.dbl=MINCOL}, INT_MIN, INT_MAX, 0, "inner" },
 
     {NULL},
 };
@@ -275,7 +275,7 @@ static void draw_mandelbrot(AVFilterContext *ctx, uint32_t *color, int linesize,
                     int j;
                     double closest=9999;
                     int closest_index=0;
-                    for(j=i-1; j; j--)
+                    for(j=i-1; j>=0; j--)
                         if(SQR(mb->zyklus[j][0]) + SQR(mb->zyklus[j][1]) < closest){
                             closest= SQR(mb->zyklus[j][0]) + SQR(mb->zyklus[j][1]);
                             closest_index= j;



More information about the ffmpeg-cvslog mailing list