You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
lavfi/vsrc_mandelbrot: replace round by lrint
lrint is at least as fast, and is more accurate. Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
This commit is contained in:
@@ -183,7 +183,7 @@ static void fill_from_cache(AVFilterContext *ctx, uint32_t *color, int *in_cidx,
|
|||||||
int x;
|
int x;
|
||||||
if(p->p[1] > py)
|
if(p->p[1] > py)
|
||||||
break;
|
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)
|
if(x<0 || x >= s->w)
|
||||||
continue;
|
continue;
|
||||||
if(color) color[x] = p->val;
|
if(color) color[x] = p->val;
|
||||||
|
Reference in New Issue
Block a user