Commit e5dfa436 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/vc1_pred: Fix undefined shift in ff_vc1_pred_mv()

Found-by: Clang -fsanitize=shift
Reported-by: 's avatarThierry Foucu <tfoucu@google.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 1932f7e2
......@@ -231,8 +231,10 @@ void ff_vc1_pred_mv(VC1Context *v, int n, int dmv_x, int dmv_y,
else
mixedmv_pic = 0;
/* scale MV difference to be quad-pel */
dmv_x <<= 1 - s->quarter_sample;
dmv_y <<= 1 - s->quarter_sample;
if (!s->quarter_sample) {
dmv_x *= 2;
dmv_y *= 2;
}
wrap = s->b8_stride;
xy = s->block_index[n];
......
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