ref: 3b4425c2ca9b5f7e736f2bbdab492648364fb550
parent: fe8c07172f4a8acc48386cec0d14aa09cb2495c1
author: Jerome Jiang <jianj@google.com>
date: Wed May 23 07:52:37 EDT 2018
VP9: Allow for bilinear subpel interp at speed 9 for high motion. Fixed some settings in nonrd pick mode to allow for frame-level bilinear to be set. On Galaxy S8+ it has 4% speed up on high motion clips. Almost the same for low motion. 0.17% quality loss on RTC. Change-Id: I044a7de020183754ba08bb6c96c5a78ba5c7fea2
--- 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) {