]> granicus.if.org Git - libvpx/commitdiff
Merge superblocks64 experiment.
authorRonald S. Bultje <rbultje@google.com>
Thu, 10 Jan 2013 01:21:28 +0000 (17:21 -0800)
committerRonald S. Bultje <rbultje@google.com>
Thu, 10 Jan 2013 01:21:40 +0000 (17:21 -0800)
Change-Id: If6c88752dffdb566f8d4322f135145270716fb8e

17 files changed:
configure
vp9/common/vp9_blockd.h
vp9/common/vp9_findnearmv.c
vp9/common/vp9_onyxc_int.h
vp9/common/vp9_reconinter.c
vp9/common/vp9_reconinter.h
vp9/common/vp9_reconintra.c
vp9/common/vp9_rtcd_defs.sh
vp9/decoder/vp9_decodframe.c
vp9/encoder/vp9_bitstream.c
vp9/encoder/vp9_block.h
vp9/encoder/vp9_encodeframe.c
vp9/encoder/vp9_onyx_if.c
vp9/encoder/vp9_onyx_int.h
vp9/encoder/vp9_rdopt.c
vp9/encoder/vp9_segmentation.c
vp9/encoder/vp9_variance_c.c

index 0a58251949043a1211f1016f57006bd705d2436c..8dc44fca3d6c49a9923617d057240ff8df042e40 100755 (executable)
--- a/configure
+++ b/configure
@@ -239,8 +239,6 @@ HAVE_LIST="
 EXPERIMENT_LIST="
     csm
     comp_intra_pred
-    superblocks
-    superblocks64
     pred_filter
     lossless
     subpelrefmv
index 26f4a2ff18694344928e4ec153036931b29a1d7c..5de6d2ecc7e153f2498da499e00c662282dd1015 100644 (file)
@@ -232,9 +232,7 @@ typedef enum {
 typedef enum {
   BLOCK_SIZE_MB16X16 = 0,
   BLOCK_SIZE_SB32X32 = 1,
-#if CONFIG_SUPERBLOCKS64
   BLOCK_SIZE_SB64X64 = 2,
-#endif
 } BLOCK_SIZE_TYPE;
 
 typedef struct {
index b92e7d58b262a8163c7e6e779db977960a8747ee..92e0a06030839a7bb4011b9073734f548b0bc038 100644 (file)
@@ -198,7 +198,6 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
                                    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 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
                                    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 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
                                      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 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
                                      xd->dst.y_stride, &sse);
         score += sse;
       }
-#endif
     }
 #else
     row_offset = (this_mv.as_mv.row > 0) ?
@@ -263,14 +259,12 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
         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);
         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 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
                              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 @@ void vp9_find_best_ref_mvs(MACROBLOCKD *xd,
                              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.
index 440125f919307fb00a29c4fe9647b6b1a8396f6d..1dbe7f9f8f864496bc3becff1a4cf9c3114db447 100644 (file)
@@ -240,9 +240,7 @@ typedef struct VP9Common {
   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];
index e6561128c57fc4a98753c78a210e76665d6978aa..20de7b7f1d8b5f08c189d70384c5bcc92cb2c02b 100644 (file)
@@ -614,7 +614,6 @@ void vp9_build_inter32x32_predictors_sb(MACROBLOCKD *x,
 #endif
 }
 
-#if CONFIG_SUPERBLOCKS64
 void vp9_build_inter64x64_predictors_sb(MACROBLOCKD *x,
                                         uint8_t *dst_y,
                                         uint8_t *dst_u,
@@ -678,7 +677,6 @@ void vp9_build_inter64x64_predictors_sb(MACROBLOCKD *x,
   }
 #endif
 }
-#endif  // CONFIG_SUPERBLOCKS64
 
 /*
  * The following functions should be called after an initial
index 12b4b2514223bd64fefb8ec1e2706eb6f269a23f..89868b95efcadda7411b92d0cc3287e87f3f6950 100644 (file)
@@ -54,14 +54,12 @@ extern void vp9_build_inter32x32_predictors_sb(MACROBLOCKD *x,
                                                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,
                                                uint8_t *dst_v,
                                                int dst_ystride,
                                                int dst_uvstride);
-#endif  // CONFIG_SUPERBLOCKS64
 
 extern void vp9_build_inter_predictors_mb(MACROBLOCKD *xd);
 
index 0504edaeb1db4ecb3070a32f5dd2058f138eb016..eb99285f4c717eb8f94d30be3fa9cc4463ac22e2 100644 (file)
@@ -703,7 +703,6 @@ void vp9_build_interintra_32x32_predictors_sb(MACROBLOCKD *xd,
   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 @@ void vp9_build_interintra_64x64_predictors_sb(MACROBLOCKD *xd,
   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,14 +766,12 @@ void vp9_build_intra_predictors_sby_s(MACROBLOCKD *xd) {
                                       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,
                                       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,14 +830,12 @@ void vp9_build_intra_predictors_sbuv_s(MACROBLOCKD *xd) {
                                            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,
                                            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) {
index 329c0929e8e8dc19bbdaf9abb21f662f80a166ad..9d1f5156879da95637a8503d0761875adf215672 100644 (file)
@@ -172,16 +172,12 @@ specialize vp9_build_intra_predictors_mbuv_s;
 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;
 
index 47d23ecbd63cab0d36709a34b0a06855b5e2f720..8d33dbf780458ef90f2715e6cf6185e2ffbda5a7 100644 (file)
@@ -172,13 +172,10 @@ static void mb_init_dequantizer(VP9D_COMP *pbi, MACROBLOCKD *xd) {
  */
 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 @@ static void skip_recon_mb(VP9D_COMP *pbi, MACROBLOCKD *xd) {
       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 @@ static void skip_recon_mb(VP9D_COMP *pbi, MACROBLOCKD *xd) {
                                          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 @@ static void decode_4x4_sb(VP9D_COMP *pbi, MACROBLOCKD *xd,
       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 @@ static void decode_superblock64(VP9D_COMP *pbi, MACROBLOCKD *xd,
   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,16 +1176,13 @@ static void decode_sb_row(VP9D_COMP *pbi, VP9_COMMON *pc,
   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);
       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 @@ int vp9_decode_frame(VP9D_COMP *pbi, const unsigned char **p_data_end) {
     }
   }
 
-#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 */
index a7dac74e3db73b92c5967c143311bff90dc916d7..ba06bffbf06e44a90d76492c44f70b63bf92d340 100644 (file)
@@ -1122,13 +1122,10 @@ static void write_modes(VP9_COMP *cpi, vp9_writer* const bc) {
   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 @@ void vp9_pack_bitstream(VP9_COMP *cpi, unsigned char *dest,
     }
   }
 
-#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);
 
index 18e5f73ff3e84f70d5f4acad454a54b1a3510f7a..f856daddf8ffc955c32b644baf22f3a147421af5 100644 (file)
@@ -180,9 +180,7 @@ typedef struct macroblock {
   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);
index d8478a15bcb56a5a5663886a353ee8c2e83ec0f3..0abf22cff4f8ccfdf35329954129cee010613991 100644 (file)
@@ -888,7 +888,6 @@ static void pick_sb_modes(VP9_COMP *cpi,
   }
 }
 
-#if CONFIG_SUPERBLOCKS64
 static void pick_sb64_modes(VP9_COMP *cpi,
                             int mb_row,
                             int mb_col,
@@ -924,7 +923,6 @@ static void pick_sb64_modes(VP9_COMP *cpi,
                                 totaldist);
   }
 }
-#endif  // CONFIG_SUPERBLOCKS64
 
 static void update_stats(VP9_COMP *cpi) {
   VP9_COMMON *const cm = &cpi->common;
@@ -1054,7 +1052,6 @@ static void encode_sb(VP9_COMP *cpi,
 #endif
 }
 
-#if CONFIG_SUPERBLOCKS64
 static void encode_sb64(VP9_COMP *cpi,
                         int mb_row,
                         int mb_col,
@@ -1094,7 +1091,6 @@ static void encode_sb64(VP9_COMP *cpi,
     }
   }
 }
-#endif  // CONFIG_SUPERBLOCKS64
 
 static void encode_sb_row(VP9_COMP *cpi,
                           int mb_row,
@@ -1114,14 +1110,12 @@ static void encode_sb_row(VP9_COMP *cpi,
     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;
 
     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 @@ static void encode_sb_row(VP9_COMP *cpi,
       // 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 @@ static void encode_sb_row(VP9_COMP *cpi,
             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 @@ static void init_encode_frame_mb_context(VP9_COMP *cpi) {
   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 @@ static void reset_skip_txfm_size_sb32(VP9_COMP *cpi, MODE_INFO *mi,
   }
 }
 
-#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 @@ static void reset_skip_txfm_size_sb64(VP9_COMP *cpi, MODE_INFO *mi,
     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 @@ static void reset_skip_txfm_size(VP9_COMP *cpi, TX_SIZE txfm_max) {
   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 @@ static void update_sb_skip_coeff_state(VP9_COMP *cpi,
   }
 }
 
-#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 @@ static void update_sb64_skip_coeff_state(VP9_COMP *cpi,
     }
   }
 }
-#endif  // CONFIG_SUPERBLOCKS64
 
 static void encode_macroblock(VP9_COMP *cpi, TOKENEXTRA **t,
                               int recon_yoffset, int recon_uvoffset,
@@ -2541,7 +2520,6 @@ static void encode_superblock32(VP9_COMP *cpi, TOKENEXTRA **t,
   }
 }
 
-#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 @@ static void encode_superblock64(VP9_COMP *cpi, TOKENEXTRA **t,
     }
   }
 }
-#endif  // CONFIG_SUPERBLOCKS64
index f08ea6feb3d0ae5d509810a66fad5a1caa8e5e29..6a4c62496589efa18a25583d963257f13c457835 100644 (file)
@@ -1618,9 +1618,7 @@ VP9_PTR vp9_create_compressor(VP9_CONFIG *oxcf) {
   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_PTR vp9_create_compressor(VP9_CONFIG *oxcf) {
       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,
index d917c0e7f6ae15c05ce7b6fccf40c2891976c77c..403335047570520277ad150f694261609393388a 100644 (file)
@@ -292,9 +292,7 @@ enum BlockSize {
   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 @@ typedef struct VP9_COMP {
   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];
index 7c8f41d84480a476da218f25554c99108f393013..a8ece2c58b5f7b7f6c24ef724ec3f3a2dab312f2 100644 (file)
@@ -982,7 +982,6 @@ static void super_block_yrd(VP9_COMP *cpi,
   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 @@ static void super_block_64_yrd(VP9_COMP *cpi,
   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 @@ static int64_t rd_pick_intra_sby_mode(VP9_COMP *cpi,
   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 @@ static int64_t rd_pick_intra_sb64y_mode(VP9_COMP *cpi,
 
   return best_rd;
 }
-#endif  // CONFIG_SUPERBLOCKS64
 
 static int64_t rd_pick_intra16x16mby_mode(VP9_COMP *cpi,
                                           MACROBLOCK *x,
@@ -1893,7 +1889,6 @@ static int64_t rd_inter32x32_uv(VP9_COMP *cpi, MACROBLOCK *x, int *rate,
   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 @@ static int64_t rd_inter64x64_uv(VP9_COMP *cpi, MACROBLOCK *x, int *rate,
   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 @@ static void super_block_uvrd(MACROBLOCK *x,
   }
 }
 
-#if CONFIG_SUPERBLOCKS64
 static void super_block_64_uvrd(MACROBLOCK *x,
                                 int *rate,
                                 int *distortion,
@@ -2184,7 +2177,6 @@ static void super_block_64_uvrd(MACROBLOCK *x,
   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 @@ static int64_t rd_pick_intra_sbuv_mode(VP9_COMP *cpi,
   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 @@ static int64_t rd_pick_intra_sb64uv_mode(VP9_COMP *cpi,
 
   return best_rd;
 }
-#endif  // CONFIG_SUPERBLOCKS64
 
 int vp9_cost_mv_ref(VP9_COMP *cpi,
                     MB_PREDICTION_MODE m,
@@ -3548,7 +3538,6 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
   }
 #endif
 
-#if CONFIG_SUPERBLOCKS64
   if (block_size == BLOCK_64X64) {
     vp9_build_inter64x64_predictors_sb(xd,
                                        xd->dst.y_buffer,
@@ -3556,9 +3545,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
                                        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 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
     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 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
         // 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 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
           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 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
   }
 
   if (!x->skip) {
-#if CONFIG_SUPERBLOCKS64
     if (block_size == BLOCK_64X64) {
       int skippable_y, skippable_uv;
 
@@ -3677,9 +3657,7 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
       *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 @@ void vp9_rd_pick_intra_mode_sb32(VP9_COMP *cpi, MACROBLOCK *x,
   }
 }
 
-#if CONFIG_SUPERBLOCKS64
 void vp9_rd_pick_intra_mode_sb64(VP9_COMP *cpi, MACROBLOCK *x,
                                  int *returnrate,
                                  int *returndist) {
@@ -4569,7 +4546,6 @@ void vp9_rd_pick_intra_mode_sb64(VP9_COMP *cpi, MACROBLOCK *x,
     *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 @@ static int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
     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 @@ static int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
       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 @@ static int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
     }
 
     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 @@ static int64_t vp9_rd_pick_inter_mode_sb(VP9_COMP *cpi, MACROBLOCK *x,
 
  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 @@ int64_t vp9_rd_pick_inter_mode_sb32(VP9_COMP *cpi, MACROBLOCK *x,
                                    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 @@ int64_t vp9_rd_pick_inter_mode_sb64(VP9_COMP *cpi, MACROBLOCK *x,
   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,
index 2ef7be2a3a2b5f53134be3e52345e9ea5d8b395f..49195e80c2a794194b2110e54eb61769b4b9e392 100644 (file)
@@ -221,13 +221,10 @@ void vp9_choose_segmap_coding_method(VP9_COMP *cpi) {
   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;
index 4eee6ae565fa221d933365efb34c6d1ea936c3e8..d03e285c6340f43a12dcf7fb2bca23a96b4db28e 100644 (file)
@@ -24,7 +24,6 @@ unsigned int vp9_get_mb_ss_c(const int16_t *src_ptr) {
   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 @@ unsigned int vp9_variance64x64_c(const uint8_t *src_ptr,
   *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 @@ unsigned int vp9_sub_pixel_variance16x16_c(const uint8_t *src_ptr,
   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 @@ unsigned int vp9_sub_pixel_variance64x64_c(const uint8_t *src_ptr,
 
   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 @@ unsigned int vp9_variance_halfpixvar32x32_h_c(const uint8_t *src_ptr,
                                        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,8 +262,6 @@ unsigned int vp9_variance_halfpixvar64x64_h_c(const uint8_t *src_ptr,
   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,
@@ -288,7 +281,6 @@ unsigned int vp9_variance_halfpixvar32x32_v_c(const uint8_t *src_ptr,
                                        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,8 +289,6 @@ unsigned int vp9_variance_halfpixvar64x64_v_c(const uint8_t *src_ptr,
   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,
@@ -318,7 +308,6 @@ unsigned int vp9_variance_halfpixvar32x32_hv_c(const uint8_t *src_ptr,
                                        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 @@ unsigned int vp9_variance_halfpixvar64x64_hv_c(const uint8_t *src_ptr,
   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 @@ unsigned int vp9_sub_pixel_mse32x32_c(const uint8_t *src_ptr,
   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 @@ unsigned int vp9_sub_pixel_mse64x64_c(const uint8_t *src_ptr,
                                 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,