Reduce number of ref to one in simple_motion_search
Simple motion search's overhead starts to become significant on speed
settings >= 3. Disabling this it helps us to speed up by about 0.5%.
Performance on midres:
SPD | AVG_PSNR | OVR_PSNR | SSIM | AVG_SPDUP |
1 | +0.002 | +0.001 | +0.010 | +0.134% |
2 | -0.002 | +0.004 | -0.016 | +1.324% |
3 | +0.008 | +0.005 | +0.024 | +1.322% |
4 | +0.008 | +0.006 | +0.016 | +0.896% |
STATS_CHANGED
Change-Id: Iac1c9b97cb97c79147a6682695508d4ad9a87264
diff --git a/av1/encoder/partition_strategy.c b/av1/encoder/partition_strategy.c
index e8270b3..23c2ef4 100644
--- a/av1/encoder/partition_strategy.c
+++ b/av1/encoder/partition_strategy.c
@@ -222,8 +222,9 @@
cpi->ref_frame_flags & av1_ref_frame_flag_list[ALTREF_FRAME]);
// Setting up motion search
- const int ref_list[] = { LAST_FRAME, ALTREF_FRAME };
- const int num_refs = 2;
+ const int ref_list[] = { cpi->rc.is_src_frame_alt_ref ? ALTREF_FRAME
+ : LAST_FRAME };
+ const int num_refs = 1;
const int use_subpixel = 1;
unsigned int int_features[FEATURE_SIZE_SMS_PRUNE_PART - 1];