Commit 241943d3 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'b2bece5e'

* commit 'b2bece5e':
  hevc: always clip luma_log2_weight_denom
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents acbc2ed2 b2bece5e
...@@ -144,7 +144,7 @@ static void pred_weight_table(HEVCContext *s, GetBitContext *gb) ...@@ -144,7 +144,7 @@ static void pred_weight_table(HEVCContext *s, GetBitContext *gb)
uint8_t luma_weight_l1_flag[16]; uint8_t luma_weight_l1_flag[16];
uint8_t chroma_weight_l1_flag[16]; uint8_t chroma_weight_l1_flag[16];
s->sh.luma_log2_weight_denom = get_ue_golomb_long(gb); s->sh.luma_log2_weight_denom = av_clip_c(get_ue_golomb_long(gb), 0, 7);
if (s->sps->chroma_format_idc != 0) { if (s->sps->chroma_format_idc != 0) {
int delta = get_se_golomb(gb); 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(s->sh.luma_log2_weight_denom + delta, 0, 7);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment