lavfi/vf_cropdetect: replace round by lrint
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>
Wed, 16 Dec 2015 19:52:16 +0000 (14:52 -0500)
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>
Sat, 19 Dec 2015 17:34:08 +0000 (09:34 -0800)
lrint is at least as fast, and more accurate.

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
libavfilter/vf_cropdetect.c

index d456377..4a89875 100644 (file)
@@ -165,7 +165,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
     int w, h, x, y, shrink_by;
     AVDictionary **metadata;
     int outliers, last_y;
-    int limit = round(s->limit);
+    int limit = lrint(s->limit);
 
     // ignore first 2 frames - they may be empty
     if (++s->frame_nb > 0) {