ref: 2136de9374a48b30d7b9e8a169f6ac5999aca670
parent: fb60204d4c36a4041daaca2f1461b731fa2dfaa2
author: Marco <[email protected]>
date: Wed Apr 5 12:38:33 EDT 2017
vp9: Temporal denoising: avoid denoising for speed <= 5. Temporal denoiser runs in non-rd pickmode, so it is only used for speed >= 5. Regression exists for speed 5, due to use of reference_partition (which use non-rd pickmode for partitioning). Avoid denoising for now at speed 5. Change-Id: I74a74d2e1404d7cfd33dcf4ec06dd2e503256cf0
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -535,7 +535,7 @@
threshold_base = (7 * threshold_base) >> 3;
}
#if CONFIG_VP9_TEMPORAL_DENOISING
- if (cpi->oxcf.noise_sensitivity > 0 &&
+ if (cpi->oxcf.noise_sensitivity > 0 && cpi->oxcf.speed > 5 &&
cpi->denoiser.denoising_level >= kDenLow)
threshold_base = vp9_scale_part_thresh(
threshold_base, cpi->denoiser.denoising_level, content_state);
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -354,7 +354,7 @@
*sse_y = sse;
#if CONFIG_VP9_TEMPORAL_DENOISING
- if (cpi->oxcf.noise_sensitivity > 0)
+ if (cpi->oxcf.noise_sensitivity > 0 && cpi->oxcf.speed > 5)
ac_thr = vp9_scale_acskip_thresh(ac_thr, cpi->denoiser.denoising_level,
(abs(sum) >> (bw + bh)));
else
@@ -1974,7 +1974,7 @@
#if CONFIG_VP9_TEMPORAL_DENOISING
if (cpi->oxcf.noise_sensitivity > 0 && denoise_svc_pickmode &&
- cpi->denoiser.denoising_level > kDenLowLow) {
+ cpi->denoiser.denoising_level > kDenLowLow && cpi->oxcf.speed > 5) {
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->denoiser.reset == 0 && cpi->oxcf.speed > 5) {
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,