shithub: libvpx

Download patch

ref: 955b3b66bdfc127f07381448daff7ece442b3b6c
parent: 897870497024e4b6cbed4a6a7c1feeab438508f6
author: Marco <[email protected]>
date: Tue Oct 4 10:13:17 EDT 2016

vp8: Allow for cyclic refresh even if error_resilience it off.

cyclic_refresh was tied to error_resilience mode.
Allow it to be on also for 1 pass CBR mode even if
error_resilience is off.

Other option to use new control for this, but prefer to avoid
that for now.

Change-Id: I3625b292ee059a890e31338b514e211bf0ab5c3e

--- a/vp8/encoder/onyx_if.c
+++ b/vp8/encoder/onyx_if.c
@@ -1766,9 +1766,11 @@
   cpi->mse_source_denoised = 0;
 
   /* Should we use the cyclic refresh method.
-   * Currently this is tied to error resilliant mode
+   * Currently there is no external control for this.
+   * Enable it for error_resilient_mode, or for 1 pass CBR mode.
    */
-  cpi->cyclic_refresh_mode_enabled = cpi->oxcf.error_resilient_mode;
+  cpi->cyclic_refresh_mode_enabled = (cpi->oxcf.error_resilient_mode ||
+      (cpi->oxcf.end_usage == USAGE_STREAM_FROM_SERVER && cpi->oxcf.Mode <= 2));
   cpi->cyclic_refresh_mode_max_mbs_perframe =
       (cpi->common.mb_rows * cpi->common.mb_cols) / 7;
   if (cpi->oxcf.number_of_layers == 1) {