aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2017-01-19 13:19:10 +0100
committerPaul B Mahol <onemda@gmail.com>2017-01-19 13:19:10 +0100
commita340987e37f90af52f92b3a9c5124e98087a5806 (patch)
tree9217a0932be42db21f137e5a3549a4c92046041a /libavcodec
parentbe46eb71013906c94f8487b19a7fa0d1e8e4a16f (diff)
downloadffmpeg-a340987e37f90af52f92b3a9c5124e98087a5806.tar.gz
avcodec/pixlet: use av_clip_uintp2()
Found-by: Clément Bœsch <u@pkh.me> Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/pixlet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/pixlet.c b/libavcodec/pixlet.c
index 8e27655542..e9c383a482 100644
--- a/libavcodec/pixlet.c
+++ b/libavcodec/pixlet.c
@@ -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;