remove is_chroma_reference from CFL_CTX

It is not needed.

Change-Id: Ic0068582ea7b75d414ea419bfa4cf3c19629dee1
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index c8e8bfc..bb01a72 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -465,8 +465,6 @@
 #if CONFIG_DEBUG
   int rate;
 #endif  // CONFIG_DEBUG
-
-  int is_chroma_reference;
 } CFL_CTX;
 
 typedef struct dist_wtd_comp_params {
diff --git a/av1/common/cfl.h b/av1/common/cfl.h
index 2acad26..2a70517 100644
--- a/av1/common/cfl.h
+++ b/av1/common/cfl.h
@@ -41,7 +41,7 @@
 
   if (cm->seq_params.monochrome) return CFL_DISALLOWED;
 
-  if (!xd->cfl.is_chroma_reference) {
+  if (!xd->is_chroma_ref) {
     // For non-chroma-reference blocks, we should always store the luma pixels,
     // in case the corresponding chroma-reference block uses CfL.
     // Note that this can only happen for block sizes which are <8 on
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index 9bd21bf..c4bad1b 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -1149,8 +1149,6 @@
   MACROBLOCKD *const xd = &td->xd;
   const int num_planes = av1_num_planes(cm);
   MB_MODE_INFO *mbmi = xd->mi[0];
-  CFL_CTX *const cfl = &xd->cfl;
-  cfl->is_chroma_reference = xd->is_chroma_ref;
 
   if (!is_inter_block(mbmi)) {
     int row, col;
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index c363aa3..d2502f7 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -792,7 +792,6 @@
           : 0;
 
   if (!cm->seq_params.monochrome && xd->is_chroma_ref) {
-    xd->cfl.is_chroma_reference = 1;
     mbmi->uv_mode =
         read_intra_mode_uv(ec_ctx, r, is_cfl_allowed(xd), mbmi->mode);
     if (mbmi->uv_mode == UV_CFL_PRED) {
@@ -806,7 +805,6 @@
   } else {
     // Avoid decoding angle_info if there is is no chroma prediction
     mbmi->uv_mode = UV_DC_PRED;
-    xd->cfl.is_chroma_reference = 0;
   }
   xd->cfl.store_y = store_cfl_required(cm, xd);
 
@@ -1052,9 +1050,7 @@
       use_angle_delta && av1_is_directional_mode(mbmi->mode)
           ? read_angle_delta(r, ec_ctx->angle_delta_cdf[mbmi->mode - V_PRED])
           : 0;
-  const int has_chroma = xd->is_chroma_ref;
-  xd->cfl.is_chroma_reference = has_chroma;
-  if (!cm->seq_params.monochrome && has_chroma) {
+  if (!cm->seq_params.monochrome && xd->is_chroma_ref) {
     mbmi->uv_mode =
         read_intra_mode_uv(ec_ctx, r, is_cfl_allowed(xd), mbmi->mode);
     if (mbmi->uv_mode == UV_CFL_PRED) {
@@ -1471,7 +1467,6 @@
     }
   }
 
-  xd->cfl.is_chroma_reference = xd->is_chroma_ref;
   xd->cfl.store_y = store_cfl_required(cm, xd);
 
 #if DEC_MISMATCH_DEBUG
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index 8dda309..9436c37 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -5968,7 +5968,6 @@
   const int mi_row = xd->mi_row;
   const int mi_col = xd->mi_col;
   if (!is_inter) {
-    xd->cfl.is_chroma_reference = xd->is_chroma_ref;
     xd->cfl.store_y = store_cfl_required(cm, xd);
     mbmi->skip = 1;
     for (int plane = 0; plane < num_planes; ++plane) {
diff --git a/av1/encoder/intra_mode_search.c b/av1/encoder/intra_mode_search.c
index 88f11ff..27aa740 100644
--- a/av1/encoder/intra_mode_search.c
+++ b/av1/encoder/intra_mode_search.c
@@ -1205,7 +1205,6 @@
     return;
   }
 
-  xd->cfl.is_chroma_reference = xd->is_chroma_ref;
   // Only store reconstructed luma when there's chroma RDO. When there's no
   // chroma RDO, the reconstructed luma will be stored in encode_superblock().
   xd->cfl.store_y = store_cfl_required_rdo(cm, x);
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 2188751..083e348 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -2645,7 +2645,6 @@
   if (intra_yrd < best_rd) {
     // Only store reconstructed luma when there's chroma RDO. When there's no
     // chroma RDO, the reconstructed luma will be stored in encode_superblock().
-    xd->cfl.is_chroma_reference = xd->is_chroma_ref;
     xd->cfl.store_y = store_cfl_required_rdo(cm, x);
     if (xd->cfl.store_y) {
       // Restore reconstructed luma values.
diff --git a/av1/encoder/rdopt_utils.h b/av1/encoder/rdopt_utils.h
index 0be3d25..b7fcb87 100644
--- a/av1/encoder/rdopt_utils.h
+++ b/av1/encoder/rdopt_utils.h
@@ -506,7 +506,7 @@
 
   if (cm->seq_params.monochrome || !xd->is_chroma_ref) return CFL_DISALLOWED;
 
-  if (!xd->cfl.is_chroma_reference) {
+  if (!xd->is_chroma_ref) {
     // For non-chroma-reference blocks, we should always store the luma pixels,
     // in case the corresponding chroma-reference block uses CfL.
     // Note that this can only happen for block sizes which are <8 on