]> granicus.if.org Git - libvpx/commitdiff
vp8: Allow for cyclic refresh even if error_resilience it off.
authorMarco <marpan@google.com>
Tue, 4 Oct 2016 21:13:17 +0000 (14:13 -0700)
committerMarco <marpan@google.com>
Tue, 4 Oct 2016 21:19:49 +0000 (14:19 -0700)
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

vp8/encoder/onyx_if.c

index 87560f28b1e2d5ed22433158468a7f040f8c5151..acf181c513458b03a3a69c3e38de9d000e54bb04 100644 (file)
@@ -1766,9 +1766,11 @@ struct VP8_COMP *vp8_create_compressor(VP8_CONFIG *oxcf) {
   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) {