From: Zoe Liu Date: Thu, 30 Apr 2015 00:47:45 +0000 (-0700) Subject: Changed nearmv for one of the sub8x8 partitions X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9b083e82712652f20cad8b40bbed714ed70daeec;p=libvpx Changed nearmv for one of the sub8x8 partitions 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 --- diff --git a/vp9/common/vp9_mvref_common.c b/vp9/common/vp9_mvref_common.c index c13f40369..adbc232c0 100644 --- a/vp9/common/vp9_mvref_common.c +++ b/vp9/common/vp9_mvref_common.c @@ -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];