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
This commit is contained in:
@@ -360,6 +360,7 @@ void vp9_denoiser_denoise(VP9_COMP *cpi, MACROBLOCK *mb, int mi_row, int mi_col,
|
|||||||
int is_skin = 0;
|
int is_skin = 0;
|
||||||
int increase_denoising = 0;
|
int increase_denoising = 0;
|
||||||
int consec_zeromv = 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_col = ctx->best_sse_mv.as_mv.col;
|
||||||
mv_row = ctx->best_sse_mv.as_mv.row;
|
mv_row = ctx->best_sse_mv.as_mv.row;
|
||||||
motion_magnitude = mv_row * mv_row + mv_col * mv_col;
|
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 (!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(
|
decision = perform_motion_compensation(
|
||||||
&cpi->common, denoiser, mb, bs, increase_denoising, mi_row, mi_col, ctx,
|
&cpi->common, denoiser, mb, bs, increase_denoising, mi_row, mi_col, ctx,
|
||||||
motion_magnitude, is_skin, &zeromv_filter, consec_zeromv,
|
motion_magnitude, is_skin, &zeromv_filter, consec_zeromv,
|
||||||
|
|||||||
Reference in New Issue
Block a user