Save enough lines at bottom of frame in save_cdef_boundary_lines

The logic (copied from save_deblock_boundary_lines) to work out how
many lines to save isn't correct here: we always save exactly one line
but duplicate it across multiple rows in the "boundary" buffer.

BUG=aomedia:1020

Change-Id: Ib7ce7a777191062f3511d82c8c4eec589c900a2f
diff --git a/av1/common/restoration.c b/av1/common/restoration.c
index 11b72fd..921e6c2 100644
--- a/av1/common/restoration.c
+++ b/av1/common/restoration.c
@@ -1851,7 +1851,6 @@
                                      int stripe, int use_highbd, int is_above,
                                      RestorationStripeBoundaries *boundaries) {
   const int is_uv = plane > 0;
-  const int src_height = frame->crop_heights[is_uv];
   const uint8_t *src_buf = REAL_PTR(use_highbd, frame->buffers[plane]);
   const int src_stride = frame->strides[is_uv] << use_highbd;
   const uint8_t *src_rows = src_buf + row * src_stride;
@@ -1862,7 +1861,6 @@
   const int bdry_stride = boundaries->stripe_boundary_stride << use_highbd;
   uint8_t *bdry_rows = bdry_start + RESTORATION_CTX_VERT * stripe * bdry_stride;
 
-  const int lines_to_save = AOMMIN(RESTORATION_CTX_VERT, src_height - row);
 #if CONFIG_FRAME_SUPERRES
   // At the point where this function is called, we've already applied
   // superres. So we don't need to extend the lines here, we can just
@@ -1875,14 +1873,14 @@
   const int upscaled_width = src_width;
 #endif  // CONFIG_FRAME_SUPERRES
   const int line_bytes = upscaled_width << use_highbd;
-  for (int i = 0; i < lines_to_save; i++) {
+  for (int i = 0; i < RESTORATION_CTX_VERT; i++) {
     // Copy the line at 'row' into both context lines. This is because
     // we want to (effectively) extend the outermost row of CDEF data
     // from this tile to produce a border, rather than using deblocked
     // pixels from the tile above/below.
     memcpy(bdry_rows + i * bdry_stride, src_rows, line_bytes);
   }
-  extend_lines(bdry_rows, upscaled_width, lines_to_save, bdry_stride,
+  extend_lines(bdry_rows, upscaled_width, RESTORATION_CTX_VERT, bdry_stride,
                RESTORATION_EXTRA_HORZ, use_highbd);
 }