Make ext-inter use new rectangular intra predictor

Now that https://aomedia-review.googlesource.com/#/c/6729/
has been merged, build_intra_predictors_for_interintra() is
now redundant, so replace it by a direct call to
av1_predict_intra_block() and remove the old function.

Reset rect_interintra back to 1.

To do this, we need to make the intra predictor take a
BLOCK_SIZE instead of a TX_SIZE. This is because we need to
be able to predict 32x64 and 64x32 blocks, but there is no
TX_32X64 or TX_64X32.

No effect on output or performance.

Change-Id: I8c185a211c97a85012cc54ec293c785a693608ed
diff --git a/av1/common/reconinter.c b/av1/common/reconinter.c
index a352ce5..c0c21ce 100644
--- a/av1/common/reconinter.c
+++ b/av1/common/reconinter.c
@@ -2588,113 +2588,18 @@
 }
 #endif  // CONFIG_AOM_HIGHBITDEPTH
 
-// TODO(urvang/davidbarker): Refactor with av1_predict_intra_block().
-static void build_intra_predictors_for_interintra(MACROBLOCKD *xd, uint8_t *ref,
-                                                  int ref_stride, uint8_t *dst,
-                                                  int dst_stride,
-                                                  PREDICTION_MODE mode,
-                                                  BLOCK_SIZE bsize, int plane) {
-  struct macroblockd_plane *const pd = &xd->plane[plane];
-  BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, &xd->plane[plane]);
-  const int bwl = block_size_wide[plane_bsize];
-  const int bhl = block_size_high[plane_bsize];
-  TX_SIZE max_tx_size = max_txsize_lookup[plane_bsize];
-#if USE_RECT_INTERINTRA
-  const int pxbw = block_size_wide[plane_bsize];
-  const int pxbh = block_size_high[plane_bsize];
-#if CONFIG_AOM_HIGHBITDEPTH
-  uint16_t tmp16[MAX_SB_SIZE];
-#endif
-  uint8_t tmp[MAX_SB_SIZE];
-#endif
-
-  if (bwl == bhl) {
-    av1_predict_intra_block(xd, pd->width, pd->height, max_tx_size, mode, ref,
-                            ref_stride, dst, dst_stride, 0, 0, plane);
-#if !USE_RECT_INTERINTRA
-  } else {
-    assert(0);
-  }
-#else
-  } else if (bwl < bhl) {
-    uint8_t *src_2 = ref + pxbw * ref_stride;
-    uint8_t *dst_2 = dst + pxbw * dst_stride;
-    av1_predict_intra_block(xd, pd->width, pd->height, max_tx_size, mode, ref,
-                            ref_stride, dst, dst_stride, 0, 0, plane);
-#if CONFIG_AOM_HIGHBITDEPTH
-    if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
-      uint16_t *src_216 = CONVERT_TO_SHORTPTR(src_2);
-      uint16_t *dst_216 = CONVERT_TO_SHORTPTR(dst_2);
-      memcpy(tmp16, src_216 - ref_stride, sizeof(*src_216) * pxbw);
-      memcpy(src_216 - ref_stride, dst_216 - dst_stride,
-             sizeof(*src_216) * pxbw);
-    } else {
-#endif  // CONFIG_AOM_HIGHBITDEPTH
-      memcpy(tmp, src_2 - ref_stride, sizeof(*src_2) * pxbw);
-      memcpy(src_2 - ref_stride, dst_2 - dst_stride, sizeof(*src_2) * pxbw);
-#if CONFIG_AOM_HIGHBITDEPTH
-    }
-#endif
-    av1_predict_intra_block(xd, pd->width, pd->height, max_tx_size, mode, src_2,
-                            ref_stride, dst_2, dst_stride, 0,
-                            mi_size_wide[plane_bsize], plane);
-#if CONFIG_AOM_HIGHBITDEPTH
-    if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
-      uint16_t *src_216 = CONVERT_TO_SHORTPTR(src_2);
-      memcpy(src_216 - ref_stride, tmp16, sizeof(*src_216) * pxbw);
-    } else {
-#endif  // CONFIG_AOM_HIGHBITDEPTH
-      memcpy(src_2 - ref_stride, tmp, sizeof(*src_2) * pxbw);
-#if CONFIG_AOM_HIGHBITDEPTH
-    }
-#endif
-  } else {  // bwl > bhl
-    int i;
-    uint8_t *src_2 = ref + pxbh;
-    uint8_t *dst_2 = dst + pxbh;
-    av1_predict_intra_block(xd, pd->width, pd->height, max_tx_size, mode, ref,
-                            ref_stride, dst, dst_stride, 0, 0, plane);
-#if CONFIG_AOM_HIGHBITDEPTH
-    if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
-      uint16_t *src_216 = CONVERT_TO_SHORTPTR(src_2);
-      uint16_t *dst_216 = CONVERT_TO_SHORTPTR(dst_2);
-      for (i = 0; i < pxbh; ++i) {
-        tmp16[i] = src_216[i * ref_stride - 1];
-        src_216[i * ref_stride - 1] = dst_216[i * dst_stride - 1];
-      }
-    } else {
-#endif  // CONFIG_AOM_HIGHBITDEPTH
-      for (i = 0; i < pxbh; ++i) {
-        tmp[i] = src_2[i * ref_stride - 1];
-        src_2[i * ref_stride - 1] = dst_2[i * dst_stride - 1];
-      }
-#if CONFIG_AOM_HIGHBITDEPTH
-    }
-#endif
-    av1_predict_intra_block(xd, pd->width, pd->height, max_tx_size, mode, src_2,
-                            ref_stride, dst_2, dst_stride,
-                            mi_size_high[plane_bsize], 0, plane);
-#if CONFIG_AOM_HIGHBITDEPTH
-    if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
-      uint16_t *src_216 = CONVERT_TO_SHORTPTR(src_2);
-      for (i = 0; i < pxbh; ++i) src_216[i * ref_stride - 1] = tmp16[i];
-    } else {
-#endif  // CONFIG_AOM_HIGHBITDEPTH
-      for (i = 0; i < pxbh; ++i) src_2[i * ref_stride - 1] = tmp[i];
-#if CONFIG_AOM_HIGHBITDEPTH
-    }
-#endif
-  }
-#endif
-}
-
 void av1_build_intra_predictors_for_interintra(MACROBLOCKD *xd,
                                                BLOCK_SIZE bsize, int plane,
                                                BUFFER_SET *ctx, uint8_t *dst,
                                                int dst_stride) {
-  build_intra_predictors_for_interintra(
-      xd, ctx->plane[plane], ctx->stride[plane], dst, dst_stride,
-      interintra_to_intra_mode[xd->mi[0]->mbmi.interintra_mode], bsize, plane);
+  struct macroblockd_plane *const pd = &xd->plane[plane];
+  BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, &xd->plane[plane]);
+  PREDICTION_MODE mode =
+      interintra_to_intra_mode[xd->mi[0]->mbmi.interintra_mode];
+
+  av1_predict_intra_block(xd, pd->width, pd->height, plane_bsize, mode,
+                          ctx->plane[plane], ctx->stride[plane], dst,
+                          dst_stride, 0, 0, plane);
 }
 
 void av1_combine_interintra(MACROBLOCKD *xd, BLOCK_SIZE bsize, int plane,