git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
ad795f6
)
lavfi/vf_histogram: replace round by lrint
author
Ganesh Ajjanagadde
<gajjanagadde@gmail.com>
Wed, 16 Dec 2015 19:56:18 +0000
(14:56 -0500)
committer
Ganesh Ajjanagadde
<gajjanagadde@gmail.com>
Mon, 21 Dec 2015 16:23:21 +0000
(08:23 -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/vf_histogram.c
patch
|
blob
|
history
diff --git
a/libavfilter/vf_histogram.c
b/libavfilter/vf_histogram.c
index
8e6f531
..
3f50f12
100644
(file)
--- 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;