diff options
author | Marco <marpan@google.com> | 2014-08-16 06:08:31 -0700 |
---|---|---|
committer | Marco <marpan@google.com> | 2014-08-16 06:14:21 -0700 |
commit | 8609048a776652b130918d5f3556eed011dbd6dc (patch) | |
tree | a45fb0c9025a970a5e3e13fcada7136ba101314c | |
parent | c60274855794d6fc854b516c3f8f8b824dcbb58b (diff) | |
download | libvpx-8609048a776652b130918d5f3556eed011dbd6dc.tar libvpx-8609048a776652b130918d5f3556eed011dbd6dc.tar.gz libvpx-8609048a776652b130918d5f3556eed011dbd6dc.tar.bz2 libvpx-8609048a776652b130918d5f3556eed011dbd6dc.zip |
vp8: Add check on noise_sensitivity/denoiser on.
Change-Id: Ic53b2fb69e6eee600ea222e4d06424a1bbca496c
-rw-r--r-- | vp8/encoder/onyx_if.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c index 93f882507..d29dd3997 100644 --- a/vp8/encoder/onyx_if.c +++ b/vp8/encoder/onyx_if.c @@ -615,19 +615,21 @@ static void cyclic_background_refresh(VP8_COMP *cpi, int Q, int lf_adjustment) cpi->cyclic_refresh_mode_index = i; #if CONFIG_TEMPORAL_DENOISING - if (cpi->denoiser.denoiser_mode == kDenoiserOnYUVAggressive && - Q < (int)cpi->denoiser.denoise_pars.qp_thresh) { - // Under aggressive denoising mode, use segmentation to turn off loop - // filter below some qp thresh. The loop filter is turned off for all - // blocks that have been encoded as ZEROMV LAST x frames in a row, - // where x is set by cpi->denoiser.denoise_pars.consec_zerolast. - // This is to avoid "dot" artifacts that can occur from repeated - // loop filtering on noisy input source. - cpi->cyclic_refresh_q = Q; - lf_adjustment = -MAX_LOOP_FILTER; - for (i = 0; i < mbs_in_frame; ++i) { - seg_map[i] = (cpi->consec_zero_last[i] > - cpi->denoiser.denoise_pars.consec_zerolast) ? 1 : 0; + if (cpi->oxcf.noise_sensitivity > 0) { + if (cpi->denoiser.denoiser_mode == kDenoiserOnYUVAggressive && + Q < (int)cpi->denoiser.denoise_pars.qp_thresh) { + // Under aggressive denoising, use segmentation to turn off loop + // filter below some qp thresh. The filter is turned off for all + // blocks that have been encoded as ZEROMV LAST x frames in a row, + // where x is set by cpi->denoiser.denoise_pars.consec_zerolast. + // This is to avoid "dot" artifacts that can occur from repeated + // loop filtering on noisy input source. + cpi->cyclic_refresh_q = Q; + lf_adjustment = -MAX_LOOP_FILTER; + for (i = 0; i < mbs_in_frame; ++i) { + seg_map[i] = (cpi->consec_zero_last[i] > + cpi->denoiser.denoise_pars.consec_zerolast) ? 1 : 0; + } } } #endif |