Port renaming changes from AOMedia

Cherry-Picked the following commits:
0defd8f Changed "WebM" to "AOMedia" & "webm" to "aomedia"
54e6676 Replace "VPx" by "AVx"
5082a36 Change "Vpx" to "Avx"
7df44f1 Replace "Vp9" w/ "Av1"
967f722 Remove kVp9CodecId
828f30c Change "Vp8" to "AOM"
030b5ff AUTHORS regenerated
2524cae Add ref-mv experimental flag
016762b Change copyright notice to AOMedia form
81e5526 Replace vp9 w/ av1
9b94565 Add missing files
fa8ca9f Change "vp9" to "av1"
ec838b7  Convert "vp8" to "aom"
80edfa0 Change "VP9" to "AV1"
d1a11fb Change "vp8" to "aom"
7b58251 Point to WebM test data
dd1a5c8 Replace "VP8" with "AOM"
ff00fc0 Change "VPX" to "AOM"
01dee0b Change "vp10" to "av1" in source code
cebe6f0 Convert "vpx" to "aom"
17b0567 rename vp10*.mk to av1_*.mk
fe5f8a8 rename files vp10_* to av1_*

Change-Id: I6fc3d18eb11fc171e46140c836ad5339cf6c9419
diff --git a/examples/vpxcx_set_ref.c b/examples/aomcx_set_ref.c
similarity index 66%
rename from examples/vpxcx_set_ref.c
rename to examples/aomcx_set_ref.c
index 0d57f4d..7429970 100644
--- a/examples/vpxcx_set_ref.c
+++ b/examples/aomcx_set_ref.c
@@ -8,10 +8,10 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-// VP10 Set Reference Frame
+// AV1 Set Reference Frame
 // ============================
 //
-// This is an example demonstrating how to overwrite the VP10 encoder's
+// This is an example demonstrating how to overwrite the AV1 encoder's
 // internal reference frame. In the sample we set the last frame to the
 // current frame. This technique could be used to bounce between two cameras.
 //
@@ -24,7 +24,7 @@
 // -----
 // This example encodes a raw video. And the last argument passed in specifies
 // the frame number to update the reference frame on. For example, run
-// examples/vpx_cx_set_ref vp10 352 288 in.yuv out.ivf 4 30
+// examples/aom_cx_set_ref av1 352 288 in.yuv out.ivf 4 30
 // The parameter is parsed as follows:
 //
 //
@@ -50,9 +50,9 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "aom/vp8cx.h"
-#include "aom/vpx_decoder.h"
-#include "aom/vpx_encoder.h"
+#include "aom/aomcx.h"
+#include "aom/aom_decoder.h"
+#include "aom/aom_encoder.h"
 
 #include "./tools_common.h"
 #include "./video_writer.h"
@@ -67,8 +67,8 @@
   exit(EXIT_FAILURE);
 }
 
-static int compare_img(const vpx_image_t *const img1,
-                       const vpx_image_t *const img2) {
+static int compare_img(const aom_image_t *const img1,
+                       const aom_image_t *const img2) {
   uint32_t l_w = img1->d_w;
   uint32_t c_w = (img1->d_w + img1->x_chroma_shift) >> img1->x_chroma_shift;
   const uint32_t c_h =
@@ -81,26 +81,26 @@
   match &= (img1->d_h == img2->d_h);
 
   for (i = 0; i < img1->d_h; ++i)
-    match &= (memcmp(img1->planes[VPX_PLANE_Y] + i * img1->stride[VPX_PLANE_Y],
-                     img2->planes[VPX_PLANE_Y] + i * img2->stride[VPX_PLANE_Y],
+    match &= (memcmp(img1->planes[AOM_PLANE_Y] + i * img1->stride[AOM_PLANE_Y],
+                     img2->planes[AOM_PLANE_Y] + i * img2->stride[AOM_PLANE_Y],
                      l_w) == 0);
 
   for (i = 0; i < c_h; ++i)
-    match &= (memcmp(img1->planes[VPX_PLANE_U] + i * img1->stride[VPX_PLANE_U],
-                     img2->planes[VPX_PLANE_U] + i * img2->stride[VPX_PLANE_U],
+    match &= (memcmp(img1->planes[AOM_PLANE_U] + i * img1->stride[AOM_PLANE_U],
+                     img2->planes[AOM_PLANE_U] + i * img2->stride[AOM_PLANE_U],
                      c_w) == 0);
 
   for (i = 0; i < c_h; ++i)
-    match &= (memcmp(img1->planes[VPX_PLANE_V] + i * img1->stride[VPX_PLANE_V],
-                     img2->planes[VPX_PLANE_V] + i * img2->stride[VPX_PLANE_V],
+    match &= (memcmp(img1->planes[AOM_PLANE_V] + i * img1->stride[AOM_PLANE_V],
+                     img2->planes[AOM_PLANE_V] + i * img2->stride[AOM_PLANE_V],
                      c_w) == 0);
 
   return match;
 }
 
 #define mmin(a, b) ((a) < (b) ? (a) : (b))
-static void find_mismatch(const vpx_image_t *const img1,
-                          const vpx_image_t *const img2, int yloc[4],
+static void find_mismatch(const aom_image_t *const img1,
+                          const aom_image_t *const img2, int yloc[4],
                           int uloc[4], int vloc[4]) {
   const uint32_t bsize = 64;
   const uint32_t bsizey = bsize >> img1->y_chroma_shift;
@@ -119,16 +119,16 @@
       const int sj = mmin(j + bsize, img1->d_w) - j;
       for (k = 0; match && k < si; ++k) {
         for (l = 0; match && l < sj; ++l) {
-          if (*(img1->planes[VPX_PLANE_Y] +
-                (i + k) * img1->stride[VPX_PLANE_Y] + j + l) !=
-              *(img2->planes[VPX_PLANE_Y] +
-                (i + k) * img2->stride[VPX_PLANE_Y] + j + l)) {
+          if (*(img1->planes[AOM_PLANE_Y] +
+                (i + k) * img1->stride[AOM_PLANE_Y] + j + l) !=
+              *(img2->planes[AOM_PLANE_Y] +
+                (i + k) * img2->stride[AOM_PLANE_Y] + j + l)) {
             yloc[0] = i + k;
             yloc[1] = j + l;
-            yloc[2] = *(img1->planes[VPX_PLANE_Y] +
-                        (i + k) * img1->stride[VPX_PLANE_Y] + j + l);
-            yloc[3] = *(img2->planes[VPX_PLANE_Y] +
-                        (i + k) * img2->stride[VPX_PLANE_Y] + j + l);
+            yloc[2] = *(img1->planes[AOM_PLANE_Y] +
+                        (i + k) * img1->stride[AOM_PLANE_Y] + j + l);
+            yloc[3] = *(img2->planes[AOM_PLANE_Y] +
+                        (i + k) * img2->stride[AOM_PLANE_Y] + j + l);
             match = 0;
             break;
           }
@@ -145,16 +145,16 @@
       const int sj = mmin(j + bsizex, c_w - j);
       for (k = 0; match && k < si; ++k) {
         for (l = 0; match && l < sj; ++l) {
-          if (*(img1->planes[VPX_PLANE_U] +
-                (i + k) * img1->stride[VPX_PLANE_U] + j + l) !=
-              *(img2->planes[VPX_PLANE_U] +
-                (i + k) * img2->stride[VPX_PLANE_U] + j + l)) {
+          if (*(img1->planes[AOM_PLANE_U] +
+                (i + k) * img1->stride[AOM_PLANE_U] + j + l) !=
+              *(img2->planes[AOM_PLANE_U] +
+                (i + k) * img2->stride[AOM_PLANE_U] + j + l)) {
             uloc[0] = i + k;
             uloc[1] = j + l;
-            uloc[2] = *(img1->planes[VPX_PLANE_U] +
-                        (i + k) * img1->stride[VPX_PLANE_U] + j + l);
-            uloc[3] = *(img2->planes[VPX_PLANE_U] +
-                        (i + k) * img2->stride[VPX_PLANE_U] + j + l);
+            uloc[2] = *(img1->planes[AOM_PLANE_U] +
+                        (i + k) * img1->stride[AOM_PLANE_U] + j + l);
+            uloc[3] = *(img2->planes[AOM_PLANE_U] +
+                        (i + k) * img2->stride[AOM_PLANE_U] + j + l);
             match = 0;
             break;
           }
@@ -170,16 +170,16 @@
       const int sj = mmin(j + bsizex, c_w - j);
       for (k = 0; match && k < si; ++k) {
         for (l = 0; match && l < sj; ++l) {
-          if (*(img1->planes[VPX_PLANE_V] +
-                (i + k) * img1->stride[VPX_PLANE_V] + j + l) !=
-              *(img2->planes[VPX_PLANE_V] +
-                (i + k) * img2->stride[VPX_PLANE_V] + j + l)) {
+          if (*(img1->planes[AOM_PLANE_V] +
+                (i + k) * img1->stride[AOM_PLANE_V] + j + l) !=
+              *(img2->planes[AOM_PLANE_V] +
+                (i + k) * img2->stride[AOM_PLANE_V] + j + l)) {
             vloc[0] = i + k;
             vloc[1] = j + l;
-            vloc[2] = *(img1->planes[VPX_PLANE_V] +
-                        (i + k) * img1->stride[VPX_PLANE_V] + j + l);
-            vloc[3] = *(img2->planes[VPX_PLANE_V] +
-                        (i + k) * img2->stride[VPX_PLANE_V] + j + l);
+            vloc[2] = *(img1->planes[AOM_PLANE_V] +
+                        (i + k) * img1->stride[AOM_PLANE_V] + j + l);
+            vloc[3] = *(img2->planes[AOM_PLANE_V] +
+                        (i + k) * img2->stride[AOM_PLANE_V] + j + l);
             match = 0;
             break;
           }
@@ -189,20 +189,20 @@
   }
 }
 
-static void testing_decode(vpx_codec_ctx_t *encoder, vpx_codec_ctx_t *decoder,
-                           vpx_codec_enc_cfg_t *cfg, unsigned int frame_out,
+static void testing_decode(aom_codec_ctx_t *encoder, aom_codec_ctx_t *decoder,
+                           aom_codec_enc_cfg_t *cfg, unsigned int frame_out,
                            int *mismatch_seen) {
-  vpx_image_t enc_img, dec_img;
-  struct vp9_ref_frame ref_enc, ref_dec;
+  aom_image_t enc_img, dec_img;
+  struct av1_ref_frame ref_enc, ref_dec;
 
   if (*mismatch_seen) return;
 
   ref_enc.idx = 0;
   ref_dec.idx = 0;
-  if (vpx_codec_control(encoder, VP9_GET_REFERENCE, &ref_enc))
+  if (aom_codec_control(encoder, AV1_GET_REFERENCE, &ref_enc))
     die_codec(encoder, "Failed to get encoder reference frame");
   enc_img = ref_enc.img;
-  if (vpx_codec_control(decoder, VP9_GET_REFERENCE, &ref_dec))
+  if (aom_codec_control(decoder, AV1_GET_REFERENCE, &ref_dec))
     die_codec(decoder, "Failed to get decoder reference frame");
   dec_img = ref_dec.img;
 
@@ -221,36 +221,36 @@
         v[2], v[3]);
   }
 
-  vpx_img_free(&enc_img);
-  vpx_img_free(&dec_img);
+  aom_img_free(&enc_img);
+  aom_img_free(&dec_img);
 }
 
-static int encode_frame(vpx_codec_ctx_t *ecodec, vpx_codec_enc_cfg_t *cfg,
-                        vpx_image_t *img, unsigned int frame_in,
-                        VpxVideoWriter *writer, int test_decode,
-                        vpx_codec_ctx_t *dcodec, unsigned int *frame_out,
+static int encode_frame(aom_codec_ctx_t *ecodec, aom_codec_enc_cfg_t *cfg,
+                        aom_image_t *img, unsigned int frame_in,
+                        AvxVideoWriter *writer, int test_decode,
+                        aom_codec_ctx_t *dcodec, unsigned int *frame_out,
                         int *mismatch_seen) {
   int got_pkts = 0;
-  vpx_codec_iter_t iter = NULL;
-  const vpx_codec_cx_pkt_t *pkt = NULL;
+  aom_codec_iter_t iter = NULL;
+  const aom_codec_cx_pkt_t *pkt = NULL;
   int got_data;
-  const vpx_codec_err_t res =
-      vpx_codec_encode(ecodec, img, frame_in, 1, 0, VPX_DL_GOOD_QUALITY);
-  if (res != VPX_CODEC_OK) die_codec(ecodec, "Failed to encode frame");
+  const aom_codec_err_t res =
+      aom_codec_encode(ecodec, img, frame_in, 1, 0, AOM_DL_GOOD_QUALITY);
+  if (res != AOM_CODEC_OK) die_codec(ecodec, "Failed to encode frame");
 
   got_data = 0;
 
-  while ((pkt = vpx_codec_get_cx_data(ecodec, &iter)) != NULL) {
+  while ((pkt = aom_codec_get_cx_data(ecodec, &iter)) != NULL) {
     got_pkts = 1;
 
-    if (pkt->kind == VPX_CODEC_CX_FRAME_PKT) {
-      const int keyframe = (pkt->data.frame.flags & VPX_FRAME_IS_KEY) != 0;
+    if (pkt->kind == AOM_CODEC_CX_FRAME_PKT) {
+      const int keyframe = (pkt->data.frame.flags & AOM_FRAME_IS_KEY) != 0;
 
-      if (!(pkt->data.frame.flags & VPX_FRAME_IS_FRAGMENT)) {
+      if (!(pkt->data.frame.flags & AOM_FRAME_IS_FRAGMENT)) {
         *frame_out += 1;
       }
 
-      if (!vpx_video_writer_write_frame(writer, pkt->data.frame.buf,
+      if (!aom_video_writer_write_frame(writer, pkt->data.frame.buf,
                                         pkt->data.frame.sz,
                                         pkt->data.frame.pts)) {
         die_codec(ecodec, "Failed to write compressed frame");
@@ -261,7 +261,7 @@
 
       // Decode 1 frame.
       if (test_decode) {
-        if (vpx_codec_decode(dcodec, pkt->data.frame.buf,
+        if (aom_codec_decode(dcodec, pkt->data.frame.buf,
                              (unsigned int)pkt->data.frame.sz, NULL, 0))
           die_codec(dcodec, "Failed to decode frame.");
       }
@@ -279,19 +279,19 @@
 int main(int argc, char **argv) {
   FILE *infile = NULL;
   // Encoder
-  vpx_codec_ctx_t ecodec = { 0 };
-  vpx_codec_enc_cfg_t cfg = { 0 };
+  aom_codec_ctx_t ecodec = { 0 };
+  aom_codec_enc_cfg_t cfg = { 0 };
   unsigned int frame_in = 0;
-  vpx_image_t raw;
-  vpx_codec_err_t res;
-  VpxVideoInfo info = { 0 };
-  VpxVideoWriter *writer = NULL;
-  const VpxInterface *encoder = NULL;
+  aom_image_t raw;
+  aom_codec_err_t res;
+  AvxVideoInfo info = { 0 };
+  AvxVideoWriter *writer = NULL;
+  const AvxInterface *encoder = NULL;
 
   // Test encoder/decoder mismatch.
   int test_decode = 1;
   // Decoder
-  vpx_codec_ctx_t dcodec;
+  aom_codec_ctx_t dcodec;
   unsigned int frame_out = 0;
 
   // The frame number to set reference frame on
@@ -317,12 +317,12 @@
   infile_arg = argv[4];
   outfile_arg = argv[5];
 
-  encoder = get_vpx_encoder_by_name(codec_arg);
+  encoder = get_aom_encoder_by_name(codec_arg);
   if (!encoder) die("Unsupported codec.");
 
   update_frame_num = atoi(argv[6]);
-  // In VP10, the reference buffers (cm->buffer_pool->frame_bufs[i].buf) are
-  // allocated while calling vpx_codec_encode(), thus, setting reference for
+  // In AV1, the reference buffers (cm->buffer_pool->frame_bufs[i].buf) are
+  // allocated while calling aom_codec_encode(), thus, setting reference for
   // 1st frame isn't supported.
   if (update_frame_num <= 1) die("Couldn't parse frame number '%s'\n", argv[6]);
 
@@ -343,14 +343,14 @@
     die("Invalid frame size: %dx%d", info.frame_width, info.frame_height);
   }
 
-  if (!vpx_img_alloc(&raw, VPX_IMG_FMT_I420, info.frame_width,
+  if (!aom_img_alloc(&raw, AOM_IMG_FMT_I420, info.frame_width,
                      info.frame_height, 1)) {
     die("Failed to allocate image.");
   }
 
-  printf("Using %s\n", vpx_codec_iface_name(encoder->codec_interface()));
+  printf("Using %s\n", aom_codec_iface_name(encoder->codec_interface()));
 
-  res = vpx_codec_enc_config_default(encoder->codec_interface(), &cfg, 0);
+  res = aom_codec_enc_config_default(encoder->codec_interface(), &cfg, 0);
   if (res) die_codec(&ecodec, "Failed to get default codec config.");
 
   cfg.g_w = info.frame_width;
@@ -360,41 +360,41 @@
   cfg.rc_target_bitrate = bitrate;
   cfg.g_lag_in_frames = 3;
 
-  writer = vpx_video_writer_open(outfile_arg, kContainerIVF, &info);
+  writer = aom_video_writer_open(outfile_arg, kContainerIVF, &info);
   if (!writer) die("Failed to open %s for writing.", outfile_arg);
 
   if (!(infile = fopen(infile_arg, "rb")))
     die("Failed to open %s for reading.", infile_arg);
 
-  if (vpx_codec_enc_init(&ecodec, encoder->codec_interface(), &cfg, 0))
+  if (aom_codec_enc_init(&ecodec, encoder->codec_interface(), &cfg, 0))
     die_codec(&ecodec, "Failed to initialize encoder");
 
   // Disable alt_ref.
-  if (vpx_codec_control(&ecodec, VP8E_SET_ENABLEAUTOALTREF, 0))
+  if (aom_codec_control(&ecodec, AOME_SET_ENABLEAUTOALTREF, 0))
     die_codec(&ecodec, "Failed to set enable auto alt ref");
 
   if (test_decode) {
-    const VpxInterface *decoder = get_vpx_decoder_by_name(codec_arg);
-    if (vpx_codec_dec_init(&dcodec, decoder->codec_interface(), NULL, 0))
+    const AvxInterface *decoder = get_aom_decoder_by_name(codec_arg);
+    if (aom_codec_dec_init(&dcodec, decoder->codec_interface(), NULL, 0))
       die_codec(&dcodec, "Failed to initialize decoder.");
   }
 
   // Encode frames.
-  while (vpx_img_read(&raw, infile)) {
+  while (aom_img_read(&raw, infile)) {
     if (limit && frame_in >= limit) break;
     if (update_frame_num > 1 && frame_out + 1 == update_frame_num) {
-      vpx_ref_frame_t ref;
-      ref.frame_type = VP8_LAST_FRAME;
+      aom_ref_frame_t ref;
+      ref.frame_type = AOM_LAST_FRAME;
       ref.img = raw;
       // Set reference frame in encoder.
-      if (vpx_codec_control(&ecodec, VP8_SET_REFERENCE, &ref))
+      if (aom_codec_control(&ecodec, AOM_SET_REFERENCE, &ref))
         die_codec(&ecodec, "Failed to set reference frame");
       printf(" <SET_REF>");
 
       // If set_reference in decoder is commented out, the enc/dec mismatch
       // would be seen.
       if (test_decode) {
-        if (vpx_codec_control(&dcodec, VP8_SET_REFERENCE, &ref))
+        if (aom_codec_control(&dcodec, AOM_SET_REFERENCE, &ref))
           die_codec(&dcodec, "Failed to set reference frame");
       }
     }
@@ -423,14 +423,14 @@
   }
 
   if (test_decode)
-    if (vpx_codec_destroy(&dcodec))
+    if (aom_codec_destroy(&dcodec))
       die_codec(&dcodec, "Failed to destroy decoder");
 
-  vpx_img_free(&raw);
-  if (vpx_codec_destroy(&ecodec))
+  aom_img_free(&raw);
+  if (aom_codec_destroy(&ecodec))
     die_codec(&ecodec, "Failed to destroy encoder.");
 
-  vpx_video_writer_close(writer);
+  aom_video_writer_close(writer);
 
   return EXIT_SUCCESS;
 }
diff --git a/examples/decode_to_md5.c b/examples/decode_to_md5.c
index 3cf40e6..869e989 100644
--- a/examples/decode_to_md5.c
+++ b/examples/decode_to_md5.c
@@ -33,15 +33,15 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "aom/vp8dx.h"
-#include "aom/vpx_decoder.h"
+#include "aom/aomdx.h"
+#include "aom/aom_decoder.h"
 
 #include "../md5_utils.h"
 #include "../tools_common.h"
 #include "../video_reader.h"
-#include "./vpx_config.h"
+#include "./aom_config.h"
 
-static void get_image_md5(const vpx_image_t *img, unsigned char digest[16]) {
+static void get_image_md5(const aom_image_t *img, unsigned char digest[16]) {
   int plane, y;
   MD5Context md5;
 
@@ -78,41 +78,41 @@
 int main(int argc, char **argv) {
   int frame_cnt = 0;
   FILE *outfile = NULL;
-  vpx_codec_ctx_t codec;
-  VpxVideoReader *reader = NULL;
-  const VpxVideoInfo *info = NULL;
-  const VpxInterface *decoder = NULL;
+  aom_codec_ctx_t codec;
+  AvxVideoReader *reader = NULL;
+  const AvxVideoInfo *info = NULL;
+  const AvxInterface *decoder = NULL;
 
   exec_name = argv[0];
 
   if (argc != 3) die("Invalid number of arguments.");
 
-  reader = vpx_video_reader_open(argv[1]);
+  reader = aom_video_reader_open(argv[1]);
   if (!reader) die("Failed to open %s for reading.", argv[1]);
 
   if (!(outfile = fopen(argv[2], "wb")))
     die("Failed to open %s for writing.", argv[2]);
 
-  info = vpx_video_reader_get_info(reader);
+  info = aom_video_reader_get_info(reader);
 
-  decoder = get_vpx_decoder_by_fourcc(info->codec_fourcc);
+  decoder = get_aom_decoder_by_fourcc(info->codec_fourcc);
   if (!decoder) die("Unknown input codec.");
 
-  printf("Using %s\n", vpx_codec_iface_name(decoder->codec_interface()));
+  printf("Using %s\n", aom_codec_iface_name(decoder->codec_interface()));
 
-  if (vpx_codec_dec_init(&codec, decoder->codec_interface(), NULL, 0))
+  if (aom_codec_dec_init(&codec, decoder->codec_interface(), NULL, 0))
     die_codec(&codec, "Failed to initialize decoder");
 
-  while (vpx_video_reader_read_frame(reader)) {
-    vpx_codec_iter_t iter = NULL;
-    vpx_image_t *img = NULL;
+  while (aom_video_reader_read_frame(reader)) {
+    aom_codec_iter_t iter = NULL;
+    aom_image_t *img = NULL;
     size_t frame_size = 0;
     const unsigned char *frame =
-        vpx_video_reader_get_frame(reader, &frame_size);
-    if (vpx_codec_decode(&codec, frame, (unsigned int)frame_size, NULL, 0))
+        aom_video_reader_get_frame(reader, &frame_size);
+    if (aom_codec_decode(&codec, frame, (unsigned int)frame_size, NULL, 0))
       die_codec(&codec, "Failed to decode frame");
 
-    while ((img = vpx_codec_get_frame(&codec, &iter)) != NULL) {
+    while ((img = aom_codec_get_frame(&codec, &iter)) != NULL) {
       unsigned char digest[16];
 
       get_image_md5(img, digest);
@@ -123,9 +123,9 @@
   }
 
   printf("Processed %d frames.\n", frame_cnt);
-  if (vpx_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec.");
+  if (aom_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec.");
 
-  vpx_video_reader_close(reader);
+  aom_video_reader_close(reader);
 
   fclose(outfile);
   return EXIT_SUCCESS;
diff --git a/examples/decode_with_drops.c b/examples/decode_with_drops.c
index 17757f6..506aff1 100644
--- a/examples/decode_with_drops.c
+++ b/examples/decode_with_drops.c
@@ -56,12 +56,12 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "aom/vp8dx.h"
-#include "aom/vpx_decoder.h"
+#include "aom/aomdx.h"
+#include "aom/aom_decoder.h"
 
 #include "../tools_common.h"
 #include "../video_reader.h"
-#include "./vpx_config.h"
+#include "./aom_config.h"
 
 static const char *exec_name;
 
@@ -73,10 +73,10 @@
 int main(int argc, char **argv) {
   int frame_cnt = 0;
   FILE *outfile = NULL;
-  vpx_codec_ctx_t codec;
-  const VpxInterface *decoder = NULL;
-  VpxVideoReader *reader = NULL;
-  const VpxVideoInfo *info = NULL;
+  aom_codec_ctx_t codec;
+  const AvxInterface *decoder = NULL;
+  AvxVideoReader *reader = NULL;
+  const AvxVideoInfo *info = NULL;
   int n = 0;
   int m = 0;
   int is_range = 0;
@@ -86,7 +86,7 @@
 
   if (argc != 4) die("Invalid number of arguments.");
 
-  reader = vpx_video_reader_open(argv[1]);
+  reader = aom_video_reader_open(argv[1]);
   if (!reader) die("Failed to open %s for reading.", argv[1]);
 
   if (!(outfile = fopen(argv[2], "wb")))
@@ -98,24 +98,24 @@
   if (!n || !m || (*nptr != '-' && *nptr != '/'))
     die("Couldn't parse pattern %s.\n", argv[3]);
 
-  info = vpx_video_reader_get_info(reader);
+  info = aom_video_reader_get_info(reader);
 
-  decoder = get_vpx_decoder_by_fourcc(info->codec_fourcc);
+  decoder = get_aom_decoder_by_fourcc(info->codec_fourcc);
   if (!decoder) die("Unknown input codec.");
 
-  printf("Using %s\n", vpx_codec_iface_name(decoder->codec_interface()));
+  printf("Using %s\n", aom_codec_iface_name(decoder->codec_interface()));
 
-  if (vpx_codec_dec_init(&codec, decoder->codec_interface(), NULL, 0))
+  if (aom_codec_dec_init(&codec, decoder->codec_interface(), NULL, 0))
     die_codec(&codec, "Failed to initialize decoder.");
 
-  while (vpx_video_reader_read_frame(reader)) {
-    vpx_codec_iter_t iter = NULL;
-    vpx_image_t *img = NULL;
+  while (aom_video_reader_read_frame(reader)) {
+    aom_codec_iter_t iter = NULL;
+    aom_image_t *img = NULL;
     size_t frame_size = 0;
     int skip;
     const unsigned char *frame =
-        vpx_video_reader_get_frame(reader, &frame_size);
-    if (vpx_codec_decode(&codec, frame, (unsigned int)frame_size, NULL, 0))
+        aom_video_reader_get_frame(reader, &frame_size);
+    if (aom_codec_decode(&codec, frame, (unsigned int)frame_size, NULL, 0))
       die_codec(&codec, "Failed to decode frame.");
 
     ++frame_cnt;
@@ -126,8 +126,8 @@
     if (!skip) {
       putc('.', stdout);
 
-      while ((img = vpx_codec_get_frame(&codec, &iter)) != NULL)
-        vpx_img_write(img, outfile);
+      while ((img = aom_codec_get_frame(&codec, &iter)) != NULL)
+        aom_img_write(img, outfile);
     } else {
       putc('X', stdout);
     }
@@ -136,12 +136,12 @@
   }
 
   printf("Processed %d frames.\n", frame_cnt);
-  if (vpx_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec.");
+  if (aom_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec.");
 
   printf("Play: ffplay -f rawvideo -pix_fmt yuv420p -s %dx%d %s\n",
          info->frame_width, info->frame_height, argv[2]);
 
-  vpx_video_reader_close(reader);
+  aom_video_reader_close(reader);
   fclose(outfile);
 
   return EXIT_SUCCESS;
diff --git a/examples/lossless_encoder.c b/examples/lossless_encoder.c
index 09693c8..7676226 100644
--- a/examples/lossless_encoder.c
+++ b/examples/lossless_encoder.c
@@ -12,8 +12,8 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "aom/vpx_encoder.h"
-#include "aom/vp8cx.h"
+#include "aom/aom_encoder.h"
+#include "aom/aomcx.h"
 
 #include "../tools_common.h"
 #include "../video_writer.h"
@@ -28,21 +28,21 @@
   exit(EXIT_FAILURE);
 }
 
-static int encode_frame(vpx_codec_ctx_t *codec, vpx_image_t *img,
-                        int frame_index, int flags, VpxVideoWriter *writer) {
+static int encode_frame(aom_codec_ctx_t *codec, aom_image_t *img,
+                        int frame_index, int flags, AvxVideoWriter *writer) {
   int got_pkts = 0;
-  vpx_codec_iter_t iter = NULL;
-  const vpx_codec_cx_pkt_t *pkt = NULL;
-  const vpx_codec_err_t res =
-      vpx_codec_encode(codec, img, frame_index, 1, flags, VPX_DL_GOOD_QUALITY);
-  if (res != VPX_CODEC_OK) die_codec(codec, "Failed to encode frame");
+  aom_codec_iter_t iter = NULL;
+  const aom_codec_cx_pkt_t *pkt = NULL;
+  const aom_codec_err_t res =
+      aom_codec_encode(codec, img, frame_index, 1, flags, AOM_DL_GOOD_QUALITY);
+  if (res != AOM_CODEC_OK) die_codec(codec, "Failed to encode frame");
 
-  while ((pkt = vpx_codec_get_cx_data(codec, &iter)) != NULL) {
+  while ((pkt = aom_codec_get_cx_data(codec, &iter)) != NULL) {
     got_pkts = 1;
 
-    if (pkt->kind == VPX_CODEC_CX_FRAME_PKT) {
-      const int keyframe = (pkt->data.frame.flags & VPX_FRAME_IS_KEY) != 0;
-      if (!vpx_video_writer_write_frame(writer, pkt->data.frame.buf,
+    if (pkt->kind == AOM_CODEC_CX_FRAME_PKT) {
+      const int keyframe = (pkt->data.frame.flags & AOM_FRAME_IS_KEY) != 0;
+      if (!aom_video_writer_write_frame(writer, pkt->data.frame.buf,
                                         pkt->data.frame.sz,
                                         pkt->data.frame.pts)) {
         die_codec(codec, "Failed to write compressed frame");
@@ -57,21 +57,21 @@
 
 int main(int argc, char **argv) {
   FILE *infile = NULL;
-  vpx_codec_ctx_t codec;
-  vpx_codec_enc_cfg_t cfg;
+  aom_codec_ctx_t codec;
+  aom_codec_enc_cfg_t cfg;
   int frame_count = 0;
-  vpx_image_t raw;
-  vpx_codec_err_t res;
-  VpxVideoInfo info = { 0 };
-  VpxVideoWriter *writer = NULL;
-  const VpxInterface *encoder = NULL;
+  aom_image_t raw;
+  aom_codec_err_t res;
+  AvxVideoInfo info = { 0 };
+  AvxVideoWriter *writer = NULL;
+  const AvxInterface *encoder = NULL;
   const int fps = 30;
 
   exec_name = argv[0];
 
   if (argc < 5) die("Invalid number of arguments");
 
-  encoder = get_vpx_encoder_by_name("vp9");
+  encoder = get_aom_encoder_by_name("av1");
   if (!encoder) die("Unsupported codec.");
 
   info.codec_fourcc = encoder->fourcc;
@@ -85,14 +85,14 @@
     die("Invalid frame size: %dx%d", info.frame_width, info.frame_height);
   }
 
-  if (!vpx_img_alloc(&raw, VPX_IMG_FMT_I420, info.frame_width,
+  if (!aom_img_alloc(&raw, AOM_IMG_FMT_I420, info.frame_width,
                      info.frame_height, 1)) {
     die("Failed to allocate image.");
   }
 
-  printf("Using %s\n", vpx_codec_iface_name(encoder->codec_interface()));
+  printf("Using %s\n", aom_codec_iface_name(encoder->codec_interface()));
 
-  res = vpx_codec_enc_config_default(encoder->codec_interface(), &cfg, 0);
+  res = aom_codec_enc_config_default(encoder->codec_interface(), &cfg, 0);
   if (res) die_codec(&codec, "Failed to get default codec config.");
 
   cfg.g_w = info.frame_width;
@@ -100,20 +100,20 @@
   cfg.g_timebase.num = info.time_base.numerator;
   cfg.g_timebase.den = info.time_base.denominator;
 
-  writer = vpx_video_writer_open(argv[4], kContainerIVF, &info);
+  writer = aom_video_writer_open(argv[4], kContainerIVF, &info);
   if (!writer) die("Failed to open %s for writing.", argv[4]);
 
   if (!(infile = fopen(argv[3], "rb")))
     die("Failed to open %s for reading.", argv[3]);
 
-  if (vpx_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0))
+  if (aom_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0))
     die_codec(&codec, "Failed to initialize encoder");
 
-  if (vpx_codec_control_(&codec, VP9E_SET_LOSSLESS, 1))
+  if (aom_codec_control_(&codec, AV1E_SET_LOSSLESS, 1))
     die_codec(&codec, "Failed to use lossless mode");
 
   // Encode frames.
-  while (vpx_img_read(&raw, infile)) {
+  while (aom_img_read(&raw, infile)) {
     encode_frame(&codec, &raw, frame_count++, 0, writer);
   }
 
@@ -125,10 +125,10 @@
   fclose(infile);
   printf("Processed %d frames.\n", frame_count);
 
-  vpx_img_free(&raw);
-  if (vpx_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec.");
+  aom_img_free(&raw);
+  if (aom_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec.");
 
-  vpx_video_writer_close(writer);
+  aom_video_writer_close(writer);
 
   return EXIT_SUCCESS;
 }
diff --git a/examples/resize_util.c b/examples/resize_util.c
index 7e529b2..4f56885 100644
--- a/examples/resize_util.c
+++ b/examples/resize_util.c
@@ -16,7 +16,7 @@
 #include <string.h>
 
 #include "../tools_common.h"
-#include "../vp9/encoder/vp9_resize.h"
+#include "../av1/encoder/av1_resize.h"
 
 static const char *exec_name = NULL;
 
@@ -107,7 +107,7 @@
   f = 0;
   while (f < frames) {
     if (fread(inbuf, width * height * 3 / 2, 1, fpin) != 1) break;
-    vp9_resize_frame420(inbuf, width, inbuf_u, inbuf_v, width / 2, height,
+    av1_resize_frame420(inbuf, width, inbuf_u, inbuf_v, width / 2, height,
                         width, outbuf, target_width, outbuf_u, outbuf_v,
                         target_width / 2, target_height, target_width);
     fwrite(outbuf, target_width * target_height * 3 / 2, 1, fpout);
diff --git a/examples/set_maps.c b/examples/set_maps.c
index ae6a113..2f42751 100644
--- a/examples/set_maps.c
+++ b/examples/set_maps.c
@@ -46,8 +46,8 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "aom/vp8cx.h"
-#include "aom/vpx_encoder.h"
+#include "aom/aomcx.h"
+#include "aom/aom_encoder.h"
 
 #include "../tools_common.h"
 #include "../video_writer.h"
@@ -60,10 +60,10 @@
   exit(EXIT_FAILURE);
 }
 
-static void set_roi_map(const vpx_codec_enc_cfg_t *cfg,
-                        vpx_codec_ctx_t *codec) {
+static void set_roi_map(const aom_codec_enc_cfg_t *cfg,
+                        aom_codec_ctx_t *codec) {
   unsigned int i;
-  vpx_roi_map_t roi;
+  aom_roi_map_t roi;
   memset(&roi, 0, sizeof(roi));
 
   roi.rows = (cfg->g_h + 15) / 16;
@@ -87,16 +87,16 @@
   roi.roi_map = (uint8_t *)malloc(roi.rows * roi.cols);
   for (i = 0; i < roi.rows * roi.cols; ++i) roi.roi_map[i] = i % 4;
 
-  if (vpx_codec_control(codec, VP8E_SET_ROI_MAP, &roi))
+  if (aom_codec_control(codec, AOME_SET_ROI_MAP, &roi))
     die_codec(codec, "Failed to set ROI map");
 
   free(roi.roi_map);
 }
 
-static void set_active_map(const vpx_codec_enc_cfg_t *cfg,
-                           vpx_codec_ctx_t *codec) {
+static void set_active_map(const aom_codec_enc_cfg_t *cfg,
+                           aom_codec_ctx_t *codec) {
   unsigned int i;
-  vpx_active_map_t map = { 0, 0, 0 };
+  aom_active_map_t map = { 0, 0, 0 };
 
   map.rows = (cfg->g_h + 15) / 16;
   map.cols = (cfg->g_w + 15) / 16;
@@ -104,39 +104,39 @@
   map.active_map = (uint8_t *)malloc(map.rows * map.cols);
   for (i = 0; i < map.rows * map.cols; ++i) map.active_map[i] = i % 2;
 
-  if (vpx_codec_control(codec, VP8E_SET_ACTIVEMAP, &map))
+  if (aom_codec_control(codec, AOME_SET_ACTIVEMAP, &map))
     die_codec(codec, "Failed to set active map");
 
   free(map.active_map);
 }
 
-static void unset_active_map(const vpx_codec_enc_cfg_t *cfg,
-                             vpx_codec_ctx_t *codec) {
-  vpx_active_map_t map = { 0, 0, 0 };
+static void unset_active_map(const aom_codec_enc_cfg_t *cfg,
+                             aom_codec_ctx_t *codec) {
+  aom_active_map_t map = { 0, 0, 0 };
 
   map.rows = (cfg->g_h + 15) / 16;
   map.cols = (cfg->g_w + 15) / 16;
   map.active_map = NULL;
 
-  if (vpx_codec_control(codec, VP8E_SET_ACTIVEMAP, &map))
+  if (aom_codec_control(codec, AOME_SET_ACTIVEMAP, &map))
     die_codec(codec, "Failed to set active map");
 }
 
-static int encode_frame(vpx_codec_ctx_t *codec, vpx_image_t *img,
-                        int frame_index, VpxVideoWriter *writer) {
+static int encode_frame(aom_codec_ctx_t *codec, aom_image_t *img,
+                        int frame_index, AvxVideoWriter *writer) {
   int got_pkts = 0;
-  vpx_codec_iter_t iter = NULL;
-  const vpx_codec_cx_pkt_t *pkt = NULL;
-  const vpx_codec_err_t res =
-      vpx_codec_encode(codec, img, frame_index, 1, 0, VPX_DL_GOOD_QUALITY);
-  if (res != VPX_CODEC_OK) die_codec(codec, "Failed to encode frame");
+  aom_codec_iter_t iter = NULL;
+  const aom_codec_cx_pkt_t *pkt = NULL;
+  const aom_codec_err_t res =
+      aom_codec_encode(codec, img, frame_index, 1, 0, AOM_DL_GOOD_QUALITY);
+  if (res != AOM_CODEC_OK) die_codec(codec, "Failed to encode frame");
 
-  while ((pkt = vpx_codec_get_cx_data(codec, &iter)) != NULL) {
+  while ((pkt = aom_codec_get_cx_data(codec, &iter)) != NULL) {
     got_pkts = 1;
 
-    if (pkt->kind == VPX_CODEC_CX_FRAME_PKT) {
-      const int keyframe = (pkt->data.frame.flags & VPX_FRAME_IS_KEY) != 0;
-      if (!vpx_video_writer_write_frame(writer, pkt->data.frame.buf,
+    if (pkt->kind == AOM_CODEC_CX_FRAME_PKT) {
+      const int keyframe = (pkt->data.frame.flags & AOM_FRAME_IS_KEY) != 0;
+      if (!aom_video_writer_write_frame(writer, pkt->data.frame.buf,
                                         pkt->data.frame.sz,
                                         pkt->data.frame.pts)) {
         die_codec(codec, "Failed to write compressed frame");
@@ -152,14 +152,14 @@
 
 int main(int argc, char **argv) {
   FILE *infile = NULL;
-  vpx_codec_ctx_t codec;
-  vpx_codec_enc_cfg_t cfg;
+  aom_codec_ctx_t codec;
+  aom_codec_enc_cfg_t cfg;
   int frame_count = 0;
-  vpx_image_t raw;
-  vpx_codec_err_t res;
-  VpxVideoInfo info;
-  VpxVideoWriter *writer = NULL;
-  const VpxInterface *encoder = NULL;
+  aom_image_t raw;
+  aom_codec_err_t res;
+  AvxVideoInfo info;
+  AvxVideoWriter *writer = NULL;
+  const AvxInterface *encoder = NULL;
   const int fps = 2;  // TODO(dkovalev) add command line argument
   const double bits_per_pixel_per_frame = 0.067;
 
@@ -168,7 +168,7 @@
 
   memset(&info, 0, sizeof(info));
 
-  encoder = get_vpx_encoder_by_name(argv[1]);
+  encoder = get_aom_encoder_by_name(argv[1]);
   if (encoder == NULL) {
     die("Unsupported codec.");
   }
@@ -184,14 +184,14 @@
     die("Invalid frame size: %dx%d", info.frame_width, info.frame_height);
   }
 
-  if (!vpx_img_alloc(&raw, VPX_IMG_FMT_I420, info.frame_width,
+  if (!aom_img_alloc(&raw, AOM_IMG_FMT_I420, info.frame_width,
                      info.frame_height, 1)) {
     die("Failed to allocate image.");
   }
 
-  printf("Using %s\n", vpx_codec_iface_name(encoder->codec_interface()));
+  printf("Using %s\n", aom_codec_iface_name(encoder->codec_interface()));
 
-  res = vpx_codec_enc_config_default(encoder->codec_interface(), &cfg, 0);
+  res = aom_codec_enc_config_default(encoder->codec_interface(), &cfg, 0);
   if (res) die_codec(&codec, "Failed to get default codec config.");
 
   cfg.g_w = info.frame_width;
@@ -202,20 +202,20 @@
       (unsigned int)(bits_per_pixel_per_frame * cfg.g_w * cfg.g_h * fps / 1000);
   cfg.g_lag_in_frames = 0;
 
-  writer = vpx_video_writer_open(argv[5], kContainerIVF, &info);
+  writer = aom_video_writer_open(argv[5], kContainerIVF, &info);
   if (!writer) die("Failed to open %s for writing.", argv[5]);
 
   if (!(infile = fopen(argv[4], "rb")))
     die("Failed to open %s for reading.", argv[4]);
 
-  if (vpx_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0))
+  if (aom_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0))
     die_codec(&codec, "Failed to initialize encoder");
 
   // Encode frames.
-  while (vpx_img_read(&raw, infile)) {
+  while (aom_img_read(&raw, infile)) {
     ++frame_count;
 
-    if (frame_count == 22 && encoder->fourcc == VP8_FOURCC) {
+    if (frame_count == 22 && encoder->fourcc == AV1_FOURCC) {
       set_roi_map(&cfg, &codec);
     } else if (frame_count == 33) {
       set_active_map(&cfg, &codec);
@@ -234,10 +234,10 @@
   fclose(infile);
   printf("Processed %d frames.\n", frame_count);
 
-  vpx_img_free(&raw);
-  if (vpx_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec.");
+  aom_img_free(&raw);
+  if (aom_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec.");
 
-  vpx_video_writer_close(writer);
+  aom_video_writer_close(writer);
 
   return EXIT_SUCCESS;
 }
diff --git a/examples/simple_decoder.c b/examples/simple_decoder.c
index 7b21ebf..42e9cbb 100644
--- a/examples/simple_decoder.c
+++ b/examples/simple_decoder.c
@@ -26,26 +26,26 @@
 //
 // Standard Includes
 // -----------------
-// For decoders, you only have to include `vpx_decoder.h` and then any
+// For decoders, you only have to include `aom_decoder.h` and then any
 // header files for the specific codecs you use. In this case, we're using
 // vp8.
 //
 // Initializing The Codec
 // ----------------------
-// The libaom decoder is initialized by the call to vpx_codec_dec_init().
-// Determining the codec interface to use is handled by VpxVideoReader and the
-// functions prefixed with vpx_video_reader_. Discussion of those functions is
+// The libaom decoder is initialized by the call to aom_codec_dec_init().
+// Determining the codec interface to use is handled by AvxVideoReader and the
+// functions prefixed with aom_video_reader_. Discussion of those functions is
 // beyond the scope of this example, but the main gist is to open the input file
-// and parse just enough of it to determine if it's a VPx file and which VPx
+// and parse just enough of it to determine if it's a AVx file and which AVx
 // codec is contained within the file.
-// Note the NULL pointer passed to vpx_codec_dec_init(). We do that in this
+// Note the NULL pointer passed to aom_codec_dec_init(). We do that in this
 // example because we want the algorithm to determine the stream configuration
 // (width/height) and allocate memory automatically.
 //
 // Decoding A Frame
 // ----------------
 // Once the frame has been read into memory, it is decoded using the
-// `vpx_codec_decode` function. The call takes a pointer to the data
+// `aom_codec_decode` function. The call takes a pointer to the data
 // (`frame`) and the length of the data (`frame_size`). No application data
 // is associated with the frame in this example, so the `user_priv`
 // parameter is NULL. The `deadline` parameter is left at zero for this
@@ -53,10 +53,10 @@
 // processing.
 //
 // Codecs may produce a variable number of output frames for every call to
-// `vpx_codec_decode`. These frames are retrieved by the
-// `vpx_codec_get_frame` iterator function. The iterator variable `iter` is
-// initialized to NULL each time `vpx_codec_decode` is called.
-// `vpx_codec_get_frame` is called in a loop, returning a pointer to a
+// `aom_codec_decode`. These frames are retrieved by the
+// `aom_codec_get_frame` iterator function. The iterator variable `iter` is
+// initialized to NULL each time `aom_codec_decode` is called.
+// `aom_codec_get_frame` is called in a loop, returning a pointer to a
 // decoded image or NULL to indicate the end of list.
 //
 // Processing The Decoded Data
@@ -66,24 +66,24 @@
 //
 // Cleanup
 // -------
-// The `vpx_codec_destroy` call frees any memory allocated by the codec.
+// The `aom_codec_destroy` call frees any memory allocated by the codec.
 //
 // Error Handling
 // --------------
 // This example does not special case any error return codes. If there was
 // an error, a descriptive message is printed and the program exits. With
-// few exceptions, vpx_codec functions return an enumerated error status,
+// few exceptions, aom_codec functions return an enumerated error status,
 // with the value `0` indicating success.
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#include "aom/vpx_decoder.h"
+#include "aom/aom_decoder.h"
 
 #include "../tools_common.h"
 #include "../video_reader.h"
-#include "./vpx_config.h"
+#include "./aom_config.h"
 
 static const char *exec_name;
 
@@ -95,53 +95,53 @@
 int main(int argc, char **argv) {
   int frame_cnt = 0;
   FILE *outfile = NULL;
-  vpx_codec_ctx_t codec;
-  VpxVideoReader *reader = NULL;
-  const VpxInterface *decoder = NULL;
-  const VpxVideoInfo *info = NULL;
+  aom_codec_ctx_t codec;
+  AvxVideoReader *reader = NULL;
+  const AvxInterface *decoder = NULL;
+  const AvxVideoInfo *info = NULL;
 
   exec_name = argv[0];
 
   if (argc != 3) die("Invalid number of arguments.");
 
-  reader = vpx_video_reader_open(argv[1]);
+  reader = aom_video_reader_open(argv[1]);
   if (!reader) die("Failed to open %s for reading.", argv[1]);
 
   if (!(outfile = fopen(argv[2], "wb")))
     die("Failed to open %s for writing.", argv[2]);
 
-  info = vpx_video_reader_get_info(reader);
+  info = aom_video_reader_get_info(reader);
 
-  decoder = get_vpx_decoder_by_fourcc(info->codec_fourcc);
+  decoder = get_aom_decoder_by_fourcc(info->codec_fourcc);
   if (!decoder) die("Unknown input codec.");
 
-  printf("Using %s\n", vpx_codec_iface_name(decoder->codec_interface()));
+  printf("Using %s\n", aom_codec_iface_name(decoder->codec_interface()));
 
-  if (vpx_codec_dec_init(&codec, decoder->codec_interface(), NULL, 0))
+  if (aom_codec_dec_init(&codec, decoder->codec_interface(), NULL, 0))
     die_codec(&codec, "Failed to initialize decoder.");
 
-  while (vpx_video_reader_read_frame(reader)) {
-    vpx_codec_iter_t iter = NULL;
-    vpx_image_t *img = NULL;
+  while (aom_video_reader_read_frame(reader)) {
+    aom_codec_iter_t iter = NULL;
+    aom_image_t *img = NULL;
     size_t frame_size = 0;
     const unsigned char *frame =
-        vpx_video_reader_get_frame(reader, &frame_size);
-    if (vpx_codec_decode(&codec, frame, (unsigned int)frame_size, NULL, 0))
+        aom_video_reader_get_frame(reader, &frame_size);
+    if (aom_codec_decode(&codec, frame, (unsigned int)frame_size, NULL, 0))
       die_codec(&codec, "Failed to decode frame.");
 
-    while ((img = vpx_codec_get_frame(&codec, &iter)) != NULL) {
-      vpx_img_write(img, outfile);
+    while ((img = aom_codec_get_frame(&codec, &iter)) != NULL) {
+      aom_img_write(img, outfile);
       ++frame_cnt;
     }
   }
 
   printf("Processed %d frames.\n", frame_cnt);
-  if (vpx_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec");
+  if (aom_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec");
 
   printf("Play: ffplay -f rawvideo -pix_fmt yuv420p -s %dx%d %s\n",
          info->frame_width, info->frame_height, argv[2]);
 
-  vpx_video_reader_close(reader);
+  aom_video_reader_close(reader);
 
   fclose(outfile);
 
diff --git a/examples/simple_encoder.c b/examples/simple_encoder.c
index 2cae453..2b1bc7f 100644
--- a/examples/simple_encoder.c
+++ b/examples/simple_encoder.c
@@ -26,9 +26,9 @@
 //
 // Standard Includes
 // -----------------
-// For encoders, you only have to include `vpx_encoder.h` and then any
+// For encoders, you only have to include `aom_encoder.h` and then any
 // header files for the specific codecs you use. In this case, we're using
-// vp8.
+// aom.
 //
 // Getting The Default Configuration
 // ---------------------------------
@@ -60,32 +60,32 @@
 // is passed, indicating the End-Of-Stream condition to the encoder. The
 // `frame_cnt` is reused as the presentation time stamp (PTS) and each
 // frame is shown for one frame-time in duration. The flags parameter is
-// unused in this example. The deadline is set to VPX_DL_REALTIME to
+// unused in this example. The deadline is set to AOM_DL_REALTIME to
 // make the example run as quickly as possible.
 
 // Forced Keyframes
 // ----------------
-// Keyframes can be forced by setting the VPX_EFLAG_FORCE_KF bit of the
-// flags passed to `vpx_codec_control()`. In this example, we force a
+// Keyframes can be forced by setting the AOM_EFLAG_FORCE_KF bit of the
+// flags passed to `aom_codec_control()`. In this example, we force a
 // keyframe every <keyframe-interval> frames. Note, the output stream can
 // contain additional keyframes beyond those that have been forced using the
-// VPX_EFLAG_FORCE_KF flag because of automatic keyframe placement by the
+// AOM_EFLAG_FORCE_KF flag because of automatic keyframe placement by the
 // encoder.
 //
 // Processing The Encoded Data
 // ---------------------------
-// Each packet of type `VPX_CODEC_CX_FRAME_PKT` contains the encoded data
+// Each packet of type `AOM_CODEC_CX_FRAME_PKT` contains the encoded data
 // for this frame. We write a IVF frame header, followed by the raw data.
 //
 // Cleanup
 // -------
-// The `vpx_codec_destroy` call frees any memory allocated by the codec.
+// The `aom_codec_destroy` call frees any memory allocated by the codec.
 //
 // Error Handling
 // --------------
 // This example does not special case any error return codes. If there was
 // an error, a descriptive message is printed and the program exits. With
-// few exeptions, vpx_codec functions return an enumerated error status,
+// few exeptions, aom_codec functions return an enumerated error status,
 // with the value `0` indicating success.
 //
 // Error Resiliency Features
@@ -99,7 +99,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "aom/vpx_encoder.h"
+#include "aom/aom_encoder.h"
 
 #include "../tools_common.h"
 #include "../video_writer.h"
@@ -115,21 +115,21 @@
   exit(EXIT_FAILURE);
 }
 
-static int encode_frame(vpx_codec_ctx_t *codec, vpx_image_t *img,
-                        int frame_index, int flags, VpxVideoWriter *writer) {
+static int encode_frame(aom_codec_ctx_t *codec, aom_image_t *img,
+                        int frame_index, int flags, AvxVideoWriter *writer) {
   int got_pkts = 0;
-  vpx_codec_iter_t iter = NULL;
-  const vpx_codec_cx_pkt_t *pkt = NULL;
-  const vpx_codec_err_t res =
-      vpx_codec_encode(codec, img, frame_index, 1, flags, VPX_DL_GOOD_QUALITY);
-  if (res != VPX_CODEC_OK) die_codec(codec, "Failed to encode frame");
+  aom_codec_iter_t iter = NULL;
+  const aom_codec_cx_pkt_t *pkt = NULL;
+  const aom_codec_err_t res =
+      aom_codec_encode(codec, img, frame_index, 1, flags, AOM_DL_GOOD_QUALITY);
+  if (res != AOM_CODEC_OK) die_codec(codec, "Failed to encode frame");
 
-  while ((pkt = vpx_codec_get_cx_data(codec, &iter)) != NULL) {
+  while ((pkt = aom_codec_get_cx_data(codec, &iter)) != NULL) {
     got_pkts = 1;
 
-    if (pkt->kind == VPX_CODEC_CX_FRAME_PKT) {
-      const int keyframe = (pkt->data.frame.flags & VPX_FRAME_IS_KEY) != 0;
-      if (!vpx_video_writer_write_frame(writer, pkt->data.frame.buf,
+    if (pkt->kind == AOM_CODEC_CX_FRAME_PKT) {
+      const int keyframe = (pkt->data.frame.flags & AOM_FRAME_IS_KEY) != 0;
+      if (!aom_video_writer_write_frame(writer, pkt->data.frame.buf,
                                         pkt->data.frame.sz,
                                         pkt->data.frame.pts)) {
         die_codec(codec, "Failed to write compressed frame");
@@ -145,14 +145,14 @@
 // TODO(tomfinegan): Improve command line parsing and add args for bitrate/fps.
 int main(int argc, char **argv) {
   FILE *infile = NULL;
-  vpx_codec_ctx_t codec;
-  vpx_codec_enc_cfg_t cfg;
+  aom_codec_ctx_t codec;
+  aom_codec_enc_cfg_t cfg;
   int frame_count = 0;
-  vpx_image_t raw;
-  vpx_codec_err_t res;
-  VpxVideoInfo info = { 0 };
-  VpxVideoWriter *writer = NULL;
-  const VpxInterface *encoder = NULL;
+  aom_image_t raw;
+  aom_codec_err_t res;
+  AvxVideoInfo info = { 0 };
+  AvxVideoWriter *writer = NULL;
+  const AvxInterface *encoder = NULL;
   const int fps = 30;
   const int bitrate = 200;
   int keyframe_interval = 0;
@@ -177,7 +177,7 @@
   keyframe_interval_arg = argv[6];
   max_frames = strtol(argv[8], NULL, 0);
 
-  encoder = get_vpx_encoder_by_name(codec_arg);
+  encoder = get_aom_encoder_by_name(codec_arg);
   if (!encoder) die("Unsupported codec.");
 
   info.codec_fourcc = encoder->fourcc;
@@ -191,7 +191,7 @@
     die("Invalid frame size: %dx%d", info.frame_width, info.frame_height);
   }
 
-  if (!vpx_img_alloc(&raw, VPX_IMG_FMT_I420, info.frame_width,
+  if (!aom_img_alloc(&raw, AOM_IMG_FMT_I420, info.frame_width,
                      info.frame_height, 1)) {
     die("Failed to allocate image.");
   }
@@ -199,9 +199,9 @@
   keyframe_interval = strtol(keyframe_interval_arg, NULL, 0);
   if (keyframe_interval < 0) die("Invalid keyframe interval value.");
 
-  printf("Using %s\n", vpx_codec_iface_name(encoder->codec_interface()));
+  printf("Using %s\n", aom_codec_iface_name(encoder->codec_interface()));
 
-  res = vpx_codec_enc_config_default(encoder->codec_interface(), &cfg, 0);
+  res = aom_codec_enc_config_default(encoder->codec_interface(), &cfg, 0);
   if (res) die_codec(&codec, "Failed to get default codec config.");
 
   cfg.g_w = info.frame_width;
@@ -211,20 +211,20 @@
   cfg.rc_target_bitrate = bitrate;
   cfg.g_error_resilient = strtol(argv[7], NULL, 0);
 
-  writer = vpx_video_writer_open(outfile_arg, kContainerIVF, &info);
+  writer = aom_video_writer_open(outfile_arg, kContainerIVF, &info);
   if (!writer) die("Failed to open %s for writing.", outfile_arg);
 
   if (!(infile = fopen(infile_arg, "rb")))
     die("Failed to open %s for reading.", infile_arg);
 
-  if (vpx_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0))
+  if (aom_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0))
     die_codec(&codec, "Failed to initialize encoder");
 
   // Encode frames.
-  while (vpx_img_read(&raw, infile)) {
+  while (aom_img_read(&raw, infile)) {
     int flags = 0;
     if (keyframe_interval > 0 && frame_count % keyframe_interval == 0)
-      flags |= VPX_EFLAG_FORCE_KF;
+      flags |= AOM_EFLAG_FORCE_KF;
     encode_frame(&codec, &raw, frame_count++, flags, writer);
     frames_encoded++;
     if (max_frames > 0 && frames_encoded >= max_frames) break;
@@ -238,10 +238,10 @@
   fclose(infile);
   printf("Processed %d frames.\n", frame_count);
 
-  vpx_img_free(&raw);
-  if (vpx_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec.");
+  aom_img_free(&raw);
+  if (aom_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec.");
 
-  vpx_video_writer_close(writer);
+  aom_video_writer_close(writer);
 
   return EXIT_SUCCESS;
 }
diff --git a/examples/twopass_encoder.c b/examples/twopass_encoder.c
index 0ed303a..6c910ef 100644
--- a/examples/twopass_encoder.c
+++ b/examples/twopass_encoder.c
@@ -29,11 +29,11 @@
 // ----------------
 // Encoding a frame in two pass mode is identical to the simple encoder
 // example. To increase the quality while sacrificing encoding speed,
-// VPX_DL_BEST_QUALITY can be used in place of VPX_DL_GOOD_QUALITY.
+// AOM_DL_BEST_QUALITY can be used in place of AOM_DL_GOOD_QUALITY.
 //
 // Processing Statistics Packets
 // -----------------------------
-// Each packet of type `VPX_CODEC_CX_FRAME_PKT` contains the encoded data
+// Each packet of type `AOM_CODEC_CX_FRAME_PKT` contains the encoded data
 // for this frame. We write a IVF frame header, followed by the raw data.
 //
 //
@@ -51,7 +51,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "aom/vpx_encoder.h"
+#include "aom/aom_encoder.h"
 
 #include "../tools_common.h"
 #include "../video_writer.h"
@@ -66,21 +66,21 @@
   exit(EXIT_FAILURE);
 }
 
-static int get_frame_stats(vpx_codec_ctx_t *ctx, const vpx_image_t *img,
-                           vpx_codec_pts_t pts, unsigned int duration,
-                           vpx_enc_frame_flags_t flags, unsigned int deadline,
-                           vpx_fixed_buf_t *stats) {
+static int get_frame_stats(aom_codec_ctx_t *ctx, const aom_image_t *img,
+                           aom_codec_pts_t pts, unsigned int duration,
+                           aom_enc_frame_flags_t flags, unsigned int deadline,
+                           aom_fixed_buf_t *stats) {
   int got_pkts = 0;
-  vpx_codec_iter_t iter = NULL;
-  const vpx_codec_cx_pkt_t *pkt = NULL;
-  const vpx_codec_err_t res =
-      vpx_codec_encode(ctx, img, pts, duration, flags, deadline);
-  if (res != VPX_CODEC_OK) die_codec(ctx, "Failed to get frame stats.");
+  aom_codec_iter_t iter = NULL;
+  const aom_codec_cx_pkt_t *pkt = NULL;
+  const aom_codec_err_t res =
+      aom_codec_encode(ctx, img, pts, duration, flags, deadline);
+  if (res != AOM_CODEC_OK) die_codec(ctx, "Failed to get frame stats.");
 
-  while ((pkt = vpx_codec_get_cx_data(ctx, &iter)) != NULL) {
+  while ((pkt = aom_codec_get_cx_data(ctx, &iter)) != NULL) {
     got_pkts = 1;
 
-    if (pkt->kind == VPX_CODEC_STATS_PKT) {
+    if (pkt->kind == AOM_CODEC_STATS_PKT) {
       const uint8_t *const pkt_buf = pkt->data.twopass_stats.buf;
       const size_t pkt_size = pkt->data.twopass_stats.sz;
       stats->buf = realloc(stats->buf, stats->sz + pkt_size);
@@ -92,23 +92,23 @@
   return got_pkts;
 }
 
-static int encode_frame(vpx_codec_ctx_t *ctx, const vpx_image_t *img,
-                        vpx_codec_pts_t pts, unsigned int duration,
-                        vpx_enc_frame_flags_t flags, unsigned int deadline,
-                        VpxVideoWriter *writer) {
+static int encode_frame(aom_codec_ctx_t *ctx, const aom_image_t *img,
+                        aom_codec_pts_t pts, unsigned int duration,
+                        aom_enc_frame_flags_t flags, unsigned int deadline,
+                        AvxVideoWriter *writer) {
   int got_pkts = 0;
-  vpx_codec_iter_t iter = NULL;
-  const vpx_codec_cx_pkt_t *pkt = NULL;
-  const vpx_codec_err_t res =
-      vpx_codec_encode(ctx, img, pts, duration, flags, deadline);
-  if (res != VPX_CODEC_OK) die_codec(ctx, "Failed to encode frame.");
+  aom_codec_iter_t iter = NULL;
+  const aom_codec_cx_pkt_t *pkt = NULL;
+  const aom_codec_err_t res =
+      aom_codec_encode(ctx, img, pts, duration, flags, deadline);
+  if (res != AOM_CODEC_OK) die_codec(ctx, "Failed to encode frame.");
 
-  while ((pkt = vpx_codec_get_cx_data(ctx, &iter)) != NULL) {
+  while ((pkt = aom_codec_get_cx_data(ctx, &iter)) != NULL) {
     got_pkts = 1;
-    if (pkt->kind == VPX_CODEC_CX_FRAME_PKT) {
-      const int keyframe = (pkt->data.frame.flags & VPX_FRAME_IS_KEY) != 0;
+    if (pkt->kind == AOM_CODEC_CX_FRAME_PKT) {
+      const int keyframe = (pkt->data.frame.flags & AOM_FRAME_IS_KEY) != 0;
 
-      if (!vpx_video_writer_write_frame(writer, pkt->data.frame.buf,
+      if (!aom_video_writer_write_frame(writer, pkt->data.frame.buf,
                                         pkt->data.frame.sz,
                                         pkt->data.frame.pts))
         die_codec(ctx, "Failed to write compressed frame.");
@@ -120,69 +120,69 @@
   return got_pkts;
 }
 
-static vpx_fixed_buf_t pass0(vpx_image_t *raw, FILE *infile,
-                             const VpxInterface *encoder,
-                             const vpx_codec_enc_cfg_t *cfg, int max_frames) {
-  vpx_codec_ctx_t codec;
+static aom_fixed_buf_t pass0(aom_image_t *raw, FILE *infile,
+                             const AvxInterface *encoder,
+                             const aom_codec_enc_cfg_t *cfg, int max_frames) {
+  aom_codec_ctx_t codec;
   int frame_count = 0;
-  vpx_fixed_buf_t stats = { NULL, 0 };
+  aom_fixed_buf_t stats = { NULL, 0 };
 
-  if (vpx_codec_enc_init(&codec, encoder->codec_interface(), cfg, 0))
+  if (aom_codec_enc_init(&codec, encoder->codec_interface(), cfg, 0))
     die_codec(&codec, "Failed to initialize encoder");
 
   // Calculate frame statistics.
-  while (vpx_img_read(raw, infile)) {
+  while (aom_img_read(raw, infile)) {
     ++frame_count;
-    get_frame_stats(&codec, raw, frame_count, 1, 0, VPX_DL_GOOD_QUALITY,
+    get_frame_stats(&codec, raw, frame_count, 1, 0, AOM_DL_GOOD_QUALITY,
                     &stats);
     if (max_frames > 0 && frame_count >= max_frames) break;
   }
 
   // Flush encoder.
-  while (get_frame_stats(&codec, NULL, frame_count, 1, 0, VPX_DL_GOOD_QUALITY,
+  while (get_frame_stats(&codec, NULL, frame_count, 1, 0, AOM_DL_GOOD_QUALITY,
                          &stats)) {
   }
 
   printf("Pass 0 complete. Processed %d frames.\n", frame_count);
-  if (vpx_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec.");
+  if (aom_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec.");
 
   return stats;
 }
 
-static void pass1(vpx_image_t *raw, FILE *infile, const char *outfile_name,
-                  const VpxInterface *encoder, const vpx_codec_enc_cfg_t *cfg,
+static void pass1(aom_image_t *raw, FILE *infile, const char *outfile_name,
+                  const AvxInterface *encoder, const aom_codec_enc_cfg_t *cfg,
                   int max_frames) {
-  VpxVideoInfo info = { encoder->fourcc,
+  AvxVideoInfo info = { encoder->fourcc,
                         cfg->g_w,
                         cfg->g_h,
                         { cfg->g_timebase.num, cfg->g_timebase.den } };
-  VpxVideoWriter *writer = NULL;
-  vpx_codec_ctx_t codec;
+  AvxVideoWriter *writer = NULL;
+  aom_codec_ctx_t codec;
   int frame_count = 0;
 
-  writer = vpx_video_writer_open(outfile_name, kContainerIVF, &info);
+  writer = aom_video_writer_open(outfile_name, kContainerIVF, &info);
   if (!writer) die("Failed to open %s for writing", outfile_name);
 
-  if (vpx_codec_enc_init(&codec, encoder->codec_interface(), cfg, 0))
+  if (aom_codec_enc_init(&codec, encoder->codec_interface(), cfg, 0))
     die_codec(&codec, "Failed to initialize encoder");
 
   // Encode frames.
-  while (vpx_img_read(raw, infile)) {
+  while (aom_img_read(raw, infile)) {
     ++frame_count;
-    encode_frame(&codec, raw, frame_count, 1, 0, VPX_DL_GOOD_QUALITY, writer);
+    encode_frame(&codec, raw, frame_count, 1, 0, AOM_DL_GOOD_QUALITY, writer);
 
     if (max_frames > 0 && frame_count >= max_frames) break;
   }
 
   // Flush encoder.
-  while (encode_frame(&codec, NULL, -1, 1, 0, VPX_DL_GOOD_QUALITY, writer)) {
+  while (encode_frame(&codec, NULL, -1, 1, 0, AOM_DL_GOOD_QUALITY, writer)) {
   }
 
   printf("\n");
 
-  if (vpx_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec.");
+  if (aom_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec.");
 
-  vpx_video_writer_close(writer);
+  aom_video_writer_close(writer);
 
   printf("Pass 1 complete. Processed %d frames.\n", frame_count);
 }
@@ -190,13 +190,13 @@
 int main(int argc, char **argv) {
   FILE *infile = NULL;
   int w, h;
-  vpx_codec_ctx_t codec;
-  vpx_codec_enc_cfg_t cfg;
-  vpx_image_t raw;
-  vpx_codec_err_t res;
-  vpx_fixed_buf_t stats;
+  aom_codec_ctx_t codec;
+  aom_codec_enc_cfg_t cfg;
+  aom_image_t raw;
+  aom_codec_err_t res;
+  aom_fixed_buf_t stats;
 
-  const VpxInterface *encoder = NULL;
+  const AvxInterface *encoder = NULL;
   const int fps = 30;       // TODO(dkovalev) add command line argument
   const int bitrate = 200;  // kbit/s TODO(dkovalev) add command line argument
   const char *const codec_arg = argv[1];
@@ -211,7 +211,7 @@
 
   max_frames = strtol(argv[6], NULL, 0);
 
-  encoder = get_vpx_encoder_by_name(codec_arg);
+  encoder = get_aom_encoder_by_name(codec_arg);
   if (!encoder) die("Unsupported codec.");
 
   w = strtol(width_arg, NULL, 0);
@@ -220,13 +220,13 @@
   if (w <= 0 || h <= 0 || (w % 2) != 0 || (h % 2) != 0)
     die("Invalid frame size: %dx%d", w, h);
 
-  if (!vpx_img_alloc(&raw, VPX_IMG_FMT_I420, w, h, 1))
+  if (!aom_img_alloc(&raw, AOM_IMG_FMT_I420, w, h, 1))
     die("Failed to allocate image", w, h);
 
-  printf("Using %s\n", vpx_codec_iface_name(encoder->codec_interface()));
+  printf("Using %s\n", aom_codec_iface_name(encoder->codec_interface()));
 
   // Configuration
-  res = vpx_codec_enc_config_default(encoder->codec_interface(), &cfg, 0);
+  res = aom_codec_enc_config_default(encoder->codec_interface(), &cfg, 0);
   if (res) die_codec(&codec, "Failed to get default codec config.");
 
   cfg.g_w = w;
@@ -239,17 +239,17 @@
     die("Failed to open %s for reading", infile_arg);
 
   // Pass 0
-  cfg.g_pass = VPX_RC_FIRST_PASS;
+  cfg.g_pass = AOM_RC_FIRST_PASS;
   stats = pass0(&raw, infile, encoder, &cfg, max_frames);
 
   // Pass 1
   rewind(infile);
-  cfg.g_pass = VPX_RC_LAST_PASS;
+  cfg.g_pass = AOM_RC_LAST_PASS;
   cfg.rc_twopass_stats_in = stats;
   pass1(&raw, infile, outfile_arg, encoder, &cfg, max_frames);
   free(stats.buf);
 
-  vpx_img_free(&raw);
+  aom_img_free(&raw);
   fclose(infile);
 
   return EXIT_SUCCESS;