ref: 511a20744491d31e9a4113a47982fbfb209de0dd
parent: 6fc2e57c2ca6c9a7b1eecb2c7d93b65222b6727d
parent: 2136de9374a48b30d7b9e8a169f6ac5999aca670
author: Marco Paniconi <[email protected]>
date: Wed Apr 5 20:25:44 EDT 2017
Merge "vp9: Temporal denoising: avoid denoising for speed <= 5."
--- 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,