]> granicus.if.org Git - libvpx/commitdiff
vp9-denoiser: Bias to last for golden long term
authorMarco Paniconi <marpan@google.com>
Wed, 6 Mar 2019 18:40:42 +0000 (10:40 -0800)
committerMarco Paniconi <marpan@google.com>
Wed, 6 Mar 2019 19:29:39 +0000 (11:29 -0800)
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

vp9/encoder/vp9_denoiser.c
vp9/encoder/vp9_pickmode.c

index 3d171c7dad574f801c529db2503072ce87fd3fc9..2885223b59e46dbde20a8d2500b87b745b8a9c0f 100644 (file)
@@ -219,9 +219,7 @@ static VP9_DENOISER_DECISION perform_motion_compensation(
 
   // 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 @@ static VP9_DENOISER_DECISION perform_motion_compensation(
     // 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))) {
index 0de3c9a4ce8a2a2120742354b24f9bb82002a10e..d874ca27c872afacdf5caf66acf7f8918de2c738 100644 (file)
@@ -1699,7 +1699,7 @@ 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;
-  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);