Commit 9b2a964c authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/vp8: Fix undefined shifts in vp8_mc_luma()

Found-by: Clang -fsanitize=shift
Reported-by: 's avatarThierry Foucu <tfoucu@google.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 8617bc6f
......@@ -1721,8 +1721,8 @@ void vp8_mc_luma(VP8Context *s, VP8ThreadData *td, uint8_t *dst,
if (AV_RN32A(mv)) {
int src_linesize = linesize;
int mx = (mv->x << 1) & 7, mx_idx = subpel_idx[0][mx];
int my = (mv->y << 1) & 7, my_idx = subpel_idx[0][my];
int mx = (mv->x * 2) & 7, mx_idx = subpel_idx[0][mx];
int my = (mv->y * 2) & 7, my_idx = subpel_idx[0][my];
x_off += mv->x >> 2;
y_off += mv->y >> 2;
......
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