avcodec/pixlet: use av_clip_uintp2()

Found-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2017-01-19 13:19:10 +01:00
parent be46eb7101
commit a340987e37
1 changed files with 2 additions and 2 deletions

View File

@ -482,8 +482,8 @@ static void postprocess_chroma(AVFrame *frame, int w, int h, int depth)
for (j = 0; j < h; j++) {
for (i = 0; i < w; i++) {
dstu[i] = av_clip(add + srcu[i], 0, 32767) << shift;
dstv[i] = av_clip(add + srcv[i], 0, 32767) << shift;
dstu[i] = av_clip_uintp2(add + srcu[i], depth) << shift;
dstv[i] = av_clip_uintp2(add + srcv[i], depth) << shift;
}
dstu += strideu;
dstv += stridev;