diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-04-15 21:37:49 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-04-15 21:44:50 +0200 |
commit | 7a2a421d736c7fb647675b797cff3bc3a959c0ae (patch) | |
tree | 9e921b2149da7ccd13c10838c749bee1f87e7283 /libavfilter/vf_histogram.c | |
parent | 34186832de2485599b6b2fae58bc9038d8626deb (diff) |
vf_histogram: avoid floats, unbreak fate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_histogram.c')
-rw-r--r-- | libavfilter/vf_histogram.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavfilter/vf_histogram.c b/libavfilter/vf_histogram.c index 9434e518b3..3daa482498 100644 --- a/libavfilter/vf_histogram.c +++ b/libavfilter/vf_histogram.c @@ -197,7 +197,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) h->max_hval = FFMAX(h->max_hval, h->histogram[i]); for (i = 0; i < outlink->w; i++) { - int col_height = h->level_height - (float)h->histogram[i] / h->max_hval * h->level_height; + int col_height = h->level_height - (h->histogram[i] * (int64_t)h->level_height + h->max_hval - 1) / h->max_hval; for (j = h->level_height - 1; j >= col_height; j--) { if (h->display_mode) { |