aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-11 16:55:07 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-11 16:55:07 +0100
commit9b2a964ceeaba09fbd71a82ce58344614761e9ee (patch)
treef967179c8585a86778193e0923ee104b69ed2eb4
parent8617bc6ffaa80916bca42a2fa621ab29c82e9e0b (diff)
downloadffmpeg-9b2a964ceeaba09fbd71a82ce58344614761e9ee.tar.gz
avcodec/vp8: Fix undefined shifts in vp8_mc_luma()
Found-by: Clang -fsanitize=shift Reported-by: Thierry Foucu <tfoucu@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/vp8.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index 448710b279..4b3234714b 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -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;