Simplify the fix for aomedia:2639

In commit 972797c6ad3f704ba222ab3126e02713617d8ddf we set sd.monochrome
to 1 in encoder_encode(), where sd is a local variable of the
YV12_BUFFER_CONFIG type. sd is passed to av1_receive_raw_frame(), via
av1_lookahead_push(), and eventually to av1_copy_and_extend_frame(). So
av1_copy_and_extend_frame() can now test src->monochrome instead of
src->u_buffer and src_v_buffer.

BUG=aomedia:2639,aomedia:2722

Change-Id: I5889645b158be21089ce5c3a8bf03d4fde918bbb
diff --git a/av1/encoder/extend.c b/av1/encoder/extend.c
index 934cf56..381aec8 100644
--- a/av1/encoder/extend.c
+++ b/av1/encoder/extend.c
@@ -122,12 +122,10 @@
     highbd_copy_and_extend_plane(src->y_buffer, src->y_stride, dst->y_buffer,
                                  dst->y_stride, src->y_crop_width,
                                  src->y_crop_height, et_y, el_y, eb_y, er_y);
-    if (src->u_buffer) {
+    if (!src->monochrome) {
       highbd_copy_and_extend_plane(
           src->u_buffer, src->uv_stride, dst->u_buffer, dst->uv_stride,
           src->uv_crop_width, src->uv_crop_height, et_uv, el_uv, eb_uv, er_uv);
-    }
-    if (src->v_buffer) {
       highbd_copy_and_extend_plane(
           src->v_buffer, src->uv_stride, dst->v_buffer, dst->uv_stride,
           src->uv_crop_width, src->uv_crop_height, et_uv, el_uv, eb_uv, er_uv);
@@ -138,12 +136,10 @@
   copy_and_extend_plane(src->y_buffer, src->y_stride, dst->y_buffer,
                         dst->y_stride, src->y_crop_width, src->y_crop_height,
                         et_y, el_y, eb_y, er_y);
-  if (src->u_buffer) {
+  if (!src->monochrome) {
     copy_and_extend_plane(src->u_buffer, src->uv_stride, dst->u_buffer,
                           dst->uv_stride, src->uv_crop_width,
                           src->uv_crop_height, et_uv, el_uv, eb_uv, er_uv);
-  }
-  if (src->v_buffer) {
     copy_and_extend_plane(src->v_buffer, src->uv_stride, dst->v_buffer,
                           dst->uv_stride, src->uv_crop_width,
                           src->uv_crop_height, et_uv, el_uv, eb_uv, er_uv);