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;