]> granicus.if.org Git - libvpx/commitdiff
VP9: Allow for bilinear subpel interp at speed 9 for high motion.
authorJerome Jiang <jianj@google.com>
Wed, 23 May 2018 18:52:37 +0000 (11:52 -0700)
committerJerome Jiang <jianj@google.com>
Thu, 31 May 2018 22:13:34 +0000 (15:13 -0700)
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

vp9/encoder/vp9_pickmode.c
vp9/encoder/vp9_speed_features.c

index 60d5c89b176b1ece6a99785621e55edab5291d3f..45c96fdc5057849e56e627d257e310f3b4fa83d1 100644 (file)
@@ -1340,6 +1340,7 @@ static void recheck_zeromv_after_denoising(
     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 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, TileDataEnc *tile_data,
   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 @@ void vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, TileDataEnc *tile_data,
   // 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);
index d2842697dae2741ff8b9848bb78c081c4b0867ec..f7e97cebc74b122c57b86af4be1c34edff1cd489 100644 (file)
@@ -682,6 +682,7 @@ static void set_rt_speed_feature_framesize_independent(
       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) {