Clean up REVERT_NEW_FIRSTPASS_STATS

Change-Id: I09cea153a101132191ff0b307e384385f053ac37
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index 9927a7b..c6696b2 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -3768,7 +3768,7 @@
     if (av1_set_saliency_map(cpi) == 0) {
       return AOM_CODEC_MEM_ERROR;
     }
-#if !CONFIG_REALTIME_ONLY && !REVERT_NEW_FIRSTPASS_STATS
+#if !CONFIG_REALTIME_ONLY
     double motion_ratio = av1_setup_motion_ratio(cpi);
 #else
     double motion_ratio = 1.0;
diff --git a/av1/encoder/firstpass.c b/av1/encoder/firstpass.c
index 21108d7..befdb50 100644
--- a/av1/encoder/firstpass.c
+++ b/av1/encoder/firstpass.c
@@ -93,10 +93,8 @@
   section->intra_error = 0.0;
   section->frame_avg_wavelet_energy = 0.0;
   section->coded_error = 0.0;
-#if !REVERT_NEW_FIRSTPASS_STATS
   section->log_intra_error = 0.0;
   section->log_coded_error = 0.0;
-#endif
   section->sr_coded_error = 0.0;
   section->pcnt_inter = 0.0;
   section->pcnt_motion = 0.0;
@@ -125,10 +123,8 @@
   section->frame += frame->frame;
   section->weight += frame->weight;
   section->intra_error += frame->intra_error;
-#if !REVERT_NEW_FIRSTPASS_STATS
   section->log_intra_error += log1p(frame->intra_error);
   section->log_coded_error += log1p(frame->coded_error);
-#endif
   section->frame_avg_wavelet_energy += frame->frame_avg_wavelet_energy;
   section->coded_error += frame->coded_error;
   section->sr_coded_error += frame->sr_coded_error;
@@ -835,10 +831,8 @@
   fps->sr_coded_error /= num_mbs_16x16;
   fps->intra_error /= num_mbs_16x16;
   fps->frame_avg_wavelet_energy /= num_mbs_16x16;
-#if !REVERT_NEW_FIRSTPASS_STATS
   fps->log_coded_error = log1p(fps->coded_error);
   fps->log_intra_error = log1p(fps->intra_error);
-#endif
   fps->MVr /= f_h;
   fps->mvr_abs /= f_h;
   fps->MVc /= f_w;
@@ -903,10 +897,8 @@
   fps.is_flash = 0;
   fps.noise_var = 0.0;
   fps.cor_coeff = 1.0;
-#if !REVERT_NEW_FIRSTPASS_STATS
   fps.log_coded_error = 0.0;
   fps.log_intra_error = 0.0;
-#endif
 
   if (stats->mv_count > 0) {
     fps.MVr = (double)stats->sum_mvr / stats->mv_count;
diff --git a/av1/encoder/firstpass.h b/av1/encoder/firstpass.h
index dddab03..6d8e5c0 100644
--- a/av1/encoder/firstpass.h
+++ b/av1/encoder/firstpass.h
@@ -33,10 +33,6 @@
 #define VLOW_MOTION_THRESHOLD 950
 struct ThreadData;
 
-// Temporarily revert newly added firstpass stats. After
-// resolving the stats matching issue, we could remove this #define.
-#define REVERT_NEW_FIRSTPASS_STATS 1
-
 /*!
  * \brief The stucture of acummulated frame stats in the first pass.
  *
@@ -167,7 +163,6 @@
    * Correlation coefficient with the previous frame
    */
   double cor_coeff;
-#if !REVERT_NEW_FIRSTPASS_STATS
   /*!
    * log of intra_error
    */
@@ -176,7 +171,6 @@
    * log of coded_error
    */
   double log_coded_error;
-#endif
 } FIRSTPASS_STATS;
 
 // We want to keep one past stats for key frame detection
diff --git a/av1/encoder/ratectrl.c b/av1/encoder/ratectrl.c
index 1e12559..47d74ec 100644
--- a/av1/encoder/ratectrl.c
+++ b/av1/encoder/ratectrl.c
@@ -499,7 +499,7 @@
       max_delta_down = AOMMIN(16, AOMMAX(1, rc->q_1_frame / 8));
     }
     if (!cpi->ppi->use_svc && cpi->is_screen_content_type) {
-      // Link max_delta_up linked to max_delta_down and buffer status.
+      // Link max_delta_up to max_delta_down and buffer status.
       if (p_rc->buffer_level > p_rc->optimal_buffer_level) {
         max_delta_up = AOMMAX(4, max_delta_down);
       } else {
diff --git a/av1/encoder/saliency_map.c b/av1/encoder/saliency_map.c
index 24fba3a..3376846 100644
--- a/av1/encoder/saliency_map.c
+++ b/av1/encoder/saliency_map.c
@@ -1367,7 +1367,7 @@
 // av1_setup_motion_ratio() is only enabled when CONFIG_REALTIME_ONLY is 0,
 // because the computations need to access the first pass stats which are
 // only available when CONFIG_REALTIME_ONLY is equal to 0.
-#if !CONFIG_REALTIME_ONLY && !REVERT_NEW_FIRSTPASS_STATS
+#if !CONFIG_REALTIME_ONLY
 // Set motion_ratio that reflects the motion quantities between two consecutive
 // frames. Motion_ratio will be used to set up saliency_map based rdmult scaling
 // factor, i.e., the less the motion quantities are, the more bits will be spent
@@ -1411,4 +1411,4 @@
 
   return motion_ratio;
 }
-#endif  // !CONFIG_REALTIME_ONLY && !REVERT_NEW_FIRSTPASS_STATS
+#endif  // !CONFIG_REALTIME_ONLY
diff --git a/av1/encoder/saliency_map.h b/av1/encoder/saliency_map.h
index 660ffce..0d27f83 100644
--- a/av1/encoder/saliency_map.h
+++ b/av1/encoder/saliency_map.h
@@ -20,9 +20,9 @@
 } saliency_feature_map;
 
 int av1_set_saliency_map(AV1_COMP *cpi);
-#if !CONFIG_REALTIME_ONLY && !REVERT_NEW_FIRSTPASS_STATS
+#if !CONFIG_REALTIME_ONLY
 double av1_setup_motion_ratio(AV1_COMP *cpi);
 #endif
 int av1_setup_sm_rdmult_scaling_factor(AV1_COMP *cpi, double motion_ratio);
 
-#endif  // AOM_AV1_ENCODER_SALIENCY_MAP_H_
\ No newline at end of file
+#endif  // AOM_AV1_ENCODER_SALIENCY_MAP_H_