rtc: Fix to skip mv mode in nonrd_pickmode
Existing condition was skipping mv mode (when it has
same motion vector as previous tested mode) but only
against NEARESTMV mode.
Remove this condition and use the skip_this_mv
check but without the restriction to 0 motion.
This will allow for NEWMV to be skipped if it has
same motion vector as NEARMV.
This doesn't happen often so speedup is small,
~1% for street180p at speed 8.
Neutral/negligible change in bdrate for speed >= 7.
Change-Id: If870e42f018362006fef65ea5e3c2bcdbe6e9697
diff --git a/av1/encoder/nonrd_pickmode.c b/av1/encoder/nonrd_pickmode.c
index 70d4db3..bc59f96 100644
--- a/av1/encoder/nonrd_pickmode.c
+++ b/av1/encoder/nonrd_pickmode.c
@@ -1768,8 +1768,7 @@
if (inter_mv_mode == this_mode || comp_pred) continue;
if (mode_checked[inter_mv_mode][ref_frame] &&
frame_mv[this_mode][ref_frame].as_int ==
- frame_mv[inter_mv_mode][ref_frame].as_int &&
- frame_mv[inter_mv_mode][ref_frame].as_int == 0) {
+ frame_mv[inter_mv_mode][ref_frame].as_int) {
skip_this_mv = 1;
break;
}
@@ -1777,11 +1776,6 @@
if (skip_this_mv) continue;
- if (this_mode != NEARESTMV && !comp_pred &&
- frame_mv[this_mode][ref_frame].as_int ==
- frame_mv[NEARESTMV][ref_frame].as_int)
- continue;
-
mi->mode = this_mode;
mi->mv[0].as_int = frame_mv[this_mode][ref_frame].as_int;
mi->mv[1].as_int = 0;