Increase entropy_context buffer size in sub8x8 RD

Temporarily increase the buffer size from 2 to 4 in the sub8x8
rate-distortion search for cb4x4. These functions will be deprecated
after cb4x4 is fully enabled.

Change-Id: I6aecaf55bd21a9416713cf31e75e7b4d9b68f83c
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index fe7d737..69dc233 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -2008,8 +2008,15 @@
   const int dst_stride = pd->dst.stride;
   const uint8_t *src_init = &p->src.buf[row * 4 * src_stride + col * 4];
   uint8_t *dst_init = &pd->dst.buf[row * 4 * src_stride + col * 4];
+#if CONFIG_CB4X4
+  // TODO(jingning): This is a temporal change. The whole function should be
+  // out when cb4x4 is enabled.
+  ENTROPY_CONTEXT ta[4], tempa[4];
+  ENTROPY_CONTEXT tl[4], templ[4];
+#else
   ENTROPY_CONTEXT ta[2], tempa[2];
   ENTROPY_CONTEXT tl[2], templ[2];
+#endif
   const int num_4x4_blocks_wide = num_4x4_blocks_wide_lookup[bsize];
   const int num_4x4_blocks_high = num_4x4_blocks_high_lookup[bsize];
   int idx, idy;
@@ -4700,8 +4707,14 @@
 #if CONFIG_EXT_INTER
   int_mv ref_mv[2];
 #endif  // CONFIG_EXT_INTER
+
+#if CONFIG_CB4X4
+  ENTROPY_CONTEXT ta[4];
+  ENTROPY_CONTEXT tl[4];
+#else
   ENTROPY_CONTEXT ta[2];
   ENTROPY_CONTEXT tl[2];
+#endif
 } SEG_RDSTAT;
 
 typedef struct {
@@ -5122,7 +5135,11 @@
   const BLOCK_SIZE bsize = mbmi->sb_type;
   const int num_4x4_blocks_wide = num_4x4_blocks_wide_lookup[bsize];
   const int num_4x4_blocks_high = num_4x4_blocks_high_lookup[bsize];
+#if CONFIG_CB4X4
+  ENTROPY_CONTEXT t_above[4], t_left[4];
+#else
   ENTROPY_CONTEXT t_above[2], t_left[2];
+#endif
   int subpelmv = 1, have_ref = 0;
   const int has_second_rf = has_second_ref(mbmi);
   const int inter_mode_mask = cpi->sf.inter_mode_mask[bsize];