rtc: Allow cnt_zeromv to be used when aq-mode=0

Stats changed for aq-mode=0:
Speed 10 rtc_derf:
avg/ovr/ssim, IC% speedup
-0.307/-0.388/-0.314, -0.447

Only affects some clips with motion, a few have
gains ~2%.

Change-Id: Icbfb0ec7d10413c84d51254f30948dbd975fd1fa
diff --git a/av1/encoder/aq_cyclicrefresh.h b/av1/encoder/aq_cyclicrefresh.h
index 64dbd89..10974f0 100644
--- a/av1/encoder/aq_cyclicrefresh.h
+++ b/av1/encoder/aq_cyclicrefresh.h
@@ -229,7 +229,7 @@
 
 /*!\brief Initialize counters used for cyclic refresh.
  *
- * Initializes cyclic refresh counters cnt_zeromv, actual_num_seg1_blocks and
+ * Initializes cyclic refresh counters actual_num_seg1_blocks and
  * actual_num_seg2_blocks.
  *
  * \ingroup cyclic_refresh
@@ -238,14 +238,14 @@
  *
  * \param[in]   x         Pointer to MACROBLOCK structure
  *
- * \remark Update the \c x->cnt_zeromv, the \c x->actual_num_seg1_blocks and
- * the \c x->actual_num_seg1_blocks.
+ * \remark Update the \c x->actual_num_seg1_blocks and the
+ * \c x->actual_num_seg2_blocks.
  */
 void av1_init_cyclic_refresh_counters(MACROBLOCK *const x);
 
 /*!\brief Accumulate cyclic refresh counters.
  *
- * Accumulates cyclic refresh counters cnt_zeromv, actual_num_seg1_blocks and
+ * Accumulates cyclic refresh counters actual_num_seg1_blocks and
  * actual_num_seg2_blocks from MACROBLOCK strcture to CYCLIC_REFRESH strcture.
  *
  * \ingroup cyclic_refresh
@@ -255,9 +255,8 @@
  * \param[in]   cyclic_refresh Pointer to CYCLIC_REFRESH structure
  * \param[in]   x              Pointer to MACROBLOCK structure
  *
- * \remark Update the \c cyclic_refresh->cnt_zeromv, the \c
- * cyclic_refresh->actual_num_seg1_blocks and the \c
- * cyclic_refresh->actual_num_seg1_blocks.
+ * \remark Update the \c cyclic_refresh->actual_num_seg1_blocks and the
+ * \c cyclic_refresh->actual_num_seg2_blocks.
  */
 void av1_accumulate_cyclic_refresh_counters(
     CYCLIC_REFRESH *const cyclic_refresh, const MACROBLOCK *const x);
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index ae9dbaa..40b9fde 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -1874,8 +1874,8 @@
   } else {
     cpi->cyclic_refresh->actual_num_seg1_blocks = 0;
     cpi->cyclic_refresh->actual_num_seg2_blocks = 0;
-    cpi->rc.cnt_zeromv = 0;
   }
+  cpi->rc.cnt_zeromv = 0;
 
   av1_frame_init_quantizer(cpi);
   init_encode_frame_mb_context(cpi);
diff --git a/av1/encoder/encodeframe_utils.c b/av1/encoder/encodeframe_utils.c
index 211ad07..29d7fe4 100644
--- a/av1/encoder/encodeframe_utils.c
+++ b/av1/encoder/encodeframe_utils.c
@@ -339,8 +339,7 @@
   }
 
   // Count zero motion vector.
-  if (!dry_run && cpi->oxcf.q_cfg.aq_mode == CYCLIC_REFRESH_AQ &&
-      !frame_is_intra_only(cm)) {
+  if (!dry_run && !frame_is_intra_only(cm)) {
     const MV mv = mi->mv[0].as_mv;
     if (is_inter_block(mi) && mi->ref_frame[0] == LAST_FRAME &&
         abs(mv.row) < 8 && abs(mv.col) < 8) {
diff --git a/test/datarate_test.cc b/test/datarate_test.cc
index 93ce934..6f14b2e 100644
--- a/test/datarate_test.cc
+++ b/test/datarate_test.cc
@@ -348,7 +348,7 @@
       ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
       ASSERT_GE(effective_datarate_, cfg_.rc_target_bitrate * 0.85)
           << " The datarate for the file is lower than target by too much!";
-      ASSERT_LE(effective_datarate_, cfg_.rc_target_bitrate * 1.31)
+      ASSERT_LE(effective_datarate_, cfg_.rc_target_bitrate * 1.35)
           << " The datarate for the file is greater than target by too much!";
       if (last_drop > 0) {
         ASSERT_LE(first_drop_, last_drop)