Add the new coding tool "speed_refs"
This patch will not cause any performance change regardless of whether
speed_refs is on or off.
This coding tool is targeted to speed up the encoder side reference
frame selection process. The essential idea is to have two scanning
passes for each superblock of size 64x64 and this CL lays out the
initial framework but no reference frame selection is done yet:
First scanning pass - To simplify the partition and the mode
candidates (e.g. considering nearestmv / nearmv / zeromv only) and
identify the best reference frame prediction candidates;
Second scanning pass - Use the best reference frame candidate(s)
obtained from the first pass to encode the current superblock.
Change-Id: I11266d468de3077271a5e866eebd341a8014d136
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index e820f19..1f4f161 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -9252,6 +9252,10 @@
*returnrate_nocoef = INT_MAX;
#endif // CONFIG_SUPERTX
+#if CONFIG_SPEED_REFS
+ memset(x->mbmi_ext->ref_mvs, 0, sizeof(x->mbmi_ext->ref_mvs));
+#endif // CONFIG_SPEED_REFS
+
for (ref_frame = LAST_FRAME; ref_frame <= ALTREF_FRAME; ++ref_frame) {
x->pred_mv_sad[ref_frame] = INT_MAX;
x->mbmi_ext->mode_context[ref_frame] = 0;