Remove CONFIG_EXT_SKIP flag

Change-Id: Id84dd812ad3a31a1b7889e8cafe746b763314213
diff --git a/av1/common/blockd.h b/av1/common/blockd.h
index d9cdc12..a0aff41 100644
--- a/av1/common/blockd.h
+++ b/av1/common/blockd.h
@@ -233,9 +233,7 @@
   TX_SIZE min_tx_size;
   uint8_t inter_tx_size[INTER_TX_SIZE_BUF_LEN];
   int8_t skip;
-#if CONFIG_EXT_SKIP
   int8_t skip_mode;
-#endif  // CONFIG_EXT_SKIP
   int8_t segment_id;
   int8_t seg_id_predicted;  // valid only when temporal_update is enabled
 
diff --git a/av1/common/entropy.c b/av1/common/entropy.c
index 20236e8..3215a8d 100644
--- a/av1/common/entropy.c
+++ b/av1/common/entropy.c
@@ -767,7 +767,5 @@
   AVERAGE_TILE_CDFS(comp_group_idx_cdf);
 #endif  // CONFIG_JNT_COMP
 
-#if CONFIG_EXT_SKIP
   AVERAGE_TILE_CDFS(skip_mode_cdfs)
-#endif
 }
diff --git a/av1/common/entropymode.c b/av1/common/entropymode.c
index 7616afc..1d1812a 100644
--- a/av1/common/entropymode.c
+++ b/av1/common/entropymode.c
@@ -554,17 +554,11 @@
       { AOM_CDF2(128 * 128) }
     };
 
-#if CONFIG_EXT_SKIP
 static const aom_cdf_prob default_skip_mode_cdfs[SKIP_MODE_CONTEXTS][CDF_SIZE(
     2)] = { { AOM_CDF2(31609) }, { AOM_CDF2(20107) }, { AOM_CDF2(10296) } };
 static const aom_cdf_prob default_skip_cdfs[SKIP_CONTEXTS][CDF_SIZE(2)] = {
   { AOM_CDF2(30224) }, { AOM_CDF2(16244) }, { AOM_CDF2(4835) }
 };
-#else
-static const aom_cdf_prob default_skip_cdfs[SKIP_CONTEXTS][CDF_SIZE(2)] = {
-  { AOM_CDF2(24576) }, { AOM_CDF2(16384) }, { AOM_CDF2(8192) }
-};
-#endif  // CONFIG_EXT_SKIP
 
 #if CONFIG_JNT_COMP
 static const aom_cdf_prob
@@ -1181,9 +1175,7 @@
   av1_copy(fc->partition_cdf, default_partition_cdf);
   av1_copy(fc->intra_ext_tx_cdf, default_intra_ext_tx_cdf);
   av1_copy(fc->inter_ext_tx_cdf, default_inter_ext_tx_cdf);
-#if CONFIG_EXT_SKIP
   av1_copy(fc->skip_mode_cdfs, default_skip_mode_cdfs);
-#endif  // CONFIG_EXT_SKIP
   av1_copy(fc->skip_cdfs, default_skip_cdfs);
   av1_copy(fc->intra_inter_cdf, default_intra_inter_cdf);
 #if CONFIG_SPATIAL_SEGMENTATION
diff --git a/av1/common/entropymode.h b/av1/common/entropymode.h
index fc298c4..3e8d044 100644
--- a/av1/common/entropymode.h
+++ b/av1/common/entropymode.h
@@ -137,9 +137,7 @@
   aom_cdf_prob compound_index_cdf[COMP_INDEX_CONTEXTS][CDF_SIZE(2)];
   aom_cdf_prob comp_group_idx_cdf[COMP_GROUP_IDX_CONTEXTS][CDF_SIZE(2)];
 #endif  // CONFIG_JNT_COMP
-#if CONFIG_EXT_SKIP
   aom_cdf_prob skip_mode_cdfs[SKIP_CONTEXTS][CDF_SIZE(2)];
-#endif  // CONFIG_EXT_SKIP
   aom_cdf_prob skip_cdfs[SKIP_CONTEXTS][CDF_SIZE(2)];
   aom_cdf_prob intra_inter_cdf[INTRA_INTER_CONTEXTS][CDF_SIZE(2)];
   nmv_context nmvc[NMV_CONTEXTS];
@@ -267,9 +265,7 @@
   unsigned int intrabc[2];
 #endif  // CONFIG_ENTROPY_STATS
   unsigned int txfm_partition[TXFM_PARTITION_CONTEXTS][2];
-#if CONFIG_EXT_SKIP
   unsigned int skip_mode[SKIP_MODE_CONTEXTS][2];
-#endif  // CONFIG_EXT_SKIP
   unsigned int skip[SKIP_CONTEXTS][2];
 #if CONFIG_JNT_COMP
   unsigned int compound_index[COMP_INDEX_CONTEXTS][2];
diff --git a/av1/common/enums.h b/av1/common/enums.h
index 62b4c73..daa5e64 100644
--- a/av1/common/enums.h
+++ b/av1/common/enums.h
@@ -528,9 +528,7 @@
 #define INTER_COMPOUND_MODES (1 + NEW_NEWMV - NEAREST_NEARESTMV)
 
 #define SKIP_CONTEXTS 3
-#if CONFIG_EXT_SKIP
 #define SKIP_MODE_CONTEXTS 3
-#endif  // CONFIG_EXT_SKIP
 
 #if CONFIG_JNT_COMP
 #define COMP_INDEX_CONTEXTS 6
diff --git a/av1/common/mvref_common.c b/av1/common/mvref_common.c
index b918222..78a19e0 100644
--- a/av1/common/mvref_common.c
+++ b/av1/common/mvref_common.c
@@ -2053,7 +2053,6 @@
 }
 #endif  // CONFIG_EXT_WARPED_MOTION
 
-#if CONFIG_EXT_SKIP
 void av1_setup_skip_mode_allowed(AV1_COMMON *cm) {
   cm->is_skip_mode_allowed = 0;
   cm->ref_frame_idx_0 = cm->ref_frame_idx_1 = INVALID_IDX;
@@ -2114,7 +2113,6 @@
     }
   }
 }
-#endif  // CONFIG_EXT_SKIP
 
 #if CONFIG_FRAME_REFS_SIGNALING
 typedef struct {
diff --git a/av1/common/mvref_common.h b/av1/common/mvref_common.h
index bdf50b2..6efcbb6 100644
--- a/av1/common/mvref_common.h
+++ b/av1/common/mvref_common.h
@@ -431,9 +431,7 @@
 
 void av1_setup_frame_buf_refs(AV1_COMMON *cm);
 void av1_setup_frame_sign_bias(AV1_COMMON *cm);
-#if CONFIG_EXT_SKIP
 void av1_setup_skip_mode_allowed(AV1_COMMON *cm);
-#endif  // CONFIG_EXT_SKIP
 #if CONFIG_MFMV
 void av1_setup_motion_field(AV1_COMMON *cm);
 #endif  // CONFIG_MFMV
diff --git a/av1/common/onyxc_int.h b/av1/common/onyxc_int.h
index 3059662..3873b31 100644
--- a/av1/common/onyxc_int.h
+++ b/av1/common/onyxc_int.h
@@ -285,12 +285,10 @@
 
   // Each Inter frame can reference INTER_REFS_PER_FRAME buffers
   RefBuffer frame_refs[INTER_REFS_PER_FRAME];
-#if CONFIG_EXT_SKIP
   int is_skip_mode_allowed;
   int skip_mode_flag;
   int ref_frame_idx_0;
   int ref_frame_idx_1;
-#endif  // CONFIG_EXT_SKIP
 
   int new_fb_idx;
 
diff --git a/av1/common/pred_common.h b/av1/common/pred_common.h
index 9cd2f07..488180c 100644
--- a/av1/common/pred_common.h
+++ b/av1/common/pred_common.h
@@ -144,7 +144,6 @@
   return segp->pred_cdf[av1_get_pred_context_seg_id(xd)];
 }
 
-#if CONFIG_EXT_SKIP
 static INLINE int av1_get_skip_mode_context(const MACROBLOCKD *xd) {
   const MODE_INFO *const above_mi = xd->above_mi;
   const MODE_INFO *const left_mi = xd->left_mi;
@@ -152,7 +151,6 @@
   const int left_skip_mode = left_mi ? left_mi->mbmi.skip_mode : 0;
   return above_skip_mode + left_skip_mode;
 }
-#endif  // CONFIG_EXT_SKIP
 
 static INLINE int av1_get_skip_context(const MACROBLOCKD *xd) {
   const MODE_INFO *const above_mi = xd->above_mi;
diff --git a/av1/common/reconinter.h b/av1/common/reconinter.h
index e607ab6..8d5deda 100644
--- a/av1/common/reconinter.h
+++ b/av1/common/reconinter.h
@@ -391,9 +391,7 @@
 
 static INLINE int av1_is_interp_needed(const MACROBLOCKD *const xd) {
   const MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
-#if CONFIG_EXT_SKIP
   if (mbmi->skip_mode) return 0;
-#endif  // CONFIG_EXT_SKIP
   if (mbmi->motion_mode == WARPED_CAUSAL) return 0;
   if (is_nontrans_global_motion(xd)) return 0;
   return 1;
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index 4d2d966..95b6fe9 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -3242,10 +3242,8 @@
   cm->reference_mode = read_frame_reference_mode(cm, rb);
   if (cm->reference_mode != SINGLE_REFERENCE) setup_compound_reference_mode(cm);
 
-#if CONFIG_EXT_SKIP
   av1_setup_skip_mode_allowed(cm);
   cm->skip_mode_flag = cm->is_skip_mode_allowed ? aom_rb_read_bit(rb) : 0;
-#endif  // CONFIG_EXT_SKIP
 
   read_compound_tools(cm, rb);
 
diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c
index e9e26ec..af71795 100644
--- a/av1/decoder/decodemv.c
+++ b/av1/decoder/decodemv.c
@@ -248,9 +248,7 @@
   MB_MODE_INFO *mbmi = &mi->mbmi;
 
   if (cm->switchable_motion_mode == 0) return SIMPLE_TRANSLATION;
-#if CONFIG_EXT_SKIP
   if (mbmi->skip_mode) return SIMPLE_TRANSLATION;
-#endif  // CONFIG_EXT_SKIP
 
   const MOTION_MODE last_motion_mode_allowed =
       motion_mode_allowed(xd->global_motion, xd, mi);
@@ -472,13 +470,11 @@
   return segment_id;
 }
 
-#if CONFIG_EXT_SKIP
 static int read_skip_mode(AV1_COMMON *cm, const MACROBLOCKD *xd, int segment_id,
                           aom_reader *r) {
   if (!cm->skip_mode_flag) return 0;
 
   if (segfeature_active(&cm->seg, segment_id, SEG_LVL_SKIP)) {
-    // TODO(zoeliu): To revisit the handling of this scenario.
     return 0;
   }
 
@@ -490,7 +486,6 @@
       aom_read_symbol(r, ec_ctx->skip_mode_cdfs[ctx], 2, ACCT_STR);
   return skip_mode;
 }
-#endif  // CONFIG_EXT_SKIP
 
 static int read_skip(AV1_COMMON *cm, const MACROBLOCKD *xd, int segment_id,
                      aom_reader *r) {
@@ -988,24 +983,20 @@
 }
 #endif  // CONFIG_EXT_COMP_REFS
 
-#if CONFIG_EXT_SKIP
 static void set_ref_frames_for_skip_mode(AV1_COMMON *const cm,
                                          MV_REFERENCE_FRAME ref_frame[2]) {
   ref_frame[0] = LAST_FRAME + cm->ref_frame_idx_0;
   ref_frame[1] = LAST_FRAME + cm->ref_frame_idx_1;
 }
-#endif  // CONFIG_EXT_SKIP
 
 // Read the referncence frame
 static void read_ref_frames(AV1_COMMON *const cm, MACROBLOCKD *const xd,
                             aom_reader *r, int segment_id,
                             MV_REFERENCE_FRAME ref_frame[2]) {
-#if CONFIG_EXT_SKIP
   if (xd->mi[0]->mbmi.skip_mode) {
     set_ref_frames_for_skip_mode(cm, ref_frame);
     return;
   }
-#endif  // CONFIG_EXT_SKIP
 
   if (segfeature_active(&cm->seg, segment_id, SEG_LVL_REF_FRAME)) {
     ref_frame[0] = (MV_REFERENCE_FRAME)get_segdata(&cm->seg, segment_id,
@@ -1421,7 +1412,6 @@
   }
 
 #define FRAME_TO_CHECK 11
-#if CONFIG_EXT_SKIP
   if (cm->current_video_frame == FRAME_TO_CHECK && cm->show_frame == 1) {
     printf(
         "=== DECODER ===: "
@@ -1434,20 +1424,6 @@
         mv[1].as_mv.row, mv[1].as_mv.col, mbmi->ref_frame[0],
         mbmi->ref_frame[1], mbmi->motion_mode, mode_ctx, newmv_ctx, zeromv_ctx,
         refmv_ctx, mbmi->tx_size);
-#else
-  if (cm->current_video_frame == FRAME_TO_CHECK && cm->show_frame == 1) {
-    printf(
-        "=== DECODER ===: "
-        "Frame=%d, (mi_row,mi_col)=(%d,%d), mode=%d, bsize=%d, "
-        "show_frame=%d, mv[0]=(%d,%d), mv[1]=(%d,%d), ref[0]=%d, "
-        "ref[1]=%d, motion_mode=%d, mode_ctx=%d, "
-        "newmv_ctx=%d, zeromv_ctx=%d, refmv_ctx=%d, tx_size=%d\n",
-        cm->current_video_frame, mi_row, mi_col, mbmi->mode, mbmi->sb_type,
-        cm->show_frame, mv[0].as_mv.row, mv[0].as_mv.col, mv[1].as_mv.row,
-        mv[1].as_mv.col, mbmi->ref_frame[0], mbmi->ref_frame[1],
-        mbmi->motion_mode, mode_ctx, newmv_ctx, zeromv_ctx, refmv_ctx,
-        mbmi->tx_size);
-#endif  // CONFIG_EXT_SKIP
   }
 }
 #endif  // DEC_MISMATCH_DEBUG
@@ -1502,17 +1478,15 @@
 #endif
   mbmi->ref_mv_idx = 0;
 
-#if CONFIG_EXT_SKIP
   if (mbmi->skip_mode) {
     assert(is_compound);
     mbmi->mode = NEAREST_NEARESTMV;
   } else {
-#endif  // CONFIG_EXT_SKIP
 #if CONFIG_SEGMENT_GLOBALMV
     if (segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_SKIP) ||
         segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_GLOBALMV))
 #else
-  if (segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_SKIP))
+    if (segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_SKIP))
 #endif
     {
       mbmi->mode = GLOBALMV;
@@ -1525,9 +1499,8 @@
           have_nearmv_in_inter_mode(mbmi->mode))
         read_drl_idx(ec_ctx, xd, mbmi, r);
     }
-#if CONFIG_EXT_SKIP
   }
-#endif
+
   if (is_compound != is_inter_compound_mode(mbmi->mode)) {
     aom_internal_error(&cm->error, AOM_CODEC_CORRUPT_FRAME,
                        "Prediction mode %d invalid with ref frame %d %d",
@@ -1647,26 +1620,19 @@
     }
   }
 
-#if CONFIG_EXT_SKIP
   if (mbmi->skip_mode) {
     assert(mbmi->mode == NEAREST_NEARESTMV);
     mbmi->mv[0].as_int = nearestmv[0].as_int;
     mbmi->mv[1].as_int = nearestmv[1].as_int;
   } else {
-#endif  // CONFIG_EXT_SKIP
     int mv_corrupted_flag =
         !assign_mv(cm, xd, mbmi->mode, mbmi->ref_frame, mbmi->mv, ref_mv,
                    nearestmv, nearmv, mi_row, mi_col, is_compound, allow_hp, r);
     aom_merge_corrupted_flag(&xd->corrupted, mv_corrupted_flag);
-#if CONFIG_EXT_SKIP
   }
-#endif  // CONFIG_EXT_SKIP
 
   mbmi->use_wedge_interintra = 0;
-  if (cm->allow_interintra_compound &&
-#if CONFIG_EXT_SKIP
-      !mbmi->skip_mode &&
-#endif  // CONFIG_EXT_SKIP
+  if (cm->allow_interintra_compound && !mbmi->skip_mode &&
       is_interintra_allowed(mbmi)) {
     const int bsize_group = size_group_lookup[bsize];
     const int interintra =
@@ -1700,11 +1666,7 @@
   }
 
   mbmi->motion_mode = SIMPLE_TRANSLATION;
-  if (mbmi->sb_type >= BLOCK_8X8 &&
-#if CONFIG_EXT_SKIP
-      !mbmi->skip_mode &&
-#endif  // CONFIG_EXT_SKIP
-      !has_second_ref(mbmi))
+  if (mbmi->sb_type >= BLOCK_8X8 && !mbmi->skip_mode && !has_second_ref(mbmi))
     mbmi->num_proj_ref[0] = findSamples(cm, xd, mi_row, mi_col, pts, pts_inref);
   av1_count_overlappable_neighbors(cm, xd, mi_row, mi_col);
 
@@ -1717,11 +1679,7 @@
   mbmi->compound_idx = 1;
   mbmi->interinter_compound_type = COMPOUND_AVERAGE;
 
-  if (has_second_ref(mbmi)
-#if CONFIG_EXT_SKIP
-      && !mbmi->skip_mode
-#endif  // CONFIG_EXT_SKIP
-  ) {
+  if (has_second_ref(mbmi) && !mbmi->skip_mode) {
     // Read idx to indicate current compound inter prediction mode group
     const int masked_compound_used =
         is_any_masked_compound_used(bsize) && cm->allow_masked_compound;
@@ -1766,15 +1724,11 @@
       }
     }
   }
-#else  // CONFIG_JNT_COMP
+#else   // CONFIG_JNT_COMP
   mbmi->interinter_compound_type = COMPOUND_AVERAGE;
   if (cm->reference_mode != SINGLE_REFERENCE &&
       is_inter_compound_mode(mbmi->mode) &&
-      mbmi->motion_mode == SIMPLE_TRANSLATION
-#if CONFIG_EXT_SKIP
-      && !mbmi->skip_mode
-#endif  // CONFIG_EXT_SKIP
-  ) {
+      mbmi->motion_mode == SIMPLE_TRANSLATION && !mbmi->skip_mode) {
     if (is_any_masked_compound_used(bsize)) {
       if (cm->allow_masked_compound) {
         if (!is_interinter_compound_used(COMPOUND_WEDGE, bsize))
@@ -1837,13 +1791,11 @@
   mbmi->mv[1].as_int = 0;
   mbmi->segment_id = read_inter_segment_id(cm, xd, mi_row, mi_col, 1, r);
 
-#if CONFIG_EXT_SKIP
   mbmi->skip_mode = read_skip_mode(cm, xd, mbmi->segment_id, r);
 
   if (mbmi->skip_mode)
     mbmi->skip = 1;
   else
-#endif  // CONFIG_EXT_SKIP
     mbmi->skip = read_skip(cm, xd, mbmi->segment_id, r);
 
 #if CONFIG_SPATIAL_SEGMENTATION
@@ -1886,9 +1838,7 @@
 #endif  // CONFIG_EXT_DELTA_Q
   }
 
-#if CONFIG_EXT_SKIP
   if (!mbmi->skip_mode)
-#endif  // CONFIG_EXT_SKIP
     inter_block = read_is_inter_block(cm, xd, mbmi->segment_id, r);
 
   mbmi->current_q_index = xd->current_qindex;
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 99a9e1f..ec8a7b7 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -232,7 +232,6 @@
   }
 }
 
-#if CONFIG_EXT_SKIP
 static int write_skip_mode(const AV1_COMMON *cm, const MACROBLOCKD *xd,
                            int segment_id, const MODE_INFO *mi, aom_writer *w) {
   if (!cm->skip_mode_flag) return 0;
@@ -248,7 +247,6 @@
   aom_write_symbol(w, skip_mode, xd->tile_ctx->skip_mode_cdfs[ctx], 2);
   return skip_mode;
 }
-#endif  // CONFIG_EXT_SKIP
 
 static void write_is_inter(const AV1_COMMON *cm, const MACROBLOCKD *xd,
                            int segment_id, aom_writer *w, const int is_inter) {
@@ -1049,18 +1047,14 @@
 
   write_inter_segment_id(cpi, w, seg, segp, mi_row, mi_col, 0, 1);
 
-#if CONFIG_EXT_SKIP
   write_skip_mode(cm, xd, segment_id, mi, w);
 
   if (mbmi->skip_mode) {
     skip = mbmi->skip;
     assert(skip);
   } else {
-#endif  // CONFIG_EXT_SKIP
     skip = write_skip(cm, xd, segment_id, mi, w);
-#if CONFIG_EXT_SKIP
   }
-#endif  // CONFIG_EXT_SKIP
 
 #if CONFIG_SPATIAL_SEGMENTATION
   write_inter_segment_id(cpi, w, seg, segp, mi_row, mi_col, skip, 0);
@@ -1103,14 +1097,9 @@
     }
   }
 
-#if CONFIG_EXT_SKIP
-  if (!mbmi->skip_mode)
-#endif  // CONFIG_EXT_SKIP
-    write_is_inter(cm, xd, mbmi->segment_id, w, is_inter);
+  if (!mbmi->skip_mode) write_is_inter(cm, xd, mbmi->segment_id, w, is_inter);
 
-#if CONFIG_EXT_SKIP
   if (mbmi->skip_mode) return;
-#endif  // CONFIG_EXT_SKIP
 
   if (!is_inter) {
     write_intra_mode(ec_ctx, bsize, mode, w);
@@ -1497,7 +1486,6 @@
           refmv_ctx = (mode_ctx >> REFMV_OFFSET) & REFMV_CTX_MASK;
       }
 
-#if CONFIG_EXT_SKIP
       printf(
           "=== ENCODER ===: "
           "Frame=%d, (mi_row,mi_col)=(%d,%d), skip_mode=%d, mode=%d, bsize=%d, "
@@ -1509,19 +1497,6 @@
           mv[1].as_mv.row, mv[1].as_mv.col, mbmi->ref_frame[0],
           mbmi->ref_frame[1], mbmi->motion_mode, mode_ctx, newmv_ctx,
           zeromv_ctx, refmv_ctx, mbmi->tx_size);
-#else
-      printf(
-          "=== ENCODER ===: "
-          "Frame=%d, (mi_row,mi_col)=(%d,%d), mode=%d, bsize=%d, "
-          "show_frame=%d, mv[0]=(%d,%d), mv[1]=(%d,%d), ref[0]=%d, "
-          "ref[1]=%d, motion_mode=%d, mode_ctx=%d, "
-          "newmv_ctx=%d, zeromv_ctx=%d, refmv_ctx=%d, tx_size=%d\n",
-          cm->current_video_frame, mi_row, mi_col, mbmi->mode, bsize,
-          cm->show_frame, mv[0].as_mv.row, mv[0].as_mv.col, mv[1].as_mv.row,
-          mv[1].as_mv.col, mbmi->ref_frame[0], mbmi->ref_frame[1],
-          mbmi->motion_mode, mode_ctx, newmv_ctx, zeromv_ctx, refmv_ctx,
-          mbmi->tx_size);
-#endif  // CONFIG_EXT_SKIP
     }
   }
 }
@@ -1708,9 +1683,7 @@
   for (int plane = 0; plane < AOMMIN(2, av1_num_planes(cm)); ++plane) {
     const uint8_t palette_size_plane =
         mbmi->palette_mode_info.palette_size[plane];
-#if CONFIG_EXT_SKIP
     assert(!mbmi->skip_mode || !palette_size_plane);
-#endif  // CONFIG_EXT_SKIP
     if (palette_size_plane > 0) {
       assert(mbmi->use_intrabc == 0);
       assert(av1_allow_palette(cm->allow_screen_content_tools, mbmi->sb_type));
@@ -3400,13 +3373,7 @@
     aom_wb_write_bit(wb, use_hybrid_pred);
   }
 
-#if CONFIG_EXT_SKIP
-#if 0
-  printf("\n[ENCODER] Frame=%d, is_skip_mode_allowed=%d, skip_mode_flag=%d\n\n",
-         (int)cm->frame_offset, cm->is_skip_mode_allowed, cm->skip_mode_flag);
-#endif  // 0
   if (cm->is_skip_mode_allowed) aom_wb_write_bit(wb, cm->skip_mode_flag);
-#endif  // CONFIG_EXT_SKIP
 
   write_compound_tools(cm, wb);
 
diff --git a/av1/encoder/block.h b/av1/encoder/block.h
index 6829529..62faef7 100644
--- a/av1/encoder/block.h
+++ b/av1/encoder/block.h
@@ -237,7 +237,6 @@
   int skip_chroma_rd;
   int skip_cost[SKIP_CONTEXTS][2];
 
-#if CONFIG_EXT_SKIP
   int skip_mode;  // 0: off; 1: on
   int skip_mode_cost[SKIP_CONTEXTS][2];
 
@@ -252,7 +251,6 @@
 #endif  // CONFIG_JNT_COMP
   int skip_mode_index_candidate;
   int skip_mode_index;
-#endif  // CONFIG_EXT_SKIP
 
   LV_MAP_COEFF_COST coeff_costs[TX_SIZES][PLANE_TYPES];
   LV_MAP_EOB_COST eob_costs[7][2];
diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c
index 53abe84..4c22337 100644
--- a/av1/encoder/encodeframe.c
+++ b/av1/encoder/encodeframe.c
@@ -657,10 +657,8 @@
     // Set to zero to make sure we do not use the previous encoded frame stats
     mbmi->skip = 0;
 
-#if CONFIG_EXT_SKIP
     // Reset skip mode flag.
     mbmi->skip_mode = 0;
-#endif
   }
 
   x->skip_chroma_rd =
@@ -899,7 +897,6 @@
   const int seg_ref_active =
       segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_REF_FRAME);
 
-#if CONFIG_EXT_SKIP
   if (cm->skip_mode_flag && !seg_ref_active && is_comp_ref_allowed(bsize)) {
     const int skip_mode_ctx = av1_get_skip_mode_context(xd);
     td->counts->skip_mode[skip_mode_ctx][mbmi->skip_mode]++;
@@ -908,15 +905,12 @@
   }
 
   if (!mbmi->skip_mode) {
-#endif  // CONFIG_EXT_SKIP
     if (!seg_ref_active) {
       const int skip_ctx = av1_get_skip_context(xd);
       td->counts->skip[skip_ctx][mbmi->skip]++;
       if (allow_update_cdf) update_cdf(fc->skip_cdfs[skip_ctx], mbmi->skip, 2);
     }
-#if CONFIG_EXT_SKIP
   }
-#endif  // CONFIG_EXT_SKIP
 
   if (cm->delta_q_present_flag &&
       (bsize != cm->seq_params.sb_size || !mbmi->skip) &&
@@ -984,7 +978,6 @@
 
     FRAME_COUNTS *const counts = td->counts;
 
-#if CONFIG_EXT_SKIP
     if (mbmi->skip_mode) {
       rdc->skip_mode_used_flag = 1;
       if (cm->reference_mode == REFERENCE_MODE_SELECT) {
@@ -994,7 +987,6 @@
       set_ref_ptrs(cm, xd, mbmi->ref_frame[0], mbmi->ref_frame[1]);
       return;
     }
-#endif  // CONFIG_EXT_SKIP
 
     const int inter_block = is_inter_block(mbmi);
 
@@ -4121,7 +4113,6 @@
   }
 }
 
-#if CONFIG_EXT_SKIP
 static INLINE void get_skip_mode_ref_offsets(const AV1_COMMON *cm,
                                              int ref_offset[2]) {
   ref_offset[0] = ref_offset[1] = 0;
@@ -4169,7 +4160,6 @@
 
   return 1;
 }
-#endif  // CONFIG_EXT_SKIP
 
 static void encode_frame_internal(AV1_COMP *cpi) {
   ThreadData *const td = &cpi->td;
@@ -4469,9 +4459,7 @@
   cpi->all_one_sided_refs =
       frame_is_intra_only(cm) ? 0 : av1_refs_are_one_sided(cm);
 
-#if CONFIG_EXT_SKIP
   cm->skip_mode_flag = check_skip_mode_enabled(cpi);
-#endif  // CONFIG_EXT_SKIP
 
   {
     struct aom_usec_timer emr_timer;
@@ -4579,9 +4567,7 @@
     make_consistent_compound_tools(cm);
 
     rdc->compound_ref_used_flag = 0;
-#if CONFIG_EXT_SKIP
     rdc->skip_mode_used_flag = 0;
-#endif  // CONFIG_EXT_SKIP
 
     encode_frame_internal(cpi);
 
@@ -4598,7 +4584,6 @@
       }
     }
     make_consistent_compound_tools(cm);
-#if CONFIG_EXT_SKIP
     // Re-check on the skip mode status as reference mode may have been changed.
     if (frame_is_intra_only(cm) || cm->reference_mode == SINGLE_REFERENCE) {
       cm->is_skip_mode_allowed = 0;
@@ -4606,7 +4591,6 @@
     }
     if (cm->skip_mode_flag && rdc->skip_mode_used_flag == 0)
       cm->skip_mode_flag = 0;
-#endif  // CONFIG_EXT_SKIP
 
 #if CONFIG_EXT_TILE
     if (!cm->large_scale_tile) {
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h
index fd9d04a..4c49fa2 100644
--- a/av1/encoder/encoder.h
+++ b/av1/encoder/encoder.h
@@ -343,9 +343,7 @@
   // Stores number of 4x4 blocks using global motion per reference frame.
   int global_motion_used[TOTAL_REFS_PER_FRAME];
   int compound_ref_used_flag;
-#if CONFIG_EXT_SKIP
   int skip_mode_used_flag;
-#endif  // CONFIG_EXT_SKIP
 } RD_COUNTS;
 
 typedef struct ThreadData {
diff --git a/av1/encoder/ethread.c b/av1/encoder/ethread.c
index a505b0d..3540c12 100644
--- a/av1/encoder/ethread.c
+++ b/av1/encoder/ethread.c
@@ -24,9 +24,7 @@
 
   td->rd_counts.compound_ref_used_flag |=
       td_t->rd_counts.compound_ref_used_flag;
-#if CONFIG_EXT_SKIP
   td->rd_counts.skip_mode_used_flag |= td_t->rd_counts.skip_mode_used_flag;
-#endif  // CONFIG_EXT_SKIP
 }
 
 static int enc_worker_hook(EncWorkerData *const thread_data, void *unused) {
diff --git a/av1/encoder/rd.c b/av1/encoder/rd.c
index 50d8b9f..28a4c59 100644
--- a/av1/encoder/rd.c
+++ b/av1/encoder/rd.c
@@ -104,14 +104,12 @@
                                NULL);
   }
 
-#if CONFIG_EXT_SKIP
   if (cm->skip_mode_flag) {
     for (i = 0; i < SKIP_CONTEXTS; ++i) {
       av1_cost_tokens_from_cdf(x->skip_mode_cost[i], fc->skip_mode_cdfs[i],
                                NULL);
     }
   }
-#endif  // CONFIG_EXT_SKIP
 
   for (i = 0; i < SKIP_CONTEXTS; ++i) {
     av1_cost_tokens_from_cdf(x->skip_cost[i], fc->skip_cdfs[i], NULL);
diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c
index 7a79d9e..557b633 100644
--- a/av1/encoder/rdopt.c
+++ b/av1/encoder/rdopt.c
@@ -7553,7 +7553,6 @@
   return 0;
 }
 
-#if CONFIG_EXT_SKIP
 static int64_t skip_mode_rd(const AV1_COMP *const cpi, MACROBLOCK *const x,
                             BLOCK_SIZE bsize, int mi_row, int mi_col,
                             BUFFER_SET *const orig_dst) {
@@ -7593,7 +7592,6 @@
   restore_dst_buf(xd, *orig_dst, num_planes);
   return 0;
 }
-#endif  // CONFIG_EXT_SKIP
 
 static int64_t handle_inter_mode(
     const AV1_COMP *const cpi, MACROBLOCK *x, BLOCK_SIZE bsize,
@@ -8591,7 +8589,6 @@
                                       int left_stride);
 #endif
 
-#if CONFIG_EXT_SKIP
 static void estimate_skip_mode_rdcost(
     const AV1_COMP *const cpi, TileDataEnc *tile_data, MACROBLOCK *const x,
     BLOCK_SIZE bsize, int mi_row, int mi_col,
@@ -8712,7 +8709,6 @@
     break;
   }
 }
-#endif  // CONFIG_EXT_SKIP
 
 void av1_rd_pick_inter_mode_sb(const AV1_COMP *cpi, TileDataEnc *tile_data,
                                MACROBLOCK *x, int mi_row, int mi_col,
@@ -9061,10 +9057,8 @@
     for (ref_frame = 0; ref_frame < TOTAL_REFS_PER_FRAME; ++ref_frame)
       modelled_rd[i][ref_frame] = INT64_MAX;
 
-#if CONFIG_EXT_SKIP
   x->skip_mode_rdcost = -1;
   x->skip_mode_index = -1;
-#endif  // CONFIG_EXT_SKIP
 
   for (midx = 0; midx < MAX_MODES; ++midx) {
     int mode_index;
@@ -9080,9 +9074,7 @@
     uint8_t ref_frame_type;
 
     mode_index = mode_map[midx];
-#if CONFIG_EXT_SKIP
     x->skip_mode_index_candidate = mode_index;
-#endif  // CONFIG_EXT_SKIP
     this_mode = av1_mode_order[mode_index].mode;
     ref_frame = av1_mode_order[mode_index].ref_frame[0];
     second_ref_frame = av1_mode_order[mode_index].ref_frame[1];
@@ -10033,7 +10025,6 @@
   }
 PALETTE_EXIT:
 
-#if CONFIG_EXT_SKIP
   best_mbmode.skip_mode = 0;
   if (cm->skip_mode_flag &&
       !segfeature_active(seg, segment_id, SEG_LVL_REF_FRAME) &&
@@ -10124,7 +10115,6 @@
 #endif  // 0
     }
   }
-#endif  // CONFIG_EXT_SKIP
 
   // The inter modes' rate costs are not calculated precisely in some cases.
   // Therefore, sometimes, NEWMV is chosen instead of NEARESTMV, NEARMV, and