git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d74c8d3
)
avcodec/hevc_mvs: Use av_clip_intp2()
author
Michael Niedermayer
<michaelni@gmx.at>
Sat, 21 Feb 2015 19:40:17 +0000
(20:40 +0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sat, 21 Feb 2015 19:40:17 +0000
(20:40 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/hevc_mvs.c
patch
|
blob
|
history
diff --git
a/libavcodec/hevc_mvs.c
b/libavcodec/hevc_mvs.c
index
318e7a2
..
7e34669
100644
(file)
--- 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 +