From 818b10396dce15081b6cb74d76a3b050a3296910 Mon Sep 17 00:00:00 2001 From: Scott LaVarnway Date: Tue, 11 Sep 2012 09:14:02 -0700 Subject: [PATCH] valgrind found motion vectors which exceeded frame boundaries Bug introduced in I02d034c70cd97b65025d59dd67c695e1db529f0b Change-Id: Ifb74ab659f3b3cf5f5b95046bacffb202d5b4d64 --- vp8/decoder/decodemv.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/vp8/decoder/decodemv.c b/vp8/decoder/decodemv.c index 6306eb19b..f0daf55c1 100644 --- a/vp8/decoder/decodemv.c +++ b/vp8/decoder/decodemv.c @@ -293,26 +293,24 @@ static void decode_split_mv(vp8_reader *const bc, MODE_INFO *mi, blockmv.as_mv.row += best_mv.as_mv.row; blockmv.as_mv.col = read_mvcomponent(bc, &mvc[1]) << 1; blockmv.as_mv.col += best_mv.as_mv.col; - - mbmi->need_to_clamp_mvs |= vp8_check_mv_bounds(&blockmv, - mb_to_left_edge, - mb_to_right_edge, - mb_to_top_edge, - mb_to_bottom_edge); } } else { blockmv.as_int = abovemv.as_int; - mbmi->need_to_clamp_mvs |= above_mb->mbmi.need_to_clamp_mvs; } } else { blockmv.as_int = leftmv.as_int; - mbmi->need_to_clamp_mvs |= left_mb->mbmi.need_to_clamp_mvs; } + mbmi->need_to_clamp_mvs |= vp8_check_mv_bounds(&blockmv, + mb_to_left_edge, + mb_to_right_edge, + mb_to_top_edge, + mb_to_bottom_edge); + { /* Fill (uniform) modes, mvs of jth subset. Must do it here because ensuing subsets can -- 2.40.0