ref: df7039cf9afb8ef40c55f76ce9cad122f544505e
parent: d64e328624e09cbc36e7077598bf0ff367dcdb4c
author: Marco Paniconi <marpan@google.com>
date: Wed Mar 6 05:40:42 EST 2019
vp9-denoiser: Bias to last for golden long term If golden referene is selected as long-term reference, bias the denoiser filter to use last reference. Fixes visual artifact. And reduce the thresh_svc_golden, which was used to reduce the artifact occurrence. Change-Id: I08f24160ca11bd8f5f70acaefe989d5f92988132
--- a/vp9/encoder/vp9_denoiser.c
+++ b/vp9/encoder/vp9_denoiser.c
@@ -219,9 +219,7 @@
// If the best reference frame uses inter-prediction and there is enough of a
// difference in sum-squared-error, use it.
- if (frame != INTRA_FRAME && frame != ALTREF_FRAME &&
- (frame != GOLDEN_FRAME || num_spatial_layers == 1 ||
- use_gf_temporal_ref) &&
+ if (frame != INTRA_FRAME && frame != ALTREF_FRAME && frame != GOLDEN_FRAME &&
sse_diff > sse_diff_thresh(bs, increase_denoising, motion_magnitude)) {
mi->ref_frame[0] = ctx->best_reference_frame;
mi->mode = ctx->best_sse_inter_mode;
@@ -233,6 +231,7 @@
// Bias to last reference.
if ((num_spatial_layers > 1 && !use_gf_temporal_ref) ||
frame == ALTREF_FRAME ||
+ (frame == GOLDEN_FRAME && use_gf_temporal_ref) ||
(frame != LAST_FRAME &&
((ctx->zeromv_lastref_sse<(5 * ctx->zeromv_sse)>> 2) ||
denoiser->denoising_level >= kDenHigh))) {
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -1699,7 +1699,7 @@
int svc_mv_row = 0;
int no_scaling = 0;
unsigned int thresh_svc_skip_golden = 500;
- unsigned int thresh_skip_golden = (bsize >= BLOCK_32X32) ? 2500 : 500;
+ unsigned int thresh_skip_golden = 500;
int scene_change_detected =
cpi->rc.high_source_sad ||
(cpi->use_svc && cpi->svc.high_source_sad_superframe);