diff options
author | Marco <marpan@google.com> | 2016-04-01 11:41:29 -0700 |
---|---|---|
committer | Marco <marpan@google.com> | 2016-04-01 11:50:15 -0700 |
commit | 7467ee045866cb3af32d94705656033c6afcb6fe (patch) | |
tree | 224cc9c73ba3b8bc1b64614333a62a30e0cb213e /vp9/encoder/vp9_denoiser.c | |
parent | a2a97b869f0f4a8dec2a9d8d0c0dcdd56e5a0477 (diff) | |
download | libvpx-7467ee045866cb3af32d94705656033c6afcb6fe.tar libvpx-7467ee045866cb3af32d94705656033c6afcb6fe.tar.gz libvpx-7467ee045866cb3af32d94705656033c6afcb6fe.tar.bz2 libvpx-7467ee045866cb3af32d94705656033c6afcb6fe.zip |
vp9-denoiser: Adjust usage of skin and consec_zeromv.
Change-Id: I250258fc70ec0fcf1b501708c5d4b84685cf882e
Diffstat (limited to 'vp9/encoder/vp9_denoiser.c')
-rw-r--r-- | vp9/encoder/vp9_denoiser.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/vp9/encoder/vp9_denoiser.c b/vp9/encoder/vp9_denoiser.c index 9eca2a229..3de182fb1 100644 --- a/vp9/encoder/vp9_denoiser.c +++ b/vp9/encoder/vp9_denoiser.c @@ -195,7 +195,8 @@ static VP9_DENOISER_DECISION perform_motion_compensation(VP9_DENOISER *denoiser, PICK_MODE_CONTEXT *ctx, int motion_magnitude, int is_skin, - int *zeromv_filter) { + int *zeromv_filter, + int consec_zeromv) { int mv_col, mv_row; int sse_diff = ctx->zeromv_sse - ctx->newmv_sse; MV_REFERENCE_FRAME frame; @@ -212,7 +213,7 @@ static VP9_DENOISER_DECISION perform_motion_compensation(VP9_DENOISER *denoiser, saved_mi = *mi; - if (is_skin && motion_magnitude > 0) + if (is_skin && (motion_magnitude > 0 || consec_zeromv < 4)) return COPY_BLOCK; // If the best reference frame uses inter-prediction and there is enough of a @@ -332,6 +333,7 @@ void vp9_denoiser_denoise(VP9_COMP *cpi, MACROBLOCK *mb, mi_row, mi_col); struct buf_2d src = mb->plane[0].src; int is_skin = 0; + int consec_zeromv = 0; 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; @@ -343,7 +345,7 @@ void vp9_denoiser_denoise(VP9_COMP *cpi, MACROBLOCK *mb, // If motion for current block is small/zero, compute consec_zeromv for // skin detection (early exit in skin detection is done for large // consec_zeromv when current block has small/zero motion). - int consec_zeromv = 0; + consec_zeromv = 0; if (motion_level == 0) { CYCLIC_REFRESH *const cr = cpi->cyclic_refresh; VP9_COMMON * const cm = &cpi->common; @@ -361,8 +363,8 @@ void vp9_denoiser_denoise(VP9_COMP *cpi, MACROBLOCK *mb, consec_zeromv = VPXMIN(cr->consec_zero_mv[bl_index], consec_zeromv); // No need to keep checking 8x8 blocks if any of the sub-blocks // has small consec_zeromv (since threshold for no_skin based on - // zero/small motion in skin detection is high, i.e, > 5). - if (consec_zeromv < 5) { + // zero/small motion in skin detection is high, i.e, > 4). + if (consec_zeromv < 4) { i = ymis; j = xmis; } @@ -393,7 +395,8 @@ void vp9_denoiser_denoise(VP9_COMP *cpi, MACROBLOCK *mb, mi_row, mi_col, ctx, motion_magnitude, is_skin, - &zeromv_filter); + &zeromv_filter, + consec_zeromv); if (decision == FILTER_BLOCK) { decision = vp9_denoiser_filter(src.buf, src.stride, |