Disable hierarchical rdmult scaling for AQ modes

with the unit test fix:
BUG=aomedia:2462

Change-Id: I72f43415cb765c919936203f984dcd37927666e9
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index 06c7b40..f1027fb 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -272,6 +272,7 @@
   if (!is_frame_tpl_eligible((AV1_COMP *)cpi)) return deltaq_rdmult;
   if (tpl_idx >= MAX_LAG_BUFFERS) return deltaq_rdmult;
   if (cpi->oxcf.superres_mode != SUPERRES_NONE) return deltaq_rdmult;
+  if (cpi->oxcf.aq_mode != NO_AQ) return deltaq_rdmult;
 
   const int bsize_base = BLOCK_16X16;
   const int num_mi_w = mi_size_wide[bsize_base];
diff --git a/av1/encoder/tpl_model.c b/av1/encoder/tpl_model.c
index 1031aaa..34eb189 100644
--- a/av1/encoder/tpl_model.c
+++ b/av1/encoder/tpl_model.c
@@ -1072,6 +1072,7 @@
   if (!is_frame_tpl_eligible(cpi)) return;
   if (tpl_idx >= MAX_LAG_BUFFERS) return;
   if (cpi->oxcf.superres_mode != SUPERRES_NONE) return;
+  if (cpi->oxcf.aq_mode != NO_AQ) return;
 
   const int bsize_base = BLOCK_16X16;
   const int num_mi_w = mi_size_wide[bsize_base];
diff --git a/test/fwd_kf_test.cc b/test/fwd_kf_test.cc
index 1dc01c1..f32089a 100644
--- a/test/fwd_kf_test.cc
+++ b/test/fwd_kf_test.cc
@@ -23,7 +23,7 @@
 } FwdKfTestParam;
 
 const FwdKfTestParam kTestParams[] = {
-  { 4, 37.0 },  { 6, 36.0 },  { 8, 35.0 },
+  { 4, 37.0 },  { 6, 35.9 },  { 8, 35.0 },
   { 12, 34.2 }, { 16, 34.0 }, { 18, 33.7 }
 };