diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-02-21 15:46:38 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-21 15:50:03 +0100 |
commit | 114a2eb272077b68bc8e0f2ee8fd6fc85a8e07c2 (patch) | |
tree | d11ce3dc892c86e032185994f596cd7edbdf5f44 /libavcodec/hevc.c | |
parent | d301a13427d970671258593ef14dc87f8e24555a (diff) | |
download | ffmpeg-114a2eb272077b68bc8e0f2ee8fd6fc85a8e07c2.tar.gz |
avcodec: Use av_clip_uintp2() where possible
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/hevc.c')
-rw-r--r-- | libavcodec/hevc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c index e63088fae9..fdbaa28a97 100644 --- a/libavcodec/hevc.c +++ b/libavcodec/hevc.c @@ -148,10 +148,10 @@ static void pred_weight_table(HEVCContext *s, GetBitContext *gb) luma_log2_weight_denom = get_ue_golomb_long(gb); if (luma_log2_weight_denom < 0 || luma_log2_weight_denom > 7) av_log(s->avctx, AV_LOG_ERROR, "luma_log2_weight_denom %d is invalid\n", luma_log2_weight_denom); - s->sh.luma_log2_weight_denom = av_clip(luma_log2_weight_denom, 0, 7); + s->sh.luma_log2_weight_denom = av_clip_uintp2(luma_log2_weight_denom, 3); if (s->sps->chroma_format_idc != 0) { int delta = get_se_golomb(gb); - s->sh.chroma_log2_weight_denom = av_clip(s->sh.luma_log2_weight_denom + delta, 0, 7); + s->sh.chroma_log2_weight_denom = av_clip_uintp2(s->sh.luma_log2_weight_denom + delta, 3); } for (i = 0; i < s->sh.nb_refs[L0]; i++) { |