]> granicus.if.org Git - libvpx/commitdiff
Fix 32 bit build emms problem.
authorPaul Wilkins <paulwilkins@google.com>
Wed, 12 Nov 2014 17:36:49 +0000 (09:36 -0800)
committerPaul Wilkins <paulwilkins@google.com>
Thu, 13 Nov 2014 19:33:55 +0000 (11:33 -0800)
Add extra vp9_clear_system_state() calls to fix
double / mmx issue introduced into first pass
code for 32 bit builds.

Change-Id: I84cd2986b80d83650a091ab25c43755efeb82e03

vp9/encoder/vp9_firstpass.c

index 327082fcd3928b8d35c272f9d5349dcade243650..c5e467313d93efdae2f6b32f5f1dbe7484b914cc 100644 (file)
@@ -486,8 +486,8 @@ void vp9_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
   const YV12_BUFFER_CONFIG *first_ref_buf = lst_yv12;
   LAYER_CONTEXT *const lc = is_two_pass_svc(cpi) ?
         &cpi->svc.layer_context[cpi->svc.spatial_layer_id] : NULL;
-  double intra_factor = 0.0;
-  double brightness_factor = 0.0;
+  double intra_factor;
+  double brightness_factor;
 
 #if CONFIG_FP_MB_STATS
   if (cpi->use_fp_mb_stats) {
@@ -497,6 +497,9 @@ void vp9_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
 
   vp9_clear_system_state();
 
+  intra_factor = 0.0;
+  brightness_factor = 0.0;
+
   set_first_pass_params(cpi);
   vp9_set_quantizer(cm, find_fp_qindex(cm->bit_depth));
 
@@ -640,6 +643,7 @@ void vp9_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
       }
 #endif  // CONFIG_VP9_HIGHBITDEPTH
 
+      vp9_clear_system_state();
       log_intra = log(this_error + 1.0);
       if (log_intra < 10.0)
         intra_factor += 1.0 + ((10.0 - log_intra) * 0.05);
@@ -938,7 +942,6 @@ void vp9_first_pass(VP9_COMP *cpi, const struct lookahead_entry *source) {
     vp9_clear_system_state();
   }
 
-  vp9_clear_system_state();
   {
     FIRSTPASS_STATS fps;
     // The minimum error here insures some bit allocation to frames even