[FFmpeg-devel] [PATCH 05/12] lavfi/vsrc_mandelbrot: replace round by lrint
Ganesh Ajjanagadde
gajjanagadde at gmail.com
Sat Dec 19 06:45:31 CET 2015
lrint is at least as fast, and is more accurate.
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
---
libavfilter/vsrc_mandelbrot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavfilter/vsrc_mandelbrot.c b/libavfilter/vsrc_mandelbrot.c
index 063b7d1..2f6944f 100644
--- a/libavfilter/vsrc_mandelbrot.c
+++ b/libavfilter/vsrc_mandelbrot.c
@@ -183,7 +183,7 @@ static void fill_from_cache(AVFilterContext *ctx, uint32_t *color, int *in_cidx,
int x;
if(p->p[1] > py)
break;
- x= round((p->p[0] - s->start_x) / scale + s->w/2);
+ x= lrint((p->p[0] - s->start_x) / scale + s->w/2);
if(x<0 || x >= s->w)
continue;
if(color) color[x] = p->val;
--
2.6.4
More information about the ffmpeg-devel
mailing list