Commit ea2f04bf authored by Ganesh Ajjanagadde's avatar Ganesh Ajjanagadde

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: 's avatarGanesh Ajjanagadde <gajjanagadde@gmail.com>
parent ad795f63
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment