ref: 3227a9be5fe1fdf662fe397e6abddce3c702e671
parent: c9fbb1881a1323272d9afac23a4988c6905a6322
author: Marco <marpan@google.com>
date: Thu Apr 6 06:25:55 EDT 2017
vp9; Move the denoising condition for speed 5. Move the condition for effectively disabling the denoising for speed 5 into the vp9_denoiser_denoise(). This is cleaner, and also moving the condition into vp9_denoiser_denoise will keep the denoiser buffer updated with the current source. This allows for more consistent behavior if speed is changed midstream. Change-Id: Ia001f591c56e454bf724c3ae73c024badb183ef8
--- a/vp9/encoder/vp9_denoiser.c
+++ b/vp9/encoder/vp9_denoiser.c
@@ -365,7 +365,10 @@
}
if (!is_skin && denoiser->denoising_level == kDenHigh) increase_denoising = 1;
- if (denoiser->denoising_level >= kDenLow)
+ // TODO(marpan): There is an issue with denoising for speed 5,
+ // due to the partitioning scheme based on pickmode.
+ // Remove this speed constraint when issue is resolved.
+ if (denoiser->denoising_level >= kDenLow && cpi->oxcf.speed > 5)
decision = perform_motion_compensation(
&cpi->common, denoiser, mb, bs, increase_denoising, mi_row, mi_col, ctx,
motion_magnitude, is_skin, &zeromv_filter, consec_zeromv,
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -1974,7 +1974,7 @@
#if CONFIG_VP9_TEMPORAL_DENOISING
if (cpi->oxcf.noise_sensitivity > 0 && denoise_svc_pickmode &&
- cpi->denoiser.denoising_level > kDenLowLow && cpi->oxcf.speed > 5) {
+ cpi->denoiser.denoising_level > kDenLowLow) {
vp9_denoiser_update_frame_stats(mi, sse_y, this_mode, ctx);
// Keep track of zero_last cost.
if (ref_frame == LAST_FRAME && frame_mv[this_mode][ref_frame].as_int == 0)
@@ -2178,7 +2178,7 @@
#if CONFIG_VP9_TEMPORAL_DENOISING
if (cpi->oxcf.noise_sensitivity > 0 && cpi->resize_pending == 0 &&
denoise_svc_pickmode && cpi->denoiser.denoising_level > kDenLowLow &&
- cpi->denoiser.reset == 0 && cpi->oxcf.speed > 5) {
+ cpi->denoiser.reset == 0) {
VP9_DENOISER_DECISION decision = COPY_BLOCK;
vp9_pickmode_ctx_den_update(&ctx_den, zero_last_cost_orig, ref_frame_cost,
frame_mv, reuse_inter_pred, best_tx_size,