diff options
author | Jerome Jiang <jianj@google.com> | 2018-11-28 17:26:18 -0800 |
---|---|---|
committer | Jerome Jiang <jianj@google.com> | 2018-11-28 20:53:55 -0800 |
commit | c076467e8dfff4971227bb618cc60f6bfdb5ed20 (patch) | |
tree | c8e37b5253a51382ba123e63ac7bf251c3fe463c /vp9/encoder/vp9_denoiser.c | |
parent | d40a5bc8a3558ba6c0eeeed11c964ed26544aabc (diff) | |
download | libvpx-c076467e8dfff4971227bb618cc60f6bfdb5ed20.tar libvpx-c076467e8dfff4971227bb618cc60f6bfdb5ed20.tar.gz libvpx-c076467e8dfff4971227bb618cc60f6bfdb5ed20.tar.bz2 libvpx-c076467e8dfff4971227bb618cc60f6bfdb5ed20.zip |
vp9 denoiser: force copy block when last not a reference.
Last reference doesn't always exist when SVC layers changed dynamically.
When last is not a reference for current layer, copy block directly on
denoiser.
Change-Id: I9d98c4d6fdcfa25ba707db3333712761b5cf9ab8
Diffstat (limited to 'vp9/encoder/vp9_denoiser.c')
-rw-r--r-- | vp9/encoder/vp9_denoiser.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/vp9/encoder/vp9_denoiser.c b/vp9/encoder/vp9_denoiser.c index 8c039b2cb..b70890e68 100644 --- a/vp9/encoder/vp9_denoiser.c +++ b/vp9/encoder/vp9_denoiser.c @@ -360,6 +360,7 @@ void vp9_denoiser_denoise(VP9_COMP *cpi, MACROBLOCK *mb, int mi_row, int mi_col, int is_skin = 0; int increase_denoising = 0; int consec_zeromv = 0; + int last_is_reference = cpi->ref_frame_flags & VP9_LAST_FLAG; mv_col = ctx->best_sse_mv.as_mv.col; mv_row = ctx->best_sse_mv.as_mv.row; motion_magnitude = mv_row * mv_row + mv_col * mv_col; @@ -403,7 +404,12 @@ void vp9_denoiser_denoise(VP9_COMP *cpi, MACROBLOCK *mb, int mi_row, int mi_col, } if (!is_skin && denoiser->denoising_level == kDenHigh) increase_denoising = 1; - if (denoiser->denoising_level >= kDenLow && !ctx->sb_skip_denoising) + // Copy block if LAST_FRAME is not a reference. + // Last doesn't always exist when SVC layers are dynamically changed, e.g. top + // spatial layer doesn't have last reference when it's brought up for the + // first time on the fly. + if (last_is_reference && denoiser->denoising_level >= kDenLow && + !ctx->sb_skip_denoising) decision = perform_motion_compensation( &cpi->common, denoiser, mb, bs, increase_denoising, mi_row, mi_col, ctx, motion_magnitude, is_skin, &zeromv_filter, consec_zeromv, |