Remove the intra probs when EC_ADAPT enabled.

When EC_ADAPT is enabled, this patch removes all probability tables
 associated with coding intra tokens.
This commit has no change to metrics.

Change-Id: Ie74dd330984fd97b283ef8f8f2c053379f037d9f
diff --git a/av1/common/entropymode.c b/av1/common/entropymode.c
index 92b3631..4ce596b 100644
--- a/av1/common/entropymode.c
+++ b/av1/common/entropymode.c
@@ -293,6 +293,7 @@
 };
 #endif  // CONFIG_LV_MAP
 
+#if !CONFIG_EC_ADAPT
 #if CONFIG_ALT_INTRA
 #if CONFIG_SMOOTH_HV
 const aom_prob av1_kf_y_mode_prob[INTRA_MODES][INTRA_MODES][INTRA_MODES - 1] = {
@@ -889,6 +890,7 @@
 };
 
 #endif  // CONFIG_ALT_INTRA
+#endif  // !CONFIG_EC_ADAPT
 
 #if CONFIG_EXT_PARTITION_TYPES
 static const aom_prob
@@ -4676,8 +4678,10 @@
     };
 
 static void init_mode_probs(FRAME_CONTEXT *fc) {
+#if !CONFIG_EC_ADAPT
   av1_copy(fc->uv_mode_prob, default_uv_probs);
   av1_copy(fc->y_mode_prob, default_if_y_probs);
+#endif
   av1_copy(fc->switchable_interp_prob, default_switchable_interp_prob);
   av1_copy(fc->partition_prob, default_partition_probs);
   av1_copy(fc->intra_inter_prob, default_intra_inter_p);
@@ -4815,9 +4819,11 @@
                     cm->fc->seg.tree_cdf);
   }
 
+#if !CONFIG_EC_ADAPT
   for (i = 0; i < INTRA_MODES; ++i)
     av1_tree_to_cdf(av1_intra_mode_tree, fc->uv_mode_prob[i],
                     fc->uv_mode_cdf[i]);
+#endif
 #if CONFIG_EXT_PARTITION_TYPES
   for (i = 0; i < PARTITION_PLOFFSET; ++i)
     av1_tree_to_cdf(av1_partition_tree, fc->partition_prob[i],
@@ -4850,17 +4856,21 @@
                     fc->partition_cdf[i]);
 #endif
 
+#if !CONFIG_EC_ADAPT
   for (i = 0; i < INTRA_MODES; ++i)
     for (j = 0; j < INTRA_MODES; ++j)
       av1_tree_to_cdf(av1_intra_mode_tree, cm->kf_y_prob[i][j],
                       cm->fc->kf_y_cdf[i][j]);
+#endif
 
   for (j = 0; j < SWITCHABLE_FILTER_CONTEXTS; ++j)
     av1_tree_to_cdf(av1_switchable_interp_tree, fc->switchable_interp_prob[j],
                     fc->switchable_interp_cdf[j]);
 
+#if !CONFIG_EC_ADAPT
   for (i = 0; i < BLOCK_SIZE_GROUPS; ++i)
     av1_tree_to_cdf(av1_intra_mode_tree, fc->y_mode_prob[i], fc->y_mode_cdf[i]);
+#endif
 
 #if CONFIG_EXT_TX
   int s;
diff --git a/av1/common/entropymode.h b/av1/common/entropymode.h
index c7f24c1..0a396d9 100644
--- a/av1/common/entropymode.h
+++ b/av1/common/entropymode.h
@@ -473,11 +473,13 @@
 #endif  // CONFIG_FILTER_INTRA
 } FRAME_COUNTS;
 
+#if !CONFIG_EC_ADAPT
 // Default probabilities for signaling Intra mode for Y plane -- used only for
 // intra-only frames. ('default_if_y_probs' is used for inter frames).
 // Contexts used: Intra mode (Y plane) of 'above' and 'left' blocks.
 extern const aom_prob av1_kf_y_mode_prob[INTRA_MODES][INTRA_MODES]
                                         [INTRA_MODES - 1];
+#endif
 // CDF version of 'av1_kf_y_mode_prob'.
 extern const aom_cdf_prob av1_kf_y_mode_cdf[INTRA_MODES][INTRA_MODES]
                                            [CDF_SIZE(INTRA_MODES)];
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index a1c419b..af02780 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -5090,7 +5090,9 @@
 #endif  // !CONFIG_EC_ADAPT
 
   if (frame_is_intra_only(cm)) {
+#if !CONFIG_EC_ADAPT
     av1_copy(cm->kf_y_prob, av1_kf_y_mode_prob);
+#endif
     av1_copy(cm->fc->kf_y_cdf, av1_kf_y_mode_cdf);
 #if !CONFIG_EC_ADAPT
     int k;
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index ff3e1ce..3b21c70 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -5062,7 +5062,9 @@
 #endif  // !CONFIG_EC_ADAPT
 
   if (frame_is_intra_only(cm)) {
+#if !CONFIG_EC_ADAPT
     av1_copy(cm->kf_y_prob, av1_kf_y_mode_prob);
+#endif
     av1_copy(cm->fc->kf_y_cdf, av1_kf_y_mode_cdf);
 
 #if !CONFIG_EC_ADAPT