shithub: libvpx

Download patch

ref: 6884a83f06dd6c19ffc16758ecf1a5b0f70ec1a8
parent: 7d6b5425d704c91c6d048c1a96542c9cd027f015
author: Ronald S. Bultje <rbultje@google.com>
date: Wed Jan 9 12:21:28 EST 2013

Merge superblocks64 experiment.

Change-Id: If6c88752dffdb566f8d4322f135145270716fb8e

--- a/configure
+++ b/configure
@@ -239,8 +239,6 @@
 EXPERIMENT_LIST="
     csm
     comp_intra_pred
-    superblocks
-    superblocks64
     pred_filter
     lossless
     subpelrefmv
--- a/vp9/common/vp9_blockd.h
+++ b/vp9/common/vp9_blockd.h
@@ -232,9 +232,7 @@
 typedef enum {
   BLOCK_SIZE_MB16X16 = 0,
   BLOCK_SIZE_SB32X32 = 1,
-#if CONFIG_SUPERBLOCKS64
   BLOCK_SIZE_SB64X64 = 2,
-#endif
 } BLOCK_SIZE_TYPE;
 
 typedef struct {
--- a/vp9/common/vp9_findnearmv.c
+++ b/vp9/common/vp9_findnearmv.c
@@ -198,7 +198,6 @@
                                    above_src + 16, xd->dst.y_stride, &sse);
         score += sse;
       }
-#if CONFIG_SUPERBLOCKS64
       if (xd->mode_info_context->mbmi.sb_type >= BLOCK_SIZE_SB64X64) {
         vp9_sub_pixel_variance16x2(above_ref + offset + 32,
                                    ref_y_stride,
@@ -213,7 +212,6 @@
                                    above_src + 48, xd->dst.y_stride, &sse);
         score += sse;
       }
-#endif
     }
     if (xd->left_available) {
       vp9_sub_pixel_variance2x16_c(left_ref + offset, ref_y_stride,
@@ -230,7 +228,6 @@
                                      xd->dst.y_stride, &sse);
         score += sse;
       }
-#if CONFIG_SUPERBLOCKS64
       if (xd->mode_info_context->mbmi.sb_type >= BLOCK_SIZE_SB64X64) {
         vp9_sub_pixel_variance2x16_c(left_ref + offset + ref_y_stride * 32,
                                      ref_y_stride,
@@ -247,7 +244,6 @@
                                      xd->dst.y_stride, &sse);
         score += sse;
       }
-#endif
     }
 #else
     row_offset = (this_mv.as_mv.row > 0) ?
@@ -263,7 +259,6 @@
         score += vp9_sad16x3(above_src + 16, xd->dst.y_stride,
                              above_ref + offset + 16, ref_y_stride);
       }
-#if CONFIG_SUPERBLOCKS64
       if (xd->mode_info_context->mbmi.sb_type >= BLOCK_SIZE_SB64X64) {
         score += vp9_sad16x3(above_src + 32, xd->dst.y_stride,
                              above_ref + offset + 32, ref_y_stride);
@@ -270,7 +265,6 @@
         score += vp9_sad16x3(above_src + 48, xd->dst.y_stride,
                              above_ref + offset + 48, ref_y_stride);
       }
-#endif
     }
     if (xd->left_available) {
       score += vp9_sad3x16(left_src, xd->dst.y_stride,
@@ -281,7 +275,6 @@
                              left_ref + offset + ref_y_stride * 16,
                              ref_y_stride);
       }
-#if CONFIG_SUPERBLOCKS64
       if (xd->mode_info_context->mbmi.sb_type >= BLOCK_SIZE_SB64X64) {
         score += vp9_sad3x16(left_src + xd->dst.y_stride * 32,
                              xd->dst.y_stride,
@@ -292,7 +285,6 @@
                              left_ref + offset + ref_y_stride * 48,
                              ref_y_stride);
       }
-#endif
     }
 #endif
     // Add the entry to our list and then resort the list on score.
--- a/vp9/common/vp9_onyxc_int.h
+++ b/vp9/common/vp9_onyxc_int.h
@@ -240,9 +240,7 @@
   vp9_prob prob_last_coded;
   vp9_prob prob_gf_coded;
   vp9_prob sb32_coded;
-#if CONFIG_SUPERBLOCKS64
   vp9_prob sb64_coded;
-#endif  // CONFIG_SUPERBLOCKS64
 
   // Context probabilities when using predictive coding of segment id
   vp9_prob segment_pred_probs[PREDICTION_PROBS];
--- a/vp9/common/vp9_reconinter.c
+++ b/vp9/common/vp9_reconinter.c
@@ -614,7 +614,6 @@
 #endif
 }
 
-#if CONFIG_SUPERBLOCKS64
 void vp9_build_inter64x64_predictors_sb(MACROBLOCKD *x,
                                         uint8_t *dst_y,
                                         uint8_t *dst_u,
@@ -678,7 +677,6 @@
   }
 #endif
 }
-#endif  // CONFIG_SUPERBLOCKS64
 
 /*
  * The following functions should be called after an initial
--- a/vp9/common/vp9_reconinter.h
+++ b/vp9/common/vp9_reconinter.h
@@ -54,7 +54,6 @@
                                                int dst_ystride,
                                                int dst_uvstride);
 
-#if CONFIG_SUPERBLOCKS64
 extern void vp9_build_inter64x64_predictors_sb(MACROBLOCKD *x,
                                                uint8_t *dst_y,
                                                uint8_t *dst_u,
@@ -61,7 +60,6 @@
                                                uint8_t *dst_v,
                                                int dst_ystride,
                                                int dst_uvstride);
-#endif  // CONFIG_SUPERBLOCKS64
 
 extern void vp9_build_inter_predictors_mb(MACROBLOCKD *xd);
 
--- a/vp9/common/vp9_reconintra.c
+++ b/vp9/common/vp9_reconintra.c
@@ -703,7 +703,6 @@
   vp9_build_interintra_32x32_predictors_sbuv(xd, upred, vpred, uvstride);
 }
 
-#if CONFIG_SUPERBLOCKS64
 void vp9_build_interintra_64x64_predictors_sby(MACROBLOCKD *xd,
                                                uint8_t *ypred,
                                                int ystride) {
@@ -744,7 +743,6 @@
   vp9_build_interintra_64x64_predictors_sby(xd, ypred, ystride);
   vp9_build_interintra_64x64_predictors_sbuv(xd, upred, vpred, uvstride);
 }
-#endif  // CONFIG_SUPERBLOCKS64
 #endif  // CONFIG_COMP_INTERINTRA_PRED
 
 void vp9_build_intra_predictors_mby(MACROBLOCKD *xd) {
@@ -768,7 +766,6 @@
                                       xd->up_available, xd->left_available);
 }
 
-#if CONFIG_SUPERBLOCKS64
 void vp9_build_intra_predictors_sb64y_s(MACROBLOCKD *xd) {
   vp9_build_intra_predictors_internal(xd->dst.y_buffer, xd->dst.y_stride,
                                       xd->dst.y_buffer, xd->dst.y_stride,
@@ -775,7 +772,6 @@
                                       xd->mode_info_context->mbmi.mode, 64,
                                       xd->up_available, xd->left_available);
 }
-#endif  // CONFIG_SUPERBLOCKS64
 
 #if CONFIG_COMP_INTRA_PRED
 void vp9_build_comp_intra_predictors_mby(MACROBLOCKD *xd) {
@@ -834,7 +830,6 @@
                                            16);
 }
 
-#if CONFIG_SUPERBLOCKS64
 void vp9_build_intra_predictors_sb64uv_s(MACROBLOCKD *xd) {
   vp9_build_intra_predictors_mbuv_internal(xd, xd->dst.u_buffer,
                                            xd->dst.v_buffer, xd->dst.uv_stride,
@@ -841,7 +836,6 @@
                                            xd->mode_info_context->mbmi.uv_mode,
                                            32);
 }
-#endif  // CONFIG_SUPERBLOCKS64
 
 #if CONFIG_COMP_INTRA_PRED
 void vp9_build_comp_intra_predictors_mbuv(MACROBLOCKD *xd) {
--- a/vp9/common/vp9_rtcd_defs.sh
+++ b/vp9/common/vp9_rtcd_defs.sh
@@ -172,15 +172,11 @@
 prototype void vp9_build_comp_intra_predictors_mbuv "struct macroblockd *x"
 specialize vp9_build_comp_intra_predictors_mbuv;
 
-if [ "$CONFIG_SUPERBLOCKS64" = "yes" ]; then
-
 prototype void vp9_build_intra_predictors_sb64y_s "struct macroblockd *x"
 specialize vp9_build_intra_predictors_sb64y_s;
 
 prototype void vp9_build_intra_predictors_sb64uv_s "struct macroblockd *x"
 specialize vp9_build_intra_predictors_sb64uv_s;
-
-fi
 
 prototype void vp9_intra4x4_predict "struct blockd *x, int b_mode, uint8_t *predictor"
 specialize vp9_intra4x4_predict;
--- a/vp9/decoder/vp9_decodframe.c
+++ b/vp9/decoder/vp9_decodframe.c
@@ -172,13 +172,10 @@
  */
 static void skip_recon_mb(VP9D_COMP *pbi, MACROBLOCKD *xd) {
   if (xd->mode_info_context->mbmi.ref_frame == INTRA_FRAME) {
-#if CONFIG_SUPERBLOCKS64
     if (xd->mode_info_context->mbmi.sb_type == BLOCK_SIZE_SB64X64) {
       vp9_build_intra_predictors_sb64uv_s(xd);
       vp9_build_intra_predictors_sb64y_s(xd);
-    } else
-#endif  // CONFIG_SUPERBLOCKS64
-    if (xd->mode_info_context->mbmi.sb_type == BLOCK_SIZE_SB32X32) {
+    } else if (xd->mode_info_context->mbmi.sb_type == BLOCK_SIZE_SB32X32) {
       vp9_build_intra_predictors_sbuv_s(xd);
       vp9_build_intra_predictors_sby_s(xd);
     } else {
@@ -186,7 +183,6 @@
       vp9_build_intra_predictors_mby_s(xd);
     }
   } else {
-#if CONFIG_SUPERBLOCKS64
     if (xd->mode_info_context->mbmi.sb_type == BLOCK_SIZE_SB64X64) {
       vp9_build_inter64x64_predictors_sb(xd,
                                          xd->dst.y_buffer,
@@ -194,9 +190,7 @@
                                          xd->dst.v_buffer,
                                          xd->dst.y_stride,
                                          xd->dst.uv_stride);
-    } else
-#endif  // CONFIG_SUPERBLOCKS64
-    if (xd->mode_info_context->mbmi.sb_type == BLOCK_SIZE_SB32X32) {
+    } else if (xd->mode_info_context->mbmi.sb_type == BLOCK_SIZE_SB32X32) {
       vp9_build_inter32x32_predictors_sb(xd,
                                          xd->dst.y_buffer,
                                          xd->dst.u_buffer,
@@ -701,7 +695,6 @@
       xd->dst.uv_stride, xd->eobs + 16, xd);
 };
 
-#if CONFIG_SUPERBLOCKS64
 static void decode_superblock64(VP9D_COMP *pbi, MACROBLOCKD *xd,
                                 int mb_row, unsigned int mb_col,
                                 BOOL_DECODER* const bc) {
@@ -831,7 +824,6 @@
   xd->left_context = pc->left_context;
   xd->mode_info_context = orig_mi;
 }
-#endif  // CONFIG_SUPERBLOCKS64
 
 static void decode_superblock32(VP9D_COMP *pbi, MACROBLOCKD *xd,
                                 int mb_row, unsigned int mb_col,
@@ -1184,7 +1176,6 @@
   vpx_memset(pc->left_context, 0, sizeof(pc->left_context));
 
   for (mb_col = 0; mb_col < pc->mb_cols; mb_col += 4) {
-#if CONFIG_SUPERBLOCKS64
     if (vp9_read(bc, pc->sb64_coded)) {
       set_offsets(pbi, 64, mb_row, mb_col);
       vp9_decode_mb_mode_mv(pbi, xd, mb_row, mb_col, bc);
@@ -1191,9 +1182,7 @@
       set_refs(pbi, 64, mb_row, mb_col);
       decode_superblock64(pbi, xd, mb_row, mb_col, bc);
       xd->corrupted |= bool_error(bc);
-    } else
-#endif  // CONFIG_SUPERBLOCKS64
-    {
+    } else {
       int j;
 
       for (j = 0; j < 4; j++) {
@@ -1596,9 +1585,7 @@
     }
   }
 
-#if CONFIG_SUPERBLOCKS64
   pc->sb64_coded = vp9_read_literal(&header_bc, 8);
-#endif
   pc->sb32_coded = vp9_read_literal(&header_bc, 8);
 
   /* Read the loop filter level and type */
--- a/vp9/encoder/vp9_bitstream.c
+++ b/vp9/encoder/vp9_bitstream.c
@@ -1122,13 +1122,10 @@
   for (mb_row = 0; mb_row < c->mb_rows; mb_row += 4, m_ptr += 4 * mis) {
     m = m_ptr;
     for (mb_col = 0; mb_col < c->mb_cols; mb_col += 4, m += 4) {
-#if CONFIG_SUPERBLOCKS64
       vp9_write(bc, m->mbmi.sb_type == BLOCK_SIZE_SB64X64, c->sb64_coded);
       if (m->mbmi.sb_type == BLOCK_SIZE_SB64X64) {
         write_modes_b(cpi, m, bc, &tok, tok_end, mb_row, mb_col);
-      } else
-#endif
-      {
+      } else {
         int j;
 
         for (j = 0; j < 4; j++) {
@@ -1689,10 +1686,8 @@
     }
   }
 
-#if CONFIG_SUPERBLOCKS64
   pc->sb64_coded = get_binary_prob(cpi->sb64_count[0], cpi->sb64_count[1]);
   vp9_write_literal(&header_bc, pc->sb64_coded, 8);
-#endif
   pc->sb32_coded = get_binary_prob(cpi->sb32_count[0], cpi->sb32_count[1]);
   vp9_write_literal(&header_bc, pc->sb32_coded, 8);
 
--- a/vp9/encoder/vp9_block.h
+++ b/vp9/encoder/vp9_block.h
@@ -180,9 +180,7 @@
   PICK_MODE_CONTEXT mb_context[4][4];
   // when 4 MBs share coding parameters:
   PICK_MODE_CONTEXT sb32_context[4];
-#if CONFIG_SUPERBLOCKS64
   PICK_MODE_CONTEXT sb64_context;
-#endif  // CONFIG_SUPERBLOCKS64
 
   void (*vp9_short_fdct4x4)(int16_t *input, int16_t *output, int pitch);
   void (*vp9_short_fdct8x4)(int16_t *input, int16_t *output, int pitch);
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -888,7 +888,6 @@
   }
 }
 
-#if CONFIG_SUPERBLOCKS64
 static void pick_sb64_modes(VP9_COMP *cpi,
                             int mb_row,
                             int mb_col,
@@ -924,7 +923,6 @@
                                 totaldist);
   }
 }
-#endif  // CONFIG_SUPERBLOCKS64
 
 static void update_stats(VP9_COMP *cpi) {
   VP9_COMMON *const cm = &cpi->common;
@@ -1054,7 +1052,6 @@
 #endif
 }
 
-#if CONFIG_SUPERBLOCKS64
 static void encode_sb64(VP9_COMP *cpi,
                         int mb_row,
                         int mb_col,
@@ -1094,7 +1091,6 @@
     }
   }
 }
-#endif  // CONFIG_SUPERBLOCKS64
 
 static void encode_sb_row(VP9_COMP *cpi,
                           int mb_row,
@@ -1114,7 +1110,6 @@
     int i;
     int sb32_rate = 0, sb32_dist = 0;
     int is_sb[4];
-#if CONFIG_SUPERBLOCKS64
     int sb64_rate = INT_MAX, sb64_dist;
     ENTROPY_CONTEXT_PLANES l[4], a[4];
     TOKENEXTRA *tp_orig = *tp;
@@ -1121,7 +1116,6 @@
 
     memcpy(&a, cm->above_context + mb_col, sizeof(a));
     memcpy(&l, cm->left_context, sizeof(l));
-#endif  // CONFIG_SUPERBLOCKS64
     for (i = 0; i < 4; i++) {
       const int x_idx = (i & 1) << 1, y_idx = i & 2;
       int mb_rate = 0, mb_dist = 0;
@@ -1163,11 +1157,9 @@
       // pixels of the lower level; also, inverting SB/MB order (big->small
       // instead of small->big) means we can use as threshold for small, which
       // may enable breakouts if RD is not good enough (i.e. faster)
-      encode_sb(cpi, mb_row + y_idx, mb_col + x_idx,
-                !CONFIG_SUPERBLOCKS64, tp, is_sb[i]);
+      encode_sb(cpi, mb_row + y_idx, mb_col + x_idx, 0, tp, is_sb[i]);
     }
 
-#if CONFIG_SUPERBLOCKS64
     memcpy(cm->above_context + mb_col, &a, sizeof(a));
     memcpy(cm->left_context, &l, sizeof(l));
     sb32_rate += vp9_cost_bit(cm->sb64_coded, 0);
@@ -1184,17 +1176,13 @@
             RDCOST(x->rdmult, x->rddiv, sb32_rate, sb32_dist)) {
       is_sb[0] = 2;
       *totalrate += sb64_rate;
-    } else
-#endif
-    {
+    } else {
       *totalrate += sb32_rate;
     }
 
-#if CONFIG_SUPERBLOCKS64
     assert(tp_orig == *tp);
     encode_sb64(cpi, mb_row, mb_col, tp, is_sb);
     assert(tp_orig < *tp);
-#endif  // CONFIG_SUPERBLOCKS64
   }
 }
 
@@ -1244,9 +1232,7 @@
   vp9_zero(cpi->common.fc.mv_ref_ct)
   vp9_zero(cpi->sb_ymode_count)
   vp9_zero(cpi->sb32_count);
-#if CONFIG_SUPERBLOCKS64
   vp9_zero(cpi->sb64_count);
-#endif  // CONFIG_SUPERBLOCKS64
 #if CONFIG_COMP_INTERINTRA_PRED
   vp9_zero(cpi->interintra_count);
   vp9_zero(cpi->interintra_select_count);
@@ -1458,7 +1444,6 @@
   }
 }
 
-#if CONFIG_SUPERBLOCKS64
 static void reset_skip_txfm_size_sb64(VP9_COMP *cpi, MODE_INFO *mi,
                                       int mis, TX_SIZE txfm_max,
                                       int mb_rows_left, int mb_cols_left) {
@@ -1479,7 +1464,6 @@
     set_txfm_flag(mi, mis, ymbs, xmbs, txfm_max);
   }
 }
-#endif
 
 static void reset_skip_txfm_size(VP9_COMP *cpi, TX_SIZE txfm_max) {
   VP9_COMMON *const cm = &cpi->common;
@@ -1490,13 +1474,10 @@
   for (mb_row = 0; mb_row < cm->mb_rows; mb_row += 4, mi_ptr += 4 * mis) {
     mi = mi_ptr;
     for (mb_col = 0; mb_col < cm->mb_cols; mb_col += 4, mi += 4) {
-#if CONFIG_SUPERBLOCKS64
       if (mi->mbmi.sb_type == BLOCK_SIZE_SB64X64) {
         reset_skip_txfm_size_sb64(cpi, mi, mis, txfm_max,
                                   cm->mb_rows - mb_row, cm->mb_cols - mb_col);
-      } else
-#endif  // CONFIG_SUPERBLOCKS64
-      {
+      } else {
         int i;
 
         for (i = 0; i < 4; i++) {
@@ -1924,7 +1905,6 @@
   }
 }
 
-#if CONFIG_SUPERBLOCKS64
 static void update_sb64_skip_coeff_state(VP9_COMP *cpi,
                                          ENTROPY_CONTEXT_PLANES ta[16],
                                          ENTROPY_CONTEXT_PLANES tl[16],
@@ -2038,7 +2018,6 @@
     }
   }
 }
-#endif  // CONFIG_SUPERBLOCKS64
 
 static void encode_macroblock(VP9_COMP *cpi, TOKENEXTRA **t,
                               int recon_yoffset, int recon_uvoffset,
@@ -2541,7 +2520,6 @@
   }
 }
 
-#if CONFIG_SUPERBLOCKS64
 static void encode_superblock64(VP9_COMP *cpi, TOKENEXTRA **t,
                                 int recon_yoffset, int recon_uvoffset,
                                 int output_enabled, int mb_row, int mb_col) {
@@ -2823,4 +2801,3 @@
     }
   }
 }
-#endif  // CONFIG_SUPERBLOCKS64
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -1618,9 +1618,7 @@
   cm->prob_gf_coded                 = 128;
   cm->prob_intra_coded              = 63;
   cm->sb32_coded                    = 200;
-#if CONFIG_SUPERBLOCKS64
   cm->sb64_coded                    = 200;
-#endif
   for (i = 0; i < COMP_PRED_CONTEXTS; i++)
     cm->prob_comppred[i]         = 128;
   for (i = 0; i < TX_SIZE_MAX_SB - 1; i++)
@@ -1825,12 +1823,10 @@
       vp9_variance_halfpixvar32x32_hv, vp9_sad32x32x3, vp9_sad32x32x8,
       vp9_sad32x32x4d)
 
-#if CONFIG_SUPERBLOCKS64
   BFP(BLOCK_64X64, vp9_sad64x64, vp9_variance64x64, vp9_sub_pixel_variance64x64,
       vp9_variance_halfpixvar64x64_h, vp9_variance_halfpixvar64x64_v,
       vp9_variance_halfpixvar64x64_hv, vp9_sad64x64x3, vp9_sad64x64x8,
       vp9_sad64x64x4d)
-#endif
 
   BFP(BLOCK_16X16, vp9_sad16x16, vp9_variance16x16, vp9_sub_pixel_variance16x16,
        vp9_variance_halfpixvar16x16_h, vp9_variance_halfpixvar16x16_v,
--- a/vp9/encoder/vp9_onyx_int.h
+++ b/vp9/encoder/vp9_onyx_int.h
@@ -292,9 +292,7 @@
   BLOCK_16X16,
   BLOCK_MAX_SEGMENTS,
   BLOCK_32X32 = BLOCK_MAX_SEGMENTS,
-#if CONFIG_SUPERBLOCKS64
   BLOCK_64X64,
-#endif  // CONFIG_SUPERBLOCKS64
   BLOCK_MAX_SB_SEGMENTS,
 };
 
@@ -475,9 +473,7 @@
   int cq_target_quality;
 
   int sb32_count[2];
-#if CONFIG_SUPERBLOCKS64
   int sb64_count[2];
-#endif
   int sb_ymode_count [VP9_I32X32_MODES];
   int ymode_count[VP9_YMODES];        /* intra MB type cts this frame */
   int bmode_count[VP9_NKF_BINTRAMODES];
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -982,7 +982,6 @@
   xd->left_context = orig_left;
 }
 
-#if CONFIG_SUPERBLOCKS64
 static void super_block_64_yrd(VP9_COMP *cpi,
                                MACROBLOCK *x, int *rate, int *distortion,
                                int *skip,
@@ -1080,7 +1079,6 @@
   xd->above_context = orig_above;
   xd->left_context = orig_left;
 }
-#endif  // CONFIG_SUPERBLOCKS64
 
 static void copy_predictor_8x8(uint8_t *dst, const uint8_t *predictor) {
   const unsigned int *p = (const unsigned int *)predictor;
@@ -1374,7 +1372,6 @@
   return best_rd;
 }
 
-#if CONFIG_SUPERBLOCKS64
 static int64_t rd_pick_intra_sb64y_mode(VP9_COMP *cpi,
                                         MACROBLOCK *x,
                                         int *rate,
@@ -1414,7 +1411,6 @@
 
   return best_rd;
 }
-#endif  // CONFIG_SUPERBLOCKS64
 
 static int64_t rd_pick_intra16x16mby_mode(VP9_COMP *cpi,
                                           MACROBLOCK *x,
@@ -1893,7 +1889,6 @@
   return RDCOST(x->rdmult, x->rddiv, *rate, *distortion);
 }
 
-#if CONFIG_SUPERBLOCKS64
 static void super_block_64_uvrd(MACROBLOCK *x, int *rate,
                                 int *distortion, int *skip);
 static int64_t rd_inter64x64_uv(VP9_COMP *cpi, MACROBLOCK *x, int *rate,
@@ -1901,7 +1896,6 @@
   super_block_64_uvrd(x, rate, distortion, skip);
   return RDCOST(x->rdmult, x->rddiv, *rate, *distortion);
 }
-#endif  // CONFIG_SUPERBLOCKS64
 
 static int64_t rd_inter4x4_uv(VP9_COMP *cpi, MACROBLOCK *x, int *rate,
                               int *distortion, int *skip, int fullpixel) {
@@ -2102,7 +2096,6 @@
   }
 }
 
-#if CONFIG_SUPERBLOCKS64
 static void super_block_64_uvrd(MACROBLOCK *x,
                                 int *rate,
                                 int *distortion,
@@ -2184,7 +2177,6 @@
   xd->left_context = tl_orig;
   xd->above_context = ta_orig;
 }
-#endif  // CONFIG_SUPERBLOCKS64
 
 static int64_t rd_pick_intra_sbuv_mode(VP9_COMP *cpi,
                                        MACROBLOCK *x,
@@ -2223,7 +2215,6 @@
   return best_rd;
 }
 
-#if CONFIG_SUPERBLOCKS64
 static int64_t rd_pick_intra_sb64uv_mode(VP9_COMP *cpi,
                                          MACROBLOCK *x,
                                          int *rate,
@@ -2260,7 +2251,6 @@
 
   return best_rd;
 }
-#endif  // CONFIG_SUPERBLOCKS64
 
 int vp9_cost_mv_ref(VP9_COMP *cpi,
                     MB_PREDICTION_MODE m,
@@ -3548,7 +3538,6 @@
   }
 #endif
 
-#if CONFIG_SUPERBLOCKS64
   if (block_size == BLOCK_64X64) {
     vp9_build_inter64x64_predictors_sb(xd,
                                        xd->dst.y_buffer,
@@ -3556,9 +3545,7 @@
                                        xd->dst.v_buffer,
                                        xd->dst.y_stride,
                                        xd->dst.uv_stride);
-  } else
-#endif  // CONFIG_SUPERBLOCKS64
-  if (block_size == BLOCK_32X32) {
+  } else if (block_size == BLOCK_32X32) {
     vp9_build_inter32x32_predictors_sb(xd,
                                        xd->dst.y_buffer,
                                        xd->dst.u_buffer,
@@ -3587,13 +3574,10 @@
     if (threshold < x->encode_breakout)
       threshold = x->encode_breakout;
 
-#if CONFIG_SUPERBLOCKS64
     if (block_size == BLOCK_64X64) {
       var = vp9_variance64x64(*(b->base_src), b->src_stride,
                               xd->dst.y_buffer, xd->dst.y_stride, &sse);
-    } else
-#endif  // CONFIG_SUPERBLOCKS64
-    if (block_size == BLOCK_32X32) {
+    } else if (block_size == BLOCK_32X32) {
       var = vp9_variance32x32(*(b->base_src), b->src_stride,
                               xd->dst.y_buffer, xd->dst.y_stride, &sse);
     } else {
@@ -3611,7 +3595,6 @@
         // Check u and v to make sure skip is ok
         int sse2;
 
-#if CONFIG_SUPERBLOCKS64
         if (block_size == BLOCK_64X64) {
           unsigned int sse2u, sse2v;
           var = vp9_variance32x32(x->src.u_buffer, x->src.uv_stride,
@@ -3619,9 +3602,7 @@
           var = vp9_variance32x32(x->src.v_buffer, x->src.uv_stride,
                                   xd->dst.v_buffer, xd->dst.uv_stride, &sse2v);
           sse2 = sse2u + sse2v;
-        } else
-#endif  // CONFIG_SUPERBLOCKS64
-        if (block_size == BLOCK_32X32) {
+        } else if (block_size == BLOCK_32X32) {
           unsigned int sse2u, sse2v;
           var = vp9_variance16x16(x->src.u_buffer, x->src.uv_stride,
                                   xd->dst.u_buffer, xd->dst.uv_stride, &sse2u);
@@ -3661,7 +3642,6 @@
   }
 
   if (!x->skip) {
-#if CONFIG_SUPERBLOCKS64
     if (block_size == BLOCK_64X64) {
       int skippable_y, skippable_uv;
 
@@ -3677,9 +3657,7 @@
       *rate2 += *rate_uv;
       *distortion += *distortion_uv;
       *skippable = skippable_y && skippable_uv;
-    } else
-#endif  // CONFIG_SUPERBLOCKS64
-    if (block_size == BLOCK_32X32) {
+    } else if (block_size == BLOCK_32X32) {
       int skippable_y, skippable_uv;
 
       // Y cost and distortion
@@ -4540,7 +4518,6 @@
   }
 }
 
-#if CONFIG_SUPERBLOCKS64
 void vp9_rd_pick_intra_mode_sb64(VP9_COMP *cpi, MACROBLOCK *x,
                                  int *returnrate,
                                  int *returndist) {
@@ -4569,7 +4546,6 @@
     *returndist = dist_y + (dist_uv >> 2);
   }
 }
-#endif  // CONFIG_SUPERBLOCKS64
 
 void vp9_rd_pick_intra_mode(VP9_COMP *cpi, MACROBLOCK *x,
                             int *returnrate, int *returndist) {
@@ -4800,7 +4776,6 @@
     frame_mv[ZEROMV][ref_frame].as_int = 0;
   }
 
-#if CONFIG_SUPERBLOCKS64
   if (block_size == BLOCK_64X64) {
     mbmi->mode = DC_PRED;
     if (cm->txfm_mode == ONLY_4X4 || cm->txfm_mode == TX_MODE_SELECT) {
@@ -4824,9 +4799,7 @@
       mode_uv_16x16 = mbmi->uv_mode;
     }
 #endif  // CONFIG_TX32X32
-  } else
-#endif  // CONFIG_SUPERBLOCKS64
-  {
+  } else {
     assert(block_size == BLOCK_32X32);
     mbmi->mode = DC_PRED;
     if (cm->txfm_mode == ONLY_4X4 || cm->txfm_mode == TX_MODE_SELECT) {
@@ -4977,14 +4950,11 @@
     }
 
     if (ref_frame == INTRA_FRAME) {
-#if CONFIG_SUPERBLOCKS64
       if (block_size == BLOCK_64X64) {
         vp9_build_intra_predictors_sb64y_s(xd);
         super_block_64_yrd(cpi, x, &rate_y, &distortion_y,
                            &skippable, txfm_cache);
-      } else
-#endif  // CONFIG_SUPERBLOCKS64
-      {
+      } else {
         assert(block_size == BLOCK_32X32);
         vp9_build_intra_predictors_sby_s(xd);
         super_block_yrd(cpi, x, &rate_y, &distortion_y,
@@ -5296,13 +5266,9 @@
 
  end:
   {
-#if CONFIG_SUPERBLOCKS64
     PICK_MODE_CONTEXT *p = (block_size == BLOCK_32X32) ?
                             &x->sb32_context[xd->sb_index] :
                             &x->sb64_context;
-#else
-    PICK_MODE_CONTEXT *p = &x->sb32_context[xd->sb_index];
-#endif
     store_coding_context(x, p, best_mode_index, NULL,
                          &mbmi->ref_mvs[mbmi->ref_frame][0],
                          &mbmi->ref_mvs[mbmi->second_ref_frame < 0 ? 0 :
@@ -5321,7 +5287,6 @@
                                    returnrate, returndistortion, BLOCK_32X32);
 }
 
-#if CONFIG_SUPERBLOCKS64
 int64_t vp9_rd_pick_inter_mode_sb64(VP9_COMP *cpi, MACROBLOCK *x,
                                     int recon_yoffset, int recon_uvoffset,
                                     int *returnrate,
@@ -5329,7 +5294,6 @@
   return vp9_rd_pick_inter_mode_sb(cpi, x, recon_yoffset, recon_uvoffset,
                                    returnrate, returndistortion, BLOCK_64X64);
 }
-#endif  // CONFIG_SUPERBLOCKS64
 
 void vp9_pick_mode_inter_macroblock(VP9_COMP *cpi, MACROBLOCK *x,
                                     int recon_yoffset,
--- a/vp9/encoder/vp9_segmentation.c
+++ b/vp9/encoder/vp9_segmentation.c
@@ -221,13 +221,10 @@
   for (mb_row = 0; mb_row < cm->mb_rows; mb_row += 4, mi_ptr += 4 * mis) {
     mi = mi_ptr;
     for (mb_col = 0; mb_col < cm->mb_cols; mb_col += 4, mi += 4) {
-#if CONFIG_SUPERBLOCKS64
       if (mi->mbmi.sb_type == BLOCK_SIZE_SB64X64) {
         count_segs(cpi, mi, no_pred_segcounts, temporal_predictor_count,
                    t_unpred_seg_counts, 4, mb_row, mb_col);
-      } else
-#endif
-      {
+      } else {
         for (i = 0; i < 4; i++) {
           int x_idx = (i & 1) << 1, y_idx = i & 2;
           MODE_INFO *sb_mi = mi + y_idx * mis + x_idx;
--- a/vp9/encoder/vp9_variance_c.c
+++ b/vp9/encoder/vp9_variance_c.c
@@ -24,7 +24,6 @@
   return sum;
 }
 
-#if CONFIG_SUPERBLOCKS64
 unsigned int vp9_variance64x64_c(const uint8_t *src_ptr,
                                  int  source_stride,
                                  const uint8_t *ref_ptr,
@@ -37,7 +36,6 @@
   *sse = var;
   return (var - (((int64_t)avg * avg) >> 12));
 }
-#endif  // CONFIG_SUPERBLOCKS64
 
 unsigned int vp9_variance32x32_c(const uint8_t *src_ptr,
                                  int  source_stride,
@@ -197,7 +195,6 @@
   return vp9_variance16x16_c(temp2, 16, dst_ptr, dst_pixels_per_line, sse);
 }
 
-#if CONFIG_SUPERBLOCKS64
 unsigned int vp9_sub_pixel_variance64x64_c(const uint8_t *src_ptr,
                                            int  src_pixels_per_line,
                                            int  xoffset,
@@ -218,7 +215,6 @@
 
   return vp9_variance64x64_c(temp2, 64, dst_ptr, dst_pixels_per_line, sse);
 }
-#endif  // CONFIG_SUPERBLOCKS64
 
 unsigned int vp9_sub_pixel_variance32x32_c(const uint8_t *src_ptr,
                                            int  src_pixels_per_line,
@@ -258,7 +254,6 @@
                                        ref_ptr, recon_stride, sse);
 }
 
-#if CONFIG_SUPERBLOCKS64
 unsigned int vp9_variance_halfpixvar64x64_h_c(const uint8_t *src_ptr,
                                               int  source_stride,
                                               const uint8_t *ref_ptr,
@@ -267,9 +262,7 @@
   return vp9_sub_pixel_variance64x64_c(src_ptr, source_stride, 8, 0,
                                        ref_ptr, recon_stride, sse);
 }
-#endif  // CONFIG_SUPERBLOCKS64
 
-
 unsigned int vp9_variance_halfpixvar16x16_v_c(const uint8_t *src_ptr,
                                               int  source_stride,
                                               const uint8_t *ref_ptr,
@@ -288,7 +281,6 @@
                                        ref_ptr, recon_stride, sse);
 }
 
-#if CONFIG_SUPERBLOCKS64
 unsigned int vp9_variance_halfpixvar64x64_v_c(const uint8_t *src_ptr,
                                               int  source_stride,
                                               const uint8_t *ref_ptr,
@@ -297,9 +289,7 @@
   return vp9_sub_pixel_variance64x64_c(src_ptr, source_stride, 0, 8,
                                        ref_ptr, recon_stride, sse);
 }
-#endif  // #if CONFIG_SUPERBLOCKS64
 
-
 unsigned int vp9_variance_halfpixvar16x16_hv_c(const uint8_t *src_ptr,
                                                int  source_stride,
                                                const uint8_t *ref_ptr,
@@ -318,7 +308,6 @@
                                        ref_ptr, recon_stride, sse);
 }
 
-#if CONFIG_SUPERBLOCKS64
 unsigned int vp9_variance_halfpixvar64x64_hv_c(const uint8_t *src_ptr,
                                                int  source_stride,
                                                const uint8_t *ref_ptr,
@@ -327,7 +316,6 @@
   return vp9_sub_pixel_variance64x64_c(src_ptr, source_stride, 8, 8,
                                        ref_ptr, recon_stride, sse);
 }
-#endif  // CONFIG_SUPERBLOCKS64
 
 unsigned int vp9_sub_pixel_mse16x16_c(const uint8_t *src_ptr,
                                       int  src_pixels_per_line,
@@ -355,7 +343,6 @@
   return *sse;
 }
 
-#if CONFIG_SUPERBLOCKS64
 unsigned int vp9_sub_pixel_mse64x64_c(const uint8_t *src_ptr,
                                       int  src_pixels_per_line,
                                       int  xoffset,
@@ -368,7 +355,6 @@
                                 dst_pixels_per_line, sse);
   return *sse;
 }
-#endif  // CONFIG_SUPERBLOCKS64
 
 unsigned int vp9_sub_pixel_variance16x8_c(const uint8_t *src_ptr,
                                           int  src_pixels_per_line,