Added a test for monochrome encoding.

The test encodes 5 frames of a video using the --monochrome flag and
verifies that the decoded frames satisfy:

- each frame's monochrome flag is set to 1
- each frame's U and V planes are set to a constant, and this constant
  is the same for all decoded frames
- the initial frame's Y PSNR value is 'high enough'
- the Y PSNR values remain fairly constant across all of the frames

Change-Id: I4239ddfb745ed9746547737b4bc99963c71e51c0
diff --git a/test/encode_test_driver.cc b/test/encode_test_driver.cc
index 25e38bb..92849ba 100644
--- a/test/encode_test_driver.cc
+++ b/test/encode_test_driver.cc
@@ -152,17 +152,19 @@
 #if CONFIG_CICP
   if (img1->fmt != img2->fmt || img1->cp != img2->cp || img1->tc != img2->tc ||
       img1->mc != img2->mc || img1->d_w != img2->d_w ||
-      img1->d_h != img2->d_h) {
+      img1->d_h != img2->d_h || img1->monochrome != img2->monochrome) {
 #else
   if (img1->fmt != img2->fmt || img1->cs != img2->cs ||
-      img1->d_w != img2->d_w || img1->d_h != img2->d_h) {
+      img1->d_w != img2->d_w || img1->d_h != img2->d_h ||
+      img1->monochrome != img2->monochrome) {
 #endif
     if (mismatch_row != NULL) *mismatch_row = -1;
     if (mismatch_col != NULL) *mismatch_col = -1;
     return false;
   }
 
-  for (int plane = 0; plane < 3; plane++) {
+  const int num_planes = img1->monochrome ? 1 : 3;
+  for (int plane = 0; plane < num_planes; plane++) {
     if (!compare_plane(img1->planes[plane], img1->stride[plane],
                        img2->planes[plane], img2->stride[plane],
                        aom_img_plane_width(img1, plane),