diff --git a/aom_dsp/aom_dsp_rtcd_defs.pl b/aom_dsp/aom_dsp_rtcd_defs.pl
index 89f09fc..6d873bc 100644
--- a/aom_dsp/aom_dsp_rtcd_defs.pl
+++ b/aom_dsp/aom_dsp_rtcd_defs.pl
@@ -65,6 +65,36 @@
 add_proto qw/void aom_tm_predictor_2x2/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
 specialize qw/aom_tm_predictor_2x2/;
 
+add_proto qw/void aom_he_predictor_2x2/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
+specialize qw/aom_he_predictor_2x2/;
+
+add_proto qw/void aom_ve_predictor_2x2/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
+specialize qw/aom_ve_predictor_2x2/;
+
+add_proto qw/void aom_d207_predictor_2x2/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
+specialize qw/aom_d207_predictor_2x2/;
+
+add_proto qw/void aom_d63_predictor_2x2/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
+specialize qw/aom_d63_predictor_2x2/;
+
+add_proto qw/void aom_d63f_predictor_2x2/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
+specialize qw/aom_d63f_predictor_2x2/;
+
+add_proto qw/void aom_d45_predictor_2x2/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
+specialize qw/aom_d45_predictor_2x2/;
+
+add_proto qw/void aom_d45e_predictor_2x2/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
+specialize qw/aom_d45e_predictor_2x2/;
+
+add_proto qw/void aom_d117_predictor_2x2/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
+specialize qw/aom_d117_predictor_2x2/;
+
+add_proto qw/void aom_d135_predictor_2x2/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
+specialize qw/aom_d135_predictor_2x2/;
+
+add_proto qw/void aom_d153_predictor_2x2/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
+specialize qw/aom_d153_predictor_2x2/;
+
 add_proto qw/void aom_d207_predictor_4x4/, "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left";
 specialize qw/aom_d207_predictor_4x4 sse2/;
 
diff --git a/aom_dsp/bitreader.h b/aom_dsp/bitreader.h
index d0282f5..ef2e5e9 100644
--- a/aom_dsp/bitreader.h
+++ b/aom_dsp/bitreader.h
@@ -206,7 +206,7 @@
 static INLINE int aom_read_symbol_(aom_reader *r, const aom_cdf_prob *cdf,
                                    int nsymbs ACCT_STR_PARAM) {
   int ret;
-#if CONFIG_ANS
+#if CONFIG_RANS
   (void)nsymbs;
   ret = rans_read(r, cdf);
 #elif CONFIG_DAALA_EC
diff --git a/aom_dsp/bitwriter.h b/aom_dsp/bitwriter.h
index 4b083fa..841a171 100644
--- a/aom_dsp/bitwriter.h
+++ b/aom_dsp/bitwriter.h
@@ -100,7 +100,7 @@
 
 static INLINE void aom_write_symbol(aom_writer *w, int symb,
                                     const aom_cdf_prob *cdf, int nsymbs) {
-#if CONFIG_ANS
+#if CONFIG_RANS
   struct rans_sym s;
   (void)nsymbs;
   assert(cdf);
diff --git a/aom_dsp/intrapred.c b/aom_dsp/intrapred.c
index c3af1f4..b513dc5 100644
--- a/aom_dsp/intrapred.c
+++ b/aom_dsp/intrapred.c
@@ -321,6 +321,134 @@
   }
 }
 
+void aom_he_predictor_2x2_c(uint8_t *dst, ptrdiff_t stride,
+                            const uint8_t *above, const uint8_t *left) {
+  const int H = above[-1];
+  const int I = left[0];
+  const int J = left[1];
+  const int K = left[2];
+
+  memset(dst + stride * 0, AVG3(H, I, J), 2);
+  memset(dst + stride * 1, AVG3(I, J, K), 2);
+}
+
+void aom_ve_predictor_2x2_c(uint8_t *dst, ptrdiff_t stride,
+                            const uint8_t *above, const uint8_t *left) {
+  const int H = above[-1];
+  const int I = above[0];
+  const int J = above[1];
+  const int K = above[2];
+
+  dst[0] = AVG3(H, I, J);
+  dst[1] = AVG3(I, J, K);
+  memcpy(dst + stride * 1, dst, 2);
+}
+
+void aom_d207_predictor_2x2_c(uint8_t *dst, ptrdiff_t stride,
+                              const uint8_t *above, const uint8_t *left) {
+  const int I = left[0];
+  const int J = left[1];
+  const int K = left[2];
+  const int L = left[3];
+  (void)above;
+  DST(0, 0) = AVG2(I, J);
+  DST(0, 1) = AVG2(J, K);
+  DST(1, 0) = AVG3(I, J, K);
+  DST(1, 1) = AVG3(J, K, L);
+}
+
+void aom_d63_predictor_2x2_c(uint8_t *dst, ptrdiff_t stride,
+                             const uint8_t *above, const uint8_t *left) {
+  const int A = above[0];
+  const int B = above[1];
+  const int C = above[2];
+  const int D = above[3];
+  (void)left;
+  DST(0, 0) = AVG2(A, B);
+  DST(1, 0) = AVG2(B, C);
+  DST(0, 1) = AVG3(A, B, C);
+  DST(1, 1) = AVG3(B, C, D);
+}
+
+void aom_d63f_predictor_2x2_c(uint8_t *dst, ptrdiff_t stride,
+                              const uint8_t *above, const uint8_t *left) {
+  const int A = above[0];
+  const int B = above[1];
+  const int C = above[2];
+  const int D = above[3];
+  (void)left;
+  DST(0, 0) = AVG2(A, B);
+  DST(1, 0) = AVG2(B, C);
+  DST(0, 1) = AVG3(A, B, C);
+  DST(1, 1) = AVG3(B, C, D);
+}
+
+void aom_d45_predictor_2x2_c(uint8_t *dst, ptrdiff_t stride,
+                             const uint8_t *above, const uint8_t *left) {
+  const int A = above[0];
+  const int B = above[1];
+  const int C = above[2];
+  const int D = above[3];
+  const int E = above[4];
+  (void)stride;
+  (void)left;
+  DST(0, 0) = AVG3(A, B, C);
+  DST(1, 0) = DST(0, 1) = AVG3(B, C, D);
+  DST(1, 1) = AVG3(C, D, E);
+}
+
+void aom_d45e_predictor_2x2_c(uint8_t *dst, ptrdiff_t stride,
+                              const uint8_t *above, const uint8_t *left) {
+  const int A = above[0];
+  const int B = above[1];
+  const int C = above[2];
+  const int D = above[3];
+  const int E = above[4];
+  (void)stride;
+  (void)left;
+  DST(0, 0) = AVG3(A, B, C);
+  DST(1, 0) = DST(0, 1) = AVG3(B, C, D);
+  DST(1, 1) = AVG3(C, D, E);
+}
+
+void aom_d117_predictor_2x2_c(uint8_t *dst, ptrdiff_t stride,
+                              const uint8_t *above, const uint8_t *left) {
+  const int I = left[0];
+  const int X = above[-1];
+  const int A = above[0];
+  const int B = above[1];
+  DST(0, 0) = AVG2(X, A);
+  DST(1, 0) = AVG2(A, B);
+  DST(0, 1) = AVG3(I, X, A);
+  DST(1, 1) = AVG3(X, A, B);
+}
+
+void aom_d135_predictor_2x2_c(uint8_t *dst, ptrdiff_t stride,
+                              const uint8_t *above, const uint8_t *left) {
+  const int I = left[0];
+  const int J = left[1];
+  const int X = above[-1];
+  const int A = above[0];
+  const int B = above[1];
+  (void)stride;
+  DST(0, 1) = AVG3(X, I, J);
+  DST(1, 1) = DST(0, 0) = AVG3(A, X, I);
+  DST(1, 0) = AVG3(B, A, X);
+}
+
+void aom_d153_predictor_2x2_c(uint8_t *dst, ptrdiff_t stride,
+                              const uint8_t *above, const uint8_t *left) {
+  const int I = left[0];
+  const int J = left[1];
+  const int X = above[-1];
+  const int A = above[0];
+
+  DST(0, 0) = AVG2(I, X);
+  DST(0, 1) = AVG2(J, I);
+  DST(1, 0) = AVG3(I, X, A);
+  DST(1, 1) = AVG3(J, I, X);
+}
+
 void aom_he_predictor_4x4_c(uint8_t *dst, ptrdiff_t stride,
                             const uint8_t *above, const uint8_t *left) {
   const int H = above[-1];
diff --git a/aomenc.c b/aomenc.c
index 373b69d..5b8632b 100644
--- a/aomenc.c
+++ b/aomenc.c
@@ -2068,8 +2068,9 @@
           print_time("ETA", estimated_time_left);
         }
 
-      } else
+      } else {
         frame_avail = 0;
+      }
 
       if (frames_in > global.skip_frames) {
 #if CONFIG_AOM_HIGHBITDEPTH
diff --git a/av1/av1_common.mk b/av1/av1_common.mk
index 29b71f3..585e44e 100644
--- a/av1/av1_common.mk
+++ b/av1/av1_common.mk
@@ -139,9 +139,8 @@
 AV1_COMMON_SRCS-$(HAVE_NEON) += common/arm/neon/iht8x8_add_neon.c
 endif
 
-ifeq ($(CONFIG_EXT_INTRA),yes)
-AV1_COMMON_SRCS-yes += common/intra_filters.h
-AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/reconintra_sse4.c
+ifeq ($(CONFIG_FILTER_INTRA),yes)
+AV1_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/filterintra_sse4.c
 endif
 
 AV1_COMMON_SRCS-$(HAVE_SSE2) += common/x86/av1_inv_txfm_sse2.c
diff --git a/av1/common/av1_rtcd_defs.pl b/av1/common/av1_rtcd_defs.pl
index 3e1b02f..53c9dc5 100644
--- a/av1/common/av1_rtcd_defs.pl
+++ b/av1/common/av1_rtcd_defs.pl
@@ -199,8 +199,8 @@
   specialize qw/quantize_32x32_fp_nuq/;
 }
 
-# EXT_INTRA predictor functions
-if (aom_config("CONFIG_EXT_INTRA") eq "yes") {
+# FILTER_INTRA predictor functions
+if (aom_config("CONFIG_FILTER_INTRA") eq "yes") {
   add_proto qw/void av1_dc_filter_predictor/, "uint8_t *dst, ptrdiff_t stride, int bs, const uint8_t *above, const uint8_t *left";
   specialize qw/av1_dc_filter_predictor sse4_1/;
   add_proto qw/void av1_v_filter_predictor/, "uint8_t *dst, ptrdiff_t stride, int bs, const uint8_t *above, const uint8_t *left";
diff --git a/av1/common/blockd.c b/av1/common/blockd.c
index e3c3ea5..8938bbf 100644
--- a/av1/common/blockd.c
+++ b/av1/common/blockd.c
@@ -150,8 +150,6 @@
   54,   49,    45,   40,   35,   31,   26,   22,   17,   13,   8,    4,
 };
 
-// Returns whether filter selection is needed for a given
-// intra prediction angle.
 int av1_is_intra_filter_switchable(int angle) {
   assert(angle > 0 && angle < 270);
   if (angle % 45 == 0) return 0;
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index 3ff4943..6296faa 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -171,13 +171,13 @@
 } PALETTE_MODE_INFO;
 #endif  // CONFIG_PALETTE
 
-#if CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
 typedef struct {
   // 1: an ext intra mode is used; 0: otherwise.
-  uint8_t use_ext_intra_mode[PLANE_TYPES];
-  EXT_INTRA_MODE ext_intra_mode[PLANE_TYPES];
-} EXT_INTRA_MODE_INFO;
-#endif  // CONFIG_EXT_INTRA
+  uint8_t use_filter_intra_mode[PLANE_TYPES];
+  FILTER_INTRA_MODE filter_intra_mode[PLANE_TYPES];
+} FILTER_INTRA_MODE_INFO;
+#endif  // CONFIG_FILTER_INTRA
 
 // This structure now relates to 8x8 block regions.
 typedef struct {
@@ -214,8 +214,10 @@
   MV_REFERENCE_FRAME ref_frame[2];
   TX_TYPE tx_type;
 
+#if CONFIG_FILTER_INTRA
+  FILTER_INTRA_MODE_INFO filter_intra_mode_info;
+#endif  // CONFIG_FILTER_INTRA
 #if CONFIG_EXT_INTRA
-  EXT_INTRA_MODE_INFO ext_intra_mode_info;
   int8_t angle_delta[2];
   // To-Do (huisu): this may be replaced by interp_filter
   INTRA_FILTER intra_filter;
@@ -563,17 +565,7 @@
 #endif  // CONFIG_EXT_TX && CONFIG_RECT_TX
 }
 
-#if CONFIG_EXT_INTRA
-#define ALLOW_FILTER_INTRA_MODES 1
-#define ANGLE_STEP 3
-#define MAX_ANGLE_DELTAS 3
-
-extern const int16_t dr_intra_derivative[90];
-
-static const uint8_t mode_to_angle_map[INTRA_MODES] = {
-  0, 90, 180, 45, 135, 111, 157, 203, 67, 0,
-};
-
+#if CONFIG_FILTER_INTRA
 static const TX_TYPE filter_intra_mode_to_tx_type_lookup[FILTER_INTRA_MODES] = {
   DCT_DCT,    // FILTER_DC
   ADST_DCT,   // FILTER_V
@@ -586,7 +578,18 @@
   ADST_DCT,   // FILTER_D63
   ADST_ADST,  // FILTER_TM
 };
+#endif  // CONFIG_FILTER_INTRA
 
+#if CONFIG_EXT_INTRA
+#define ANGLE_STEP 3
+#define MAX_ANGLE_DELTAS 3
+extern const int16_t dr_intra_derivative[90];
+static const uint8_t mode_to_angle_map[INTRA_MODES] = {
+  0, 90, 180, 45, 135, 111, 157, 203, 67, 0,
+};
+
+// Returns whether filter selection is needed for a given
+// intra prediction angle.
 int av1_is_intra_filter_switchable(int angle);
 #endif  // CONFIG_EXT_INTRA
 
@@ -618,15 +621,19 @@
   if (FIXED_TX_TYPE)
     return get_default_tx_type(plane_type, xd, block_idx, tx_size);
 
-#if CONFIG_EXT_INTRA
+#if CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA
   if (!is_inter_block(mbmi)) {
-    const int use_ext_intra_mode_info =
-        mbmi->ext_intra_mode_info.use_ext_intra_mode[plane_type];
-    const EXT_INTRA_MODE ext_intra_mode =
-        mbmi->ext_intra_mode_info.ext_intra_mode[plane_type];
+#if CONFIG_FILTER_INTRA
+    const int use_filter_intra_mode_info =
+        mbmi->filter_intra_mode_info.use_filter_intra_mode[plane_type];
+    const FILTER_INTRA_MODE filter_intra_mode =
+        mbmi->filter_intra_mode_info.filter_intra_mode[plane_type];
+#endif  // CONFIG_FILTER_INTRA
+#if CONFIG_EXT_INTRA
     const PREDICTION_MODE mode = (plane_type == PLANE_TYPE_Y)
                                      ? get_y_mode(mi, block_idx)
                                      : mbmi->uv_mode;
+#endif  // CONFIG_EXT_INTRA
 
     if (xd->lossless[mbmi->segment_id] || tx_size >= TX_32X32) return DCT_DCT;
 
@@ -637,9 +644,11 @@
 #endif  // ALLOW_INTRA_EXT_TX
 #endif  // CONFIG_EXT_TX
 
-    if (use_ext_intra_mode_info)
-      return filter_intra_mode_to_tx_type_lookup[ext_intra_mode];
-
+#if CONFIG_FILTER_INTRA
+    if (use_filter_intra_mode_info)
+      return filter_intra_mode_to_tx_type_lookup[filter_intra_mode];
+#endif  // CONFIG_FILTER_INTRA
+#if CONFIG_EXT_INTRA
     if (mode == DC_PRED) {
       return DCT_DCT;
     } else if (mode == TM_PRED) {
@@ -658,8 +667,9 @@
       else
         return DCT_ADST;
     }
-  }
 #endif  // CONFIG_EXT_INTRA
+  }
+#endif  // CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA
 
 #if CONFIG_EXT_TX
 #if EXT_TX_SIZES == 4
diff --git a/av1/common/common_data.h b/av1/common/common_data.h
index f6396f5..4165e35 100644
--- a/av1/common/common_data.h
+++ b/av1/common/common_data.h
@@ -442,6 +442,17 @@
 #endif       // CONFIG_EXT_TX
 };
 
+static const int tx_size_1d[TX_SIZES] = { 4, 8, 16, 32 };
+
+static const int tx_size_2d[TX_SIZES] = { 16, 64, 256, 1024 };
+
+static const uint8_t tx_size_1d_log2[TX_SIZES] = { 2, 3, 4, 5 };
+
+static const int tx_size_1d_in_unit[TX_SIZES] = { 1, 2, 4, 8 };
+
+// TODO(jingning): Temporary table during the construction.
+static const int tx_size_1d_in_unit_log2[TX_SIZES] = { 0, 1, 2, 3 };
+
 static const BLOCK_SIZE txsize_to_bsize[TX_SIZES_ALL] = {
   BLOCK_4X4,    // TX_4X4
   BLOCK_8X8,    // TX_8X8
diff --git a/av1/common/entropy.c b/av1/common/entropy.c
index e30ae71..7179e3d 100644
--- a/av1/common/entropy.c
+++ b/av1/common/entropy.c
@@ -406,16 +406,18 @@
   { 255, 246, 247, 255, 239, 255, 253, 255 },
 };
 
-#if CONFIG_ANS
-// Model obtained from a 2-sided zero-centerd distribuition derived
+#if CONFIG_RANS
+// Model obtained from a 2-sided zero-centered distribution derived
 // from a Pareto distribution. The cdf of the distribution is:
 // cdf(x) = 0.5 + 0.5 * sgn(x) * [1 - {alpha/(alpha + |x|)} ^ beta]
 //
-// For a given beta and a given probablity of the 1-node, the alpha
+// For a given beta and a given probability of the 1-node, the alpha
 // is first solved, and then the {alpha, beta} pair is used to generate
 // the probabilities for the rest of the nodes.
 //
-// beta = 8
+// The full source code of the generating program is available in:
+// tools/gen_constrained_tokenset.py
+//
 // Values for tokens ONE_TOKEN through CATEGORY6_TOKEN included here.
 // ZERO_TOKEN and EOB_TOKEN are coded as flags outside this coder.
 const aom_cdf_prob
@@ -676,7 +678,7 @@
       { 32512, 238, 11, 1, 1, 1, 1, 1, 1, 1 },
       { 32640, 117, 4, 1, 1, 1, 1, 1, 1, 1 },
     };
-#endif  // CONFIG_ANS
+#endif  // CONFIG_RANS
 
 /* clang-format off */
 #if CONFIG_ENTROPY
@@ -2801,7 +2803,7 @@
   extend_to_full_distribution(&full[UNCONSTRAINED_NODES], model[PIVOT_NODE]);
 }
 
-#if CONFIG_ANS
+#if CONFIG_RANS
 static void build_token_cdfs(const aom_prob *pdf_model,
                              aom_cdf_prob cdf[ENTROPY_TOKENS]) {
   int i, sum = 0;
@@ -2818,12 +2820,11 @@
     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 (l = 0; l < BAND_COEFF_CONTEXTS(k); ++l)
             build_token_cdfs(fc->coef_probs[t][i][j][k][l],
                              fc->coef_cdfs[t][i][j][k][l]);
-          }
 }
-#endif  // CONFIG_ANS
+#endif  // CONFIG_RANS
 
 void av1_default_coef_probs(AV1_COMMON *cm) {
 #if CONFIG_ENTROPY
@@ -2836,9 +2837,9 @@
   av1_copy(cm->fc->coef_probs[TX_16X16], default_coef_probs_16x16);
   av1_copy(cm->fc->coef_probs[TX_32X32], default_coef_probs_32x32);
 #endif  // CONFIG_ENTROPY
-#if CONFIG_ANS
+#if CONFIG_RANS
   av1_coef_pareto_cdfs(cm->fc);
-#endif  // CONFIG_ANS
+#endif  // CONFIG_RANS
 }
 
 static void adapt_coef_probs(AV1_COMMON *cm, TX_SIZE tx_size,
@@ -2905,9 +2906,9 @@
 #endif  // CONFIG_ENTROPY
   for (t = TX_4X4; t <= TX_32X32; t++)
     adapt_coef_probs(cm, t, count_sat, update_factor);
-#if CONFIG_ANS
+#if CONFIG_RANS
   av1_coef_pareto_cdfs(cm->fc);
-#endif
+#endif  // CONFIG_RANS
 }
 
 #if CONFIG_ENTROPY
diff --git a/av1/common/entropy.h b/av1/common/entropy.h
index 47825b4..15b50db 100644
--- a/av1/common/entropy.h
+++ b/av1/common/entropy.h
@@ -12,12 +12,13 @@
 #ifndef AV1_COMMON_ENTROPY_H_
 #define AV1_COMMON_ENTROPY_H_
 
+#include "./aom_config.h"
 #include "aom/aom_integer.h"
+#if CONFIG_RANS
+#include "aom_dsp/ans.h"
+#endif  // CONFIG_RANS
 #include "aom_dsp/prob.h"
 
-#if CONFIG_ANS
-#include "aom_dsp/ans.h"
-#endif  // CONFIG_ANS
 #include "av1/common/common.h"
 #include "av1/common/enums.h"
 
@@ -190,12 +191,12 @@
 #define MODEL_NODES (ENTROPY_NODES - UNCONSTRAINED_NODES)
 extern const aom_tree_index av1_coef_con_tree[TREE_SIZE(ENTROPY_TOKENS)];
 extern const aom_prob av1_pareto8_full[COEFF_PROB_MODELS][MODEL_NODES];
-#if CONFIG_ANS || CONFIG_DAALA_EC
+#if CONFIG_RANS || CONFIG_DAALA_EC
 typedef aom_cdf_prob coeff_cdf_model[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS]
                                     [ENTROPY_TOKENS];
 extern const aom_cdf_prob av1_pareto8_token_probs[COEFF_PROB_MODELS]
                                                  [ENTROPY_TOKENS - 2];
-#endif  // CONFIG_ANS
+#endif  // CONFIG_RANS
 
 typedef aom_prob av1_coeff_probs_model[REF_TYPES][COEF_BANDS][COEFF_CONTEXTS]
                                       [UNCONSTRAINED_NODES];
@@ -265,10 +266,10 @@
   return combine_entropy_contexts(above_ec, left_ec);
 }
 
-#if CONFIG_ANS
+#if CONFIG_RANS
 struct frame_contexts;
 void av1_coef_pareto_cdfs(struct frame_contexts *fc);
-#endif  // CONFIG_ANS
+#endif  // CONFIG_RANS
 
 #if CONFIG_ENTROPY
 #define COEF_COUNT_SAT_BITS 5
diff --git a/av1/common/entropymode.c b/av1/common/entropymode.c
index 3f6f0da..20e8904 100644
--- a/av1/common/entropymode.c
+++ b/av1/common/entropymode.c
@@ -1313,14 +1313,16 @@
                                                   { 49, 25, 24 },
                                                   { 72, 38, 50 },
                                                 };
-static const aom_prob default_ext_intra_probs[2] = { 230, 230 };
-
 const aom_tree_index av1_intra_filter_tree[TREE_SIZE(INTRA_FILTERS)] = {
   -INTRA_FILTER_LINEAR,      2, -INTRA_FILTER_8TAP, 4, -INTRA_FILTER_8TAP_SHARP,
   -INTRA_FILTER_8TAP_SMOOTH,
 };
 #endif  // CONFIG_EXT_INTRA
 
+#if CONFIG_FILTER_INTRA
+static const aom_prob default_filter_intra_probs[2] = { 230, 230 };
+#endif  // CONFIG_FILTER_INTRA
+
 #if CONFIG_SUPERTX
 static const aom_prob default_supertx_prob[PARTITION_SUPERTX_CONTEXTS]
                                           [TX_SIZES] = {
@@ -1385,9 +1387,11 @@
   av1_copy(fc->seg.tree_probs, default_segment_tree_probs);
   av1_copy(fc->seg.pred_probs, default_segment_pred_probs);
 #if CONFIG_EXT_INTRA
-  av1_copy(fc->ext_intra_probs, default_ext_intra_probs);
   av1_copy(fc->intra_filter_probs, default_intra_filter_probs);
 #endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+  av1_copy(fc->filter_intra_probs, default_filter_intra_probs);
+#endif  // CONFIG_FILTER_INTRA
   av1_copy(fc->inter_ext_tx_prob, default_inter_ext_tx_prob);
   av1_copy(fc->intra_ext_tx_prob, default_intra_ext_tx_prob);
 #if CONFIG_LOOP_RESTORATION
@@ -1657,22 +1661,23 @@
 #endif
   }
 #endif  // CONFIG_EXT_PARTITION_TYPES
-
 #if CONFIG_DELTA_Q
   for (i = 0; i < DELTA_Q_CONTEXTS; ++i)
     fc->delta_q_prob[i] =
         mode_mv_merge_probs(pre_fc->delta_q_prob[i], counts->delta_q[i]);
 #endif
 #if CONFIG_EXT_INTRA
-  for (i = 0; i < PLANE_TYPES; ++i) {
-    fc->ext_intra_probs[i] = av1_mode_mv_merge_probs(pre_fc->ext_intra_probs[i],
-                                                     counts->ext_intra[i]);
-  }
-
-  for (i = 0; i < INTRA_FILTERS + 1; ++i)
+  for (i = 0; i < INTRA_FILTERS + 1; ++i) {
     aom_tree_merge_probs(av1_intra_filter_tree, pre_fc->intra_filter_probs[i],
                          counts->intra_filter[i], fc->intra_filter_probs[i]);
+  }
 #endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+  for (i = 0; i < PLANE_TYPES; ++i) {
+    fc->filter_intra_probs[i] = av1_mode_mv_merge_probs(
+        pre_fc->filter_intra_probs[i], counts->filter_intra[i]);
+  }
+#endif  // CONFIG_FILTER_INTRA
 }
 
 static void set_default_lf_deltas(struct loopfilter *lf) {
diff --git a/av1/common/entropymode.h b/av1/common/entropymode.h
index 11e76a9..d0ad807 100644
--- a/av1/common/entropymode.h
+++ b/av1/common/entropymode.h
@@ -56,9 +56,9 @@
   aom_prob partition_prob[PARTITION_CONTEXTS][PARTITION_TYPES - 1];
 #endif
   av1_coeff_probs_model coef_probs[TX_SIZES][PLANE_TYPES];
-#if CONFIG_ANS || CONFIG_DAALA_EC
+#if CONFIG_RANS || CONFIG_DAALA_EC
   coeff_cdf_model coef_cdfs[TX_SIZES][PLANE_TYPES];
-#endif
+#endif  // CONFIG_RANS
   aom_prob switchable_interp_prob[SWITCHABLE_FILTER_CONTEXTS]
                                  [SWITCHABLE_FILTERS - 1];
 
@@ -122,9 +122,11 @@
 #endif  // CONFIG_SUPERTX
   struct segmentation_probs seg;
 #if CONFIG_EXT_INTRA
-  aom_prob ext_intra_probs[PLANE_TYPES];
   aom_prob intra_filter_probs[INTRA_FILTERS + 1][INTRA_FILTERS - 1];
 #endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+  aom_prob filter_intra_probs[PLANE_TYPES];
+#endif  // CONFIG_FILTER_INTRA
 #if CONFIG_GLOBAL_MOTION
   aom_prob global_motion_types_prob[GLOBAL_MOTION_TYPES - 1];
 #endif  // CONFIG_GLOBAL_MOTION
@@ -226,9 +228,11 @@
 #endif  // CONFIG_SUPERTX
   struct seg_counts seg;
 #if CONFIG_EXT_INTRA
-  unsigned int ext_intra[PLANE_TYPES][2];
   unsigned int intra_filter[INTRA_FILTERS + 1][INTRA_FILTERS];
 #endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+  unsigned int filter_intra[PLANE_TYPES][2];
+#endif  // CONFIG_FILTER_INTRA
 } FRAME_COUNTS;
 
 extern const aom_prob av1_kf_y_mode_prob[INTRA_MODES][INTRA_MODES]
diff --git a/av1/common/enums.h b/av1/common/enums.h
index ce6032b..b02c814 100644
--- a/av1/common/enums.h
+++ b/av1/common/enums.h
@@ -318,7 +318,7 @@
 
 #endif  // CONFIG_EXT_INTER
 
-#if CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
 typedef enum {
   FILTER_DC_PRED,
   FILTER_V_PRED,
@@ -330,10 +330,11 @@
   FILTER_D207_PRED,
   FILTER_D63_PRED,
   FILTER_TM_PRED,
-  EXT_INTRA_MODES,
-} EXT_INTRA_MODE;
+  FILTER_INTRA_MODES,
+} FILTER_INTRA_MODE;
+#endif  // CONFIG_FILTER_INTRA
 
-#define FILTER_INTRA_MODES (FILTER_TM_PRED + 1)
+#if CONFIG_EXT_INTRA
 #define DIRECTIONAL_MODES (INTRA_MODES - 2)
 #endif  // CONFIG_EXT_INTRA
 
diff --git a/av1/common/intra_filters.h b/av1/common/intra_filters.h
deleted file mode 100644
index 350f7ca..0000000
--- a/av1/common/intra_filters.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- *  Copyright (c) 2016 The WebM project authors. All Rights Reserved.
- *
- *  Use of this source code is governed by a BSD-style license
- *  that can be found in the LICENSE file in the root of the source
- *  tree. An additional intellectual property rights grant can be found
- *  in the file PATENTS.  All contributing project authors may
- *  be found in the AUTHORS file in the root of the source tree.
- */
-
-#ifndef AV1_COMMON_INTRA_FILTERS_H_
-#define AV1_COMMON_INTRA_FILTERS_H_
-
-#define FILTER_INTRA_PREC_BITS (10)
-
-static int filter_intra_taps_4[TX_SIZES][INTRA_MODES][4] = {
-  {
-      { 735, 881, -537, -54 },
-      { 1005, 519, -488, -11 },
-      { 383, 990, -343, -6 },
-      { 442, 805, -542, 319 },
-      { 658, 616, -133, -116 },
-      { 875, 442, -141, -151 },
-      { 386, 741, -23, -80 },
-      { 390, 1027, -446, 51 },
-      { 679, 606, -523, 262 },
-      { 903, 922, -778, -23 },
-  },
-  {
-      { 648, 803, -444, 16 },
-      { 972, 620, -576, 7 },
-      { 561, 967, -499, -5 },
-      { 585, 762, -468, 144 },
-      { 596, 619, -182, -9 },
-      { 895, 459, -176, -153 },
-      { 557, 722, -126, -129 },
-      { 601, 839, -523, 105 },
-      { 562, 709, -499, 251 },
-      { 803, 872, -695, 43 },
-  },
-  {
-      { 423, 728, -347, 111 },
-      { 963, 685, -665, 23 },
-      { 281, 1024, -480, 216 },
-      { 640, 596, -437, 78 },
-      { 429, 669, -259, 99 },
-      { 740, 646, -415, 23 },
-      { 568, 771, -346, 40 },
-      { 404, 833, -486, 209 },
-      { 398, 712, -423, 307 },
-      { 939, 935, -887, 17 },
-  },
-  {
-      { 477, 737, -393, 150 },
-      { 881, 630, -546, 67 },
-      { 506, 984, -443, -20 },
-      { 114, 459, -270, 528 },
-      { 433, 528, 14, 3 },
-      { 837, 470, -301, -30 },
-      { 181, 777, 89, -107 },
-      { -29, 716, -232, 259 },
-      { 589, 646, -495, 255 },
-      { 740, 884, -728, 77 },
-  },
-};
-
-#endif  // AV1_COMMON_INTRA_FILTERS_H_
diff --git a/av1/common/reconintra.c b/av1/common/reconintra.c
index 483b0b2..96ffb08 100644
--- a/av1/common/reconintra.c
+++ b/av1/common/reconintra.c
@@ -22,9 +22,6 @@
 #include "aom_mem/aom_mem.h"
 #include "aom_ports/mem.h"
 #include "aom_ports/aom_once.h"
-#if CONFIG_EXT_INTRA
-#include "av1/common/intra_filters.h"
-#endif
 #include "av1/common/reconintra.h"
 #include "av1/common/onyxc_int.h"
 
@@ -382,20 +379,6 @@
 }
 
 #if CONFIG_EXT_INTRA
-
-static const uint8_t ext_intra_extend_modes[FILTER_INTRA_MODES] = {
-  NEED_LEFT | NEED_ABOVE,  // FILTER_DC
-  NEED_LEFT | NEED_ABOVE,  // FILTER_V
-  NEED_LEFT | NEED_ABOVE,  // FILTER_H
-  NEED_LEFT | NEED_ABOVE,  // FILTER_D45
-  NEED_LEFT | NEED_ABOVE,  // FILTER_D135
-  NEED_LEFT | NEED_ABOVE,  // FILTER_D117
-  NEED_LEFT | NEED_ABOVE,  // FILTER_D153
-  NEED_LEFT | NEED_ABOVE,  // FILTER_D207
-  NEED_LEFT | NEED_ABOVE,  // FILTER_D63
-  NEED_LEFT | NEED_ABOVE,  // FILTER_TM
-};
-
 static int intra_subpel_interp(int base, int shift, const uint8_t *ref,
                                int ref_start_idx, int ref_end_idx,
                                INTRA_FILTER filter_type) {
@@ -706,129 +689,6 @@
   }
 }
 
-static void filter_intra_predictors_4tap(uint8_t *dst, ptrdiff_t stride, int bs,
-                                         const uint8_t *above,
-                                         const uint8_t *left, int mode) {
-  int k, r, c;
-  int preds[33][65];
-  int mean, ipred;
-  const TX_SIZE tx_size =
-      (bs == 32) ? TX_32X32
-                 : ((bs == 16) ? TX_16X16 : ((bs == 8) ? TX_8X8 : (TX_4X4)));
-  const int c0 = filter_intra_taps_4[tx_size][mode][0];
-  const int c1 = filter_intra_taps_4[tx_size][mode][1];
-  const int c2 = filter_intra_taps_4[tx_size][mode][2];
-  const int c3 = filter_intra_taps_4[tx_size][mode][3];
-
-  k = 0;
-  mean = 0;
-  while (k < bs) {
-    mean = mean + (int)left[k];
-    mean = mean + (int)above[k];
-    k++;
-  }
-  mean = (mean + bs) / (2 * bs);
-
-  for (r = 0; r < bs; ++r) preds[r + 1][0] = (int)left[r] - mean;
-
-  for (c = 0; c < 2 * bs + 1; ++c) preds[0][c] = (int)above[c - 1] - mean;
-
-  for (r = 1; r < bs + 1; ++r)
-    for (c = 1; c < 2 * bs + 1 - r; ++c) {
-      ipred = c0 * preds[r - 1][c] + c1 * preds[r][c - 1] +
-              c2 * preds[r - 1][c - 1] + c3 * preds[r - 1][c + 1];
-      preds[r][c] = ROUND_POWER_OF_TWO_SIGNED(ipred, FILTER_INTRA_PREC_BITS);
-    }
-
-  for (r = 0; r < bs; ++r) {
-    for (c = 0; c < bs; ++c) {
-      ipred = preds[r + 1][c + 1] + mean;
-      dst[c] = clip_pixel(ipred);
-    }
-    dst += stride;
-  }
-}
-
-void av1_dc_filter_predictor_c(uint8_t *dst, ptrdiff_t stride, int bs,
-                               const uint8_t *above, const uint8_t *left) {
-  filter_intra_predictors_4tap(dst, stride, bs, above, left, DC_PRED);
-}
-
-void av1_v_filter_predictor_c(uint8_t *dst, ptrdiff_t stride, int bs,
-                              const uint8_t *above, const uint8_t *left) {
-  filter_intra_predictors_4tap(dst, stride, bs, above, left, V_PRED);
-}
-
-void av1_h_filter_predictor_c(uint8_t *dst, ptrdiff_t stride, int bs,
-                              const uint8_t *above, const uint8_t *left) {
-  filter_intra_predictors_4tap(dst, stride, bs, above, left, H_PRED);
-}
-
-void av1_d45_filter_predictor_c(uint8_t *dst, ptrdiff_t stride, int bs,
-                                const uint8_t *above, const uint8_t *left) {
-  filter_intra_predictors_4tap(dst, stride, bs, above, left, D45_PRED);
-}
-
-void av1_d135_filter_predictor_c(uint8_t *dst, ptrdiff_t stride, int bs,
-                                 const uint8_t *above, const uint8_t *left) {
-  filter_intra_predictors_4tap(dst, stride, bs, above, left, D135_PRED);
-}
-
-void av1_d117_filter_predictor_c(uint8_t *dst, ptrdiff_t stride, int bs,
-                                 const uint8_t *above, const uint8_t *left) {
-  filter_intra_predictors_4tap(dst, stride, bs, above, left, D117_PRED);
-}
-
-void av1_d153_filter_predictor_c(uint8_t *dst, ptrdiff_t stride, int bs,
-                                 const uint8_t *above, const uint8_t *left) {
-  filter_intra_predictors_4tap(dst, stride, bs, above, left, D153_PRED);
-}
-
-void av1_d207_filter_predictor_c(uint8_t *dst, ptrdiff_t stride, int bs,
-                                 const uint8_t *above, const uint8_t *left) {
-  filter_intra_predictors_4tap(dst, stride, bs, above, left, D207_PRED);
-}
-
-void av1_d63_filter_predictor_c(uint8_t *dst, ptrdiff_t stride, int bs,
-                                const uint8_t *above, const uint8_t *left) {
-  filter_intra_predictors_4tap(dst, stride, bs, above, left, D63_PRED);
-}
-
-void av1_tm_filter_predictor_c(uint8_t *dst, ptrdiff_t stride, int bs,
-                               const uint8_t *above, const uint8_t *left) {
-  filter_intra_predictors_4tap(dst, stride, bs, above, left, TM_PRED);
-}
-
-static void filter_intra_predictors(int mode, uint8_t *dst, ptrdiff_t stride,
-                                    int bs, const uint8_t *above,
-                                    const uint8_t *left) {
-  switch (mode) {
-    case DC_PRED: av1_dc_filter_predictor(dst, stride, bs, above, left); break;
-    case V_PRED: av1_v_filter_predictor(dst, stride, bs, above, left); break;
-    case H_PRED: av1_h_filter_predictor(dst, stride, bs, above, left); break;
-    case D45_PRED:
-      av1_d45_filter_predictor(dst, stride, bs, above, left);
-      break;
-    case D135_PRED:
-      av1_d135_filter_predictor(dst, stride, bs, above, left);
-      break;
-    case D117_PRED:
-      av1_d117_filter_predictor(dst, stride, bs, above, left);
-      break;
-    case D153_PRED:
-      av1_d153_filter_predictor(dst, stride, bs, above, left);
-      break;
-    case D207_PRED:
-      av1_d207_filter_predictor(dst, stride, bs, above, left);
-      break;
-    case D63_PRED:
-      av1_d63_filter_predictor(dst, stride, bs, above, left);
-      break;
-    case TM_PRED: av1_tm_filter_predictor(dst, stride, bs, above, left); break;
-    default: assert(0);
-  }
-}
-
 #if CONFIG_AOM_HIGHBITDEPTH
 static int highbd_intra_subpel_interp(int base, int shift, const uint16_t *ref,
                                       int ref_start_idx, int ref_end_idx,
@@ -999,7 +859,184 @@
     highbd_h_predictor(dst, stride, bs, above, left, bd);
   }
 }
+#endif  // CONFIG_AOM_HIGHBITDEPTH
+#endif  // CONFIG_EXT_INTRA
 
+#if CONFIG_FILTER_INTRA
+int av1_filter_intra_taps_4[TX_SIZES][INTRA_MODES][4] = {
+  {
+      { 735, 881, -537, -54 },
+      { 1005, 519, -488, -11 },
+      { 383, 990, -343, -6 },
+      { 442, 805, -542, 319 },
+      { 658, 616, -133, -116 },
+      { 875, 442, -141, -151 },
+      { 386, 741, -23, -80 },
+      { 390, 1027, -446, 51 },
+      { 679, 606, -523, 262 },
+      { 903, 922, -778, -23 },
+  },
+  {
+      { 648, 803, -444, 16 },
+      { 972, 620, -576, 7 },
+      { 561, 967, -499, -5 },
+      { 585, 762, -468, 144 },
+      { 596, 619, -182, -9 },
+      { 895, 459, -176, -153 },
+      { 557, 722, -126, -129 },
+      { 601, 839, -523, 105 },
+      { 562, 709, -499, 251 },
+      { 803, 872, -695, 43 },
+  },
+  {
+      { 423, 728, -347, 111 },
+      { 963, 685, -665, 23 },
+      { 281, 1024, -480, 216 },
+      { 640, 596, -437, 78 },
+      { 429, 669, -259, 99 },
+      { 740, 646, -415, 23 },
+      { 568, 771, -346, 40 },
+      { 404, 833, -486, 209 },
+      { 398, 712, -423, 307 },
+      { 939, 935, -887, 17 },
+  },
+  {
+      { 477, 737, -393, 150 },
+      { 881, 630, -546, 67 },
+      { 506, 984, -443, -20 },
+      { 114, 459, -270, 528 },
+      { 433, 528, 14, 3 },
+      { 837, 470, -301, -30 },
+      { 181, 777, 89, -107 },
+      { -29, 716, -232, 259 },
+      { 589, 646, -495, 255 },
+      { 740, 884, -728, 77 },
+  },
+};
+
+static void filter_intra_predictors_4tap(uint8_t *dst, ptrdiff_t stride, int bs,
+                                         const uint8_t *above,
+                                         const uint8_t *left, int mode) {
+  int k, r, c;
+  int buffer[33][65];
+  int mean, ipred;
+  const TX_SIZE tx_size =
+      (bs == 32) ? TX_32X32
+                 : ((bs == 16) ? TX_16X16 : ((bs == 8) ? TX_8X8 : (TX_4X4)));
+  const int c0 = av1_filter_intra_taps_4[tx_size][mode][0];
+  const int c1 = av1_filter_intra_taps_4[tx_size][mode][1];
+  const int c2 = av1_filter_intra_taps_4[tx_size][mode][2];
+  const int c3 = av1_filter_intra_taps_4[tx_size][mode][3];
+
+  k = 0;
+  mean = 0;
+  while (k < bs) {
+    mean = mean + (int)left[k];
+    mean = mean + (int)above[k];
+    k++;
+  }
+  mean = (mean + bs) / (2 * bs);
+
+  for (r = 0; r < bs; ++r) buffer[r + 1][0] = (int)left[r] - mean;
+
+  for (c = 0; c < 2 * bs + 1; ++c) buffer[0][c] = (int)above[c - 1] - mean;
+
+  for (r = 1; r < bs + 1; ++r)
+    for (c = 1; c < 2 * bs + 1 - r; ++c) {
+      ipred = c0 * buffer[r - 1][c] + c1 * buffer[r][c - 1] +
+              c2 * buffer[r - 1][c - 1] + c3 * buffer[r - 1][c + 1];
+      buffer[r][c] = ROUND_POWER_OF_TWO_SIGNED(ipred, FILTER_INTRA_PREC_BITS);
+    }
+
+  for (r = 0; r < bs; ++r) {
+    for (c = 0; c < bs; ++c) {
+      ipred = buffer[r + 1][c + 1] + mean;
+      dst[c] = clip_pixel(ipred);
+    }
+    dst += stride;
+  }
+}
+
+void av1_dc_filter_predictor_c(uint8_t *dst, ptrdiff_t stride, int bs,
+                               const uint8_t *above, const uint8_t *left) {
+  filter_intra_predictors_4tap(dst, stride, bs, above, left, DC_PRED);
+}
+
+void av1_v_filter_predictor_c(uint8_t *dst, ptrdiff_t stride, int bs,
+                              const uint8_t *above, const uint8_t *left) {
+  filter_intra_predictors_4tap(dst, stride, bs, above, left, V_PRED);
+}
+
+void av1_h_filter_predictor_c(uint8_t *dst, ptrdiff_t stride, int bs,
+                              const uint8_t *above, const uint8_t *left) {
+  filter_intra_predictors_4tap(dst, stride, bs, above, left, H_PRED);
+}
+
+void av1_d45_filter_predictor_c(uint8_t *dst, ptrdiff_t stride, int bs,
+                                const uint8_t *above, const uint8_t *left) {
+  filter_intra_predictors_4tap(dst, stride, bs, above, left, D45_PRED);
+}
+
+void av1_d135_filter_predictor_c(uint8_t *dst, ptrdiff_t stride, int bs,
+                                 const uint8_t *above, const uint8_t *left) {
+  filter_intra_predictors_4tap(dst, stride, bs, above, left, D135_PRED);
+}
+
+void av1_d117_filter_predictor_c(uint8_t *dst, ptrdiff_t stride, int bs,
+                                 const uint8_t *above, const uint8_t *left) {
+  filter_intra_predictors_4tap(dst, stride, bs, above, left, D117_PRED);
+}
+
+void av1_d153_filter_predictor_c(uint8_t *dst, ptrdiff_t stride, int bs,
+                                 const uint8_t *above, const uint8_t *left) {
+  filter_intra_predictors_4tap(dst, stride, bs, above, left, D153_PRED);
+}
+
+void av1_d207_filter_predictor_c(uint8_t *dst, ptrdiff_t stride, int bs,
+                                 const uint8_t *above, const uint8_t *left) {
+  filter_intra_predictors_4tap(dst, stride, bs, above, left, D207_PRED);
+}
+
+void av1_d63_filter_predictor_c(uint8_t *dst, ptrdiff_t stride, int bs,
+                                const uint8_t *above, const uint8_t *left) {
+  filter_intra_predictors_4tap(dst, stride, bs, above, left, D63_PRED);
+}
+
+void av1_tm_filter_predictor_c(uint8_t *dst, ptrdiff_t stride, int bs,
+                               const uint8_t *above, const uint8_t *left) {
+  filter_intra_predictors_4tap(dst, stride, bs, above, left, TM_PRED);
+}
+
+static void filter_intra_predictors(int mode, uint8_t *dst, ptrdiff_t stride,
+                                    int bs, const uint8_t *above,
+                                    const uint8_t *left) {
+  switch (mode) {
+    case DC_PRED: av1_dc_filter_predictor(dst, stride, bs, above, left); break;
+    case V_PRED: av1_v_filter_predictor(dst, stride, bs, above, left); break;
+    case H_PRED: av1_h_filter_predictor(dst, stride, bs, above, left); break;
+    case D45_PRED:
+      av1_d45_filter_predictor(dst, stride, bs, above, left);
+      break;
+    case D135_PRED:
+      av1_d135_filter_predictor(dst, stride, bs, above, left);
+      break;
+    case D117_PRED:
+      av1_d117_filter_predictor(dst, stride, bs, above, left);
+      break;
+    case D153_PRED:
+      av1_d153_filter_predictor(dst, stride, bs, above, left);
+      break;
+    case D207_PRED:
+      av1_d207_filter_predictor(dst, stride, bs, above, left);
+      break;
+    case D63_PRED:
+      av1_d63_filter_predictor(dst, stride, bs, above, left);
+      break;
+    case TM_PRED: av1_tm_filter_predictor(dst, stride, bs, above, left); break;
+    default: assert(0);
+  }
+}
+#if CONFIG_AOM_HIGHBITDEPTH
 static void highbd_filter_intra_predictors_4tap(uint16_t *dst, ptrdiff_t stride,
                                                 int bs, const uint16_t *above,
                                                 const uint16_t *left, int mode,
@@ -1010,10 +1047,10 @@
   const TX_SIZE tx_size =
       (bs == 32) ? TX_32X32
                  : ((bs == 16) ? TX_16X16 : ((bs == 8) ? TX_8X8 : (TX_4X4)));
-  const int c0 = filter_intra_taps_4[tx_size][mode][0];
-  const int c1 = filter_intra_taps_4[tx_size][mode][1];
-  const int c2 = filter_intra_taps_4[tx_size][mode][2];
-  const int c3 = filter_intra_taps_4[tx_size][mode][3];
+  const int c0 = av1_filter_intra_taps_4[tx_size][mode][0];
+  const int c1 = av1_filter_intra_taps_4[tx_size][mode][1];
+  const int c2 = av1_filter_intra_taps_4[tx_size][mode][2];
+  const int c3 = av1_filter_intra_taps_4[tx_size][mode][3];
 
   k = 0;
   mean = 0;
@@ -1151,7 +1188,7 @@
   }
 }
 #endif  // CONFIG_AOM_HIGHBITDEPTH
-#endif  // CONFIG_EXT_INTRA
+#endif  // CONFIG_FILTER_INTRA
 
 #if CONFIG_AOM_HIGHBITDEPTH
 static void build_intra_predictors_high(
@@ -1168,7 +1205,19 @@
   const int bs = 4 * num_4x4_blocks_wide_txsize_lookup[tx_size];
   int need_left = extend_modes[mode] & NEED_LEFT;
   int need_above = extend_modes[mode] & NEED_ABOVE;
+  int need_above_left = extend_modes[mode] & NEED_ABOVELEFT;
   const uint16_t *above_ref = ref - ref_stride;
+#if CONFIG_EXT_INTRA
+  int p_angle = 0;
+  const int is_dr_mode = mode != DC_PRED && mode != TM_PRED &&
+                         xd->mi[0]->mbmi.sb_type >= BLOCK_8X8;
+#endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+  const FILTER_INTRA_MODE_INFO *filter_intra_mode_info =
+      &xd->mi[0]->mbmi.filter_intra_mode_info;
+  const FILTER_INTRA_MODE filter_intra_mode =
+      filter_intra_mode_info->filter_intra_mode[plane != 0];
+#endif  // CONFIG_FILTER_INTRA
   int base = 128 << (xd->bd - 8);
 // 127 127 127 .. 127 127 127 127 127 127
 // 129  A   B  ..  Y   Z
@@ -1177,29 +1226,21 @@
 // 129  G   H  ..  S   T   T   T   T   T
 
 #if CONFIG_EXT_INTRA
-  const EXT_INTRA_MODE_INFO *ext_intra_mode_info =
-      &xd->mi[0]->mbmi.ext_intra_mode_info;
-  const EXT_INTRA_MODE ext_intra_mode =
-      ext_intra_mode_info->ext_intra_mode[plane != 0];
-  int p_angle = 0;
-
-  if (mode != DC_PRED && mode != TM_PRED &&
-      xd->mi[0]->mbmi.sb_type >= BLOCK_8X8) {
+  if (is_dr_mode) {
     p_angle = mode_to_angle_map[mode] +
               xd->mi[0]->mbmi.angle_delta[plane != 0] * ANGLE_STEP;
     if (p_angle <= 90)
-      need_above = 1, need_left = 0;
+      need_above = 1, need_left = 0, need_above_left = 1;
     else if (p_angle < 180)
-      need_above = 1, need_left = 1;
+      need_above = 1, need_left = 1, need_above_left = 1;
     else
-      need_above = 0, need_left = 1;
-  }
-
-  if (ext_intra_mode_info->use_ext_intra_mode[plane != 0]) {
-    need_left = ext_intra_extend_modes[ext_intra_mode] & NEED_LEFT;
-    need_above = ext_intra_extend_modes[ext_intra_mode] & NEED_ABOVE;
+      need_above = 0, need_left = 1, need_above_left = 1;
   }
 #endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+  if (filter_intra_mode_info->use_filter_intra_mode[plane != 0])
+    need_left = need_above = need_above_left = 1;
+#endif  // CONFIG_FILTER_INTRA
 
   (void)plane;
   assert(n_top_px >= 0);
@@ -1218,19 +1259,18 @@
 
   // NEED_LEFT
   if (need_left) {
-#if CONFIG_EXT_INTRA
-    int need_bottom;
-    if (ext_intra_mode_info->use_ext_intra_mode[plane != 0]) {
+#if CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA
+    int need_bottom = !!(extend_modes[mode] & NEED_BOTTOMLEFT);
+#if CONFIG_FILTER_INTRA
+    if (filter_intra_mode_info->use_filter_intra_mode[plane != 0])
       need_bottom = 0;
-    } else if (mode != DC_PRED && mode != TM_PRED &&
-               xd->mi[0]->mbmi.sb_type >= BLOCK_8X8) {
-      need_bottom = p_angle > 180;
-    } else {
-      need_bottom = !!(extend_modes[mode] & NEED_BOTTOMLEFT);
-    }
+#endif  // CONFIG_FILTER_INTRA
+#if CONFIG_EXT_INTRA
+    if (is_dr_mode) need_bottom = p_angle > 180;
+#endif  // CONFIG_EXT_INTRA
 #else
     const int need_bottom = !!(extend_modes[mode] & NEED_BOTTOMLEFT);
-#endif  // CONFIG_EXT_INTRA
+#endif  // CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA
     i = 0;
     if (n_left_px > 0) {
       for (; i < n_left_px; i++) left_col[i] = ref[i * ref_stride - 1];
@@ -1248,19 +1288,18 @@
 
   // NEED_ABOVE
   if (need_above) {
-#if CONFIG_EXT_INTRA
-    int need_right;
-    if (ext_intra_mode_info->use_ext_intra_mode[plane != 0]) {
+#if CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA
+    int need_right = !!(extend_modes[mode] & NEED_ABOVERIGHT);
+#if CONFIG_FILTER_INTRA
+    if (filter_intra_mode_info->use_filter_intra_mode[plane != 0])
       need_right = 1;
-    } else if (mode != DC_PRED && mode != TM_PRED &&
-               xd->mi[0]->mbmi.sb_type >= BLOCK_8X8) {
-      need_right = p_angle < 90;
-    } else {
-      need_right = !!(extend_modes[mode] & NEED_ABOVERIGHT);
-    }
+#endif  // CONFIG_FILTER_INTRA
+#if CONFIG_EXT_INTRA
+    if (is_dr_mode) need_right = p_angle < 90;
+#endif  // CONFIG_EXT_INTRA
 #else
     const int need_right = !!(extend_modes[mode] & NEED_ABOVERIGHT);
-#endif  // CONFIG_EXT_INTRA
+#endif  // CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA
     if (n_top_px > 0) {
       memcpy(above_row, above_ref, n_top_px * sizeof(above_ref[0]));
       i = n_top_px;
@@ -1277,30 +1316,21 @@
     }
   }
 
-#if CONFIG_EXT_INTRA
-  if (ext_intra_mode_info->use_ext_intra_mode[plane != 0] ||
-      (extend_modes[mode] & NEED_ABOVELEFT) ||
-      (mode != DC_PRED && mode != TM_PRED &&
-       xd->mi[0]->mbmi.sb_type >= BLOCK_8X8)) {
+  if (need_above_left) {
     above_row[-1] =
         n_top_px > 0 ? (n_left_px > 0 ? above_ref[-1] : base + 1) : base - 1;
   }
-#else
-  if ((extend_modes[mode] & NEED_ABOVELEFT)) {
-    above_row[-1] =
-        n_top_px > 0 ? (n_left_px > 0 ? above_ref[-1] : base + 1) : base - 1;
-  }
-#endif  // CONFIG_EXT_INTRA
 
-#if CONFIG_EXT_INTRA
-  if (ext_intra_mode_info->use_ext_intra_mode[plane != 0]) {
-    highbd_filter_intra_predictors(ext_intra_mode, dst, dst_stride, bs,
+#if CONFIG_FILTER_INTRA
+  if (filter_intra_mode_info->use_filter_intra_mode[plane != 0]) {
+    highbd_filter_intra_predictors(filter_intra_mode, dst, dst_stride, bs,
                                    const_above_row, left_col, xd->bd);
     return;
   }
+#endif  // CONFIG_FILTER_INTRA
 
-  if (mode != DC_PRED && mode != TM_PRED &&
-      xd->mi[0]->mbmi.sb_type >= BLOCK_8X8) {
+#if CONFIG_EXT_INTRA
+  if (is_dr_mode) {
     INTRA_FILTER filter = INTRA_FILTER_LINEAR;
     if (plane == 0 && av1_is_intra_filter_switchable(p_angle))
       filter = xd->mi[0]->mbmi.intra_filter;
@@ -1336,37 +1366,42 @@
   const int bs = 4 * num_4x4_blocks_wide_txsize_lookup[tx_size];
   int need_left = extend_modes[mode] & NEED_LEFT;
   int need_above = extend_modes[mode] & NEED_ABOVE;
+  int need_above_left = extend_modes[mode] & NEED_ABOVELEFT;
 #if CONFIG_EXT_INTRA
-  const EXT_INTRA_MODE_INFO *ext_intra_mode_info =
-      &xd->mi[0]->mbmi.ext_intra_mode_info;
-  const EXT_INTRA_MODE ext_intra_mode =
-      ext_intra_mode_info->ext_intra_mode[plane != 0];
   int p_angle = 0;
+  const int is_dr_mode = mode != DC_PRED && mode != TM_PRED &&
+                         xd->mi[0]->mbmi.sb_type >= BLOCK_8X8;
+#endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+  const FILTER_INTRA_MODE_INFO *filter_intra_mode_info =
+      &xd->mi[0]->mbmi.filter_intra_mode_info;
+  const FILTER_INTRA_MODE filter_intra_mode =
+      filter_intra_mode_info->filter_intra_mode[plane != 0];
+#endif  // CONFIG_FILTER_INTRA
 
-  if (mode != DC_PRED && mode != TM_PRED &&
-      xd->mi[0]->mbmi.sb_type >= BLOCK_8X8) {
+// 127 127 127 .. 127 127 127 127 127 127
+// 129  A   B  ..  Y   Z
+// 129  C   D  ..  W   X
+// 129  E   F  ..  U   V
+// 129  G   H  ..  S   T   T   T   T   T
+// ..
+
+#if CONFIG_EXT_INTRA
+  if (is_dr_mode) {
     p_angle = mode_to_angle_map[mode] +
               xd->mi[0]->mbmi.angle_delta[plane != 0] * ANGLE_STEP;
     if (p_angle <= 90)
-      need_above = 1, need_left = 0;
+      need_above = 1, need_left = 0, need_above_left = 1;
     else if (p_angle < 180)
-      need_above = 1, need_left = 1;
+      need_above = 1, need_left = 1, need_above_left = 1;
     else
-      need_above = 0, need_left = 1;
-  }
-
-  if (ext_intra_mode_info->use_ext_intra_mode[plane != 0]) {
-    need_left = ext_intra_extend_modes[ext_intra_mode] & NEED_LEFT;
-    need_above = ext_intra_extend_modes[ext_intra_mode] & NEED_ABOVE;
+      need_above = 0, need_left = 1, need_above_left = 1;
   }
 #endif  // CONFIG_EXT_INTRA
-
-  // 127 127 127 .. 127 127 127 127 127 127
-  // 129  A   B  ..  Y   Z
-  // 129  C   D  ..  W   X
-  // 129  E   F  ..  U   V
-  // 129  G   H  ..  S   T   T   T   T   T
-  // ..
+#if CONFIG_FILTER_INTRA
+  if (filter_intra_mode_info->use_filter_intra_mode[plane != 0])
+    need_left = need_above = need_above_left = 1;
+#endif  // CONFIG_FILTER_INTRA
 
   (void)xd;
   (void)plane;
@@ -1386,19 +1421,18 @@
 
   // NEED_LEFT
   if (need_left) {
-#if CONFIG_EXT_INTRA
-    int need_bottom;
-    if (ext_intra_mode_info->use_ext_intra_mode[plane != 0]) {
+#if CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA
+    int need_bottom = !!(extend_modes[mode] & NEED_BOTTOMLEFT);
+#if CONFIG_FILTER_INTRA
+    if (filter_intra_mode_info->use_filter_intra_mode[plane != 0])
       need_bottom = 0;
-    } else if (mode != DC_PRED && mode != TM_PRED &&
-               xd->mi[0]->mbmi.sb_type >= BLOCK_8X8) {
-      need_bottom = p_angle > 180;
-    } else {
-      need_bottom = !!(extend_modes[mode] & NEED_BOTTOMLEFT);
-    }
+#endif  // CONFIG_FILTER_INTRA
+#if CONFIG_EXT_INTRA
+    if (is_dr_mode) need_bottom = p_angle > 180;
+#endif  // CONFIG_EXT_INTRA
 #else
     const int need_bottom = !!(extend_modes[mode] & NEED_BOTTOMLEFT);
-#endif  // CONFIG_EXT_INTRA
+#endif  // CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA
     i = 0;
     if (n_left_px > 0) {
       for (; i < n_left_px; i++) left_col[i] = ref[i * ref_stride - 1];
@@ -1416,19 +1450,18 @@
 
   // NEED_ABOVE
   if (need_above) {
-#if CONFIG_EXT_INTRA
-    int need_right;
-    if (ext_intra_mode_info->use_ext_intra_mode[plane != 0]) {
+#if CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA
+    int need_right = !!(extend_modes[mode] & NEED_ABOVERIGHT);
+#if CONFIG_FILTER_INTRA
+    if (filter_intra_mode_info->use_filter_intra_mode[plane != 0])
       need_right = 1;
-    } else if (mode != DC_PRED && mode != TM_PRED &&
-               xd->mi[0]->mbmi.sb_type >= BLOCK_8X8) {
-      need_right = p_angle < 90;
-    } else {
-      need_right = !!(extend_modes[mode] & NEED_ABOVERIGHT);
-    }
+#endif  // CONFIG_FILTER_INTRA
+#if CONFIG_EXT_INTRA
+    if (is_dr_mode) need_right = p_angle < 90;
+#endif  // CONFIG_EXT_INTRA
 #else
     const int need_right = !!(extend_modes[mode] & NEED_ABOVERIGHT);
-#endif  // CONFIG_EXT_INTRA
+#endif  // CONFIG_EXT_INTRA || CONFIG_FITLER_INTRA
     if (n_top_px > 0) {
       memcpy(above_row, above_ref, n_top_px);
       i = n_top_px;
@@ -1444,26 +1477,18 @@
     }
   }
 
-#if CONFIG_EXT_INTRA
-  if (ext_intra_mode_info->use_ext_intra_mode[plane != 0] ||
-      (extend_modes[mode] & NEED_ABOVELEFT) ||
-      (mode != DC_PRED && mode != TM_PRED &&
-       xd->mi[0]->mbmi.sb_type >= BLOCK_8X8)) {
+  if (need_above_left) {
     above_row[-1] = n_top_px > 0 ? (n_left_px > 0 ? above_ref[-1] : 129) : 127;
   }
-#else
-  if ((extend_modes[mode] & NEED_ABOVELEFT)) {
-    above_row[-1] = n_top_px > 0 ? (n_left_px > 0 ? above_ref[-1] : 129) : 127;
-  }
-#endif  // CONFIG_EXT_INTRA
 
-#if CONFIG_EXT_INTRA
-  if (ext_intra_mode_info->use_ext_intra_mode[plane != 0]) {
-    filter_intra_predictors(ext_intra_mode, dst, dst_stride, bs,
+#if CONFIG_FILTER_INTRA
+  if (filter_intra_mode_info->use_filter_intra_mode[plane != 0]) {
+    filter_intra_predictors(filter_intra_mode, dst, dst_stride, bs,
                             const_above_row, left_col);
     return;
   }
-
+#endif  // CONFIG_FILTER_INTRA
+#if CONFIG_EXT_INTRA
   if (mode != DC_PRED && mode != TM_PRED &&
       xd->mi[0]->mbmi.sb_type >= BLOCK_8X8) {
     INTRA_FILTER filter = INTRA_FILTER_LINEAR;
diff --git a/av1/common/reconintra.h b/av1/common/reconintra.h
index 5983a6c..7778874 100644
--- a/av1/common/reconintra.h
+++ b/av1/common/reconintra.h
@@ -25,9 +25,6 @@
                              TX_SIZE tx_size, PREDICTION_MODE mode,
                              const uint8_t *ref, int ref_stride, uint8_t *dst,
                              int dst_stride, int aoff, int loff, int plane);
-#if CONFIG_EXT_INTRA
-int av1_is_intra_filter_switchable(int angle);
-#endif  // CONFIG_EXT_INTRA
 
 #if CONFIG_EXT_INTER
 // Mapping of interintra to intra mode for use in the intra component
@@ -46,4 +43,9 @@
 }  // extern "C"
 #endif
 
+#if CONFIG_FILTER_INTRA
+#define FILTER_INTRA_PREC_BITS 10
+extern int av1_filter_intra_taps_4[TX_SIZES][INTRA_MODES][4];
+#endif  // CONFIG_FILTER_INTRA
+
 #endif  // AV1_COMMON_RECONINTRA_H_
diff --git a/av1/common/x86/reconintra_sse4.c b/av1/common/x86/filterintra_sse4.c
similarity index 96%
rename from av1/common/x86/reconintra_sse4.c
rename to av1/common/x86/filterintra_sse4.c
index ab1fa93..86b1c80 100644
--- a/av1/common/x86/reconintra_sse4.c
+++ b/av1/common/x86/filterintra_sse4.c
@@ -12,7 +12,7 @@
 #include "./av1_rtcd.h"
 #include "aom_ports/mem.h"
 #include "av1/common/enums.h"
-#include "av1/common/intra_filters.h"
+#include "av1/common/reconintra.h"
 
 static INLINE void AddPixelsSmall(const uint8_t *above, const uint8_t *left,
                                   __m128i *sum) {
@@ -153,25 +153,25 @@
       (bs == 32) ? TX_32X32
                  : ((bs == 16) ? TX_16X16 : ((bs == 8) ? TX_8X8 : (TX_4X4)));
   // c0
-  params[0] = _mm_set_epi32(filter_intra_taps_4[tx_size][mode][0],
-                            filter_intra_taps_4[tx_size][mode][0],
-                            filter_intra_taps_4[tx_size][mode][0],
-                            filter_intra_taps_4[tx_size][mode][0]);
+  params[0] = _mm_set_epi32(av1_filter_intra_taps_4[tx_size][mode][0],
+                            av1_filter_intra_taps_4[tx_size][mode][0],
+                            av1_filter_intra_taps_4[tx_size][mode][0],
+                            av1_filter_intra_taps_4[tx_size][mode][0]);
   // c1
-  params[1] = _mm_set_epi32(filter_intra_taps_4[tx_size][mode][1],
-                            filter_intra_taps_4[tx_size][mode][1],
-                            filter_intra_taps_4[tx_size][mode][1],
-                            filter_intra_taps_4[tx_size][mode][1]);
+  params[1] = _mm_set_epi32(av1_filter_intra_taps_4[tx_size][mode][1],
+                            av1_filter_intra_taps_4[tx_size][mode][1],
+                            av1_filter_intra_taps_4[tx_size][mode][1],
+                            av1_filter_intra_taps_4[tx_size][mode][1]);
   // c2
-  params[2] = _mm_set_epi32(filter_intra_taps_4[tx_size][mode][2],
-                            filter_intra_taps_4[tx_size][mode][2],
-                            filter_intra_taps_4[tx_size][mode][2],
-                            filter_intra_taps_4[tx_size][mode][2]);
+  params[2] = _mm_set_epi32(av1_filter_intra_taps_4[tx_size][mode][2],
+                            av1_filter_intra_taps_4[tx_size][mode][2],
+                            av1_filter_intra_taps_4[tx_size][mode][2],
+                            av1_filter_intra_taps_4[tx_size][mode][2]);
   // c3
-  params[3] = _mm_set_epi32(filter_intra_taps_4[tx_size][mode][3],
-                            filter_intra_taps_4[tx_size][mode][3],
-                            filter_intra_taps_4[tx_size][mode][3],
-                            filter_intra_taps_4[tx_size][mode][3]);
+  params[3] = _mm_set_epi32(av1_filter_intra_taps_4[tx_size][mode][3],
+                            av1_filter_intra_taps_4[tx_size][mode][3],
+                            av1_filter_intra_taps_4[tx_size][mode][3],
+                            av1_filter_intra_taps_4[tx_size][mode][3]);
 }
 
 static const int maxBlkSize = 32;
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index 790a008..0fbf659 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -1930,9 +1930,9 @@
   TX_SIZE tx_size;
   for (tx_size = TX_4X4; tx_size <= max_tx_size; ++tx_size)
     read_coef_probs_common(fc->coef_probs[tx_size], r);
-#if CONFIG_ANS
+#if CONFIG_RANS
   av1_coef_pareto_cdfs(fc);
-#endif  // CONFIG_ANS
+#endif  // CONFIG_RANS
 }
 
 static void setup_segmentation(AV1_COMMON *const cm,
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index ed2fc4c..4d181fd 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -27,7 +27,7 @@
 
 #define ACCT_STR __func__
 
-#if CONFIG_EXT_INTRA || CONFIG_PALETTE
+#if CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA || CONFIG_PALETTE
 static INLINE int read_uniform(aom_reader *r, int n) {
   int l = get_unsigned_bits(n);
   int m = (1 << l) - n;
@@ -40,7 +40,7 @@
   else
     return (v << 1) - m + aom_read_literal(r, 1, ACCT_STR);
 }
-#endif  // CONFIG_EXT_INTRA || CONFIG_PALETTE
+#endif  // CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA || CONFIG_PALETTE
 
 static PREDICTION_MODE read_intra_mode(aom_reader *r, const aom_prob *p) {
   return (PREDICTION_MODE)aom_read_tree(r, av1_intra_mode_tree, p, ACCT_STR);
@@ -545,46 +545,51 @@
 }
 #endif  // CONFIG_PALETTE
 
-#if CONFIG_EXT_INTRA
-static void read_ext_intra_mode_info(AV1_COMMON *const cm,
-                                     MACROBLOCKD *const xd, aom_reader *r) {
+#if CONFIG_FILTER_INTRA
+static void read_filter_intra_mode_info(AV1_COMMON *const cm,
+                                        MACROBLOCKD *const xd, aom_reader *r) {
   MODE_INFO *const mi = xd->mi[0];
   MB_MODE_INFO *const mbmi = &mi->mbmi;
   FRAME_COUNTS *counts = xd->counts;
+  FILTER_INTRA_MODE_INFO *filter_intra_mode_info =
+      &mbmi->filter_intra_mode_info;
 
-#if !ALLOW_FILTER_INTRA_MODES
-  return;
-#endif
   if (mbmi->mode == DC_PRED
 #if CONFIG_PALETTE
       && mbmi->palette_mode_info.palette_size[0] == 0
 #endif  // CONFIG_PALETTE
       ) {
-    mbmi->ext_intra_mode_info.use_ext_intra_mode[0] =
-        aom_read(r, cm->fc->ext_intra_probs[0], ACCT_STR);
-    if (mbmi->ext_intra_mode_info.use_ext_intra_mode[0]) {
-      mbmi->ext_intra_mode_info.ext_intra_mode[0] =
+    filter_intra_mode_info->use_filter_intra_mode[0] =
+        aom_read(r, cm->fc->filter_intra_probs[0], ACCT_STR);
+    if (filter_intra_mode_info->use_filter_intra_mode[0]) {
+      filter_intra_mode_info->filter_intra_mode[0] =
           read_uniform(r, FILTER_INTRA_MODES);
     }
-    if (counts)
-      ++counts->ext_intra[0][mbmi->ext_intra_mode_info.use_ext_intra_mode[0]];
+    if (counts) {
+      ++counts->filter_intra[0]
+                            [filter_intra_mode_info->use_filter_intra_mode[0]];
+    }
   }
   if (mbmi->uv_mode == DC_PRED
 #if CONFIG_PALETTE
       && mbmi->palette_mode_info.palette_size[1] == 0
 #endif  // CONFIG_PALETTE
       ) {
-    mbmi->ext_intra_mode_info.use_ext_intra_mode[1] =
-        aom_read(r, cm->fc->ext_intra_probs[1], ACCT_STR);
-    if (mbmi->ext_intra_mode_info.use_ext_intra_mode[1]) {
-      mbmi->ext_intra_mode_info.ext_intra_mode[1] =
+    filter_intra_mode_info->use_filter_intra_mode[1] =
+        aom_read(r, cm->fc->filter_intra_probs[1], ACCT_STR);
+    if (filter_intra_mode_info->use_filter_intra_mode[1]) {
+      filter_intra_mode_info->filter_intra_mode[1] =
           read_uniform(r, FILTER_INTRA_MODES);
     }
-    if (counts)
-      ++counts->ext_intra[1][mbmi->ext_intra_mode_info.use_ext_intra_mode[1]];
+    if (counts) {
+      ++counts->filter_intra[1]
+                            [filter_intra_mode_info->use_filter_intra_mode[1]];
+    }
   }
 }
+#endif  // CONFIG_FILTER_INTRA
 
+#if CONFIG_EXT_INTRA
 static void read_intra_angle_info(AV1_COMMON *const cm, MACROBLOCKD *const xd,
                                   aom_reader *r) {
   MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
@@ -682,11 +687,11 @@
   if (bsize >= BLOCK_8X8 && cm->allow_screen_content_tools)
     read_palette_mode_info(cm, xd, r);
 #endif  // CONFIG_PALETTE
-#if CONFIG_EXT_INTRA
-  mbmi->ext_intra_mode_info.use_ext_intra_mode[0] = 0;
-  mbmi->ext_intra_mode_info.use_ext_intra_mode[1] = 0;
-  if (bsize >= BLOCK_8X8) read_ext_intra_mode_info(cm, xd, r);
-#endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+  mbmi->filter_intra_mode_info.use_filter_intra_mode[0] = 0;
+  mbmi->filter_intra_mode_info.use_filter_intra_mode[1] = 0;
+  if (bsize >= BLOCK_8X8) read_filter_intra_mode_info(cm, xd, r);
+#endif  // CONFIG_FILTER_INTRA
 
   if (!FIXED_TX_TYPE) {
 #if CONFIG_EXT_TX
@@ -986,11 +991,11 @@
   if (bsize >= BLOCK_8X8 && cm->allow_screen_content_tools)
     read_palette_mode_info(cm, xd, r);
 #endif  // CONFIG_PALETTE
-#if CONFIG_EXT_INTRA
-  mbmi->ext_intra_mode_info.use_ext_intra_mode[0] = 0;
-  mbmi->ext_intra_mode_info.use_ext_intra_mode[1] = 0;
-  if (bsize >= BLOCK_8X8) read_ext_intra_mode_info(cm, xd, r);
-#endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+  mbmi->filter_intra_mode_info.use_filter_intra_mode[0] = 0;
+  mbmi->filter_intra_mode_info.use_filter_intra_mode[1] = 0;
+  if (bsize >= BLOCK_8X8) read_filter_intra_mode_info(cm, xd, r);
+#endif  // CONFIG_FILTER_INTRA
 }
 
 static INLINE int is_mv_valid(const MV *mv) {
@@ -1604,12 +1609,14 @@
       mbmi->ref_frame[1] = INTRA_FRAME;
       mbmi->interintra_mode = interintra_mode;
 #if CONFIG_EXT_INTRA
-      mbmi->ext_intra_mode_info.use_ext_intra_mode[0] = 0;
-      mbmi->ext_intra_mode_info.use_ext_intra_mode[1] = 0;
       mbmi->angle_delta[0] = 0;
       mbmi->angle_delta[1] = 0;
       mbmi->intra_filter = INTRA_FILTER_LINEAR;
 #endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+      mbmi->filter_intra_mode_info.use_filter_intra_mode[0] = 0;
+      mbmi->filter_intra_mode_info.use_filter_intra_mode[1] = 0;
+#endif  // CONFIG_FILTER_INTRA
       if (is_interintra_wedge_used(bsize)) {
         mbmi->use_wedge_interintra =
             aom_read(r, cm->fc->wedge_interintra_prob[bsize], ACCT_STR);
diff --git a/av1/decoder/detokenize.c b/av1/decoder/detokenize.c
index 1bd4c0d..7077788 100644
--- a/av1/decoder/detokenize.c
+++ b/av1/decoder/detokenize.c
@@ -76,11 +76,11 @@
   const aom_prob(*coef_probs)[COEFF_CONTEXTS][UNCONSTRAINED_NODES] =
       fc->coef_probs[tx_size_ctx][type][ref];
   const aom_prob *prob;
-#if CONFIG_ANS
+#if CONFIG_RANS
   const aom_cdf_prob(*const coef_cdfs)[COEFF_CONTEXTS][ENTROPY_TOKENS] =
       fc->coef_cdfs[tx_size_ctx][type][ref];
   const aom_cdf_prob(*cdf)[ENTROPY_TOKENS];
-#endif  // CONFIG_ANS
+#endif  // CONFIG_RANS
   unsigned int(*coef_counts)[COEFF_CONTEXTS][UNCONSTRAINED_NODES + 1];
   unsigned int(*eob_branch_count)[COEFF_CONTEXTS];
   uint8_t token_cache[MAX_TX_SQUARE];
@@ -166,7 +166,7 @@
       dqv_val = &dq_val[band][0];
 #endif  // CONFIG_NEW_QUANT
     }
-#if CONFIG_ANS
+#if CONFIG_RANS
     cdf = &coef_cdfs[band][ctx];
     token = ONE_TOKEN +
             aom_read_symbol(r, *cdf, CATEGORY6_TOKEN - ONE_TOKEN + 1, ACCT_STR);
@@ -263,7 +263,7 @@
         }
       }
     }
-#endif  // CONFIG_ANS
+#endif  // CONFIG_RANS
 #if CONFIG_NEW_QUANT
     v = av1_dequant_abscoeff_nuq(val, dqv, dqv_val);
     v = dq_shift ? ROUND_POWER_OF_TWO(v, dq_shift) : v;
@@ -368,13 +368,7 @@
 
 int av1_decode_block_tokens(MACROBLOCKD *const xd, int plane,
                             const SCAN_ORDER *sc, int x, int y, TX_SIZE tx_size,
-                            TX_TYPE tx_type,
-#if CONFIG_ANS
-                            struct AnsDecoder *const r,
-#else
-                            aom_reader *r,
-#endif  // CONFIG_ANS
-                            int seg_id) {
+                            TX_TYPE tx_type, aom_reader *r, int seg_id) {
   struct macroblockd_plane *const pd = &xd->plane[plane];
   const int16_t *const dequant = pd->seg_dequant[seg_id];
   const int ctx =
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 1de40fc..a4bd8d9 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -125,7 +125,7 @@
   { { 0, 1 }, { 2, 2 }, { 6, 3 }, { 7, 3 } },  // Max tx_size is 32X32
 };
 
-#if CONFIG_EXT_INTRA || CONFIG_PALETTE
+#if CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA || CONFIG_PALETTE
 static INLINE void write_uniform(aom_writer *w, int n, int v) {
   int l = get_unsigned_bits(n);
   int m = (1 << l) - n;
@@ -137,7 +137,7 @@
     aom_write_literal(w, (v - m) & 1, 1);
   }
 }
-#endif  // CONFIG_EXT_INTRA || CONFIG_PALETTE
+#endif  // CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA || CONFIG_PALETTE
 
 #if CONFIG_EXT_TX
 static struct av1_token ext_tx_inter_encodings[EXT_TX_SETS_INTER][TX_TYPES];
@@ -702,11 +702,11 @@
   while (p < stop && p->token != EOSB_TOKEN) {
     const int token = p->token;
     aom_tree_index index = 0;
-#if !CONFIG_ANS
+#if !CONFIG_RANS
     const struct av1_token *const coef_encoding = &av1_coef_encodings[token];
     int coef_value = coef_encoding->value;
     int coef_length = coef_encoding->len;
-#endif  // !CONFIG_ANS
+#endif  // !CONFIG_RANS
 #if CONFIG_AOM_HIGHBITDEPTH
     const av1_extra_bit *const extra_bits_av1 =
         (bit_depth == AOM_BITS_12)
@@ -718,7 +718,7 @@
     (void)bit_depth;
 #endif  // CONFIG_AOM_HIGHBITDEPTH
 
-#if CONFIG_ANS
+#if CONFIG_RANS
     /* skip one or two nodes */
     if (!p->skip_eob_node) aom_write(w, token != EOB_TOKEN, p->context_tree[0]);
 
@@ -751,7 +751,7 @@
         }
       }
     }
-#endif  // CONFIG_ANS
+#endif  // CONFIG_RANS
 
     if (extra_bits_av1->base_val) {
       const int extra_bits = p->extra;
@@ -931,22 +931,20 @@
   }
 }
 
-#if CONFIG_EXT_INTRA
-static void write_ext_intra_mode_info(const AV1_COMMON *const cm,
-                                      const MB_MODE_INFO *const mbmi,
-                                      aom_writer *w) {
-#if !ALLOW_FILTER_INTRA_MODES
-  return;
-#endif
+#if CONFIG_FILTER_INTRA
+static void write_filter_intra_mode_info(const AV1_COMMON *const cm,
+                                         const MB_MODE_INFO *const mbmi,
+                                         aom_writer *w) {
   if (mbmi->mode == DC_PRED
 #if CONFIG_PALETTE
       && mbmi->palette_mode_info.palette_size[0] == 0
 #endif  // CONFIG_PALETTE
       ) {
-    aom_write(w, mbmi->ext_intra_mode_info.use_ext_intra_mode[0],
-              cm->fc->ext_intra_probs[0]);
-    if (mbmi->ext_intra_mode_info.use_ext_intra_mode[0]) {
-      EXT_INTRA_MODE mode = mbmi->ext_intra_mode_info.ext_intra_mode[0];
+    aom_write(w, mbmi->filter_intra_mode_info.use_filter_intra_mode[0],
+              cm->fc->filter_intra_probs[0]);
+    if (mbmi->filter_intra_mode_info.use_filter_intra_mode[0]) {
+      const FILTER_INTRA_MODE mode =
+          mbmi->filter_intra_mode_info.filter_intra_mode[0];
       write_uniform(w, FILTER_INTRA_MODES, mode);
     }
   }
@@ -956,15 +954,18 @@
       && mbmi->palette_mode_info.palette_size[1] == 0
 #endif  // CONFIG_PALETTE
       ) {
-    aom_write(w, mbmi->ext_intra_mode_info.use_ext_intra_mode[1],
-              cm->fc->ext_intra_probs[1]);
-    if (mbmi->ext_intra_mode_info.use_ext_intra_mode[1]) {
-      EXT_INTRA_MODE mode = mbmi->ext_intra_mode_info.ext_intra_mode[1];
+    aom_write(w, mbmi->filter_intra_mode_info.use_filter_intra_mode[1],
+              cm->fc->filter_intra_probs[1]);
+    if (mbmi->filter_intra_mode_info.use_filter_intra_mode[1]) {
+      const FILTER_INTRA_MODE mode =
+          mbmi->filter_intra_mode_info.filter_intra_mode[1];
       write_uniform(w, FILTER_INTRA_MODES, mode);
     }
   }
 }
+#endif  // CONFIG_FILTER_INTRA
 
+#if CONFIG_EXT_INTRA
 static void write_intra_angle_info(const AV1_COMMON *cm, const MACROBLOCKD *xd,
                                    aom_writer *w) {
   const MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
@@ -1230,9 +1231,9 @@
     if (bsize >= BLOCK_8X8 && cm->allow_screen_content_tools)
       write_palette_mode_info(cm, xd, mi, w);
 #endif  // CONFIG_PALETTE
-#if CONFIG_EXT_INTRA
-    if (bsize >= BLOCK_8X8) write_ext_intra_mode_info(cm, mbmi, w);
-#endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+    if (bsize >= BLOCK_8X8) write_filter_intra_mode_info(cm, mbmi, w);
+#endif  // CONFIG_FILTER_INTRA
   } else {
     int16_t mode_ctx = mbmi_ext->mode_context[mbmi->ref_frame[0]];
     write_ref_frames(cm, xd, w);
@@ -1623,9 +1624,9 @@
   if (bsize >= BLOCK_8X8 && cm->allow_screen_content_tools)
     write_palette_mode_info(cm, xd, mi, w);
 #endif  // CONFIG_PALETTE
-#if CONFIG_EXT_INTRA
-  if (bsize >= BLOCK_8X8) write_ext_intra_mode_info(cm, mbmi, w);
-#endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+  if (bsize >= BLOCK_8X8) write_filter_intra_mode_info(cm, mbmi, w);
+#endif  // CONFIG_FILTER_INTRA
 
   if (!FIXED_TX_TYPE) {
 #if CONFIG_EXT_TX
@@ -1661,7 +1662,7 @@
 #define write_modes_b_wrapper(cpi, tile, w, tok, tok_end, supertx_enabled, \
                               mi_row, mi_col)                              \
   write_modes_b(cpi, tile, w, tok, tok_end, mi_row, mi_col)
-#endif  // CONFIG_ANS && CONFIG_SUPERTX
+#endif  // CONFIG_SUPERTX
 
 static void write_modes_b(AV1_COMP *cpi, const TileInfo *const tile,
                           aom_writer *w, const TOKENEXTRA **tok,
@@ -1675,11 +1676,11 @@
   MODE_INFO *m;
   int plane;
   int bh, bw;
-#if CONFIG_ANS
+#if CONFIG_RANS
   (void)tok;
   (void)tok_end;
   (void)plane;
-#endif  // !CONFIG_ANS
+#endif  // !CONFIG_RANS
 
   xd->mi = cm->mi_grid_visible + (mi_row * cm->mi_stride + mi_col);
   m = xd->mi[0];
@@ -1854,7 +1855,7 @@
 #define write_modes_sb_wrapper(cpi, tile, w, tok, tok_end, supertx_enabled, \
                                mi_row, mi_col, bsize)                       \
   write_modes_sb(cpi, tile, w, tok, tok_end, mi_row, mi_col, bsize)
-#endif  // CONFIG_ANS && CONFIG_SUPERTX
+#endif  // CONFIG_SUPERTX
 
 static void write_modes_sb(AV1_COMP *const cpi, const TileInfo *const tile,
                            aom_writer *const w, const TOKENEXTRA **tok,
@@ -2471,9 +2472,9 @@
   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;
-#if CONFIG_ANS
+#if CONFIG_RANS
   int update = 0;
-#endif  // CONFIG_ANS
+#endif  // CONFIG_RANS
 #if CONFIG_ENTROPY
   AV1_COMMON *cm = &cpi->common;
   SUBFRAME_STATS *subframe_stats = &cpi->subframe_stats;
@@ -2521,18 +2522,18 @@
 
         update_coef_probs_subframe(w, cpi, tx_size, cpi->branch_ct_buf,
                                    frame_coef_probs);
-#if CONFIG_ANS
+#if CONFIG_RANS
         update = 1;
-#endif  // CONFIG_ANS
+#endif  // CONFIG_RANS
       } else {
 #endif  // CONFIG_ENTROPY
         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);
-#if CONFIG_ANS
+#if CONFIG_RANS
         update = 1;
-#endif  // CONFIG_ANS
+#endif  // CONFIG_RANS
 #if CONFIG_ENTROPY
       }
 #endif  // CONFIG_ENTROPY
@@ -2557,9 +2558,9 @@
     av1_copy(cm->counts.eob_branch, eob_counts_copy);
   }
 #endif  // CONFIG_ENTROPY
-#if CONFIG_ANS
+#if CONFIG_RANS
   if (update) av1_coef_pareto_cdfs(cpi->common.fc);
-#endif  // CONFIG_ANS
+#endif  // CONFIG_RANS
 }
 
 #if CONFIG_LOOP_RESTORATION
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index 66de9c6..04d5282 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -5108,21 +5108,31 @@
       sum_intra_stats(td->counts, mi, xd->above_mi, xd->left_mi,
                       frame_is_intra_only(cm));
 
-#if CONFIG_EXT_INTRA
+    // TODO(huisu): move this into sum_intra_stats().
     if (!dry_run && bsize >= BLOCK_8X8) {
       FRAME_COUNTS *counts = td->counts;
+      (void)counts;
+#if CONFIG_FILTER_INTRA
       if (mbmi->mode == DC_PRED
 #if CONFIG_PALETTE
           && mbmi->palette_mode_info.palette_size[0] == 0
 #endif  // CONFIG_PALETTE
-          )
-        ++counts->ext_intra[0][mbmi->ext_intra_mode_info.use_ext_intra_mode[0]];
+          ) {
+        const int use_filter_intra_mode =
+            mbmi->filter_intra_mode_info.use_filter_intra_mode[0];
+        ++counts->filter_intra[0][use_filter_intra_mode];
+      }
       if (mbmi->uv_mode == DC_PRED
 #if CONFIG_PALETTE
           && mbmi->palette_mode_info.palette_size[1] == 0
 #endif  // CONFIG_PALETTE
-          )
-        ++counts->ext_intra[1][mbmi->ext_intra_mode_info.use_ext_intra_mode[1]];
+          ) {
+        const int use_filter_intra_mode =
+            mbmi->filter_intra_mode_info.use_filter_intra_mode[1];
+        ++counts->filter_intra[1][use_filter_intra_mode];
+      }
+#endif  // CONFIG_FILTER_INTRA
+#if CONFIG_EXT_INTRA
       if (mbmi->mode != DC_PRED && mbmi->mode != TM_PRED) {
         int p_angle;
         const int intra_filter_ctx = av1_get_pred_context_intra_interp(xd);
@@ -5131,8 +5141,8 @@
         if (av1_is_intra_filter_switchable(p_angle))
           ++counts->intra_filter[intra_filter_ctx][mbmi->intra_filter];
       }
-    }
 #endif  // CONFIG_EXT_INTRA
+    }
 
 #if CONFIG_PALETTE
     if (bsize >= BLOCK_8X8 && !dry_run) {
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 463570a..c987a5c 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -417,7 +417,7 @@
   { { INTRA_FRAME, NONE } },
 };
 
-#if CONFIG_EXT_INTRA || CONFIG_PALETTE
+#if CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA || CONFIG_PALETTE
 static INLINE int write_uniform_cost(int n, int v) {
   int l = get_unsigned_bits(n), m = (1 << l) - n;
   if (l == 0) return 0;
@@ -426,7 +426,7 @@
   else
     return l * av1_cost_bit(128, 0);
 }
-#endif  // CONFIG_EXT_INTRA || CONFIG_PALETTE
+#endif  // CONFIG_EXT_INTRA || CONFIG_FILTER_INTRA || CONFIG_PALETTE
 
 // constants for prune 1 and prune 2 decision boundaries
 #define FAST_EXT_TX_CORR_MID 0.0
@@ -1761,9 +1761,9 @@
 #endif  // CONFIG_AOM_HIGHBITDEPTH
     colors = av1_count_colors(src, src_stride, rows, cols);
   palette_mode_info->palette_size[0] = 0;
-#if CONFIG_EXT_INTRA
-  mic->mbmi.ext_intra_mode_info.use_ext_intra_mode[0] = 0;
-#endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+  mic->mbmi.filter_intra_mode_info.use_filter_intra_mode[0] = 0;
+#endif  // CONFIG_FILTER_INTRA
 
   if (colors > 1 && colors <= 64) {
     int r, c, i, j, k;
@@ -1813,9 +1813,9 @@
 #endif  // CONFIG_AOM_HIGHBITDEPTH
 
     mbmi->mode = DC_PRED;
-#if CONFIG_EXT_INTRA
-    mbmi->ext_intra_mode_info.use_ext_intra_mode[0] = 0;
-#endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+    mbmi->filter_intra_mode_info.use_filter_intra_mode[0] = 0;
+#endif  // CONFIG_FILTER_INTRA
 
     if (rows * cols > PALETTE_MAX_BLOCK_SIZE) return 0;
 
@@ -2173,9 +2173,11 @@
   const int *bmode_costs = cpi->mbmode_cost[0];
 
 #if CONFIG_EXT_INTRA
-  mic->mbmi.ext_intra_mode_info.use_ext_intra_mode[0] = 0;
   mic->mbmi.intra_filter = INTRA_FILTER_LINEAR;
 #endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+  mic->mbmi.filter_intra_mode_info.use_filter_intra_mode[0] = 0;
+#endif  // CONFIG_FILTER_INTRA
 
   // TODO(any): Add search of the tx_type to improve rd performance at the
   // expense of speed.
@@ -2247,26 +2249,26 @@
   return RDCOST(mb->rdmult, mb->rddiv, cost, total_distortion);
 }
 
-#if CONFIG_EXT_INTRA
-// Return 1 if an ext intra mode is selected; return 0 otherwise.
-static int rd_pick_ext_intra_sby(const AV1_COMP *const cpi, MACROBLOCK *x,
-                                 int *rate, int *rate_tokenonly,
-                                 int64_t *distortion, int *skippable,
-                                 BLOCK_SIZE bsize, int mode_cost,
-                                 int64_t *best_rd, uint16_t skip_mask) {
+#if CONFIG_FILTER_INTRA
+// Return 1 if an filter intra mode is selected; return 0 otherwise.
+static int rd_pick_filter_intra_sby(const AV1_COMP *const cpi, MACROBLOCK *x,
+                                    int *rate, int *rate_tokenonly,
+                                    int64_t *distortion, int *skippable,
+                                    BLOCK_SIZE bsize, int mode_cost,
+                                    int64_t *best_rd, uint16_t skip_mask) {
   MACROBLOCKD *const xd = &x->e_mbd;
   MODE_INFO *const mic = xd->mi[0];
   MB_MODE_INFO *mbmi = &mic->mbmi;
   int this_rate, this_rate_tokenonly, s;
-  int ext_intra_selected_flag = 0;
+  int filter_intra_selected_flag = 0;
   int64_t this_distortion, this_rd;
-  EXT_INTRA_MODE mode;
+  FILTER_INTRA_MODE mode;
   TX_SIZE best_tx_size = TX_4X4;
-  EXT_INTRA_MODE_INFO ext_intra_mode_info;
+  FILTER_INTRA_MODE_INFO filter_intra_mode_info;
   TX_TYPE best_tx_type;
 
-  av1_zero(ext_intra_mode_info);
-  mbmi->ext_intra_mode_info.use_ext_intra_mode[0] = 1;
+  av1_zero(filter_intra_mode_info);
+  mbmi->filter_intra_mode_info.use_filter_intra_mode[0] = 1;
   mbmi->mode = DC_PRED;
 #if CONFIG_PALETTE
   mbmi->palette_mode_info.palette_size[0] = 0;
@@ -2274,43 +2276,45 @@
 
   for (mode = 0; mode < FILTER_INTRA_MODES; ++mode) {
     if (skip_mask & (1 << mode)) continue;
-    mbmi->ext_intra_mode_info.ext_intra_mode[0] = mode;
+    mbmi->filter_intra_mode_info.filter_intra_mode[0] = mode;
     super_block_yrd(cpi, x, &this_rate_tokenonly, &this_distortion, &s, NULL,
                     bsize, *best_rd);
     if (this_rate_tokenonly == INT_MAX) continue;
 
     this_rate = this_rate_tokenonly +
-                av1_cost_bit(cpi->common.fc->ext_intra_probs[0], 1) +
+                av1_cost_bit(cpi->common.fc->filter_intra_probs[0], 1) +
                 write_uniform_cost(FILTER_INTRA_MODES, mode) + mode_cost;
     this_rd = RDCOST(x->rdmult, x->rddiv, this_rate, this_distortion);
 
     if (this_rd < *best_rd) {
       *best_rd = this_rd;
       best_tx_size = mic->mbmi.tx_size;
-      ext_intra_mode_info = mbmi->ext_intra_mode_info;
+      filter_intra_mode_info = mbmi->filter_intra_mode_info;
       best_tx_type = mic->mbmi.tx_type;
       *rate = this_rate;
       *rate_tokenonly = this_rate_tokenonly;
       *distortion = this_distortion;
       *skippable = s;
-      ext_intra_selected_flag = 1;
+      filter_intra_selected_flag = 1;
     }
   }
 
-  if (ext_intra_selected_flag) {
+  if (filter_intra_selected_flag) {
     mbmi->mode = DC_PRED;
     mbmi->tx_size = best_tx_size;
-    mbmi->ext_intra_mode_info.use_ext_intra_mode[0] =
-        ext_intra_mode_info.use_ext_intra_mode[0];
-    mbmi->ext_intra_mode_info.ext_intra_mode[0] =
-        ext_intra_mode_info.ext_intra_mode[0];
+    mbmi->filter_intra_mode_info.use_filter_intra_mode[0] =
+        filter_intra_mode_info.use_filter_intra_mode[0];
+    mbmi->filter_intra_mode_info.filter_intra_mode[0] =
+        filter_intra_mode_info.filter_intra_mode[0];
     mbmi->tx_type = best_tx_type;
     return 1;
   } else {
     return 0;
   }
 }
+#endif  // CONFIG_FILTER_INTRA
 
+#if CONFIG_EXT_INTRA
 static void pick_intra_angle_routine_sby(
     const AV1_COMP *const cpi, MACROBLOCK *x, int *rate, int *rate_tokenonly,
     int64_t *distortion, int *skippable, int *best_angle_delta,
@@ -2620,15 +2624,17 @@
 #endif  // CONFIG_EXT_INTRA || CONFIG_PALETTE
 #if CONFIG_EXT_INTRA
   const int intra_filter_ctx = av1_get_pred_context_intra_interp(xd);
-  EXT_INTRA_MODE_INFO ext_intra_mode_info;
   int is_directional_mode, rate_overhead, best_angle_delta = 0;
   INTRA_FILTER best_filter = INTRA_FILTER_LINEAR;
   uint8_t directional_mode_skip_mask[INTRA_MODES];
-  uint16_t filter_intra_mode_skip_mask = (1 << FILTER_INTRA_MODES) - 1;
   const int src_stride = x->plane[0].src.stride;
   const uint8_t *src = x->plane[0].src.buf;
-  int beat_best_rd = 0;
 #endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+  int beat_best_rd = 0;
+  FILTER_INTRA_MODE_INFO filter_intra_mode_info;
+  uint16_t filter_intra_mode_skip_mask = (1 << FILTER_INTRA_MODES) - 1;
+#endif  // CONFIG_FILTER_INTRA
   TX_TYPE best_tx_type = DCT_DCT;
   const int *bmode_costs;
 #if CONFIG_PALETTE
@@ -2649,8 +2655,6 @@
   bmode_costs = cpi->y_mode_costs[A][L];
 
 #if CONFIG_EXT_INTRA
-  ext_intra_mode_info.use_ext_intra_mode[0] = 0;
-  mic->mbmi.ext_intra_mode_info.use_ext_intra_mode[0] = 0;
   mic->mbmi.angle_delta[0] = 0;
   memset(directional_mode_skip_mask, 0,
          sizeof(directional_mode_skip_mask[0]) * INTRA_MODES);
@@ -2662,6 +2666,10 @@
 #endif
     angle_estimation(src, src_stride, rows, cols, directional_mode_skip_mask);
 #endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+  filter_intra_mode_info.use_filter_intra_mode[0] = 0;
+  mic->mbmi.filter_intra_mode_info.use_filter_intra_mode[0] = 0;
+#endif  // CONFIG_FILTER_INTRA
 #if CONFIG_PALETTE
   palette_mode_info.palette_size[0] = 0;
   pmi->palette_size[0] = 0;
@@ -2725,9 +2733,11 @@
       this_rate += av1_cost_bit(
           av1_default_palette_y_mode_prob[bsize - BLOCK_8X8][palette_ctx], 0);
 #endif  // CONFIG_PALETTE
+#if CONFIG_FILTER_INTRA
+    if (mic->mbmi.mode == DC_PRED)
+      this_rate += av1_cost_bit(cpi->common.fc->filter_intra_probs[0], 0);
+#endif  // CONFIG_FILTER_INTRA
 #if CONFIG_EXT_INTRA
-    if (mic->mbmi.mode == DC_PRED && ALLOW_FILTER_INTRA_MODES)
-      this_rate += av1_cost_bit(cpi->common.fc->ext_intra_probs[0], 0);
     if (is_directional_mode) {
       int p_angle;
       this_rate +=
@@ -2741,11 +2751,11 @@
     }
 #endif  // CONFIG_EXT_INTRA
     this_rd = RDCOST(x->rdmult, x->rddiv, this_rate, this_distortion);
-#if CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
     if (best_rd == INT64_MAX || this_rd - best_rd < (best_rd >> 4)) {
       filter_intra_mode_skip_mask ^= (1 << mic->mbmi.mode);
     }
-#endif  // CONFIG_EXT_INTRA
+#endif  // CONFIG_FILTER_INTRA
 
     if (this_rd < best_rd) {
       mode_selected = mic->mbmi.mode;
@@ -2754,8 +2764,10 @@
 #if CONFIG_EXT_INTRA
       best_angle_delta = mic->mbmi.angle_delta[0];
       best_filter = mic->mbmi.intra_filter;
-      beat_best_rd = 1;
 #endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+      beat_best_rd = 1;
+#endif  // CONFIG_FILTER_INTRA
       best_tx_type = mic->mbmi.tx_type;
       *rate = this_rate;
       *rate_tokenonly = this_rate_tokenonly;
@@ -2772,28 +2784,28 @@
                               &best_rd);
 #endif  // CONFIG_PALETTE
 
-#if CONFIG_EXT_INTRA
-  if (ALLOW_FILTER_INTRA_MODES && beat_best_rd) {
-    if (rd_pick_ext_intra_sby(cpi, x, rate, rate_tokenonly, distortion,
-                              skippable, bsize, bmode_costs[DC_PRED], &best_rd,
-                              filter_intra_mode_skip_mask)) {
+#if CONFIG_FILTER_INTRA
+  if (beat_best_rd) {
+    if (rd_pick_filter_intra_sby(cpi, x, rate, rate_tokenonly, distortion,
+                                 skippable, bsize, bmode_costs[DC_PRED],
+                                 &best_rd, filter_intra_mode_skip_mask)) {
       mode_selected = mic->mbmi.mode;
       best_tx = mic->mbmi.tx_size;
-      ext_intra_mode_info = mic->mbmi.ext_intra_mode_info;
+      filter_intra_mode_info = mic->mbmi.filter_intra_mode_info;
       best_tx_type = mic->mbmi.tx_type;
     }
   }
 
-  mic->mbmi.ext_intra_mode_info.use_ext_intra_mode[0] =
-      ext_intra_mode_info.use_ext_intra_mode[0];
-  if (ext_intra_mode_info.use_ext_intra_mode[0]) {
-    mic->mbmi.ext_intra_mode_info.ext_intra_mode[0] =
-        ext_intra_mode_info.ext_intra_mode[0];
+  mic->mbmi.filter_intra_mode_info.use_filter_intra_mode[0] =
+      filter_intra_mode_info.use_filter_intra_mode[0];
+  if (filter_intra_mode_info.use_filter_intra_mode[0]) {
+    mic->mbmi.filter_intra_mode_info.filter_intra_mode[0] =
+        filter_intra_mode_info.filter_intra_mode[0];
 #if CONFIG_PALETTE
     palette_mode_info.palette_size[0] = 0;
 #endif  // CONFIG_PALETTE
   }
-#endif  // CONFIG_EXT_INTRA
+#endif  // CONFIG_FILTER_INTRA
 
   mic->mbmi.mode = mode_selected;
   mic->mbmi.tx_size = best_tx;
@@ -3615,9 +3627,9 @@
 
   if (rows * cols > PALETTE_MAX_BLOCK_SIZE) return;
 
-#if CONFIG_EXT_INTRA
-  mbmi->ext_intra_mode_info.use_ext_intra_mode[1] = 0;
-#endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+  mbmi->filter_intra_mode_info.use_filter_intra_mode[1] = 0;
+#endif  // CONFIG_FILTER_INTRA
 
 #if CONFIG_AOM_HIGHBITDEPTH
   if (cpi->common.use_highbitdepth) {
@@ -3666,9 +3678,9 @@
 #endif  // CONFIG_AOM_HIGHBITDEPTH
 
     mbmi->uv_mode = DC_PRED;
-#if CONFIG_EXT_INTRA
-    mbmi->ext_intra_mode_info.use_ext_intra_mode[1] = 0;
-#endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+    mbmi->filter_intra_mode_info.use_filter_intra_mode[1] = 0;
+#endif  // CONFIG_FILTER_INTRA
     for (r = 0; r < rows; ++r) {
       for (c = 0; c < cols; ++c) {
 #if CONFIG_AOM_HIGHBITDEPTH
@@ -3760,35 +3772,35 @@
 }
 #endif  // CONFIG_PALETTE
 
-#if CONFIG_EXT_INTRA
-// Return 1 if an ext intra mode is selected; return 0 otherwise.
-static int rd_pick_ext_intra_sbuv(const AV1_COMP *const cpi, MACROBLOCK *x,
-                                  int *rate, int *rate_tokenonly,
-                                  int64_t *distortion, int *skippable,
-                                  BLOCK_SIZE bsize, int64_t *best_rd) {
+#if CONFIG_FILTER_INTRA
+// Return 1 if an filter intra mode is selected; return 0 otherwise.
+static int rd_pick_filter_intra_sbuv(const AV1_COMP *const cpi, MACROBLOCK *x,
+                                     int *rate, int *rate_tokenonly,
+                                     int64_t *distortion, int *skippable,
+                                     BLOCK_SIZE bsize, int64_t *best_rd) {
   MACROBLOCKD *const xd = &x->e_mbd;
   MB_MODE_INFO *mbmi = &xd->mi[0]->mbmi;
-  int ext_intra_selected_flag = 0;
+  int filter_intra_selected_flag = 0;
   int this_rate_tokenonly, this_rate, s;
   int64_t this_distortion, this_sse, this_rd;
-  EXT_INTRA_MODE mode;
-  EXT_INTRA_MODE_INFO ext_intra_mode_info;
+  FILTER_INTRA_MODE mode;
+  FILTER_INTRA_MODE_INFO filter_intra_mode_info;
 
-  av1_zero(ext_intra_mode_info);
-  mbmi->ext_intra_mode_info.use_ext_intra_mode[1] = 1;
+  av1_zero(filter_intra_mode_info);
+  mbmi->filter_intra_mode_info.use_filter_intra_mode[1] = 1;
   mbmi->uv_mode = DC_PRED;
 #if CONFIG_PALETTE
   mbmi->palette_mode_info.palette_size[1] = 0;
 #endif  // CONFIG_PALETTE
 
   for (mode = 0; mode < FILTER_INTRA_MODES; ++mode) {
-    mbmi->ext_intra_mode_info.ext_intra_mode[1] = mode;
+    mbmi->filter_intra_mode_info.filter_intra_mode[1] = mode;
     if (!super_block_uvrd(cpi, x, &this_rate_tokenonly, &this_distortion, &s,
                           &this_sse, bsize, *best_rd))
       continue;
 
     this_rate = this_rate_tokenonly +
-                av1_cost_bit(cpi->common.fc->ext_intra_probs[1], 1) +
+                av1_cost_bit(cpi->common.fc->filter_intra_probs[1], 1) +
                 cpi->intra_uv_mode_cost[mbmi->mode][mbmi->uv_mode] +
                 write_uniform_cost(FILTER_INTRA_MODES, mode);
     this_rd = RDCOST(x->rdmult, x->rddiv, this_rate, this_distortion);
@@ -3798,23 +3810,25 @@
       *rate_tokenonly = this_rate_tokenonly;
       *distortion = this_distortion;
       *skippable = s;
-      ext_intra_mode_info = mbmi->ext_intra_mode_info;
-      ext_intra_selected_flag = 1;
+      filter_intra_mode_info = mbmi->filter_intra_mode_info;
+      filter_intra_selected_flag = 1;
     }
   }
 
-  if (ext_intra_selected_flag) {
+  if (filter_intra_selected_flag) {
     mbmi->uv_mode = DC_PRED;
-    mbmi->ext_intra_mode_info.use_ext_intra_mode[1] =
-        ext_intra_mode_info.use_ext_intra_mode[1];
-    mbmi->ext_intra_mode_info.ext_intra_mode[1] =
-        ext_intra_mode_info.ext_intra_mode[1];
+    mbmi->filter_intra_mode_info.use_filter_intra_mode[1] =
+        filter_intra_mode_info.use_filter_intra_mode[1];
+    mbmi->filter_intra_mode_info.filter_intra_mode[1] =
+        filter_intra_mode_info.filter_intra_mode[1];
     return 1;
   } else {
     return 0;
   }
 }
+#endif  // CONFIG_FILTER_INTRA
 
+#if CONFIG_EXT_INTRA
 static void pick_intra_angle_routine_sbuv(
     const AV1_COMP *const cpi, MACROBLOCK *x, int *rate, int *rate_tokenonly,
     int64_t *distortion, int *skippable, int *best_angle_delta,
@@ -3932,11 +3946,13 @@
 #endif  // CONFIG_PALETTE
 #if CONFIG_EXT_INTRA
   int is_directional_mode, rate_overhead, best_angle_delta = 0;
-  EXT_INTRA_MODE_INFO ext_intra_mode_info;
-
-  ext_intra_mode_info.use_ext_intra_mode[1] = 0;
-  mbmi->ext_intra_mode_info.use_ext_intra_mode[1] = 0;
 #endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+  FILTER_INTRA_MODE_INFO filter_intra_mode_info;
+
+  filter_intra_mode_info.use_filter_intra_mode[1] = 0;
+  mbmi->filter_intra_mode_info.use_filter_intra_mode[1] = 0;
+#endif  // CONFIG_FILTER_INTRA
 #if CONFIG_PALETTE
   palette_mode_info.palette_size[1] = 0;
   pmi->palette_size[1] = 0;
@@ -3964,15 +3980,16 @@
     if (mbmi->sb_type >= BLOCK_8X8 && is_directional_mode)
       this_rate += write_uniform_cost(2 * MAX_ANGLE_DELTAS + 1,
                                       MAX_ANGLE_DELTAS + mbmi->angle_delta[1]);
-    if (mbmi->sb_type >= BLOCK_8X8 && mode == DC_PRED &&
-        ALLOW_FILTER_INTRA_MODES)
-      this_rate += av1_cost_bit(cpi->common.fc->ext_intra_probs[1], 0);
 #else
     if (!super_block_uvrd(cpi, x, &this_rate_tokenonly, &this_distortion, &s,
                           &this_sse, bsize, best_rd))
       continue;
     this_rate = this_rate_tokenonly + cpi->intra_uv_mode_cost[mbmi->mode][mode];
 #endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+    if (mbmi->sb_type >= BLOCK_8X8 && mode == DC_PRED)
+      this_rate += av1_cost_bit(cpi->common.fc->filter_intra_probs[1], 0);
+#endif  // CONFIG_FILTER_INTRA
 #if CONFIG_PALETTE
     if (cpi->common.allow_screen_content_tools && mbmi->sb_type >= BLOCK_8X8 &&
         mode == DC_PRED)
@@ -4005,24 +4022,27 @@
   }
 #endif  // CONFIG_PALETTE
 
-#if CONFIG_EXT_INTRA
-  if (mbmi->sb_type >= BLOCK_8X8 && ALLOW_FILTER_INTRA_MODES) {
-    if (rd_pick_ext_intra_sbuv(cpi, x, rate, rate_tokenonly, distortion,
-                               skippable, bsize, &best_rd)) {
+#if CONFIG_FILTER_INTRA
+  if (mbmi->sb_type >= BLOCK_8X8) {
+    if (rd_pick_filter_intra_sbuv(cpi, x, rate, rate_tokenonly, distortion,
+                                  skippable, bsize, &best_rd)) {
       mode_selected = mbmi->uv_mode;
-      ext_intra_mode_info = mbmi->ext_intra_mode_info;
+      filter_intra_mode_info = mbmi->filter_intra_mode_info;
     }
   }
 
-  mbmi->ext_intra_mode_info.use_ext_intra_mode[1] =
-      ext_intra_mode_info.use_ext_intra_mode[1];
-  if (ext_intra_mode_info.use_ext_intra_mode[1]) {
-    mbmi->ext_intra_mode_info.ext_intra_mode[1] =
-        ext_intra_mode_info.ext_intra_mode[1];
+  mbmi->filter_intra_mode_info.use_filter_intra_mode[1] =
+      filter_intra_mode_info.use_filter_intra_mode[1];
+  if (filter_intra_mode_info.use_filter_intra_mode[1]) {
+    mbmi->filter_intra_mode_info.filter_intra_mode[1] =
+        filter_intra_mode_info.filter_intra_mode[1];
 #if CONFIG_PALETTE
     palette_mode_info.palette_size[1] = 0;
 #endif  // CONFIG_PALETTE
   }
+#endif  // CONFIG_FILTER_INTRA
+
+#if CONFIG_EXT_INTRA
   mbmi->angle_delta[1] = best_angle_delta;
 #endif  // CONFIG_EXT_INTRA
   mbmi->uv_mode = mode_selected;
@@ -7929,12 +7949,15 @@
 }
 #endif  // CONFIG_PALETTE
 
-#if CONFIG_EXT_INTRA
-static void pick_ext_intra_interframe(
-    const AV1_COMP *const cpi, MACROBLOCK *x, PICK_MODE_CONTEXT *ctx,
+#if CONFIG_FILTER_INTRA
+static void pick_filter_intra_interframe(
+    const AV1_COMP *cpi, MACROBLOCK *x, PICK_MODE_CONTEXT *ctx,
     BLOCK_SIZE bsize, int *rate_uv_intra, int *rate_uv_tokenonly,
     int64_t *dist_uv, int *skip_uv, PREDICTION_MODE *mode_uv,
-    EXT_INTRA_MODE_INFO *ext_intra_mode_info_uv, int8_t *uv_angle_delta,
+    FILTER_INTRA_MODE_INFO *filter_intra_mode_info_uv,
+#if CONFIG_EXT_INTRA
+    int8_t *uv_angle_delta,
+#endif  // CONFIG_EXT_INTRA
 #if CONFIG_PALETTE
     PALETTE_MODE_INFO *pmi_uv, int palette_ctx,
 #endif  // CONFIG_PALETTE
@@ -7971,10 +7994,11 @@
   mbmi->uv_mode = DC_PRED;
   mbmi->ref_frame[0] = INTRA_FRAME;
   mbmi->ref_frame[1] = NONE;
-  if (!rd_pick_ext_intra_sby(cpi, x, &rate_dummy, &rate_y, &distortion_y,
-                             &skippable, bsize, intra_mode_cost[mbmi->mode],
-                             &this_rd, 0))
+  if (!rd_pick_filter_intra_sby(cpi, x, &rate_dummy, &rate_y, &distortion_y,
+                                &skippable, bsize, intra_mode_cost[mbmi->mode],
+                                &this_rd, 0)) {
     return;
+  }
   if (rate_y == INT_MAX) return;
 
   uv_tx = uv_txsize_lookup[bsize][mbmi->tx_size][xd->plane[1].subsampling_x]
@@ -7986,8 +8010,10 @@
 #if CONFIG_PALETTE
     if (cm->allow_screen_content_tools) pmi_uv[uv_tx] = *pmi;
 #endif  // CONFIG_PALETTE
-    ext_intra_mode_info_uv[uv_tx] = mbmi->ext_intra_mode_info;
+    filter_intra_mode_info_uv[uv_tx] = mbmi->filter_intra_mode_info;
+#if CONFIG_EXT_INTRA
     uv_angle_delta[uv_tx] = mbmi->angle_delta[1];
+#endif  // CONFIG_EXT_INTRA
   }
 
   rate_uv = rate_uv_tokenonly[uv_tx];
@@ -8002,12 +8028,14 @@
            2 * PALETTE_MAX_SIZE * sizeof(pmi->palette_colors[0]));
   }
 #endif  // CONFIG_PALETTE
+#if CONFIG_EXT_INTRA
   mbmi->angle_delta[1] = uv_angle_delta[uv_tx];
-  mbmi->ext_intra_mode_info.use_ext_intra_mode[1] =
-      ext_intra_mode_info_uv[uv_tx].use_ext_intra_mode[1];
-  if (ext_intra_mode_info_uv[uv_tx].use_ext_intra_mode[1]) {
-    mbmi->ext_intra_mode_info.ext_intra_mode[1] =
-        ext_intra_mode_info_uv[uv_tx].ext_intra_mode[1];
+#endif  // CONFIG_EXT_INTRA
+  mbmi->filter_intra_mode_info.use_filter_intra_mode[1] =
+      filter_intra_mode_info_uv[uv_tx].use_filter_intra_mode[1];
+  if (filter_intra_mode_info_uv[uv_tx].use_filter_intra_mode[1]) {
+    mbmi->filter_intra_mode_info.filter_intra_mode[1] =
+        filter_intra_mode_info_uv[uv_tx].filter_intra_mode[1];
   }
 
   rate2 = rate_y + intra_mode_cost[mbmi->mode] + rate_uv +
@@ -8027,20 +8055,24 @@
                                [mbmi->tx_size];
   }
 
-  rate2 += av1_cost_bit(cm->fc->ext_intra_probs[0],
-                        mbmi->ext_intra_mode_info.use_ext_intra_mode[0]);
-  rate2 += write_uniform_cost(FILTER_INTRA_MODES,
-                              mbmi->ext_intra_mode_info.ext_intra_mode[0]);
+  rate2 += av1_cost_bit(cm->fc->filter_intra_probs[0],
+                        mbmi->filter_intra_mode_info.use_filter_intra_mode[0]);
+  rate2 += write_uniform_cost(
+      FILTER_INTRA_MODES, mbmi->filter_intra_mode_info.filter_intra_mode[0]);
+#if CONFIG_EXT_INTRA
   if (mbmi->uv_mode != DC_PRED && mbmi->uv_mode != TM_PRED) {
     rate2 += write_uniform_cost(2 * MAX_ANGLE_DELTAS + 1,
                                 MAX_ANGLE_DELTAS + mbmi->angle_delta[1]);
   }
+#endif  // CONFIG_EXT_INTRA
   if (mbmi->mode == DC_PRED) {
-    rate2 += av1_cost_bit(cpi->common.fc->ext_intra_probs[1],
-                          mbmi->ext_intra_mode_info.use_ext_intra_mode[1]);
-    if (mbmi->ext_intra_mode_info.use_ext_intra_mode[1])
-      rate2 += write_uniform_cost(FILTER_INTRA_MODES,
-                                  mbmi->ext_intra_mode_info.ext_intra_mode[1]);
+    rate2 +=
+        av1_cost_bit(cpi->common.fc->filter_intra_probs[1],
+                     mbmi->filter_intra_mode_info.use_filter_intra_mode[1]);
+    if (mbmi->filter_intra_mode_info.use_filter_intra_mode[1])
+      rate2 +=
+          write_uniform_cost(FILTER_INTRA_MODES,
+                             mbmi->filter_intra_mode_info.filter_intra_mode[1]);
   }
   distortion2 = distortion_y + distortion_uv;
   av1_encode_intra_block_plane(x, bsize, 0, 0);
@@ -8097,7 +8129,7 @@
     *best_mode_skippable = skippable;
   }
 }
-#endif  // CONFIG_EXT_INTRA
+#endif  // CONFIG_FILTER_INTRA
 
 #if CONFIG_MOTION_VAR
 static void calc_target_weighted_pred(const AV1_COMMON *cm, const MACROBLOCK *x,
@@ -8178,12 +8210,15 @@
   PALETTE_MODE_INFO pmi_uv[TX_SIZES];
 #endif  // CONFIG_PALETTE
 #if CONFIG_EXT_INTRA
-  EXT_INTRA_MODE_INFO ext_intra_mode_info_uv[TX_SIZES];
-  int8_t uv_angle_delta[TX_SIZES], dc_skipped = 1;
+  int8_t uv_angle_delta[TX_SIZES];
   int is_directional_mode, angle_stats_ready = 0;
   int rate_overhead, rate_dummy;
   uint8_t directional_mode_skip_mask[INTRA_MODES];
 #endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+  int8_t dc_skipped = 1;
+  FILTER_INTRA_MODE_INFO filter_intra_mode_info_uv[TX_SIZES];
+#endif  // CONFIG_FILTER_INTRA
   const int intra_cost_penalty = av1_get_intra_cost_penalty(
       cm->base_qindex, cm->y_dc_delta_q, cm->bit_depth);
   const int *const intra_mode_cost = cpi->mbmode_cost[size_group_lookup[bsize]];
@@ -8644,10 +8679,10 @@
     pmi->palette_size[0] = 0;
     pmi->palette_size[1] = 0;
 #endif  // CONFIG_PALETTE
-#if CONFIG_EXT_INTRA
-    mbmi->ext_intra_mode_info.use_ext_intra_mode[0] = 0;
-    mbmi->ext_intra_mode_info.use_ext_intra_mode[1] = 0;
-#endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+    mbmi->filter_intra_mode_info.use_filter_intra_mode[0] = 0;
+    mbmi->filter_intra_mode_info.use_filter_intra_mode[1] = 0;
+#endif  // CONFIG_FILTER_INTRA
         // Evaluate all sub-pel filters irrespective of whether we can use
         // them for this frame.
 #if CONFIG_DUAL_FILTER
@@ -8714,9 +8749,9 @@
 
       if (rate_y == INT_MAX) continue;
 
-#if CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
       if (mbmi->mode == DC_PRED) dc_skipped = 0;
-#endif  // CONFIG_EXT_INTRA
+#endif  // CONFIG_FILTER_INTRA
 
       uv_tx = uv_txsize_lookup[bsize][mbmi->tx_size][pd->subsampling_x]
                               [pd->subsampling_y];
@@ -8729,9 +8764,11 @@
 #endif  // CONFIG_PALETTE
 
 #if CONFIG_EXT_INTRA
-        ext_intra_mode_info_uv[uv_tx] = mbmi->ext_intra_mode_info;
         uv_angle_delta[uv_tx] = mbmi->angle_delta[1];
 #endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+        filter_intra_mode_info_uv[uv_tx] = mbmi->filter_intra_mode_info;
+#endif  // CONFIG_FILTER_INTRA
       }
 
       rate_uv = rate_uv_tokenonly[uv_tx];
@@ -8749,13 +8786,15 @@
 
 #if CONFIG_EXT_INTRA
       mbmi->angle_delta[1] = uv_angle_delta[uv_tx];
-      mbmi->ext_intra_mode_info.use_ext_intra_mode[1] =
-          ext_intra_mode_info_uv[uv_tx].use_ext_intra_mode[1];
-      if (ext_intra_mode_info_uv[uv_tx].use_ext_intra_mode[1]) {
-        mbmi->ext_intra_mode_info.ext_intra_mode[1] =
-            ext_intra_mode_info_uv[uv_tx].ext_intra_mode[1];
-      }
 #endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+      mbmi->filter_intra_mode_info.use_filter_intra_mode[1] =
+          filter_intra_mode_info_uv[uv_tx].use_filter_intra_mode[1];
+      if (filter_intra_mode_info_uv[uv_tx].use_filter_intra_mode[1]) {
+        mbmi->filter_intra_mode_info.filter_intra_mode[1] =
+            filter_intra_mode_info_uv[uv_tx].filter_intra_mode[1];
+      }
+#endif  // CONFIG_FILTER_INTRA
 
       rate2 = rate_y + intra_mode_cost[mbmi->mode] + rate_uv +
               cpi->intra_uv_mode_cost[mbmi->mode][mbmi->uv_mode];
@@ -8784,29 +8823,32 @@
         if (av1_is_intra_filter_switchable(p_angle))
           rate2 += cpi->intra_filter_cost[intra_filter_ctx][mbmi->intra_filter];
       }
-
-      if (mbmi->mode == DC_PRED && ALLOW_FILTER_INTRA_MODES) {
-        rate2 += av1_cost_bit(cm->fc->ext_intra_probs[0],
-                              mbmi->ext_intra_mode_info.use_ext_intra_mode[0]);
-        if (mbmi->ext_intra_mode_info.use_ext_intra_mode[0]) {
-          rate2 += write_uniform_cost(
-              FILTER_INTRA_MODES, mbmi->ext_intra_mode_info.ext_intra_mode[0]);
-        }
-      }
-
       if (mbmi->uv_mode != DC_PRED && mbmi->uv_mode != TM_PRED) {
         rate2 += write_uniform_cost(2 * MAX_ANGLE_DELTAS + 1,
                                     MAX_ANGLE_DELTAS + mbmi->angle_delta[1]);
       }
-
-      if (ALLOW_FILTER_INTRA_MODES && mbmi->mode == DC_PRED) {
-        rate2 += av1_cost_bit(cpi->common.fc->ext_intra_probs[1],
-                              mbmi->ext_intra_mode_info.use_ext_intra_mode[1]);
-        if (mbmi->ext_intra_mode_info.use_ext_intra_mode[1])
-          rate2 += write_uniform_cost(
-              FILTER_INTRA_MODES, mbmi->ext_intra_mode_info.ext_intra_mode[1]);
-      }
 #endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+      if (mbmi->mode == DC_PRED) {
+        rate2 +=
+            av1_cost_bit(cm->fc->filter_intra_probs[0],
+                         mbmi->filter_intra_mode_info.use_filter_intra_mode[0]);
+        if (mbmi->filter_intra_mode_info.use_filter_intra_mode[0]) {
+          rate2 += write_uniform_cost(
+              FILTER_INTRA_MODES,
+              mbmi->filter_intra_mode_info.filter_intra_mode[0]);
+        }
+      }
+      if (mbmi->uv_mode == DC_PRED) {
+        rate2 +=
+            av1_cost_bit(cpi->common.fc->filter_intra_probs[1],
+                         mbmi->filter_intra_mode_info.use_filter_intra_mode[1]);
+        if (mbmi->filter_intra_mode_info.use_filter_intra_mode[1])
+          rate2 += write_uniform_cost(
+              FILTER_INTRA_MODES,
+              mbmi->filter_intra_mode_info.filter_intra_mode[1]);
+      }
+#endif  // CONFIG_FILTER_INTRA
       if (this_mode != DC_PRED && this_mode != TM_PRED)
         rate2 += intra_cost_penalty;
       distortion2 = distortion_y + distortion_uv;
@@ -8834,15 +8876,17 @@
       if (second_ref_frame == INTRA_FRAME) {
         if (best_single_inter_ref != ref_frame) continue;
         mbmi->interintra_mode = intra_to_interintra_mode[best_intra_mode];
+// TODO(debargha|geza.lore):
+// Should we use ext_intra modes for interintra?
 #if CONFIG_EXT_INTRA
-        // TODO(debargha|geza.lore):
-        // Should we use ext_intra modes for interintra?
-        mbmi->ext_intra_mode_info.use_ext_intra_mode[0] = 0;
-        mbmi->ext_intra_mode_info.use_ext_intra_mode[1] = 0;
         mbmi->angle_delta[0] = 0;
         mbmi->angle_delta[1] = 0;
         mbmi->intra_filter = INTRA_FILTER_LINEAR;
 #endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+        mbmi->filter_intra_mode_info.use_filter_intra_mode[0] = 0;
+        mbmi->filter_intra_mode_info.use_filter_intra_mode[1] = 0;
+#endif  // CONFIG_FILTER_INTRA
       }
 #endif  // CONFIG_EXT_INTER
 #if CONFIG_REF_MV
@@ -9373,9 +9417,11 @@
                            &skip_uvs[uv_tx], &mode_uv[uv_tx]);
       pmi_uv[uv_tx] = *pmi;
 #if CONFIG_EXT_INTRA
-      ext_intra_mode_info_uv[uv_tx] = mbmi->ext_intra_mode_info;
       uv_angle_delta[uv_tx] = mbmi->angle_delta[1];
 #endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+      filter_intra_mode_info_uv[uv_tx] = mbmi->filter_intra_mode_info;
+#endif  // CONFIG_FILTER_INTRA
     }
     mbmi->uv_mode = mode_uv[uv_tx];
     pmi->palette_size[1] = pmi_uv[uv_tx].palette_size[1];
@@ -9385,15 +9431,17 @@
              2 * PALETTE_MAX_SIZE * sizeof(pmi->palette_colors[0]));
 #if CONFIG_EXT_INTRA
     mbmi->angle_delta[1] = uv_angle_delta[uv_tx];
-    mbmi->ext_intra_mode_info.use_ext_intra_mode[1] =
-        ext_intra_mode_info_uv[uv_tx].use_ext_intra_mode[1];
-    if (ext_intra_mode_info_uv[uv_tx].use_ext_intra_mode[1]) {
-      mbmi->ext_intra_mode_info.ext_intra_mode[1] =
-          ext_intra_mode_info_uv[uv_tx].ext_intra_mode[1];
-    }
 #endif  // CONFIG_EXT_INTRA
-    skippable = skippable && skip_uvs[uv_tx];
-    distortion2 = distortion_y + dist_uvs[uv_tx];
+#if CONFIG_FILTER_INTRA
+    mbmi->filter_intra_mode_info.use_filter_intra_mode[1] =
+        filter_intra_mode_info_uv[uv_tx].use_filter_intra_mode[1];
+    if (filter_intra_mode_info_uv[uv_tx].use_filter_intra_mode[1]) {
+      mbmi->filter_intra_mode_info.filter_intra_mode[1] =
+          filter_intra_mode_info_uv[uv_tx].filter_intra_mode[1];
+    }
+#endif  // CONFIG_FILTER_INTRA
+    skippable = skippable && skip_uv[uv_tx];
+    distortion2 = distortion_y + dist_uv[uv_tx];
     rate2 = rate_y + rate_overhead + rate_uv_intra[uv_tx];
     rate2 += ref_costs_single[INTRA_FRAME];
 
@@ -9428,18 +9476,21 @@
 PALETTE_EXIT:
 #endif  // CONFIG_PALETTE
 
-#if CONFIG_EXT_INTRA
-  // TODO(huisu): ext-intra is turned off in lossless mode for now to
+#if CONFIG_FILTER_INTRA
+  // TODO(huisu): filter-intra is turned off in lossless mode for now to
   // avoid a unit test failure
-  if (!xd->lossless[mbmi->segment_id] && ALLOW_FILTER_INTRA_MODES &&
+  if (!xd->lossless[mbmi->segment_id] &&
 #if CONFIG_PALETTE
       mbmi->palette_mode_info.palette_size[0] == 0 &&
 #endif  // CONFIG_PALETTE
       !dc_skipped && best_mode_index >= 0 &&
       best_intra_rd < (best_rd + (best_rd >> 3))) {
-    pick_ext_intra_interframe(
+    pick_filter_intra_interframe(
         cpi, x, ctx, bsize, rate_uv_intra, rate_uv_tokenonly, dist_uvs,
-        skip_uvs, mode_uv, ext_intra_mode_info_uv, uv_angle_delta,
+        skip_uvs, mode_uv, filter_intra_mode_info_uv,
+#if CONFIG_EXT_INTRA
+        uv_angle_delta,
+#endif  // CONFIG_EXT_INTRA
 #if CONFIG_PALETTE
         pmi_uv, palette_ctx,
 #endif  // CONFIG_PALETTE
@@ -9450,7 +9501,7 @@
 #endif  // CONFIG_SUPERTX
         best_pred_rd, &best_mbmode, rd_cost);
   }
-#endif  // CONFIG_EXT_INTRA
+#endif  // CONFIG_FILTER_INTRA
 
   // The inter modes' rate costs are not calculated precisely in some cases.
   // Therefore, sometimes, NEWMV is chosen instead of NEARESTMV, NEARMV, and
@@ -9722,10 +9773,10 @@
   mbmi->palette_mode_info.palette_size[1] = 0;
 #endif  // CONFIG_PALETTE
 
-#if CONFIG_EXT_INTRA
-  mbmi->ext_intra_mode_info.use_ext_intra_mode[0] = 0;
-  mbmi->ext_intra_mode_info.use_ext_intra_mode[1] = 0;
-#endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+  mbmi->filter_intra_mode_info.use_filter_intra_mode[0] = 0;
+  mbmi->filter_intra_mode_info.use_filter_intra_mode[1] = 0;
+#endif  // CONFIG_FILTER_INTRA
   mbmi->mode = ZEROMV;
   mbmi->motion_mode = SIMPLE_TRANSLATION;
   mbmi->uv_mode = DC_PRED;
@@ -9893,10 +9944,10 @@
 #endif  // CONFIG_SUPERTX
   av1_zero(best_mbmode);
 
-#if CONFIG_EXT_INTRA
-  mbmi->ext_intra_mode_info.use_ext_intra_mode[0] = 0;
-  mbmi->ext_intra_mode_info.use_ext_intra_mode[1] = 0;
-#endif  // CONFIG_EXT_INTRA
+#if CONFIG_FILTER_INTRA
+  mbmi->filter_intra_mode_info.use_filter_intra_mode[0] = 0;
+  mbmi->filter_intra_mode_info.use_filter_intra_mode[1] = 0;
+#endif  // CONFIG_FILTER_INTRA
   mbmi->motion_mode = SIMPLE_TRANSLATION;
 #if CONFIG_EXT_INTER
   mbmi->use_wedge_interinter = 0;
diff --git a/av1/encoder/tokenize.c b/av1/encoder/tokenize.c
index e95e52b..561beed 100644
--- a/av1/encoder/tokenize.c
+++ b/av1/encoder/tokenize.c
@@ -336,12 +336,12 @@
 };
 #endif
 
-#if !CONFIG_ANS
+#if !CONFIG_RANS
 const struct av1_token av1_coef_encodings[ENTROPY_TOKENS] = {
   { 2, 2 },  { 6, 3 },   { 28, 5 },  { 58, 6 },  { 59, 6 },  { 60, 6 },
   { 61, 6 }, { 124, 7 }, { 125, 7 }, { 126, 7 }, { 127, 7 }, { 0, 1 }
 };
-#endif  // !CONFIG_ANS
+#endif  // !CONFIG_RANS
 
 struct tokenize_b_args {
   const AV1_COMP *cpi;
@@ -386,17 +386,17 @@
 }
 
 static INLINE void add_token(TOKENEXTRA **t, const aom_prob *context_tree,
-#if CONFIG_ANS || CONFIG_DAALA_EC
+#if CONFIG_RANS || CONFIG_DAALA_EC
                              const aom_cdf_prob (*token_cdf)[ENTROPY_TOKENS],
-#endif  // CONFIG_ANS
+#endif  // CONFIG_RANS
                              int32_t extra, uint8_t token,
                              uint8_t skip_eob_node, unsigned int *counts) {
   (*t)->token = token;
   (*t)->extra = extra;
   (*t)->context_tree = context_tree;
-#if CONFIG_ANS || CONFIG_DAALA_EC
+#if CONFIG_RANS || CONFIG_DAALA_EC
   (*t)->token_cdf = token_cdf;
-#endif  // CONFIG_ANS
+#endif  // CONFIG_RANS
   (*t)->skip_eob_node = skip_eob_node;
   (*t)++;
   ++counts[token];
@@ -489,10 +489,10 @@
   aom_prob(*const coef_probs)[COEFF_CONTEXTS][UNCONSTRAINED_NODES] =
       cpi->common.fc->coef_probs[txsize_sqr_map[tx_size]][type][ref];
 #endif  // CONFIG_ENTROPY
-#if CONFIG_ANS || CONFIG_DAALA_EC
+#if CONFIG_RANS || CONFIG_DAALA_EC
   aom_cdf_prob(*const coef_cdfs)[COEFF_CONTEXTS][ENTROPY_TOKENS] =
       cpi->common.fc->coef_cdfs[tx_size][type][ref];
-#endif  // CONFIG_ANS
+#endif
   unsigned int(*const eob_branch)[COEFF_CONTEXTS] =
       td->counts->eob_branch[txsize_sqr_map[tx_size]][type][ref];
   const uint8_t *const band = get_band_translate(tx_size);
@@ -513,9 +513,9 @@
     av1_get_token_extra(v, &token, &extra);
 
     add_token(&t, coef_probs[band[c]][pt],
-#if CONFIG_ANS || CONFIG_DAALA_EC
+#if CONFIG_RANS || CONFIG_DAALA_EC
               (const aom_cdf_prob(*)[ENTROPY_TOKENS]) & coef_cdfs[band[c]][pt],
-#endif  // CONFIG_ANS
+#endif
               extra, (uint8_t)token, (uint8_t)skip_eob, counts[band[c]][pt]);
 
     token_cache[scan[c]] = av1_pt_energy_class[token];
@@ -525,7 +525,7 @@
   }
   if (c < seg_eob) {
     add_token(&t, coef_probs[band[c]][pt],
-#if CONFIG_ANS || CONFIG_DAALA_EC
+#if CONFIG_RANS || CONFIG_DAALA_EC
               NULL,
 #endif
               0, EOB_TOKEN, 0, counts[band[c]][pt]);
diff --git a/av1/encoder/tokenize.h b/av1/encoder/tokenize.h
index e869a19..ae896a6 100644
--- a/av1/encoder/tokenize.h
+++ b/av1/encoder/tokenize.h
@@ -46,9 +46,9 @@
 
 extern const aom_tree_index av1_coef_tree[];
 extern const aom_tree_index av1_coef_con_tree[];
-#if !CONFIG_ANS
+#if !CONFIG_RANS
 extern const struct av1_token av1_coef_encodings[];
-#endif  // !CONFIG_ANS
+#endif  // !CONFIG_RANS
 
 int av1_is_skippable_in_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane);
 int av1_has_high_freq_in_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane);
diff --git a/configure b/configure
index c396632..7901ef3 100755
--- a/configure
+++ b/configure
@@ -271,6 +271,7 @@
     new_quant
     supertx
     ans
+    rans
     loop_restoration
     ext_partition
     ext_partition_types
diff --git a/test/boolcoder_test.cc b/test/boolcoder_test.cc
index c0e6d48..e2ebdda 100644
--- a/test/boolcoder_test.cc
+++ b/test/boolcoder_test.cc
@@ -135,7 +135,7 @@
     }
     const uint32_t expected = (uint32_t)(-kSymbols * log2(probability));
     // Last tell should be close to the expected value.
-    GTEST_ASSERT_LE(last_tell - expected, 20) << " last_tell: " << last_tell;
+    GTEST_ASSERT_LE(last_tell, expected + 20) << " last_tell: " << last_tell;
     // The average frac_diff error should be pretty small.
     GTEST_ASSERT_LE(frac_diff_total / kSymbols, FRAC_DIFF_TOTAL_ERROR)
         << " frac_diff_total: " << frac_diff_total;
diff --git a/test/reconintra_predictors_test.cc b/test/filterintra_predictors_test.cc
similarity index 92%
rename from test/reconintra_predictors_test.cc
rename to test/filterintra_predictors_test.cc
index a86a6a5..66605f6 100644
--- a/test/reconintra_predictors_test.cc
+++ b/test/filterintra_predictors_test.cc
@@ -57,9 +57,10 @@
 const int MaxTestNum = 100;
 #endif
 
-class AV1IntraPredOptimzTest : public ::testing::TestWithParam<PredParams> {
+class AV1FilterIntraPredOptimzTest
+    : public ::testing::TestWithParam<PredParams> {
  public:
-  virtual ~AV1IntraPredOptimzTest() {}
+  virtual ~AV1FilterIntraPredOptimzTest() {}
   virtual void SetUp() {
     PredFuncMode funcMode = GET_PARAM(0);
     predFuncRef_ = std::tr1::get<0>(funcMode);
@@ -149,10 +150,10 @@
 };
 
 #if CONFIG_AOM_HIGHBITDEPTH
-class AV1HbdIntraPredOptimzTest
+class AV1HbdFilterIntraPredOptimzTest
     : public ::testing::TestWithParam<HbdPredParams> {
  public:
-  virtual ~AV1HbdIntraPredOptimzTest() {}
+  virtual ~AV1HbdFilterIntraPredOptimzTest() {}
   virtual void SetUp() {
     HbdPredFuncMode funcMode = GET_PARAM(0);
     predFuncRef_ = std::tr1::get<0>(funcMode);
@@ -245,21 +246,21 @@
 };
 #endif  // CONFIG_AOM_HIGHBITDEPTH
 
-TEST_P(AV1IntraPredOptimzTest, BitExactCheck) { RunTest(); }
+TEST_P(AV1FilterIntraPredOptimzTest, BitExactCheck) { RunTest(); }
 
 #if PREDICTORS_SPEED_TEST
-TEST_P(AV1IntraPredOptimzTest, SpeedCheckC) { RunSpeedTestC(); }
+TEST_P(AV1FilterIntraPredOptimzTest, SpeedCheckC) { RunSpeedTestC(); }
 
-TEST_P(AV1IntraPredOptimzTest, SpeedCheckSSE) { RunSpeedTestSSE(); }
+TEST_P(AV1FilterIntraPredOptimzTest, SpeedCheckSSE) { RunSpeedTestSSE(); }
 #endif
 
 #if CONFIG_AOM_HIGHBITDEPTH
-TEST_P(AV1HbdIntraPredOptimzTest, BitExactCheck) { RunTest(); }
+TEST_P(AV1HbdFilterIntraPredOptimzTest, BitExactCheck) { RunTest(); }
 
 #if PREDICTORS_SPEED_TEST
-TEST_P(AV1HbdIntraPredOptimzTest, SpeedCheckC) { RunSpeedTestC(); }
+TEST_P(AV1HbdFilterIntraPredOptimzTest, SpeedCheckC) { RunSpeedTestC(); }
 
-TEST_P(AV1HbdIntraPredOptimzTest, SpeedCheckSSE) { RunSpeedTestSSE(); }
+TEST_P(AV1HbdFilterIntraPredOptimzTest, SpeedCheckSSE) { RunSpeedTestSSE(); }
 #endif  // PREDICTORS_SPEED_TEST
 #endif  // CONFIG_AOM_HIGHBITDEPTH
 
@@ -289,7 +290,7 @@
 const int kBlkSize[] = { 4, 8, 16, 32 };
 
 INSTANTIATE_TEST_CASE_P(
-    SSE4_1, AV1IntraPredOptimzTest,
+    SSE4_1, AV1FilterIntraPredOptimzTest,
     ::testing::Combine(::testing::ValuesIn(kPredFuncMdArray),
                        ::testing::ValuesIn(kBlkSize)));
 
@@ -320,7 +321,7 @@
 const int kBd[] = { 10, 12 };
 
 INSTANTIATE_TEST_CASE_P(
-    SSE4_1, AV1HbdIntraPredOptimzTest,
+    SSE4_1, AV1HbdFilterIntraPredOptimzTest,
     ::testing::Combine(::testing::ValuesIn(kHbdPredFuncMdArray),
                        ::testing::ValuesIn(kBlkSize),
                        ::testing::ValuesIn(kBd)));
diff --git a/test/test.mk b/test/test.mk
index 1146428..61ea1d0 100644
--- a/test/test.mk
+++ b/test/test.mk
@@ -162,8 +162,8 @@
 LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_wedge_utils_test.cc
 endif
 
-ifeq ($(CONFIG_EXT_INTRA),yes)
-LIBAOM_TEST_SRCS-$(HAVE_SSE4_1) += reconintra_predictors_test.cc
+ifeq ($(CONFIG_FILTER_INTRA),yes)
+LIBAOM_TEST_SRCS-$(HAVE_SSE4_1) += filterintra_predictors_test.cc
 endif
 
 ifeq ($(CONFIG_MOTION_VAR),yes)
