Revert VP8 part of "image2yuvconfig() should calculate ..."

This partially reverts commit f662898c395f824058c997885c66c2c4c5e6e69c.

The VP8 part of the change causes use of uninitialized data in various
parts of the encoder due to y/uv_width/height including the border after
that commit and those values being used instead of
y/uv_crop_width/height.

Bug: 520751602, 517413744
Change-Id: I9b34fa78a453fb711f3b28bf058e755d1beac746
diff --git a/vp8/vp8_cx_iface.c b/vp8/vp8_cx_iface.c
index b1ec0d1..c7206d9 100644
--- a/vp8/vp8_cx_iface.c
+++ b/vp8/vp8_cx_iface.c
@@ -784,19 +784,27 @@
 
 static vpx_codec_err_t image2yuvconfig(const vpx_image_t *img,
                                        YV12_BUFFER_CONFIG *yv12) {
+  const int y_w = img->d_w;
+  const int y_h = img->d_h;
+  const int uv_w = (img->d_w + 1) / 2;
+  const int uv_h = (img->d_h + 1) / 2;
   vpx_codec_err_t res = VPX_CODEC_OK;
   yv12->y_buffer = img->planes[VPX_PLANE_Y];
   yv12->u_buffer = img->planes[VPX_PLANE_U];
   yv12->v_buffer = img->planes[VPX_PLANE_V];
 
-  yv12->y_crop_width = img->d_w;
-  yv12->y_crop_height = img->d_h;
-  yv12->y_width = img->w;
-  yv12->y_height = img->h;
-  yv12->uv_crop_width = (yv12->y_crop_width + 1) / 2;
-  yv12->uv_crop_height = (yv12->y_crop_height + 1) / 2;
-  yv12->uv_width = (yv12->y_width + 1) / 2;
-  yv12->uv_height = (yv12->y_height + 1) / 2;
+  // TODO(issue 520751602): this should use img->w/h to set y_width/y_height
+  // and that should be used to calculate uv_width/height after the code is
+  // updated to correctly use uv_crop_width/height to avoid using uninitialized
+  // data from the border.
+  yv12->y_crop_width = y_w;
+  yv12->y_crop_height = y_h;
+  yv12->y_width = y_w;
+  yv12->y_height = y_h;
+  yv12->uv_crop_width = uv_w;
+  yv12->uv_crop_height = uv_h;
+  yv12->uv_width = uv_w;
+  yv12->uv_height = uv_h;
 
   yv12->y_stride = img->stride[VPX_PLANE_Y];
   assert(img->stride[VPX_PLANE_U] == img->stride[VPX_PLANE_V]);