VP9->VPX in border pixel macros

Change-Id: Idaa885f5dfa5150328fdd3bda88e0e6b4323493e
diff --git a/vp10/common/postproc.c b/vp10/common/postproc.c
index a6ea9c0..23b352d 100644
--- a/vp10/common/postproc.c
+++ b/vp10/common/postproc.c
@@ -665,7 +665,7 @@
 #if CONFIG_VP9_HIGHBITDEPTH
                                  cm->use_highbitdepth,
 #endif  // CONFIG_VP9_HIGHBITDEPTH
-                                 VP9_ENC_BORDER_IN_PIXELS,
+                                 VPX_ENC_BORDER_IN_PIXELS,
                                  cm->byte_alignment) < 0) {
         vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
                            "Failed to allocate MFQE framebuffer");
@@ -683,7 +683,7 @@
 #if CONFIG_VP9_HIGHBITDEPTH
                                cm->use_highbitdepth,
 #endif
-                               VP9_DEC_BORDER_IN_PIXELS, cm->byte_alignment,
+                               VPX_DEC_BORDER_IN_PIXELS, cm->byte_alignment,
                                NULL, NULL, NULL) < 0)
     vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
                        "Failed to allocate post-processing buffer");
diff --git a/vp10/decoder/decodeframe.c b/vp10/decoder/decodeframe.c
index 1ac7fd2..06af431 100644
--- a/vp10/decoder/decodeframe.c
+++ b/vp10/decoder/decodeframe.c
@@ -1245,7 +1245,7 @@
 #if CONFIG_VP9_HIGHBITDEPTH
           cm->use_highbitdepth,
 #endif
-          VP9_DEC_BORDER_IN_PIXELS,
+          VPX_DEC_BORDER_IN_PIXELS,
           cm->byte_alignment,
           &pool->frame_bufs[cm->new_fb_idx].raw_frame_buffer, pool->get_fb_cb,
           pool->cb_priv)) {
@@ -1339,7 +1339,7 @@
 #if CONFIG_VP9_HIGHBITDEPTH
           cm->use_highbitdepth,
 #endif
-          VP9_DEC_BORDER_IN_PIXELS,
+          VPX_DEC_BORDER_IN_PIXELS,
           cm->byte_alignment,
           &pool->frame_bufs[cm->new_fb_idx].raw_frame_buffer, pool->get_fb_cb,
           pool->cb_priv)) {
diff --git a/vp10/encoder/encoder.c b/vp10/encoder/encoder.c
index 9e3bec4..b8f5e52 100644
--- a/vp10/encoder/encoder.c
+++ b/vp10/encoder/encoder.c
@@ -620,7 +620,7 @@
 #if CONFIG_VP9_HIGHBITDEPTH
                                cm->use_highbitdepth,
 #endif
-                               VP9_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
+                               VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
                                NULL, NULL, NULL))
     vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
                        "Failed to allocate altref buffer");
@@ -634,7 +634,7 @@
 #if CONFIG_VP9_HIGHBITDEPTH
                                cm->use_highbitdepth,
 #endif
-                               VP9_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
+                               VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
                                NULL, NULL, NULL))
     vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
                        "Failed to allocate last frame buffer");
@@ -645,7 +645,7 @@
 #if CONFIG_VP9_HIGHBITDEPTH
                                cm->use_highbitdepth,
 #endif
-                               VP9_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
+                               VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
                                NULL, NULL, NULL))
     vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
                        "Failed to allocate scaled source buffer");
@@ -656,7 +656,7 @@
 #if CONFIG_VP9_HIGHBITDEPTH
                                cm->use_highbitdepth,
 #endif
-                               VP9_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
+                               VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
                                NULL, NULL, NULL))
     vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
                        "Failed to allocate scaled last source buffer");
@@ -2733,7 +2733,7 @@
                                    cm->width, cm->height,
                                    cm->subsampling_x, cm->subsampling_y,
                                    cm->use_highbitdepth,
-                                   VP9_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
+                                   VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
                                    NULL, NULL, NULL);
           scale_and_extend_frame(ref, &new_fb_ptr->buf, (int)cm->bit_depth);
           cpi->scaled_ref_idx[ref_frame - 1] = new_fb;
@@ -2757,7 +2757,7 @@
           vpx_realloc_frame_buffer(&new_fb_ptr->buf,
                                    cm->width, cm->height,
                                    cm->subsampling_x, cm->subsampling_y,
-                                   VP9_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
+                                   VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
                                    NULL, NULL, NULL);
           scale_and_extend_frame(ref, &new_fb_ptr->buf);
           cpi->scaled_ref_idx[ref_frame - 1] = new_fb;
@@ -3053,7 +3053,7 @@
 #if CONFIG_VP9_HIGHBITDEPTH
                            cm->use_highbitdepth,
 #endif
-                           VP9_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
+                           VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
                            NULL, NULL, NULL);
 
   alloc_util_frame_buffers(cpi);
@@ -3800,7 +3800,7 @@
 #if CONFIG_VP9_HIGHBITDEPTH
                        cm->use_highbitdepth,
 #endif
-                       VP9_ENC_BORDER_IN_PIXELS);
+                       VPX_ENC_BORDER_IN_PIXELS);
   }
 }
 #endif
@@ -4176,7 +4176,7 @@
 #if CONFIG_VP9_HIGHBITDEPTH
                                      cm->use_highbitdepth,
 #endif
-                                     VP9_ENC_BORDER_IN_PIXELS,
+                                     VPX_ENC_BORDER_IN_PIXELS,
                                      cm->byte_alignment) < 0) {
             vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
                                "Failed to allocate post processing buffer");
diff --git a/vp10/encoder/lookahead.c b/vp10/encoder/lookahead.c
index 431c631..f8f7f43 100644
--- a/vp10/encoder/lookahead.c
+++ b/vp10/encoder/lookahead.c
@@ -77,7 +77,7 @@
 #if CONFIG_VP9_HIGHBITDEPTH
                                  use_highbitdepth,
 #endif
-                                 VP9_ENC_BORDER_IN_PIXELS,
+                                 VPX_ENC_BORDER_IN_PIXELS,
                                  legacy_byte_alignment))
         goto bail;
   }
@@ -177,7 +177,7 @@
 #if CONFIG_VP9_HIGHBITDEPTH
                                  use_highbitdepth,
 #endif
-                                 VP9_ENC_BORDER_IN_PIXELS,
+                                 VPX_ENC_BORDER_IN_PIXELS,
                                  0))
           return 1;
       vpx_free_frame_buffer(&buf->img);
diff --git a/vp10/encoder/rdopt.c b/vp10/encoder/rdopt.c
index f92f20e..093d32d 100644
--- a/vp10/encoder/rdopt.c
+++ b/vp10/encoder/rdopt.c
@@ -2405,8 +2405,8 @@
            (mode_mv[NEARMV][ref_frame].as_int == INVALID_MV)));
 }
 
-#define LEFT_TOP_MARGIN ((VP9_ENC_BORDER_IN_PIXELS - VPX_INTERP_EXTEND) << 3)
-#define RIGHT_BOTTOM_MARGIN ((VP9_ENC_BORDER_IN_PIXELS -\
+#define LEFT_TOP_MARGIN ((VPX_ENC_BORDER_IN_PIXELS - VPX_INTERP_EXTEND) << 3)
+#define RIGHT_BOTTOM_MARGIN ((VPX_ENC_BORDER_IN_PIXELS -\
                                 VPX_INTERP_EXTEND) << 3)
 
 // TODO(jingning): this mv clamping function should be block size dependent.
diff --git a/vp10/encoder/skin_detection.c b/vp10/encoder/skin_detection.c
index 9aac477..1714cd3 100644
--- a/vp10/encoder/skin_detection.c
+++ b/vp10/encoder/skin_detection.c
@@ -63,7 +63,7 @@
   memset(&skinmap, 0, sizeof(YV12_BUFFER_CONFIG));
   if (vpx_alloc_frame_buffer(&skinmap, cm->width, cm->height,
                                cm->subsampling_x, cm->subsampling_y,
-                               VP9_ENC_BORDER_IN_PIXELS, cm->byte_alignment)) {
+                               VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment)) {
       vpx_free_frame_buffer(&skinmap);
       return;
   }
diff --git a/vp10/vp10_iface_common.h b/vp10/vp10_iface_common.h
index b2b4b7d..f97c6f4 100644
--- a/vp10/vp10_iface_common.h
+++ b/vp10/vp10_iface_common.h
@@ -40,7 +40,7 @@
   img->range = yv12->color_range;
   img->bit_depth = 8;
   img->w = yv12->y_stride;
-  img->h = ALIGN_POWER_OF_TWO(yv12->y_height + 2 * VP9_ENC_BORDER_IN_PIXELS, 3);
+  img->h = ALIGN_POWER_OF_TWO(yv12->y_height + 2 * VPX_ENC_BORDER_IN_PIXELS, 3);
   img->d_w = yv12->y_crop_width;
   img->d_h = yv12->y_crop_height;
   img->r_w = yv12->render_width;
diff --git a/vpx_scale/generic/yv12extend.c b/vpx_scale/generic/yv12extend.c
index 88fded7..0fceab8 100644
--- a/vpx_scale/generic/yv12extend.c
+++ b/vpx_scale/generic/yv12extend.c
@@ -205,8 +205,8 @@
 }
 
 void vpx_extend_frame_inner_borders_c(YV12_BUFFER_CONFIG *ybf) {
-  const int inner_bw = (ybf->border > VP9INNERBORDERINPIXELS) ?
-                       VP9INNERBORDERINPIXELS : ybf->border;
+  const int inner_bw = (ybf->border > VPXINNERBORDERINPIXELS) ?
+                       VPXINNERBORDERINPIXELS : ybf->border;
   extend_frame(ybf, inner_bw);
 }
 
diff --git a/vpx_scale/mips/dspr2/yv12extend_dspr2.c b/vpx_scale/mips/dspr2/yv12extend_dspr2.c
index aab4785..363c7fd 100644
--- a/vpx_scale/mips/dspr2/yv12extend_dspr2.c
+++ b/vpx_scale/mips/dspr2/yv12extend_dspr2.c
@@ -137,8 +137,8 @@
 }
 
 void vpx_extend_frame_inner_borders_dspr2(YV12_BUFFER_CONFIG *ybf) {
-  const int inner_bw = (ybf->border > VP9INNERBORDERINPIXELS) ?
-                       VP9INNERBORDERINPIXELS : ybf->border;
+  const int inner_bw = (ybf->border > VPXINNERBORDERINPIXELS) ?
+                       VPXINNERBORDERINPIXELS : ybf->border;
   extend_frame(ybf, inner_bw);
 }
 #endif
diff --git a/vpx_scale/yv12config.h b/vpx_scale/yv12config.h
index c2be1a7..152fbce 100644
--- a/vpx_scale/yv12config.h
+++ b/vpx_scale/yv12config.h
@@ -21,10 +21,10 @@
 #include "vpx/vpx_integer.h"
 
 #define VP8BORDERINPIXELS           32
-#define VP9INNERBORDERINPIXELS      96
+#define VPXINNERBORDERINPIXELS      96
 #define VPX_INTERP_EXTEND           4
-#define VP9_ENC_BORDER_IN_PIXELS    160
-#define VP9_DEC_BORDER_IN_PIXELS    32
+#define VPX_ENC_BORDER_IN_PIXELS    160
+#define VPX_DEC_BORDER_IN_PIXELS    32
 
 typedef struct yv12_buffer_config {
   int   y_width;