Remove alpha channel references (unsupported)

BUG=aomedia:2199

Change-Id: Ie4ec204a4c6cd97786fd9301d0d395f117090111
diff --git a/aom/aom_image.h b/aom/aom_image.h
index 65162f0..245ef2c 100644
--- a/aom/aom_image.h
+++ b/aom/aom_image.h
@@ -30,11 +30,11 @@
  * types, removing or reassigning enums, adding/removing/rearranging
  * fields to structures
  */
-#define AOM_IMAGE_ABI_VERSION (4) /**<\hideinitializer*/
+#define AOM_IMAGE_ABI_VERSION (5) /**<\hideinitializer*/
 
-#define AOM_IMG_FMT_PLANAR 0x100       /**< Image is a planar format. */
-#define AOM_IMG_FMT_UV_FLIP 0x200      /**< V plane precedes U in memory. */
-#define AOM_IMG_FMT_HAS_ALPHA 0x400    /**< Image has an alpha channel. */
+#define AOM_IMG_FMT_PLANAR 0x100  /**< Image is a planar format. */
+#define AOM_IMG_FMT_UV_FLIP 0x200 /**< V plane precedes U in memory. */
+/** 0x400 used to signal alpha channel, skipping for backwards compatibility. */
 #define AOM_IMG_FMT_HIGHBITDEPTH 0x800 /**< Image uses 16bit framebuffer. */
 
 /*!\brief List of supported image formats */
@@ -48,7 +48,6 @@
   AOM_IMG_FMT_AOMI420 = AOM_IMG_FMT_PLANAR | 4,
   AOM_IMG_FMT_I422 = AOM_IMG_FMT_PLANAR | 5,
   AOM_IMG_FMT_I444 = AOM_IMG_FMT_PLANAR | 6,
-  AOM_IMG_FMT_444A = AOM_IMG_FMT_PLANAR | AOM_IMG_FMT_HAS_ALPHA | 6,
   AOM_IMG_FMT_I42016 = AOM_IMG_FMT_I420 | AOM_IMG_FMT_HIGHBITDEPTH,
   AOM_IMG_FMT_YV1216 = AOM_IMG_FMT_YV12 | AOM_IMG_FMT_HIGHBITDEPTH,
   AOM_IMG_FMT_I42216 = AOM_IMG_FMT_I422 | AOM_IMG_FMT_HIGHBITDEPTH,
@@ -170,9 +169,8 @@
 #define AOM_PLANE_Y 0       /**< Y (Luminance) plane */
 #define AOM_PLANE_U 1       /**< U (Chroma) plane */
 #define AOM_PLANE_V 2       /**< V (Chroma) plane */
-#define AOM_PLANE_ALPHA 3   /**< A (Transparency) plane */
-  unsigned char *planes[4]; /**< pointer to the top left pixel for each plane */
-  int stride[4];            /**< stride between rows for each plane */
+  unsigned char *planes[3]; /**< pointer to the top left pixel for each plane */
+  int stride[3];            /**< stride between rows for each plane */
   size_t sz;                /**< data size */
 
   int bps; /**< bits per sample (for packed formats) */
diff --git a/aom/src/aom_image.c b/aom/src/aom_image.c
index 82a267c..521eade 100644
--- a/aom/src/aom_image.c
+++ b/aom/src/aom_image.c
@@ -134,7 +134,7 @@
   img->bps = bps;
 
   /* Calculate strides */
-  img->stride[AOM_PLANE_Y] = img->stride[AOM_PLANE_ALPHA] = stride_in_bytes;
+  img->stride[AOM_PLANE_Y] = stride_in_bytes;
   img->stride[AOM_PLANE_U] = img->stride[AOM_PLANE_V] = stride_in_bytes >> xcs;
 
   /* Default viewport to entire image */
@@ -188,12 +188,6 @@
           (img->fmt & AOM_IMG_FMT_HIGHBITDEPTH) ? 2 : 1;
       data = img->img_data;
 
-      if (img->fmt & AOM_IMG_FMT_HAS_ALPHA) {
-        img->planes[AOM_PLANE_ALPHA] =
-            data + x * bytes_per_sample + y * img->stride[AOM_PLANE_ALPHA];
-        data += (img->h + 2 * border) * img->stride[AOM_PLANE_ALPHA];
-      }
-
       img->planes[AOM_PLANE_Y] =
           data + x * bytes_per_sample + y * img->stride[AOM_PLANE_Y];
       data += (img->h + 2 * border) * img->stride[AOM_PLANE_Y];
@@ -239,10 +233,6 @@
   img->planes[AOM_PLANE_V] += (signed)((img->d_h >> img->y_chroma_shift) - 1) *
                               img->stride[AOM_PLANE_V];
   img->stride[AOM_PLANE_V] = -img->stride[AOM_PLANE_V];
-
-  img->planes[AOM_PLANE_ALPHA] +=
-      (signed)(img->d_h - 1) * img->stride[AOM_PLANE_ALPHA];
-  img->stride[AOM_PLANE_ALPHA] = -img->stride[AOM_PLANE_ALPHA];
 }
 
 void aom_img_free(aom_image_t *img) {
diff --git a/aom_scale/yv12config.h b/aom_scale/yv12config.h
index 2fb81ac..10c6ad5 100644
--- a/aom_scale/yv12config.h
+++ b/aom_scale/yv12config.h
@@ -39,17 +39,15 @@
     struct {
       int y_width;
       int uv_width;
-      int alpha_width;
     };
-    int widths[3];
+    int widths[2];
   };
   union {
     struct {
       int y_height;
       int uv_height;
-      int alpha_height;
     };
-    int heights[3];
+    int heights[2];
   };
   union {
     struct {
@@ -69,18 +67,16 @@
     struct {
       int y_stride;
       int uv_stride;
-      int alpha_stride;
     };
-    int strides[3];
+    int strides[2];
   };
   union {
     struct {
       uint8_t *y_buffer;
       uint8_t *u_buffer;
       uint8_t *v_buffer;
-      uint8_t *alpha_buffer;
     };
-    uint8_t *buffers[4];
+    uint8_t *buffers[3];
   };
 
   // Indicate whether y_buffer, u_buffer, and v_buffer points to the internally
diff --git a/av1/av1_iface_common.h b/av1/av1_iface_common.h
index 4a7af58..32a207d 100644
--- a/av1/av1_iface_common.h
+++ b/av1/av1_iface_common.h
@@ -52,11 +52,9 @@
   img->planes[AOM_PLANE_Y] = yv12->y_buffer;
   img->planes[AOM_PLANE_U] = yv12->u_buffer;
   img->planes[AOM_PLANE_V] = yv12->v_buffer;
-  img->planes[AOM_PLANE_ALPHA] = NULL;
   img->stride[AOM_PLANE_Y] = yv12->y_stride;
   img->stride[AOM_PLANE_U] = yv12->uv_stride;
   img->stride[AOM_PLANE_V] = yv12->uv_stride;
-  img->stride[AOM_PLANE_ALPHA] = yv12->y_stride;
   if (yv12->flags & YV12_FLAG_HIGHBITDEPTH) {
     // aom_image_t uses byte strides and a pointer to the first byte
     // of the image.
@@ -65,11 +63,9 @@
     img->planes[AOM_PLANE_Y] = (uint8_t *)CONVERT_TO_SHORTPTR(yv12->y_buffer);
     img->planes[AOM_PLANE_U] = (uint8_t *)CONVERT_TO_SHORTPTR(yv12->u_buffer);
     img->planes[AOM_PLANE_V] = (uint8_t *)CONVERT_TO_SHORTPTR(yv12->v_buffer);
-    img->planes[AOM_PLANE_ALPHA] = NULL;
     img->stride[AOM_PLANE_Y] = 2 * yv12->y_stride;
     img->stride[AOM_PLANE_U] = 2 * yv12->uv_stride;
     img->stride[AOM_PLANE_V] = 2 * yv12->uv_stride;
-    img->stride[AOM_PLANE_ALPHA] = 2 * yv12->y_stride;
   }
   img->bps = bps;
   img->user_priv = user_priv;
diff --git a/common/y4menc.c b/common/y4menc.c
index de8eca2..c539b5b 100644
--- a/common/y4menc.c
+++ b/common/y4menc.c
@@ -30,7 +30,6 @@
 // image format.
 const char *colorspace8(aom_chroma_sample_position_t csp, aom_img_fmt_t fmt) {
   switch (fmt) {
-    case AOM_IMG_FMT_444A: return "C444alpha";
     case AOM_IMG_FMT_I444: return "C444";
     case AOM_IMG_FMT_I422: return "C422";
     default:
diff --git a/common/y4minput.c b/common/y4minput.c
index 4e1581c..5338370 100644
--- a/common/y4minput.c
+++ b/common/y4minput.c
@@ -1047,14 +1047,8 @@
       _y4m->aux_buf_sz = _y4m->aux_buf_read_sz = 3 * _y4m->pic_w * _y4m->pic_h;
       _y4m->convert = y4m_convert_444_420jpeg;
     } else {
-      _y4m->aom_fmt = AOM_IMG_FMT_444A;
-      _y4m->bps = 32;
-      _y4m->dst_c_dec_h = _y4m->src_c_dec_h;
-      _y4m->dst_c_dec_v = _y4m->src_c_dec_v;
-      _y4m->dst_buf_read_sz = 4 * _y4m->pic_w * _y4m->pic_h;
-      /*Natively supported: no conversion required.*/
-      _y4m->aux_buf_sz = _y4m->aux_buf_read_sz = 0;
-      _y4m->convert = y4m_convert_null;
+      fprintf(stderr, "Unsupported format: 444A\n");
+      return -1;
     }
   } else if (strcmp(_y4m->chroma_type, "mono") == 0) {
     _y4m->src_c_dec_h = _y4m->src_c_dec_v = 0;
@@ -1141,12 +1135,10 @@
   c_w *= bytes_per_sample;
   c_h = (_y4m->pic_h + _y4m->dst_c_dec_v - 1) / _y4m->dst_c_dec_v;
   c_sz = c_w * c_h;
-  _img->stride[AOM_PLANE_Y] = _img->stride[AOM_PLANE_ALPHA] =
-      _y4m->pic_w * bytes_per_sample;
+  _img->stride[AOM_PLANE_Y] = _y4m->pic_w * bytes_per_sample;
   _img->stride[AOM_PLANE_U] = _img->stride[AOM_PLANE_V] = c_w;
   _img->planes[AOM_PLANE_Y] = _y4m->dst_buf;
   _img->planes[AOM_PLANE_U] = _y4m->dst_buf + pic_sz;
   _img->planes[AOM_PLANE_V] = _y4m->dst_buf + pic_sz + c_sz;
-  _img->planes[AOM_PLANE_ALPHA] = _y4m->dst_buf + pic_sz + 2 * c_sz;
   return 1;
 }