]> git.sesse.net Git - ffmpeg/commitdiff
lavfi/af_dynaudnorm: replace round by lrint
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>
Wed, 16 Dec 2015 19:51:09 +0000 (14:51 -0500)
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>
Mon, 21 Dec 2015 16:22:23 +0000 (08:22 -0800)
lrint is at least as fast, uses a superior rounding mode, and avoids an
implicit cast.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
libavfilter/af_dynaudnorm.c

index 1085189665a23889724b1f03205c7c135928d8ef..1a5fc48dabad0826f11ee1b6a9b2d63328a85367 100644 (file)
@@ -135,7 +135,7 @@ static int query_formats(AVFilterContext *ctx)
 
 static inline int frame_size(int sample_rate, int frame_len_msec)
 {
-    const int frame_size = round((double)sample_rate * (frame_len_msec / 1000.0));
+    const int frame_size = lrint((double)sample_rate * (frame_len_msec / 1000.0));
     return frame_size + (frame_size % 2);
 }