Add unit tests for real time multi-threading

Added tests AVxEncoderThreadRTTest and
AVxEncoderThreadRTTestLarge to test multi-threading
in real time mode. AVxEncoderThreadRTTest tests for
cpu-used 7, 8 and 9 whereas AVxEncoderThreadRTTestLarge
tests for cpu-used 0, 2, 4 and 6.

Change-Id: I9d0d7d71df1dd1c0d40234e74dfecf740ba81eba
diff --git a/test/ethread_test.cc b/test/ethread_test.cc
index 6c2107b..9c7e5d1 100644
--- a/test/ethread_test.cc
+++ b/test/ethread_test.cc
@@ -262,6 +262,9 @@
       } else {
         encoder->Control(AOME_SET_ENABLEAUTOALTREF, 0);
         encoder->Control(AV1E_SET_AQ_MODE, 3);
+        encoder->Control(AV1E_SET_COEFF_COST_UPD_FREQ, 2);
+        encoder->Control(AV1E_SET_MODE_COST_UPD_FREQ, 2);
+        encoder->Control(AV1E_SET_MV_COST_UPD_FREQ, 3);
       }
       encoder_initialized_ = true;
     }
@@ -431,6 +434,14 @@
   DoTest();
 }
 
+class AVxEncoderThreadRTTest : public AVxEncoderThreadTest {};
+
+TEST_P(AVxEncoderThreadRTTest, EncoderResultTest) {
+  cfg_.large_scale_tile = 0;
+  decoder_->Control(AV1_SET_TILE_MODE, 0);
+  DoTest();
+}
+
 class AVxEncoderThreadTestLarge : public AVxEncoderThreadTest {};
 
 TEST_P(AVxEncoderThreadTestLarge, EncoderResultTest) {
@@ -439,6 +450,14 @@
   DoTest();
 }
 
+class AVxEncoderThreadRTTestLarge : public AVxEncoderThreadTest {};
+
+TEST_P(AVxEncoderThreadRTTestLarge, EncoderResultTest) {
+  cfg_.large_scale_tile = 0;
+  decoder_->Control(AV1_SET_TILE_MODE, 0);
+  DoTest();
+}
+
 // first pass stats test
 AV1_INSTANTIATE_TEST_SUITE(AVxFirstPassEncoderThreadTest,
                            ::testing::Values(::libaom_test::kTwoPassGood),
@@ -452,6 +471,12 @@
                            ::testing::Values(2), ::testing::Values(0, 2),
                            ::testing::Values(0, 2), ::testing::Values(0, 1));
 
+// Test cpu_used 7, 8, 9 here.
+AV1_INSTANTIATE_TEST_SUITE(AVxEncoderThreadRTTest,
+                           ::testing::Values(::libaom_test::kRealTime),
+                           ::testing::Values(7, 8, 9), ::testing::Values(0, 2),
+                           ::testing::Values(0, 2), ::testing::Values(0, 1));
+
 // Test cpu_used 0, 1, 3 and 5.
 AV1_INSTANTIATE_TEST_SUITE(AVxEncoderThreadTestLarge,
                            ::testing::Values(::libaom_test::kTwoPassGood,
@@ -460,6 +485,13 @@
                            ::testing::Values(1, 6), ::testing::Values(1, 6),
                            ::testing::Values(0, 1));
 
+// Test cpu_used 0, 2, 4 and 6.
+AV1_INSTANTIATE_TEST_SUITE(AVxEncoderThreadRTTestLarge,
+                           ::testing::Values(::libaom_test::kRealTime),
+                           ::testing::Values(0, 2, 4, 6),
+                           ::testing::Values(1, 6), ::testing::Values(1, 6),
+                           ::testing::Values(0, 1));
+
 class AVxEncoderThreadLSTest : public AVxEncoderThreadTest {
   virtual void SetTileSize(libaom_test::Encoder *encoder) {
     encoder->Control(AV1E_SET_TILE_COLUMNS, tile_cols_);