Clear test failures and compiler warnings of MOTION_VAR
(1) Properly set params to default values to clear a unit test
failure when seg feature and motion_var are both on.
(2) Silenced compiling warnings in obmc variance functions.
Change-Id: Iaf4ee47c9941a228638d6046bcd1206f4a4f566a
diff --git a/aom_dsp/variance.c b/aom_dsp/variance.c
index 418332c..c5fb495 100644
--- a/aom_dsp/variance.c
+++ b/aom_dsp/variance.c
@@ -986,13 +986,13 @@
}
}
-#define OBMC_VAR(W, H) \
- unsigned int aom_obmc_variance##W##x##H##_c( \
- const uint8_t *pre, int pre_stride, const int32_t *wsrc, \
- const int32_t *mask, unsigned int *sse) { \
- int sum; \
- obmc_variance(pre, pre_stride, wsrc, mask, W, H, sse, &sum); \
- return *sse - (((int64_t)sum * sum) / (W * H)); \
+#define OBMC_VAR(W, H) \
+ unsigned int aom_obmc_variance##W##x##H##_c( \
+ const uint8_t *pre, int pre_stride, const int32_t *wsrc, \
+ const int32_t *mask, unsigned int *sse) { \
+ int sum; \
+ obmc_variance(pre, pre_stride, wsrc, mask, W, H, sse, &sum); \
+ return *sse - (unsigned int)(((int64_t)sum * sum) / (W * H)); \
}
#define OBMC_SUBPIX_VAR(W, H) \
diff --git a/aom_dsp/x86/obmc_variance_sse4.c b/aom_dsp/x86/obmc_variance_sse4.c
index 92bd9b9..f7cb46d 100644
--- a/aom_dsp/x86/obmc_variance_sse4.c
+++ b/aom_dsp/x86/obmc_variance_sse4.c
@@ -124,7 +124,7 @@
} else { \
obmc_variance_w8n(pre, pre_stride, wsrc, mask, sse, &sum, W, H); \
} \
- return *sse - (((int64_t)sum * sum) / (W * H)); \
+ return *sse - (unsigned int)(((int64_t)sum * sum) / (W * H)); \
}
#if CONFIG_EXT_PARTITION
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index f65df2f..a1448b5 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -11410,6 +11410,11 @@
mbmi->pred_mv[0].as_int = 0;
#endif // CONFIG_REF_MV
+ mbmi->motion_mode = SIMPLE_TRANSLATION;
+#if CONFIG_MOTION_VAR
+ av1_count_overlappable_neighbors(cm, xd, mi_row, mi_col);
+#endif
+
if (cm->interp_filter != BILINEAR) {
best_filter = EIGHTTAP_REGULAR;
if (cm->interp_filter == SWITCHABLE &&