diff options
author | Peter Meerwald <pmeerw@pmeerw.net> | 2015-02-09 10:44:24 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2015-02-13 08:37:13 +0100 |
commit | eea769df322fac2601a96db195fa7dc8d12a8fbc (patch) | |
tree | e3f5c0effb48870aa1cd9a6dace8bafbc17c08dd /libavcodec/hevc_mvs.c | |
parent | faa8ffda2c513573733624784f0a7d0a4959d33e (diff) |
hevc: Use generic av_clip function, not C implementation
hevc seems to be the only place where the C implementation
of the av_clip function is explicitly selected, precluding
platform-specific optimizations
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec/hevc_mvs.c')
-rw-r--r-- | libavcodec/hevc_mvs.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/hevc_mvs.c b/libavcodec/hevc_mvs.c index 48cd234bd3..23ea2ec2ee 100644 --- a/libavcodec/hevc_mvs.c +++ b/libavcodec/hevc_mvs.c @@ -141,13 +141,13 @@ static av_always_inline void mv_scale(Mv *dst, Mv *src, int td, int tb) { int tx, scale_factor; - td = av_clip_int8_c(td); - tb = av_clip_int8_c(tb); + td = av_clip_int8(td); + tb = av_clip_int8(tb); tx = (0x4000 + abs(td / 2)) / td; - scale_factor = av_clip_c((tb * tx + 32) >> 6, -4096, 4095); - dst->x = av_clip_int16_c((scale_factor * src->x + 127 + + scale_factor = av_clip((tb * tx + 32) >> 6, -4096, 4095); + dst->x = av_clip_int16((scale_factor * src->x + 127 + (scale_factor * src->x < 0)) >> 8); - dst->y = av_clip_int16_c((scale_factor * src->y + 127 + + dst->y = av_clip_int16((scale_factor * src->y + 127 + (scale_factor * src->y < 0)) >> 8); } |