diff options
author | Marco Paniconi <marpan@google.com> | 2016-04-25 17:16:09 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-04-25 17:16:10 +0000 |
commit | bd3c874cac4d655d888979f3831af644aec9fcb8 (patch) | |
tree | 4c236ebd6703a96a7f9e6204aa99f56582ffd7fd /vp9 | |
parent | 8b25dd599ff6eec81060f508bfa5c9874439bee8 (diff) | |
parent | 229c686c89b89ce534209fc71548fada65d5b70d (diff) | |
download | libvpx-bd3c874cac4d655d888979f3831af644aec9fcb8.tar libvpx-bd3c874cac4d655d888979f3831af644aec9fcb8.tar.gz libvpx-bd3c874cac4d655d888979f3831af644aec9fcb8.tar.bz2 libvpx-bd3c874cac4d655d888979f3831af644aec9fcb8.zip |
Merge "vp9-denoiser: Bugfix and some adjustments for high noise case."
Diffstat (limited to 'vp9')
-rw-r--r-- | vp9/encoder/vp9_denoiser.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/vp9/encoder/vp9_denoiser.c b/vp9/encoder/vp9_denoiser.c index 8b7006280..7f5265a94 100644 --- a/vp9/encoder/vp9_denoiser.c +++ b/vp9/encoder/vp9_denoiser.c @@ -49,16 +49,19 @@ static int noise_motion_thresh(BLOCK_SIZE bs, int increase_denoising) { } static unsigned int sse_thresh(BLOCK_SIZE bs, int increase_denoising) { - return (1 << num_pels_log2_lookup[bs]) * (increase_denoising ? 60 : 40); + return (1 << num_pels_log2_lookup[bs]) * (increase_denoising ? 80 : 40); } static int sse_diff_thresh(BLOCK_SIZE bs, int increase_denoising, int motion_magnitude) { if (motion_magnitude > noise_motion_thresh(bs, increase_denoising)) { - return 0; + if (increase_denoising) + return (1 << num_pels_log2_lookup[bs]) << 2; + else + return 0; } else { - return (1 << num_pels_log2_lookup[bs]) * 20; + return (1 << num_pels_log2_lookup[bs]) << 4; } } @@ -222,6 +225,7 @@ static VP9_DENOISER_DECISION perform_motion_compensation(VP9_DENOISER *denoiser, // 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 && + ctx->newmv_sse != UINT_MAX && 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; |