Remove copy_border from loop restoration filters

This function corrected for the fact that the old bilateral and
Wiener filters would not write to the outermost 3 pixels of the
destination. Now that the bilateral filter has been removed and
the Wiener filter has been rewritten, this is no longer necessary.

No effect on performance

Change-Id: I3f3b0a759bdb9ff1e2407affe963388e76a9c9e6
diff --git a/av1/common/restoration.c b/av1/common/restoration.c
index 6bff42c..6573380 100644
--- a/av1/common/restoration.c
+++ b/av1/common/restoration.c
@@ -149,23 +149,6 @@
   }
 }
 
-// Some filters do not write the outermost WIENER_HALFWIN pixels,
-// so copy them over explicitly.
-static void copy_border(uint8_t *data, int width, int height, int stride,
-                        uint8_t *dst, int dst_stride) {
-  int i;
-  for (i = WIENER_HALFWIN; i < height - WIENER_HALFWIN; ++i) {
-    memcpy(dst + i * dst_stride, data + i * stride, WIENER_HALFWIN);
-    memcpy(dst + i * dst_stride + (width - WIENER_HALFWIN),
-           data + i * stride + (width - WIENER_HALFWIN), WIENER_HALFWIN);
-  }
-  for (i = 0; i < WIENER_HALFWIN; ++i) {
-    memcpy(dst + i * dst_stride, data + i * stride, width);
-  }
-  for (i = height - WIENER_HALFWIN; i < height; ++i)
-    memcpy(dst + i * dst_stride, data + i * stride, width);
-}
-
 static void extend_frame(uint8_t *data, int width, int height, int stride) {
   uint8_t *data_p;
   int i;
@@ -715,7 +698,6 @@
                                    uint8_t *dst, int dst_stride) {
   int tile_idx;
   extend_frame(data, width, height, stride);
-  copy_border(data, width, height, stride, dst, dst_stride);
   for (tile_idx = 0; tile_idx < rst->ntiles; ++tile_idx) {
     if (rst->rsi->restoration_type[tile_idx] == RESTORE_NONE) {
       loop_copy_tile(data, tile_idx, 0, 0, width, height, stride, rst, dst,
@@ -734,23 +716,6 @@
 }
 
 #if CONFIG_AOM_HIGHBITDEPTH
-static void copy_border_highbd(uint16_t *data, int width, int height,
-                               int stride, uint16_t *dst, int dst_stride) {
-  int i;
-  for (i = WIENER_HALFWIN; i < height - WIENER_HALFWIN; ++i) {
-    memcpy(dst + i * dst_stride, data + i * stride,
-           WIENER_HALFWIN * sizeof(*dst));
-    memcpy(dst + i * dst_stride + (width - WIENER_HALFWIN),
-           data + i * stride + (width - WIENER_HALFWIN),
-           WIENER_HALFWIN * sizeof(*dst));
-  }
-  for (i = 0; i < WIENER_HALFWIN; ++i) {
-    memcpy(dst + i * dst_stride, data + i * stride, width * sizeof(*dst));
-  }
-  for (i = height - WIENER_HALFWIN; i < height; ++i)
-    memcpy(dst + i * dst_stride, data + i * stride, width * sizeof(*dst));
-}
-
 static void extend_frame_highbd(uint16_t *data, int width, int height,
                                 int stride) {
   uint16_t *data_p;
@@ -838,7 +803,6 @@
   uint16_t *data = CONVERT_TO_SHORTPTR(data8);
   uint16_t *dst = CONVERT_TO_SHORTPTR(dst8);
   int tile_idx;
-  copy_border_highbd(data, width, height, stride, dst, dst_stride);
   extend_frame_highbd(data, width, height, stride);
   for (tile_idx = 0; tile_idx < rst->ntiles; ++tile_idx) {
     loop_wiener_filter_tile_highbd(data, tile_idx, width, height, stride, rst,
@@ -1062,7 +1026,6 @@
   uint16_t *data = CONVERT_TO_SHORTPTR(data8);
   uint16_t *dst = CONVERT_TO_SHORTPTR(dst8);
   int tile_idx;
-  copy_border_highbd(data, width, height, stride, dst, dst_stride);
   extend_frame_highbd(data, width, height, stride);
   for (tile_idx = 0; tile_idx < rst->ntiles; ++tile_idx) {
     if (rst->rsi->restoration_type[tile_idx] == RESTORE_NONE) {