Prune mesh motion search
Pruned mesh motion search based on how different the resulted
full MV from the starting MV. This mostly impacted the temporal
filtering motion search. This was on for speed 5.
Borg test results at speed 5(150f):
avg_psnr: ovr_psnr: ssim: speedup:
lowres: -0.025 -0.019 -0.022 0.7%
midres: 0.065 0.071 0.108 0.9%
STATS_CHANGED
Change-Id: Idfa2c2afb01f014e307e51c2313cf2f12741a47a
diff --git a/av1/encoder/mcomp.c b/av1/encoder/mcomp.c
index cf55cd4..5382a8f 100644
--- a/av1/encoder/mcomp.c
+++ b/av1/encoder/mcomp.c
@@ -2474,6 +2474,17 @@
if (var > exhuastive_thr) run_mesh_search = 1;
}
+ // TODO(yunqing): the following is used to reduce mesh search in temporal
+ // filtering. Can extend it to intrabc.
+ if (!use_intrabc_mesh_pattern && sf->mv_sf.prune_mesh_search) {
+ const int full_pel_mv_diff =
+ AOMMAX(abs(mvp_full->row - x->best_mv.as_mv.row),
+ abs(mvp_full->col - x->best_mv.as_mv.col));
+ if (full_pel_mv_diff <= 4) {
+ run_mesh_search = 0;
+ }
+ }
+
if (run_mesh_search) {
int var_ex;
MV tmp_mv_ex;