Remove the EC_ADAPT experimental flags.

Removing these flags make the EC_ADAPT experiment an integral part of
 the draft AV1 bitstream definition
This commit has no effect on metrics.

Change-Id: Ice78520935e8bfa9d25cf4b8384a1b872069d09c
diff --git a/aom_dsp/bitreader.h b/aom_dsp/bitreader.h
index 5bad70c..88bedcc 100644
--- a/aom_dsp/bitreader.h
+++ b/aom_dsp/bitreader.h
@@ -194,9 +194,7 @@
                                    int nsymbs ACCT_STR_PARAM) {
   int ret;
   ret = aom_read_cdf(r, cdf, nsymbs, ACCT_STR_NAME);
-#if CONFIG_EC_ADAPT
   update_cdf(cdf, ret, nsymbs);
-#endif
   return ret;
 }
 
diff --git a/aom_dsp/bitwriter.h b/aom_dsp/bitwriter.h
index 588e47b..68bc1c8 100644
--- a/aom_dsp/bitwriter.h
+++ b/aom_dsp/bitwriter.h
@@ -140,9 +140,7 @@
 static INLINE void aom_write_symbol(aom_writer *w, int symb, aom_cdf_prob *cdf,
                                     int nsymbs) {
   aom_write_cdf(w, symb, cdf, nsymbs);
-#if CONFIG_EC_ADAPT
   update_cdf(cdf, symb, nsymbs);
-#endif
 }
 
 static INLINE void aom_write_tree_as_cdf(aom_writer *w,
diff --git a/aom_dsp/prob.c b/aom_dsp/prob.c
index eefe752..a42fb80 100644
--- a/aom_dsp/prob.c
+++ b/aom_dsp/prob.c
@@ -186,10 +186,8 @@
   for (i = 1; i < nsymbs; i++) {
     cdf[i] = AOM_ICDF(AOM_ICDF(cdf[i - 1]) + cdf[i]);
   }
-// Store symbol count at the end of the CDF
-#if CONFIG_EC_ADAPT
+  // Store symbol count at the end of the CDF
   cdf[nsymbs] = 0;
-#endif
   return nsymbs;
 }
 
diff --git a/aom_dsp/prob.h b/aom_dsp/prob.h
index ec6654a..35db134 100644
--- a/aom_dsp/prob.h
+++ b/aom_dsp/prob.h
@@ -148,7 +148,6 @@
 
 void av1_indices_from_tree(int *ind, int *inv, const aom_tree_index *tree);
 
-#if CONFIG_EC_ADAPT
 static INLINE void update_cdf(aom_cdf_prob *cdf, int val, int nsymbs) {
   const int rate = 4 + (cdf[nsymbs] > 31) + get_msb(nsymbs);
   const int rate2 = 5;
@@ -183,7 +182,6 @@
 #endif
   cdf[nsymbs] += (cdf[nsymbs] < 32);
 }
-#endif
 
 #ifdef __cplusplus
 }  // extern "C"
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index 1c2371f..4e25762 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -702,9 +702,7 @@
 #if CONFIG_PVQ
   daala_dec_ctx daala_dec;
 #endif
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *tile_ctx;
-#endif
   /* Bit depth: 8, 10, 12 */
   int bd;
 
diff --git a/av1/common/entropy.c b/av1/common/entropy.c
index c66c5f8..a1d3c4c 100644
--- a/av1/common/entropy.c
+++ b/av1/common/entropy.c
@@ -5590,7 +5590,6 @@
 #endif
 }
 
-#if CONFIG_EC_ADAPT
 static void av1_average_cdf(aom_cdf_prob *cdf_ptr[], aom_cdf_prob *fc_cdf_ptr,
                             int cdf_size, const int num_tiles) {
   int i;
@@ -5714,9 +5713,7 @@
 #if CONFIG_EXT_INTER
   AVERAGE_TILE_CDFS(inter_compound_mode_cdf)
 
-#if CONFIG_EC_ADAPT
   AVERAGE_TILE_CDFS(compound_type_cdf)
-#endif  // CONFIG_EC_ADAPT
 
 #if CONFIG_INTERINTRA
 #if CONFIG_NEW_MULTISYMBOL
@@ -5808,4 +5805,3 @@
   AVERAGE_TILE_CDFS(pvq_context.pvq.pvq_skip_dir_cdf)
 }
 #endif  // CONFIG_PVQ
-#endif  // CONFIG_EC_ADAPT
diff --git a/av1/common/entropy.h b/av1/common/entropy.h
index 49d5f6c..94157e4 100644
--- a/av1/common/entropy.h
+++ b/av1/common/entropy.h
@@ -188,9 +188,7 @@
 struct frame_contexts;
 void av1_default_coef_probs(struct AV1Common *cm);
 void av1_adapt_coef_probs(struct AV1Common *cm);
-#if CONFIG_EC_ADAPT
 void av1_adapt_coef_cdfs(struct AV1Common *cm, struct frame_contexts *pre_fc);
-#endif
 
 // This is the index in the scan order beyond which all coefficients for
 // 8x8 transform and above are in the top band.
@@ -431,7 +429,6 @@
   return mode_mv_merge_probs(pre_prob, ct);
 }
 
-#if CONFIG_EC_ADAPT
 void av1_average_tile_coef_cdfs(struct frame_contexts *fc,
                                 struct frame_contexts *ec_ctxs[],
                                 aom_cdf_prob *cdf_ptrs[], int num_tiles);
@@ -450,7 +447,6 @@
 void av1_average_tile_pvq_cdfs(struct frame_contexts *fc,
                                struct frame_contexts *ec_ctxs[], int num_tiles);
 #endif  // CONFIG_PVQ
-#endif  // CONFIG_EC_ADAPT
 #ifdef __cplusplus
 }  // extern "C"
 #endif
diff --git a/av1/common/entropymode.c b/av1/common/entropymode.c
index f2c7979..9f5c09a 100644
--- a/av1/common/entropymode.c
+++ b/av1/common/entropymode.c
@@ -293,605 +293,6 @@
 };
 #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] = {
-  {
-      // above = dc
-      { 111, 28, 44, 99, 166, 154, 28, 28, 27, 45, 134, 109 },    // left = dc
-      { 82, 31, 102, 75, 117, 135, 33, 34, 21, 31, 134, 149 },    // left = v
-      { 40, 29, 14, 161, 235, 180, 14, 12, 34, 52, 128, 69 },     // left = h
-      { 98, 19, 36, 74, 137, 153, 49, 35, 25, 61, 137, 106 },     // left = d45
-      { 59, 11, 25, 128, 47, 162, 29, 20, 53, 38, 143, 117 },     // left = d135
-      { 86, 20, 51, 160, 39, 101, 69, 101, 112, 154, 158, 145 },  // left = d117
-      { 49, 10, 17, 112, 98, 206, 16, 11, 104, 44, 138, 88 },     // left = d153
-      { 64, 14, 22, 80, 170, 168, 19, 15, 26, 101, 137, 90 },     // left = d207
-      { 84, 21, 31, 62, 110, 135, 40, 57, 22, 45, 143, 130 },     // left = d63
-      { 58, 16, 31, 60, 154, 225, 17, 23, 19, 30, 138, 113 },  // left = smooth
-      { 51, 19, 46, 64, 148, 209, 18, 28, 17, 25, 137,
-        149 },                                                // left = smooth_v
-      { 68, 15, 26, 61, 175, 233, 17, 17, 19, 29, 135, 76 },  // left = smooth_h
-      { 49, 61, 41, 113, 203, 158, 26, 26, 29, 55, 123, 99 },  // left = tm
-  },
-  {
-      // above = v
-      { 31, 26, 135, 81, 100, 82, 13, 40, 14, 18, 131, 182 },    // left = dc
-      { 24, 27, 175, 53, 93, 85, 17, 40, 5, 14, 119, 195 },      // left = v
-      { 20, 34, 71, 97, 209, 133, 15, 24, 14, 28, 138, 129 },    // left = h
-      { 54, 19, 88, 55, 102, 103, 39, 45, 8, 44, 134, 167 },     // left = d45
-      { 23, 16, 93, 101, 33, 119, 23, 41, 26, 22, 136, 168 },    // left = d135
-      { 34, 17, 130, 149, 30, 72, 43, 129, 66, 100, 143, 192 },  // left = d117
-      { 23, 17, 83, 85, 63, 158, 16, 30, 64, 28, 145, 146 },     // left = d153
-      { 33, 17, 85, 60, 136, 115, 21, 32, 15, 59, 134, 155 },    // left = d207
-      { 40, 20, 103, 53, 66, 84, 26, 72, 9, 29, 134, 177 },      // left = d63
-      { 22, 18, 112, 41, 138, 192, 12, 30, 9, 16, 131, 178 },  // left = smooth
-      { 20, 20, 125, 39, 137, 179, 11, 28, 7, 12, 123,
-        199 },  // left = smooth_v
-      { 26, 19, 111, 46, 160, 201, 13, 29, 8, 17, 132,
-        156 },  // left = smooth_h
-      { 20, 35, 138, 62, 162, 107, 21, 36, 9, 24, 125, 181 },  // left = tm
-  },
-  {
-      // above = h
-      { 89, 27, 21, 136, 218, 175, 20, 19, 35, 56, 134, 96 },    // left = dc
-      { 63, 37, 67, 117, 190, 160, 22, 29, 20, 45, 137, 137 },   // left = v
-      { 34, 23, 7, 177, 245, 207, 13, 9, 30, 73, 125, 63 },      // left = h
-      { 84, 29, 20, 83, 184, 182, 38, 25, 34, 86, 134, 106 },    // left = d45
-      { 65, 19, 19, 119, 109, 177, 27, 19, 56, 56, 141, 103 },   // left = d135
-      { 88, 25, 46, 152, 102, 130, 70, 61, 96, 157, 130, 102 },  // left = d117
-      { 51, 11, 10, 108, 168, 216, 14, 9, 93, 58, 132, 79 },     // left = d153
-      { 53, 15, 9, 103, 224, 192, 20, 13, 23, 122, 135, 80 },    // left = d207
-      { 64, 30, 19, 90, 171, 176, 24, 44, 23, 56, 144, 121 },    // left = d63
-      { 46, 20, 17, 94, 214, 234, 14, 15, 23, 38, 132, 98 },  // left = smooth
-      { 41, 27, 22, 102, 214, 229, 13, 17, 18, 35, 133,
-        137 },                                                // left = smooth_v
-      { 52, 17, 14, 95, 224, 241, 14, 11, 24, 38, 133, 62 },  // left = smooth_h
-      { 35, 43, 21, 148, 234, 188, 22, 17, 27, 47, 133, 100 },  // left = tm
-  },
-  {
-      // above = d45
-      { 80, 14, 31, 74, 129, 146, 52, 50, 29, 50, 138, 110 },   // left = dc
-      { 59, 16, 84, 52, 106, 121, 63, 60, 20, 40, 143, 150 },   // left = v
-      { 41, 19, 16, 118, 216, 168, 36, 27, 24, 62, 136, 69 },   // left = h
-      { 86, 11, 11, 37, 168, 158, 113, 53, 8, 99, 140, 121 },   // left = d45
-      { 49, 8, 24, 94, 49, 139, 48, 45, 40, 53, 134, 131 },     // left = d135
-      { 58, 11, 36, 127, 45, 97, 90, 143, 91, 180, 153, 146 },  // left = d117
-      { 39, 9, 14, 93, 97, 187, 32, 26, 66, 57, 134, 106 },     // left = d153
-      { 75, 8, 26, 68, 135, 154, 51, 30, 17, 113, 144, 83 },    // left = d207
-      { 77, 13, 18, 46, 146, 143, 81, 102, 18, 59, 142, 143 },  // left = d63
-      { 49, 13, 31, 47, 142, 218, 46, 42, 19, 46, 146, 120 },   // left = smooth
-      { 46, 15, 35, 47, 132, 206, 47, 50, 18, 37, 143,
-        147 },                                                // left = smooth_v
-      { 54, 11, 25, 54, 157, 229, 43, 34, 20, 44, 136, 99 },  // left = smooth_h
-      { 40, 26, 41, 72, 176, 145, 78, 51, 27, 59, 133, 121 },  // left = tm
-  },
-  {
-      // above = d135
-      { 57, 10, 21, 118, 61, 178, 16, 20, 65, 52, 145, 125 },   // left = dc
-      { 56, 15, 48, 107, 58, 153, 20, 32, 42, 35, 143, 162 },   // left = v
-      { 28, 19, 8, 132, 172, 184, 14, 14, 45, 55, 140, 79 },    // left = h
-      { 58, 13, 15, 73, 66, 177, 61, 24, 30, 72, 143, 122 },    // left = d45
-      { 35, 5, 13, 150, 20, 187, 19, 21, 66, 38, 144, 130 },    // left = d135
-      { 57, 9, 30, 173, 28, 133, 38, 71, 156, 140, 156, 173 },  // left = d117
-      { 30, 6, 9, 121, 54, 207, 16, 20, 110, 62, 151, 94 },     // left = d153
-      { 51, 9, 15, 88, 96, 188, 22, 18, 40, 95, 140, 98 },      // left = d207
-      { 56, 12, 21, 82, 53, 140, 30, 37, 32, 47, 145, 149 },    // left = d63
-      { 43, 12, 21, 83, 84, 222, 14, 23, 31, 35, 143, 127 },    // left = smooth
-      { 41, 12, 25, 81, 75, 210, 16, 29, 29, 29, 141, 154 },  // left = smooth_v
-      { 42, 11, 19, 81, 109, 226, 17, 20, 34, 36, 143,
-        110 },  // left = smooth_h
-      { 36, 26, 27, 107, 132, 151, 24, 28, 38, 46, 140, 127 },  // left = tm
-  },
-  {
-      // above = d117
-      { 52, 15, 58, 191, 40, 95, 38, 78, 98, 140, 152, 175 },    // left = dc
-      { 50, 16, 85, 186, 28, 84, 41, 105, 65, 119, 158, 206 },   // left = v
-      { 30, 23, 30, 179, 122, 124, 38, 47, 68, 140, 161, 102 },  // left = h
-      { 75, 15, 47, 120, 49, 127, 63, 86, 54, 204, 175, 185 },   // left = d45
-      { 36, 9, 37, 198, 15, 120, 56, 78, 104, 151, 155, 165 },   // left = d135
-      { 38, 9, 54, 198, 12, 75, 47, 92, 71, 130, 170, 201 },     // left = d117
-      { 31, 13, 33, 167, 46, 144, 32, 59, 124, 151, 162, 128 },  // left = d153
-      { 47, 15, 43, 123, 70, 129, 49, 72, 48, 175, 163, 125 },   // left = d207
-      { 61, 19, 62, 141, 35, 116, 55, 117, 51, 162, 150, 201 },  // left = d63
-      { 22, 17, 34, 105, 41, 101, 20, 34, 26, 39, 146, 157 },  // left = smooth
-      { 19, 14, 37, 116, 33, 91, 23, 38, 17, 36, 137, 178 },  // left = smooth_v
-      { 25, 17, 35, 102, 59, 118, 23, 28, 30, 43, 147,
-        148 },  // left = smooth_h
-      { 35, 24, 62, 164, 95, 103, 47, 94, 65, 115, 186, 128 },  // left = tm
-  },
-  {
-      // above = d153
-      { 75, 12, 17, 101, 150, 177, 14, 13, 101, 55, 141, 104 },  // left = dc
-      { 69, 19, 46, 91, 133, 167, 19, 22, 72, 41, 133, 143 },    // left = v
-      { 30, 12, 6, 132, 209, 214, 10, 8, 75, 78, 137, 70 },      // left = h
-      { 77, 16, 12, 85, 120, 203, 35, 17, 69, 66, 137, 96 },     // left = d45
-      { 51, 8, 11, 119, 58, 178, 20, 17, 90, 51, 145, 92 },      // left = d135
-      { 76, 8, 24, 144, 48, 128, 37, 46, 173, 153, 159, 111 },   // left = d117
-      { 40, 6, 6, 87, 112, 213, 7, 7, 152, 54, 141, 84 },        // left = d153
-      { 46, 6, 7, 78, 161, 195, 15, 11, 66, 97, 137, 83 },       // left = d207
-      { 81, 17, 17, 82, 97, 187, 26, 34, 54, 60, 154, 128 },     // left = d63
-      { 47, 10, 16, 74, 138, 233, 13, 17, 59, 42, 143, 106 },  // left = smooth
-      { 45, 12, 17, 76, 141, 227, 14, 16, 56, 43, 141,
-        135 },                                                // left = smooth_v
-      { 55, 10, 13, 69, 162, 238, 11, 11, 59, 45, 133, 73 },  // left = smooth_h
-      { 44, 23, 19, 110, 176, 165, 16, 19, 68, 59, 131, 89 },  // left = tm
-  },
-  {
-      // above = d207
-      { 86, 15, 26, 87, 166, 178, 27, 25, 27, 75, 145, 108 },   // left = dc
-      { 71, 27, 62, 70, 126, 142, 29, 34, 17, 69, 141, 144 },   // left = v
-      { 48, 21, 11, 130, 231, 196, 24, 19, 27, 82, 133, 72 },   // left = h
-      { 82, 21, 14, 54, 128, 188, 55, 38, 19, 111, 148, 119 },  // left = d45
-      { 57, 11, 17, 78, 83, 171, 43, 31, 37, 58, 143, 100 },    // left = d135
-      { 76, 16, 44, 115, 77, 130, 78, 79, 82, 178, 132, 123 },  // left = d117
-      { 50, 12, 11, 82, 133, 207, 27, 20, 67, 79, 138, 87 },    // left = d153
-      { 77, 9, 13, 44, 174, 169, 26, 13, 9, 167, 135, 90 },     // left = d207
-      { 70, 16, 18, 57, 117, 167, 43, 46, 17, 70, 150, 116 },   // left = d63
-      { 56, 13, 18, 60, 170, 236, 24, 19, 18, 59, 139, 105 },   // left = smooth
-      { 50, 17, 26, 60, 165, 234, 24, 20, 15, 53, 134,
-        136 },                                                // left = smooth_v
-      { 57, 11, 16, 62, 188, 239, 23, 15, 18, 57, 134, 79 },  // left = smooth_h
-      { 49, 31, 24, 78, 194, 184, 45, 27, 19, 81, 138, 102 },  // left = tm
-  },
-  {
-      // above = d63
-      { 53, 13, 46, 61, 109, 116, 40, 83, 19, 31, 141, 150 },   // left = dc
-      { 45, 14, 75, 40, 79, 102, 48, 118, 14, 23, 138, 174 },   // left = v
-      { 34, 14, 24, 98, 214, 128, 33, 54, 18, 51, 138, 103 },   // left = h
-      { 74, 11, 26, 37, 127, 154, 75, 89, 11, 61, 146, 125 },   // left = d45
-      { 35, 9, 26, 68, 55, 128, 53, 74, 21, 33, 138, 132 },     // left = d135
-      { 47, 9, 55, 108, 39, 105, 64, 193, 71, 127, 141, 193 },  // left = d117
-      { 35, 9, 22, 66, 79, 172, 34, 64, 57, 44, 139, 112 },     // left = d153
-      { 54, 7, 26, 48, 136, 139, 48, 60, 15, 82, 144, 116 },    // left = d207
-      { 60, 9, 30, 25, 106, 127, 64, 143, 14, 42, 140, 165 },   // left = d63
-      { 39, 11, 35, 40, 136, 212, 34, 67, 12, 28, 145, 150 },   // left = smooth
-      { 37, 12, 45, 36, 128, 190, 34, 80, 8, 23, 138, 165 },  // left = smooth_v
-      { 45, 9, 37, 46, 152, 196, 36, 58, 14, 29, 145, 127 },  // left = smooth_h
-      { 35, 17, 53, 48, 159, 101, 53, 104, 15, 36, 132, 152 },  // left = tm
-  },
-  {
-      // above = smooth
-      { 58, 12, 33, 66, 168, 219, 13, 21, 16, 27, 137, 113 },  // left = dc
-      { 42, 20, 78, 51, 139, 216, 16, 27, 11, 18, 134, 160 },  // left = v
-      { 28, 17, 16, 118, 236, 231, 13, 14, 16, 41, 132, 77 },  // left = h
-      { 58, 12, 23, 47, 138, 238, 39, 31, 16, 63, 142, 125 },  // left = d45
-      { 44, 9, 27, 76, 80, 220, 21, 27, 27, 30, 142, 122 },    // left = d135
-      { 30, 13, 38, 96, 47, 111, 26, 40, 31, 40, 146, 146 },   // left = d117
-      { 42, 9, 19, 70, 127, 234, 15, 18, 53, 39, 138, 97 },    // left = d153
-      { 44, 10, 20, 57, 186, 229, 15, 18, 15, 80, 141, 97 },   // left = d207
-      { 51, 13, 33, 46, 123, 225, 23, 46, 15, 34, 143, 132 },  // left = d63
-      { 42, 11, 29, 49, 154, 226, 13, 20, 12, 27, 139, 117 },  // left = smooth
-      { 37, 13, 40, 48, 146, 217, 13, 23, 10, 24, 136,
-        149 },                                                // left = smooth_v
-      { 45, 10, 24, 55, 176, 230, 11, 16, 14, 26, 136, 86 },  // left = smooth_h
-      { 32, 23, 43, 78, 204, 225, 18, 23, 15, 30, 134, 117 },  // left = tm
-  },
-  {
-      // above = smooth_v
-      { 62, 13, 47, 68, 165, 204, 14, 24, 14, 22, 137, 146 },   // left = dc
-      { 42, 18, 97, 43, 138, 210, 12, 28, 8, 14, 127, 184 },    // left = v
-      { 30, 19, 21, 128, 238, 231, 13, 13, 17, 38, 138, 103 },  // left = h
-      { 66, 12, 31, 50, 132, 228, 37, 34, 14, 56, 142, 135 },   // left = d45
-      { 45, 9, 33, 75, 73, 216, 20, 33, 25, 25, 146, 153 },     // left = d135
-      { 31, 13, 48, 97, 46, 82, 26, 55, 31, 25, 140, 179 },     // left = d117
-      { 47, 10, 26, 67, 109, 229, 15, 23, 52, 34, 136, 133 },   // left = d153
-      { 49, 9, 25, 58, 174, 206, 14, 20, 13, 83, 144, 121 },    // left = d207
-      { 54, 15, 42, 47, 120, 209, 22, 55, 13, 25, 139, 162 },   // left = d63
-      { 41, 11, 43, 50, 146, 216, 11, 21, 11, 23, 136, 151 },   // left = smooth
-      { 37, 12, 58, 48, 148, 202, 11, 24, 8, 19, 134, 178 },  // left = smooth_v
-      { 47, 11, 39, 54, 169, 212, 12, 21, 14, 22, 144,
-        115 },  // left = smooth_h
-      { 36, 25, 57, 80, 215, 211, 16, 28, 11, 25, 130, 154 },  // left = tm
-  },
-  {
-      // above = smooth_h
-      { 57, 12, 28, 68, 186, 224, 11, 17, 20, 31, 133, 80 },   // left = dc
-      { 42, 21, 86, 51, 159, 221, 14, 25, 10, 19, 134, 131 },  // left = v
-      { 25, 17, 13, 123, 240, 240, 12, 10, 18, 42, 126, 56 },  // left = h
-      { 55, 11, 25, 47, 146, 238, 36, 32, 18, 67, 144, 99 },   // left = d45
-      { 47, 11, 23, 75, 95, 222, 20, 24, 28, 36, 143, 103 },   // left = d135
-      { 30, 14, 34, 92, 59, 101, 27, 44, 31, 41, 142, 129 },   // left = d117
-      { 42, 11, 17, 73, 158, 234, 14, 14, 59, 46, 138, 67 },   // left = d153
-      { 45, 10, 15, 64, 194, 228, 14, 15, 17, 78, 133, 73 },   // left = d207
-      { 52, 14, 29, 45, 138, 227, 25, 43, 16, 36, 136, 119 },  // left = d63
-      { 42, 12, 23, 51, 173, 235, 12, 16, 13, 28, 134, 95 },   // left = smooth
-      { 37, 16, 34, 52, 161, 228, 12, 19, 10, 28, 137,
-        123 },                                                // left = smooth_v
-      { 45, 9, 18, 58, 200, 240, 10, 13, 13, 27, 129, 61 },   // left = smooth_h
-      { 32, 26, 44, 82, 217, 222, 19, 23, 16, 34, 134, 99 },  // left = tm
-  },
-  {
-      // above = tm
-      { 51, 42, 80, 104, 178, 121, 20, 37, 25, 42, 136, 150 },  // left = dc
-      { 35, 38, 132, 73, 152, 132, 21, 36, 10, 32, 127, 174 },  // left = v
-      { 21, 34, 26, 149, 241, 165, 17, 15, 19, 60, 132, 95 },   // left = h
-      { 64, 20, 36, 67, 169, 142, 45, 30, 16, 86, 145, 134 },   // left = d45
-      { 40, 23, 51, 96, 102, 149, 25, 33, 34, 43, 143, 125 },   // left = d135
-      { 58, 29, 93, 140, 93, 89, 51, 107, 64, 146, 145, 154 },  // left = d117
-      { 33, 23, 44, 95, 139, 209, 12, 20, 76, 56, 131, 104 },   // left = d153
-      { 40, 21, 28, 79, 210, 165, 21, 15, 16, 134, 138, 108 },  // left = d207
-      { 45, 24, 58, 62, 132, 127, 32, 58, 15, 51, 143, 152 },   // left = d63
-      { 33, 27, 53, 71, 195, 223, 14, 24, 12, 36, 136, 135 },   // left = smooth
-      { 30, 29, 62, 68, 201, 217, 14, 24, 11, 31, 132,
-        162 },  // left = smooth_v
-      { 37, 25, 50, 76, 204, 212, 12, 18, 15, 38, 134,
-        106 },  // left = smooth_h
-      { 28, 53, 64, 100, 203, 162, 26, 29, 15, 52, 127, 138 },  // left = tm
-  },
-};
-
-static const aom_prob default_if_y_probs[BLOCK_SIZE_GROUPS][INTRA_MODES - 1] = {
-  { 56, 13, 37, 112, 91, 147, 66, 55, 72, 82, 124, 121 },  // block_size < 8x8
-  { 92, 120, 47, 89, 120, 139, 18, 38, 32, 51, 146,
-    124 },  // block_size < 16x16
-  { 115, 102, 41, 69, 170, 142, 8, 23, 13, 23, 122,
-    110 },                                            // block_size < 32x32
-  { 148, 157, 47, 62, 238, 64, 7, 3, 1, 3, 74, 87 },  // block_size >= 32x32
-};
-
-static const aom_prob default_uv_probs[INTRA_MODES][INTRA_MODES - 1] = {
-  { 184, 3, 67, 135, 194, 108, 33, 43, 40, 86, 121, 118 },   // y = dc
-  { 23, 3, 204, 105, 117, 53, 14, 68, 13, 19, 112, 86 },     // y = v
-  { 34, 3, 7, 220, 249, 142, 11, 13, 59, 124, 119, 131 },    // y = h
-  { 138, 3, 45, 51, 162, 99, 110, 107, 21, 113, 119, 111 },  // y = d45
-  { 130, 2, 28, 163, 52, 163, 16, 25, 94, 46, 127, 118 },    // y = d135
-  { 109, 3, 55, 218, 20, 43, 34, 71, 74, 68, 108, 128 },     // y = d117
-  { 124, 1, 17, 124, 151, 197, 8, 9, 184, 71, 123, 101 },    // y = d153
-  { 127, 2, 16, 110, 225, 134, 28, 19, 18, 190, 124, 132 },  // y = d207
-  { 115, 3, 65, 46, 134, 81, 37, 170, 20, 57, 122, 106 },    // y = d63
-  { 131, 4, 52, 71, 177, 205, 17, 27, 20, 41, 128, 118 },    // y = smooth
-  { 131, 5, 65, 70, 182, 196, 17, 30, 17, 35, 123, 154 },    // y = smooth_v
-  { 137, 4, 43, 78, 196, 202, 16, 21, 24, 48, 123, 91 },     // y = smooth_h
-  { 137, 12, 92, 142, 217, 71, 14, 45, 29, 62, 108, 109 },   // y = tm
-};
-
-#else  // !CONFIG_SMOOTH_HV
-
-const aom_prob av1_kf_y_mode_prob[INTRA_MODES][INTRA_MODES][INTRA_MODES - 1] = {
-  {
-      // above = dc
-      { 121, 30, 54, 128, 164, 158, 45, 41, 57, 91 },   // left = dc
-      { 91, 38, 101, 102, 124, 141, 49, 48, 45, 73 },   // left = v
-      { 66, 28, 27, 177, 225, 178, 32, 27, 52, 114 },   // left = h
-      { 106, 23, 50, 101, 134, 148, 64, 50, 49, 107 },  // left = d45
-      { 75, 24, 32, 118, 66, 143, 42, 28, 57, 74 },     // left = d135
-      { 95, 24, 40, 142, 56, 141, 72, 121, 129, 255 },  // left = d117
-      { 71, 14, 25, 126, 117, 201, 28, 21, 117, 89 },   // left = d153
-      { 85, 16, 37, 110, 163, 178, 41, 28, 48, 134 },   // left = d207
-      { 86, 25, 32, 83, 105, 133, 58, 81, 46, 95 },     // left = d63
-      { 79, 25, 38, 75, 150, 255, 30, 49, 34, 51 },     // left = smooth
-      { 68, 59, 48, 122, 193, 158, 43, 46, 46, 112 },   // left = paeth
-  },
-  {
-      // above = v
-      { 66, 21, 118, 111, 145, 107, 27, 50, 27, 54 },    // left = dc
-      { 52, 25, 167, 81, 120, 101, 34, 55, 19, 32 },     // left = v
-      { 56, 18, 72, 134, 208, 139, 31, 34, 27, 89 },     // left = h
-      { 75, 21, 94, 88, 134, 123, 49, 57, 30, 68 },      // left = d45
-      { 54, 18, 95, 96, 78, 107, 33, 49, 28, 65 },       // left = d135
-      { 61, 19, 121, 131, 58, 101, 56, 143, 120, 255 },  // left = d117
-      { 53, 13, 78, 103, 110, 147, 31, 41, 64, 77 },     // left = d153
-      { 69, 14, 78, 93, 167, 121, 31, 39, 25, 113 },     // left = d207
-      { 64, 18, 103, 79, 90, 108, 34, 73, 27, 69 },      // left = d63
-      { 52, 20, 103, 61, 161, 255, 22, 42, 16, 35 },     // left = smooth
-      { 50, 31, 124, 92, 161, 120, 50, 53, 23, 60 },     // left = paeth
-  },
-  {
-      // above = h
-      { 94, 29, 31, 158, 214, 178, 35, 31, 72, 111 },   // left = dc
-      { 72, 37, 72, 149, 184, 177, 43, 40, 53, 105 },   // left = v
-      { 53, 21, 14, 196, 242, 209, 29, 19, 55, 145 },   // left = h
-      { 93, 36, 36, 104, 176, 166, 56, 37, 49, 141 },   // left = d45
-      { 84, 32, 27, 124, 108, 143, 38, 36, 76, 134 },   // left = d135
-      { 82, 31, 47, 142, 122, 161, 83, 73, 126, 255 },  // left = d117
-      { 66, 16, 20, 133, 148, 210, 30, 17, 113, 104 },  // left = d153
-      { 76, 16, 17, 129, 207, 181, 41, 20, 46, 163 },   // left = d207
-      { 72, 38, 21, 100, 142, 171, 37, 70, 49, 111 },   // left = d63
-      { 61, 30, 27, 115, 208, 255, 27, 31, 44, 63 },    // left = smooth
-      { 53, 45, 29, 157, 222, 185, 49, 37, 55, 102 },   // left = paeth
-  },
-  {
-      // above = d45
-      { 96, 18, 37, 98, 138, 154, 68, 56, 59, 96 },    // left = dc
-      { 73, 18, 92, 81, 125, 132, 75, 64, 27, 67 },    // left = v
-      { 73, 17, 27, 128, 213, 154, 56, 44, 32, 105 },  // left = h
-      { 101, 20, 21, 75, 138, 138, 82, 56, 23, 154 },  // left = d45
-      { 71, 15, 33, 91, 70, 150, 62, 55, 38, 118 },    // left = d135
-      { 80, 19, 38, 116, 69, 122, 88, 132, 92, 255 },  // left = d117
-      { 68, 11, 22, 101, 116, 179, 52, 44, 85, 96 },   // left = d153
-      { 101, 8, 59, 77, 151, 170, 53, 41, 35, 172 },   // left = d207
-      { 82, 19, 24, 81, 172, 129, 82, 128, 43, 108 },  // left = d63
-      { 66, 18, 42, 64, 143, 255, 52, 52, 25, 83 },    // left = smooth
-      { 57, 24, 42, 85, 169, 145, 104, 71, 34, 86 },   // left = paeth
-  },
-  {
-      // above = d135
-      { 85, 15, 29, 113, 83, 176, 26, 29, 70, 110 },    // left = dc
-      { 78, 28, 49, 111, 91, 141, 30, 42, 48, 75 },     // left = v
-      { 56, 21, 16, 146, 190, 178, 23, 31, 49, 92 },    // left = h
-      { 70, 19, 20, 65, 90, 173, 97, 36, 57, 98 },      // left = d45
-      { 77, 14, 26, 110, 51, 156, 34, 35, 54, 74 },     // left = d135
-      { 78, 18, 36, 153, 47, 131, 62, 102, 155, 255 },  // left = d117
-      { 56, 11, 15, 115, 85, 196, 32, 45, 81, 96 },     // left = d153
-      { 90, 18, 24, 95, 126, 159, 34, 31, 46, 136 },    // left = d207
-      { 80, 23, 28, 90, 75, 141, 39, 50, 46, 87 },      // left = d63
-      { 63, 22, 31, 91, 110, 255, 26, 43, 51, 51 },     // left = smooth
-      { 66, 32, 31, 122, 145, 165, 40, 43, 56, 79 },    // left = paeth
-  },
-  {
-      // above = d117
-      { 81, 16, 61, 170, 74, 105, 54, 105, 113, 255 },  // left = dc
-      { 74, 20, 86, 163, 64, 97, 65, 129, 101, 255 },   // left = v
-      { 63, 15, 47, 168, 141, 176, 69, 77, 77, 255 },   // left = h
-      { 70, 17, 59, 97, 78, 114, 74, 122, 80, 255 },    // left = d45
-      { 78, 13, 50, 153, 34, 126, 75, 114, 120, 255 },  // left = d135
-      { 72, 16, 69, 159, 28, 108, 63, 134, 107, 255 },  // left = d117
-      { 66, 9, 47, 131, 79, 148, 41, 88, 105, 255 },    // left = d153
-      { 78, 12, 60, 119, 105, 133, 47, 95, 63, 255 },   // left = d207
-      { 82, 21, 58, 128, 61, 98, 64, 136, 91, 255 },    // left = d63
-      { 23, 26, 28, 96, 85, 128, 51, 64, 85, 128 },     // left = smooth
-      { 58, 27, 62, 162, 109, 151, 75, 106, 78, 255 },  // left = paeth
-  },
-  {
-      // above = d153
-      { 91, 18, 25, 121, 166, 173, 25, 25, 128, 102 },  // left = dc
-      { 80, 27, 51, 111, 141, 147, 45, 38, 70, 85 },    // left = v
-      { 53, 12, 11, 154, 197, 225, 17, 17, 74, 145 },   // left = h
-      { 93, 27, 23, 111, 143, 188, 43, 39, 69, 112 },   // left = d45
-      { 83, 15, 21, 118, 67, 178, 40, 33, 73, 92 },     // left = d135
-      { 94, 13, 31, 132, 66, 110, 61, 82, 148, 255 },   // left = d117
-      { 76, 9, 11, 96, 105, 201, 16, 13, 157, 97 },     // left = d153
-      { 70, 10, 12, 100, 172, 201, 23, 17, 53, 158 },   // left = d207
-      { 114, 25, 21, 104, 108, 163, 30, 47, 53, 111 },  // left = d63
-      { 70, 16, 21, 80, 157, 255, 25, 30, 81, 69 },     // left = smooth
-      { 87, 32, 26, 120, 191, 168, 32, 33, 70, 118 },   // left = paeth
-  },
-  {
-      // above = d207
-      { 98, 20, 39, 122, 168, 188, 38, 36, 54, 132 },   // left = dc
-      { 81, 37, 62, 97, 122, 153, 38, 43, 36, 118 },    // left = v
-      { 71, 21, 22, 154, 227, 183, 37, 31, 46, 140 },   // left = h
-      { 90, 34, 19, 93, 144, 194, 65, 47, 41, 163 },    // left = d45
-      { 78, 20, 27, 91, 93, 173, 57, 52, 49, 113 },     // left = d135
-      { 79, 25, 45, 121, 101, 147, 69, 56, 122, 255 },  // left = d117
-      { 73, 13, 19, 105, 122, 206, 40, 28, 91, 126 },   // left = d153
-      { 101, 14, 22, 87, 153, 169, 33, 25, 26, 175 },   // left = d207
-      { 81, 28, 23, 86, 115, 169, 48, 56, 41, 111 },    // left = d63
-      { 70, 24, 30, 90, 180, 255, 38, 26, 36, 82 },     // left = smooth
-      { 61, 37, 30, 94, 189, 163, 76, 50, 36, 127 },    // left = paeth
-  },
-  {
-      // above = d63
-      { 77, 13, 46, 86, 138, 117, 55, 88, 34, 68 },     // left = dc
-      { 68, 17, 80, 64, 105, 108, 66, 115, 32, 45 },    // left = v
-      { 62, 13, 37, 124, 210, 131, 46, 57, 28, 103 },   // left = h
-      { 88, 15, 45, 73, 134, 145, 73, 101, 37, 87 },    // left = d45
-      { 68, 16, 35, 78, 81, 133, 54, 71, 33, 67 },      // left = d135
-      { 71, 16, 57, 108, 61, 135, 71, 184, 113, 255 },  // left = d117
-      { 55, 10, 27, 69, 107, 158, 39, 76, 82, 95 },     // left = d153
-      { 80, 9, 38, 78, 153, 145, 50, 63, 28, 123 },     // left = d207
-      { 86, 12, 33, 49, 107, 135, 64, 134, 57, 89 },    // left = d63
-      { 56, 19, 55, 60, 163, 255, 38, 84, 22, 36 },     // left = smooth
-      { 53, 17, 60, 69, 151, 126, 73, 113, 26, 80 },    // left = paeth
-  },
-  {
-      // above = smooth
-      { 79, 16, 46, 89, 167, 255, 22, 36, 29, 42 },   // left = dc
-      { 63, 22, 88, 71, 131, 255, 26, 41, 21, 35 },   // left = v
-      { 51, 18, 28, 142, 232, 255, 26, 25, 25, 75 },  // left = h
-      { 75, 18, 43, 70, 140, 255, 37, 49, 34, 89 },   // left = d45
-      { 70, 14, 35, 87, 83, 255, 30, 36, 34, 50 },    // left = d135
-      { 23, 26, 28, 96, 85, 128, 51, 64, 85, 128 },   // left = d117
-      { 74, 12, 33, 83, 128, 255, 27, 33, 58, 68 },   // left = d153
-      { 66, 11, 30, 77, 179, 255, 21, 27, 23, 113 },  // left = d207
-      { 68, 22, 40, 65, 118, 255, 28, 61, 30, 50 },   // left = d63
-      { 60, 18, 44, 69, 141, 255, 18, 32, 22, 40 },   // left = smooth
-      { 52, 32, 54, 96, 194, 255, 33, 37, 25, 53 },   // left = paeth
-  },
-  {
-      // above = paeth
-      { 76, 47, 67, 123, 182, 150, 41, 52, 55, 97 },    // left = dc
-      { 69, 40, 125, 102, 138, 138, 42, 55, 32, 70 },   // left = v
-      { 46, 28, 27, 160, 232, 169, 34, 21, 32, 122 },   // left = h
-      { 78, 35, 41, 99, 128, 124, 49, 43, 35, 111 },    // left = d45
-      { 66, 28, 47, 100, 113, 145, 37, 40, 72, 93 },    // left = d135
-      { 77, 37, 76, 134, 124, 124, 65, 122, 88, 255 },  // left = d117
-      { 53, 23, 38, 108, 128, 204, 26, 32, 115, 114 },  // left = d153
-      { 65, 20, 29, 101, 202, 186, 29, 24, 29, 188 },   // left = d207
-      { 71, 24, 49, 81, 126, 151, 36, 65, 28, 93 },     // left = d63
-      { 54, 36, 53, 94, 193, 255, 25, 38, 20, 64 },     // left = smooth
-      { 52, 54, 60, 108, 176, 168, 47, 44, 50, 105 },   // left = paeth
-  },
-};
-
-static const aom_prob default_if_y_probs[BLOCK_SIZE_GROUPS][INTRA_MODES - 1] = {
-  { 88, 16, 47, 133, 143, 150, 70, 48, 84, 122 },  // block_size < 8x8
-  { 75, 26, 51, 120, 158, 157, 44, 45, 56, 102 },  // block_size < 16x16
-  { 73, 24, 60, 115, 184, 164, 26, 36, 32, 63 },   // block_size < 32x32
-  { 96, 27, 50, 107, 221, 148, 16, 22, 14, 39 },   // block_size >= 32x32
-};
-
-static const aom_prob default_uv_probs[INTRA_MODES][INTRA_MODES - 1] = {
-  { 199, 3, 79, 179, 220, 109, 38, 50, 68, 138 },   // y = dc
-  { 17, 2, 219, 136, 131, 58, 21, 106, 23, 41 },    // y = v
-  { 26, 1, 5, 244, 253, 138, 16, 21, 68, 205 },     // y = h
-  { 183, 3, 66, 94, 195, 97, 101, 104, 41, 178 },   // y = d45
-  { 178, 2, 36, 158, 99, 175, 21, 29, 105, 77 },    // y = d135
-  { 154, 3, 65, 219, 40, 48, 45, 95, 146, 255 },    // y = d117
-  { 167, 1, 16, 160, 214, 187, 10, 10, 200, 155 },  // y = d153
-  { 154, 2, 18, 178, 238, 132, 25, 21, 34, 221 },   // y = d207
-  { 153, 4, 76, 85, 157, 90, 38, 165, 46, 104 },    // y = d63
-  { 163, 3, 68, 87, 190, 255, 19, 27, 25, 46 },     // y = smooth
-  { 185, 7, 113, 171, 203, 57, 18, 69, 49, 104 },   // y = paeth
-};
-
-#endif  // CONFIG_SMOOTH_HV
-
-#else  // !CONFIG_ALT_INTRA
-
-const aom_prob av1_kf_y_mode_prob[INTRA_MODES][INTRA_MODES][INTRA_MODES - 1] = {
-  {
-      // above = dc
-      { 137, 30, 42, 148, 151, 207, 70, 52, 91 },   // left = dc
-      { 92, 45, 102, 136, 116, 180, 74, 90, 100 },  // left = v
-      { 73, 32, 19, 187, 222, 215, 46, 34, 100 },   // left = h
-      { 91, 30, 32, 116, 121, 186, 93, 86, 94 },    // left = d45
-      { 72, 35, 36, 149, 68, 206, 68, 63, 105 },    // left = d135
-      { 73, 31, 28, 138, 57, 124, 55, 122, 151 },   // left = d117
-      { 67, 23, 21, 140, 126, 197, 40, 37, 171 },   // left = d153
-      { 86, 27, 28, 128, 154, 212, 45, 43, 53 },    // left = d207
-      { 74, 32, 27, 107, 86, 160, 63, 134, 102 },   // left = d63
-      { 59, 67, 44, 140, 161, 202, 78, 67, 119 }    // left = tm
-  },
-  {
-      // above = v
-      { 63, 36, 126, 146, 123, 158, 60, 90, 96 },   // left = dc
-      { 43, 46, 168, 134, 107, 128, 69, 142, 92 },  // left = v
-      { 44, 29, 68, 159, 201, 177, 50, 57, 77 },    // left = h
-      { 58, 38, 76, 114, 97, 172, 78, 133, 92 },    // left = d45
-      { 46, 41, 76, 140, 63, 184, 69, 112, 57 },    // left = d135
-      { 38, 32, 85, 140, 46, 112, 54, 151, 133 },   // left = d117
-      { 39, 27, 61, 131, 110, 175, 44, 75, 136 },   // left = d153
-      { 52, 30, 74, 113, 130, 175, 51, 64, 58 },    // left = d207
-      { 47, 35, 80, 100, 74, 143, 64, 163, 74 },    // left = d63
-      { 36, 61, 116, 114, 128, 162, 80, 125, 82 }   // left = tm
-  },
-  {
-      // above = h
-      { 82, 26, 26, 171, 208, 204, 44, 32, 105 },  // left = dc
-      { 55, 44, 68, 166, 179, 192, 57, 57, 108 },  // left = v
-      { 42, 26, 11, 199, 241, 228, 23, 15, 85 },   // left = h
-      { 68, 42, 19, 131, 160, 199, 55, 52, 83 },   // left = d45
-      { 58, 50, 25, 139, 115, 232, 39, 52, 118 },  // left = d135
-      { 50, 35, 33, 153, 104, 162, 64, 59, 131 },  // left = d117
-      { 44, 24, 16, 150, 177, 202, 33, 19, 156 },  // left = d153
-      { 55, 27, 12, 153, 203, 218, 26, 27, 49 },   // left = d207
-      { 53, 49, 21, 110, 116, 168, 59, 80, 76 },   // left = d63
-      { 38, 72, 19, 168, 203, 212, 50, 50, 107 }   // left = tm
-  },
-  {
-      // above = d45
-      { 103, 26, 36, 129, 132, 201, 83, 80, 93 },  // left = dc
-      { 59, 38, 83, 112, 103, 162, 98, 136, 90 },  // left = v
-      { 62, 30, 23, 158, 200, 207, 59, 57, 50 },   // left = h
-      { 67, 30, 29, 84, 86, 191, 102, 91, 59 },    // left = d45
-      { 60, 32, 33, 112, 71, 220, 64, 89, 104 },   // left = d135
-      { 53, 26, 34, 130, 56, 149, 84, 120, 103 },  // left = d117
-      { 53, 21, 23, 133, 109, 210, 56, 77, 172 },  // left = d153
-      { 77, 19, 29, 112, 142, 228, 55, 66, 36 },   // left = d207
-      { 61, 29, 29, 93, 97, 165, 83, 175, 162 },   // left = d63
-      { 47, 47, 43, 114, 137, 181, 100, 99, 95 }   // left = tm
-  },
-  {
-      // above = d135
-      { 69, 23, 29, 128, 83, 199, 46, 44, 101 },   // left = dc
-      { 53, 40, 55, 139, 69, 183, 61, 80, 110 },   // left = v
-      { 40, 29, 19, 161, 180, 207, 43, 24, 91 },   // left = h
-      { 60, 34, 19, 105, 61, 198, 53, 64, 89 },    // left = d45
-      { 52, 31, 22, 158, 40, 209, 58, 62, 89 },    // left = d135
-      { 44, 31, 29, 147, 46, 158, 56, 102, 198 },  // left = d117
-      { 35, 19, 12, 135, 87, 209, 41, 45, 167 },   // left = d153
-      { 55, 25, 21, 118, 95, 215, 38, 39, 66 },    // left = d207
-      { 51, 38, 25, 113, 58, 164, 70, 93, 97 },    // left = d63
-      { 47, 54, 34, 146, 108, 203, 72, 103, 151 }  // left = tm
-  },
-  {
-      // above = d117
-      { 64, 19, 37, 156, 66, 138, 49, 95, 133 },   // left = dc
-      { 46, 27, 80, 150, 55, 124, 55, 121, 135 },  // left = v
-      { 36, 23, 27, 165, 149, 166, 54, 64, 118 },  // left = h
-      { 53, 21, 36, 131, 63, 163, 60, 109, 81 },   // left = d45
-      { 40, 26, 35, 154, 40, 185, 51, 97, 123 },   // left = d135
-      { 35, 19, 34, 179, 19, 97, 48, 129, 124 },   // left = d117
-      { 36, 20, 26, 136, 62, 164, 33, 77, 154 },   // left = d153
-      { 45, 18, 32, 130, 90, 157, 40, 79, 91 },    // left = d207
-      { 45, 26, 28, 129, 45, 129, 49, 147, 123 },  // left = d63
-      { 38, 44, 51, 136, 74, 162, 57, 97, 121 }    // left = tm
-  },
-  {
-      // above = d153
-      { 75, 17, 22, 136, 138, 185, 32, 34, 166 },  // left = dc
-      { 56, 39, 58, 133, 117, 173, 48, 53, 187 },  // left = v
-      { 35, 21, 12, 161, 212, 207, 20, 23, 145 },  // left = h
-      { 56, 29, 19, 117, 109, 181, 55, 68, 112 },  // left = d45
-      { 47, 29, 17, 153, 64, 220, 59, 51, 114 },   // left = d135
-      { 46, 16, 24, 136, 76, 147, 41, 64, 172 },   // left = d117
-      { 34, 17, 11, 108, 152, 187, 13, 15, 209 },  // left = d153
-      { 51, 24, 14, 115, 133, 209, 32, 26, 104 },  // left = d207
-      { 55, 30, 18, 122, 79, 179, 44, 88, 116 },   // left = d63
-      { 37, 49, 25, 129, 168, 164, 41, 54, 148 }   // left = tm
-  },
-  {
-      // above = d207
-      { 82, 22, 32, 127, 143, 213, 39, 41, 70 },   // left = dc
-      { 62, 44, 61, 123, 105, 189, 48, 57, 64 },   // left = v
-      { 47, 25, 17, 175, 222, 220, 24, 30, 86 },   // left = h
-      { 68, 36, 17, 106, 102, 206, 59, 74, 74 },   // left = d45
-      { 57, 39, 23, 151, 68, 216, 55, 63, 58 },    // left = d135
-      { 49, 30, 35, 141, 70, 168, 82, 40, 115 },   // left = d117
-      { 51, 25, 15, 136, 129, 202, 38, 35, 139 },  // left = d153
-      { 68, 26, 16, 111, 141, 215, 29, 28, 28 },   // left = d207
-      { 59, 39, 19, 114, 75, 180, 77, 104, 42 },   // left = d63
-      { 40, 61, 26, 126, 152, 206, 61, 59, 93 }    // left = tm
-  },
-  {
-      // above = d63
-      { 78, 23, 39, 111, 117, 170, 74, 124, 94 },   // left = dc
-      { 48, 34, 86, 101, 92, 146, 78, 179, 134 },   // left = v
-      { 47, 22, 24, 138, 187, 178, 68, 69, 59 },    // left = h
-      { 56, 25, 33, 105, 112, 187, 95, 177, 129 },  // left = d45
-      { 48, 31, 27, 114, 63, 183, 82, 116, 56 },    // left = d135
-      { 43, 28, 37, 121, 63, 123, 61, 192, 169 },   // left = d117
-      { 42, 17, 24, 109, 97, 177, 56, 76, 122 },    // left = d153
-      { 58, 18, 28, 105, 139, 182, 70, 92, 63 },    // left = d207
-      { 46, 23, 32, 74, 86, 150, 67, 183, 88 },     // left = d63
-      { 36, 38, 48, 92, 122, 165, 88, 137, 91 }     // left = tm
-  },
-  {
-      // above = tm
-      { 65, 70, 60, 155, 159, 199, 61, 60, 81 },    // left = dc
-      { 44, 78, 115, 132, 119, 173, 71, 112, 93 },  // left = v
-      { 39, 38, 21, 184, 227, 206, 42, 32, 64 },    // left = h
-      { 58, 47, 36, 124, 137, 193, 80, 82, 78 },    // left = d45
-      { 49, 50, 35, 144, 95, 205, 63, 78, 59 },     // left = d135
-      { 41, 53, 52, 148, 71, 142, 65, 128, 51 },    // left = d117
-      { 40, 36, 28, 143, 143, 202, 40, 55, 137 },   // left = d153
-      { 52, 34, 29, 129, 183, 227, 42, 35, 43 },    // left = d207
-      { 42, 44, 44, 104, 105, 164, 64, 130, 80 },   // left = d63
-      { 43, 81, 53, 140, 169, 204, 68, 84, 72 }     // left = tm
-  }
-};
-
-// Default probabilities for signaling Intra mode for Y plane -- used only for
-// inter frames. ('av1_kf_y_mode_prob' is used for intra-only frames).
-// Context used: block size group.
-static const aom_prob default_if_y_probs[BLOCK_SIZE_GROUPS][INTRA_MODES - 1] = {
-  { 65, 32, 18, 144, 162, 194, 41, 51, 98 },   // block_size < 8x8
-  { 132, 68, 18, 165, 217, 196, 45, 40, 78 },  // block_size < 16x16
-  { 173, 80, 19, 176, 240, 193, 64, 35, 46 },  // block_size < 32x32
-  { 221, 135, 38, 194, 248, 121, 96, 85, 29 }  // block_size >= 32x32
-};
-
-// Default probabilities for signaling Intra mode for UV plane -- common for
-// both intra and inter frames.
-// Context used: Intra mode used by Y plane of the same block.
-static const aom_prob default_uv_probs[INTRA_MODES][INTRA_MODES - 1] = {
-  { 120, 7, 76, 176, 208, 126, 28, 54, 103 },   // y = dc
-  { 48, 12, 154, 155, 139, 90, 34, 117, 119 },  // y = v
-  { 67, 6, 25, 204, 243, 158, 13, 21, 96 },     // y = h
-  { 97, 5, 44, 131, 176, 139, 48, 68, 97 },     // y = d45
-  { 83, 5, 42, 156, 111, 152, 26, 49, 152 },    // y = d135
-  { 80, 5, 58, 178, 74, 83, 33, 62, 145 },      // y = d117
-  { 86, 5, 32, 154, 192, 168, 14, 22, 163 },    // y = d153
-  { 85, 5, 32, 156, 216, 148, 19, 29, 73 },     // y = d207
-  { 77, 7, 64, 116, 132, 122, 37, 126, 120 },   // y = d63
-  { 101, 21, 107, 181, 192, 103, 19, 67, 125 }  // y = tm
-};
-
-#endif  // CONFIG_ALT_INTRA
-#endif  // !CONFIG_EC_ADAPT
-
 #if CONFIG_EXT_PARTITION_TYPES
 static const aom_prob
     default_partition_probs[PARTITION_CONTEXTS][EXT_PARTITION_TYPES - 1] = {
@@ -1046,7 +447,6 @@
       { 27, 49, 152, 91, 134, 153, 142 },     // 6 = two intra neighbours
     };
 
-#if CONFIG_EC_ADAPT
 static const aom_cdf_prob
     default_inter_compound_mode_cdf[INTER_MODE_CONTEXTS][CDF_SIZE(
         INTER_COMPOUND_MODES)] = {
@@ -1058,7 +458,6 @@
       { 29824, 19455, 15554, 12017, 9557, 7268, 5776, 0, 0 },
       { 29312, 23701, 18699, 15861, 13951, 11554, 9629, 0, 0 }
     };
-#endif
 
 #if CONFIG_COMPOUND_SINGLEREF
 // TODO(zoeliu): Default values to be further adjusted based on the collected
@@ -1128,7 +527,6 @@
                                                  [COMPOUND_TYPES - 1];
 #endif  // CONFIG_COMPOUND_SEGMENT && CONFIG_WEDGE
 
-#if CONFIG_EC_ADAPT
 #if CONFIG_COMPOUND_SEGMENT && CONFIG_WEDGE
 static const aom_cdf_prob
     default_compound_type_cdf[BLOCK_SIZES][CDF_SIZE(COMPOUND_TYPES)] = {
@@ -1214,7 +612,6 @@
 static const aom_cdf_prob default_compound_type_cdf[BLOCK_SIZES]
                                                    [CDF_SIZE(COMPOUND_TYPES)];
 #endif  // CONFIG_COMPOUND_SEGMENT && CONFIG_WEDGE
-#endif  // CONFIG_EC_ADAPT
 
 #if CONFIG_INTERINTRA
 static const aom_prob default_interintra_prob[BLOCK_SIZE_GROUPS] = {
@@ -1235,14 +632,12 @@
       { 38, 33, 95 },     // block_size < 32x32
       { 51, 21, 110 },    // block_size >= 32x32
     };
-#if CONFIG_EC_ADAPT
 static const aom_cdf_prob
     default_interintra_mode_cdf[BLOCK_SIZE_GROUPS][CDF_SIZE(INTERINTRA_MODES)] =
         { { 16384, 8192, 4096, 0, 0 },
           { 29696, 25752, 13781, 0, 0 },
           { 27904, 24307, 15287, 0, 0 },
           { 26240, 24087, 13737, 0, 0 } };
-#endif
 
 static const aom_prob default_wedge_interintra_prob[BLOCK_SIZES] = {
 #if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
@@ -1343,7 +738,6 @@
 #endif  // CONFIG_EXT_PARTITION
     };
 #endif
-#if CONFIG_EC_ADAPT
 static const aom_cdf_prob
     default_motion_mode_cdf[BLOCK_SIZES][CDF_SIZE(MOTION_MODES)] = {
 #if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
@@ -1370,7 +764,6 @@
       { AOM_ICDF(252 * 128), AOM_ICDF(32768), 0 },
 #endif  // CONFIG_EXT_PARTITION
     };
-#endif  // CONFIG_EC_ADAPT
 
 #elif !CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION
 
@@ -1390,7 +783,6 @@
 #endif  // CONFIG_EXT_PARTITION
     };
 
-#if CONFIG_EC_ADAPT
 static const aom_cdf_prob
     default_motion_mode_cdf[BLOCK_SIZES][CDF_SIZE(MOTION_MODES)] = {
 #if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
@@ -1417,7 +809,6 @@
       { AOM_ICDF(252 * 128), AOM_ICDF(32768), 0 },
 #endif  // CONFIG_EXT_PARTITION
     };
-#endif  // CONFIG_EC_ADAPT
 
 #elif CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION
 
@@ -1437,7 +828,6 @@
 #endif  // CONFIG_EXT_PARTITION
     };
 
-#if CONFIG_EC_ADAPT
 static const aom_cdf_prob
     default_motion_mode_cdf[BLOCK_SIZES][CDF_SIZE(MOTION_MODES)] = {
 #if CONFIG_CHROMA_2X2 || CONFIG_CHROMA_SUB8X8
@@ -1464,7 +854,6 @@
       { AOM_ICDF(32256), AOM_ICDF(32656), AOM_ICDF(32768), 0 },
 #endif
     };
-#endif  // !CONFIG_EC_ADAPT
 
 // Probability for the case that only 1 additional motion mode is allowed
 static const aom_prob default_obmc_prob[BLOCK_SIZES] = {
@@ -1519,10 +908,6 @@
 };
 #endif
 #endif
-#if !CONFIG_EC_ADAPT
-int av1_intra_mode_ind[INTRA_MODES];
-int av1_intra_mode_inv[INTRA_MODES];
-#endif
 #if CONFIG_EXT_TX
 int av1_ext_tx_intra_ind[EXT_TX_SETS_INTRA][TX_TYPES];
 int av1_ext_tx_intra_inv[EXT_TX_SETS_INTRA][TX_TYPES];
@@ -1530,7 +915,6 @@
 int av1_ext_tx_inter_inv[EXT_TX_SETS_INTER][TX_TYPES];
 #endif
 
-#if CONFIG_EC_ADAPT
 #if CONFIG_ALT_INTRA
 #if CONFIG_SMOOTH_HV
 const int av1_intra_mode_ind[INTRA_MODES] = { 0, 2, 3,  6,  4,  5, 8,
@@ -1549,63 +933,6 @@
 const int av1_intra_mode_ind[INTRA_MODES] = { 0, 2, 3, 6, 4, 5, 8, 9, 7, 1 };
 const int av1_intra_mode_inv[INTRA_MODES] = { 0, 9, 1, 2, 4, 5, 3, 8, 6, 7 }
 #endif  // CONFIG_ALT_INTRA
-#else
-#if CONFIG_ALT_INTRA
-#if CONFIG_SMOOTH_HV
-const aom_tree_index av1_intra_mode_tree[TREE_SIZE(INTRA_MODES)] = {
-  -DC_PRED,
-  2, /* 0 = DC_NODE */
-  -TM_PRED,
-  4, /* 1 = TM_NODE */
-  -V_PRED,
-  6, /* 2 = V_NODE */
-  8,
-  12, /* 3 = COM_NODE */
-  -H_PRED,
-  10, /* 4 = H_NODE */
-  -D135_PRED,
-  -D117_PRED, /* 5 = D135_NODE */
-  -D45_PRED,
-  14, /* 6 = D45_NODE */
-  -D63_PRED,
-  16, /* 7 = D63_NODE */
-  -D153_PRED,
-  18, /* 8 = D153_NODE */
-  -D207_PRED,
-  20, /* 9 = D207_NODE */
-  -SMOOTH_PRED,
-  22, /* 10 = SMOOTH_NODE */
-  -SMOOTH_V_PRED,
-  -SMOOTH_H_PRED /* 11 = SMOOTH_V_NODE */
-};
-#else
-const aom_tree_index av1_intra_mode_tree[TREE_SIZE(INTRA_MODES)] = {
-  -DC_PRED,   2,            /* 0 = DC_NODE */
-  -TM_PRED,   4,            /* 1 = TM_NODE */
-  -V_PRED,    6,            /* 2 = V_NODE */
-  8,          12,           /* 3 = COM_NODE */
-  -H_PRED,    10,           /* 4 = H_NODE */
-  -D135_PRED, -D117_PRED,   /* 5 = D135_NODE */
-  -D45_PRED,  14,           /* 6 = D45_NODE */
-  -D63_PRED,  16,           /* 7 = D63_NODE */
-  -D153_PRED, 18,           /* 8 = D153_NODE */
-  -D207_PRED, -SMOOTH_PRED, /* 9 = D207_NODE */
-};
-#endif  // CONFIG_SMOOTH_HV
-#else
-const aom_tree_index av1_intra_mode_tree[TREE_SIZE(INTRA_MODES)] = {
-  -DC_PRED,   2,          /* 0 = DC_NODE */
-  -TM_PRED,   4,          /* 1 = TM_NODE */
-  -V_PRED,    6,          /* 2 = V_NODE */
-  8,          12,         /* 3 = COM_NODE */
-  -H_PRED,    10,         /* 4 = H_NODE */
-  -D135_PRED, -D117_PRED, /* 5 = D135_NODE */
-  -D45_PRED,  14,         /* 6 = D45_NODE */
-  -D63_PRED,  16,         /* 7 = D63_NODE */
-  -D153_PRED, -D207_PRED  /* 8 = D153_NODE */
-};
-#endif  // CONFIG_ALT_INTRA
-#endif  // !CONFIG_EC_ADAPT
 
 #if CONFIG_EXT_INTER
 /* clang-format off */
@@ -5198,10 +4525,6 @@
     };
 
 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);
@@ -5270,9 +4593,7 @@
 #if CONFIG_NCOBMC_ADAPT_WEIGHT && CONFIG_MOTION_VAR
   av1_copy(fc->ncobmc_mode_prob, default_ncobmc_mode_prob);
 #endif
-#if CONFIG_EC_ADAPT
   av1_copy(fc->motion_mode_cdf, default_motion_mode_cdf);
-#endif
 #if CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION
   av1_copy(fc->obmc_prob, default_obmc_prob);
 #if CONFIG_NEW_MULTISYMBOL
@@ -5282,17 +4603,13 @@
 #endif  // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION
 #if CONFIG_EXT_INTER
   av1_copy(fc->inter_compound_mode_probs, default_inter_compound_mode_probs);
-#if CONFIG_EC_ADAPT
   av1_copy(fc->inter_compound_mode_cdf, default_inter_compound_mode_cdf);
-#endif
 #if CONFIG_COMPOUND_SINGLEREF
   av1_copy(fc->inter_singleref_comp_mode_probs,
            default_inter_singleref_comp_mode_probs);
 #endif  // CONFIG_COMPOUND_SINGLEREF
   av1_copy(fc->compound_type_prob, default_compound_type_probs);
-#if CONFIG_EC_ADAPT
   av1_copy(fc->compound_type_cdf, default_compound_type_cdf);
-#endif
 #if CONFIG_INTERINTRA
   av1_copy(fc->interintra_prob, default_interintra_prob);
   av1_copy(fc->wedge_interintra_prob, default_wedge_interintra_prob);
@@ -5301,9 +4618,7 @@
   av1_copy(fc->wedge_interintra_cdf, default_wedge_interintra_cdf);
 #endif  // CONFIG_NEW_MULTISYMBOL
   av1_copy(fc->interintra_mode_prob, default_interintra_mode_prob);
-#if CONFIG_EC_ADAPT
   av1_copy(fc->interintra_mode_cdf, default_interintra_mode_cdf);
-#endif
 #endif  // CONFIG_INTERINTRA
 #endif  // CONFIG_EXT_INTER
 #if CONFIG_SUPERTX
@@ -5358,106 +4673,6 @@
 int av1_switchable_interp_ind[SWITCHABLE_FILTERS];
 int av1_switchable_interp_inv[SWITCHABLE_FILTERS];
 
-#if !CONFIG_EC_ADAPT
-void av1_set_mode_cdfs(struct AV1Common *cm) {
-  FRAME_CONTEXT *fc = cm->fc;
-  int i, j;
-  if (cm->seg.enabled && cm->seg.update_map) {
-    av1_tree_to_cdf(av1_segment_tree, cm->fc->seg.tree_probs,
-                    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],
-                    fc->partition_cdf[i]);
-  // Logical index (enum value) to inorder index (tree_to_cdf order)
-  aom_cdf_prob inorder_partition_cdf[CDF_SIZE(EXT_PARTITION_TYPES)] = {};
-  // TODO(aconverse): Generate this dynamically. The assumptions that
-  // av1_indices_from_tree() makes don't hold for this tree.
-  static const uint8_t av1_ext_partition_index_map[EXT_PARTITION_TYPES] = {
-    0, 1, 4, 7, 2, 3, 5, 6,
-  };
-  for (; i < PARTITION_CONTEXTS; ++i) {
-    av1_tree_to_cdf(av1_ext_partition_tree, fc->partition_prob[i],
-                    inorder_partition_cdf);
-    aom_cdf_prob cum_prob = 0;
-    for (j = 0; j < EXT_PARTITION_TYPES; ++j) {
-      int inorder_idx = av1_ext_partition_index_map[j];
-      aom_cdf_prob prob =
-          AOM_ICDF(inorder_partition_cdf[inorder_idx]) -
-          (inorder_idx > 0 ? AOM_ICDF(inorder_partition_cdf[inorder_idx - 1])
-                           : 0);
-      cum_prob += prob;
-      fc->partition_cdf[i][j] = AOM_ICDF(cum_prob);
-    }
-    assert(cum_prob == CDF_PROB_TOP);
-  }
-#else
-  for (i = 0; i < PARTITION_CONTEXTS; ++i)
-    av1_tree_to_cdf(av1_partition_tree, fc->partition_prob[i],
-                    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;
-  for (s = 0; s < EXT_TX_SETS_INTRA; ++s)
-    for (i = TX_4X4; i < EXT_TX_SIZES; ++i)
-      for (j = 0; j < INTRA_MODES; ++j)
-        av1_tree_to_cdf(av1_ext_tx_intra_tree[s],
-                        fc->intra_ext_tx_prob[s][i][j],
-                        fc->intra_ext_tx_cdf[s][i][j]);
-
-  for (s = 0; s < EXT_TX_SETS_INTER; ++s)
-    for (i = TX_4X4; i < EXT_TX_SIZES; ++i)
-      av1_tree_to_cdf(av1_ext_tx_inter_tree[s], fc->inter_ext_tx_prob[s][i],
-                      fc->inter_ext_tx_cdf[s][i]);
-#else
-  for (i = TX_4X4; i < EXT_TX_SIZES; ++i)
-    for (j = 0; j < TX_TYPES; ++j)
-      av1_tree_to_cdf(av1_ext_tx_tree, fc->intra_ext_tx_prob[i][j],
-                      fc->intra_ext_tx_cdf[i][j]);
-
-  for (i = TX_4X4; i < EXT_TX_SIZES; ++i)
-    av1_tree_to_cdf(av1_ext_tx_tree, fc->inter_ext_tx_prob[i],
-                    fc->inter_ext_tx_cdf[i]);
-#endif
-  for (i = 0; i < MAX_TX_DEPTH; i++) {
-    for (j = 0; j < TX_SIZE_CONTEXTS; j++) {
-      av1_tree_to_cdf(av1_tx_size_tree[i], fc->tx_size_probs[i][j],
-                      fc->tx_size_cdf[i][j]);
-    }
-  }
-#if CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
-  for (i = 0; i < INTRA_FILTERS + 1; ++i) {
-    av1_tree_to_cdf(av1_intra_filter_tree, fc->intra_filter_probs[i],
-                    fc->intra_filter_cdf[i]);
-  }
-#endif  // CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
-}
-#endif  // !CONFIG_EC_ADAPT
-
 #if CONFIG_DUAL_FILTER && USE_EXTRA_FILTER
 const aom_tree_index av1_switchable_interp_tree[TREE_SIZE(SWITCHABLE_FILTERS)] =
     {
@@ -5606,12 +4821,6 @@
 #endif  // CONFIG_COMPOUND_SEGMENT || CONFIG_WEDGE
 #endif  // CONFIG_EXT_INTER
 
-#if !CONFIG_EC_ADAPT
-  for (i = 0; i < BLOCK_SIZE_GROUPS; i++)
-    aom_tree_merge_probs(av1_intra_mode_tree, pre_fc->y_mode_prob[i],
-                         counts->y_mode[i], fc->y_mode_prob[i]);
-#endif
-
   if (cm->interp_filter == SWITCHABLE) {
     for (i = 0; i < SWITCHABLE_FILTER_CONTEXTS; i++)
       aom_tree_merge_probs(
@@ -5695,12 +4904,6 @@
                          counts->seg.tree_total, fc->seg.tree_probs);
   }
 
-#if !CONFIG_EC_ADAPT
-  for (i = 0; i < INTRA_MODES; ++i)
-    aom_tree_merge_probs(av1_intra_mode_tree, pre_fc->uv_mode_prob[i],
-                         counts->uv_mode[i], fc->uv_mode_prob[i]);
-#endif
-
 #if CONFIG_EXT_PARTITION_TYPES
   for (i = 0; i < PARTITION_PLOFFSET; ++i)
     aom_tree_merge_probs(av1_partition_tree, pre_fc->partition_prob[i],
diff --git a/av1/common/entropymode.h b/av1/common/entropymode.h
index d2d7942..18d4aa2 100644
--- a/av1/common/entropymode.h
+++ b/av1/common/entropymode.h
@@ -195,37 +195,29 @@
 #if CONFIG_EXT_INTER
   aom_prob inter_compound_mode_probs[INTER_MODE_CONTEXTS]
                                     [INTER_COMPOUND_MODES - 1];
-#if CONFIG_EC_ADAPT
   aom_cdf_prob inter_compound_mode_cdf[INTER_MODE_CONTEXTS]
                                       [CDF_SIZE(INTER_COMPOUND_MODES)];
-#endif
 #if CONFIG_COMPOUND_SINGLEREF
   aom_prob inter_singleref_comp_mode_probs[INTER_MODE_CONTEXTS]
                                           [INTER_SINGLEREF_COMP_MODES - 1];
 #endif  // CONFIG_COMPOUND_SINGLEREF
   aom_prob compound_type_prob[BLOCK_SIZES][COMPOUND_TYPES - 1];
-#if CONFIG_EC_ADAPT
   aom_cdf_prob compound_type_cdf[BLOCK_SIZES][CDF_SIZE(COMPOUND_TYPES)];
-#endif
 #if CONFIG_INTERINTRA
   aom_prob interintra_prob[BLOCK_SIZE_GROUPS];
   aom_prob wedge_interintra_prob[BLOCK_SIZES];
   aom_prob interintra_mode_prob[BLOCK_SIZE_GROUPS][INTERINTRA_MODES - 1];
-#if CONFIG_EC_ADAPT
 #if CONFIG_NEW_MULTISYMBOL
   aom_cdf_prob interintra_cdf[BLOCK_SIZE_GROUPS][CDF_SIZE(2)];
   aom_cdf_prob wedge_interintra_cdf[BLOCK_SIZES][CDF_SIZE(2)];
 #endif
   aom_cdf_prob interintra_mode_cdf[BLOCK_SIZE_GROUPS]
                                   [CDF_SIZE(INTERINTRA_MODES)];
-#endif
 #endif  // CONFIG_INTERINTRA
 #endif  // CONFIG_EXT_INTER
 #if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION
   aom_prob motion_mode_prob[BLOCK_SIZES][MOTION_MODES - 1];
-#if CONFIG_EC_ADAPT
   aom_cdf_prob motion_mode_cdf[BLOCK_SIZES][CDF_SIZE(MOTION_MODES)];
-#endif
 #if CONFIG_NCOBMC_ADAPT_WEIGHT && CONFIG_MOTION_VAR
   aom_prob ncobmc_mode_prob[ADAPT_OVERLAP_BLOCKS][MAX_NCOBMC_MODES - 1];
 #endif
@@ -372,11 +364,11 @@
 typedef struct FRAME_COUNTS {
 // Note: This structure should only contain 'unsigned int' fields, or
 // aggregates built solely from 'unsigned int' fields/elements
-#if !CONFIG_EC_ADAPT || CONFIG_ENTROPY_STATS
+#if CONFIG_ENTROPY_STATS
   unsigned int kf_y_mode[INTRA_MODES][INTRA_MODES][INTRA_MODES];
   unsigned int y_mode[BLOCK_SIZE_GROUPS][INTRA_MODES];
   unsigned int uv_mode[INTRA_MODES][INTRA_MODES];
-#endif  // !CONFIG_EC_ADAPT || CONFIG_ENTROPY_STATS
+#endif  // CONFIG_ENTROPY_STATS
 #if CONFIG_EXT_PARTITION_TYPES
   unsigned int partition[PARTITION_CONTEXTS][EXT_PARTITION_TYPES];
 #else
@@ -510,13 +502,6 @@
 #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)];
@@ -536,14 +521,8 @@
     [PALETTE_SIZES][PALETTE_COLOR_INDEX_CONTEXTS][PALETTE_COLORS - 1];
 #endif  // CONFIG_PALETTE
 
-#if !CONFIG_EC_ADAPT
-extern const aom_tree_index av1_intra_mode_tree[TREE_SIZE(INTRA_MODES)];
-extern int av1_intra_mode_ind[INTRA_MODES];
-extern int av1_intra_mode_inv[INTRA_MODES];
-#else
 extern const int av1_intra_mode_ind[INTRA_MODES];
 extern const int av1_intra_mode_inv[INTRA_MODES];
-#endif
 #if CONFIG_EXT_TX
 extern int av1_ext_tx_intra_ind[EXT_TX_SETS_INTRA][TX_TYPES];
 extern int av1_ext_tx_intra_inv[EXT_TX_SETS_INTRA][TX_TYPES];
@@ -605,10 +584,6 @@
 extern int av1_switchable_interp_ind[SWITCHABLE_FILTERS];
 extern int av1_switchable_interp_inv[SWITCHABLE_FILTERS];
 
-#if !CONFIG_EC_ADAPT
-void av1_set_mode_cdfs(struct AV1Common *cm);
-#endif
-
 void av1_setup_past_independence(struct AV1Common *cm);
 
 void av1_adapt_intra_frame_probs(struct AV1Common *cm);
diff --git a/av1/common/entropymv.c b/av1/common/entropymv.c
index 7c5a944..a41cf2c 100644
--- a/av1/common/entropymv.c
+++ b/av1/common/entropymv.c
@@ -228,25 +228,6 @@
   }
 }
 
-#if !CONFIG_EC_ADAPT
-void av1_set_mv_cdfs(nmv_context *ctx) {
-  int i;
-  int j;
-  av1_tree_to_cdf(av1_mv_joint_tree, ctx->joints, ctx->joint_cdf);
-
-  for (i = 0; i < 2; ++i) {
-    nmv_component *const comp_ctx = &ctx->comps[i];
-    av1_tree_to_cdf(av1_mv_class_tree, comp_ctx->classes, comp_ctx->class_cdf);
-
-    for (j = 0; j < CLASS0_SIZE; ++j) {
-      av1_tree_to_cdf(av1_mv_fp_tree, comp_ctx->class0_fp[j],
-                      comp_ctx->class0_fp_cdf[j]);
-    }
-    av1_tree_to_cdf(av1_mv_fp_tree, comp_ctx->fp, comp_ctx->fp_cdf);
-  }
-}
-#endif
-
 void av1_init_mv_probs(AV1_COMMON *cm) {
   int i;
   for (i = 0; i < NMV_CONTEXTS; ++i) {
diff --git a/av1/common/entropymv.h b/av1/common/entropymv.h
index 5b2d348..544fe9f 100644
--- a/av1/common/entropymv.h
+++ b/av1/common/entropymv.h
@@ -137,9 +137,6 @@
 
 void av1_inc_mv(const MV *mv, nmv_context_counts *mvctx,
                 MvSubpelPrecision precision);
-#if !CONFIG_EC_ADAPT
-void av1_set_mv_cdfs(nmv_context *ctx);
-#endif
 
 #ifdef __cplusplus
 }  // extern "C"
diff --git a/av1/common/generic_code.c b/av1/common/generic_code.c
index 2955a69..7285dec 100644
--- a/av1/common/generic_code.c
+++ b/av1/common/generic_code.c
@@ -22,9 +22,7 @@
   for (i = 0; i < nsyms; i++)
     cdf[i] = AOM_ICDF((i + 1)*CDF_PROB_TOP/nsyms);
 
-#if CONFIG_EC_ADAPT
   cdf[cdf_size - 1] = 0;
-#endif
 }
 
 /** Adapts a Q15 cdf after encoding/decoding a symbol. */
diff --git a/av1/common/generic_code.h b/av1/common/generic_code.h
index c9d8779..e1620ee 100644
--- a/av1/common/generic_code.h
+++ b/av1/common/generic_code.h
@@ -47,7 +47,7 @@
 #define OD_CDFS_INIT_Q15(cdfs) \
   { int n_cdfs = sizeof(cdfs)/sizeof(cdfs[0]); \
     int cdf_size = sizeof(cdfs[0])/sizeof(cdfs[0][0]); \
-    int nsyms = cdf_size - CONFIG_EC_ADAPT; \
+    int nsyms = cdf_size - 1; \
     int i_; \
     for (i_ = 0; i_ < n_cdfs; i_++) \
       aom_cdf_init_q15_1D(cdfs[i_], nsyms, cdf_size); \
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index 9affe14..b941c02 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -163,26 +163,6 @@
 #endif  // CONFIG_VAR_TX_NO_TX_MODE
 }
 
-#if !CONFIG_EC_ADAPT
-static void read_tx_size_probs(FRAME_CONTEXT *fc, aom_reader *r) {
-  int i, j, k;
-  for (i = 0; i < MAX_TX_DEPTH; ++i)
-    for (j = 0; j < TX_SIZE_CONTEXTS; ++j)
-      for (k = 0; k < i + 1; ++k)
-        av1_diff_update_prob(r, &fc->tx_size_probs[i][j][k], ACCT_STR);
-}
-#endif
-
-#if !CONFIG_EC_ADAPT
-static void read_switchable_interp_probs(FRAME_CONTEXT *fc, aom_reader *r) {
-  int i, j;
-  for (j = 0; j < SWITCHABLE_FILTER_CONTEXTS; ++j) {
-    for (i = 0; i < SWITCHABLE_FILTERS - 1; ++i)
-      av1_diff_update_prob(r, &fc->switchable_interp_prob[j][i], ACCT_STR);
-  }
-}
-#endif
-
 #if !CONFIG_NEW_MULTISYMBOL
 static void read_inter_mode_probs(FRAME_CONTEXT *fc, aom_reader *r) {
   int i;
@@ -197,21 +177,7 @@
 }
 #endif
 
-#if CONFIG_EXT_INTER
-#if !CONFIG_EC_ADAPT
-static void read_inter_compound_mode_probs(FRAME_CONTEXT *fc, aom_reader *r) {
-  int i, j;
-  if (aom_read(r, GROUP_DIFF_UPDATE_PROB, ACCT_STR)) {
-    for (j = 0; j < INTER_MODE_CONTEXTS; ++j) {
-      for (i = 0; i < INTER_COMPOUND_MODES - 1; ++i) {
-        av1_diff_update_prob(r, &fc->inter_compound_mode_probs[j][i], ACCT_STR);
-      }
-    }
-  }
-}
-#endif  // CONFIG_EC_ADAPT
-
-#if CONFIG_COMPOUND_SINGLEREF
+#if CONFIG_EXT_INTER && CONFIG_COMPOUND_SINGLEREF
 static void read_inter_singleref_comp_mode_probs(FRAME_CONTEXT *fc,
                                                  aom_reader *r) {
   int i, j;
@@ -224,30 +190,7 @@
     }
   }
 }
-#endif  // CONFIG_COMPOUND_SINGLEREF
-#endif  // CONFIG_EXT_INTER
-
-#if !CONFIG_EC_ADAPT
-#if !CONFIG_EXT_TX
-static void read_ext_tx_probs(FRAME_CONTEXT *fc, aom_reader *r) {
-  int i, j, k;
-  if (aom_read(r, GROUP_DIFF_UPDATE_PROB, ACCT_STR)) {
-    for (i = TX_4X4; i < EXT_TX_SIZES; ++i) {
-      for (j = 0; j < TX_TYPES; ++j) {
-        for (k = 0; k < TX_TYPES - 1; ++k)
-          av1_diff_update_prob(r, &fc->intra_ext_tx_prob[i][j][k], ACCT_STR);
-      }
-    }
-  }
-  if (aom_read(r, GROUP_DIFF_UPDATE_PROB, ACCT_STR)) {
-    for (i = TX_4X4; i < EXT_TX_SIZES; ++i) {
-      for (k = 0; k < TX_TYPES - 1; ++k)
-        av1_diff_update_prob(r, &fc->inter_ext_tx_prob[i][k], ACCT_STR);
-    }
-  }
-}
-#endif
-#endif
+#endif  // CONFIG_EXT_INTER && CONFIG_COMPOUND_SINGLEREF
 
 static REFERENCE_MODE read_frame_reference_mode(
     const AV1_COMMON *cm, struct aom_read_bit_buffer *rb) {
@@ -323,27 +266,6 @@
 
 static void read_mv_probs(nmv_context *ctx, int allow_hp, aom_reader *r) {
   int i;
-
-#if !CONFIG_EC_ADAPT
-  int j;
-  update_mv_probs(ctx->joints, MV_JOINTS - 1, r);
-
-  for (i = 0; i < 2; ++i) {
-    nmv_component *const comp_ctx = &ctx->comps[i];
-    update_mv_probs(&comp_ctx->sign, 1, r);
-    update_mv_probs(comp_ctx->classes, MV_CLASSES - 1, r);
-    update_mv_probs(comp_ctx->class0, CLASS0_SIZE - 1, r);
-    update_mv_probs(comp_ctx->bits, MV_OFFSET_BITS, r);
-  }
-  for (i = 0; i < 2; ++i) {
-    nmv_component *const comp_ctx = &ctx->comps[i];
-    for (j = 0; j < CLASS0_SIZE; ++j) {
-      update_mv_probs(comp_ctx->class0_fp[j], MV_FP_SIZE - 1, r);
-    }
-    update_mv_probs(comp_ctx->fp, MV_FP_SIZE - 1, r);
-  }
-#endif  // !CONFIG_EC_ADAPT
-
   if (allow_hp) {
     for (i = 0; i < 2; ++i) {
       nmv_component *const comp_ctx = &ctx->comps[i];
@@ -2319,12 +2241,8 @@
   FRAME_COUNTS *const counts = xd->counts;
 #endif
   PARTITION_TYPE p;
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
   (void)cm;
-#else
-  FRAME_CONTEXT *ec_ctx = cm->fc;
-#endif
 
   aom_cdf_prob *partition_cdf = (ctx >= 0) ? ec_ctx->partition_cdf[ctx] : NULL;
 
@@ -2631,11 +2549,7 @@
     if (skip) {
       av1_reset_skip_context(xd, mi_row, mi_col, bsize);
     } else {
-#if CONFIG_EC_ADAPT
       FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
-#else
-      FRAME_CONTEXT *ec_ctx = cm->fc;
-#endif
 #if CONFIG_EXT_TX
       if (get_ext_tx_types(supertx_size, bsize, 1, cm->reduced_tx_set_used) >
           1) {
@@ -2740,33 +2654,6 @@
                        "Failed to allocate bool decoder %d", 1);
 }
 
-#if !CONFIG_PVQ && !CONFIG_EC_ADAPT && !CONFIG_LV_MAP
-static void read_coef_probs_common(av1_coeff_probs_model *coef_probs,
-                                   aom_reader *r) {
-  int i, j, k, l, m;
-#if CONFIG_EC_ADAPT
-  const int node_limit = UNCONSTRAINED_NODES - 1;
-#else
-  const int node_limit = UNCONSTRAINED_NODES;
-#endif
-
-  if (aom_read_bit(r, ACCT_STR))
-    for (i = 0; i < PLANE_TYPES; ++i)
-      for (j = 0; j < REF_TYPES; ++j)
-        for (k = 0; k < COEF_BANDS; ++k)
-          for (l = 0; l < BAND_COEFF_CONTEXTS(k); ++l)
-            for (m = 0; m < node_limit; ++m)
-              av1_diff_update_prob(r, &coef_probs[i][j][k][l][m], ACCT_STR);
-}
-
-static void read_coef_probs(FRAME_CONTEXT *fc, TX_MODE tx_mode, aom_reader *r) {
-  const TX_SIZE max_tx_size = tx_mode_to_biggest_tx_size[tx_mode];
-  TX_SIZE tx_size;
-  for (tx_size = 0; tx_size <= max_tx_size; ++tx_size)
-    read_coef_probs_common(fc->coef_probs[tx_size], r);
-}
-#endif
-
 static void setup_segmentation(AV1_COMMON *const cm,
                                struct aom_read_bit_buffer *rb) {
   struct segmentation *const seg = &cm->seg;
@@ -3858,11 +3745,9 @@
 #endif
                            td->dqcoeff);
 
-#if CONFIG_EC_ADAPT
       // Initialise the tile context from the frame context
       td->tctx = *cm->fc;
       td->xd.tile_ctx = &td->tctx;
-#endif
 
 #if CONFIG_PVQ
       daala_dec_init(cm, &td->xd.daala_dec, &td->bit_reader);
@@ -4223,11 +4108,9 @@
         daala_dec_init(cm, &twd->xd.daala_dec, &twd->bit_reader);
         twd->xd.daala_dec.state.adapt = &twd->tctx.pvq_context;
 #endif
-#if CONFIG_EC_ADAPT
         // Initialise the tile context from the frame context
         twd->tctx = *cm->fc;
         twd->xd.tile_ctx = &twd->tctx;
-#endif
 #if CONFIG_PALETTE
         twd->xd.plane[0].color_index_map = twd->color_index_map[0];
         twd->xd.plane[1].color_index_map = twd->color_index_map[1];
@@ -4844,37 +4727,6 @@
   return sz;
 }
 
-#if CONFIG_EXT_TX
-#if !CONFIG_EC_ADAPT
-static void read_ext_tx_probs(FRAME_CONTEXT *fc, aom_reader *r) {
-  int i, j, k;
-  int s;
-  for (s = 1; s < EXT_TX_SETS_INTER; ++s) {
-    if (aom_read(r, GROUP_DIFF_UPDATE_PROB, ACCT_STR)) {
-      for (i = TX_4X4; i < EXT_TX_SIZES; ++i) {
-        if (!use_inter_ext_tx_for_txsize[s][i]) continue;
-        for (j = 0; j < num_ext_tx_set[ext_tx_set_type_inter[s]] - 1; ++j)
-          av1_diff_update_prob(r, &fc->inter_ext_tx_prob[s][i][j], ACCT_STR);
-      }
-    }
-  }
-
-  for (s = 1; s < EXT_TX_SETS_INTRA; ++s) {
-    if (aom_read(r, GROUP_DIFF_UPDATE_PROB, ACCT_STR)) {
-      for (i = TX_4X4; i < EXT_TX_SIZES; ++i) {
-        if (!use_intra_ext_tx_for_txsize[s][i]) continue;
-        for (j = 0; j < INTRA_MODES; ++j)
-          for (k = 0; k < num_ext_tx_set[ext_tx_set_type_intra[s]] - 1; ++k)
-            av1_diff_update_prob(r, &fc->intra_ext_tx_prob[s][i][j][k],
-                                 ACCT_STR);
-      }
-    }
-  }
-}
-#endif  // !CONFIG_EC_ADAPT
-#else
-
-#endif  // CONFIG_EXT_TX
 #if CONFIG_SUPERTX
 static void read_supertx_probs(FRAME_CONTEXT *fc, aom_reader *r) {
   int i, j;
@@ -5004,9 +4856,6 @@
   FRAME_CONTEXT *const fc = cm->fc;
   aom_reader r;
   int i;
-#if !CONFIG_EC_ADAPT
-  int j;
-#endif
 
 #if CONFIG_ANS && ANS_MAX_SYMBOLS
   r.window_size = 1 << cm->ans_window_size_log2;
@@ -5025,9 +4874,6 @@
   }
 #endif
 
-#if !CONFIG_EC_ADAPT
-  if (cm->tx_mode == TX_MODE_SELECT) read_tx_size_probs(fc, &r);
-#endif
 #if CONFIG_EXT_TX && CONFIG_RECT_TX && CONFIG_RECT_TX_EXT
   if (cm->tx_mode == TX_MODE_SELECT)
     av1_diff_update_prob(&r, &fc->quarter_tx_size_prob, ACCT_STR);
@@ -5035,12 +4881,6 @@
 
 #if CONFIG_LV_MAP
   av1_read_txb_probs(fc, cm->tx_mode, &r);
-#else  // CONFIG_LV_MAP
-#if !CONFIG_PVQ
-#if !CONFIG_EC_ADAPT
-  read_coef_probs(fc, cm->tx_mode, &r);
-#endif  // !CONFIG_EC_ADAPT
-#endif  // !CONFIG_PVQ
 #endif  // CONFIG_LV_MAP
 
 #if !CONFIG_NEW_MULTISYMBOL
@@ -5052,76 +4892,8 @@
     av1_diff_update_prob(&r, &fc->skip_probs[i], ACCT_STR);
 #endif
 
-#if CONFIG_DELTA_Q && !CONFIG_EC_ADAPT
-#if CONFIG_EXT_DELTA_Q
-  if (cm->delta_q_present_flag) {
-    for (i = 0; i < DELTA_Q_PROBS; ++i)
-      av1_diff_update_prob(&r, &fc->delta_q_prob[i], ACCT_STR);
-  }
-  if (cm->delta_lf_present_flag) {
-    for (i = 0; i < DELTA_LF_PROBS; ++i)
-      av1_diff_update_prob(&r, &fc->delta_lf_prob[i], ACCT_STR);
-  }
-#else
-  for (i = 0; i < DELTA_Q_PROBS; ++i)
-    av1_diff_update_prob(&r, &fc->delta_q_prob[i], ACCT_STR);
-#endif
-#endif
-
-#if !CONFIG_EC_ADAPT
-  if (cm->seg.enabled && cm->seg.update_map) {
-    if (cm->seg.temporal_update) {
-      for (i = 0; i < PREDICTION_PROBS; i++)
-        av1_diff_update_prob(&r, &cm->fc->seg.pred_probs[i], ACCT_STR);
-    }
-    for (i = 0; i < MAX_SEGMENTS - 1; i++)
-      av1_diff_update_prob(&r, &cm->fc->seg.tree_probs[i], ACCT_STR);
-  }
-
-  for (j = 0; j < INTRA_MODES; j++) {
-    for (i = 0; i < INTRA_MODES - 1; ++i)
-      av1_diff_update_prob(&r, &fc->uv_mode_prob[j][i], ACCT_STR);
-  }
-
-#if CONFIG_EXT_PARTITION_TYPES
-  for (j = 0; j < PARTITION_PLOFFSET; ++j)
-    for (i = 0; i < PARTITION_TYPES - 1; ++i)
-      av1_diff_update_prob(&r, &fc->partition_prob[j][i], ACCT_STR);
-  for (; j < PARTITION_CONTEXTS_PRIMARY; ++j)
-    for (i = 0; i < EXT_PARTITION_TYPES - 1; ++i)
-      av1_diff_update_prob(&r, &fc->partition_prob[j][i], ACCT_STR);
-#else
-  for (j = 0; j < PARTITION_CONTEXTS_PRIMARY; ++j)
-    for (i = 0; i < PARTITION_TYPES - 1; ++i)
-      av1_diff_update_prob(&r, &fc->partition_prob[j][i], ACCT_STR);
-#endif  // CONFIG_EXT_PARTITION_TYPES
-
-#if CONFIG_UNPOISON_PARTITION_CTX
-  for (; j < PARTITION_CONTEXTS_PRIMARY + PARTITION_BLOCK_SIZES; ++j)
-    av1_diff_update_prob(&r, &fc->partition_prob[j][PARTITION_VERT], ACCT_STR);
-  for (; j < PARTITION_CONTEXTS_PRIMARY + 2 * PARTITION_BLOCK_SIZES; ++j)
-    av1_diff_update_prob(&r, &fc->partition_prob[j][PARTITION_HORZ], ACCT_STR);
-#endif  // CONFIG_UNPOISON_PARTITION_CTX
-
-#if CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
-  for (i = 0; i < INTRA_FILTERS + 1; ++i)
-    for (j = 0; j < INTRA_FILTERS - 1; ++j)
-      av1_diff_update_prob(&r, &fc->intra_filter_probs[i][j], ACCT_STR);
-#endif  // CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
-#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;
-    for (k = 0; k < INTRA_MODES; k++)
-      for (j = 0; j < INTRA_MODES; j++)
-        for (i = 0; i < INTRA_MODES - 1; ++i)
-          av1_diff_update_prob(&r, &cm->kf_y_prob[k][j][i], ACCT_STR);
-#endif
 #if CONFIG_INTRABC
     if (cm->allow_screen_content_tools) {
       av1_diff_update_prob(&r, &fc->intrabc_prob, ACCT_STR);
@@ -5133,9 +4905,6 @@
 #endif
 
 #if CONFIG_EXT_INTER
-#if !CONFIG_EC_ADAPT
-    read_inter_compound_mode_probs(fc, &r);
-#endif
 #if CONFIG_COMPOUND_SINGLEREF
     read_inter_singleref_comp_mode_probs(fc, &r);
 #endif  // CONFIG_COMPOUND_SINGLEREF
@@ -5150,12 +4919,6 @@
         }
       }
 #endif
-#if !CONFIG_EC_ADAPT
-      for (i = 0; i < BLOCK_SIZE_GROUPS; i++) {
-        for (j = 0; j < INTERINTRA_MODES - 1; j++)
-          av1_diff_update_prob(&r, &fc->interintra_mode_prob[i][j], ACCT_STR);
-      }
-#endif
 #if CONFIG_WEDGE && !CONFIG_NEW_MULTISYMBOL
       for (i = 0; i < BLOCK_SIZES; i++) {
         if (is_interintra_allowed_bsize(i) && is_interintra_wedge_used(i)) {
@@ -5165,32 +4928,8 @@
 #endif  // CONFIG_WEDGE
     }
 #endif  // CONFIG_INTERINTRA
-#if !CONFIG_EC_ADAPT && (CONFIG_COMPOUND_SEGMENT || CONFIG_WEDGE)
-#if CONFIG_COMPOUND_SINGLEREF
-    if (cm->allow_masked_compound) {
-#else   // !CONFIG_COMPOUND_SINGLEREF
-    if (cm->reference_mode != SINGLE_REFERENCE && cm->allow_masked_compound) {
-#endif  // CONFIG_COMPOUND_SINGLEREF
-      for (i = 0; i < BLOCK_SIZES; i++) {
-        if (is_any_masked_compound_used(i)) {
-          for (j = 0; j < COMPOUND_TYPES - 1; j++) {
-            av1_diff_update_prob(&r, &fc->compound_type_prob[i][j], ACCT_STR);
-          }
-        }
-      }
-    }
-#endif  // !CONFIG_EC_ADAPT && (CONFIG_COMPOUND_SEGMENT || CONFIG_WEDGE)
 #endif  // CONFIG_EXT_INTER
 
-#if !CONFIG_EC_ADAPT
-#if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION
-    for (i = BLOCK_8X8; i < BLOCK_SIZES; ++i) {
-      for (j = 0; j < MOTION_MODES - 1; ++j)
-        av1_diff_update_prob(&r, &fc->motion_mode_prob[i][j], ACCT_STR);
-    }
-#endif  // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION
-#endif  // !CONFIG_EC_ADAPT
-
 #if CONFIG_NCOBMC_ADAPT_WEIGHT && CONFIG_MOTION_VAR
     for (i = 0; i < ADAPT_OVERLAP_BLOCKS; ++i) {
       for (j = 0; j < MAX_NCOBMC_MODES - 1; ++j)
@@ -5198,9 +4937,6 @@
     }
 #endif
 
-#if !CONFIG_EC_ADAPT
-    if (cm->interp_filter == SWITCHABLE) read_switchable_interp_probs(fc, &r);
-#endif  // !CONFIG_EC_ADAPT
 #if !CONFIG_NEW_MULTISYMBOL
     for (i = 0; i < INTRA_INTER_CONTEXTS; i++)
       av1_diff_update_prob(&r, &fc->intra_inter_prob[i], ACCT_STR);
@@ -5215,18 +4951,8 @@
       av1_diff_update_prob(&r, &fc->comp_inter_mode_prob[i], ACCT_STR);
 #endif  // CONFIG_EXT_INTER && CONFIG_COMPOUND_SINGLEREF
 
-#if !CONFIG_EC_ADAPT
-    for (j = 0; j < BLOCK_SIZE_GROUPS; j++) {
-      for (i = 0; i < INTRA_MODES - 1; ++i)
-        av1_diff_update_prob(&r, &fc->y_mode_prob[j][i], ACCT_STR);
-    }
-#endif
-
     for (i = 0; i < NMV_CONTEXTS; ++i)
       read_mv_probs(&fc->nmvc[i], cm->allow_high_precision_mv, &r);
-#if !CONFIG_EC_ADAPT
-    read_ext_tx_probs(fc, &r);
-#endif  // EC_ADAPT
 #if CONFIG_SUPERTX
     if (!xd->lossless[0]) read_supertx_probs(fc, &r);
 #endif
@@ -5234,13 +4960,6 @@
     read_global_motion(cm, &r);
 #endif
   }
-#if !CONFIG_EC_ADAPT
-  av1_coef_head_cdfs(fc);
-  /* Make tail distribution from head */
-  av1_coef_pareto_cdfs(fc);
-  for (i = 0; i < NMV_CONTEXTS; ++i) av1_set_mv_cdfs(&fc->nmvc[i]);
-  av1_set_mode_cdfs(cm);
-#endif  // !CONFIG_EC_ADAPT
 
   return aom_reader_has_error(&r);
 }
@@ -5254,7 +4973,7 @@
   av1_zero(zero_counts);
   assert(cm->refresh_frame_context != REFRESH_FRAME_CONTEXT_BACKWARD ||
          cm->error_resilient_mode);
-#if !CONFIG_EC_ADAPT || CONFIG_ENTROPY_STATS
+#if CONFIG_ENTROPY_STATS
   assert(!memcmp(cm->counts.y_mode, zero_counts.y_mode,
                  sizeof(cm->counts.y_mode)));
   assert(!memcmp(cm->counts.uv_mode, zero_counts.uv_mode,
@@ -5368,14 +5087,12 @@
   return (BITSTREAM_PROFILE)profile;
 }
 
-#if CONFIG_EC_ADAPT
 static void make_update_tile_list_dec(AV1Decoder *pbi, int tile_rows,
                                       int tile_cols, FRAME_CONTEXT *ec_ctxs[]) {
   int i;
   for (i = 0; i < tile_rows * tile_cols; ++i)
     ec_ctxs[i] = &pbi->tile_data[i].tctx;
 }
-#endif
 
 #if CONFIG_FRAME_SUPERRES
 void superres_post_decode(AV1Decoder *pbi) {
@@ -5588,17 +5305,14 @@
 
   if (!xd->corrupted) {
     if (cm->refresh_frame_context == REFRESH_FRAME_CONTEXT_BACKWARD) {
-#if CONFIG_EC_ADAPT
       FRAME_CONTEXT **tile_ctxs = aom_malloc(cm->tile_rows * cm->tile_cols *
                                              sizeof(&pbi->tile_data[0].tctx));
       aom_cdf_prob **cdf_ptrs =
           aom_malloc(cm->tile_rows * cm->tile_cols *
                      sizeof(&pbi->tile_data[0].tctx.partition_cdf[0][0]));
       make_update_tile_list_dec(pbi, cm->tile_rows, cm->tile_cols, tile_ctxs);
-#endif
       av1_adapt_coef_probs(cm);
       av1_adapt_intra_frame_probs(cm);
-#if CONFIG_EC_ADAPT
       av1_average_tile_coef_cdfs(pbi->common.fc, tile_ctxs, cdf_ptrs,
                                  cm->tile_rows * cm->tile_cols);
       av1_average_tile_intra_cdfs(pbi->common.fc, tile_ctxs, cdf_ptrs,
@@ -5607,7 +5321,6 @@
       av1_average_tile_pvq_cdfs(pbi->common.fc, tile_ctxs,
                                 cm->tile_rows * cm->tile_cols);
 #endif  // CONFIG_PVQ
-#endif  // CONFIG_EC_ADAPT
 #if CONFIG_ADAPT_SCAN
       av1_adapt_scan_order(cm);
 #endif  // CONFIG_ADAPT_SCAN
@@ -5615,17 +5328,13 @@
       if (!frame_is_intra_only(cm)) {
         av1_adapt_inter_frame_probs(cm);
         av1_adapt_mv_probs(cm, cm->allow_high_precision_mv);
-#if CONFIG_EC_ADAPT
         av1_average_tile_inter_cdfs(&pbi->common, pbi->common.fc, tile_ctxs,
                                     cdf_ptrs, cm->tile_rows * cm->tile_cols);
         av1_average_tile_mv_cdfs(pbi->common.fc, tile_ctxs, cdf_ptrs,
                                  cm->tile_rows * cm->tile_cols);
-#endif
       }
-#if CONFIG_EC_ADAPT
       aom_free(tile_ctxs);
       aom_free(cdf_ptrs);
-#endif
     } else {
       debug_check_frame_counts(cm);
     }
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index ddeb0e5..fd8d10c 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -64,12 +64,8 @@
   const int read_delta_q_flag = (b_col == 0 && b_row == 0);
   int rem_bits, thr;
   int i, smallval;
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
   (void)cm;
-#else
-  FRAME_CONTEXT *ec_ctx = cm->fc;
-#endif
 
   if ((bsize != BLOCK_LARGEST || mbmi->skip == 0) && read_delta_q_flag) {
     abs = aom_read_symbol(r, ec_ctx->delta_q_cdf, DELTA_Q_PROBS + 1, ACCT_STR);
@@ -107,12 +103,8 @@
   const int read_delta_lf_flag = (b_col == 0 && b_row == 0);
   int rem_bits, thr;
   int i, smallval;
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
   (void)cm;
-#else
-  FRAME_CONTEXT *ec_ctx = cm->fc;
-#endif
 
   if ((bsize != BLOCK_64X64 || mbmi->skip == 0) && read_delta_lf_flag) {
     abs =
@@ -145,13 +137,13 @@
                                          aom_reader *r, int size_group) {
   const PREDICTION_MODE y_mode =
       read_intra_mode(r, ec_ctx->y_mode_cdf[size_group]);
-#if !CONFIG_EC_ADAPT || CONFIG_ENTROPY_STATS
+#if CONFIG_ENTROPY_STATS
   FRAME_COUNTS *counts = xd->counts;
   if (counts) ++counts->y_mode[size_group][y_mode];
 #else
   /* TODO(negge): Can we remove this parameter? */
   (void)xd;
-#endif  // !CONFIG_EC_ADAPT || CONFIG_ENTROPY_STATS
+#endif  // CONFIG_ENTROPY_STATS
   return y_mode;
 }
 
@@ -160,13 +152,13 @@
                                           PREDICTION_MODE y_mode) {
   const PREDICTION_MODE uv_mode =
       read_intra_mode(r, ec_ctx->uv_mode_cdf[y_mode]);
-#if !CONFIG_EC_ADAPT || CONFIG_ENTROPY_STATS
+#if CONFIG_ENTROPY_STATS
   FRAME_COUNTS *counts = xd->counts;
   if (counts) ++counts->uv_mode[y_mode][uv_mode];
 #else
   /* TODO(negge): Can we remove this parameter? */
   (void)xd;
-#endif  // !CONFIG_EC_ADAPT || CONFIG_ENTROPY_STATS
+#endif  // CONFIG_ENTROPY_STATS
   return uv_mode;
 }
 
@@ -192,16 +184,10 @@
 #if CONFIG_EXT_INTER && CONFIG_INTERINTRA
 static INTERINTRA_MODE read_interintra_mode(AV1_COMMON *cm, MACROBLOCKD *xd,
                                             aom_reader *r, int size_group) {
-#if CONFIG_EC_ADAPT
   (void)cm;
   const INTERINTRA_MODE ii_mode = (INTERINTRA_MODE)aom_read_symbol(
       r, xd->tile_ctx->interintra_mode_cdf[size_group], INTERINTRA_MODES,
       ACCT_STR);
-#else
-  const INTERINTRA_MODE ii_mode = (INTERINTRA_MODE)aom_read_tree(
-      r, av1_interintra_mode_tree, cm->fc->interintra_mode_prob[size_group],
-      ACCT_STR);
-#endif
   FRAME_COUNTS *counts = xd->counts;
   if (counts) ++counts->interintra_mode[size_group][ii_mode];
   return ii_mode;
@@ -356,15 +342,9 @@
     return (MOTION_MODE)(SIMPLE_TRANSLATION + motion_mode);
   } else {
 #endif  // CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION
-#if CONFIG_EC_ADAPT
     motion_mode =
         aom_read_symbol(r, xd->tile_ctx->motion_mode_cdf[mbmi->sb_type],
                         MOTION_MODES, ACCT_STR);
-#else
-  motion_mode =
-      aom_read_tree(r, av1_motion_mode_tree,
-                    cm->fc->motion_mode_prob[mbmi->sb_type], ACCT_STR);
-#endif
     if (counts) ++counts->motion_mode[mbmi->sb_type][motion_mode];
     return (MOTION_MODE)(SIMPLE_TRANSLATION + motion_mode);
 #if CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION
@@ -402,16 +382,10 @@
 #if CONFIG_EXT_INTER
 static PREDICTION_MODE read_inter_compound_mode(AV1_COMMON *cm, MACROBLOCKD *xd,
                                                 aom_reader *r, int16_t ctx) {
-#if CONFIG_EC_ADAPT
   (void)cm;
   const int mode =
       aom_read_symbol(r, xd->tile_ctx->inter_compound_mode_cdf[ctx],
                       INTER_COMPOUND_MODES, ACCT_STR);
-#else
-  const int mode =
-      aom_read_tree(r, av1_inter_compound_mode_tree,
-                    cm->fc->inter_compound_mode_probs[ctx], ACCT_STR);
-#endif
   FRAME_COUNTS *counts = xd->counts;
 
   if (counts) ++counts->inter_compound_mode[ctx][mode];
@@ -530,12 +504,8 @@
                                      int tx_size_cat, aom_reader *r) {
   FRAME_COUNTS *counts = xd->counts;
   const int ctx = get_tx_size_context(xd);
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
   (void)cm;
-#else
-  FRAME_CONTEXT *ec_ctx = cm->fc;
-#endif
 
   const int depth = aom_read_symbol(r, ec_ctx->tx_size_cdf[tx_size_cat][ctx],
                                     tx_size_cat + 2, ACCT_STR);
@@ -624,11 +594,7 @@
                                  aom_reader *r) {
   struct segmentation *const seg = &cm->seg;
   FRAME_COUNTS *counts = xd->counts;
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
-#else
-  FRAME_CONTEXT *ec_ctx = cm->fc;
-#endif
   struct segmentation_probs *const segp = &ec_ctx->seg;
   int segment_id;
 
@@ -659,11 +625,7 @@
                                  int mi_row, int mi_col, aom_reader *r) {
   struct segmentation *const seg = &cm->seg;
   FRAME_COUNTS *counts = xd->counts;
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
-#else
-  FRAME_CONTEXT *ec_ctx = cm->fc;
-#endif
   struct segmentation_probs *const segp = &ec_ctx->seg;
 
   MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
@@ -957,11 +919,7 @@
   MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
   const BLOCK_SIZE bsize = mbmi->sb_type;
 #if CONFIG_INTRA_INTERP
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *const ec_ctx = xd->tile_ctx;
-#else
-  FRAME_CONTEXT *const ec_ctx = cm->fc;
-#endif  // CONFIG_EC_ADAPT
   const int ctx = av1_get_pred_context_intra_interp(xd);
   int p_angle;
 #endif  // CONFIG_INTRA_INTERP
@@ -1013,11 +971,7 @@
   const TX_SIZE tx_size = mbmi->tx_size;
 #endif
 #endif  // !CONFIG_TXK_SEL
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
-#else
-  FRAME_CONTEXT *ec_ctx = cm->fc;
-#endif
 
 #if !CONFIG_TXK_SEL
   TX_TYPE *tx_type = &mbmi->tx_type;
@@ -1101,12 +1055,8 @@
 static INLINE int assign_dv(AV1_COMMON *cm, MACROBLOCKD *xd, int_mv *mv,
                             const int_mv *ref_mv, int mi_row, int mi_col,
                             BLOCK_SIZE bsize, aom_reader *r) {
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
   (void)cm;
-#else
-  FRAME_CONTEXT *ec_ctx = cm->fc;
-#endif
   FRAME_COUNTS *counts = xd->counts;
   nmv_context_counts *const dv_counts = counts ? &counts->dv : NULL;
   read_mv(r, &mv->as_mv, &ref_mv->as_mv, &ec_ctx->ndvc, dv_counts,
@@ -1133,11 +1083,7 @@
   // TODO(slavarnway): move x_mis, y_mis into xd ?????
   const int x_mis = AOMMIN(cm->mi_cols - mi_col, bw);
   const int y_mis = AOMMIN(cm->mi_rows - mi_row, bh);
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
-#else
-  FRAME_CONTEXT *ec_ctx = cm->fc;
-#endif
 
   mbmi->segment_id = read_intra_segment_id(cm, xd, mi_offset, x_mis, y_mis, r);
   mbmi->skip = read_skip(cm, xd, mbmi->segment_id, r);
@@ -1646,11 +1592,7 @@
                                          MB_MODE_INFO *const mbmi,
                                          aom_reader *r) {
   FRAME_COUNTS *counts = xd->counts;
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
-#else
-  FRAME_CONTEXT *ec_ctx = cm->fc;
-#endif
 
   if (!av1_is_interp_needed(xd)) {
     set_default_interp_filters(mbmi, cm->interp_filter);
@@ -1709,11 +1651,7 @@
   mbmi->ref_frame[0] = INTRA_FRAME;
   mbmi->ref_frame[1] = NONE_FRAME;
 
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
-#else
-  FRAME_CONTEXT *ec_ctx = cm->fc;
-#endif
 
 #if CONFIG_CB4X4
   (void)i;
@@ -1755,13 +1693,8 @@
 #if CONFIG_CFL
     // TODO(ltrudeau) support PALETTE
     if (mbmi->uv_mode == DC_PRED) {
-      mbmi->cfl_alpha_idx = read_cfl_alphas(
-#if CONFIG_EC_ADAPT
-          xd->tile_ctx,
-#else
-          cm->fc,
-#endif  // CONFIG_EC_ADAPT
-          r, mbmi->cfl_alpha_signs);
+      mbmi->cfl_alpha_idx =
+          read_cfl_alphas(xd->tile_ctx, r, mbmi->cfl_alpha_signs);
     }
 #endif  // CONFIG_CFL
 
@@ -1800,11 +1733,7 @@
                             aom_reader *r) {
   int i;
   int ret = 1;
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
-#else
-  FRAME_CONTEXT *ec_ctx = cm->fc;
-#endif
   BLOCK_SIZE bsize = xd->mi[0]->mbmi.sb_type;
   MB_MODE_INFO *mbmi = &xd->mi[0]->mbmi;
 #if CONFIG_CB4X4
@@ -2068,11 +1997,7 @@
   } else {
     const int ctx = av1_get_intra_inter_context(xd);
 #if CONFIG_NEW_MULTISYMBOL
-#if CONFIG_EC_ADAPT
     FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
-#else
-    FRAME_CONTEXT *ec_ctx = cm->fc;
-#endif
     const int is_inter =
         aom_read_symbol(r, ec_ctx->intra_inter_cdf[ctx], 2, ACCT_STR);
 #else
@@ -2198,11 +2123,7 @@
 #if CONFIG_WARPED_MOTION
   int pts[SAMPLES_ARRAY_SIZE], pts_inref[SAMPLES_ARRAY_SIZE];
 #endif  // CONFIG_WARPED_MOTION
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
-#else
-  FRAME_CONTEXT *ec_ctx = cm->fc;
-#endif
 
   assert(NELEMENTS(mode_2_counter) == MB_MODE_COUNT);
 
@@ -2708,14 +2629,8 @@
     if (is_any_masked_compound_used(bsize)) {
 #if CONFIG_COMPOUND_SEGMENT || CONFIG_WEDGE
       if (cm->allow_masked_compound) {
-#if CONFIG_EC_ADAPT
         mbmi->interinter_compound_type = aom_read_symbol(
             r, ec_ctx->compound_type_cdf[bsize], COMPOUND_TYPES, ACCT_STR);
-#else
-        mbmi->interinter_compound_type =
-            aom_read_tree(r, av1_compound_type_tree,
-                          cm->fc->compound_type_prob[bsize], ACCT_STR);
-#endif
 #if CONFIG_WEDGE
         if (mbmi->interinter_compound_type == COMPOUND_WEDGE) {
           mbmi->wedge_index =
diff --git a/av1/decoder/decoder.c b/av1/decoder/decoder.c
index 4a68deb..579557c 100644
--- a/av1/decoder/decoder.c
+++ b/av1/decoder/decoder.c
@@ -50,10 +50,6 @@
     av1_init_wedge_masks();
 #endif  // CONFIG_EXT_INTER
     init_done = 1;
-#if !CONFIG_EC_ADAPT
-    av1_indices_from_tree(av1_intra_mode_ind, av1_intra_mode_inv,
-                          av1_intra_mode_tree);
-#endif
     av1_indices_from_tree(av1_switchable_interp_ind, av1_switchable_interp_inv,
                           av1_switchable_interp_tree);
 #if CONFIG_EXT_TX
diff --git a/av1/decoder/decoder.h b/av1/decoder/decoder.h
index 92fdf8f..afa1807 100644
--- a/av1/decoder/decoder.h
+++ b/av1/decoder/decoder.h
@@ -53,9 +53,7 @@
 #if CONFIG_CFL
   CFL_CTX cfl;
 #endif
-#if CONFIG_EC_ADAPT
   DECLARE_ALIGNED(16, FRAME_CONTEXT, tctx);
-#endif
 #if CONFIG_PALETTE
   DECLARE_ALIGNED(16, uint8_t, color_index_map[2][MAX_SB_SQUARE]);
 #endif  // CONFIG_PALETTE
@@ -75,9 +73,7 @@
 #if CONFIG_CFL
   CFL_CTX cfl;
 #endif
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT tctx;
-#endif
 #if CONFIG_PALETTE
   DECLARE_ALIGNED(16, uint8_t, color_index_map[2][MAX_SB_SQUARE]);
 #endif  // CONFIG_PALETTE
diff --git a/av1/decoder/detokenize.c b/av1/decoder/detokenize.c
index d2d7894..ce0b70c 100644
--- a/av1/decoder/detokenize.c
+++ b/av1/decoder/detokenize.c
@@ -110,12 +110,7 @@
 #endif  // CONFIG_AOM_QM
                         int ctx, const int16_t *scan, const int16_t *nb,
                         int16_t *max_scan_line, aom_reader *r) {
-  FRAME_COUNTS *counts = xd->counts;
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
-#else
-  FRAME_CONTEXT *const ec_ctx = xd->fc;
-#endif
   const int max_eob = tx_size_2d[tx_size];
   const int ref = is_inter_block(&xd->mi[0]->mbmi);
 #if CONFIG_AOM_QM
@@ -131,11 +126,6 @@
       ec_ctx->coef_tail_cdfs[tx_size_ctx][type][ref];
   int val = 0;
 
-#if !CONFIG_EC_ADAPT
-  unsigned int *blockz_count;
-  unsigned int(*coef_counts)[COEFF_CONTEXTS][UNCONSTRAINED_NODES + 1] = NULL;
-  unsigned int(*eob_branch_count)[COEFF_CONTEXTS] = NULL;
-#endif
   uint8_t token_cache[MAX_TX_SQUARE];
   const uint8_t *band_translate = get_band_translate(tx_size);
   int dq_shift;
@@ -145,14 +135,6 @@
   const tran_low_t *dqv_val = &dq_val[0][0];
 #endif  // CONFIG_NEW_QUANT
 
-  if (counts) {
-#if !CONFIG_EC_ADAPT
-    coef_counts = counts->coef[tx_size_ctx][type][ref];
-    eob_branch_count = counts->eob_branch[tx_size_ctx][type][ref];
-    blockz_count = counts->blockz_count[tx_size_ctx][type][ref][ctx];
-#endif
-  }
-
   dq_shift = av1_get_tx_scale(tx_size);
 
   band = *band_translate++;
@@ -172,9 +154,6 @@
                                             HEAD_TOKENS + first_pos, ACCT_STR) +
                                 !first_pos;
     if (first_pos) {
-#if !CONFIG_EC_ADAPT
-      if (counts) ++blockz_count[comb_token != 0];
-#endif
       if (comb_token == 0) return 0;
     }
     token = comb_token >> 1;
@@ -182,11 +161,6 @@
     while (!token) {
       *max_scan_line = AOMMAX(*max_scan_line, scan[c]);
       token_cache[scan[c]] = 0;
-#if !CONFIG_EC_ADAPT
-      if (counts && !last_pos) {
-        ++coef_counts[band][ctx][ZERO_TOKEN];
-      }
-#endif
       ++c;
       dqv = dq[1];
       ctx = get_coef_context(nb, token_cache, c);
@@ -202,13 +176,6 @@
     }
 
     more_data = comb_token & 1;
-#if !CONFIG_EC_ADAPT
-    if (counts && !last_pos) {
-      ++coef_counts[band][ctx][token];
-      ++eob_branch_count[band][ctx];
-      if (!more_data) ++coef_counts[band][ctx][EOB_MODEL_TOKEN];
-    }
-#endif
 
     if (token > ONE_TOKEN)
       token +=
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 6e28138..1f20723 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -63,19 +63,10 @@
 
 #define ENC_MISMATCH_DEBUG 0
 
-#if CONFIG_EXT_INTER
-#if !CONFIG_EC_ADAPT
-static const struct av1_token
-    inter_compound_mode_encodings[INTER_COMPOUND_MODES] = {
-      { 2, 2 },  { 12, 4 }, { 52, 6 }, { 53, 6 },
-      { 54, 6 }, { 55, 6 }, { 0, 1 },  { 7, 3 }
-    };
-#endif
-#if CONFIG_COMPOUND_SINGLEREF
+#if CONFIG_EXT_INTER && CONFIG_COMPOUND_SINGLEREF
 static struct av1_token
     inter_singleref_comp_mode_encodings[INTER_SINGLEREF_COMP_MODES];
-#endif  // CONFIG_COMPOUND_SINGLEREF
-#endif  // CONFIG_EXT_INTER
+#endif  // CONFIG_EXT_INTER && CONFIG_COMPOUND_SINGLEREF
 #if CONFIG_PALETTE
 static struct av1_token palette_size_encodings[PALETTE_SIZES];
 static struct av1_token palette_color_index_encodings[PALETTE_SIZES]
@@ -116,9 +107,6 @@
 #endif  // CONFIG_COMPOUND_SEGMENT || CONFIG_WEDGE
 #endif  // CONFIG_EXT_INTER
 #if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION
-#if !CONFIG_EC_ADAPT
-static struct av1_token motion_mode_encodings[MOTION_MODES];
-#endif
 #if CONFIG_NCOBMC_ADAPT_WEIGHT
 static struct av1_token ncobmc_mode_encodings[MAX_NCOBMC_MODES];
 #endif
@@ -174,9 +162,6 @@
 #endif  // CONFIG_COMPOUND_SEGMENT || CONFIG_WEDGE
 #endif  // CONFIG_EXT_INTER
 #if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION
-#if !CONFIG_EC_ADAPT
-  av1_tokens_from_tree(motion_mode_encodings, av1_motion_mode_tree);
-#endif
 #if CONFIG_NCOBMC_ADAPT_WEIGHT
   av1_tokens_from_tree(ncobmc_mode_encodings, av1_ncobmc_mode_tree);
 #endif
@@ -204,10 +189,6 @@
 #else
   av1_indices_from_tree(av1_ext_tx_ind, av1_ext_tx_inv, av1_ext_tx_tree);
 #endif
-#if !CONFIG_EC_ADAPT
-  av1_indices_from_tree(av1_intra_mode_ind, av1_intra_mode_inv,
-                        av1_intra_mode_tree);
-#endif
 }
 
 static void write_intra_mode_kf(const AV1_COMMON *cm, FRAME_CONTEXT *frame_ctx,
@@ -320,19 +301,10 @@
                                       aom_writer *w, PREDICTION_MODE mode,
                                       const int16_t mode_ctx) {
   assert(is_inter_compound_mode(mode));
-#if CONFIG_EC_ADAPT
   (void)cm;
   aom_write_symbol(w, INTER_COMPOUND_OFFSET(mode),
                    xd->tile_ctx->inter_compound_mode_cdf[mode_ctx],
                    INTER_COMPOUND_MODES);
-#else
-  (void)xd;
-  const aom_prob *const inter_compound_probs =
-      cm->fc->inter_compound_mode_probs[mode_ctx];
-
-  av1_write_token(w, av1_inter_compound_mode_tree, inter_compound_probs,
-                  &inter_compound_mode_encodings[INTER_COMPOUND_OFFSET(mode)]);
-#endif
 }
 
 #if CONFIG_COMPOUND_SINGLEREF
@@ -355,7 +327,7 @@
   aom_wb_write_literal(wb, data, get_unsigned_bits(max));
 }
 
-#if !CONFIG_EC_ADAPT || CONFIG_NCOBMC_ADAPT_WEIGHT || CONFIG_COMPOUND_SINGLEREF
+#if CONFIG_NCOBMC_ADAPT_WEIGHT || CONFIG_COMPOUND_SINGLEREF
 static void prob_diff_update(const aom_tree_index *tree,
                              aom_prob probs[/*n - 1*/],
                              const unsigned int counts[/* n */], int n,
@@ -372,7 +344,7 @@
 }
 #endif
 
-#if !CONFIG_EC_ADAPT || CONFIG_COMPOUND_SINGLEREF
+#if CONFIG_COMPOUND_SINGLEREF
 static int prob_diff_update_savings(const aom_tree_index *tree,
                                     aom_prob probs[/*n - 1*/],
                                     const unsigned int counts[/*n - 1*/], int n,
@@ -390,7 +362,7 @@
   }
   return savings;
 }
-#endif  // !CONFIG_EC_ADAPT || CONFIG_COMPOUND_SINGLEREF
+#endif  // CONFIG_COMPOUND_SINGLEREF
 
 #if CONFIG_VAR_TX
 static void write_tx_size_vartx(const AV1_COMMON *cm, MACROBLOCKD *xd,
@@ -469,12 +441,8 @@
                                    aom_writer *w) {
   const MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
   const BLOCK_SIZE bsize = mbmi->sb_type;
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
   (void)cm;
-#else
-  FRAME_CONTEXT *ec_ctx = cm->fc;
-#endif
 // For sub8x8 blocks the tx_size symbol does not need to be sent
 #if CONFIG_CB4X4 && (CONFIG_VAR_TX || CONFIG_EXT_TX) && CONFIG_RECT_TX
   if (bsize > BLOCK_4X4) {
@@ -526,33 +494,7 @@
 }
 #endif
 
-#if CONFIG_EXT_INTER
-#if !CONFIG_EC_ADAPT
-static void update_inter_compound_mode_probs(AV1_COMMON *cm, int probwt,
-                                             aom_writer *w) {
-  const int savings_thresh = av1_cost_one(GROUP_DIFF_UPDATE_PROB) -
-                             av1_cost_zero(GROUP_DIFF_UPDATE_PROB);
-  int i;
-  int savings = 0;
-  int do_update = 0;
-  for (i = 0; i < INTER_MODE_CONTEXTS; ++i) {
-    savings += prob_diff_update_savings(
-        av1_inter_compound_mode_tree, cm->fc->inter_compound_mode_probs[i],
-        cm->counts.inter_compound_mode[i], INTER_COMPOUND_MODES, probwt);
-  }
-  do_update = savings > savings_thresh;
-  aom_write(w, do_update, GROUP_DIFF_UPDATE_PROB);
-  if (do_update) {
-    for (i = 0; i < INTER_MODE_CONTEXTS; ++i) {
-      prob_diff_update(
-          av1_inter_compound_mode_tree, cm->fc->inter_compound_mode_probs[i],
-          cm->counts.inter_compound_mode[i], INTER_COMPOUND_MODES, probwt, w);
-    }
-  }
-}
-#endif
-
-#if CONFIG_COMPOUND_SINGLEREF
+#if CONFIG_EXT_INTER && CONFIG_COMPOUND_SINGLEREF
 static void update_inter_singleref_comp_mode_probs(AV1_COMMON *cm, int probwt,
                                                    aom_writer *w) {
   const int savings_thresh = av1_cost_one(GROUP_DIFF_UPDATE_PROB) -
@@ -578,8 +520,7 @@
     }
   }
 }
-#endif  // CONFIG_COMPOUND_SINGLEREF
-#endif  // CONFIG_EXT_INTER
+#endif  // CONFIG_EXT_INTER && CONFIG_COMPOUND_SINGLEREF
 
 static int write_skip(const AV1_COMMON *cm, const MACROBLOCKD *xd,
                       int segment_id, const MODE_INFO *mi, aom_writer *w) {
@@ -615,9 +556,6 @@
 static void write_motion_mode(const AV1_COMMON *cm, MACROBLOCKD *xd,
                               const MODE_INFO *mi, aom_writer *w) {
   const MB_MODE_INFO *mbmi = &mi->mbmi;
-#if !CONFIG_EC_ADAPT
-  (void)xd;
-#endif
 
 #if CONFIG_NCOBMC_ADAPT_WEIGHT
   MOTION_MODE last_motion_mode_allowed =
@@ -645,15 +583,9 @@
 #endif
   } else {
 #endif  // CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION
-#if CONFIG_EC_ADAPT
     aom_write_symbol(w, mbmi->motion_mode,
                      xd->tile_ctx->motion_mode_cdf[mbmi->sb_type],
                      MOTION_MODES);
-#else
-  av1_write_token(w, av1_motion_mode_tree,
-                  cm->fc->motion_mode_prob[mbmi->sb_type],
-                  &motion_mode_encodings[mbmi->motion_mode]);
-#endif
 #if CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION
   }
 #endif  // CONFIG_MOTION_VAR && CONFIG_WARPED_MOTION
@@ -690,13 +622,8 @@
   int abs = sign ? -delta_qindex : delta_qindex;
   int rem_bits, thr;
   int smallval = abs < DELTA_Q_SMALL ? 1 : 0;
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
   (void)cm;
-#else
-  FRAME_CONTEXT *ec_ctx = cm->fc;
-  (void)xd;
-#endif
 
   aom_write_symbol(w, AOMMIN(abs, DELTA_Q_SMALL), ec_ctx->delta_q_cdf,
                    DELTA_Q_PROBS + 1);
@@ -712,25 +639,6 @@
   }
 }
 
-#if !CONFIG_EC_ADAPT
-static void update_delta_q_probs(AV1_COMMON *cm, aom_writer *w,
-                                 FRAME_COUNTS *counts) {
-  int k;
-#if CONFIG_TILE_GROUPS
-  const int probwt = cm->num_tg;
-#else
-  const int probwt = 1;
-#endif
-#if CONFIG_EXT_DELTA_Q
-  if (!cm->delta_q_present_flag) return;
-#endif  // CONFIG_EXT_DELTA_Q
-  for (k = 0; k < DELTA_Q_PROBS; ++k) {
-    av1_cond_prob_diff_update(w, &cm->fc->delta_q_prob[k], counts->delta_q[k],
-                              probwt);
-  }
-}
-#endif  // CONFIG_EC_ADAPT
-
 #if CONFIG_EXT_DELTA_Q
 static void write_delta_lflevel(const AV1_COMMON *cm, const MACROBLOCKD *xd,
                                 int delta_lflevel, aom_writer *w) {
@@ -738,13 +646,8 @@
   int abs = sign ? -delta_lflevel : delta_lflevel;
   int rem_bits, thr;
   int smallval = abs < DELTA_LF_SMALL ? 1 : 0;
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
   (void)cm;
-#else
-  FRAME_CONTEXT *ec_ctx = cm->fc;
-  (void)xd;
-#endif
 
   aom_write_symbol(w, AOMMIN(abs, DELTA_LF_SMALL), ec_ctx->delta_lf_cdf,
                    DELTA_LF_PROBS + 1);
@@ -759,23 +662,6 @@
     aom_write_bit(w, sign);
   }
 }
-
-#if !CONFIG_EC_ADAPT
-static void update_delta_lf_probs(AV1_COMMON *cm, aom_writer *w,
-                                  FRAME_COUNTS *counts) {
-  int k;
-#if CONFIG_TILE_GROUPS
-  const int probwt = cm->num_tg;
-#else
-  const int probwt = 1;
-#endif
-  if (!cm->delta_lf_present_flag) return;
-  for (k = 0; k < DELTA_LF_PROBS; ++k) {
-    av1_cond_prob_diff_update(w, &cm->fc->delta_lf_prob[k], counts->delta_lf[k],
-                              probwt);
-  }
-}
-#endif  // CONFIG_EC_ADAPT
 #endif  // CONFIG_EXT_DELTA_Q
 #endif  // CONFIG_DELTA_Q
 
@@ -795,131 +681,6 @@
 }
 #endif
 
-#if !CONFIG_EC_ADAPT
-static void update_switchable_interp_probs(AV1_COMMON *cm, aom_writer *w,
-                                           FRAME_COUNTS *counts) {
-  int j;
-  for (j = 0; j < SWITCHABLE_FILTER_CONTEXTS; ++j) {
-#if CONFIG_TILE_GROUPS
-    const int probwt = cm->num_tg;
-#else
-    const int probwt = 1;
-#endif
-    prob_diff_update(
-        av1_switchable_interp_tree, cm->fc->switchable_interp_prob[j],
-        counts->switchable_interp[j], SWITCHABLE_FILTERS, probwt, w);
-  }
-}
-#endif
-
-#if !CONFIG_EC_ADAPT
-#if CONFIG_EXT_TX
-static void update_ext_tx_probs(AV1_COMMON *cm, aom_writer *w) {
-  const int savings_thresh = av1_cost_one(GROUP_DIFF_UPDATE_PROB) -
-                             av1_cost_zero(GROUP_DIFF_UPDATE_PROB);
-  int i, j;
-  int s;
-#if CONFIG_TILE_GROUPS
-  const int probwt = cm->num_tg;
-#else
-  const int probwt = 1;
-#endif
-  for (s = 1; s < EXT_TX_SETS_INTER; ++s) {
-    int savings = 0;
-    int do_update = 0;
-    for (i = TX_4X4; i < EXT_TX_SIZES; ++i) {
-      if (!use_inter_ext_tx_for_txsize[s][i]) continue;
-      savings += prob_diff_update_savings(
-          av1_ext_tx_inter_tree[s], cm->fc->inter_ext_tx_prob[s][i],
-          cm->counts.inter_ext_tx[s][i],
-          num_ext_tx_set[ext_tx_set_type_inter[s]], probwt);
-    }
-    do_update = savings > savings_thresh;
-    aom_write(w, do_update, GROUP_DIFF_UPDATE_PROB);
-    if (do_update) {
-      for (i = TX_4X4; i < EXT_TX_SIZES; ++i) {
-        if (!use_inter_ext_tx_for_txsize[s][i]) continue;
-        prob_diff_update(av1_ext_tx_inter_tree[s],
-                         cm->fc->inter_ext_tx_prob[s][i],
-                         cm->counts.inter_ext_tx[s][i],
-                         num_ext_tx_set[ext_tx_set_type_inter[s]], probwt, w);
-      }
-    }
-  }
-
-  for (s = 1; s < EXT_TX_SETS_INTRA; ++s) {
-    int savings = 0;
-    int do_update = 0;
-    for (i = TX_4X4; i < EXT_TX_SIZES; ++i) {
-      if (!use_intra_ext_tx_for_txsize[s][i]) continue;
-      for (j = 0; j < INTRA_MODES; ++j)
-        savings += prob_diff_update_savings(
-            av1_ext_tx_intra_tree[s], cm->fc->intra_ext_tx_prob[s][i][j],
-            cm->counts.intra_ext_tx[s][i][j],
-            num_ext_tx_set[ext_tx_set_type_intra[s]], probwt);
-    }
-    do_update = savings > savings_thresh;
-    aom_write(w, do_update, GROUP_DIFF_UPDATE_PROB);
-    if (do_update) {
-      for (i = TX_4X4; i < EXT_TX_SIZES; ++i) {
-        if (!use_intra_ext_tx_for_txsize[s][i]) continue;
-        for (j = 0; j < INTRA_MODES; ++j)
-          prob_diff_update(av1_ext_tx_intra_tree[s],
-                           cm->fc->intra_ext_tx_prob[s][i][j],
-                           cm->counts.intra_ext_tx[s][i][j],
-                           num_ext_tx_set[ext_tx_set_type_intra[s]], probwt, w);
-      }
-    }
-  }
-}
-
-#else
-static void update_ext_tx_probs(AV1_COMMON *cm, aom_writer *w) {
-  const int savings_thresh = av1_cost_one(GROUP_DIFF_UPDATE_PROB) -
-                             av1_cost_zero(GROUP_DIFF_UPDATE_PROB);
-  int i, j;
-
-  int savings = 0;
-  int do_update = 0;
-#if CONFIG_TILE_GROUPS
-  const int probwt = cm->num_tg;
-#else
-  const int probwt = 1;
-#endif
-  for (i = TX_4X4; i < EXT_TX_SIZES; ++i) {
-    for (j = 0; j < TX_TYPES; ++j)
-      savings += prob_diff_update_savings(
-          av1_ext_tx_tree, cm->fc->intra_ext_tx_prob[i][j],
-          cm->counts.intra_ext_tx[i][j], TX_TYPES, probwt);
-  }
-  do_update = savings > savings_thresh;
-  aom_write(w, do_update, GROUP_DIFF_UPDATE_PROB);
-  if (do_update) {
-    for (i = TX_4X4; i < EXT_TX_SIZES; ++i) {
-      for (j = 0; j < TX_TYPES; ++j) {
-        prob_diff_update(av1_ext_tx_tree, cm->fc->intra_ext_tx_prob[i][j],
-                         cm->counts.intra_ext_tx[i][j], TX_TYPES, probwt, w);
-      }
-    }
-  }
-
-  savings = 0;
-  for (i = TX_4X4; i < EXT_TX_SIZES; ++i) {
-    savings +=
-        prob_diff_update_savings(av1_ext_tx_tree, cm->fc->inter_ext_tx_prob[i],
-                                 cm->counts.inter_ext_tx[i], TX_TYPES, probwt);
-  }
-  do_update = savings > savings_thresh;
-  aom_write(w, do_update, GROUP_DIFF_UPDATE_PROB);
-  if (do_update) {
-    for (i = TX_4X4; i < EXT_TX_SIZES; ++i) {
-      prob_diff_update(av1_ext_tx_tree, cm->fc->inter_ext_tx_prob[i],
-                       cm->counts.inter_ext_tx[i], TX_TYPES, probwt, w);
-    }
-  }
-}
-#endif  // CONFIG_EXT_TX
-#endif  // !CONFIG_EC_ADAPT
 #if CONFIG_PALETTE
 static void pack_palette_tokens(aom_writer *w, const TOKENEXTRA **tp, int n,
                                 int num) {
@@ -1551,11 +1312,7 @@
                                    aom_writer *w) {
   AV1_COMMON *const cm = &cpi->common;
   const MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
-#else
-  FRAME_CONTEXT *ec_ctx = cm->fc;
-#endif
 
   if (!av1_is_interp_needed(xd)) {
 #if CONFIG_DUAL_FILTER
@@ -1815,11 +1572,7 @@
   const TX_SIZE tx_size = mbmi->tx_size;
 #endif  // CONFIG_VAR_TX
 #endif  // !CONFIG_TXK_SEL
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
-#else
-  FRAME_CONTEXT *ec_ctx = cm->fc;
-#endif
 
 #if !CONFIG_TXK_SEL
   TX_TYPE tx_type = mbmi->tx_type;
@@ -1927,18 +1680,9 @@
 #endif
                                 aom_writer *w) {
   AV1_COMMON *const cm = &cpi->common;
-#if CONFIG_DELTA_Q || CONFIG_EC_ADAPT
   MACROBLOCK *const x = &cpi->td.mb;
   MACROBLOCKD *const xd = &x->e_mbd;
-#else
-  const MACROBLOCK *x = &cpi->td.mb;
-  const MACROBLOCKD *xd = &x->e_mbd;
-#endif
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
-#else
-  FRAME_CONTEXT *ec_ctx = cm->fc;
-#endif
   const MODE_INFO *mi = xd->mi[0];
 
   const struct segmentation *const seg = &cm->seg;
@@ -2281,15 +2025,9 @@
       aom_write(w, interintra, cm->fc->interintra_prob[bsize_group]);
 #endif
       if (interintra) {
-#if CONFIG_EC_ADAPT
         aom_write_symbol(w, mbmi->interintra_mode,
                          ec_ctx->interintra_mode_cdf[bsize_group],
                          INTERINTRA_MODES);
-#else
-        av1_write_token(w, av1_interintra_mode_tree,
-                        cm->fc->interintra_mode_prob[bsize_group],
-                        &interintra_mode_encodings[mbmi->interintra_mode]);
-#endif
         if (is_interintra_wedge_used(bsize)) {
 #if CONFIG_NEW_MULTISYMBOL
           aom_write_symbol(w, mbmi->use_wedge_interintra,
@@ -2335,14 +2073,8 @@
         is_any_masked_compound_used(bsize)) {
 #if CONFIG_COMPOUND_SEGMENT || CONFIG_WEDGE
       if (cm->allow_masked_compound) {
-#if CONFIG_EC_ADAPT
         aom_write_symbol(w, mbmi->interinter_compound_type,
                          ec_ctx->compound_type_cdf[bsize], COMPOUND_TYPES);
-#else
-        av1_write_token(
-            w, av1_compound_type_tree, cm->fc->compound_type_prob[bsize],
-            &compound_type_encodings[mbmi->interinter_compound_type]);
-#endif
 #if CONFIG_WEDGE
         if (mbmi->interinter_compound_type == COMPOUND_WEDGE) {
           aom_write_literal(w, mbmi->wedge_index, get_wedge_bits_lookup(bsize));
@@ -2384,11 +2116,7 @@
 #endif  // CONFIG_INTRABC
                               const int mi_row, const int mi_col,
                               aom_writer *w) {
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
-#else
-  FRAME_CONTEXT *ec_ctx = cm->fc;
-#endif
   const struct segmentation *const seg = &cm->seg;
   struct segmentation_probs *const segp = &ec_ctx->seg;
   const MODE_INFO *const mi = xd->mi[0];
@@ -2618,11 +2346,7 @@
         }
       }
 
-#if CONFIG_DELTA_Q || CONFIG_EC_ADAPT
       MACROBLOCK *const x = &cpi->td.mb;
-#else
-      const MACROBLOCK *x = &cpi->td.mb;
-#endif
       const MB_MODE_INFO_EXT *const mbmi_ext = x->mbmi_ext;
       const int16_t mode_ctx = av1_mode_context_analyzer(
           mbmi_ext->mode_context, mbmi->ref_frame, bsize, -1);
@@ -3082,12 +2806,8 @@
   const aom_prob *const probs = cm->fc->partition_prob[ctx];
 #endif
 
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
   (void)cm;
-#else
-  FRAME_CONTEXT *ec_ctx = cm->fc;
-#endif
 
   if (!is_partition_point) return;
 
@@ -3260,11 +2980,7 @@
 
     skip = write_skip(cm, xd, mbmi->segment_id_supertx, xd->mi[0], w);
 
-#if CONFIG_EC_ADAPT
     FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
-#else
-    FRAME_CONTEXT *ec_ctx = cm->fc;
-#endif
 
 #if CONFIG_EXT_TX
     if (get_ext_tx_types(supertx_size, bsize, 1, cm->reduced_tx_set_used) > 1 &&
@@ -3395,214 +3111,6 @@
 #endif
 }
 
-#if !CONFIG_LV_MAP
-#if !CONFIG_PVQ && !CONFIG_EC_ADAPT
-static void build_tree_distribution(AV1_COMP *cpi, TX_SIZE tx_size,
-                                    av1_coeff_stats *coef_branch_ct,
-                                    av1_coeff_probs_model *coef_probs) {
-  av1_coeff_count *coef_counts = cpi->td.rd_counts.coef_counts[tx_size];
-  unsigned int(*eob_branch_ct)[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS] =
-      cpi->common.counts.eob_branch[tx_size];
-  int i, j, k, l, m;
-#if CONFIG_RECT_TX
-  assert(!is_rect_tx(tx_size));
-#endif  // CONFIG_RECT_TX
-
-  for (i = 0; i < PLANE_TYPES; ++i) {
-    for (j = 0; j < REF_TYPES; ++j) {
-      for (k = 0; k < COEF_BANDS; ++k) {
-        for (l = 0; l < BAND_COEFF_CONTEXTS(k); ++l) {
-          av1_tree_probs_from_distribution(av1_coef_tree,
-                                           coef_branch_ct[i][j][k][l],
-                                           coef_counts[i][j][k][l]);
-          coef_branch_ct[i][j][k][l][0][1] =
-              eob_branch_ct[i][j][k][l] - coef_branch_ct[i][j][k][l][0][0];
-          for (m = 0; m < UNCONSTRAINED_NODES; ++m)
-            coef_probs[i][j][k][l][m] =
-                get_binary_prob(coef_branch_ct[i][j][k][l][m][0],
-                                coef_branch_ct[i][j][k][l][m][1]);
-        }
-      }
-    }
-  }
-}
-
-#if !CONFIG_EC_ADAPT
-static void update_coef_probs_common(aom_writer *const bc, AV1_COMP *cpi,
-                                     TX_SIZE tx_size,
-                                     av1_coeff_stats *frame_branch_ct,
-                                     av1_coeff_probs_model *new_coef_probs) {
-  av1_coeff_probs_model *old_coef_probs = cpi->common.fc->coef_probs[tx_size];
-  const aom_prob upd = DIFF_UPDATE_PROB;
-#if CONFIG_EC_ADAPT
-  const int entropy_nodes_update = UNCONSTRAINED_NODES - 1;
-#else
-  const int entropy_nodes_update = UNCONSTRAINED_NODES;
-#endif
-  int i, j, k, l, t;
-  int stepsize = cpi->sf.coeff_prob_appx_step;
-#if CONFIG_TILE_GROUPS
-  const int probwt = cpi->common.num_tg;
-#else
-  const int probwt = 1;
-#endif
-#if CONFIG_RECT_TX
-  assert(!is_rect_tx(tx_size));
-#endif  // CONFIG_RECT_TX
-
-  switch (cpi->sf.use_fast_coef_updates) {
-    case TWO_LOOP: {
-      /* dry run to see if there is any update at all needed */
-      int savings = 0;
-      int update[2] = { 0, 0 };
-      for (i = 0; i < PLANE_TYPES; ++i) {
-        for (j = 0; j < REF_TYPES; ++j) {
-          for (k = 0; k < COEF_BANDS; ++k) {
-            for (l = 0; l < BAND_COEFF_CONTEXTS(k); ++l) {
-              for (t = 0; t < entropy_nodes_update; ++t) {
-                aom_prob newp = new_coef_probs[i][j][k][l][t];
-                const aom_prob oldp = old_coef_probs[i][j][k][l][t];
-                int s;
-                int u = 0;
-                if (t == PIVOT_NODE)
-                  s = av1_prob_diff_update_savings_search_model(
-                      frame_branch_ct[i][j][k][l][0], oldp, &newp, upd,
-                      stepsize, probwt);
-                else
-                  s = av1_prob_diff_update_savings_search(
-                      frame_branch_ct[i][j][k][l][t], oldp, &newp, upd, probwt);
-
-                if (s > 0 && newp != oldp) u = 1;
-                if (u)
-                  savings += s - (int)(av1_cost_zero(upd));
-                else
-                  savings -= (int)(av1_cost_zero(upd));
-                update[u]++;
-              }
-            }
-          }
-        }
-      }
-
-      /* Is coef updated at all */
-      if (update[1] == 0 || savings < 0) {
-        aom_write_bit(bc, 0);
-        return;
-      }
-      aom_write_bit(bc, 1);
-      for (i = 0; i < PLANE_TYPES; ++i) {
-        for (j = 0; j < REF_TYPES; ++j) {
-          for (k = 0; k < COEF_BANDS; ++k) {
-            for (l = 0; l < BAND_COEFF_CONTEXTS(k); ++l) {
-              // calc probs and branch cts for this frame only
-              for (t = 0; t < entropy_nodes_update; ++t) {
-                aom_prob newp = new_coef_probs[i][j][k][l][t];
-                aom_prob *oldp = old_coef_probs[i][j][k][l] + t;
-                int s;
-                int u = 0;
-                if (t == PIVOT_NODE)
-                  s = av1_prob_diff_update_savings_search_model(
-                      frame_branch_ct[i][j][k][l][0], *oldp, &newp, upd,
-                      stepsize, probwt);
-                else
-                  s = av1_prob_diff_update_savings_search(
-                      frame_branch_ct[i][j][k][l][t], *oldp, &newp, upd,
-                      probwt);
-                if (s > 0 && newp != *oldp) u = 1;
-                aom_write(bc, u, upd);
-                if (u) {
-                  /* send/use new probability */
-                  av1_write_prob_diff_update(bc, newp, *oldp);
-                  *oldp = newp;
-                }
-              }
-            }
-          }
-        }
-      }
-      return;
-    }
-
-    case ONE_LOOP_REDUCED: {
-      int updates = 0;
-      int noupdates_before_first = 0;
-      for (i = 0; i < PLANE_TYPES; ++i) {
-        for (j = 0; j < REF_TYPES; ++j) {
-          for (k = 0; k < COEF_BANDS; ++k) {
-            for (l = 0; l < BAND_COEFF_CONTEXTS(k); ++l) {
-              // calc probs and branch cts for this frame only
-              for (t = 0; t < entropy_nodes_update; ++t) {
-                aom_prob newp = new_coef_probs[i][j][k][l][t];
-                aom_prob *oldp = old_coef_probs[i][j][k][l] + t;
-                int s;
-                int u = 0;
-                if (t == PIVOT_NODE) {
-                  s = av1_prob_diff_update_savings_search_model(
-                      frame_branch_ct[i][j][k][l][0], *oldp, &newp, upd,
-                      stepsize, probwt);
-                } else {
-                  s = av1_prob_diff_update_savings_search(
-                      frame_branch_ct[i][j][k][l][t], *oldp, &newp, upd,
-                      probwt);
-                }
-
-                if (s > 0 && newp != *oldp) u = 1;
-                updates += u;
-                if (u == 0 && updates == 0) {
-                  noupdates_before_first++;
-                  continue;
-                }
-                if (u == 1 && updates == 1) {
-                  int v;
-                  // first update
-                  aom_write_bit(bc, 1);
-                  for (v = 0; v < noupdates_before_first; ++v)
-                    aom_write(bc, 0, upd);
-                }
-                aom_write(bc, u, upd);
-                if (u) {
-                  /* send/use new probability */
-                  av1_write_prob_diff_update(bc, newp, *oldp);
-                  *oldp = newp;
-                }
-              }
-            }
-          }
-        }
-      }
-      if (updates == 0) {
-        aom_write_bit(bc, 0);  // no updates
-      }
-      return;
-    }
-    default: assert(0);
-  }
-}
-#endif
-
-#if !CONFIG_EC_ADAPT
-static void update_coef_probs(AV1_COMP *cpi, aom_writer *w) {
-  const TX_MODE tx_mode = cpi->common.tx_mode;
-  const TX_SIZE max_tx_size = tx_mode_to_biggest_tx_size[tx_mode];
-  TX_SIZE tx_size;
-
-  for (tx_size = 0; tx_size <= max_tx_size; ++tx_size) {
-    av1_coeff_stats frame_branch_ct[PLANE_TYPES];
-    av1_coeff_probs_model frame_coef_probs[PLANE_TYPES];
-    if (cpi->td.counts->tx_size_totals[tx_size] <= 20 || CONFIG_RD_DEBUG ||
-        (tx_size >= TX_16X16 && cpi->sf.tx_size_search_method == USE_TX_8X8)) {
-      aom_write_bit(w, 0);
-    } else {
-      build_tree_distribution(cpi, tx_size, frame_branch_ct, frame_coef_probs);
-      update_coef_probs_common(w, cpi, tx_size, frame_branch_ct,
-                               frame_coef_probs);
-    }
-  }
-}
-#endif  // !CONFIG_EC_ADAPT
-#endif  // !CONFIG_EC_ADAPT
-#endif  // !CONFIG_LV_MAP
-
 #if CONFIG_LOOP_RESTORATION
 static void encode_restoration_mode(AV1_COMMON *cm,
                                     struct aom_write_bit_buffer *wb) {
@@ -3928,33 +3436,6 @@
   }
 }
 
-#if !CONFIG_EC_ADAPT
-static void update_seg_probs(AV1_COMP *cpi, aom_writer *w) {
-  AV1_COMMON *cm = &cpi->common;
-#if CONFIG_TILE_GROUPS
-  const int probwt = cm->num_tg;
-#else
-  const int probwt = 1;
-#endif
-
-  if (!cm->seg.enabled || !cm->seg.update_map) return;
-
-  if (cm->seg.temporal_update) {
-    int i;
-
-    for (i = 0; i < PREDICTION_PROBS; i++)
-      av1_cond_prob_diff_update(w, &cm->fc->seg.pred_probs[i],
-                                cm->counts.seg.pred[i], probwt);
-
-    prob_diff_update(av1_segment_tree, cm->fc->seg.tree_probs,
-                     cm->counts.seg.tree_mispred, MAX_SEGMENTS, probwt, w);
-  } else {
-    prob_diff_update(av1_segment_tree, cm->fc->seg.tree_probs,
-                     cm->counts.seg.tree_total, MAX_SEGMENTS, probwt, w);
-  }
-}
-#endif
-
 static void write_tx_mode(AV1_COMMON *cm, TX_MODE *mode,
                           struct aom_write_bit_buffer *wb) {
   if (cm->all_lossless) {
@@ -3979,24 +3460,6 @@
 #endif  // CONFIG_VAR_TX_NO_TX_MODE
 }
 
-#if !CONFIG_EC_ADAPT
-static void update_txfm_probs(AV1_COMMON *cm, aom_writer *w,
-                              FRAME_COUNTS *counts) {
-#if CONFIG_TILE_GROUPS
-  const int probwt = cm->num_tg;
-#else
-  const int probwt = 1;
-#endif
-  if (cm->tx_mode == TX_MODE_SELECT) {
-    int i, j;
-    for (i = 0; i < MAX_TX_DEPTH; ++i)
-      for (j = 0; j < TX_SIZE_CONTEXTS; ++j)
-        prob_diff_update(av1_tx_size_tree[i], cm->fc->tx_size_probs[i][j],
-                         counts->tx_size[i][j], i + 2, probwt, w);
-  }
-}
-#endif
-
 static void write_frame_interp_filter(InterpFilter filter,
                                       struct aom_write_bit_buffer *wb) {
   aom_wb_write_bit(wb, filter == SWITCHABLE);
@@ -4265,10 +3728,8 @@
       const TOKENEXTRA *tok = tok_buffers[tile_row][tile_col];
       const TOKENEXTRA *tok_end = tok + cpi->tok_count[tile_row][tile_col];
       const int data_offset = have_tiles ? 4 : 0;
-#if CONFIG_EC_ADAPT
       const int tile_idx = tile_row * tile_cols + tile_col;
       TileDataEnc *this_tile = &cpi->tile_data[tile_idx];
-#endif
       av1_tile_set_row(&tile_info, cm, tile_row);
 
       buf->data = dst + total_size;
@@ -4276,11 +3737,9 @@
       // Is CONFIG_EXT_TILE = 1, every tile in the row has a header,
       // even for the last one, unless no tiling is used at all.
       total_size += data_offset;
-#if CONFIG_EC_ADAPT
       // Initialise tile context from the frame context
       this_tile->tctx = *cm->fc;
       cpi->td.mb.e_mbd.tile_ctx = &this_tile->tctx;
-#endif
 #if CONFIG_PVQ
       cpi->td.mb.pvq_q = &this_tile->pvq_q;
       cpi->td.mb.daala_enc.state.adapt = &this_tile->tctx.pvq_context;
@@ -4383,9 +3842,7 @@
     for (tile_col = 0; tile_col < tile_cols; tile_col++) {
       const int tile_idx = tile_row * tile_cols + tile_col;
       TileBufferEnc *const buf = &tile_buffers[tile_row][tile_col];
-#if CONFIG_PVQ || CONFIG_EC_ADAPT
       TileDataEnc *this_tile = &cpi->tile_data[tile_idx];
-#endif
       const TOKENEXTRA *tok = tok_buffers[tile_row][tile_col];
       const TOKENEXTRA *tok_end = tok + cpi->tok_count[tile_row][tile_col];
       const int is_last_col = (tile_col == tile_cols - 1);
@@ -4455,11 +3912,9 @@
       // The last tile does not have a header.
       if (!is_last_tile) total_size += 4;
 
-#if CONFIG_EC_ADAPT
       // Initialise tile context from the frame context
       this_tile->tctx = *cm->fc;
       cpi->td.mb.e_mbd.tile_ctx = &this_tile->tctx;
-#endif
 #if CONFIG_PVQ
       cpi->td.mb.pvq_q = &this_tile->pvq_q;
       cpi->td.mb.daala_enc.state.adapt = &this_tile->tctx.pvq_context;
@@ -5046,11 +4501,9 @@
 #else
   const int probwt = 1;
 #endif
-#if CONFIG_EC_ADAPT
   (void)probwt;
   (void)i;
   (void)fc;
-#endif
 
 #if CONFIG_ANS
   int header_size;
@@ -5065,9 +4518,6 @@
 #if CONFIG_LOOP_RESTORATION
   encode_restoration(cm, header_bc);
 #endif  // CONFIG_LOOP_RESTORATION
-#if !CONFIG_EC_ADAPT
-  update_txfm_probs(cm, header_bc, counts);
-#endif
 #if CONFIG_EXT_TX && CONFIG_RECT_TX && CONFIG_RECT_TX_EXT
   if (cm->tx_mode == TX_MODE_SELECT)
     av1_cond_prob_diff_update(header_bc, &cm->fc->quarter_tx_size_prob,
@@ -5075,12 +4525,6 @@
 #endif  // CONFIG_EXT_TX && CONFIG_RECT_TX && CONFIG_RECT_TX_EXT
 #if CONFIG_LV_MAP
   av1_write_txb_probs(cpi, header_bc);
-#else
-#if !CONFIG_PVQ
-#if !CONFIG_EC_ADAPT
-  update_coef_probs(cpi, header_bc);
-#endif  // !CONFIG_EC_ADAPT
-#endif  // CONFIG_PVQ
 #endif  // CONFIG_LV_MAP
 
 #if CONFIG_VAR_TX && !CONFIG_NEW_MULTISYMBOL
@@ -5090,75 +4534,10 @@
 #if !CONFIG_NEW_MULTISYMBOL
   update_skip_probs(cm, header_bc, counts);
 #endif
-#if !CONFIG_EC_ADAPT && CONFIG_DELTA_Q
-  update_delta_q_probs(cm, header_bc, counts);
-#if CONFIG_EXT_DELTA_Q
-  update_delta_lf_probs(cm, header_bc, counts);
-#endif
-#endif
-#if !CONFIG_EC_ADAPT
-  update_seg_probs(cpi, header_bc);
-
-  for (i = 0; i < INTRA_MODES; ++i) {
-    prob_diff_update(av1_intra_mode_tree, fc->uv_mode_prob[i],
-                     counts->uv_mode[i], INTRA_MODES, probwt, header_bc);
-  }
-
-#if CONFIG_EXT_PARTITION_TYPES
-  for (i = 0; i < PARTITION_PLOFFSET; ++i)
-    prob_diff_update(av1_partition_tree, fc->partition_prob[i],
-                     counts->partition[i], PARTITION_TYPES, probwt, header_bc);
-  for (; i < PARTITION_CONTEXTS_PRIMARY; ++i)
-    prob_diff_update(av1_ext_partition_tree, fc->partition_prob[i],
-                     counts->partition[i], EXT_PARTITION_TYPES, probwt,
-                     header_bc);
-#else
-  for (i = 0; i < PARTITION_CONTEXTS_PRIMARY; ++i)
-    prob_diff_update(av1_partition_tree, fc->partition_prob[i],
-                     counts->partition[i], PARTITION_TYPES, probwt, header_bc);
-#endif  // CONFIG_EXT_PARTITION_TYPES
-#if CONFIG_UNPOISON_PARTITION_CTX
-  for (; i < PARTITION_CONTEXTS_PRIMARY + PARTITION_BLOCK_SIZES; ++i) {
-    unsigned int ct[2] = { counts->partition[i][PARTITION_VERT],
-                           counts->partition[i][PARTITION_SPLIT] };
-    assert(counts->partition[i][PARTITION_NONE] == 0);
-    assert(counts->partition[i][PARTITION_HORZ] == 0);
-    assert(fc->partition_prob[i][PARTITION_NONE] == 0);
-    assert(fc->partition_prob[i][PARTITION_HORZ] == 0);
-    av1_cond_prob_diff_update(header_bc, &fc->partition_prob[i][PARTITION_VERT],
-                              ct, probwt);
-  }
-  for (; i < PARTITION_CONTEXTS_PRIMARY + 2 * PARTITION_BLOCK_SIZES; ++i) {
-    unsigned int ct[2] = { counts->partition[i][PARTITION_HORZ],
-                           counts->partition[i][PARTITION_SPLIT] };
-    assert(counts->partition[i][PARTITION_NONE] == 0);
-    assert(counts->partition[i][PARTITION_VERT] == 0);
-    assert(fc->partition_prob[i][PARTITION_NONE] == 0);
-    assert(fc->partition_prob[i][PARTITION_VERT] == 0);
-    av1_cond_prob_diff_update(header_bc, &fc->partition_prob[i][PARTITION_HORZ],
-                              ct, probwt);
-  }
-#endif
-#if CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
-  for (i = 0; i < INTRA_FILTERS + 1; ++i)
-    prob_diff_update(av1_intra_filter_tree, fc->intra_filter_probs[i],
-                     counts->intra_filter[i], INTRA_FILTERS, probwt, header_bc);
-#endif  // CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
-#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
-    for (i = 0; i < INTRA_MODES; ++i)
-      for (j = 0; j < INTRA_MODES; ++j)
-        prob_diff_update(av1_intra_mode_tree, cm->kf_y_prob[i][j],
-                         counts->kf_y_mode[i][j], INTRA_MODES, probwt,
-                         header_bc);
-#endif  // CONFIG_EC_ADAPT
 #if CONFIG_INTRABC
     if (cm->allow_screen_content_tools) {
       av1_cond_prob_diff_update(header_bc, &fc->intrabc_prob,
@@ -5170,9 +4549,6 @@
     update_inter_mode_probs(cm, header_bc, counts);
 #endif
 #if CONFIG_EXT_INTER
-#if !CONFIG_EC_ADAPT
-    update_inter_compound_mode_probs(cm, probwt, header_bc);
-#endif
 #if CONFIG_COMPOUND_SINGLEREF
     update_inter_singleref_comp_mode_probs(cm, probwt, header_bc);
 #endif  // CONFIG_COMPOUND_SINGLEREF
@@ -5188,13 +4564,6 @@
         }
       }
 #endif
-#if !CONFIG_EC_ADAPT
-      for (i = 0; i < BLOCK_SIZE_GROUPS; i++) {
-        prob_diff_update(
-            av1_interintra_mode_tree, cm->fc->interintra_mode_prob[i],
-            counts->interintra_mode[i], INTERINTRA_MODES, probwt, header_bc);
-      }
-#endif
 #if CONFIG_WEDGE && !CONFIG_NEW_MULTISYMBOL
       for (i = 0; i < BLOCK_SIZES; i++) {
         if (is_interintra_allowed_bsize(i) && is_interintra_wedge_used(i))
@@ -5204,29 +4573,9 @@
 #endif  // CONFIG_WEDGE && CONFIG_NEW_MULTISYMBOL
     }
 #endif  // CONFIG_INTERINTRA
-#if !CONFIG_EC_ADAPT && (CONFIG_COMPOUND_SEGMENT || CONFIG_WEDGE)
-#if CONFIG_COMPOUND_SINGLEREF
-    if (cm->allow_masked_compound) {
-#else   // !CONFIG_COMPOUND_SINGLEREF
-    if (cm->reference_mode != SINGLE_REFERENCE && cm->allow_masked_compound) {
-#endif  // CONFIG_COMPOUND_SINGLEREF
-      for (i = 0; i < BLOCK_SIZES; i++) {
-        if (is_any_masked_compound_used(i)) {
-          prob_diff_update(av1_compound_type_tree, fc->compound_type_prob[i],
-                           cm->counts.compound_interinter[i], COMPOUND_TYPES,
-                           probwt, header_bc);
-        }
-      }
-    }
-#endif  // !CONFIG_EC_ADAPT && (CONFIG_COMPOUND_SEGMENT || CONFIG_WEDGE)
 #endif  // CONFIG_EXT_INTER
 
 #if CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION
-#if !CONFIG_EC_ADAPT
-    for (i = BLOCK_8X8; i < BLOCK_SIZES; ++i)
-      prob_diff_update(av1_motion_mode_tree, fc->motion_mode_prob[i],
-                       counts->motion_mode[i], MOTION_MODES, probwt, header_bc);
-#endif
 #if CONFIG_NCOBMC_ADAPT_WEIGHT
     for (i = ADAPT_OVERLAP_BLOCK_8X8; i < ADAPT_OVERLAP_BLOCKS; ++i) {
       prob_diff_update(av1_ncobmc_mode_tree, fc->ncobmc_mode_prob[i],
@@ -5236,11 +4585,6 @@
 #endif
 #endif  // CONFIG_MOTION_VAR || CONFIG_WARPED_MOTION
 
-#if !CONFIG_EC_ADAPT
-    if (cm->interp_filter == SWITCHABLE)
-      update_switchable_interp_probs(cm, header_bc, counts);
-#endif  // !CONFIG_EC_ADAPT
-
 #if !CONFIG_NEW_MULTISYMBOL
     for (i = 0; i < INTRA_INTER_CONTEXTS; i++)
       av1_cond_prob_diff_update(header_bc, &fc->intra_inter_prob[i],
@@ -5304,17 +4648,7 @@
                                 counts->comp_inter_mode[i], probwt);
 #endif  // CONFIG_EXT_INTER && CONFIG_COMPOUND_SINGLEREF
 
-#if !CONFIG_EC_ADAPT
-    for (i = 0; i < BLOCK_SIZE_GROUPS; ++i) {
-      prob_diff_update(av1_intra_mode_tree, cm->fc->y_mode_prob[i],
-                       counts->y_mode[i], INTRA_MODES, probwt, header_bc);
-    }
-#endif
-
     av1_write_nmv_probs(cm, cm->allow_high_precision_mv, header_bc, counts->mv);
-#if !CONFIG_EC_ADAPT
-    update_ext_tx_probs(cm, header_bc);
-#endif
 #if CONFIG_SUPERTX
     if (!xd->lossless[0]) update_supertx_probs(cm, probwt, header_bc);
 #endif  // CONFIG_SUPERTX
@@ -5322,12 +4656,6 @@
     write_global_motion(cpi, header_bc);
 #endif  // CONFIG_GLOBAL_MOTION
   }
-#if !CONFIG_EC_ADAPT
-  av1_coef_head_cdfs(fc);
-  av1_coef_pareto_cdfs(fc);
-  for (i = 0; i < NMV_CONTEXTS; ++i) av1_set_mv_cdfs(&fc->nmvc[i]);
-  av1_set_mode_cdfs(cm);
-#endif  // !CONFIG_EC_ADAPT
 #if CONFIG_ANS
   aom_buf_ans_flush(header_bc);
   header_size = buf_ans_write_end(header_bc);
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index 56b1481..5ad34ca 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -4697,10 +4697,8 @@
 #endif
 #endif  // #if CONFIG_PVQ
 
-#if CONFIG_EC_ADAPT
   this_tile->tctx = *cm->fc;
   td->mb.e_mbd.tile_ctx = &this_tile->tctx;
-#endif  // #if CONFIG_EC_ADAPT
 
 #if CONFIG_CFL
   MACROBLOCKD *const xd = &td->mb.e_mbd;
@@ -5442,7 +5440,7 @@
                             const MODE_INFO *left_mi, const int intraonly,
                             const int mi_row, const int mi_col) {
   const MB_MODE_INFO *const mbmi = &mi->mbmi;
-#if !CONFIG_EC_ADAPT || CONFIG_ENTROPY_STATS
+#if CONFIG_ENTROPY_STATS
   const PREDICTION_MODE y_mode = mbmi->mode;
   const PREDICTION_MODE uv_mode = mbmi->uv_mode;
 #else
@@ -5450,12 +5448,12 @@
   (void)above_mi;
   (void)left_mi;
   (void)intraonly;
-#endif  // !CONFIG_EC_ADAPT || CONFIG_ENTROPY_STATS
+#endif  // CONFIG_ENTROPY_STATS
   const BLOCK_SIZE bsize = mbmi->sb_type;
   const int unify_bsize = CONFIG_CB4X4;
 
   if (bsize < BLOCK_8X8 && !unify_bsize) {
-#if !CONFIG_EC_ADAPT || CONFIG_ENTROPY_STATS
+#if CONFIG_ENTROPY_STATS
     int idx, idy;
     const int num_4x4_w = num_4x4_blocks_wide_lookup[bsize];
     const int num_4x4_h = num_4x4_blocks_high_lookup[bsize];
@@ -5471,9 +5469,9 @@
           ++counts->y_mode[0][bmode];
         }
       }
-#endif  // !CONFIG_EC_ADAPT || CONFIG_ENTROPY_STATS
+#endif  // CONFIG_ENTROPY_STATS
   } else {
-#if !CONFIG_EC_ADAPT || CONFIG_ENTROPY_STATS
+#if CONFIG_ENTROPY_STATS
     if (intraonly) {
       const PREDICTION_MODE above = av1_above_block_mode(mi, above_mi, 0);
       const PREDICTION_MODE left = av1_left_block_mode(mi, left_mi, 0);
@@ -5481,7 +5479,7 @@
     } else {
       ++counts->y_mode[size_group_lookup[bsize]][y_mode];
     }
-#endif  // !CONFIG_EC_ADAPT || CONFIG_ENTROPY_STATS
+#endif  // CONFIG_ENTROPY_STATS
 #if CONFIG_FILTER_INTRA
     if (mbmi->mode == DC_PRED
 #if CONFIG_PALETTE
@@ -5527,9 +5525,9 @@
   (void)mi_col;
   (void)xd;
 #endif
-#if !CONFIG_EC_ADAPT || CONFIG_ENTROPY_STATS
+#if CONFIG_ENTROPY_STATS
   ++counts->uv_mode[y_mode][uv_mode];
-#endif  // !CONFIG_EC_ADAPT || CONFIG_ENTROPY_STATS
+#endif  // CONFIG_ENTROPY_STATS
 }
 
 #if CONFIG_VAR_TX
diff --git a/av1/encoder/encodemb.c b/av1/encoder/encodemb.c
index ddf8843..24cf898 100644
--- a/av1/encoder/encodemb.c
+++ b/av1/encoder/encodemb.c
@@ -112,11 +112,7 @@
 
 // These numbers are empirically obtained.
 static const int plane_rd_mult[REF_TYPES][PLANE_TYPES] = {
-#if CONFIG_EC_ADAPT
   { 10, 7 }, { 8, 5 },
-#else
-  { 10, 6 }, { 8, 6 },
-#endif
 };
 
 static INLINE unsigned int get_token_bit_costs(
@@ -1352,11 +1348,7 @@
       &pd->dst.buf[(blk_row * dst_stride + blk_col) << tx_size_wide_log2[0]];
 #if CONFIG_CFL
 
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *const ec_ctx = xd->tile_ctx;
-#else
-  FRAME_CONTEXT *const ec_ctx = cm->fc;
-#endif  // CONFIG_EC_ADAPT
 
 #if CONFIG_DEBUG
   const MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
diff --git a/av1/encoder/encodemv.c b/av1/encoder/encodemv.c
index 8aed521..a15173c 100644
--- a/av1/encoder/encodemv.c
+++ b/av1/encoder/encodemv.c
@@ -150,23 +150,6 @@
 #endif
 }
 
-#if !CONFIG_EC_ADAPT
-static void write_mv_update(const aom_tree_index *tree,
-                            aom_prob probs[/*n - 1*/],
-                            const unsigned int counts[/*n - 1*/], int n,
-                            aom_writer *w) {
-  int i;
-  unsigned int branch_ct[32][2];
-
-  // Assuming max number of probabilities <= 32
-  assert(n <= 32);
-
-  av1_tree_probs_from_distribution(tree, branch_ct, counts);
-  for (i = 0; i < n - 1; ++i)
-    update_mv(w, branch_ct[i], &probs[i], MV_UPDATE_PROB);
-}
-#endif
-
 void av1_write_nmv_probs(AV1_COMMON *cm, int usehp, aom_writer *w,
                          nmv_context_counts *const nmv_counts) {
   int i;
@@ -174,34 +157,6 @@
   for (nmv_ctx = 0; nmv_ctx < NMV_CONTEXTS; ++nmv_ctx) {
     nmv_context *const mvc = &cm->fc->nmvc[nmv_ctx];
     nmv_context_counts *const counts = &nmv_counts[nmv_ctx];
-#if !CONFIG_EC_ADAPT
-    write_mv_update(av1_mv_joint_tree, mvc->joints, counts->joints, MV_JOINTS,
-                    w);
-
-    for (i = 0; i < 2; ++i) {
-      int j;
-      nmv_component *comp = &mvc->comps[i];
-      nmv_component_counts *comp_counts = &counts->comps[i];
-
-      update_mv(w, comp_counts->sign, &comp->sign, MV_UPDATE_PROB);
-      write_mv_update(av1_mv_class_tree, comp->classes, comp_counts->classes,
-                      MV_CLASSES, w);
-      write_mv_update(av1_mv_class0_tree, comp->class0, comp_counts->class0,
-                      CLASS0_SIZE, w);
-      for (j = 0; j < MV_OFFSET_BITS; ++j)
-        update_mv(w, comp_counts->bits[j], &comp->bits[j], MV_UPDATE_PROB);
-    }
-
-    for (i = 0; i < 2; ++i) {
-      int j;
-      for (j = 0; j < CLASS0_SIZE; ++j)
-        write_mv_update(av1_mv_fp_tree, mvc->comps[i].class0_fp[j],
-                        counts->comps[i].class0_fp[j], MV_FP_SIZE, w);
-
-      write_mv_update(av1_mv_fp_tree, mvc->comps[i].fp, counts->comps[i].fp,
-                      MV_FP_SIZE, w);
-    }
-#endif
 
     if (usehp) {
       for (i = 0; i < 2; ++i) {
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index a180eb6..fb50d45 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -4401,8 +4401,6 @@
 }
 #endif  // DUMP_RECON_FRAMES
 
-#if CONFIG_EC_ADAPT
-
 static void make_update_tile_list_enc(AV1_COMP *cpi, const int tile_rows,
                                       const int tile_cols,
                                       FRAME_CONTEXT *ec_ctxs[]) {
@@ -4411,7 +4409,6 @@
     ec_ctxs[i] = &cpi->tile_data[i].tctx;
 }
 
-#endif
 static void encode_frame_to_data_rate(AV1_COMP *cpi, size_t *size,
                                       uint8_t *dest, int skip_adapt,
                                       unsigned int *frame_flags) {
@@ -4419,13 +4416,11 @@
   const AV1EncoderConfig *const oxcf = &cpi->oxcf;
   struct segmentation *const seg = &cm->seg;
   TX_SIZE t;
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT **tile_ctxs = aom_malloc(cm->tile_rows * cm->tile_cols *
                                          sizeof(&cpi->tile_data[0].tctx));
   aom_cdf_prob **cdf_ptrs =
       aom_malloc(cm->tile_rows * cm->tile_cols *
                  sizeof(&cpi->tile_data[0].tctx.partition_cdf[0][0]));
-#endif
 #if CONFIG_XIPHRC
   int frame_type;
   int drop_this_frame = 0;
@@ -4511,10 +4506,8 @@
 
     ++cm->current_video_frame;
 
-#if CONFIG_EC_ADAPT
     aom_free(tile_ctxs);
     aom_free(cdf_ptrs);
-#endif
     return;
   }
 #endif  // CONFIG_EXT_REFS
@@ -4568,10 +4561,8 @@
   if (drop_this_frame) {
     av1_rc_postencode_update_drop_frame(cpi);
     ++cm->current_video_frame;
-#if CONFIG_EC_ADAPT
     aom_free(tile_ctxs);
     aom_free(cdf_ptrs);
-#endif
     return;
   }
 #else
@@ -4582,10 +4573,8 @@
     if (av1_rc_drop_frame(cpi)) {
       av1_rc_postencode_update_drop_frame(cpi);
       ++cm->current_video_frame;
-#if CONFIG_EC_ADAPT
       aom_free(tile_ctxs);
       aom_free(cdf_ptrs);
-#endif
       return;
     }
   }
@@ -4686,10 +4675,8 @@
   av1_pack_bitstream(cpi, dest, size);
 
   if (skip_adapt) {
-#if CONFIG_EC_ADAPT
     aom_free(tile_ctxs);
     aom_free(cdf_ptrs);
-#endif
     return;
   }
 
@@ -4730,7 +4717,6 @@
   if (cm->refresh_frame_context == REFRESH_FRAME_CONTEXT_BACKWARD) {
     av1_adapt_coef_probs(cm);
     av1_adapt_intra_frame_probs(cm);
-#if CONFIG_EC_ADAPT
     make_update_tile_list_enc(cpi, cm->tile_rows, cm->tile_cols, tile_ctxs);
     av1_average_tile_coef_cdfs(cpi->common.fc, tile_ctxs, cdf_ptrs,
                                cm->tile_rows * cm->tile_cols);
@@ -4740,7 +4726,6 @@
     av1_average_tile_pvq_cdfs(cpi->common.fc, tile_ctxs,
                               cm->tile_rows * cm->tile_cols);
 #endif  // CONFIG_PVQ
-#endif  // CONFIG_EC_ADAPT
 #if CONFIG_ADAPT_SCAN
     av1_adapt_scan_order(cm);
 #endif  // CONFIG_ADAPT_SCAN
@@ -4750,12 +4735,10 @@
     if (cm->refresh_frame_context == REFRESH_FRAME_CONTEXT_BACKWARD) {
       av1_adapt_inter_frame_probs(cm);
       av1_adapt_mv_probs(cm, cm->allow_high_precision_mv);
-#if CONFIG_EC_ADAPT
       av1_average_tile_inter_cdfs(&cpi->common, cpi->common.fc, tile_ctxs,
                                   cdf_ptrs, cm->tile_rows * cm->tile_cols);
       av1_average_tile_mv_cdfs(cpi->common.fc, tile_ctxs, cdf_ptrs,
                                cm->tile_rows * cm->tile_cols);
-#endif
     }
   }
 
@@ -4791,10 +4774,8 @@
   if (drop_this_frame) {
     av1_rc_postencode_update_drop_frame(cpi);
     ++cm->current_video_frame;
-#if CONFIG_EC_ADAPT
     aom_free(tile_ctxs);
     aom_free(cdf_ptrs);
-#endif
     return;
   }
 #else   // !CONFIG_XIPHRC
@@ -4843,10 +4824,8 @@
 #if CONFIG_EXT_REFS
   }
 #endif  // CONFIG_EXT_REFS
-#if CONFIG_EC_ADAPT
   aom_free(tile_ctxs);
   aom_free(cdf_ptrs);
-#endif
 }
 
 static void Pass0Encode(AV1_COMP *cpi, size_t *size, uint8_t *dest,
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h
index 1cc7fb2..ab09cc1 100644
--- a/av1/encoder/encoder.h
+++ b/av1/encoder/encoder.h
@@ -317,9 +317,7 @@
 #if CONFIG_CFL
   CFL_CTX cfl;
 #endif
-#if CONFIG_EC_ADAPT
   DECLARE_ALIGNED(16, FRAME_CONTEXT, tctx);
-#endif
 } TileDataEnc;
 
 typedef struct RD_COUNTS {
diff --git a/av1/encoder/encodetxb.c b/av1/encoder/encodetxb.c
index 904b668..6875e21 100644
--- a/av1/encoder/encodetxb.c
+++ b/av1/encoder/encodetxb.c
@@ -1456,11 +1456,7 @@
 
 // These numbers are empirically obtained.
 static const int plane_rd_mult[REF_TYPES][PLANE_TYPES] = {
-#if CONFIG_EC_ADAPT
   { 17, 13 }, { 16, 10 },
-#else
-  { 20, 12 }, { 16, 12 },
-#endif
 };
 
 int av1_optimize_txb(const AV1_COMMON *cm, MACROBLOCK *x, int plane, int block,
diff --git a/av1/encoder/rd.c b/av1/encoder/rd.c
index f20701c..2fafa4d 100644
--- a/av1/encoder/rd.c
+++ b/av1/encoder/rd.c
@@ -66,31 +66,16 @@
 
   for (i = 0; i < INTRA_MODES; ++i)
     for (j = 0; j < INTRA_MODES; ++j)
-#if CONFIG_EC_ADAPT
       av1_cost_tokens_from_cdf(cpi->y_mode_costs[i][j], av1_kf_y_mode_cdf[i][j],
                                av1_intra_mode_inv);
-#else
-      av1_cost_tokens(cpi->y_mode_costs[i][j], av1_kf_y_mode_prob[i][j],
-                      av1_intra_mode_tree);
-#endif
 
   for (i = 0; i < BLOCK_SIZE_GROUPS; ++i)
-#if CONFIG_EC_ADAPT
     av1_cost_tokens_from_cdf(cpi->mbmode_cost[i], fc->y_mode_cdf[i],
                              av1_intra_mode_inv);
-#else
-    av1_cost_tokens(cpi->mbmode_cost[i], fc->y_mode_prob[i],
-                    av1_intra_mode_tree);
-#endif
 
   for (i = 0; i < INTRA_MODES; ++i)
-#if CONFIG_EC_ADAPT
     av1_cost_tokens_from_cdf(cpi->intra_uv_mode_cost[i], fc->uv_mode_cdf[i],
                              av1_intra_mode_inv);
-#else
-    av1_cost_tokens(cpi->intra_uv_mode_cost[i], fc->uv_mode_prob[i],
-                    av1_intra_mode_tree);
-#endif
 
   for (i = 0; i < SWITCHABLE_FILTER_CONTEXTS; ++i)
     av1_cost_tokens(cpi->switchable_interp_costs[i],
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 0c74676..04d98ac 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -1764,11 +1764,7 @@
   if (!is_inter_block(mbmi)) {
 #if CONFIG_CFL
 
-#if CONFIG_EC_ADAPT
     FRAME_CONTEXT *const ec_ctx = xd->tile_ctx;
-#else
-    FRAME_CONTEXT *const ec_ctx = cm->fc;
-#endif  // CONFIG_EC_ADAPT
 
 #if CONFIG_DEBUG
 // av1_predict_intra_block_facade does not pass plane_bsize, we need to validate
@@ -2661,11 +2657,7 @@
   for (row = 0; row < max_blocks_high; row += stepr) {
     for (col = 0; col < max_blocks_wide; col += stepc) {
 #if CONFIG_CFL
-#if CONFIG_EC_ADAPT
       FRAME_CONTEXT *const ec_ctx = xd->tile_ctx;
-#else
-      FRAME_CONTEXT *const ec_ctx = cpi->common.fc;
-#endif  // CONFIG_EC_ADAPT
 
       av1_predict_intra_block_encoder_facade(x, ec_ctx, 0, block, col, row,
                                              tx_size);
@@ -8955,11 +8947,7 @@
 
   MACROBLOCKD *const xd = &x->e_mbd;
   const TileInfo *tile = &xd->tile;
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *const ec_ctx = xd->tile_ctx;
-#else
-  FRAME_CONTEXT *const ec_ctx = cm->fc;
-#endif  // CONFIG_EC_ADAPT
   MODE_INFO *const mi = xd->mi[0];
   const int mi_row = -xd->mb_to_top_edge / (8 * MI_SIZE);
   const int mi_col = -xd->mb_to_left_edge / (8 * MI_SIZE);
diff --git a/av1/encoder/tokenize.c b/av1/encoder/tokenize.c
index 3df9b6a..555ac06 100644
--- a/av1/encoder/tokenize.c
+++ b/av1/encoder/tokenize.c
@@ -450,11 +450,7 @@
   const int ref = is_inter_block(mbmi);
   unsigned int(*const counts)[COEFF_CONTEXTS][ENTROPY_TOKENS] =
       td->rd_counts.coef_counts[txsize_sqr_map[tx_size]][type][ref];
-#if CONFIG_EC_ADAPT
   FRAME_CONTEXT *ec_ctx = xd->tile_ctx;
-#else
-  FRAME_CONTEXT *ec_ctx = cpi->common.fc;
-#endif
   aom_cdf_prob(
       *const coef_head_cdfs)[COEFF_CONTEXTS][CDF_SIZE(ENTROPY_TOKENS)] =
       ec_ctx->coef_head_cdfs[txsize_sqr_map[tx_size]][type][ref];
diff --git a/build/cmake/aom_config_defaults.cmake b/build/cmake/aom_config_defaults.cmake
index 941ef8b..24a65d5 100644
--- a/build/cmake/aom_config_defaults.cmake
+++ b/build/cmake/aom_config_defaults.cmake
@@ -141,7 +141,6 @@
 set(CONFIG_PARALLEL_DEBLOCKING_15TAP 0 CACHE NUMBER "Internal flag.")
 set(CONFIG_LOOPFILTERING_ACROSS_TILES 1 CACHE NUMBER "Internal flag.")
 set(CONFIG_TILE_GROUPS 1 CACHE NUMBER "Internal flag.")
-set(CONFIG_EC_ADAPT 1 CACHE NUMBER "Internal flag.")
 set(CONFIG_TEMPMV_SIGNALING 1 CACHE NUMBER "Internal flag.")
 set(CONFIG_RD_DEBUG 0 CACHE NUMBER "Internal flag.")
 set(CONFIG_REFERENCE_BUFFER 1 CACHE NUMBER "Internal flag.")
diff --git a/configure b/configure
index 5580a86..0077ce9 100755
--- a/configure
+++ b/configure
@@ -302,7 +302,6 @@
     parallel_deblocking_15tap
     loopfiltering_across_tiles
     tile_groups
-    ec_adapt
     tempmv_signaling
     rd_debug
     reference_buffer
@@ -496,7 +495,6 @@
     soft_enable global_motion
     soft_enable ext_tx
     soft_enable cdef
-    soft_enable ec_adapt
     soft_enable ext_intra
     soft_enable mv_compress
     soft_enable ext_refs
@@ -526,7 +524,6 @@
     soft_enable tempmv_signaling
 
     # Fix up experiment dependencies
-    enabled pvq && enable_feature ec_adapt
     enabled pvq && disable_feature chroma_sub8x8
     enabled pvq && disable_feature cb4x4
     enabled pvq && disable_feature rect_tx
@@ -542,7 +539,6 @@
     enabled dpcm_intra && enable_feature ext_tx
     enabled chroma_sub8x8 && enable_feature cb4x4
     enabled compound_singleref && enable_feature ext_inter
-    enabled new_multisymbol && enable_feature ec_adapt
     enabled warped_motion && disable_feature ncobmc_adapt_weight
     enabled ncobmc_adapt_weight && enable_feature motion_var
     enabled bgsprite && enable_feature global_motion
diff --git a/tools/aom_entropy_optimizer.c b/tools/aom_entropy_optimizer.c
index 667a9bf..5eec3d8 100644
--- a/tools/aom_entropy_optimizer.c
+++ b/tools/aom_entropy_optimizer.c
@@ -28,7 +28,6 @@
 #include "./aom_config.h"
 #include "av1/common/entropymode.h"
 
-#if CONFIG_EC_ADAPT
 #if CONFIG_ALT_INTRA
 #if CONFIG_SMOOTH_HV
 const aom_tree_index av1_intra_mode_tree[TREE_SIZE(INTRA_MODES)] = {
@@ -84,7 +83,6 @@
   -D153_PRED, -D207_PRED  /* 8 = D153_NODE */
 };
 #endif  // CONFIG_ALT_INTRA
-#endif
 
 #define SPACES_PER_TAB 2