diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-02-21 11:24:11 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-21 11:27:24 +0100 |
commit | 66d79aa2e1351ac38f3469bba6a8b1fcaefa0c20 (patch) | |
tree | c078cd42cba697c15473aeaae0a127bd0e64a74a /libavcodec/h264_direct.c | |
parent | 1253091d6f7b2910f3a53ab648fb3d0cb1a4b4ee (diff) | |
parent | 9abc80f1ed673141326341e26a05c3e1f78576d0 (diff) | |
download | ffmpeg-66d79aa2e1351ac38f3469bba6a8b1fcaefa0c20.tar.gz |
Merge commit '9abc80f1ed673141326341e26a05c3e1f78576d0'
* commit '9abc80f1ed673141326341e26a05c3e1f78576d0':
libavcodec: Make use of av_clip functions
Conflicts:
libavcodec/takdec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_direct.c')
-rw-r--r-- | libavcodec/h264_direct.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c index 3289fe4700..2e4c2b0b73 100644 --- a/libavcodec/h264_direct.c +++ b/libavcodec/h264_direct.c @@ -37,13 +37,13 @@ static int get_scale_factor(H264Context *const h, int poc, int poc1, int i) { int poc0 = h->ref_list[0][i].poc; - int td = av_clip(poc1 - poc0, -128, 127); + int td = av_clip_int8(poc1 - poc0); if (td == 0 || h->ref_list[0][i].long_ref) { return 256; } else { - int tb = av_clip(poc - poc0, -128, 127); + int tb = av_clip_int8(poc - poc0); int tx = (16384 + (FFABS(td) >> 1)) / td; - return av_clip((tb * tx + 32) >> 6, -1024, 1023); + return av_clip_intp2((tb * tx + 32) >> 6, 10); } } |