Fix an assertion error in full_pixel_motion_search_based_split.
Set motion_mode to SIMPLE_TRANSLATION before building the interpredictor
in full_pixel_motion_search_based_split.
We will get a STATS_CHANGED because the model previous used motion_modes
other than SIMPLE_TRANSLATION to make prediction.
Performance:
BDBR | Time Reduction
-0.003% | < 0.1 %
Performance is tested on midres speed 1 lowbitdepth.
BDBR is calculated over 60 frames, time reduction over 30 frames.
STATS_CHANGED
BUG=aomedia:2247
Change-Id: I1fb281b69ea0373edb0ae7886c3b28e31e0b8ea8
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index 845830b..c8ff326 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -3372,11 +3372,15 @@
static void get_res_var_features(AV1_COMP *const cpi, MACROBLOCK *x, int mi_row,
int mi_col, BLOCK_SIZE bsize,
float *features) {
+ // TODO(chiyotsai@google.com): The data this model trained on did not also use
+ // SIMPLE_TRANSLATION to build the inter_predictor. Retraining and tuning the
+ // model with the correct data should give better performance.
assert(mi_size_wide[bsize] == mi_size_high[bsize]);
AV1_COMMON *const cm = &cpi->common;
MACROBLOCKD *xd = &x->e_mbd;
MB_MODE_INFO *mbmi = xd->mi[0];
+ mbmi->motion_mode = SIMPLE_TRANSLATION;
mbmi->ref_frame[1] = NONE_FRAME;
mbmi->sb_type = bsize;