diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2015-09-08 14:35:24 -0400 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2015-09-16 19:35:53 -0400 |
commit | 43be86dbffb1dec280f63d0c5b7c7a51fc48dd0d (patch) | |
tree | 173aeb0cfa0e7078e09497465c25c9f0791bb903 | |
parent | 00a203b7bc735e20a5d0a0cc6857983c859d077e (diff) | |
download | libvpx-43be86dbffb1dec280f63d0c5b7c7a51fc48dd0d.tar libvpx-43be86dbffb1dec280f63d0c5b7c7a51fc48dd0d.tar.gz libvpx-43be86dbffb1dec280f63d0c5b7c7a51fc48dd0d.tar.bz2 libvpx-43be86dbffb1dec280f63d0c5b7c7a51fc48dd0d.zip |
vp10: remove double MV value check.
This has virtually no effect on coding efficiency, but it is more
logical from a theoretical perspective (since it makes no sense to
me that you would exclude a MV from a list just because it's sign-
inversed value is identical to a value already in a list), and it
also makes the code simpler (it removes a duplicate value check in
cases where signbias is equal between the two MVs being compared).
See issue 662.
Change-Id: I23e607c6de150b9f11d1372fb2868b813c322d37
-rw-r--r-- | vp10/common/mvref_common.c | 6 | ||||
-rw-r--r-- | vp10/common/mvref_common.h | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/vp10/common/mvref_common.c b/vp10/common/mvref_common.c index c0a84567f..267856065 100644 --- a/vp10/common/mvref_common.c +++ b/vp10/common/mvref_common.c @@ -125,8 +125,10 @@ static void find_mv_refs_idx(const VP10_COMMON *cm, const MACROBLOCKD *xd, } if (prev_frame_mvs->ref_frame[1] > INTRA_FRAME && - prev_frame_mvs->ref_frame[1] != ref_frame && - prev_frame_mvs->mv[1].as_int != prev_frame_mvs->mv[0].as_int) { +#if !CONFIG_MISC_FIXES + prev_frame_mvs->mv[1].as_int != prev_frame_mvs->mv[0].as_int && +#endif + prev_frame_mvs->ref_frame[1] != ref_frame) { int_mv mv = prev_frame_mvs->mv[1]; if (ref_sign_bias[prev_frame_mvs->ref_frame[1]] != ref_sign_bias[ref_frame]) { diff --git a/vp10/common/mvref_common.h b/vp10/common/mvref_common.h index 8e918b83a..0774f7035 100644 --- a/vp10/common/mvref_common.h +++ b/vp10/common/mvref_common.h @@ -180,8 +180,9 @@ static INLINE int_mv scale_mv(const MB_MODE_INFO *mbmi, int ref, ADD_MV_REF_LIST(scale_mv((mbmi), 0, ref_frame, ref_sign_bias), \ refmv_count, mv_ref_list, Done); \ if (has_second_ref(mbmi) && \ - (mbmi)->ref_frame[1] != ref_frame && \ - (mbmi)->mv[1].as_int != (mbmi)->mv[0].as_int) \ + (CONFIG_MISC_FIXES || \ + (mbmi)->mv[1].as_int != (mbmi)->mv[0].as_int) && \ + (mbmi)->ref_frame[1] != ref_frame) \ ADD_MV_REF_LIST(scale_mv((mbmi), 1, ref_frame, ref_sign_bias), \ refmv_count, mv_ref_list, Done); \ } \ |