Rework sub8x8 chroma reference check to support non-420 format

Make is_chroma_reference() account for all the YUV420, 444, and
422 formats.

Change-Id: Ia87e51894493dcea86843194a34e5de05799248a
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index c726483..a209d6d 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -1684,7 +1684,8 @@
       const int max_blocks_wide = max_block_wide(xd, plane_bsize, plane);
       const int max_blocks_high = max_block_high(xd, plane_bsize, plane);
 #if CONFIG_CB4X4
-      if (bsize < BLOCK_8X8 && plane && !is_chroma_reference(mi_row, mi_col))
+      if (!is_chroma_reference(mi_row, mi_col, bsize, pd->subsampling_x,
+                               pd->subsampling_y))
         continue;
 #endif
 
@@ -1779,7 +1780,8 @@
         int row, col;
 
 #if CONFIG_CB4X4
-        if (bsize < BLOCK_8X8 && plane && !is_chroma_reference(mi_row, mi_col))
+        if (!is_chroma_reference(mi_row, mi_col, bsize, pd->subsampling_x,
+                                 pd->subsampling_y))
           continue;
 #endif