From 9bf3bc9a729ddbc909c589b810a80e5be80c1083 Mon Sep 17 00:00:00 2001 From: John Koleszar Date: Mon, 31 Oct 2011 14:42:51 -0700 Subject: [PATCH] Correct SPLITMV clamping Prior to this fix, the clamping state of the last subblock partition dominated, whereas the correct behavior is to clamp if any partition needs clamping. This bug was introduced by v0.9.6-232-g6b25501 See also: [1]: http://code.google.com/p/webm/issues/detail?id=371 [2]: https://bugzilla.mozilla.org/show_bug.cgi?id=696390 Change-Id: I444db492b4c4f05f039c7da6f4216da8207dc138 --- vp8/decoder/decodemv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vp8/decoder/decodemv.c b/vp8/decoder/decodemv.c index 712a59757..5b913ae6b 100644 --- a/vp8/decoder/decodemv.c +++ b/vp8/decoder/decodemv.c @@ -273,6 +273,7 @@ static void decode_split_mv(vp8_reader *const bc, MODE_INFO *mi, } } + mbmi->need_to_clamp_mvs = 0; do /* for each subset j */ { int_mv leftmv, abovemv; @@ -289,7 +290,7 @@ static void decode_split_mv(vp8_reader *const bc, MODE_INFO *mi, blockmv = sub_mv_ref(bc, prob, abovemv, leftmv, best_mv, mvc); - mbmi->need_to_clamp_mvs = vp8_check_mv_bounds(&blockmv, + mbmi->need_to_clamp_mvs |= vp8_check_mv_bounds(&blockmv, mb_to_left_edge, mb_to_right_edge, mb_to_top_edge, -- 2.40.0