Commit e7e37208 authored by Angie Chiang's avatar Angie Chiang

Enable av1_is_interp_needed in handle_inter_mode

If there no sub-pixel in both direction of MV,
the interp_filter is set to EIGHTTAP_REGULAR

Change-Id: I208c34906544f1937c57d78017999be6eddd9e87
parent cc715089
......@@ -519,9 +519,7 @@ static INLINE int has_subpel_mv_component(const MODE_INFO *const mi,
return 0;
}
#define CHECK_SUBPEL 0
static INLINE int av1_is_interp_needed(const MACROBLOCKD *const xd) {
#if CHECK_SUBPEL
MODE_INFO *const mi = xd->mi[0];
const int is_compound = has_second_ref(&mi->mbmi);
int ref;
......@@ -535,10 +533,6 @@ static INLINE int av1_is_interp_needed(const MACROBLOCKD *const xd) {
}
}
return 0;
#else
(void)xd;
return 1;
#endif
}
#if CONFIG_MOTION_VAR
......
......@@ -8316,21 +8316,12 @@ static int64_t handle_inter_mode(
mbmi->interp_filter = best_filter;
#endif
} else {
#if !CONFIG_DUAL_FILTER
int tmp_rs;
InterpFilter best_filter = mbmi->interp_filter;
rs = av1_get_switchable_rate(cpi, xd);
for (i = 1; i < SWITCHABLE_FILTERS; ++i) {
mbmi->interp_filter = i;
tmp_rs = av1_get_switchable_rate(cpi, xd);
if (tmp_rs < rs) {
rs = tmp_rs;
best_filter = i;
}
}
mbmi->interp_filter = best_filter;
#if CONFIG_DUAL_FILTER
int dir;
for (dir = 0; dir < 4; ++dir)
assert(mbmi->interp_filter[dir] == EIGHTTAP_REGULAR);
#else
assert(0);
assert(mbmi->interp_filter == EIGHTTAP_REGULAR);
#endif
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment