From 59c41b7814f1a5a4ba63392313de03ae6c9cf802 Mon Sep 17 00:00:00 2001 From: Jerome Jiang Date: Thu, 7 Jun 2018 18:05:23 -0700 Subject: vp9: Enable cyclic refresh for HBD in real-time. Keep denoiser and skin detection disabled since some key functions don't work with >8 bits source. Add test for HBD with denoiser and cyclic refresh enabled to make sure nothing crashes. BUG=webm:1534 Change-Id: Id61fe1e38ed1768f273870a6bdd5f163aa769fe4 --- vp9/encoder/vp9_aq_cyclicrefresh.c | 4 +--- vp9/encoder/vp9_encoder.c | 6 ++++++ vp9/vp9_cx_iface.c | 2 -- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'vp9') diff --git a/vp9/encoder/vp9_aq_cyclicrefresh.c b/vp9/encoder/vp9_aq_cyclicrefresh.c index 95daadfe2..aadedba39 100644 --- a/vp9/encoder/vp9_aq_cyclicrefresh.c +++ b/vp9/encoder/vp9_aq_cyclicrefresh.c @@ -428,9 +428,7 @@ void vp9_cyclic_refresh_update_parameters(VP9_COMP *const cpi) { double weight_segment = 0; int thresh_low_motion = (cm->width < 720) ? 55 : 20; cr->apply_cyclic_refresh = 1; - // TODO(jianj): Look into issue of cyclic refresh with high bitdepth. - if (cm->bit_depth > 8 || cm->frame_type == KEY_FRAME || - cpi->svc.temporal_layer_id > 0 || + if (cm->frame_type == KEY_FRAME || cpi->svc.temporal_layer_id > 0 || (cpi->use_svc && cpi->svc.layer_context[cpi->svc.temporal_layer_id].is_key_frame) || (!cpi->use_svc && rc->avg_frame_low_motion < thresh_low_motion && diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c index 2b1f2237f..fc1999687 100644 --- a/vp9/encoder/vp9_encoder.c +++ b/vp9/encoder/vp9_encoder.c @@ -4888,6 +4888,12 @@ int vp9_receive_raw_frame(VP9_COMP *cpi, vpx_enc_frame_flags_t frame_flags, check_initial_width(cpi, subsampling_x, subsampling_y); #endif // CONFIG_VP9_HIGHBITDEPTH +#if CONFIG_VP9_HIGHBITDEPTH + // Disable denoiser for high bitdepth since vp9_denoiser_filter only works for + // 8 bits. + if (cm->bit_depth > 8) cpi->oxcf.noise_sensitivity = 0; +#endif + #if CONFIG_VP9_TEMPORAL_DENOISING setup_denoiser_buffer(cpi); #endif diff --git a/vp9/vp9_cx_iface.c b/vp9/vp9_cx_iface.c index 0f0f6066f..55a26745c 100644 --- a/vp9/vp9_cx_iface.c +++ b/vp9/vp9_cx_iface.c @@ -709,8 +709,6 @@ static vpx_codec_err_t ctrl_set_noise_sensitivity(vpx_codec_alg_priv_t *ctx, va_list args) { struct vp9_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.noise_sensitivity = CAST(VP9E_SET_NOISE_SENSITIVITY, args); - // TODO(jianj): Look into issue of noise estimation with high bitdepth. - if (ctx->cfg.g_bit_depth > 8) extra_cfg.noise_sensitivity = 0; return update_extra_cfg(ctx, &extra_cfg); } -- cgit v1.2.3