Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-12-16 22:56:18 +0300
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-12-21 19:23:21 +0300
commitea2f04bffe13fb9f89778766ddab1bd4af71c538 (patch)
tree83f30dc72e76460bb8bae54ee9be0674c5437374 /libavfilter/vf_histogram.c
parentad795f6394563b11a3038d04ef1df6a9ce32bfdb (diff)
lavfi/vf_histogram: replace round by lrint
lrint is at least as fast, uses a superior rounding mode, and avoids an implicit cast. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Diffstat (limited to 'libavfilter/vf_histogram.c')
-rw-r--r--libavfilter/vf_histogram.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_histogram.c b/libavfilter/vf_histogram.c
index 8e6f531836..3f50f12e7c 100644
--- a/libavfilter/vf_histogram.c
+++ b/libavfilter/vf_histogram.c
@@ -281,7 +281,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
int col_height;
if (h->levels_mode)
- col_height = round(h->level_height * (1. - (log2(h->histogram[i] + 1) / max_hval_log)));
+ col_height = lrint(h->level_height * (1. - (log2(h->histogram[i] + 1) / max_hval_log)));
else
col_height = h->level_height - (h->histogram[i] * (int64_t)h->level_height + max_hval - 1) / max_hval;