summaryrefslogtreecommitdiff
path: root/libavfilter/vf_histogram.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-02-09 12:25:55 +0000
committerPaul B Mahol <onemda@gmail.com>2013-02-09 12:27:49 +0000
commite5670cb8a1c9467a4a31dcb10f31bf63e44aeb69 (patch)
tree13534a3089ffcd3a451b2c48c30129297040332b /libavfilter/vf_histogram.c
parentb05830169d97f11509a29ed211e79e54f7dece5d (diff)
lavfi/histogram: make it C90 compliant
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/vf_histogram.c')
-rw-r--r--libavfilter/vf_histogram.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavfilter/vf_histogram.c b/libavfilter/vf_histogram.c
index 6371bfc584..22de387587 100644
--- a/libavfilter/vf_histogram.c
+++ b/libavfilter/vf_histogram.c
@@ -196,6 +196,8 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in)
switch (h->mode) {
case MODE_LEVELS:
for (k = 0; k < h->ncomp; k++) {
+ int start = k * (h->level_height + h->scale_height);
+
for (i = 0; i < in->video->h; i++) {
src = in->data[k] + i * in->linesize[k];
for (j = 0; j < in->video->w; j++)
@@ -205,7 +207,6 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *in)
for (i = 0; i < 256; i++)
h->max_hval = FFMAX(h->max_hval, h->histogram[i]);
- int start = k * (h->level_height + h->scale_height);
for (i = 0; i < outlink->w; i++) {
int col_height = h->level_height - (float)h->histogram[i] / h->max_hval * h->level_height;