]> granicus.if.org Git - libvpx/commitdiff
Small improvement in sub-pixel motion search
authorYunqing Wang <yunqingwang@google.com>
Tue, 4 Aug 2015 19:06:21 +0000 (12:06 -0700)
committerYunqing Wang <yunqingwang@google.com>
Tue, 4 Aug 2015 19:06:21 +0000 (12:06 -0700)
If the current best mv(namely, the search center) is still the best mv
after the first level search, the second level checks is skipped. This
patch doesn't change the bitstream. At speed 0, it speeds up the encoder
by 1% - 2%.

Change-Id: I054c91b884d3f7aef157436c061744562bd6506d

vp9/encoder/vp9_mcomp.c

index 081b99f9f1f211a70926ee82911d78707a2d6fb6..6e0c561c3ed8dbe912bfb6cf90c0b443303496b1 100644 (file)
@@ -735,7 +735,7 @@ int vp9_find_best_sub_pixel_tree(const MACROBLOCK *x,
       bc = tc;
     }
 
-    if (iters_per_step > 1)
+    if (iters_per_step > 1 && best_idx != -1)
       SECOND_LEVEL_CHECKS;
 
     tr = br;