]> granicus.if.org Git - libvpx/commitdiff
Changed nearmv for one of the sub8x8 partitions
authorZoe Liu <zoeliu@google.com>
Thu, 30 Apr 2015 00:47:45 +0000 (17:47 -0700)
committerZoe Liu <zoeliu@google.com>
Fri, 1 May 2015 05:59:32 +0000 (22:59 -0700)
It is a minor change, but the essential idea is to use the mv of the
top right block as the nearmv for the bottom left partition in the
sub8x8 block. The change is under the experiment of NEWMVREF.

When all 13 experiments are on (except for INTRABC), the gain is +0.05%:
Worse on bowing_cif: -0.17%
Best on foreman_cif: +0.42%; and bridge_far_cif: +0.40%
The total 13 experiments achieved a gain of +6.97% against base.

Change-Id: I3a51d9e28b34b0943fe16a984d62bfb38304ebca

vp9/common/vp9_mvref_common.c

index c13f403696cdec1b816640435fa1dc35c63d2842..adbc232c0ba6d93264761266541a663ca7d8e776 100644 (file)
@@ -205,7 +205,9 @@ void vp9_append_sub8x8_mvs_for_idx(VP9_COMMON *cm, MACROBLOCKD *xd,
       near->as_int = mv_list[1].as_int;
       break;
     case 1:
+#if !CONFIG_NEWMVREF
     case 2:
+#endif  // !CONFIG_NEWMVREF
       nearest->as_int = bmi[0].as_mv[ref].as_int;
       for (n = 0; n < MAX_MV_REF_CANDIDATES; ++n)
         if (nearest->as_int != mv_list[n].as_int) {
@@ -213,6 +215,22 @@ void vp9_append_sub8x8_mvs_for_idx(VP9_COMMON *cm, MACROBLOCKD *xd,
           break;
         }
       break;
+#if CONFIG_NEWMVREF
+    case 2: {
+      int_mv candidates[1 + MAX_MV_REF_CANDIDATES];
+      candidates[0] = bmi[1].as_mv[ref];
+      candidates[1] = mv_list[0];
+      candidates[2] = mv_list[1];
+
+      nearest->as_int = bmi[0].as_mv[ref].as_int;
+      for (n = 0; n < 1 + MAX_MV_REF_CANDIDATES; ++n)
+        if (nearest->as_int != candidates[n].as_int) {
+          near->as_int = candidates[n].as_int;
+          break;
+        }
+      break;
+    }
+#endif  // CONFIG_NEWMVREF
     case 3: {
       int_mv candidates[2 + MAX_MV_REF_CANDIDATES];
       candidates[0] = bmi[1].as_mv[ref];