ref: 19222548a1d0ab0c0822060463dff18e2103666b
parent: 71e13f76619934446238d1d301244ac30bc314cd
parent: 3b4425c2ca9b5f7e736f2bbdab492648364fb550
author: Jerome Jiang <[email protected]>
date: Thu May 31 19:00:32 EDT 2018
Merge "VP9: Allow for bilinear subpel interp at speed 9 for high motion."
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -1340,6 +1340,7 @@
mi->ref_frame[1] = NONE;
mi->mv[0].as_int = 0;
mi->interp_filter = EIGHTTAP;
+ if (cpi->sf.default_interp_filter == BILINEAR) mi->interp_filter = BILINEAR;
xd->plane[0].pre[0] = yv12_mb[LAST_FRAME][0];
vp9_build_inter_predictors_sby(xd, mi_row, mi_col, bsize);
model_rd_for_sb_y(cpi, bsize, x, xd, &rate, &dist, &var_y, &sse_y);
@@ -1512,6 +1513,10 @@
int svc_mv_row = 0;
int no_scaling = 0;
unsigned int thresh_svc_skip_golden = 500;
+ if (cpi->sf.default_interp_filter == BILINEAR) {
+ best_pred_filter = BILINEAR;
+ filter_gf_svc = BILINEAR;
+ }
if (cpi->use_svc && svc->spatial_layer_id > 0) {
int layer =
LAYER_IDS_TO_IDX(svc->spatial_layer_id - 1, svc->temporal_layer_id,
@@ -1562,12 +1567,13 @@
// 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 && is_inter_block(xd->left_mi))
- filter_ref = xd->left_mi->interp_filter;
- else
- filter_ref = cm->interp_filter;
+ filter_ref = cm->interp_filter;
+ if (cpi->sf.default_interp_filter != BILINEAR) {
+ if (xd->above_mi && is_inter_block(xd->above_mi))
+ filter_ref = xd->above_mi->interp_filter;
+ else if (xd->left_mi && is_inter_block(xd->left_mi))
+ filter_ref = xd->left_mi->interp_filter;
+ }
// initialize mode decisions
vp9_rd_cost_reset(&best_rdc);
--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -682,6 +682,7 @@
sf->disable_16x16part_nonkey = 1;
// Allow for disabling GOLDEN reference, for CBR mode.
if (cpi->oxcf.rc_mode == VPX_CBR) sf->disable_golden_ref = 1;
+ if (cpi->rc.avg_frame_low_motion < 65) sf->default_interp_filter = BILINEAR;
}
if (sf->use_altref_onepass) {