A clean up of the down_copy function

Change-Id: I0c689fb44e9e91539c450d26672d7a1d92e92900
diff --git a/vp8/common/reconintra4x4.c b/vp8/common/reconintra4x4.c
index 1e40168..741fd7d 100644
--- a/vp8/common/reconintra4x4.c
+++ b/vp8/common/reconintra4x4.c
@@ -295,7 +295,8 @@
 /* copy 4 bytes from the above right down so that the 4x4 prediction modes using pixels above and
  * to the right prediction have filled in pixels to use.
  */
-void vp8_intra_prediction_down_copy(MACROBLOCKD *xd, int extend_edge) {
+void vp8_intra_prediction_down_copy(MACROBLOCKD *xd) {
+  int extend_edge = (xd->mb_to_right_edge == 0 && xd->mb_index < 2);
   unsigned char *above_right = *(xd->block[0].base_dst) + xd->block[0].dst -
                                xd->block[0].dst_stride + 16;
   unsigned int *src_ptr = (unsigned int *)
diff --git a/vp8/common/reconintra4x4.h b/vp8/common/reconintra4x4.h
index 771e0b2..a8cdea4 100644
--- a/vp8/common/reconintra4x4.h
+++ b/vp8/common/reconintra4x4.h
@@ -12,6 +12,6 @@
 #ifndef __INC_RECONINTRA4x4_H
 #define __INC_RECONINTRA4x4_H
 
-extern void vp8_intra_prediction_down_copy(MACROBLOCKD *xd, int extend_edge);
+extern void vp8_intra_prediction_down_copy(MACROBLOCKD *xd);
 
 #endif
diff --git a/vp8/decoder/decodframe.c b/vp8/decoder/decodframe.c
index 78ba590..c53560d 100644
--- a/vp8/decoder/decodframe.c
+++ b/vp8/decoder/decodframe.c
@@ -658,8 +658,7 @@
         mi[pc->mode_info_stride + 1] = mi[0];
       }
 #endif
-      vp8_intra_prediction_down_copy(xd, mb_col == pc->mb_cols - 1 &&
-                                     !(mb_row & 1));
+      vp8_intra_prediction_down_copy(xd);
       decode_macroblock(pbi, xd, mb_col, bc);
 #if CONFIG_SUPERBLOCKS
       if (xd->mode_info_context->mbmi.encoded_as_sb) {
diff --git a/vp8/encoder/encodeframe.c b/vp8/encoder/encodeframe.c
index a71715e..8cc0715 100644
--- a/vp8/encoder/encodeframe.c
+++ b/vp8/encoder/encodeframe.c
@@ -613,8 +613,7 @@
 
     cpi->update_context = 0;    // TODO Do we need this now??
 
-    vp8_intra_prediction_down_copy(xd, mb_col == cm->mb_cols - 1 &&
-                                       (mb_row & 1) == 0);
+    vp8_intra_prediction_down_copy(xd);
 
     // Find best coding mode & reconstruct the MB so it is available
     // as a predictor for MBs that follow in the SB
@@ -983,8 +982,7 @@
 #if CONFIG_SUPERBLOCKS
     if (!xd->mode_info_context->mbmi.encoded_as_sb)
 #endif
-      vp8_intra_prediction_down_copy(xd, mb_col == cm->mb_cols - 1 &&
-                                     (mb_row & 1) == 0);
+      vp8_intra_prediction_down_copy(xd);
 
     if (cm->frame_type == KEY_FRAME) {
 #if CONFIG_SUPERBLOCKS