Use int64_t for buffer offset in inter-pred.

Backport VP9 change 5957832

Change-Id: Iefaf4edac7ccc1f57077810a2be711c7b2f2d1a3
diff --git a/av1/common/reconinter.h b/av1/common/reconinter.h
index 4d62991..9d562f9 100644
--- a/av1/common/reconinter.h
+++ b/av1/common/reconinter.h
@@ -246,13 +246,14 @@
   return clamped_mv;
 }
 
-static INLINE int scaled_buffer_offset(int x_offset, int y_offset, int stride,
-                                       const struct scale_factors *sf) {
+static INLINE int64_t scaled_buffer_offset(int x_offset, int y_offset,
+                                           int stride,
+                                           const struct scale_factors *sf) {
   const int x =
       sf ? sf->scale_value_x(x_offset, sf) >> SCALE_EXTRA_BITS : x_offset;
   const int y =
       sf ? sf->scale_value_y(y_offset, sf) >> SCALE_EXTRA_BITS : y_offset;
-  return y * stride + x;
+  return (int64_t)y * stride + x;
 }
 
 static INLINE void setup_pred_plane(struct buf_2d *dst, BLOCK_SIZE bsize,
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index ea288db..77458f0 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -781,7 +781,7 @@
       dec_calc_subpel_params(xd, sf, mv, plane, pre_x, pre_y, 0, 0, pre_buf,
                              &subpel_params[ref], bw, bh, &block, mi_x, mi_y,
                              &scaled_mv, &subpel_x_mv, &subpel_y_mv);
-      pre[ref] = pre_buf->buf0 + block.y0 * pre_buf->stride + block.x0;
+      pre[ref] = pre_buf->buf0 + (int64_t)block.y0 * pre_buf->stride + block.x0;
       src_stride[ref] = pre_buf->stride;
       highbd = is_cur_buf_hbd(xd);