shithub: libvpx

Download patch

ref: 8cbea4a04902f749bae528b11485712d06411c44
parent: cc55568fef1f08d033dc9bd7a080f7d77a4a53ca
author: sdeng <sdeng@google.com>
date: Mon Apr 22 12:10:39 EDT 2019

Add vpx_clear_system_state() in SSIM based rdmult adjustments

Change-Id: I2a0cdec3bfce864e975aaa408cfdcb855db8680f

--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -270,6 +270,7 @@
   const int index = row * num_cols + col;
 
   assert(cpi->oxcf.tuning == VP8_TUNE_SSIM);
+  vpx_clear_system_state();
   return cpi->mi_ssim_rdmult_scaling_factors[index];
 }
 
@@ -312,6 +313,7 @@
     const double ssim_factor =
         get_ssim_rdmult_scaling_factor(cpi, mi_row, mi_col);
     x->rdmult = (int)(ssim_factor * x->rdmult);
+    vpx_clear_system_state();
   }
 
   // required by vp9_append_sub8x8_mvs_for_idx() and vp9_find_best_ref_mvs()
@@ -1963,6 +1965,7 @@
     const double ssim_factor =
         get_ssim_rdmult_scaling_factor(cpi, mi_row, mi_col);
     x->rdmult = (int)(ssim_factor * x->rdmult);
+    vpx_clear_system_state();
   }
 }
 
@@ -2208,6 +2211,7 @@
       const double ssim_factor =
           get_ssim_rdmult_scaling_factor(cpi, mi_row, mi_col);
       x->rdmult = (int)(ssim_factor * x->rdmult);
+      vpx_clear_system_state();
     }
   }
 
@@ -3823,6 +3827,7 @@
     const double ssim_factor =
         get_ssim_rdmult_scaling_factor(cpi, mi_row, mi_col);
     partition_mul = (int)(ssim_factor * partition_mul);
+    vpx_clear_system_state();
   }
 
   (void)*tp_orig;