ref: 424982bc41d84fadcd9e2054ecf47d45593f484f
parent: 5e9c5dfdf04adef6b42abeff2ff2a902600dfbaf
parent: d9c417cb49a155f8403254aa23c403af81ccbcf8
author: Angie Chiang <[email protected]>
date: Thu Jun 23 14:56:26 EDT 2016
Merge "set interp_filter to SWITCHABLE_FILTER for intra block"
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -1299,11 +1299,8 @@
MODE_INFO *const mi = xd->mi[0];
INTERP_FILTER filter_ref;
- if (xd->above_mi)
- filter_ref = xd->above_mi->interp_filter;
- else if (xd->left_mi)
- filter_ref = xd->left_mi->interp_filter;
- else
+ filter_ref = vp9_get_pred_context_switchable_interp(xd);
+ if (filter_ref == SWITCHABLE_FILTERS)
filter_ref = EIGHTTAP;
mi->sb_type = bsize;
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -1410,9 +1410,13 @@
x->skip_encode = cpi->sf.skip_encode_frame && x->q_index < QIDX_SKIP_THRESH;
x->skip = 0;
- if (xd->above_mi)
+ // Instead of using vp9_get_pred_context_switchable_interp(xd) to assign
+ // filter_ref, we use a less strict condition on assigning filter_ref.
+ // This is to reduce the probabily of entering the flow of not assigning
+ // filter_ref and then skip filter search.
+ if (xd->above_mi && is_inter_block(xd->above_mi))
filter_ref = xd->above_mi->interp_filter;
- else if (xd->left_mi)
+ else if (xd->left_mi && is_inter_block(xd->left_mi))
filter_ref = xd->left_mi->interp_filter;
else
filter_ref = cm->interp_filter;
@@ -1976,6 +1980,10 @@
mi->mode = best_mode;
mi->ref_frame[0] = best_ref_frame;
x->skip_txfm[0] = best_mode_skip_txfm;
+
+ if (!is_inter_block(mi)) {
+ mi->interp_filter = SWITCHABLE_FILTERS;
+ }
if (reuse_inter_pred && best_pred != NULL) {
if (best_pred->data != orig_dst.buf && is_inter_mode(mi->mode)) {