Commit 27191b82 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/vp9: Fix undefined shifts in decode_frame_header()

Found-by: Clang -fsanitize=shift
Reported-by: 's avatarThierry Foucu <tfoucu@google.com>
Reviewed-by: 's avatar"Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent b7cb8b3d
...@@ -689,10 +689,10 @@ static int decode_frame_header(AVCodecContext *ctx, ...@@ -689,10 +689,10 @@ static int decode_frame_header(AVCodecContext *ctx,
for (j = 1; j < 4; j++) { for (j = 1; j < 4; j++) {
s->segmentation.feat[i].lflvl[j][0] = s->segmentation.feat[i].lflvl[j][0] =
av_clip_uintp2(lflvl + ((s->lf_delta.ref[j] + av_clip_uintp2(lflvl + ((s->lf_delta.ref[j] +
s->lf_delta.mode[0]) << sh), 6); s->lf_delta.mode[0]) * (1 << sh)), 6);
s->segmentation.feat[i].lflvl[j][1] = s->segmentation.feat[i].lflvl[j][1] =
av_clip_uintp2(lflvl + ((s->lf_delta.ref[j] + av_clip_uintp2(lflvl + ((s->lf_delta.ref[j] +
s->lf_delta.mode[1]) << sh), 6); s->lf_delta.mode[1]) * (1 << sh)), 6);
} }
} }
......
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