]> granicus.if.org Git - libvpx/commitdiff
changed to avoid code confusion
authorYaowu Xu <yaowu@google.com>
Mon, 22 Oct 2012 20:58:26 +0000 (13:58 -0700)
committerYaowu Xu <yaowu@google.com>
Mon, 22 Oct 2012 20:58:26 +0000 (13:58 -0700)
The previous double if and else code snippets were rather confusing.

Change-Id: Id1b6152fa0e471beb9b20407aa406e109c1471e3

vp8/common/findnearmv.c

index 285aabdb6968c138f3b8acc65c2be99bff6d5fa2..7c9ea1066fd5cea9070fef240cccbd1a10330b4e 100644 (file)
@@ -241,11 +241,10 @@ void vp8_find_best_ref_mvs(MACROBLOCKD *xd,
 
     // If we see a 0,0 vector for a second time we have reached the end of
     // the list of valid candidate vectors.
-    if (!this_mv.as_int)
-      if (zero_seen)
-        break;
-      else
-        zero_seen = TRUE;
+    if (!this_mv.as_int && zero_seen)
+      break;
+
+    zero_seen = zero_seen || !this_mv.as_int;
 
     vp8_clamp_mv(&this_mv,
                  xd->mb_to_left_edge - LEFT_TOP_MARGIN + 16,