diff options
author | Peter Meerwald <pmeerw@pmeerw.net> | 2015-02-20 01:35:35 +0100 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2015-02-21 00:54:40 +0100 |
commit | 9abc80f1ed673141326341e26a05c3e1f78576d0 (patch) | |
tree | ca91fca7b76eec0d98a2b420f0220ec0df13a239 /libavcodec/h264_slice.c | |
parent | 76ce9bd8e26dcb3652240a1072840ff4011d7cdc (diff) |
libavcodec: Make use of av_clip functions
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r-- | libavcodec/h264_slice.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 4eb2767a5c..e1e87ebe68 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -853,9 +853,9 @@ static void implicit_weight_table(H264Context *h, int field) int w = 32; if (!h->ref_list[0][ref0].long_ref && !h->ref_list[1][ref1].long_ref) { int poc1 = h->ref_list[1][ref1].poc; - int td = av_clip(poc1 - poc0, -128, 127); + int td = av_clip_int8(poc1 - poc0); if (td) { - int tb = av_clip(cur_poc - poc0, -128, 127); + int tb = av_clip_int8(cur_poc - poc0); int tx = (16384 + (FFABS(td) >> 1)) / td; int dist_scale_factor = (tb * tx + 32) >> 8; if (dist_scale_factor >= -64 && dist_scale_factor <= 128) |