Unified · Split
| @@ -1299,11 +1299,8 @@ static void set_mode_info_seg_skip(MACROBLOCK *x, TX_MODE tx_mode, · 1298 unmodified lines | ||
| 1299 | 1299 | MODE_INFO *const mi = xd->mi[0]; |
| 1300 | 1300 | INTERP_FILTER filter_ref; |
| 1301 | 1301 | |
| 1302 | − if (xd->above_mi) | |
| 1303 | − filter_ref = xd->above_mi->interp_filter; | |
| 1304 | − else if (xd->left_mi) | |
| 1305 | − filter_ref = xd->left_mi->interp_filter; | |
| 1306 | − else | |
| 1302 | + filter_ref = vp9_get_pred_context_switchable_interp(xd); | |
| 1303 | + if (filter_ref == SWITCHABLE_FILTERS) | |
| 1307 | 1304 | filter_ref = EIGHTTAP; |
| 1308 | 1305 | |
| 1309 | 1306 | mi->sb_type = bsize; |
| @@ -1410,9 +1410,13 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, · 1409 unmodified lines | ||
| 1410 | 1410 | x->skip_encode = cpi->sf.skip_encode_frame && x->q_index < QIDX_SKIP_THRESH; |
| 1411 | 1411 | x->skip = 0; |
| 1412 | 1412 | |
| 1413 | − if (xd->above_mi) | |
| 1413 | + // Instead of using vp9_get_pred_context_switchable_interp(xd) to assign | |
| 1414 | + // filter_ref, we use a less strict condition on assigning filter_ref. | |
| 1415 | + // This is to reduce the probabily of entering the flow of not assigning | |
| 1416 | + // filter_ref and then skip filter search. | |
| 1417 | + if (xd->above_mi && is_inter_block(xd->above_mi)) | |
| 1414 | 1418 | filter_ref = xd->above_mi->interp_filter; |
| 1415 | − else if (xd->left_mi) | |
| 1419 | + else if (xd->left_mi && is_inter_block(xd->left_mi)) | |
| 1416 | 1420 | filter_ref = xd->left_mi->interp_filter; |
| 1417 | 1421 | else |
| 1418 | 1422 | filter_ref = cm->interp_filter; |
| @@ -1977,6 +1981,10 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, · 558 unmodified lines | ||
| 1977 | 1981 | mi->ref_frame[0] = best_ref_frame; |
| 1978 | 1982 | x->skip_txfm[0] = best_mode_skip_txfm; |
| 1979 | 1983 | |
| 1984 | + if (!is_inter_block(mi)) { | |
| 1985 | + mi->interp_filter = SWITCHABLE_FILTERS; | |
| 1986 | + } | |
| 1987 | + | |
| 1980 | 1988 | if (reuse_inter_pred && best_pred != NULL) { |
| 1981 | 1989 | if (best_pred->data != orig_dst.buf && is_inter_mode(mi->mode)) { |
| 1982 | 1990 | #if CONFIG_VP9_HIGHBITDEPTH |