shithub: libvpx

Download patch

ref: 23831545a0a148a066b905c0f1e011375c97d790
parent: f1f74a4e6c62c10cf5a810d870797184e0661341
parent: ad7e76531950869be24ed3679b9c802bafa85d04
author: Marco Paniconi <marpan@google.com>
date: Mon Nov 30 14:00:39 EST 2015

Merge "vp9 denoiser: Fix to re-evaluate mode selection."

--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -1703,8 +1703,7 @@
         decision == FILTER_BLOCK &&
         cpi->noise_estimate.enabled &&
         cpi->noise_estimate.level > kLow &&
-        zero_last_cost_orig < (best_rdc.rdcost << 2) &&
-        !reuse_inter_pred) {
+        zero_last_cost_orig < (best_rdc.rdcost << 2)) {
       // Check if we should pick ZEROMV on denoised signal.
       int rate = 0;
       int64_t dist = 0;
@@ -1713,6 +1712,7 @@
       mbmi->ref_frame[1] = NONE;
       mbmi->mv[0].as_int = 0;
       mbmi->interp_filter = EIGHTTAP;
+      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);
       this_rdc.rate = rate + ref_frame_cost[LAST_FRAME] +
--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -380,16 +380,6 @@
     sf->adaptive_rd_thresh = 2;
     // This feature is only enabled when partition search is disabled.
     sf->reuse_inter_pred_sby = 1;
-    // TODO(marpan): When denoising, we may re-evaluate the mode selection and
-    // this seems to cause problems when reuse_inter_pred_sby is enabled.
-    // Disabling reuse_inter_pred_sby for now (under denoising conditions), and
-    // will look into re-enabling it.
-#if CONFIG_VP9_TEMPORAL_DENOISING
-    if (cpi->oxcf.noise_sensitivity > 0 &&
-        cpi->noise_estimate.enabled &&
-        cpi->noise_estimate.level > kLow)
-      sf->reuse_inter_pred_sby = 0;
-#endif
     sf->partition_search_breakout_rate_thr = 200;
     sf->coeff_prob_appx_step = 4;
     sf->use_fast_coef_updates = is_keyframe ? TWO_LOOP : ONE_LOOP_REDUCED;