aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-21 20:40:17 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-21 20:40:17 +0100
commitd1c705087f52a4c39ae982d46d91c35810c1546f (patch)
treea5f8325663c7c55d0029655ef3cfaa7d3d6d9107
parentd74c8d3adac889c57b60644c4c494c57754b244a (diff)
downloadffmpeg-d1c705087f52a4c39ae982d46d91c35810c1546f.tar.gz
avcodec/hevc_mvs: Use av_clip_intp2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/hevc_mvs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/hevc_mvs.c b/libavcodec/hevc_mvs.c
index 318e7a2755..7e3466981a 100644
--- a/libavcodec/hevc_mvs.c
+++ b/libavcodec/hevc_mvs.c
@@ -118,7 +118,7 @@ static av_always_inline void mv_scale(Mv *dst, Mv *src, int td, int tb)
td = av_clip_int8(td);
tb = av_clip_int8(tb);
tx = (0x4000 + abs(td / 2)) / td;
- scale_factor = av_clip((tb * tx + 32) >> 6, -4096, 4095);
+ scale_factor = av_clip_intp2((tb * tx + 32) >> 6, 12);
dst->x = av_clip_int16((scale_factor * src->x + 127 +
(scale_factor * src->x < 0)) >> 8);
dst->y = av_clip_int16((scale_factor * src->y + 127 +