]> granicus.if.org Git - libvpx/commitdiff
Merge "vp9 denoiser: Re-evaluate mode selection for golden reference."
authorMarco Paniconi <marpan@google.com>
Wed, 9 Dec 2015 00:34:09 +0000 (00:34 +0000)
committerGerrit Code Review <noreply-gerritcodereview@google.com>
Wed, 9 Dec 2015 00:34:09 +0000 (00:34 +0000)
1  2 
vp9/encoder/vp9_pickmode.c

index 17272013f6a06bdbf7963895b7f66da640191324,412cf1b6eb34241db6882240b7dece8649830306..90650dbe85205efa1bc6a519707255efae83c266
@@@ -1696,14 -1696,14 +1696,14 @@@ void vp9_pick_inter_mode(VP9_COMP *cpi
      VP9_DENOISER_DECISION decision = COPY_BLOCK;
      vp9_denoiser_denoise(&cpi->denoiser, x, mi_row, mi_col,
                           VPXMAX(BLOCK_8X8, bsize), ctx, &decision);
-     // If INTRA mode was selected, re-evaluate ZEROMV on denoised result.
-     // Only do this under noise conditions, and if rdcost of ZEROMV on
-     // original source is not significantly higher than rdcost of INTRA MODE.
-     if (best_ref_frame == INTRA_FRAME &&
-         decision == FILTER_BLOCK &&
+     // If INTRA or GOLDEN reference was selected, re-evaluate ZEROMV on denoised
+     // result. Only do this under noise conditions, and if rdcost of ZEROMV on
+     // original source is not significantly higher than rdcost of best mode.
+     if (((best_ref_frame == INTRA_FRAME && decision >= FILTER_BLOCK) ||
+         (best_ref_frame == GOLDEN_FRAME && decision == FILTER_ZEROMV_BLOCK)) &&
          cpi->noise_estimate.enabled &&
          cpi->noise_estimate.level > kLow &&
 -        zero_last_cost_orig < (best_rdc.rdcost << 2)) {
 +        zero_last_cost_orig < (best_rdc.rdcost << 3)) {
        // Check if we should pick ZEROMV on denoised signal.
        int rate = 0;
        int64_t dist = 0;