Commit b8edf916 authored by Paul B Mahol's avatar Paul B Mahol

lavfi/histeq: fix out of array write

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 161dee43
...@@ -235,7 +235,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpic) ...@@ -235,7 +235,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpic)
dst[x + histeq->rgba_map[R]] = r; dst[x + histeq->rgba_map[R]] = r;
dst[x + histeq->rgba_map[G]] = g; dst[x + histeq->rgba_map[G]] = g;
dst[x + histeq->rgba_map[B]] = b; dst[x + histeq->rgba_map[B]] = b;
oluma = (55 * r + 182 * g + 19 * b) >> 8; oluma = av_clip_uint8((55 * r + 182 * g + 19 * b) >> 8);
histeq->out_histogram[oluma]++; histeq->out_histogram[oluma]++;
} }
} }
......
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