Backed out 7 changesets (bug 1698699) for causing bp-hybrid bustages on scale_yuv_argb. CLOSED TREE
authorIulian Moraru <imoraru@mozilla.com>
Tue, 28 Jun 2022 01:47:56 +0300
changeset 622228 8f835b689985e2c479bc422f08ec553f20259bd2
parent 622227 a98da94d5a8d31ddc7532758088686bfeb9c4928
child 622229 15a26c0f488ed2cf99665ef13eb186f68e6fc386
push id39910
push userbszekely@mozilla.com
push dateTue, 28 Jun 2022 09:16:40 +0000
treeherdermozilla-central@3a227a2156b9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1698699
milestone104.0a1
backs outb2606be8a0cf037e1a0f30a205470f7e12e827d8
97f5dde2d55e97200dd413fb7f802c0e2b519416
edf2a2cb780389e5c49ecc7a8b366ed655af2603
0cc8a5a2d484a6b51530436acb157aebb9b7e54a
95c49f3cfc0387644f49600e2d7d68412b3614ba
7016afe1f7f4578609faedb161cdc25e8a26e896
f0da7c35e08815c63ff90b9015f347b0bb756ad1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 7 changesets (bug 1698699) for causing bp-hybrid bustages on scale_yuv_argb. CLOSED TREE Backed out changeset b2606be8a0cf (bug 1698699) Backed out changeset 97f5dde2d55e (bug 1698699) Backed out changeset edf2a2cb7803 (bug 1698699) Backed out changeset 0cc8a5a2d484 (bug 1698699) Backed out changeset 95c49f3cfc03 (bug 1698699) Backed out changeset 7016afe1f7f4 (bug 1698699) Backed out changeset f0da7c35e088 (bug 1698699)
gfx/ycbcr/scale_yuv_argb.cpp
gfx/ycbcr/scale_yuv_argb.h
gfx/ycbcr/ycbcr_to_rgb565.cpp
gfx/ycbcr/ycbcr_to_rgb565.h
gfx/ycbcr/yuv_convert.cpp
gfx/ycbcr/yuv_convert.h
gfx/ycbcr/yuv_convert_arm.cpp
gfx/ycbcr/yuv_convert_mmx.cpp
gfx/ycbcr/yuv_convert_sse2.cpp
gfx/ycbcr/yuv_row.h
gfx/ycbcr/yuv_row_c.cpp
gfx/ycbcr/yuv_row_other.cpp
gfx/ycbcr/yuv_row_posix.cpp
gfx/ycbcr/yuv_row_table.cpp
gfx/ycbcr/yuv_row_win.cpp
gfx/ycbcr/yuv_row_win64.cpp
media/libyuv/add_H444ToARGB.patch
media/libyuv/allow_disabling_asm_avx2.patch
media/libyuv/bug_1491848.patch
media/libyuv/fix_build_errors.patch
media/libyuv/libyuv/.gn
media/libyuv/libyuv/.vpython
media/libyuv/libyuv/AUTHORS
media/libyuv/libyuv/Android.bp
media/libyuv/libyuv/Android.mk
media/libyuv/libyuv/BUILD.gn
media/libyuv/libyuv/CMakeLists.txt
media/libyuv/libyuv/DEPS
media/libyuv/libyuv/DIR_METADATA
media/libyuv/libyuv/LICENSE_THIRD_PARTY
media/libyuv/libyuv/OWNERS
media/libyuv/libyuv/PRESUBMIT.py
media/libyuv/libyuv/README.chromium
media/libyuv/libyuv/README.md
media/libyuv/libyuv/all.gyp
media/libyuv/libyuv/build_overrides/build.gni
media/libyuv/libyuv/cleanup_links.py
media/libyuv/libyuv/codereview.settings
media/libyuv/libyuv/docs/deprecated_builds.md
media/libyuv/libyuv/docs/environment_variables.md
media/libyuv/libyuv/docs/formats.md
media/libyuv/libyuv/docs/getting_started.md
media/libyuv/libyuv/docs/rotation.md
media/libyuv/libyuv/download_vs_toolchain.py
media/libyuv/libyuv/gyp_libyuv
media/libyuv/libyuv/gyp_libyuv.py
media/libyuv/libyuv/include/libyuv.h
media/libyuv/libyuv/include/libyuv/basic_types.h
media/libyuv/libyuv/include/libyuv/compare_row.h
media/libyuv/libyuv/include/libyuv/convert.h
media/libyuv/libyuv/include/libyuv/convert_argb.h
media/libyuv/libyuv/include/libyuv/convert_from.h
media/libyuv/libyuv/include/libyuv/convert_from_argb.h
media/libyuv/libyuv/include/libyuv/cpu_id.h
media/libyuv/libyuv/include/libyuv/loongson_intrinsics.h
media/libyuv/libyuv/include/libyuv/macros_msa.h
media/libyuv/libyuv/include/libyuv/mjpeg_decoder.h
media/libyuv/libyuv/include/libyuv/planar_functions.h
media/libyuv/libyuv/include/libyuv/rotate.h
media/libyuv/libyuv/include/libyuv/rotate_row.h
media/libyuv/libyuv/include/libyuv/row.h
media/libyuv/libyuv/include/libyuv/row.h.orig
media/libyuv/libyuv/include/libyuv/scale.h
media/libyuv/libyuv/include/libyuv/scale_rgb.h
media/libyuv/libyuv/include/libyuv/scale_row.h
media/libyuv/libyuv/include/libyuv/scale_uv.h
media/libyuv/libyuv/include/libyuv/version.h
media/libyuv/libyuv/include/libyuv/video_common.h
media/libyuv/libyuv/infra/config/OWNERS
media/libyuv/libyuv/infra/config/PRESUBMIT.py
media/libyuv/libyuv/infra/config/README.md
media/libyuv/libyuv/infra/config/codereview.settings
media/libyuv/libyuv/infra/config/commit-queue.cfg
media/libyuv/libyuv/infra/config/cq.cfg
media/libyuv/libyuv/infra/config/cr-buildbucket.cfg
media/libyuv/libyuv/infra/config/luci-logdog.cfg
media/libyuv/libyuv/infra/config/luci-milo.cfg
media/libyuv/libyuv/infra/config/luci-scheduler.cfg
media/libyuv/libyuv/infra/config/main.star
media/libyuv/libyuv/infra/config/project.cfg
media/libyuv/libyuv/infra/config/realms.cfg
media/libyuv/libyuv/libyuv.gni
media/libyuv/libyuv/libyuv.gyp
media/libyuv/libyuv/libyuv.gypi
media/libyuv/libyuv/libyuv_nacl.gyp
media/libyuv/libyuv/libyuv_test.gyp
media/libyuv/libyuv/linux.mk
media/libyuv/libyuv/public.mk
media/libyuv/libyuv/source/compare.cc
media/libyuv/libyuv/source/compare_common.cc
media/libyuv/libyuv/source/compare_gcc.cc
media/libyuv/libyuv/source/compare_mmi.cc
media/libyuv/libyuv/source/compare_msa.cc
media/libyuv/libyuv/source/compare_neon.cc
media/libyuv/libyuv/source/compare_neon64.cc
media/libyuv/libyuv/source/compare_win.cc
media/libyuv/libyuv/source/convert.cc
media/libyuv/libyuv/source/convert_argb.cc
media/libyuv/libyuv/source/convert_from.cc
media/libyuv/libyuv/source/convert_from_argb.cc
media/libyuv/libyuv/source/convert_jpeg.cc
media/libyuv/libyuv/source/convert_to_argb.cc
media/libyuv/libyuv/source/convert_to_i420.cc
media/libyuv/libyuv/source/cpu_id.cc
media/libyuv/libyuv/source/mjpeg_decoder.cc
media/libyuv/libyuv/source/mjpeg_decoder.cc.orig
media/libyuv/libyuv/source/mjpeg_validate.cc
media/libyuv/libyuv/source/planar_functions.cc
media/libyuv/libyuv/source/rotate.cc
media/libyuv/libyuv/source/rotate_any.cc
media/libyuv/libyuv/source/rotate_argb.cc
media/libyuv/libyuv/source/rotate_gcc.cc
media/libyuv/libyuv/source/rotate_lsx.cc
media/libyuv/libyuv/source/rotate_mmi.cc
media/libyuv/libyuv/source/rotate_neon.cc
media/libyuv/libyuv/source/rotate_neon64.cc
media/libyuv/libyuv/source/rotate_win.cc
media/libyuv/libyuv/source/row_any.cc
media/libyuv/libyuv/source/row_common.cc
media/libyuv/libyuv/source/row_gcc.cc
media/libyuv/libyuv/source/row_lasx.cc
media/libyuv/libyuv/source/row_lsx.cc
media/libyuv/libyuv/source/row_mmi.cc
media/libyuv/libyuv/source/row_msa.cc
media/libyuv/libyuv/source/row_neon.cc
media/libyuv/libyuv/source/row_neon64.cc
media/libyuv/libyuv/source/row_win.cc
media/libyuv/libyuv/source/scale.cc
media/libyuv/libyuv/source/scale_any.cc
media/libyuv/libyuv/source/scale_argb.cc
media/libyuv/libyuv/source/scale_common.cc
media/libyuv/libyuv/source/scale_gcc.cc
media/libyuv/libyuv/source/scale_lsx.cc
media/libyuv/libyuv/source/scale_mmi.cc
media/libyuv/libyuv/source/scale_neon.cc
media/libyuv/libyuv/source/scale_neon64.cc
media/libyuv/libyuv/source/scale_rgb.cc
media/libyuv/libyuv/source/scale_uv.cc
media/libyuv/libyuv/source/scale_win.cc
media/libyuv/libyuv/source/test.sh
media/libyuv/libyuv/tools_libyuv/OWNERS
media/libyuv/libyuv/tools_libyuv/autoroller/roll_deps.py
media/libyuv/libyuv/tools_libyuv/autoroller/unittests/roll_deps_test.py
media/libyuv/libyuv/tools_libyuv/autoroller/unittests/testdata/DEPS
media/libyuv/libyuv/tools_libyuv/get_landmines.py
media/libyuv/libyuv/tools_libyuv/msan/OWNERS
media/libyuv/libyuv/tools_libyuv/ubsan/OWNERS
media/libyuv/libyuv/tools_libyuv/valgrind/chrome_tests.bat
media/libyuv/libyuv/tools_libyuv/valgrind/chrome_tests.py
media/libyuv/libyuv/tools_libyuv/valgrind/chrome_tests.sh
media/libyuv/libyuv/tools_libyuv/valgrind/common.py
media/libyuv/libyuv/tools_libyuv/valgrind/gdb_helper.py
media/libyuv/libyuv/tools_libyuv/valgrind/libyuv_tests.bat
media/libyuv/libyuv/tools_libyuv/valgrind/libyuv_tests.py
media/libyuv/libyuv/tools_libyuv/valgrind/libyuv_tests.sh
media/libyuv/libyuv/tools_libyuv/valgrind/locate_valgrind.sh
media/libyuv/libyuv/tools_libyuv/valgrind/memcheck/OWNERS
media/libyuv/libyuv/tools_libyuv/valgrind/memcheck/PRESUBMIT.py
media/libyuv/libyuv/tools_libyuv/valgrind/memcheck/suppressions.txt
media/libyuv/libyuv/tools_libyuv/valgrind/memcheck/suppressions_mac.txt
media/libyuv/libyuv/tools_libyuv/valgrind/memcheck/suppressions_win32.txt
media/libyuv/libyuv/tools_libyuv/valgrind/memcheck_analyze.py
media/libyuv/libyuv/tools_libyuv/valgrind/valgrind.sh
media/libyuv/libyuv/tools_libyuv/valgrind/valgrind_test.py
media/libyuv/libyuv/unit_test/color_test.cc
media/libyuv/libyuv/unit_test/compare_test.cc
media/libyuv/libyuv/unit_test/convert_test.cc
media/libyuv/libyuv/unit_test/cpu_test.cc
media/libyuv/libyuv/unit_test/cpu_thread_test.cc
media/libyuv/libyuv/unit_test/math_test.cc
media/libyuv/libyuv/unit_test/planar_test.cc
media/libyuv/libyuv/unit_test/rotate_argb_test.cc
media/libyuv/libyuv/unit_test/rotate_test.cc
media/libyuv/libyuv/unit_test/scale_argb_test.cc
media/libyuv/libyuv/unit_test/scale_rgb_test.cc
media/libyuv/libyuv/unit_test/scale_test.cc
media/libyuv/libyuv/unit_test/scale_uv_test.cc
media/libyuv/libyuv/unit_test/testdata/juno.txt
media/libyuv/libyuv/unit_test/testdata/mips.txt
media/libyuv/libyuv/unit_test/testdata/mips_loongson2k.txt
media/libyuv/libyuv/unit_test/testdata/mips_loongson3.txt
media/libyuv/libyuv/unit_test/testdata/mips_loongson_mmi.txt
media/libyuv/libyuv/unit_test/testdata/mips_msa.txt
media/libyuv/libyuv/unit_test/testdata/test0.jpg
media/libyuv/libyuv/unit_test/testdata/test1.jpg
media/libyuv/libyuv/unit_test/testdata/test2.jpg
media/libyuv/libyuv/unit_test/testdata/test3.jpg
media/libyuv/libyuv/unit_test/testdata/test4.jpg
media/libyuv/libyuv/unit_test/unit_test.cc
media/libyuv/libyuv/unit_test/unit_test.h
media/libyuv/libyuv/unit_test/video_common_test.cc
media/libyuv/libyuv/util/color.cc
media/libyuv/libyuv/util/cpuid.c
media/libyuv/libyuv/util/i444tonv12_eg.cc
media/libyuv/libyuv/util/psnr.cc
media/libyuv/libyuv/util/psnr_main.cc
media/libyuv/libyuv/util/yuvconstants.c
media/libyuv/libyuv/util/yuvconvert.cc
media/libyuv/libyuv/winarm.mk
media/libyuv/moz.build
media/libyuv/moz.yaml
media/libyuv/update.py
--- a/gfx/ycbcr/scale_yuv_argb.cpp
+++ b/gfx/ycbcr/scale_yuv_argb.cpp
@@ -61,31 +61,31 @@ extern "C" {
 typedef mozilla::gfx::YUVColorSpace YUVColorSpace;
 
 struct YUVBuferIter {
   int src_width;
   int src_height;
   int src_stride_y;
   int src_stride_u;
   int src_stride_v;
-  const uint8_t* src_y;
-  const uint8_t* src_u;
-  const uint8_t* src_v;
+  const uint8* src_y;
+  const uint8* src_u;
+  const uint8* src_v;
 
-  uint32_t src_fourcc;
+  uint32 src_fourcc;
   const struct YuvConstants* yuvconstants;
   int y_index;
-  const uint8_t* src_row_y;
-  const uint8_t* src_row_u;
-  const uint8_t* src_row_v;
+  const uint8* src_row_y;
+  const uint8* src_row_u;
+  const uint8* src_row_v;
 
-  void (*YUVToARGBRow)(const uint8_t* y_buf,
-                       const uint8_t* u_buf,
-                       const uint8_t* v_buf,
-                       uint8_t* rgb_buf,
+  void (*YUVToARGBRow)(const uint8* y_buf,
+                       const uint8* u_buf,
+                       const uint8* v_buf,
+                       uint8* rgb_buf,
                        const struct YuvConstants* yuvconstants,
                        int width);
   void (*MoveTo)(YUVBuferIter& iter, int y_index);
   void (*MoveToNextRow)(YUVBuferIter& iter);
 };
 
 void YUVBuferIter_InitI422(YUVBuferIter& iter) {
   iter.YUVToARGBRow = I422ToARGBRow_C;
@@ -195,21 +195,21 @@ static void YUVBuferIter_MoveToNextRowFo
   iter.src_row_y += iter.src_stride_y;
   if (iter.y_index & 1) {
     iter.src_row_u += iter.src_stride_u;
     iter.src_row_v += iter.src_stride_v;
   }
   iter.y_index++;
 }
 
-static __inline void YUVBuferIter_ConvertToARGBRow(YUVBuferIter& iter, uint8_t* argb_row) {
+static __inline void YUVBuferIter_ConvertToARGBRow(YUVBuferIter& iter, uint8* argb_row) {
   iter.YUVToARGBRow(iter.src_row_y, iter.src_row_u, iter.src_row_v, argb_row, iter.yuvconstants, iter.src_width);
 }
 
-void YUVBuferIter_Init(YUVBuferIter& iter, uint32_t src_fourcc, YUVColorSpace yuv_color_space) {
+void YUVBuferIter_Init(YUVBuferIter& iter, uint32 src_fourcc, YUVColorSpace yuv_color_space) {
   iter.src_fourcc = src_fourcc;
   iter.y_index = 0;
   iter.src_row_y = iter.src_y;
   iter.src_row_u = iter.src_u;
   iter.src_row_v = iter.src_v;
   switch (yuv_color_space) {
     case YUVColorSpace::BT2020:
       iter.yuvconstants = &kYuv2020Constants;
@@ -241,45 +241,45 @@ void YUVBuferIter_Init(YUVBuferIter& ite
 // This is an optimized version for scaling down a ARGB to 1/2 of
 // its original size.
 static void ScaleYUVToARGBDown2(int src_width, int src_height,
                                 int dst_width, int dst_height,
                                 int src_stride_y,
                                 int src_stride_u,
                                 int src_stride_v,
                                 int dst_stride_argb,
-                                const uint8_t* src_y,
-                                const uint8_t* src_u,
-                                const uint8_t* src_v,
-                                uint8_t* dst_argb,
+                                const uint8* src_y,
+                                const uint8* src_u,
+                                const uint8* src_v,
+                                uint8* dst_argb,
                                 int x, int dx, int y, int dy,
                                 enum FilterMode filtering,
-                                uint32_t src_fourcc,
+                                uint32 src_fourcc,
                                 YUVColorSpace yuv_color_space) {
   int j;
 
   // Allocate 2 rows of ARGB for source conversion.
   const int kRowSize = (src_width * 4 + 15) & ~15;
   align_buffer_64(argb_cnv_row, kRowSize * 2);
-  uint8_t* argb_cnv_rowptr = argb_cnv_row;
+  uint8* argb_cnv_rowptr = argb_cnv_row;
   int argb_cnv_rowstride = kRowSize;
 
   YUVBuferIter iter;
   iter.src_width = src_width;
   iter.src_height = src_height;
   iter.src_stride_y = src_stride_y;
   iter.src_stride_u = src_stride_u;
   iter.src_stride_v = src_stride_v;
   iter.src_y = src_y;
   iter.src_u = src_u;
   iter.src_v = src_v;
   YUVBuferIter_Init(iter, src_fourcc, yuv_color_space);
 
-  void (*ScaleARGBRowDown2)(const uint8_t* src_argb, ptrdiff_t src_stride,
-                            uint8_t* dst_argb, int dst_width) =
+  void (*ScaleARGBRowDown2)(const uint8* src_argb, ptrdiff_t src_stride,
+                            uint8* dst_argb, int dst_width) =
     filtering == kFilterNone ? ScaleARGBRowDown2_C :
         (filtering == kFilterLinear ? ScaleARGBRowDown2Linear_C :
         ScaleARGBRowDown2Box_C);
   assert(dx == 65536 * 2);  // Test scale factor of 2.
   assert((dy & 0x1ffff) == 0);  // Test vertical scale is multiple of 2.
   // Advance to odd row, even column.
   int yi = y >> 16;
   iter.MoveTo(iter, yi);
@@ -378,34 +378,34 @@ static void ScaleYUVToARGBDown2(int src_
 // This is an optimized version for scaling down a ARGB to even
 // multiple of its original size.
 static void ScaleYUVToARGBDownEven(int src_width, int src_height,
                                    int dst_width, int dst_height,
                                    int src_stride_y,
                                    int src_stride_u,
                                    int src_stride_v,
                                    int dst_stride_argb,
-                                   const uint8_t* src_y,
-                                   const uint8_t* src_u,
-                                   const uint8_t* src_v,
-                                   uint8_t* dst_argb,
+                                   const uint8* src_y,
+                                   const uint8* src_u,
+                                   const uint8* src_v,
+                                   uint8* dst_argb,
                                    int x, int dx, int y, int dy,
                                    enum FilterMode filtering,
-                                   uint32_t src_fourcc,
+                                   uint32 src_fourcc,
                                    YUVColorSpace yuv_color_space) {
   int j;
   // Allocate 2 rows of ARGB for source conversion.
   const int kRowSize = (src_width * 4 + 15) & ~15;
   align_buffer_64(argb_cnv_row, kRowSize * 2);
-  uint8_t* argb_cnv_rowptr = argb_cnv_row;
+  uint8* argb_cnv_rowptr = argb_cnv_row;
   int argb_cnv_rowstride = kRowSize;
 
   int col_step = dx >> 16;
-  void (*ScaleARGBRowDownEven)(const uint8_t* src_argb, ptrdiff_t src_stride,
-                               int src_step, uint8_t* dst_argb, int dst_width) =
+  void (*ScaleARGBRowDownEven)(const uint8* src_argb, ptrdiff_t src_stride,
+                               int src_step, uint8* dst_argb, int dst_width) =
       filtering ? ScaleARGBRowDownEvenBox_C : ScaleARGBRowDownEven_C;
   assert(IS_ALIGNED(src_width, 2));
   assert(IS_ALIGNED(src_height, 2));
   int yi = y >> 16;
   const ptrdiff_t x_offset = (x >> 16) * 4;
 
 #if defined(HAS_SCALEARGBROWDOWNEVEN_SSE2)
   if (TestCpuFlag(kCpuHasSSE2)) {
@@ -499,49 +499,49 @@ static void ScaleYUVToARGBDownEven(int s
 
 // Scale YUV to ARGB down with bilinear interpolation.
 static void ScaleYUVToARGBBilinearDown(int src_width, int src_height,
                                        int dst_width, int dst_height,
                                        int src_stride_y,
                                        int src_stride_u,
                                        int src_stride_v,
                                        int dst_stride_argb,
-                                       const uint8_t* src_y,
-                                       const uint8_t* src_u,
-                                       const uint8_t* src_v,
-                                       uint8_t* dst_argb,
+                                       const uint8* src_y,
+                                       const uint8* src_u,
+                                       const uint8* src_v,
+                                       uint8* dst_argb,
                                        int x, int dx, int y, int dy,
                                        enum FilterMode filtering,
-                                       uint32_t src_fourcc,
+                                       uint32 src_fourcc,
                                        YUVColorSpace yuv_color_space) {
   int j;
-  void (*InterpolateRow)(uint8_t* dst_argb, const uint8_t* src_argb,
+  void (*InterpolateRow)(uint8* dst_argb, const uint8* src_argb,
       ptrdiff_t src_stride, int dst_width, int source_y_fraction) =
       InterpolateRow_C;
-  void (*ScaleARGBFilterCols)(uint8_t* dst_argb, const uint8_t* src_argb,
+  void (*ScaleARGBFilterCols)(uint8* dst_argb, const uint8* src_argb,
       int dst_width, int x, int dx) =
       (src_width >= 32768) ? ScaleARGBFilterCols64_C : ScaleARGBFilterCols_C;
-  int64_t xlast = x + (int64_t)(dst_width - 1) * dx;
-  int64_t xl = (dx >= 0) ? x : xlast;
-  int64_t xr = (dx >= 0) ? xlast : x;
+  int64 xlast = x + (int64)(dst_width - 1) * dx;
+  int64 xl = (dx >= 0) ? x : xlast;
+  int64 xr = (dx >= 0) ? xlast : x;
   int clip_src_width;
   xl = (xl >> 16) & ~3;  // Left edge aligned.
   xr = (xr >> 16) + 1;  // Right most pixel used.  Bilinear uses 2 pixels.
   xr = (xr + 1 + 3) & ~3;  // 1 beyond 4 pixel aligned right most pixel.
   if (xr > src_width) {
     xr = src_width;
   }
   clip_src_width = (int)(xr - xl) * 4;  // Width aligned to 4.
   const ptrdiff_t xl_offset = xl * 4;
   x -= (int)(xl << 16);
 
   // Allocate 2 row of ARGB for source conversion.
   const int kRowSize = (src_width * 4 + 15) & ~15;
   align_buffer_64(argb_cnv_row, kRowSize * 2);
-  uint8_t* argb_cnv_rowptr = argb_cnv_row;
+  uint8* argb_cnv_rowptr = argb_cnv_row;
   int argb_cnv_rowstride = kRowSize;
 
 #if defined(HAS_INTERPOLATEROW_SSSE3)
   if (TestCpuFlag(kCpuHasSSSE3)) {
     InterpolateRow = InterpolateRow_Any_SSSE3;
     if (IS_ALIGNED(clip_src_width, 16)) {
       InterpolateRow = InterpolateRow_SSSE3;
     }
@@ -668,29 +668,29 @@ static void ScaleYUVToARGBBilinearDown(i
 
 // Scale YUV to ARGB up with bilinear interpolation.
 static void ScaleYUVToARGBBilinearUp(int src_width, int src_height,
                                      int dst_width, int dst_height,
                                      int src_stride_y,
                                      int src_stride_u,
                                      int src_stride_v,
                                      int dst_stride_argb,
-                                     const uint8_t* src_y,
-                                     const uint8_t* src_u,
-                                     const uint8_t* src_v,
-                                     uint8_t* dst_argb,
+                                     const uint8* src_y,
+                                     const uint8* src_u,
+                                     const uint8* src_v,
+                                     uint8* dst_argb,
                                      int x, int dx, int y, int dy,
                                      enum FilterMode filtering,
-                                     uint32_t src_fourcc,
+                                     uint32 src_fourcc,
                                      YUVColorSpace yuv_color_space) {
   int j;
-  void (*InterpolateRow)(uint8_t* dst_argb, const uint8_t* src_argb,
+  void (*InterpolateRow)(uint8* dst_argb, const uint8* src_argb,
       ptrdiff_t src_stride, int dst_width, int source_y_fraction) =
       InterpolateRow_C;
-  void (*ScaleARGBFilterCols)(uint8_t* dst_argb, const uint8_t* src_argb,
+  void (*ScaleARGBFilterCols)(uint8* dst_argb, const uint8* src_argb,
       int dst_width, int x, int dx) =
       filtering ? ScaleARGBFilterCols_C : ScaleARGBCols_C;
   const int max_y = (src_height - 1) << 16;
 
   // Allocate 1 row of ARGB for source conversion.
   align_buffer_64(argb_cnv_row, src_width * 4);
 
 #if defined(HAS_INTERPOLATEROW_SSSE3)
@@ -779,17 +779,17 @@ static void ScaleYUVToARGBBilinearUp(int
   iter.src_v = src_v;
   YUVBuferIter_Init(iter, src_fourcc, yuv_color_space);
   iter.MoveTo(iter, yi);
 
   // Allocate 2 rows of ARGB.
   const int kRowSize = (dst_width * 4 + 15) & ~15;
   align_buffer_64(row, kRowSize * 2);
 
-  uint8_t* rowptr = row;
+  uint8* rowptr = row;
   int rowstride = kRowSize;
   int lastyi = yi;
 
   YUVBuferIter_ConvertToARGBRow(iter, argb_cnv_row);
   ScaleARGBFilterCols(rowptr, argb_cnv_row, dst_width, x, dx);
 
   if (filtering == kFilterLinear) {
     rowstride = 0;
@@ -853,25 +853,25 @@ static void ScaleYUVToARGBBilinearUp(int
 // the lower 16 bits are the fixed decimal part.
 
 static void ScaleYUVToARGBSimple(int src_width, int src_height,
                                  int dst_width, int dst_height,
                                  int src_stride_y,
                                  int src_stride_u,
                                  int src_stride_v,
                                  int dst_stride_argb,
-                                 const uint8_t* src_y,
-                                 const uint8_t* src_u,
-                                 const uint8_t* src_v,
-                                 uint8_t* dst_argb,
+                                 const uint8* src_y,
+                                 const uint8* src_u,
+                                 const uint8* src_v,
+                                 uint8* dst_argb,
                                  int x, int dx, int y, int dy,
-                                 uint32_t src_fourcc,
+                                 uint32 src_fourcc,
                                  YUVColorSpace yuv_color_space) {
   int j;
-  void (*ScaleARGBCols)(uint8_t* dst_argb, const uint8_t* src_argb,
+  void (*ScaleARGBCols)(uint8* dst_argb, const uint8* src_argb,
       int dst_width, int x, int dx) =
       (src_width >= 32768) ? ScaleARGBCols64_C : ScaleARGBCols_C;
 
   // Allocate 1 row of ARGB for source conversion.
   align_buffer_64(argb_cnv_row, src_width * 4);
 
 #if defined(HAS_SCALEARGBCOLS_SSE2)
   if (TestCpuFlag(kCpuHasSSE2) && src_width < 32768) {
@@ -921,23 +921,23 @@ static void ScaleYUVToARGBSimple(int src
     }
     ScaleARGBCols(dst_argb, argb_cnv_row, dst_width, x, dx);
     dst_argb += dst_stride_argb;
     y += dy;
   }
   free_aligned_buffer_64(argb_cnv_row);
 }
 
-static void YUVToARGBCopy(const uint8_t* src_y, int src_stride_y,
-                          const uint8_t* src_u, int src_stride_u,
-                          const uint8_t* src_v, int src_stride_v,
+static void YUVToARGBCopy(const uint8* src_y, int src_stride_y,
+                          const uint8* src_u, int src_stride_u,
+                          const uint8* src_v, int src_stride_v,
                           int src_width, int src_height,
-                          uint8_t* dst_argb, int dst_stride_argb,
+                          uint8* dst_argb, int dst_stride_argb,
                           int dst_width, int dst_height,
-                          uint32_t src_fourcc,
+                          uint32 src_fourcc,
                           YUVColorSpace yuv_color_space)
 {
   YUVBuferIter iter;
   iter.src_width = src_width;
   iter.src_height = src_height;
   iter.src_stride_y = src_stride_y;
   iter.src_stride_u = src_stride_u;
   iter.src_stride_v = src_stride_v;
@@ -948,24 +948,24 @@ static void YUVToARGBCopy(const uint8_t*
 
   for (int j = 0; j < dst_height; ++j) {
     YUVBuferIter_ConvertToARGBRow(iter, dst_argb);
     iter.MoveToNextRow(iter);
     dst_argb += dst_stride_argb;
   }
 }
 
-static void ScaleYUVToARGB(const uint8_t* src_y, int src_stride_y,
-                           const uint8_t* src_u, int src_stride_u,
-                           const uint8_t* src_v, int src_stride_v,
+static void ScaleYUVToARGB(const uint8* src_y, int src_stride_y,
+                           const uint8* src_u, int src_stride_u,
+                           const uint8* src_v, int src_stride_v,
                            int src_width, int src_height,
-                           uint8_t* dst_argb, int dst_stride_argb,
+                           uint8* dst_argb, int dst_stride_argb,
                            int dst_width, int dst_height,
                            enum FilterMode filtering,
-                           uint32_t src_fourcc,
+                           uint32 src_fourcc,
                            YUVColorSpace yuv_color_space)
 {
   // Initial source x/y coordinate and step values as 16.16 fixed point.
   int x = 0;
   int y = 0;
   int dx = 0;
   int dy = 0;
   // ARGB does not support box filter yet, but allow the user to pass it.
@@ -1079,34 +1079,34 @@ static void ScaleYUVToARGB(const uint8_t
                        src_u,
                        src_v,
                        dst_argb,
                        x, dx, y, dy,
                        src_fourcc,
                        yuv_color_space);
 }
 
-bool IsConvertSupported(uint32_t src_fourcc)
+bool IsConvertSupported(uint32 src_fourcc)
 {
   if (src_fourcc == FOURCC_I444 ||
       src_fourcc == FOURCC_I422 ||
       src_fourcc == FOURCC_I420) {
     return true;
   }
   return false;
 }
 
 LIBYUV_API
-int YUVToARGBScale(const uint8_t* src_y, int src_stride_y,
-                   const uint8_t* src_u, int src_stride_u,
-                   const uint8_t* src_v, int src_stride_v,
-                   uint32_t src_fourcc,
+int YUVToARGBScale(const uint8* src_y, int src_stride_y,
+                   const uint8* src_u, int src_stride_u,
+                   const uint8* src_v, int src_stride_v,
+                   uint32 src_fourcc,
                    YUVColorSpace yuv_color_space,
                    int src_width, int src_height,
-                   uint8_t* dst_argb, int dst_stride_argb,
+                   uint8* dst_argb, int dst_stride_argb,
                    int dst_width, int dst_height,
                    enum FilterMode filtering)
 {
   if (!src_y || !src_u || !src_v ||
       src_width == 0 || src_height == 0 ||
       !dst_argb || dst_width <= 0 || dst_height <= 0) {
     return -1;
   }
--- a/gfx/ycbcr/scale_yuv_argb.h
+++ b/gfx/ycbcr/scale_yuv_argb.h
@@ -16,23 +16,23 @@
 
 #include "mozilla/gfx/Types.h" // For YUVColorSpace
 
 #ifdef __cplusplus
 namespace libyuv {
 extern "C" {
 #endif
 
-int YUVToARGBScale(const uint8_t* src_y, int src_stride_y,
-                   const uint8_t* src_u, int src_stride_u,
-                   const uint8_t* src_v, int src_stride_v,
-                   uint32_t src_fourcc,
+int YUVToARGBScale(const uint8* src_y, int src_stride_y,
+                   const uint8* src_u, int src_stride_u,
+                   const uint8* src_v, int src_stride_v,
+                   uint32 src_fourcc,
                    mozilla::gfx::YUVColorSpace yuv_color_space,
                    int src_width, int src_height,
-                   uint8_t* dst_argb, int dst_stride_argb,
+                   uint8* dst_argb, int dst_stride_argb,
                    int dst_width, int dst_height,
                    enum FilterMode filtering);
 
 #ifdef __cplusplus
 }  // extern "C"
 }  // namespace libyuv
 #endif
 
--- a/gfx/ycbcr/ycbcr_to_rgb565.cpp
+++ b/gfx/ycbcr/ycbcr_to_rgb565.cpp
@@ -66,20 +66,20 @@ typedef void (*yuv2rgb565_row_scale_near
 
 
 //TODO: fix NEON asm for iOS
 # if defined(MOZILLA_MAY_SUPPORT_NEON) && !defined(__APPLE__)
 
 extern "C" void ScaleYCbCr42xToRGB565_BilinearY_Row_NEON(
  const yuv2rgb565_row_scale_bilinear_ctx *ctx, int dither);
 
-void __attribute((noinline)) yuv42x_to_rgb565_row_neon(uint16_t *dst,
-                                                       const uint8_t *y,
-                                                       const uint8_t *u,
-                                                       const uint8_t *v,
+void __attribute((noinline)) yuv42x_to_rgb565_row_neon(uint16 *dst,
+                                                       const uint8 *y,
+                                                       const uint8 *u,
+                                                       const uint8 *v,
                                                        int n,
                                                        int oddflag);
 
 #endif
 
 
 
 /*Bilinear interpolation of a single value.
@@ -576,38 +576,38 @@ bool IsScaleYCbCrToRGB565Fast(int source
     }
   }
 #  endif
   return false;
 }
 
 
 
-void yuv_to_rgb565_row_c(uint16_t *dst,
-                         const uint8_t *y,
-                         const uint8_t *u,
-                         const uint8_t *v,
+void yuv_to_rgb565_row_c(uint16 *dst,
+                         const uint8 *y,
+                         const uint8 *u,
+                         const uint8 *v,
                          int x_shift,
                          int pic_x,
                          int pic_width)
 {
   int x;
   for (x = 0; x < pic_width; x++)
   {
     dst[x] = yu2rgb565(y[pic_x+x],
                        u[(pic_x+x)>>x_shift],
                        v[(pic_x+x)>>x_shift],
                        2); // Disable dithering for now.
   }
 }
 
-void ConvertYCbCrToRGB565(const uint8_t* y_buf,
-                                   const uint8_t* u_buf,
-                                   const uint8_t* v_buf,
-                                   uint8_t* rgb_buf,
+void ConvertYCbCrToRGB565(const uint8* y_buf,
+                                   const uint8* u_buf,
+                                   const uint8* v_buf,
+                                   uint8* rgb_buf,
                                    int pic_x,
                                    int pic_y,
                                    int pic_width,
                                    int pic_height,
                                    int y_pitch,
                                    int uv_pitch,
                                    int rgb_pitch,
                                    YUVType yuv_type)
@@ -620,33 +620,33 @@ void ConvertYCbCrToRGB565(const uint8_t*
 #  if defined(MOZILLA_MAY_SUPPORT_NEON) && !defined(__APPLE__)
   if (yuv_type != YV24 && supports_neon())
   {
     for (int i = 0; i < pic_height; i++) {
       int yoffs;
       int uvoffs;
       yoffs = y_pitch * (pic_y+i) + pic_x;
       uvoffs = uv_pitch * ((pic_y+i)>>y_shift) + (pic_x>>x_shift);
-      yuv42x_to_rgb565_row_neon((uint16_t*)(rgb_buf + rgb_pitch * i),
+      yuv42x_to_rgb565_row_neon((uint16*)(rgb_buf + rgb_pitch * i),
                                 y_buf + yoffs,
                                 u_buf + uvoffs,
                                 v_buf + uvoffs,
                                 pic_width,
                                 pic_x&x_shift);
     }
   }
   else
 #  endif
   {
     for (int i = 0; i < pic_height; i++) {
       int yoffs;
       int uvoffs;
       yoffs = y_pitch * (pic_y+i);
       uvoffs = uv_pitch * ((pic_y+i)>>y_shift);
-      yuv_to_rgb565_row_c((uint16_t*)(rgb_buf + rgb_pitch * i),
+      yuv_to_rgb565_row_c((uint16*)(rgb_buf + rgb_pitch * i),
                           y_buf + yoffs,
                           u_buf + uvoffs,
                           v_buf + uvoffs,
                           x_shift,
                           pic_x,
                           pic_width);
     }
   }
--- a/gfx/ycbcr/ycbcr_to_rgb565.h
+++ b/gfx/ycbcr/ycbcr_to_rgb565.h
@@ -12,20 +12,20 @@
 #endif
 
 namespace mozilla {
 
 namespace gfx {
 
 #ifdef HAVE_YCBCR_TO_RGB565
 // Convert a frame of YUV to 16 bit RGB565.
-void ConvertYCbCrToRGB565(const uint8_t* yplane,
-                                   const uint8_t* uplane,
-                                   const uint8_t* vplane,
-                                   uint8_t* rgbframe,
+void ConvertYCbCrToRGB565(const uint8* yplane,
+                                   const uint8* uplane,
+                                   const uint8* vplane,
+                                   uint8* rgbframe,
                                    int pic_x,
                                    int pic_y,
                                    int pic_width,
                                    int pic_height,
                                    int ystride,
                                    int uvstride,
                                    int rgbstride,
                                    YUVType yuv_type);
--- a/gfx/ycbcr/yuv_convert.cpp
+++ b/gfx/ycbcr/yuv_convert.cpp
@@ -62,18 +62,18 @@ int GBRPlanarToARGB(const uint8_t* src_y
       rgb_buf[rgb_pitch * row + col * 4 + 2] = src_v[v_pitch * row + col];
       rgb_buf[rgb_pitch * row + col * 4 + 3] = 255;
     }
   }
   return 0;
 }
 
 // Convert a frame of YUV to 32 bit ARGB.
-void ConvertYCbCrToRGB32(const uint8_t* y_buf, const uint8_t* u_buf,
-                         const uint8_t* v_buf, uint8_t* rgb_buf, int pic_x,
+void ConvertYCbCrToRGB32(const uint8* y_buf, const uint8* u_buf,
+                         const uint8* v_buf, uint8* rgb_buf, int pic_x,
                          int pic_y, int pic_width, int pic_height, int y_pitch,
                          int uv_pitch, int rgb_pitch, YUVType yuv_type,
                          YUVColorSpace yuv_color_space,
                          ColorRange color_range) {
   // Deprecated function's conversion is accurate.
   // libyuv converion is a bit inaccurate to get performance. It dynamically
   // calculates RGB from YUV to use simd. In it, signed byte is used for
   // conversion's coefficient, but it requests 129. libyuv cut 129 to 127. And
@@ -93,19 +93,19 @@ void ConvertYCbCrToRGB32(const uint8_t* 
   if (use_deprecated) {
     ConvertYCbCrToRGB32_deprecated(y_buf, u_buf, v_buf, rgb_buf, pic_x, pic_y,
                                    pic_width, pic_height, y_pitch, uv_pitch,
                                    rgb_pitch, yuv_type);
     return;
   }
 
   decltype(libyuv::I420ToARGBMatrix)* fConvertYUVToARGB = nullptr;
-  const uint8_t* src_y = nullptr;
-  const uint8_t* src_u = nullptr;
-  const uint8_t* src_v = nullptr;
+  const uint8* src_y = nullptr;
+  const uint8* src_u = nullptr;
+  const uint8* src_v = nullptr;
   const libyuv::YuvConstants* yuv_constant = nullptr;
 
   switch (yuv_color_space) {
     case YUVColorSpace::BT2020:
       yuv_constant = color_range == ColorRange::LIMITED
         ? &libyuv::kYuv2020Constants
         : &libyuv::kYuvV2020Constants;
       break;
@@ -188,20 +188,20 @@ void ConvertYCbCrToRGB32(const uint8_t* 
 
   DebugOnly<int> err =
     fConvertYUVToARGB(src_y, y_pitch, src_u, uv_pitch, src_v, uv_pitch,
                       rgb_buf, rgb_pitch, yuv_constant, pic_width, pic_height);
   MOZ_ASSERT(!err);
 }
 
 // Convert a frame of YUV to 32 bit ARGB.
-void ConvertYCbCrToRGB32_deprecated(const uint8_t* y_buf,
-                                    const uint8_t* u_buf,
-                                    const uint8_t* v_buf,
-                                    uint8_t* rgb_buf,
+void ConvertYCbCrToRGB32_deprecated(const uint8* y_buf,
+                                    const uint8* u_buf,
+                                    const uint8* v_buf,
+                                    uint8* rgb_buf,
                                     int pic_x,
                                     int pic_y,
                                     int pic_width,
                                     int pic_height,
                                     int y_pitch,
                                     int uv_pitch,
                                     int rgb_pitch,
                                     YUVType yuv_type) {
@@ -211,20 +211,20 @@ void ConvertYCbCrToRGB32_deprecated(cons
   bool has_sse = supports_mmx() && supports_sse();
   // There is no optimized YV24 SSE routine so we check for this and
   // fall back to the C code.
   has_sse &= yuv_type != YV24;
   bool odd_pic_x = yuv_type != YV24 && pic_x % 2 != 0;
   int x_width = odd_pic_x ? pic_width - 1 : pic_width;
 
   for (int y = pic_y; y < pic_height + pic_y; ++y) {
-    uint8_t* rgb_row = rgb_buf + (y - pic_y) * rgb_pitch;
-    const uint8_t* y_ptr = y_buf + y * y_pitch + pic_x;
-    const uint8_t* u_ptr = u_buf + (y >> y_shift) * uv_pitch + (pic_x >> x_shift);
-    const uint8_t* v_ptr = v_buf + (y >> y_shift) * uv_pitch + (pic_x >> x_shift);
+    uint8* rgb_row = rgb_buf + (y - pic_y) * rgb_pitch;
+    const uint8* y_ptr = y_buf + y * y_pitch + pic_x;
+    const uint8* u_ptr = u_buf + (y >> y_shift) * uv_pitch + (pic_x >> x_shift);
+    const uint8* v_ptr = v_buf + (y >> y_shift) * uv_pitch + (pic_x >> x_shift);
 
     if (odd_pic_x) {
       // Handle the single odd pixel manually and use the
       // fast routines for the remaining.
       FastConvertYUVToRGB32Row_C(y_ptr++,
                                  u_ptr++,
                                  v_ptr++,
                                  rgb_row,
@@ -251,48 +251,48 @@ void ConvertYCbCrToRGB32_deprecated(cons
   }
 
   // MMX used for FastConvertYUVToRGB32Row requires emms instruction.
   if (has_sse)
     EMMS();
 }
 
 // C version does 8 at a time to mimic MMX code
-static void FilterRows_C(uint8_t* ybuf, const uint8_t* y0_ptr, const uint8_t* y1_ptr,
+static void FilterRows_C(uint8* ybuf, const uint8* y0_ptr, const uint8* y1_ptr,
                          int source_width, int source_y_fraction) {
   int y1_fraction = source_y_fraction;
   int y0_fraction = 256 - y1_fraction;
-  uint8_t* end = ybuf + source_width;
+  uint8* end = ybuf + source_width;
   do {
     ybuf[0] = (y0_ptr[0] * y0_fraction + y1_ptr[0] * y1_fraction) >> 8;
     ybuf[1] = (y0_ptr[1] * y0_fraction + y1_ptr[1] * y1_fraction) >> 8;
     ybuf[2] = (y0_ptr[2] * y0_fraction + y1_ptr[2] * y1_fraction) >> 8;
     ybuf[3] = (y0_ptr[3] * y0_fraction + y1_ptr[3] * y1_fraction) >> 8;
     ybuf[4] = (y0_ptr[4] * y0_fraction + y1_ptr[4] * y1_fraction) >> 8;
     ybuf[5] = (y0_ptr[5] * y0_fraction + y1_ptr[5] * y1_fraction) >> 8;
     ybuf[6] = (y0_ptr[6] * y0_fraction + y1_ptr[6] * y1_fraction) >> 8;
     ybuf[7] = (y0_ptr[7] * y0_fraction + y1_ptr[7] * y1_fraction) >> 8;
     y0_ptr += 8;
     y1_ptr += 8;
     ybuf += 8;
   } while (ybuf < end);
 }
 
 #ifdef MOZILLA_MAY_SUPPORT_MMX
-void FilterRows_MMX(uint8_t* ybuf, const uint8_t* y0_ptr, const uint8_t* y1_ptr,
+void FilterRows_MMX(uint8* ybuf, const uint8* y0_ptr, const uint8* y1_ptr,
                     int source_width, int source_y_fraction);
 #endif
 
 #ifdef MOZILLA_MAY_SUPPORT_SSE2
-void FilterRows_SSE2(uint8_t* ybuf, const uint8_t* y0_ptr, const uint8_t* y1_ptr,
+void FilterRows_SSE2(uint8* ybuf, const uint8* y0_ptr, const uint8* y1_ptr,
                      int source_width, int source_y_fraction);
 #endif
 
-static inline void FilterRows(uint8_t* ybuf, const uint8_t* y0_ptr,
-                              const uint8_t* y1_ptr, int source_width,
+static inline void FilterRows(uint8* ybuf, const uint8* y0_ptr,
+                              const uint8* y1_ptr, int source_width,
                               int source_y_fraction) {
 #ifdef MOZILLA_MAY_SUPPORT_SSE2
   if (mozilla::supports_sse2()) {
     FilterRows_SSE2(ybuf, y0_ptr, y1_ptr, source_width, source_y_fraction);
     return;
   }
 #endif
 
@@ -303,20 +303,20 @@ static inline void FilterRows(uint8_t* y
   }
 #endif
 
   FilterRows_C(ybuf, y0_ptr, y1_ptr, source_width, source_y_fraction);
 }
 
 
 // Scale a frame of YUV to 32 bit ARGB.
-void ScaleYCbCrToRGB32(const uint8_t* y_buf,
-                       const uint8_t* u_buf,
-                       const uint8_t* v_buf,
-                       uint8_t* rgb_buf,
+void ScaleYCbCrToRGB32(const uint8* y_buf,
+                       const uint8* u_buf,
+                       const uint8* v_buf,
+                       uint8* rgb_buf,
                        int source_width,
                        int source_height,
                        int width,
                        int height,
                        int y_pitch,
                        int uv_pitch,
                        int rgb_pitch,
                        YUVType yuv_type,
@@ -357,20 +357,20 @@ void ScaleYCbCrToRGB32(const uint8_t* y_
                            rgb_buf, rgb_pitch,
                            width, height,
                            libyuv::kFilterBilinear);
   MOZ_ASSERT(!err);
   return;
 }
 
 // Scale a frame of YUV to 32 bit ARGB.
-void ScaleYCbCrToRGB32_deprecated(const uint8_t* y_buf,
-                                  const uint8_t* u_buf,
-                                  const uint8_t* v_buf,
-                                  uint8_t* rgb_buf,
+void ScaleYCbCrToRGB32_deprecated(const uint8* y_buf,
+                                  const uint8* u_buf,
+                                  const uint8* v_buf,
+                                  uint8* rgb_buf,
                                   int source_width,
                                   int source_height,
                                   int width,
                                   int height,
                                   int y_pitch,
                                   int uv_pitch,
                                   int rgb_pitch,
                                   YUVType yuv_type,
@@ -444,49 +444,49 @@ void ScaleYCbCrToRGB32_deprecated(const 
     } else {
       y_pitch = 1;
       uv_pitch = 1;
     }
   }
 
   // Need padding because FilterRows() will write 1 to 16 extra pixels
   // after the end for SSE2 version.
-  uint8_t yuvbuf[16 + kFilterBufferSize * 3 + 16];
-  uint8_t* ybuf =
-      reinterpret_cast<uint8_t*>(reinterpret_cast<uintptr_t>(yuvbuf + 15) & ~15);
-  uint8_t* ubuf = ybuf + kFilterBufferSize;
-  uint8_t* vbuf = ubuf + kFilterBufferSize;
+  uint8 yuvbuf[16 + kFilterBufferSize * 3 + 16];
+  uint8* ybuf =
+      reinterpret_cast<uint8*>(reinterpret_cast<uintptr_t>(yuvbuf + 15) & ~15);
+  uint8* ubuf = ybuf + kFilterBufferSize;
+  uint8* vbuf = ubuf + kFilterBufferSize;
   // TODO(fbarchard): Fixed point math is off by 1 on negatives.
   int yscale_fixed = (source_height << kFractionBits) / height;
 
   // TODO(fbarchard): Split this into separate function for better efficiency.
   for (int y = 0; y < height; ++y) {
-    uint8_t* dest_pixel = rgb_buf + y * rgb_pitch;
+    uint8* dest_pixel = rgb_buf + y * rgb_pitch;
     int source_y_subpixel = (y * yscale_fixed);
     if (yscale_fixed >= (kFractionMax * 2)) {
       source_y_subpixel += kFractionMax / 2;  // For 1/2 or less, center filter.
     }
     int source_y = source_y_subpixel >> kFractionBits;
 
-    const uint8_t* y0_ptr = y_buf + source_y * y_pitch;
-    const uint8_t* y1_ptr = y0_ptr + y_pitch;
+    const uint8* y0_ptr = y_buf + source_y * y_pitch;
+    const uint8* y1_ptr = y0_ptr + y_pitch;
 
-    const uint8_t* u0_ptr = u_buf + (source_y >> y_shift) * uv_pitch;
-    const uint8_t* u1_ptr = u0_ptr + uv_pitch;
-    const uint8_t* v0_ptr = v_buf + (source_y >> y_shift) * uv_pitch;
-    const uint8_t* v1_ptr = v0_ptr + uv_pitch;
+    const uint8* u0_ptr = u_buf + (source_y >> y_shift) * uv_pitch;
+    const uint8* u1_ptr = u0_ptr + uv_pitch;
+    const uint8* v0_ptr = v_buf + (source_y >> y_shift) * uv_pitch;
+    const uint8* v1_ptr = v0_ptr + uv_pitch;
 
     // vertical scaler uses 16.8 fixed point
     int source_y_fraction = (source_y_subpixel & kFractionMask) >> 8;
     int source_uv_fraction =
         ((source_y_subpixel >> y_shift) & kFractionMask) >> 8;
 
-    const uint8_t* y_ptr = y0_ptr;
-    const uint8_t* u_ptr = u0_ptr;
-    const uint8_t* v_ptr = v0_ptr;
+    const uint8* y_ptr = y0_ptr;
+    const uint8* u_ptr = u0_ptr;
+    const uint8* v_ptr = v0_ptr;
     // Apply vertical filtering if necessary.
     // TODO(fbarchard): Remove memcpy when not necessary.
     if (filter & mozilla::gfx::FILTER_BILINEAR_V) {
       if (yscale_fixed != kFractionMax &&
           source_y_fraction && ((source_y + 1) < source_height)) {
         FilterRows(ybuf, y0_ptr, y1_ptr, source_width, source_y_fraction);
       } else {
         memcpy(ybuf, y0_ptr, source_width);
@@ -546,21 +546,21 @@ void ScaleYCbCrToRGB32_deprecated(const 
                          dest_pixel, width, source_dx);
 #endif
     }
   }
   // MMX used for FastConvertYUVToRGB32Row and FilterRows requires emms.
   if (has_mmx)
     EMMS();
 }
-void ConvertI420AlphaToARGB32(const uint8_t* y_buf,
-                              const uint8_t* u_buf,
-                              const uint8_t* v_buf,
-                              const uint8_t* a_buf,
-                              uint8_t* argb_buf,
+void ConvertI420AlphaToARGB32(const uint8* y_buf,
+                              const uint8* u_buf,
+                              const uint8* v_buf,
+                              const uint8* a_buf,
+                              uint8* argb_buf,
                               int pic_width,
                               int pic_height,
                               int ya_pitch,
                               int uv_pitch,
                               int argb_pitch) {
 
   // The downstream graphics stack expects an attenuated input, hence why the
   // attenuation parameter is set.
--- a/gfx/ycbcr/yuv_convert.h
+++ b/gfx/ycbcr/yuv_convert.h
@@ -41,81 +41,81 @@ enum ScaleFilter {
   FILTER_NONE = 0,        // No filter (point sampled).
   FILTER_BILINEAR_H = 1,  // Bilinear horizontal filter.
   FILTER_BILINEAR_V = 2,  // Bilinear vertical filter.
   FILTER_BILINEAR = 3     // Bilinear filter.
 };
 
 // Convert a frame of YUV to 32 bit ARGB.
 // Pass in YV16/YV12 depending on source format
-void ConvertYCbCrToRGB32(const uint8_t* yplane,
-                         const uint8_t* uplane,
-                         const uint8_t* vplane,
-                         uint8_t* rgbframe,
+void ConvertYCbCrToRGB32(const uint8* yplane,
+                         const uint8* uplane,
+                         const uint8* vplane,
+                         uint8* rgbframe,
                          int pic_x,
                          int pic_y,
                          int pic_width,
                          int pic_height,
                          int ystride,
                          int uvstride,
                          int rgbstride,
                          YUVType yuv_type,
                          YUVColorSpace yuv_color_space,
                          ColorRange color_range);
 
-void ConvertYCbCrToRGB32_deprecated(const uint8_t* yplane,
-                                    const uint8_t* uplane,
-                                    const uint8_t* vplane,
-                                    uint8_t* rgbframe,
+void ConvertYCbCrToRGB32_deprecated(const uint8* yplane,
+                                    const uint8* uplane,
+                                    const uint8* vplane,
+                                    uint8* rgbframe,
                                     int pic_x,
                                     int pic_y,
                                     int pic_width,
                                     int pic_height,
                                     int ystride,
                                     int uvstride,
                                     int rgbstride,
                                     YUVType yuv_type);
 
 // Scale a frame of YUV to 32 bit ARGB.
 // Supports rotation and mirroring.
-void ScaleYCbCrToRGB32(const uint8_t* yplane,
-                       const uint8_t* uplane,
-                       const uint8_t* vplane,
-                       uint8_t* rgbframe,
+void ScaleYCbCrToRGB32(const uint8* yplane,
+                       const uint8* uplane,
+                       const uint8* vplane,
+                       uint8* rgbframe,
                        int source_width,
                        int source_height,
                        int width,
                        int height,
                        int ystride,
                        int uvstride,
                        int rgbstride,
                        YUVType yuv_type,
                        YUVColorSpace yuv_color_space,
                        ScaleFilter filter);
 
-void ScaleYCbCrToRGB32_deprecated(const uint8_t* yplane,
-                                  const uint8_t* uplane,
-                                  const uint8_t* vplane,
-                                  uint8_t* rgbframe,
+void ScaleYCbCrToRGB32_deprecated(const uint8* yplane,
+                                  const uint8* uplane,
+                                  const uint8* vplane,
+                                  uint8* rgbframe,
                                   int source_width,
                                   int source_height,
                                   int width,
                                   int height,
                                   int ystride,
                                   int uvstride,
                                   int rgbstride,
                                   YUVType yuv_type,
                                   Rotate view_rotate,
                                   ScaleFilter filter);
 
-void ConvertI420AlphaToARGB32(const uint8_t* yplane,
-                              const uint8_t* uplane,
-                              const uint8_t* vplane,
-                              const uint8_t* aplane,
-                              uint8_t* argbframe,
+void ConvertI420AlphaToARGB32(const uint8* yplane,
+                              const uint8* uplane,
+                              const uint8* vplane,
+                              const uint8* aplane,
+                              uint8* argbframe,
                               int pic_width,
                               int pic_height,
                               int yastride,
                               int uvstride,
                               int argbstride);
 
 } // namespace gfx
 } // namespace mozilla
--- a/gfx/ycbcr/yuv_convert_arm.cpp
+++ b/gfx/ycbcr/yuv_convert_arm.cpp
@@ -16,30 +16,30 @@ namespace mozilla {
 namespace gfx {
 
 #  if defined(MOZILLA_MAY_SUPPORT_NEON)
 #  if defined(__clang__)
 void __attribute((noinline))
 #  else
 void __attribute((noinline,optimize("-fomit-frame-pointer")))
 #  endif
-    yuv42x_to_rgb565_row_neon(uint16_t *dst,
-                              const uint8_t *y,
-                              const uint8_t *u,
-                              const uint8_t *v,
+    yuv42x_to_rgb565_row_neon(uint16 *dst,
+                              const uint8 *y,
+                              const uint8 *u,
+                              const uint8 *v,
                               int n,
                               int oddflag)
 {
-    static __attribute__((aligned(16))) uint16_t acc_r[8] = {
+    static __attribute__((aligned(16))) uint16 acc_r[8] = {
         22840, 22840, 22840, 22840, 22840, 22840, 22840, 22840,
     };
-    static __attribute__((aligned(16))) uint16_t acc_g[8] = {
+    static __attribute__((aligned(16))) uint16 acc_g[8] = {
         17312, 17312, 17312, 17312, 17312, 17312, 17312, 17312,
     };
-    static __attribute__((aligned(16))) uint16_t acc_b[8] = {
+    static __attribute__((aligned(16))) uint16 acc_b[8] = {
         28832, 28832, 28832, 28832, 28832, 28832, 28832, 28832,
     };
     /*
      * Registers:
      * q0, q1 : d0, d1, d2, d3  - are used for initial loading of YUV data
      * q2     : d4, d5          - are used for storing converted RGB data
      * q3     : d6, d7          - are used for temporary storage
      *
--- a/gfx/ycbcr/yuv_convert_mmx.cpp
+++ b/gfx/ycbcr/yuv_convert_mmx.cpp
@@ -5,17 +5,17 @@
 #include <mmintrin.h>
 #include "yuv_row.h"
 
 namespace mozilla {
 namespace gfx {
 
 // FilterRows combines two rows of the image using linear interpolation.
 // MMX version does 8 pixels at a time.
-void FilterRows_MMX(uint8_t* ybuf, const uint8_t* y0_ptr, const uint8_t* y1_ptr,
+void FilterRows_MMX(uint8* ybuf, const uint8* y0_ptr, const uint8* y1_ptr,
                     int source_width, int source_y_fraction) {
   __m64 zero = _mm_setzero_si64();
   __m64 y1_fraction = _mm_set1_pi16(source_y_fraction);
   __m64 y0_fraction = _mm_set1_pi16(256 - source_y_fraction);
 
   const __m64* y0_ptr64 = reinterpret_cast<const __m64*>(y0_ptr);
   const __m64* y1_ptr64 = reinterpret_cast<const __m64*>(y1_ptr);
   __m64* dest64 = reinterpret_cast<__m64*>(ybuf);
--- a/gfx/ycbcr/yuv_convert_sse2.cpp
+++ b/gfx/ycbcr/yuv_convert_sse2.cpp
@@ -5,17 +5,17 @@
 #include <emmintrin.h>
 #include "yuv_row.h"
 
 namespace mozilla {
 namespace gfx {
 
 // FilterRows combines two rows of the image using linear interpolation.
 // SSE2 version does 16 pixels at a time.
-void FilterRows_SSE2(uint8_t* ybuf, const uint8_t* y0_ptr, const uint8_t* y1_ptr,
+void FilterRows_SSE2(uint8* ybuf, const uint8* y0_ptr, const uint8* y1_ptr,
                      int source_width, int source_y_fraction) {
   __m128i zero = _mm_setzero_si128();
   __m128i y1_fraction = _mm_set1_epi16(source_y_fraction);
   __m128i y0_fraction = _mm_set1_epi16(256 - source_y_fraction);
 
   const __m128i* y0_ptr128 = reinterpret_cast<const __m128i*>(y0_ptr);
   const __m128i* y1_ptr128 = reinterpret_cast<const __m128i*>(y1_ptr);
   __m128i* dest128 = reinterpret_cast<__m128i*>(ybuf);
--- a/gfx/ycbcr/yuv_row.h
+++ b/gfx/ycbcr/yuv_row.h
@@ -10,113 +10,113 @@
 #ifndef MEDIA_BASE_YUV_ROW_H_
 #define MEDIA_BASE_YUV_ROW_H_
 
 #include "chromium_types.h"
 
 extern "C" {
 // Can only do 1x.
 // This is the second fastest of the scalers.
-void FastConvertYUVToRGB32Row(const uint8_t* y_buf,
-                              const uint8_t* u_buf,
-                              const uint8_t* v_buf,
-                              uint8_t* rgb_buf,
+void FastConvertYUVToRGB32Row(const uint8* y_buf,
+                              const uint8* u_buf,
+                              const uint8* v_buf,
+                              uint8* rgb_buf,
                               int width);
 
-void FastConvertYUVToRGB32Row_C(const uint8_t* y_buf,
-                                const uint8_t* u_buf,
-                                const uint8_t* v_buf,
-                                uint8_t* rgb_buf,
+void FastConvertYUVToRGB32Row_C(const uint8* y_buf,
+                                const uint8* u_buf,
+                                const uint8* v_buf,
+                                uint8* rgb_buf,
                                 int width,
                                 unsigned int x_shift);
 
-void FastConvertYUVToRGB32Row(const uint8_t* y_buf,
-                              const uint8_t* u_buf,
-                              const uint8_t* v_buf,
-                              uint8_t* rgb_buf,
+void FastConvertYUVToRGB32Row(const uint8* y_buf,
+                              const uint8* u_buf,
+                              const uint8* v_buf,
+                              uint8* rgb_buf,
                               int width);
 
 // Can do 1x, half size or any scale down by an integer amount.
 // Step can be negative (mirroring, rotate 180).
 // This is the third fastest of the scalers.
 // Only defined on Windows x86-32.
-void ConvertYUVToRGB32Row_SSE(const uint8_t* y_buf,
-                              const uint8_t* u_buf,
-                              const uint8_t* v_buf,
-                              uint8_t* rgb_buf,
+void ConvertYUVToRGB32Row_SSE(const uint8* y_buf,
+                              const uint8* u_buf,
+                              const uint8* v_buf,
+                              uint8* rgb_buf,
                               int width,
                               int step);
 
 // Rotate is like Convert, but applies different step to Y versus U and V.
 // This allows rotation by 90 or 270, by stepping by stride.
 // This is the forth fastest of the scalers.
 // Only defined on Windows x86-32.
-void RotateConvertYUVToRGB32Row_SSE(const uint8_t* y_buf,
-                                    const uint8_t* u_buf,
-                                    const uint8_t* v_buf,
-                                    uint8_t* rgb_buf,
+void RotateConvertYUVToRGB32Row_SSE(const uint8* y_buf,
+                                    const uint8* u_buf,
+                                    const uint8* v_buf,
+                                    uint8* rgb_buf,
                                     int width,
                                     int ystep,
                                     int uvstep);
 
 // Doubler does 4 pixels at a time.  Each pixel is replicated.
 // This is the fastest of the scalers.
 // Only defined on Windows x86-32.
-void DoubleYUVToRGB32Row_SSE(const uint8_t* y_buf,
-                             const uint8_t* u_buf,
-                             const uint8_t* v_buf,
-                             uint8_t* rgb_buf,
+void DoubleYUVToRGB32Row_SSE(const uint8* y_buf,
+                             const uint8* u_buf,
+                             const uint8* v_buf,
+                             uint8* rgb_buf,
                              int width);
 
 // Handles arbitrary scaling up or down.
 // Mirroring is supported, but not 90 or 270 degree rotation.
 // Chroma is under sampled every 2 pixels for performance.
-void ScaleYUVToRGB32Row(const uint8_t* y_buf,
-                        const uint8_t* u_buf,
-                        const uint8_t* v_buf,
-                        uint8_t* rgb_buf,
+void ScaleYUVToRGB32Row(const uint8* y_buf,
+                        const uint8* u_buf,
+                        const uint8* v_buf,
+                        uint8* rgb_buf,
                         int width,
                         int source_dx);
 
-void ScaleYUVToRGB32Row(const uint8_t* y_buf,
-                        const uint8_t* u_buf,
-                        const uint8_t* v_buf,
-                        uint8_t* rgb_buf,
+void ScaleYUVToRGB32Row(const uint8* y_buf,
+                        const uint8* u_buf,
+                        const uint8* v_buf,
+                        uint8* rgb_buf,
                         int width,
                         int source_dx);
 
-void ScaleYUVToRGB32Row_C(const uint8_t* y_buf,
-                          const uint8_t* u_buf,
-                          const uint8_t* v_buf,
-                          uint8_t* rgb_buf,
+void ScaleYUVToRGB32Row_C(const uint8* y_buf,
+                          const uint8* u_buf,
+                          const uint8* v_buf,
+                          uint8* rgb_buf,
                           int width,
                           int source_dx);
 
 // Handles arbitrary scaling up or down with bilinear filtering.
 // Mirroring is supported, but not 90 or 270 degree rotation.
 // Chroma is under sampled every 2 pixels for performance.
 // This is the slowest of the scalers.
-void LinearScaleYUVToRGB32Row(const uint8_t* y_buf,
-                              const uint8_t* u_buf,
-                              const uint8_t* v_buf,
-                              uint8_t* rgb_buf,
+void LinearScaleYUVToRGB32Row(const uint8* y_buf,
+                              const uint8* u_buf,
+                              const uint8* v_buf,
+                              uint8* rgb_buf,
                               int width,
                               int source_dx);
 
-void LinearScaleYUVToRGB32Row(const uint8_t* y_buf,
-                              const uint8_t* u_buf,
-                              const uint8_t* v_buf,
-                              uint8_t* rgb_buf,
+void LinearScaleYUVToRGB32Row(const uint8* y_buf,
+                              const uint8* u_buf,
+                              const uint8* v_buf,
+                              uint8* rgb_buf,
                               int width,
                               int source_dx);
 
-void LinearScaleYUVToRGB32Row_C(const uint8_t* y_buf,
-                                const uint8_t* u_buf,
-                                const uint8_t* v_buf,
-                                uint8_t* rgb_buf,
+void LinearScaleYUVToRGB32Row_C(const uint8* y_buf,
+                                const uint8* u_buf,
+                                const uint8* v_buf,
+                                uint8* rgb_buf,
                                 int width,
                                 int source_dx);
 
 
 #if defined(_MSC_VER) && !defined(__CLR_VER) && !defined(__clang__)
 #if defined(VISUALC_HAS_AVX2)
 #define SIMD_ALIGNED(var) __declspec(align(32)) var
 #else
@@ -128,17 +128,17 @@ void LinearScaleYUVToRGB32Row_C(const ui
 #define SIMD_ALIGNED(var) var __attribute__((aligned(32)))
 #else
 #define SIMD_ALIGNED(var) var __attribute__((aligned(16)))
 #endif
 #else
 #define SIMD_ALIGNED(var) var
 #endif
 
-extern SIMD_ALIGNED(const int16_t kCoefficientsRgbY[768][4]);
+extern SIMD_ALIGNED(const int16 kCoefficientsRgbY[768][4]);
 
 // x64 uses MMX2 (SSE) so emms is not required.
 // Warning C4799: function has no EMMS instruction.
 // EMMS() is slow and should be called by the calling function once per image.
 #if defined(ARCH_CPU_X86) && !defined(ARCH_CPU_X86_64)
 #if defined(_MSC_VER)
 #define EMMS() __asm emms
 #pragma warning(disable: 4799)
--- a/gfx/ycbcr/yuv_row_c.cpp
+++ b/gfx/ycbcr/yuv_row_c.cpp
@@ -8,20 +8,20 @@
 
 extern "C" {
 
 // C reference code that mimic the YUV assembly.
 #define packuswb(x) ((x) < 0 ? 0 : ((x) > 255 ? 255 : (x)))
 #define paddsw(x, y) (((x) + (y)) < -32768 ? -32768 : \
     (((x) + (y)) > 32767 ? 32767 : ((x) + (y))))
 
-static inline void YuvPixel(uint8_t y,
-                            uint8_t u,
-                            uint8_t v,
-                            uint8_t* rgb_buf) {
+static inline void YuvPixel(uint8 y,
+                            uint8 u,
+                            uint8 v,
+                            uint8* rgb_buf) {
 
   int b = kCoefficientsRgbY[256+u][0];
   int g = kCoefficientsRgbY[256+u][1];
   int r = kCoefficientsRgbY[256+u][2];
   int a = kCoefficientsRgbY[256+u][3];
 
   b = paddsw(b, kCoefficientsRgbY[512+v][0]);
   g = paddsw(g, kCoefficientsRgbY[512+v][1]);
@@ -33,53 +33,53 @@ static inline void YuvPixel(uint8_t y,
   r = paddsw(r, kCoefficientsRgbY[y][2]);
   a = paddsw(a, kCoefficientsRgbY[y][3]);
 
   b >>= 6;
   g >>= 6;
   r >>= 6;
   a >>= 6;
 
-  *reinterpret_cast<uint32_t*>(rgb_buf) = (packuswb(b)) |
-                                          (packuswb(g) << 8) |
-                                          (packuswb(r) << 16) |
-                                          (packuswb(a) << 24);
+  *reinterpret_cast<uint32*>(rgb_buf) = (packuswb(b)) |
+                                        (packuswb(g) << 8) |
+                                        (packuswb(r) << 16) |
+                                        (packuswb(a) << 24);
 }
 
-void FastConvertYUVToRGB32Row_C(const uint8_t* y_buf,
-                                const uint8_t* u_buf,
-                                const uint8_t* v_buf,
-                                uint8_t* rgb_buf,
+void FastConvertYUVToRGB32Row_C(const uint8* y_buf,
+                                const uint8* u_buf,
+                                const uint8* v_buf,
+                                uint8* rgb_buf,
                                 int width,
                                 unsigned int x_shift) {
   for (int x = 0; x < width; x += 2) {
-    uint8_t u = u_buf[x >> x_shift];
-    uint8_t v = v_buf[x >> x_shift];
-    uint8_t y0 = y_buf[x];
+    uint8 u = u_buf[x >> x_shift];
+    uint8 v = v_buf[x >> x_shift];
+    uint8 y0 = y_buf[x];
     YuvPixel(y0, u, v, rgb_buf);
     if ((x + 1) < width) {
-      uint8_t y1 = y_buf[x + 1];
+      uint8 y1 = y_buf[x + 1];
       if (x_shift == 0) {
         u = u_buf[x + 1];
         v = v_buf[x + 1];
       }
       YuvPixel(y1, u, v, rgb_buf + 4);
     }
     rgb_buf += 8;  // Advance 2 pixels.
   }
 }
 
 // 16.16 fixed point is used.  A shift by 16 isolates the integer.
 // A shift by 17 is used to further subsample the chrominence channels.
 // & 0xffff isolates the fixed point fraction.  >> 2 to get the upper 2 bits,
 // for 1/65536 pixel accurate interpolation.
-void ScaleYUVToRGB32Row_C(const uint8_t* y_buf,
-                          const uint8_t* u_buf,
-                          const uint8_t* v_buf,
-                          uint8_t* rgb_buf,
+void ScaleYUVToRGB32Row_C(const uint8* y_buf,
+                          const uint8* u_buf,
+                          const uint8* v_buf,
+                          uint8* rgb_buf,
                           int width,
                           int source_dx) {
   int x = 0;
   for (int i = 0; i < width; i += 2) {
     int y = y_buf[x >> 16];
     int u = u_buf[(x >> 17)];
     int v = v_buf[(x >> 17)];
     YuvPixel(y, u, v, rgb_buf);
@@ -88,20 +88,20 @@ void ScaleYUVToRGB32Row_C(const uint8_t*
       y = y_buf[x >> 16];
       YuvPixel(y, u, v, rgb_buf+4);
       x += source_dx;
     }
     rgb_buf += 8;
   }
 }
 
-void LinearScaleYUVToRGB32Row_C(const uint8_t* y_buf,
-                                const uint8_t* u_buf,
-                                const uint8_t* v_buf,
-                                uint8_t* rgb_buf,
+void LinearScaleYUVToRGB32Row_C(const uint8* y_buf,
+                                const uint8* u_buf,
+                                const uint8* v_buf,
+                                uint8* rgb_buf,
                                 int width,
                                 int source_dx) {
   int x = 0;
   if (source_dx >= 0x20000) {
     x = 32768;
   }
   for (int i = 0; i < width; i += 2) {
     int y0 = y_buf[x >> 16];
--- a/gfx/ycbcr/yuv_row_other.cpp
+++ b/gfx/ycbcr/yuv_row_other.cpp
@@ -1,34 +1,34 @@
 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
 #include "yuv_row.h"
 
 extern "C" {
-void FastConvertYUVToRGB32Row(const uint8_t* y_buf,
-                              const uint8_t* u_buf,
-                              const uint8_t* v_buf,
-                              uint8_t* rgb_buf,
+void FastConvertYUVToRGB32Row(const uint8* y_buf,
+                              const uint8* u_buf,
+                              const uint8* v_buf,
+                              uint8* rgb_buf,
                               int width) {
   FastConvertYUVToRGB32Row_C(y_buf, u_buf, v_buf, rgb_buf, width, 1);
 }
 
-void ScaleYUVToRGB32Row(const uint8_t* y_buf,
-                        const uint8_t* u_buf,
-                        const uint8_t* v_buf,
-                        uint8_t* rgb_buf,
+void ScaleYUVToRGB32Row(const uint8* y_buf,
+                        const uint8* u_buf,
+                        const uint8* v_buf,
+                        uint8* rgb_buf,
                         int width,
                         int source_dx) {
   ScaleYUVToRGB32Row_C(y_buf, u_buf, v_buf, rgb_buf, width, source_dx);
 }
 
-void LinearScaleYUVToRGB32Row(const uint8_t* y_buf,
-                              const uint8_t* u_buf,
-                              const uint8_t* v_buf,
-                              uint8_t* rgb_buf,
+void LinearScaleYUVToRGB32Row(const uint8* y_buf,
+                              const uint8* u_buf,
+                              const uint8* v_buf,
+                              uint8* rgb_buf,
                               int width,
                               int source_dx) {
   LinearScaleYUVToRGB32Row_C(y_buf, u_buf, v_buf, rgb_buf, width, source_dx);
 }
 
 } 
--- a/gfx/ycbcr/yuv_row_posix.cpp
+++ b/gfx/ycbcr/yuv_row_posix.cpp
@@ -9,20 +9,20 @@
 
 extern "C" {
 
 #if defined(ARCH_CPU_X86_64)
 
 // We don't need CPUID guards here, since x86-64 implies SSE2.
 
 // AMD64 ABI uses register paremters.
-void FastConvertYUVToRGB32Row(const uint8_t* y_buf,  // rdi
-                              const uint8_t* u_buf,  // rsi
-                              const uint8_t* v_buf,  // rdx
-                              uint8_t* rgb_buf,      // rcx
+void FastConvertYUVToRGB32Row(const uint8* y_buf,  // rdi
+                              const uint8* u_buf,  // rsi
+                              const uint8* v_buf,  // rdx
+                              uint8* rgb_buf,      // rcx
                               int width) {         // r8
   asm volatile(
   "jmp    1f\n"
 "0:"
   "movzb  (%[u_buf]),%%r10\n"
   "add    $0x1,%[u_buf]\n"
   "movzb  (%[v_buf]),%%r11\n"
   "add    $0x1,%[v_buf]\n"
@@ -66,20 +66,20 @@ void FastConvertYUVToRGB32Row(const uint
     [v_buf] "+r"(v_buf),
     [rgb_buf] "+r"(rgb_buf),
     [width] "+r"(width)
   : [kCoefficientsRgbY] "r" (kCoefficientsRgbY)
   : "cc", "memory", "r10", "r11", "xmm0", "xmm1", "xmm2", "xmm3"
 );
 }
 
-void ScaleYUVToRGB32Row(const uint8_t* y_buf,  // rdi
-                        const uint8_t* u_buf,  // rsi
-                        const uint8_t* v_buf,  // rdx
-                        uint8_t* rgb_buf,      // rcx
+void ScaleYUVToRGB32Row(const uint8* y_buf,  // rdi
+                        const uint8* u_buf,  // rsi
+                        const uint8* v_buf,  // rdx
+                        uint8* rgb_buf,      // rcx
                         int width,           // r8
                         int source_dx) {     // r9
   asm volatile(
   "xor    %%r11,%%r11\n"
   "sub    $0x2,%[width]\n"
   "js     1f\n"
 
 "0:"
@@ -134,20 +134,20 @@ void ScaleYUVToRGB32Row(const uint8_t* y
     [u_buf] "r"(u_buf),
     [v_buf] "r"(v_buf),
     [kCoefficientsRgbY] "r" (kCoefficientsRgbY),
     [source_dx] "r"(static_cast<long>(source_dx))
   : "cc", "memory", "r10", "r11", "rax", "xmm0", "xmm1", "xmm2"
 );
 }
 
-void LinearScaleYUVToRGB32Row(const uint8_t* y_buf,
-                              const uint8_t* u_buf,
-                              const uint8_t* v_buf,
-                              uint8_t* rgb_buf,
+void LinearScaleYUVToRGB32Row(const uint8* y_buf,
+                              const uint8* u_buf,
+                              const uint8* v_buf,
+                              uint8* rgb_buf,
                               int width,
                               int source_dx) {
   asm volatile(
   "xor    %%r11,%%r11\n"   // x = 0
   "sub    $0x2,%[width]\n"
   "js     2f\n"
   "cmp    $0x20000,%[source_dx]\n"   // if source_dx >= 2.0
   "jl     0f\n"
@@ -254,20 +254,20 @@ void LinearScaleYUVToRGB32Row(const uint
   : "cc", "memory", "r10", "r11", "r13", "r14", "rax", "xmm0", "xmm1", "xmm2"
 );
 }
 
 #elif defined(MOZILLA_MAY_SUPPORT_SSE) && defined(ARCH_CPU_X86_32) && !defined(__PIC__)
 
 // PIC version is slower because less registers are available, so
 // non-PIC is used on platforms where it is possible.
-void FastConvertYUVToRGB32Row_SSE(const uint8_t* y_buf,
-                                  const uint8_t* u_buf,
-                                  const uint8_t* v_buf,
-                                  uint8_t* rgb_buf,
+void FastConvertYUVToRGB32Row_SSE(const uint8* y_buf,
+                                  const uint8* u_buf,
+                                  const uint8* v_buf,
+                                  uint8* rgb_buf,
                                   int width);
   asm(
   ".text\n"
   ".global FastConvertYUVToRGB32Row_SSE\n"
   ".type FastConvertYUVToRGB32Row_SSE, @function\n"
 "FastConvertYUVToRGB32Row_SSE:\n"
   "pusha\n"
   "mov    0x24(%esp),%edx\n"
@@ -316,35 +316,35 @@ void FastConvertYUVToRGB32Row_SSE(const 
 "2:"
   "popa\n"
   "ret\n"
 #if !defined(XP_MACOSX)
   ".previous\n"
 #endif
 );
 
-void FastConvertYUVToRGB32Row(const uint8_t* y_buf,
-                              const uint8_t* u_buf,
-                              const uint8_t* v_buf,
-                              uint8_t* rgb_buf,
+void FastConvertYUVToRGB32Row(const uint8* y_buf,
+                              const uint8* u_buf,
+                              const uint8* v_buf,
+                              uint8* rgb_buf,
                               int width)
 {
   if (mozilla::supports_sse()) {
     FastConvertYUVToRGB32Row_SSE(y_buf, u_buf, v_buf, rgb_buf, width);
     return;
   }
 
   FastConvertYUVToRGB32Row_C(y_buf, u_buf, v_buf, rgb_buf, width, 1);
 }
 
 
-void ScaleYUVToRGB32Row_SSE(const uint8_t* y_buf,
-                            const uint8_t* u_buf,
-                            const uint8_t* v_buf,
-                            uint8_t* rgb_buf,
+void ScaleYUVToRGB32Row_SSE(const uint8* y_buf,
+                            const uint8* u_buf,
+                            const uint8* v_buf,
+                            uint8* rgb_buf,
                             int width,
                             int source_dx);
   asm(
   ".text\n"
   ".global ScaleYUVToRGB32Row_SSE\n"
   ".type ScaleYUVToRGB32Row_SSE, @function\n"
 "ScaleYUVToRGB32Row_SSE:\n"
   "pusha\n"
@@ -409,37 +409,37 @@ void ScaleYUVToRGB32Row_SSE(const uint8_
 "2:"
   "popa\n"
   "ret\n"
 #if !defined(XP_MACOSX)
   ".previous\n"
 #endif
 );
 
-void ScaleYUVToRGB32Row(const uint8_t* y_buf,
-                        const uint8_t* u_buf,
-                        const uint8_t* v_buf,
-                        uint8_t* rgb_buf,
+void ScaleYUVToRGB32Row(const uint8* y_buf,
+                        const uint8* u_buf,
+                        const uint8* v_buf,
+                        uint8* rgb_buf,
                         int width,
                         int source_dx)
 {
   if (mozilla::supports_sse()) {
     ScaleYUVToRGB32Row_SSE(y_buf, u_buf, v_buf, rgb_buf,
                            width, source_dx);
     return;
   }
 
   ScaleYUVToRGB32Row_C(y_buf, u_buf, v_buf, rgb_buf,
                        width, source_dx);
 }
 
-void LinearScaleYUVToRGB32Row_SSE(const uint8_t* y_buf,
-                                  const uint8_t* u_buf,
-                                  const uint8_t* v_buf,
-                                  uint8_t* rgb_buf,
+void LinearScaleYUVToRGB32Row_SSE(const uint8* y_buf,
+                                  const uint8* u_buf,
+                                  const uint8* v_buf,
+                                  uint8* rgb_buf,
                                   int width,
                                   int source_dx);
   asm(
   ".text\n"
   ".global LinearScaleYUVToRGB32Row_SSE\n"
   ".type LinearScaleYUVToRGB32Row_SSE, @function\n"
 "LinearScaleYUVToRGB32Row_SSE:\n"
   "pusha\n"
@@ -541,41 +541,41 @@ void LinearScaleYUVToRGB32Row_SSE(const 
   "movd %mm1, (%ebp)\n"
   "popa\n"
   "ret\n"
 #if !defined(XP_MACOSX)
   ".previous\n"
 #endif
 );
 
-void LinearScaleYUVToRGB32Row(const uint8_t* y_buf,
-                              const uint8_t* u_buf,
-                              const uint8_t* v_buf,
-                              uint8_t* rgb_buf,
+void LinearScaleYUVToRGB32Row(const uint8* y_buf,
+                              const uint8* u_buf,
+                              const uint8* v_buf,
+                              uint8* rgb_buf,
                               int width,
                               int source_dx)
 {
   if (mozilla::supports_sse()) {
     LinearScaleYUVToRGB32Row_SSE(y_buf, u_buf, v_buf, rgb_buf,
                                  width, source_dx);
     return;
   }
 
   LinearScaleYUVToRGB32Row_C(y_buf, u_buf, v_buf, rgb_buf,
                              width, source_dx);
 }
 
 #elif defined(MOZILLA_MAY_SUPPORT_SSE) && defined(ARCH_CPU_X86_32) && defined(__PIC__)
 
-void PICConvertYUVToRGB32Row_SSE(const uint8_t* y_buf,
-                                 const uint8_t* u_buf,
-                                 const uint8_t* v_buf,
-                                 uint8_t* rgb_buf,
+void PICConvertYUVToRGB32Row_SSE(const uint8* y_buf,
+                                 const uint8* u_buf,
+                                 const uint8* v_buf,
+                                 uint8* rgb_buf,
                                  int width,
-                                 const int16_t *kCoefficientsRgbY);
+                                 const int16 *kCoefficientsRgbY);
 
   asm(
   ".text\n"
 #if defined(XP_MACOSX)
 "_PICConvertYUVToRGB32Row_SSE:\n"
 #else
 "PICConvertYUVToRGB32Row_SSE:\n"
 #endif
@@ -627,38 +627,38 @@ void PICConvertYUVToRGB32Row_SSE(const u
 "2:"
   "popa\n"
   "ret\n"
 #if !defined(XP_MACOSX)
   ".previous\n"
 #endif
 );
 
-void FastConvertYUVToRGB32Row(const uint8_t* y_buf,
-                              const uint8_t* u_buf,
-                              const uint8_t* v_buf,
-                              uint8_t* rgb_buf,
+void FastConvertYUVToRGB32Row(const uint8* y_buf,
+                              const uint8* u_buf,
+                              const uint8* v_buf,
+                              uint8* rgb_buf,
                               int width)
 {
   if (mozilla::supports_sse()) {
     PICConvertYUVToRGB32Row_SSE(y_buf, u_buf, v_buf, rgb_buf, width,
                                 &kCoefficientsRgbY[0][0]);
     return;
   }
 
   FastConvertYUVToRGB32Row_C(y_buf, u_buf, v_buf, rgb_buf, width, 1);
 }
 
-void PICScaleYUVToRGB32Row_SSE(const uint8_t* y_buf,
-                               const uint8_t* u_buf,
-                               const uint8_t* v_buf,
-                               uint8_t* rgb_buf,
+void PICScaleYUVToRGB32Row_SSE(const uint8* y_buf,
+                               const uint8* u_buf,
+                               const uint8* v_buf,
+                               uint8* rgb_buf,
                                int width,
                                int source_dx,
-                               const int16_t *kCoefficientsRgbY);
+                               const int16 *kCoefficientsRgbY);
 
   asm(
   ".text\n"
 #if defined(XP_MACOSX)
 "_PICScaleYUVToRGB32Row_SSE:\n"
 #else
 "PICScaleYUVToRGB32Row_SSE:\n"
 #endif
@@ -724,39 +724,39 @@ void PICScaleYUVToRGB32Row_SSE(const uin
 "2:"
   "popa\n"
   "ret\n"
 #if !defined(XP_MACOSX)
   ".previous\n"
 #endif
 );
 
-void ScaleYUVToRGB32Row(const uint8_t* y_buf,
-                        const uint8_t* u_buf,
-                        const uint8_t* v_buf,
-                        uint8_t* rgb_buf,
+void ScaleYUVToRGB32Row(const uint8* y_buf,
+                        const uint8* u_buf,
+                        const uint8* v_buf,
+                        uint8* rgb_buf,
                         int width,
                         int source_dx)
 {
   if (mozilla::supports_sse()) {
     PICScaleYUVToRGB32Row_SSE(y_buf, u_buf, v_buf, rgb_buf, width, source_dx,
                               &kCoefficientsRgbY[0][0]);
     return;
   }
 
   ScaleYUVToRGB32Row_C(y_buf, u_buf, v_buf, rgb_buf, width, source_dx);
 }
 
-void PICLinearScaleYUVToRGB32Row_SSE(const uint8_t* y_buf,
-                                     const uint8_t* u_buf,
-                                     const uint8_t* v_buf,
-                                     uint8_t* rgb_buf,
+void PICLinearScaleYUVToRGB32Row_SSE(const uint8* y_buf,
+                                     const uint8* u_buf,
+                                     const uint8* v_buf,
+                                     uint8* rgb_buf,
                                      int width,
                                      int source_dx,
-                                     const int16_t *kCoefficientsRgbY);
+                                     const int16 *kCoefficientsRgbY);
 
   asm(
   ".text\n"
 #if defined(XP_MACOSX)
 "_PICLinearScaleYUVToRGB32Row_SSE:\n"
 #else
 "PICLinearScaleYUVToRGB32Row_SSE:\n"
 #endif
@@ -863,52 +863,52 @@ void PICLinearScaleYUVToRGB32Row_SSE(con
   "popa\n"
   "ret\n"
 #if !defined(XP_MACOSX)
   ".previous\n"
 #endif
 );
 
 
-void LinearScaleYUVToRGB32Row(const uint8_t* y_buf,
-                              const uint8_t* u_buf,
-                              const uint8_t* v_buf,
-                              uint8_t* rgb_buf,
+void LinearScaleYUVToRGB32Row(const uint8* y_buf,
+                              const uint8* u_buf,
+                              const uint8* v_buf,
+                              uint8* rgb_buf,
                               int width,
                               int source_dx)
 {
   if (mozilla::supports_sse()) {
     PICLinearScaleYUVToRGB32Row_SSE(y_buf, u_buf, v_buf, rgb_buf, width,
                                     source_dx, &kCoefficientsRgbY[0][0]);
     return;
   }
 
   LinearScaleYUVToRGB32Row_C(y_buf, u_buf, v_buf, rgb_buf, width, source_dx);
 }
 #else
-void FastConvertYUVToRGB32Row(const uint8_t* y_buf,
-                              const uint8_t* u_buf,
-                              const uint8_t* v_buf,
-                              uint8_t* rgb_buf,
+void FastConvertYUVToRGB32Row(const uint8* y_buf,
+                              const uint8* u_buf,
+                              const uint8* v_buf,
+                              uint8* rgb_buf,
                               int width) {
   FastConvertYUVToRGB32Row_C(y_buf, u_buf, v_buf, rgb_buf, width, 1);
 }
 
-void ScaleYUVToRGB32Row(const uint8_t* y_buf,
-                        const uint8_t* u_buf,
-                        const uint8_t* v_buf,
-                        uint8_t* rgb_buf,
+void ScaleYUVToRGB32Row(const uint8* y_buf,
+                        const uint8* u_buf,
+                        const uint8* v_buf,
+                        uint8* rgb_buf,
                         int width,
                         int source_dx) {
   ScaleYUVToRGB32Row_C(y_buf, u_buf, v_buf, rgb_buf, width, source_dx);
 }
 
-void LinearScaleYUVToRGB32Row(const uint8_t* y_buf,
-                              const uint8_t* u_buf,
-                              const uint8_t* v_buf,
-                              uint8_t* rgb_buf,
+void LinearScaleYUVToRGB32Row(const uint8* y_buf,
+                              const uint8* u_buf,
+                              const uint8* v_buf,
+                              uint8* rgb_buf,
                               int width,
                               int source_dx) {
   LinearScaleYUVToRGB32Row_C(y_buf, u_buf, v_buf, rgb_buf, width, source_dx);
 }
 #endif
 
 }
--- a/gfx/ycbcr/yuv_row_table.cpp
+++ b/gfx/ycbcr/yuv_row_table.cpp
@@ -2,37 +2,37 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
 #include "yuv_row.h"
 
 extern "C" {
 
 #define RGBY(i) { \
-  static_cast<int16_t>(1.164 * 64 * (i - 16) + 0.5), \
-  static_cast<int16_t>(1.164 * 64 * (i - 16) + 0.5), \
-  static_cast<int16_t>(1.164 * 64 * (i - 16) + 0.5), \
+  static_cast<int16>(1.164 * 64 * (i - 16) + 0.5), \
+  static_cast<int16>(1.164 * 64 * (i - 16) + 0.5), \
+  static_cast<int16>(1.164 * 64 * (i - 16) + 0.5), \
   0 \
 }
 
 #define RGBU(i) { \
-  static_cast<int16_t>(2.018 * 64 * (i - 128) + 0.5), \
-  static_cast<int16_t>(-0.391 * 64 * (i - 128) + 0.5), \
+  static_cast<int16>(2.018 * 64 * (i - 128) + 0.5), \
+  static_cast<int16>(-0.391 * 64 * (i - 128) + 0.5), \
   0, \
-  static_cast<int16_t>(256 * 64 - 1) \
+  static_cast<int16>(256 * 64 - 1) \
 }
 
 #define RGBV(i) { \
   0, \
-  static_cast<int16_t>(-0.813 * 64 * (i - 128) + 0.5), \
-  static_cast<int16_t>(1.596 * 64 * (i - 128) + 0.5), \
+  static_cast<int16>(-0.813 * 64 * (i - 128) + 0.5), \
+  static_cast<int16>(1.596 * 64 * (i - 128) + 0.5), \
   0 \
 }
 
-SIMD_ALIGNED(const int16_t kCoefficientsRgbY[256 * 3][4]) = {
+SIMD_ALIGNED(const int16 kCoefficientsRgbY[256 * 3][4]) = {
   RGBY(0x00), RGBY(0x01), RGBY(0x02), RGBY(0x03),
   RGBY(0x04), RGBY(0x05), RGBY(0x06), RGBY(0x07),
   RGBY(0x08), RGBY(0x09), RGBY(0x0A), RGBY(0x0B),
   RGBY(0x0C), RGBY(0x0D), RGBY(0x0E), RGBY(0x0F),
   RGBY(0x10), RGBY(0x11), RGBY(0x12), RGBY(0x13),
   RGBY(0x14), RGBY(0x15), RGBY(0x16), RGBY(0x17),
   RGBY(0x18), RGBY(0x19), RGBY(0x1A), RGBY(0x1B),
   RGBY(0x1C), RGBY(0x1D), RGBY(0x1E), RGBY(0x1F),
--- a/gfx/ycbcr/yuv_row_win.cpp
+++ b/gfx/ycbcr/yuv_row_win.cpp
@@ -15,20 +15,20 @@ extern "C" {
 // clang-cl has a bug where it doesn't mangle names in inline asm
 // so let's do the mangling in the preprocessor (ugh)
 // (but we still need to declare a dummy extern for the parser)
 extern void* _kCoefficientsRgbY;
 #define kCoefficientsRgbY _kCoefficientsRgbY
 #endif
 
 __declspec(naked)
-void FastConvertYUVToRGB32Row_SSE(const uint8_t* y_buf,
-                                  const uint8_t* u_buf,
-                                  const uint8_t* v_buf,
-                                  uint8_t* rgb_buf,
+void FastConvertYUVToRGB32Row_SSE(const uint8* y_buf,
+                                  const uint8* u_buf,
+                                  const uint8* v_buf,
+                                  uint8* rgb_buf,
                                   int width) {
   __asm {
     pushad
     mov       edx, [esp + 32 + 4]   // Y
     mov       edi, [esp + 32 + 8]   // U
     mov       esi, [esp + 32 + 12]  // V
     mov       ebp, [esp + 32 + 16]  // rgb
     mov       ecx, [esp + 32 + 20]  // width
@@ -73,20 +73,20 @@ void FastConvertYUVToRGB32Row_SSE(const 
  convertdone :
 
     popad
     ret
   }
 }
 
 __declspec(naked)
-void ConvertYUVToRGB32Row_SSE(const uint8_t* y_buf,
-                              const uint8_t* u_buf,
-                              const uint8_t* v_buf,
-                              uint8_t* rgb_buf,
+void ConvertYUVToRGB32Row_SSE(const uint8* y_buf,
+                              const uint8* u_buf,
+                              const uint8* v_buf,
+                              uint8* rgb_buf,
                               int width,
                               int step) {
   __asm {
     pushad
     mov       edx, [esp + 32 + 4]   // Y
     mov       edi, [esp + 32 + 8]   // U
     mov       esi, [esp + 32 + 12]  // V
     mov       ebp, [esp + 32 + 16]  // rgb
@@ -134,20 +134,20 @@ void ConvertYUVToRGB32Row_SSE(const uint
  wdone :
 
     popad
     ret
   }
 }
 
 __declspec(naked)
-void RotateConvertYUVToRGB32Row_SSE(const uint8_t* y_buf,
-                                    const uint8_t* u_buf,
-                                    const uint8_t* v_buf,
-                                    uint8_t* rgb_buf,
+void RotateConvertYUVToRGB32Row_SSE(const uint8* y_buf,
+                                    const uint8* u_buf,
+                                    const uint8* v_buf,
+                                    uint8* rgb_buf,
                                     int width,
                                     int ystep,
                                     int uvstep) {
   __asm {
     pushad
     mov       edx, [esp + 32 + 4]   // Y
     mov       edi, [esp + 32 + 8]   // U
     mov       esi, [esp + 32 + 12]  // V
@@ -197,20 +197,20 @@ void RotateConvertYUVToRGB32Row_SSE(cons
  wdone :
 
     popad
     ret
   }
 }
 
 __declspec(naked)
-void DoubleYUVToRGB32Row_SSE(const uint8_t* y_buf,
-                             const uint8_t* u_buf,
-                             const uint8_t* v_buf,
-                             uint8_t* rgb_buf,
+void DoubleYUVToRGB32Row_SSE(const uint8* y_buf,
+                             const uint8* u_buf,
+                             const uint8* v_buf,
+                             uint8* rgb_buf,
                              int width) {
   __asm {
     pushad
     mov       edx, [esp + 32 + 4]   // Y
     mov       edi, [esp + 32 + 8]   // U
     mov       esi, [esp + 32 + 12]  // V
     mov       ebp, [esp + 32 + 16]  // rgb
     mov       ecx, [esp + 32 + 20]  // width
@@ -269,20 +269,20 @@ void DoubleYUVToRGB32Row_SSE(const uint8
   }
 }
 
 // This version does general purpose scaling by any amount, up or down.
 // The only thing it cannot do is rotation by 90 or 270.
 // For performance the chroma is under-sampled, reducing cost of a 3x
 // 1080p scale from 8.4 ms to 5.4 ms.
 __declspec(naked)
-void ScaleYUVToRGB32Row_SSE(const uint8_t* y_buf,
-                            const uint8_t* u_buf,
-                            const uint8_t* v_buf,
-                            uint8_t* rgb_buf,
+void ScaleYUVToRGB32Row_SSE(const uint8* y_buf,
+                            const uint8* u_buf,
+                            const uint8* v_buf,
+                            uint8* rgb_buf,
                             int width,
                             int source_dx) {
   __asm {
     pushad
     mov       edx, [esp + 32 + 4]   // Y
     mov       edi, [esp + 32 + 8]   // U
     mov       esi, [esp + 32 + 12]  // V
     mov       ebp, [esp + 32 + 16]  // rgb
@@ -342,20 +342,20 @@ void ScaleYUVToRGB32Row_SSE(const uint8_
 
  scaledone :
     popad
     ret
   }
 }
 
 __declspec(naked)
-void LinearScaleYUVToRGB32Row_SSE(const uint8_t* y_buf,
-                                  const uint8_t* u_buf,
-                                  const uint8_t* v_buf,
-                                  uint8_t* rgb_buf,
+void LinearScaleYUVToRGB32Row_SSE(const uint8* y_buf,
+                                  const uint8* u_buf,
+                                  const uint8* v_buf,
+                                  uint8* rgb_buf,
                                   int width,
                                   int source_dx) {
   __asm {
     pushad
     mov       edx, [esp + 32 + 4]  // Y
     mov       edi, [esp + 32 + 8]  // U
                 // [esp + 32 + 12] // V
     mov       ebp, [esp + 32 + 16] // rgb
@@ -449,52 +449,52 @@ lscalelastpixel:
     packuswb  mm1, mm1
     movd      [ebp], mm1
     popad
     ret
   };
 }
 #endif // if defined(MOZILLA_MAY_SUPPORT_SSE) && defined(_M_IX86)
 
-void FastConvertYUVToRGB32Row(const uint8_t* y_buf,
-                              const uint8_t* u_buf,
-                              const uint8_t* v_buf,
-                              uint8_t* rgb_buf,
+void FastConvertYUVToRGB32Row(const uint8* y_buf,
+                              const uint8* u_buf,
+                              const uint8* v_buf,
+                              uint8* rgb_buf,
                               int width) {
 #if defined(MOZILLA_MAY_SUPPORT_SSE) && defined(_M_IX86)
   if (mozilla::supports_sse()) {
     FastConvertYUVToRGB32Row_SSE(y_buf, u_buf, v_buf, rgb_buf, width);
     return;
   }
 #endif
 
   FastConvertYUVToRGB32Row_C(y_buf, u_buf, v_buf, rgb_buf, width, 1);
 }
 
-void ScaleYUVToRGB32Row(const uint8_t* y_buf,
-                        const uint8_t* u_buf,
-                        const uint8_t* v_buf,
-                        uint8_t* rgb_buf,
+void ScaleYUVToRGB32Row(const uint8* y_buf,
+                        const uint8* u_buf,
+                        const uint8* v_buf,
+                        uint8* rgb_buf,
                         int width,
                         int source_dx) {
 
 #if defined(MOZILLA_MAY_SUPPORT_SSE) && defined(_M_IX86)
   if (mozilla::supports_sse()) {
     ScaleYUVToRGB32Row_SSE(y_buf, u_buf, v_buf, rgb_buf, width, source_dx);
     return;
   }
 #endif
 
   ScaleYUVToRGB32Row_C(y_buf, u_buf, v_buf, rgb_buf, width, source_dx);
 }
 
-void LinearScaleYUVToRGB32Row(const uint8_t* y_buf,
-                              const uint8_t* u_buf,
-                              const uint8_t* v_buf,
-                              uint8_t* rgb_buf,
+void LinearScaleYUVToRGB32Row(const uint8* y_buf,
+                              const uint8* u_buf,
+                              const uint8* v_buf,
+                              uint8* rgb_buf,
                               int width,
                               int source_dx) {
 #if defined(MOZILLA_MAY_SUPPORT_SSE) && defined(_M_IX86)
   if (mozilla::supports_sse()) {
     LinearScaleYUVToRGB32Row_SSE(y_buf, u_buf, v_buf, rgb_buf, width,
                                  source_dx);
     return;
   }
--- a/gfx/ycbcr/yuv_row_win64.cpp
+++ b/gfx/ycbcr/yuv_row_win64.cpp
@@ -3,86 +3,86 @@
 // found in the LICENSE file.
 
 #include "yuv_row.h"
 
 extern "C" {
 
 // x64 compiler doesn't support MMX and inline assembler.  Use SSE2 intrinsics.
 
-#define kCoefficientsRgbU (reinterpret_cast<const uint8_t*>(kCoefficientsRgbY) + 2048)
-#define kCoefficientsRgbV (reinterpret_cast<const uint8_t*>(kCoefficientsRgbY) + 4096)
+#define kCoefficientsRgbU (reinterpret_cast<const uint8*>(kCoefficientsRgbY) + 2048)
+#define kCoefficientsRgbV (reinterpret_cast<const uint8*>(kCoefficientsRgbY) + 4096)
 
 #include <emmintrin.h>
 
-static void FastConvertYUVToRGB32Row_SSE2(const uint8_t* y_buf,
-                                          const uint8_t* u_buf,
-                                          const uint8_t* v_buf,
-                                          uint8_t* rgb_buf,
+static void FastConvertYUVToRGB32Row_SSE2(const uint8* y_buf,
+                                          const uint8* u_buf,
+                                          const uint8* v_buf,
+                                          uint8* rgb_buf,
                                           int width) {
   __m128i xmm0, xmmY1, xmmY2;
   __m128  xmmY;
 
   while (width >= 2) {
     xmm0 = _mm_adds_epi16(_mm_loadl_epi64(reinterpret_cast<const __m128i*>(kCoefficientsRgbU + 8 * *u_buf++)),
                           _mm_loadl_epi64(reinterpret_cast<const __m128i*>(kCoefficientsRgbV + 8 * *v_buf++)));
 
-    xmmY1 = _mm_loadl_epi64(reinterpret_cast<const __m128i*>(reinterpret_cast<const uint8_t*>(kCoefficientsRgbY) + 8 * *y_buf++));
+    xmmY1 = _mm_loadl_epi64(reinterpret_cast<const __m128i*>(reinterpret_cast<const uint8*>(kCoefficientsRgbY) + 8 * *y_buf++));
     xmmY1 = _mm_adds_epi16(xmmY1, xmm0);
 
-    xmmY2 = _mm_loadl_epi64(reinterpret_cast<const __m128i*>(reinterpret_cast<const uint8_t*>(kCoefficientsRgbY) + 8 * *y_buf++));
+    xmmY2 = _mm_loadl_epi64(reinterpret_cast<const __m128i*>(reinterpret_cast<const uint8*>(kCoefficientsRgbY) + 8 * *y_buf++));
     xmmY2 = _mm_adds_epi16(xmmY2, xmm0);
 
     xmmY = _mm_shuffle_ps(_mm_castsi128_ps(xmmY1), _mm_castsi128_ps(xmmY2),
                           0x44);
     xmmY1 = _mm_srai_epi16(_mm_castps_si128(xmmY), 6);
     xmmY1 = _mm_packus_epi16(xmmY1, xmmY1);
 
     _mm_storel_epi64(reinterpret_cast<__m128i*>(rgb_buf), xmmY1);
     rgb_buf += 8;
     width -= 2;
   }
 
   if (width) {
     xmm0 = _mm_adds_epi16(_mm_loadl_epi64(reinterpret_cast<const __m128i*>(kCoefficientsRgbU + 8 * *u_buf)),
                           _mm_loadl_epi64(reinterpret_cast<const __m128i*>(kCoefficientsRgbV + 8 * *v_buf)));
-    xmmY1 = _mm_loadl_epi64(reinterpret_cast<const __m128i*>(reinterpret_cast<const uint8_t*>(kCoefficientsRgbY) + 8 * *y_buf));
+    xmmY1 = _mm_loadl_epi64(reinterpret_cast<const __m128i*>(reinterpret_cast<const uint8*>(kCoefficientsRgbY) + 8 * *y_buf));
     xmmY1 = _mm_adds_epi16(xmmY1, xmm0);
     xmmY1 = _mm_srai_epi16(xmmY1, 6);
     xmmY1 = _mm_packus_epi16(xmmY1, xmmY1);
-    *reinterpret_cast<uint32_t*>(rgb_buf) = _mm_cvtsi128_si32(xmmY1);
+    *reinterpret_cast<uint32*>(rgb_buf) = _mm_cvtsi128_si32(xmmY1);
   }
 }
 
-static void ScaleYUVToRGB32Row_SSE2(const uint8_t* y_buf,
-                                    const uint8_t* u_buf,
-                                    const uint8_t* v_buf,
-                                    uint8_t* rgb_buf,
+static void ScaleYUVToRGB32Row_SSE2(const uint8* y_buf,
+                                    const uint8* u_buf,
+                                    const uint8* v_buf,
+                                    uint8* rgb_buf,
                                     int width,
                                     int source_dx) {
   __m128i xmm0, xmmY1, xmmY2;
   __m128  xmmY;
-  uint8_t u, v, y;
+  uint8 u, v, y;
   int x = 0;
 
   while (width >= 2) {
     u = u_buf[x >> 17];
     v = v_buf[x >> 17];
     y = y_buf[x >> 16];
     x += source_dx;
 
     xmm0 = _mm_adds_epi16(_mm_loadl_epi64(reinterpret_cast<const __m128i*>(kCoefficientsRgbU + 8 * u)),
                           _mm_loadl_epi64(reinterpret_cast<const __m128i*>(kCoefficientsRgbV + 8 * v)));
-    xmmY1 = _mm_loadl_epi64(reinterpret_cast<const __m128i*>(reinterpret_cast<const uint8_t*>(kCoefficientsRgbY) + 8 * y));
+    xmmY1 = _mm_loadl_epi64(reinterpret_cast<const __m128i*>(reinterpret_cast<const uint8*>(kCoefficientsRgbY) + 8 * y));
     xmmY1 = _mm_adds_epi16(xmmY1, xmm0);
 
     y = y_buf[x >> 16];
     x += source_dx;
 
-    xmmY2 = _mm_loadl_epi64(reinterpret_cast<const __m128i*>(reinterpret_cast<const uint8_t*>(kCoefficientsRgbY) + 8 * y));
+    xmmY2 = _mm_loadl_epi64(reinterpret_cast<const __m128i*>(reinterpret_cast<const uint8*>(kCoefficientsRgbY) + 8 * y));
     xmmY2 = _mm_adds_epi16(xmmY2, xmm0);
 
     xmmY = _mm_shuffle_ps(_mm_castsi128_ps(xmmY1), _mm_castsi128_ps(xmmY2),
                           0x44);
     xmmY1 = _mm_srai_epi16(_mm_castps_si128(xmmY), 6);
     xmmY1 = _mm_packus_epi16(xmmY1, xmmY1);
 
     _mm_storel_epi64(reinterpret_cast<__m128i*>(rgb_buf), xmmY1);
@@ -92,34 +92,34 @@ static void ScaleYUVToRGB32Row_SSE2(cons
 
   if (width) {
     u = u_buf[x >> 17];
     v = v_buf[x >> 17];
     y = y_buf[x >> 16];
 
     xmm0 = _mm_adds_epi16(_mm_loadl_epi64(reinterpret_cast<const __m128i*>(kCoefficientsRgbU + 8 * u)),
                           _mm_loadl_epi64(reinterpret_cast<const __m128i*>(kCoefficientsRgbV + 8 * v)));
-    xmmY1 = _mm_loadl_epi64(reinterpret_cast<const __m128i*>(reinterpret_cast<const uint8_t*>(kCoefficientsRgbY) + 8 * y));
+    xmmY1 = _mm_loadl_epi64(reinterpret_cast<const __m128i*>(reinterpret_cast<const uint8*>(kCoefficientsRgbY) + 8 * y));
     xmmY1 = _mm_adds_epi16(xmmY1, xmm0);
     xmmY1 = _mm_srai_epi16(xmmY1, 6);
     xmmY1 = _mm_packus_epi16(xmmY1, xmmY1);
-    *reinterpret_cast<uint32_t*>(rgb_buf) = _mm_cvtsi128_si32(xmmY1);
+    *reinterpret_cast<uint32*>(rgb_buf) = _mm_cvtsi128_si32(xmmY1);
   }
 }
 
-static void LinearScaleYUVToRGB32Row_SSE2(const uint8_t* y_buf,
-                                          const uint8_t* u_buf,
-                                          const uint8_t* v_buf,
-                                          uint8_t* rgb_buf,
+static void LinearScaleYUVToRGB32Row_SSE2(const uint8* y_buf,
+                                          const uint8* u_buf,
+                                          const uint8* v_buf,
+                                          uint8* rgb_buf,
                                           int width,
                                           int source_dx) {
   __m128i xmm0, xmmY1, xmmY2;
   __m128  xmmY;
-  uint8_t u0, u1, v0, v1, y0, y1;
-  uint32_t uv_frac, y_frac, u, v, y;
+  uint8 u0, u1, v0, v1, y0, y1;
+  uint32 uv_frac, y_frac, u, v, y;
   int x = 0;
 
   if (source_dx >= 0x20000) {
     x = 32768;
   }
 
   while(width >= 2) {
     u0 = u_buf[x >> 17];
@@ -132,26 +132,26 @@ static void LinearScaleYUVToRGB32Row_SSE
     y_frac = (x & 0xffff);
     u = (uv_frac * u1 + (uv_frac ^ 0x1fffe) * u0) >> 17;
     v = (uv_frac * v1 + (uv_frac ^ 0x1fffe) * v0) >> 17;
     y = (y_frac * y1 + (y_frac ^ 0xffff) * y0) >> 16;
     x += source_dx;
 
     xmm0 = _mm_adds_epi16(_mm_loadl_epi64(reinterpret_cast<const __m128i*>(kCoefficientsRgbU + 8 * u)),
                           _mm_loadl_epi64(reinterpret_cast<const __m128i*>(kCoefficientsRgbV + 8 * v)));
-    xmmY1 = _mm_loadl_epi64(reinterpret_cast<const __m128i*>(reinterpret_cast<const uint8_t*>(kCoefficientsRgbY) + 8 * y));
+    xmmY1 = _mm_loadl_epi64(reinterpret_cast<const __m128i*>(reinterpret_cast<const uint8*>(kCoefficientsRgbY) + 8 * y));
     xmmY1 = _mm_adds_epi16(xmmY1, xmm0);
 
     y0 = y_buf[x >> 16];
     y1 = y_buf[(x >> 16) + 1];
     y_frac = (x & 0xffff);
     y = (y_frac * y1 + (y_frac ^ 0xffff) * y0) >> 16;
     x += source_dx;
 
-    xmmY2 = _mm_loadl_epi64(reinterpret_cast<const __m128i*>(reinterpret_cast<const uint8_t*>(kCoefficientsRgbY) + 8 * y));
+    xmmY2 = _mm_loadl_epi64(reinterpret_cast<const __m128i*>(reinterpret_cast<const uint8*>(kCoefficientsRgbY) + 8 * y));
     xmmY2 = _mm_adds_epi16(xmmY2, xmm0);
 
     xmmY = _mm_shuffle_ps(_mm_castsi128_ps(xmmY1), _mm_castsi128_ps(xmmY2),
                           0x44);
     xmmY1 = _mm_srai_epi16(_mm_castps_si128(xmmY), 6);
     xmmY1 = _mm_packus_epi16(xmmY1, xmmY1);
 
     _mm_storel_epi64(reinterpret_cast<__m128i*>(rgb_buf), xmmY1);
@@ -161,45 +161,45 @@ static void LinearScaleYUVToRGB32Row_SSE
 
   if (width) {
     u = u_buf[x >> 17];
     v = v_buf[x >> 17];
     y = y_buf[x >> 16];
 
     xmm0 = _mm_adds_epi16(_mm_loadl_epi64(reinterpret_cast<const __m128i*>(kCoefficientsRgbU + 8 * u)),
                           _mm_loadl_epi64(reinterpret_cast<const __m128i*>(kCoefficientsRgbV + 8 * v)));
-    xmmY1 = _mm_loadl_epi64(reinterpret_cast<const __m128i*>(reinterpret_cast<const uint8_t*>(kCoefficientsRgbY) + 8 * y));
+    xmmY1 = _mm_loadl_epi64(reinterpret_cast<const __m128i*>(reinterpret_cast<const uint8*>(kCoefficientsRgbY) + 8 * y));
 
     xmmY1 = _mm_adds_epi16(xmmY1, xmm0);
     xmmY1 = _mm_srai_epi16(xmmY1, 6);
     xmmY1 = _mm_packus_epi16(xmmY1, xmmY1);
-    *reinterpret_cast<uint32_t*>(rgb_buf) = _mm_cvtsi128_si32(xmmY1);
+    *reinterpret_cast<uint32*>(rgb_buf) = _mm_cvtsi128_si32(xmmY1);
   }
 }
 
-void FastConvertYUVToRGB32Row(const uint8_t* y_buf,
-                              const uint8_t* u_buf,
-                              const uint8_t* v_buf,
-                              uint8_t* rgb_buf,
+void FastConvertYUVToRGB32Row(const uint8* y_buf,
+                              const uint8* u_buf,
+                              const uint8* v_buf,
+                              uint8* rgb_buf,
                               int width) {
   FastConvertYUVToRGB32Row_SSE2(y_buf, u_buf, v_buf, rgb_buf, width);
 }
 
-void ScaleYUVToRGB32Row(const uint8_t* y_buf,
-                        const uint8_t* u_buf,
-                        const uint8_t* v_buf,
-                        uint8_t* rgb_buf,
+void ScaleYUVToRGB32Row(const uint8* y_buf,
+                        const uint8* u_buf,
+                        const uint8* v_buf,
+                        uint8* rgb_buf,
                         int width,
                         int source_dx) {
   ScaleYUVToRGB32Row_SSE2(y_buf, u_buf, v_buf, rgb_buf, width, source_dx);
 }
 
-void LinearScaleYUVToRGB32Row(const uint8_t* y_buf,
-                              const uint8_t* u_buf,
-                              const uint8_t* v_buf,
-                              uint8_t* rgb_buf,
+void LinearScaleYUVToRGB32Row(const uint8* y_buf,
+                              const uint8* u_buf,
+                              const uint8* v_buf,
+                              uint8* rgb_buf,
                               int width,
                               int source_dx) {
   LinearScaleYUVToRGB32Row_SSE2(y_buf, u_buf, v_buf, rgb_buf, width,
                                 source_dx);
 }
 
 } // extern "C"
new file mode 100644
--- /dev/null
+++ b/media/libyuv/add_H444ToARGB.patch
@@ -0,0 +1,77 @@
+# HG changeset patch
+# User Randell Jesup <rjesup@jesup.org>
+# Date 1518630437 18000
+#      Wed Feb 14 12:47:17 2018 -0500
+# Node ID 6f6fe4a74ed3cc7c7eafef8f46e4d64e531ca7e6
+# Parent  ea38bd8e1f1113c77501d457508219f891f6e9a6
+[mq]: add_H444ToARGB.patch
+
+diff --git a/media/libyuv/libyuv/include/libyuv/convert_argb.h b/media/libyuv/libyuv/include/libyuv/convert_argb.h
+--- a/media/libyuv/libyuv/include/libyuv/convert_argb.h
++++ b/media/libyuv/libyuv/include/libyuv/convert_argb.h
+@@ -149,16 +149,28 @@ int I444ToARGB(const uint8_t* src_y,
+                int src_stride_u,
+                const uint8_t* src_v,
+                int src_stride_v,
+                uint8_t* dst_argb,
+                int dst_stride_argb,
+                int width,
+                int height);
+ 
++LIBYUV_API
++int H444ToARGB(const uint8_t* src_y,
++               int src_stride_y,
++               const uint8_t* src_u,
++               int src_stride_u,
++               const uint8_t* src_v,
++               int src_stride_v,
++               uint8_t* dst_argb,
++               int dst_stride_argb,
++               int width,
++               int height);
++
+ // Convert J444 to ARGB.
+ LIBYUV_API
+ int J444ToARGB(const uint8_t* src_y,
+                int src_stride_y,
+                const uint8_t* src_u,
+                int src_stride_u,
+                const uint8_t* src_v,
+                int src_stride_v,
+diff --git a/media/libyuv/libyuv/source/convert_argb.cc b/media/libyuv/libyuv/source/convert_argb.cc
+--- a/media/libyuv/libyuv/source/convert_argb.cc
++++ b/media/libyuv/libyuv/source/convert_argb.cc
+@@ -714,16 +714,33 @@ int I444ToARGB(const uint8_t* src_y,
+                int dst_stride_argb,
+                int width,
+                int height) {
+   return I444ToARGBMatrix(src_y, src_stride_y, src_u, src_stride_u, src_v,
+                           src_stride_v, dst_argb, dst_stride_argb,
+                           &kYuvI601Constants, width, height);
+ }
+ 
++// Convert H444 to ARGB.
++LIBYUV_API
++int H444ToARGB(const uint8_t* src_y,
++               int src_stride_y,
++               const uint8_t* src_u,
++               int src_stride_u,
++               const uint8_t* src_v,
++               int src_stride_v,
++               uint8_t* dst_argb,
++               int dst_stride_argb,
++               int width,
++               int height) {
++  return I444ToARGBMatrix(src_y, src_stride_y, src_u, src_stride_u, src_v,
++                          src_stride_v, dst_argb, dst_stride_argb,
++                          &kYuvH709Constants, width, height);
++}
++
+ // Convert I444 to ABGR.
+ LIBYUV_API
+ int I444ToABGR(const uint8_t* src_y,
+                int src_stride_y,
+                const uint8_t* src_u,
+                int src_stride_u,
+                const uint8_t* src_v,
+                int src_stride_v,
new file mode 100644
--- /dev/null
+++ b/media/libyuv/allow_disabling_asm_avx2.patch
@@ -0,0 +1,96 @@
+# HG changeset patch
+# User Randell Jesup <rjesup@jesup.org>
+# Parent  f380aa97b5a46b07574edbef19f75fc9ff0388a5
+
+diff --git a/media/libyuv/libyuv/include/libyuv/row.h b/media/libyuv/libyuv/include/libyuv/row.h
+--- a/media/libyuv/libyuv/include/libyuv/row.h
++++ b/media/libyuv/libyuv/include/libyuv/row.h
+@@ -57,17 +57,17 @@ extern "C" {
+ 
+ // Visual C 2012 required for AVX2.
+ #if defined(_M_IX86) && !defined(__clang__) && defined(_MSC_VER) && \
+     _MSC_VER >= 1700
+ #define VISUALC_HAS_AVX2 1
+ #endif  // VisualStudio >= 2012
+ 
+ // The following are available on all x86 platforms:
+-#if !defined(LIBYUV_DISABLE_X86) && \
++#if !defined(LIBYUV_DISABLE_AVX2) && !defined(LIBYUV_DISABLE_X86) && \
+     (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__))
+ // Conversions:
+ #define HAS_ABGRTOUVROW_SSSE3
+ #define HAS_ABGRTOYROW_SSSE3
+ #define HAS_ARGB1555TOARGBROW_SSE2
+ #define HAS_ARGB4444TOARGBROW_SSE2
+ #define HAS_ARGBEXTRACTALPHAROW_SSE2
+ #define HAS_ARGBSETROW_X86
+diff --git a/media/libyuv/libyuv/libyuv.gyp b/media/libyuv/libyuv/libyuv.gyp
+--- a/media/libyuv/libyuv/libyuv.gyp
++++ b/media/libyuv/libyuv/libyuv.gyp
+@@ -21,16 +21,18 @@
+     # Can be enabled if your jpeg has GYP support.
+     'libyuv_disable_jpeg%': 1,
+     # 'chromium_code' treats libyuv as internal and increases warning level.
+     'chromium_code': 1,
+     # clang compiler default variable usable by other apps that include libyuv.
+     'clang%': 0,
+     # Link-Time Optimizations.
+     'use_lto%': 0,
++    'yuv_disable_asm%': 0,
++    'yuv_disable_avx2%': 0,
+     'mips_msa%': 0,  # Default to msa off.
+     'build_neon': 0,
+     'build_msa': 0,
+     'conditions': [
+        ['(target_arch == "armv7" or target_arch == "armv7s" or \
+        (target_arch == "arm" and arm_version >= 7) or target_arch == "arm64")\
+        and (arm_neon == 1 or arm_neon_optional == 1)', {
+          'build_neon': 1,
+@@ -95,16 +97,29 @@
+             }],
+           ],
+         }],
+         ['build_msa != 0', {
+           'defines': [
+             'LIBYUV_MSA',
+           ],
+         }],
++        [ 'yuv_disable_asm != 0', {
++          'defines': [
++            # Enable the following 3 macros to turn off assembly for specified CPU.
++            'LIBYUV_DISABLE_X86',
++            'LIBYUV_DISABLE_NEON',
++            'LIBYUV_DISABLE_DSPR2',
++          ],
++        }],
++        [ 'yuv_disable_avx2 == 1', {
++          'defines': [
++            'LIBYUV_DISABLE_AVX2',
++          ]
++        }],
+         ['build_with_mozilla == 1', {
+           'defines': [
+             'HAVE_JPEG'
+           ],
+           'cflags_mozilla': [
+             '$(MOZ_JPEG_CFLAGS)',
+           ],
+         }],
+@@ -133,15 +148,17 @@
+           ],
+         }],
+       ], #conditions
+       'defines': [
+         # Enable the following 3 macros to turn off assembly for specified CPU.
+         # 'LIBYUV_DISABLE_X86',
+         # 'LIBYUV_DISABLE_NEON',
++        # This disables AVX2 (Haswell) support, overriding compiler checks
++        # 'LIBYUV_DISABLE_AVX2',
+         # Enable the following macro to build libyuv as a shared library (dll).
+         # 'LIBYUV_USING_SHARED_LIBRARY',
+         # TODO(fbarchard): Make these into gyp defines.
+       ],
+       'include_dirs': [
+         'include',
+         '.',
+       ],
new file mode 100644
--- /dev/null
+++ b/media/libyuv/bug_1491848.patch
@@ -0,0 +1,59 @@
+diff --git a/media/libyuv/libyuv/include/libyuv/compare_row.h b/media/libyuv/libyuv/include/libyuv/compare_row.h
+--- a/media/libyuv/libyuv/include/libyuv/compare_row.h
++++ b/media/libyuv/libyuv/include/libyuv/compare_row.h
+@@ -40,32 +40,26 @@ extern "C" {
+ 
+ // clang >= 3.4.0 required for AVX2.
+ #if defined(__clang__) && (defined(__x86_64__) || defined(__i386__))
+ #if (__clang_major__ > 3) || (__clang_major__ == 3 && (__clang_minor__ >= 4))
+ #define CLANG_HAS_AVX2 1
+ #endif  // clang >= 3.4
+ #endif  // __clang__
+ 
+-// The following are available for Visual C:
+-#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \
+-    (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2))
+-#define HAS_HASHDJB2_AVX2
+-#endif
+-
+ // The following are available for Visual C and GCC:
+ #if !defined(LIBYUV_DISABLE_X86) && \
+     (defined(__x86_64__) || defined(__i386__) || defined(_M_IX86))
+ #define HAS_HASHDJB2_SSE41
+ #define HAS_SUMSQUAREERROR_SSE2
+ #define HAS_HAMMINGDISTANCE_SSE42
+ #endif
+ 
+ // The following are available for Visual C and clangcl 32 bit:
+-#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \
++#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER) && \
+     (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2))
+ #define HAS_HASHDJB2_AVX2
+ #define HAS_SUMSQUAREERROR_AVX2
+ #endif
+ 
+ // The following are available for GCC and clangcl 64 bit:
+ #if !defined(LIBYUV_DISABLE_X86) && \
+     (defined(__x86_64__) || (defined(__i386__) && !defined(_MSC_VER)))
+diff --git a/media/libyuv/libyuv/include/libyuv/row.h b/media/libyuv/libyuv/include/libyuv/row.h
+--- a/media/libyuv/libyuv/include/libyuv/row.h
++++ b/media/libyuv/libyuv/include/libyuv/row.h
+@@ -227,17 +227,17 @@ extern "C" {
+ // TODO(fbarchard): fix build error on android_full_debug=1
+ // https://code.google.com/p/libyuv/issues/detail?id=517
+ #define HAS_I422ALPHATOARGBROW_AVX2
+ #endif
+ #endif
+ 
+ // The following are available for AVX2 Visual C and clangcl 32 bit:
+ // TODO(fbarchard): Port to gcc.
+-#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && \
++#if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER) && \
+     (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2))
+ #define HAS_ARGB1555TOARGBROW_AVX2
+ #define HAS_ARGB4444TOARGBROW_AVX2
+ #define HAS_ARGBTOARGB1555ROW_AVX2
+ #define HAS_ARGBTOARGB4444ROW_AVX2
+ #define HAS_ARGBTORGB565ROW_AVX2
+ #define HAS_J400TOARGBROW_AVX2
+ #define HAS_RGB565TOARGBROW_AVX2
--- a/media/libyuv/fix_build_errors.patch
+++ b/media/libyuv/fix_build_errors.patch
@@ -1,42 +1,51 @@
 # HG changeset patch
 # User Randell Jesup <rjesup@jesup.org>
 # Parent  260ab5c93e30a3d90f10ac30a15edf36fb0f03e9
 
 diff --git a/media/libyuv/libyuv/include/libyuv/row.h b/media/libyuv/libyuv/include/libyuv/row.h
 --- a/media/libyuv/libyuv/include/libyuv/row.h
 +++ b/media/libyuv/libyuv/include/libyuv/row.h
-@@ -174,19 +174,20 @@ extern "C" {
+@@ -154,18 +154,19 @@ extern "C" {
  #define HAS_SOBELROW_SSE2
  #define HAS_SOBELTOPLANEROW_SSE2
  #define HAS_SOBELXROW_SSE2
  #define HAS_SOBELXYROW_SSE2
  #define HAS_SOBELYROW_SSE2
  
  // The following functions fail on gcc/clang 32 bit with fpic and framepointer.
  // caveat: clangcl uses row_win.cc which works.
 -#if defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \
 -    defined(_MSC_VER)
 +#if !defined(MOZ_PROFILING) && \
 +  (defined(__x86_64__) || !defined(__pic__) || defined(__clang__) ||  \
 +   defined(_MSC_VER))
  // TODO(fbarchard): fix build error on android_full_debug=1
  // https://code.google.com/p/libyuv/issues/detail?id=517
  #define HAS_I422ALPHATOARGBROW_SSSE3
- #define HAS_I444ALPHATOARGBROW_SSSE3
  #endif
  #endif
  
  // The following are available on all x86 platforms, but
  // require VS2012, clang 3.4 or gcc 4.7.
-@@ -248,8 +249,9 @@ extern "C" {
+@@ -215,18 +216,19 @@ extern "C" {
+ // Effects:
+ #define HAS_ARGBADDROW_AVX2
+ #define HAS_ARGBATTENUATEROW_AVX2
+ #define HAS_ARGBMULTIPLYROW_AVX2
+ #define HAS_ARGBSUBTRACTROW_AVX2
  #define HAS_ARGBUNATTENUATEROW_AVX2
  #define HAS_BLENDPLANEROW_AVX2
-
+ 
 -#if defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \
 -    defined(_MSC_VER)
 +#if !defined(MOZ_PROFILING) && \
-+  (defined(__x86_64__) || !defined(__pic__) || defined(__clang__) || \
++  (defined(__x86_64__) || !defined(__pic__) || defined(__clang__) ||  \
 +   defined(_MSC_VER))
  // TODO(fbarchard): fix build error on android_full_debug=1
  // https://code.google.com/p/libyuv/issues/detail?id=517
  #define HAS_I422ALPHATOARGBROW_AVX2
+ #endif
+ #endif
+ 
+ // The following are available for AVX2 Visual C and clangcl 32 bit:
+ // TODO(fbarchard): Port to gcc.
--- a/media/libyuv/libyuv/.gn
+++ b/media/libyuv/libyuv/.gn
@@ -6,20 +6,16 @@
 # in the file PATENTS. All contributing project authors may
 # be found in the AUTHORS file in the root of the source tree.
 
 import("//build/dotfile_settings.gni")
 
 # The location of the build configuration file.
 buildconfig = "//build/config/BUILDCONFIG.gn"
 
-# The python interpreter to use by default. On Windows, this will look
-# for python3.exe and python3.bat.
-script_executable = "python3"
-
 # The secondary source root is a parallel directory tree where
 # GN build files are placed when they can not be placed directly
 # in the source tree, e.g. for third party source trees.
 secondary_source = "//build/secondary/"
 
 # These are the targets to check headers for by default. The files in targets
 # matching these patterns (see "gn help label_pattern" for format) will have
 # their includes checked for proper dependencies when you run either
@@ -28,13 +24,16 @@ check_targets = [ "//libyuv/*" ]
 
 # These are the list of GN files that run exec_script. This whitelist exists
 # to force additional review for new uses of exec_script, which is strongly
 # discouraged except for gypi_to_gn calls.
 exec_script_whitelist = build_dotfile_settings.exec_script_whitelist +
                         [ "//build_overrides/build.gni" ]
 
 default_args = {
-  mac_sdk_min = "10.12"
+  mac_sdk_min = "10.11"
 
-  # https://bugs.chromium.org/p/libyuv/issues/detail?id=826
-  ios_deployment_target = "10.0"
+  # LibYUV does not want to switch to C++14 yet.
+  use_cxx11 = true
+
+  # LibYUV relies on Chromium's Android test infrastructure.
+  use_cxx11_on_android = false
 }
--- a/media/libyuv/libyuv/.vpython
+++ b/media/libyuv/libyuv/.vpython
@@ -25,28 +25,8 @@
 python_version: "2.7"
 
 # Used by:
 #   third_party/catapult
 wheel: <
   name: "infra/python/wheels/psutil/${platform}_${py_python}_${py_abi}"
   version: "version:5.2.2"
 >
-
-# Used by:
-#   third_party/catapult
-wheel: <
-  name: "infra/python/wheels/pypiwin32/${vpython_platform}"
-  version: "version:219"
-  match_tag: <
-    platform: "win32"
-  >
-  match_tag: <
-    platform: "win_amd64"
-  >
->
-
-# Used by:
-#   build/android
-wheel: <
-  name: "infra/python/wheels/requests-py2_py3"
-  version: "version:2.13.0"
->
--- a/media/libyuv/libyuv/AUTHORS
+++ b/media/libyuv/libyuv/AUTHORS
@@ -1,6 +1,4 @@
 # Names should be added to this file like so:
 # Name or Organization <email address>
 
 Google Inc.
-
-Ivan Pavlotskiy <ivan.pavlotskiy@lgepartner.com>
--- a/media/libyuv/libyuv/Android.bp
+++ b/media/libyuv/libyuv/Android.bp
@@ -1,58 +1,29 @@
-package {
-    default_applicable_licenses: ["external_libyuv_files_license"],
-}
-
-// Added automatically by a large-scale-change
-//
-// large-scale-change included anything that looked like it might be a license
-// text as a license_text. e.g. LICENSE, NOTICE, COPYING etc.
-//
-// Please consider removing redundant or irrelevant files from 'license_text:'.
-// See: http://go/android-license-faq
-license {
-    name: "external_libyuv_files_license",
-    visibility: [":__subpackages__"],
-    license_kinds: [
-        "SPDX-license-identifier-BSD",
-    ],
-    license_text: [
-        "LICENSE",
-        "LICENSE_THIRD_PARTY",
-        "PATENTS",
-    ],
-}
-
 cc_library {
     name: "libyuv",
     vendor_available: true,
-    product_available: true,
-    host_supported: true,
     vndk: {
         enabled: true,
     },
 
     srcs: [
         "source/compare.cc",
         "source/compare_common.cc",
         "source/compare_gcc.cc",
-        "source/compare_msa.cc",
         "source/compare_neon.cc",
         "source/compare_neon64.cc",
+        "source/compare_msa.cc",
         "source/convert.cc",
         "source/convert_argb.cc",
         "source/convert_from.cc",
         "source/convert_from_argb.cc",
-        "source/convert_jpeg.cc",
         "source/convert_to_argb.cc",
         "source/convert_to_i420.cc",
         "source/cpu_id.cc",
-        "source/mjpeg_decoder.cc",
-        "source/mjpeg_validate.cc",
         "source/planar_functions.cc",
         "source/rotate.cc",
         "source/rotate_any.cc",
         "source/rotate_argb.cc",
         "source/rotate_common.cc",
         "source/rotate_gcc.cc",
         "source/rotate_msa.cc",
         "source/rotate_neon.cc",
@@ -66,80 +37,62 @@ cc_library {
         "source/scale.cc",
         "source/scale_any.cc",
         "source/scale_argb.cc",
         "source/scale_common.cc",
         "source/scale_gcc.cc",
         "source/scale_msa.cc",
         "source/scale_neon.cc",
         "source/scale_neon64.cc",
-        "source/scale_rgb.cc",
-        "source/scale_uv.cc",
         "source/video_common.cc",
+
+        "source/convert_jpeg.cc",
+        "source/mjpeg_decoder.cc",
+        "source/mjpeg_validate.cc",
     ],
 
     cflags: [
         "-Wall",
         "-Werror",
         "-Wno-unused-parameter",
         "-fexceptions",
         "-DHAVE_JPEG",
     ],
 
-    arch: {
-        arm: {
-            cflags: ["-mfpu=neon"],
-        },
-    },
-
     shared_libs: ["libjpeg"],
 
     export_include_dirs: ["include"],
-
-    apex_available: [
-        "//apex_available:platform",
-        "com.android.media.swcodec",
-    ],
-    min_sdk_version: "29",
 }
 
 // compatibilty static library until all uses of libyuv_static are replaced
 // with libyuv (b/37646797)
 cc_library_static {
     name: "libyuv_static",
-    vendor_available: true,
     whole_static_libs: ["libyuv"],
-    apex_available: [
-        "//apex_available:platform",
-        "com.android.media.swcodec",
-    ],
-    min_sdk_version: "29",
 }
 
 cc_test {
     name: "libyuv_unittest",
     static_libs: ["libyuv"],
     shared_libs: ["libjpeg"],
     cflags: ["-Wall", "-Werror"],
     srcs: [
+        "unit_test/unit_test.cc",
         "unit_test/basictypes_test.cc",
         "unit_test/color_test.cc",
         "unit_test/compare_test.cc",
         "unit_test/convert_test.cc",
         "unit_test/cpu_test.cc",
         "unit_test/cpu_thread_test.cc",
         "unit_test/math_test.cc",
         "unit_test/planar_test.cc",
         "unit_test/rotate_argb_test.cc",
         "unit_test/rotate_test.cc",
         "unit_test/scale_argb_test.cc",
-        "unit_test/scale_rgb_test.cc",
         "unit_test/scale_test.cc",
-        "unit_test/scale_uv_test.cc",
-        "unit_test/unit_test.cc",
         "unit_test/video_common_test.cc",
     ],
 }
 
 cc_test {
     name: "compare",
     gtest: false,
     srcs: [
@@ -153,45 +106,27 @@ cc_test {
     gtest: false,
     srcs: [
         "util/cpuid.c",
     ],
     static_libs: ["libyuv"],
 }
 
 cc_test {
-    name: "i444tonv12_eg",
-    gtest: false,
-    srcs: [
-        "util/i444tonv12_eg.cc",
-    ],
-    static_libs: ["libyuv"],
-}
-
-cc_test {
     name: "psnr",
     gtest: false,
     srcs: [
         "util/psnr_main.cc",
         "util/psnr.cc",
         "util/ssim.cc",
     ],
     static_libs: ["libyuv"],
 }
 
 cc_test {
-    name: "yuvconstants",
-    gtest: false,
-    srcs: [
-        "util/yuvconstants.c",
-    ],
-    static_libs: ["libyuv"],
-}
-
-cc_test {
     name: "yuvconvert",
     gtest: false,
     srcs: [
         "util/yuvconvert.cc",
     ],
     static_libs: ["libyuv"],
     shared_libs: ["libjpeg"],
 }
--- a/media/libyuv/libyuv/Android.mk
+++ b/media/libyuv/libyuv/Android.mk
@@ -7,52 +7,46 @@ LOCAL_CPP_EXTENSION := .cc
 
 LOCAL_SRC_FILES := \
     source/compare.cc           \
     source/compare_common.cc    \
     source/compare_gcc.cc       \
     source/compare_msa.cc       \
     source/compare_neon.cc      \
     source/compare_neon64.cc    \
-    source/compare_win.cc       \
     source/convert.cc           \
     source/convert_argb.cc      \
     source/convert_from.cc      \
     source/convert_from_argb.cc \
     source/convert_to_argb.cc   \
     source/convert_to_i420.cc   \
     source/cpu_id.cc            \
     source/planar_functions.cc  \
     source/rotate.cc            \
     source/rotate_any.cc        \
     source/rotate_argb.cc       \
     source/rotate_common.cc     \
     source/rotate_gcc.cc        \
     source/rotate_msa.cc        \
     source/rotate_neon.cc       \
     source/rotate_neon64.cc     \
-    source/rotate_win.cc        \
     source/row_any.cc           \
     source/row_common.cc        \
     source/row_gcc.cc           \
     source/row_msa.cc           \
     source/row_neon.cc          \
     source/row_neon64.cc        \
-    source/row_win.cc           \
     source/scale.cc             \
     source/scale_any.cc         \
     source/scale_argb.cc        \
     source/scale_common.cc      \
     source/scale_gcc.cc         \
     source/scale_msa.cc         \
     source/scale_neon.cc        \
     source/scale_neon64.cc      \
-    source/scale_rgb.cc         \
-    source/scale_uv.cc          \
-    source/scale_win.cc         \
     source/video_common.cc
 
 common_CFLAGS := -Wall -fexceptions
 ifneq ($(LIBYUV_DISABLE_JPEG), "yes")
 LOCAL_SRC_FILES += \
     source/convert_jpeg.cc      \
     source/mjpeg_decoder.cc     \
     source/mjpeg_validate.cc
@@ -82,27 +76,25 @@ include $(BUILD_SHARED_LIBRARY)
 
 include $(CLEAR_VARS)
 LOCAL_STATIC_LIBRARIES := libyuv_static
 LOCAL_SHARED_LIBRARIES := libjpeg
 LOCAL_MODULE_TAGS := tests
 LOCAL_CPP_EXTENSION := .cc
 LOCAL_C_INCLUDES += $(LOCAL_PATH)/include
 LOCAL_SRC_FILES := \
+    unit_test/unit_test.cc        \
     unit_test/basictypes_test.cc  \
     unit_test/color_test.cc       \
     unit_test/compare_test.cc     \
     unit_test/convert_test.cc     \
     unit_test/cpu_test.cc         \
     unit_test/cpu_thread_test.cc  \
     unit_test/math_test.cc        \
     unit_test/planar_test.cc      \
     unit_test/rotate_argb_test.cc \
     unit_test/rotate_test.cc      \
     unit_test/scale_argb_test.cc  \
-    unit_test/scale_rgb_test.cc   \
     unit_test/scale_test.cc       \
-    unit_test/scale_uv_test.cc    \
-    unit_test/unit_test.cc        \
     unit_test/video_common_test.cc
 
 LOCAL_MODULE := libyuv_unittest
 include $(BUILD_NATIVE_TEST)
--- a/media/libyuv/libyuv/BUILD.gn
+++ b/media/libyuv/libyuv/BUILD.gn
@@ -1,80 +1,80 @@
 # Copyright 2014 The LibYuv Project Authors. All rights reserved.
 #
 # Use of this source code is governed by a BSD-style license
 # that can be found in the LICENSE file in the root of the source
 # tree. An additional intellectual property rights grant can be found
 # in the file PATENTS. All contributing project authors may
 # be found in the AUTHORS file in the root of the source tree.
 
+import("libyuv.gni")
 import("//testing/test.gni")
-import("libyuv.gni")
 
 declare_args() {
-  # Set to false to disable building with absl flags.
-  libyuv_use_absl_flags = true
+  # Set to false to disable building with gflags.
+  libyuv_use_gflags = true
 
   # When building a shared library using a target in WebRTC or
   # Chromium projects that depends on libyuv, setting this flag
   # to true makes libyuv symbols visible inside that library.
   libyuv_symbols_visible = false
 }
 
 config("libyuv_config") {
   include_dirs = [ "include" ]
-  if (is_android && current_cpu == "arm64") {
+  if (is_android && target_cpu == "arm64") {
     ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker64" ]
   }
-  if (is_android && current_cpu != "arm64") {
+  if (is_android && target_cpu != "arm64") {
     ldflags = [ "-Wl,--dynamic-linker,/system/bin/linker" ]
   }
-
-  if (!libyuv_use_neon) {
-    defines = [ "LIBYUV_DISABLE_NEON" ]
-  }
 }
 
 # This target is built when no specific target is specified on the command line.
 group("default") {
   testonly = true
-  deps = [ ":libyuv" ]
+  deps = [
+    ":libyuv",
+  ]
   if (libyuv_include_tests) {
     deps += [
       ":compare",
       ":cpuid",
-      ":i444tonv12_eg",
       ":libyuv_unittest",
       ":psnr",
-      ":yuvconstants",
       ":yuvconvert",
     ]
   }
 }
 
 group("libyuv") {
   all_dependent_configs = [ ":libyuv_config" ]
   deps = []
 
   if (is_win && target_cpu == "x64") {
     # Compile with clang in order to get inline assembly
-    public_deps = [ ":libyuv_internal(//build/toolchain/win:win_clang_x64)" ]
+    public_deps = [
+      ":libyuv_internal(//build/toolchain/win:win_clang_x64)",
+    ]
   } else {
-    public_deps = [ ":libyuv_internal" ]
+    public_deps = [
+      ":libyuv_internal",
+    ]
   }
 
   if (libyuv_use_neon) {
     deps += [ ":libyuv_neon" ]
   }
 
   if (libyuv_use_msa) {
     deps += [ ":libyuv_msa" ]
   }
 
-  if (!is_ios && !libyuv_disable_jpeg) {
+  if (!is_ios) {
     # Make sure that clients of libyuv link with libjpeg. This can't go in
     # libyuv_internal because in Windows x64 builds that will generate a clang
     # build of libjpeg, and we don't want two copies.
     deps += [ "//third_party:jpeg" ]
   }
 }
 
 static_library("libyuv_internal") {
@@ -93,19 +93,17 @@ static_library("libyuv_internal") {
     "include/libyuv/mjpeg_decoder.h",
     "include/libyuv/planar_functions.h",
     "include/libyuv/rotate.h",
     "include/libyuv/rotate_argb.h",
     "include/libyuv/rotate_row.h",
     "include/libyuv/row.h",
     "include/libyuv/scale.h",
     "include/libyuv/scale_argb.h",
-    "include/libyuv/scale_rgb.h",
     "include/libyuv/scale_row.h",
-    "include/libyuv/scale_uv.h",
     "include/libyuv/version.h",
     "include/libyuv/video_common.h",
 
     # Source Files
     "source/compare.cc",
     "source/compare_common.cc",
     "source/compare_gcc.cc",
     "source/compare_win.cc",
@@ -130,32 +128,30 @@ static_library("libyuv_internal") {
     "source/row_common.cc",
     "source/row_gcc.cc",
     "source/row_win.cc",
     "source/scale.cc",
     "source/scale_any.cc",
     "source/scale_argb.cc",
     "source/scale_common.cc",
     "source/scale_gcc.cc",
-    "source/scale_rgb.cc",
-    "source/scale_uv.cc",
     "source/scale_win.cc",
     "source/video_common.cc",
   ]
 
   configs += [ ":libyuv_config" ]
   defines = []
   deps = []
 
   if (libyuv_symbols_visible) {
     configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
     configs += [ "//build/config/gcc:symbol_visibility_default" ]
   }
 
-  if (!is_ios && !libyuv_disable_jpeg) {
+  if (!is_ios) {
     defines += [ "HAVE_JPEG" ]
 
     # Needed to pull in libjpeg headers. Can't add //third_party:jpeg to deps
     # because in Windows x64 build it will get compiled with clang.
     deps += [ "//third_party:jpeg_includes" ]
   }
 
   # Always enable optimization for Release and NaCl builds (to workaround
@@ -187,48 +183,52 @@ if (libyuv_use_neon) {
       "source/rotate_neon.cc",
       "source/rotate_neon64.cc",
       "source/row_neon.cc",
       "source/row_neon64.cc",
       "source/scale_neon.cc",
       "source/scale_neon64.cc",
     ]
 
-    deps = [ ":libyuv_internal" ]
+    deps = [
+      ":libyuv_internal",
+    ]
 
     public_configs = [ ":libyuv_config" ]
 
     # Always enable optimization for Release and NaCl builds (to workaround
     # crbug.com/538243).
     if (!is_debug) {
       configs -= [ "//build/config/compiler:default_optimization" ]
 
       # Enable optimize for speed (-O2) over size (-Os).
       # TODO(fbarchard): Consider optimize_speed which is O3.
       configs += [ "//build/config/compiler:optimize_max" ]
     }
 
-    if (current_cpu != "arm64") {
+    if (target_cpu != "arm64") {
       configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
       cflags = [ "-mfpu=neon" ]
     }
   }
 }
 
 if (libyuv_use_msa) {
   static_library("libyuv_msa") {
     sources = [
       # MSA Source Files
       "source/compare_msa.cc",
       "source/rotate_msa.cc",
       "source/row_msa.cc",
       "source/scale_msa.cc",
     ]
 
-    deps = [ ":libyuv_internal" ]
+    deps = [
+      ":libyuv_internal",
+    ]
 
     public_configs = [ ":libyuv_config" ]
   }
 }
 
 if (libyuv_include_tests) {
   config("libyuv_unittest_warnings_config") {
     if (!is_win) {
@@ -248,55 +248,54 @@ if (libyuv_include_tests) {
   config("libyuv_unittest_config") {
     defines = [ "GTEST_RELATIVE_PATH" ]
   }
 
   test("libyuv_unittest") {
     testonly = true
 
     sources = [
+      # sources
+      # headers
       "unit_test/basictypes_test.cc",
       "unit_test/color_test.cc",
       "unit_test/compare_test.cc",
       "unit_test/convert_test.cc",
       "unit_test/cpu_test.cc",
       "unit_test/cpu_thread_test.cc",
       "unit_test/math_test.cc",
       "unit_test/planar_test.cc",
       "unit_test/rotate_argb_test.cc",
       "unit_test/rotate_test.cc",
       "unit_test/scale_argb_test.cc",
-      "unit_test/scale_rgb_test.cc",
       "unit_test/scale_test.cc",
-      "unit_test/scale_uv_test.cc",
       "unit_test/unit_test.cc",
       "unit_test/unit_test.h",
       "unit_test/video_common_test.cc",
     ]
 
     deps = [
       ":libyuv",
       "//testing/gtest",
     ]
 
     defines = []
-    if (libyuv_use_absl_flags) {
-      defines += [ "LIBYUV_USE_ABSL_FLAGS" ]
-      deps += [
-        "//third_party/abseil-cpp/absl/flags:flag",
-        "//third_party/abseil-cpp/absl/flags:parse",
-      ]
+    if (libyuv_use_gflags) {
+      defines += [ "LIBYUV_USE_GFLAGS" ]
+      deps += [ "//third_party/gflags" ]
     }
 
     configs += [ ":libyuv_unittest_warnings_config" ]
 
-    public_deps = [ "//testing/gtest" ]
+    public_deps = [
+      "//testing/gtest",
+    ]
     public_configs = [ ":libyuv_unittest_config" ]
 
-    if (is_linux || is_chromeos) {
+    if (is_linux) {
       cflags = [ "-fexceptions" ]
     }
     if (is_ios) {
       configs -= [ "//build/config/compiler:default_symbols" ]
       configs += [ "//build/config/compiler:symbols" ]
       cflags = [ "-Wno-sometimes-uninitialized" ]
     }
     if (!is_ios && !libyuv_disable_jpeg) {
@@ -323,66 +322,59 @@ if (libyuv_include_tests) {
     ]
   }
 
   executable("compare") {
     sources = [
       # sources
       "util/compare.cc",
     ]
-    deps = [ ":libyuv" ]
-    if (is_linux || is_chromeos) {
+    deps = [
+      ":libyuv",
+      "//build/config:exe_and_shlib_deps",  # for asan on llvm libc++
+    ]
+    if (is_linux) {
       cflags = [ "-fexceptions" ]
     }
   }
 
   executable("yuvconvert") {
     sources = [
       # sources
       "util/yuvconvert.cc",
     ]
-    deps = [ ":libyuv" ]
-    if (is_linux || is_chromeos) {
-      cflags = [ "-fexceptions" ]
-    }
-  }
-
-  executable("yuvconstants") {
-    sources = [
-      # sources
-      "util/yuvconstants.c",
+    deps = [
+      ":libyuv",
+      "//build/config:exe_and_shlib_deps",  # for new[] on llvm libc++
     ]
-    deps = [ ":libyuv" ]
-    if (is_linux || is_chromeos) {
+    if (is_linux) {
       cflags = [ "-fexceptions" ]
     }
   }
 
   executable("psnr") {
     sources = [
       # sources
       "util/psnr.cc",
       "util/psnr_main.cc",
       "util/ssim.cc",
     ]
-    deps = [ ":libyuv" ]
+    deps = [
+      ":libyuv",
+      "//build/config:exe_and_shlib_deps",  # for new[] on llvm libc++
+    ]
 
     if (!is_ios && !libyuv_disable_jpeg) {
       defines = [ "HAVE_JPEG" ]
     }
   }
 
-  executable("i444tonv12_eg") {
-    sources = [
-      # sources
-      "util/i444tonv12_eg.cc",
-    ]
-    deps = [ ":libyuv" ]
-  }
-
   executable("cpuid") {
     sources = [
       # sources
       "util/cpuid.c",
     ]
-    deps = [ ":libyuv" ]
+    deps = [
+      ":libyuv",
+      "//build/config:exe_and_shlib_deps",  # for asan on llvm libc++
+    ]
   }
 }
--- a/media/libyuv/libyuv/CMakeLists.txt
+++ b/media/libyuv/libyuv/CMakeLists.txt
@@ -54,32 +54,30 @@ if(TEST)
       include_directories(${GTEST_SRC_DIR}/include)
       set(GTEST_LIBRARY gtest)
     else()
       message(FATAL_ERROR "TEST is set but unable to find gtest library")
     endif()
   endif()
 
   add_executable(libyuv_unittest ${ly_unittest_sources})
-  target_link_libraries(libyuv_unittest ${ly_lib_name} ${GTEST_LIBRARY})
-  find_library(PTHREAD_LIBRARY pthread)
-  if(NOT PTHREAD_LIBRARY STREQUAL "PTHREAD_LIBRARY-NOTFOUND")
-    target_link_libraries(libyuv_unittest pthread)
-  endif()
+  target_link_libraries(libyuv_unittest ${ly_lib_name} ${GTEST_LIBRARY} pthread)
   if (JPEG_FOUND)
     target_link_libraries(libyuv_unittest ${JPEG_LIBRARY})
   endif()
 
   if(NACL AND NACL_LIBC STREQUAL "newlib")
     target_link_libraries(libyuv_unittest glibc-compat)
   endif()
+
+  target_link_libraries(libyuv_unittest gflags)
 endif()
 
 
 # install the conversion tool, .so, .a, and all the header files
 INSTALL ( PROGRAMS ${CMAKE_BINARY_DIR}/yuvconvert			DESTINATION bin )
 INSTALL ( TARGETS ${ly_lib_static}						DESTINATION lib )
-INSTALL ( TARGETS ${ly_lib_shared} LIBRARY				DESTINATION lib RUNTIME DESTINATION bin )
+INSTALL ( TARGETS ${ly_lib_shared} LIBRARY				DESTINATION lib )
 INSTALL ( DIRECTORY ${PROJECT_SOURCE_DIR}/include/		DESTINATION include )
 
 # create the .deb and .rpm packages using cpack
 INCLUDE ( CM_linux_packages.cmake )
 
--- a/media/libyuv/libyuv/DEPS
+++ b/media/libyuv/libyuv/DEPS
@@ -1,2244 +1,266 @@
-gclient_gn_args_file = 'src/build/config/gclient_args.gni'
-gclient_gn_args = [
-  'generate_location_tags',
-]
-
 vars = {
   'chromium_git': 'https://chromium.googlesource.com',
-  'chromium_revision': '829c6df33dce1085a61d8fd44209fc84bbf9a6a7',
-  'gn_version': 'git_revision:6f13aaac55a977e1948910942675c69f2b4f7a94',
-
-  # Keep the Chromium default of generating location tags.
-  'generate_location_tags': True,
+  'chromium_revision': '80f0c5570649c35a869429b2ab8c381a0a7246cb',
+  'swarming_revision': '88229872dd17e71658fe96763feaa77915d8cbd6',
+  # Three lines of non-changing comments so that
+  # the commit queue can handle CLs rolling lss
+  # and whatever else without interference from each other.
+  'lss_revision': 'e6527b0cd469e3ff5764785dadcb39bf7d787154',
+  # Three lines of non-changing comments so that
+  # the commit queue can handle CLs rolling catapult
+  # and whatever else without interference from each other.
+  'catapult_revision': 'e7298f36f7912f2caa122086cfbe71734d04b73f',
 }
 
 deps = {
   'src/build':
-    Var('chromium_git') + '/chromium/src/build' + '@' + 'dcea3443035f48d58193788e0bc56daca4e5db33',
+    Var('chromium_git') + '/chromium/src/build' + '@' + '39738e75b27f39d4c0030a0b11d5d2ddd34715f7',
   'src/buildtools':
-    Var('chromium_git') + '/chromium/src/buildtools' + '@' + '075dd7e22837a69189003e4fa84499acf63188cf',
+    Var('chromium_git') + '/chromium/buildtools.git' + '@' + 'a09e064635a49f08e585e3b173d5fbc3dd3f485e',
   'src/testing':
-    Var('chromium_git') + '/chromium/src/testing' + '@' + 'f4e42be13265ec304b0f3085eee2b15f30f44077',
+    Var('chromium_git') + '/chromium/src/testing' + '@' + '5f7e36cad6434fd3d65674af96653a23ecc9f694',
   'src/third_party':
-    Var('chromium_git') + '/chromium/src/third_party' + '@' + '42c249feeb71bc0cd184849f0509aefef599343d',
-
-  'src/buildtools/linux64': {
-    'packages': [
-      {
-        'package': 'gn/gn/linux-amd64',
-        'version': Var('gn_version'),
-      }
-    ],
-    'dep_type': 'cipd',
-    'condition': 'checkout_linux',
-  },
-  'src/buildtools/mac': {
-    'packages': [
-      {
-        'package': 'gn/gn/mac-amd64',
-        'version': Var('gn_version'),
-      }
-    ],
-    'dep_type': 'cipd',
-    'condition': 'checkout_mac',
-  },
-  'src/buildtools/win': {
-    'packages': [
-      {
-        'package': 'gn/gn/windows-amd64',
-        'version': Var('gn_version'),
-      }
-    ],
-    'dep_type': 'cipd',
-    'condition': 'checkout_win',
-  },
-
-  'src/buildtools/clang_format/script':
-    Var('chromium_git') + '/external/github.com/llvm/llvm-project/clang/tools/clang-format.git' + '@' + '99876cacf78329e5f99c244dbe42ccd1654517a0',
-  'src/buildtools/third_party/libc++/trunk':
-    Var('chromium_git') + '/external/github.com/llvm/llvm-project/libcxx.git' + '@' + '79a2e924d96e2fc1e4b937c42efd08898fa472d7',
-  'src/buildtools/third_party/libc++abi/trunk':
-    Var('chromium_git') + '/external/github.com/llvm/llvm-project/libcxxabi.git' + '@' + '665b74f7d1b3bb295cd6ba7d8fcec1acd3d2ac84',
-  'src/buildtools/third_party/libunwind/trunk':
-    Var('chromium_git') + '/external/github.com/llvm/llvm-project/libunwind.git' + '@' + 'f51a154281bdfe746c46c07cd4fb05be97f9441d',
-
+    Var('chromium_git') + '/chromium/src/third_party' + '@' + '2c0ced3ddbf84ce1c0759b277d9538da42f23650',
   'src/third_party/catapult':
-    Var('chromium_git') + '/catapult.git' + '@' + '75423c310eb303d28978be892fcf7b9c2c824909',
+    Var('chromium_git') + '/catapult.git' + '@' + Var('catapult_revision'),
   'src/third_party/colorama/src':
     Var('chromium_git') + '/external/colorama.git' + '@' + '799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8',
-  'src/third_party/depot_tools':
-    Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '2ffa1bde797a8127c0f72908d0bd74051fd65d0d',
-  'src/third_party/freetype/src':
-    Var('chromium_git') + '/chromium/src/third_party/freetype2.git' + '@' + 'cff026d41599945498044d2f4dcc0e610ffb6929',
   'src/third_party/googletest/src':
-    Var('chromium_git') + '/external/github.com/google/googletest.git' + '@' + 'e2f3978937c0244508135f126e2617a7734a68be',
-  'src/third_party/harfbuzz-ng/src':
-    Var('chromium_git') + '/external/github.com/harfbuzz/harfbuzz.git' + '@' + '64b29dbd5994a511acee69cb9b45ad650ef88359',
+    Var('chromium_git') + '/external/github.com/google/googletest.git' + '@' + '0062e4869f07a3ef235703ddf63af604b712446c',
   'src/third_party/libjpeg_turbo':
-    Var('chromium_git') + '/chromium/deps/libjpeg_turbo.git' + '@' + '02959c3ee17abacfd1339ec22ea93301292ffd56',
-  'src/third_party/nasm':
-    Var('chromium_git') + '/chromium/deps/nasm.git' + '@' + '9215e8e1d0fe474ffd3e16c1a07a0f97089e6224',
+    Var('chromium_git') + '/chromium/deps/libjpeg_turbo.git' + '@' + 'a1750dbc79a8792dde3d3f7d7d8ac28ba01ac9dd',
+  'src/third_party/yasm/source/patched-yasm':
+    Var('chromium_git') + '/chromium/deps/yasm/patched-yasm.git' + '@' + 'b98114e18d8b9b84586b10d24353ab8616d4c5fc',
   'src/tools':
-    Var('chromium_git') + '/chromium/src/tools' + '@' + '198dc879529652b39ba6e223bcc0bcad5f1facd6',
+    Var('chromium_git') + '/chromium/src/tools' + '@' + '6202b67fc46a9984097caf237e12e3b8f7a9f7da',
+  'src/tools/gyp':
+    Var('chromium_git') + '/external/gyp.git' + '@' + 'd61a9397e668fa9843c4aa7da9e79460fe590bfb',
+   'src/tools/swarming_client':
+     Var('chromium_git') + '/infra/luci/client-py.git' + '@' +  Var('swarming_revision'),
 
   # libyuv-only dependencies (not present in Chromium).
+  'src/third_party/gflags':
+    Var('chromium_git') + '/external/webrtc/deps/third_party/gflags' + '@' + '892576179b45861b53e04a112996a738309cf364',
+  'src/third_party/gflags/src':
+    Var('chromium_git') + '/external/github.com/gflags/gflags' + '@' + '03bebcb065c83beff83d50ae025a55a4bf94dfca',
   'src/third_party/gtest-parallel':
     Var('chromium_git') + '/external/webrtc/deps/third_party/gtest-parallel' + '@' + '1dad0e9f6d82ff994130b529d7d814b40eb32b0e',
 
   'src/third_party/lss': {
-    'url': Var('chromium_git') + '/linux-syscall-support.git' + '@' + '92a65a8f5d705d1928874420c8d0d15bde8c89e5',
+    'url': Var('chromium_git') + '/linux-syscall-support.git' + '@' + Var('lss_revision'),
     'condition': 'checkout_android or checkout_linux',
   },
 
   # Android deps:
-  'src/third_party/accessibility_test_framework': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/accessibility-test-framework',
-              'version': 'b5ec1e56e58e56bc1a0c77d43111c37f9b512c8a',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
   'src/third_party/auto/src': {
-    'url': Var('chromium_git') + '/external/github.com/google/auto.git' + '@' + 'fe67d853d6356943dc79541c892ab6d3e6a7b61a',
-    'condition': 'checkout_android',
-  },
-  'src/third_party/boringssl/src':
-    'https://boringssl.googlesource.com/boringssl.git' + '@' + '3a667d10e94186fd503966f5638e134fe9fb4080',
-  'src/base': {
-    'url': Var('chromium_git') + '/chromium/src/base' + '@' + 'e9e639622449a893a1b5e32781d072cec08ead72',
+    'url': Var('chromium_git') + '/external/github.com/google/auto.git' + '@' + '8a81a858ae7b78a1aef71ac3905fade0bbd64e82',
     'condition': 'checkout_android',
   },
-  'src/third_party/bazel': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/bazel',
-              'version': 'VjMsf48QUWw8n7XtJP2AuSjIGmbQeYdWdwyxVvIRLmAC',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/bouncycastle': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/bouncycastle',
-              'version': 'c078e87552ba26e776566fdaf0f22cd8712743d0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_ndk': {
-    'url': Var('chromium_git') + '/android_ndk.git' + '@' + '401019bf85744311b26c88ced255cd53401af8b7',
+  'src/third_party/auto/src': {
+    'url': Var('chromium_git') + '/external/github.com/google/auto.git' + '@' + '8a81a858ae7b78a1aef71ac3905fade0bbd64e82',
     'condition': 'checkout_android',
   },
-  'src/third_party/androidx': {
-    'packages': [
-      {
-          'package': 'chromium/third_party/androidx',
-          'version': '6d8ij5pzYh29WWjPbdbAWFBJSA1nUgkWf2p6wCVZKIsC',
-      },
-    ],
+  'src/base': {
+    'url': Var('chromium_git') + '/chromium/src/base' + '@' + 'ac3d2b81181b085a9952cb83dba748420eefe691',
     'condition': 'checkout_android',
-    'dep_type': 'cipd',
-  },
-  'src/third_party/android_support_test_runner': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_support_test_runner',
-              'version': '96d4bf848cd210fdcbca6bcc8c1b4b39cbd93141',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
   },
-  'src/third_party/android_sdk/public': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_sdk/public/build-tools/31.0.0',
-              'version': 'tRoD45SCi7UleQqSV7MrMQO1_e5P8ysphkCcj6z_cCQC',
-          },
-          {
-              'package': 'chromium/third_party/android_sdk/public/emulator',
-              'version': 'gMHhUuoQRKfxr-MBn3fNNXZtkAVXtOwMwT7kfx8jkIgC',
-          },
-          {
-              'package': 'chromium/third_party/android_sdk/public/extras',
-              'version': 'ppQ4TnqDvBHQ3lXx5KPq97egzF5X2FFyOrVHkGmiTMQC',
-          },
-          {
-              'package': 'chromium/third_party/android_sdk/public/patcher',
-              'version': 'I6FNMhrXlpB-E1lOhMlvld7xt9lBVNOO83KIluXDyA0C',
-          },
-          {
-              'package': 'chromium/third_party/android_sdk/public/platform-tools',
-              'version': 'g7n_-r6yJd_SGRklujGB1wEt8iyr77FZTUJVS9w6O34C',
-          },
-          {
-              'package': 'chromium/third_party/android_sdk/public/platforms/android-31',
-              'version': 'lL3IGexKjYlwjO_1Ga-xwxgwbE_w-lmi2Zi1uOlWUIAC',
-          },
-          {
-              'package': 'chromium/third_party/android_sdk/public/sources/android-31',
-              'version': '_a_BcnANjPYw5mSKlNHa7GFY8yc1kdqj2rmQgac7yUcC',
-          },
-          {
-              'package': 'chromium/third_party/android_sdk/public/cmdline-tools',
-              'version': 'Ez2NWws2SJYCF6qw2O-mSCqK6424l3ZdSTpppLyVR_cC',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
+  'src/third_party/android_ndk': {
+    'url': Var('chromium_git') + '/android_ndk.git' + '@' + 'e951c37287c7d8cd915bf8d4149fd4a06d808b55',
+    'condition': 'checkout_android',
   },
-  'src/tools/clang/dsymutil': {
-    'packages': [
-      {
-        'package': 'chromium/llvm-build-tools/dsymutil',
-        'version': 'OWlhXkmj18li3yhJk59Kmjbc5KdgLh56TwCd1qBdzlIC',
-      }
-    ],
-    'condition': 'checkout_mac',
-    'dep_type': 'cipd',
-  },
-  'src/third_party/android_build_tools/aapt2': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_build_tools/aapt2',
-              'version': 'version:3.6.0-alpha03-5516695-cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/byte_buddy': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/byte_buddy',
-              'version': 'c9b53316603fc2d997c899c7ca1707f809b918cd',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
+  'src/third_party/android_tools': {
+    'url': Var('chromium_git') + '/android_tools.git' + '@' + '9a70d48fcdd68cd0e7e968f342bd767ee6323bd1',
+    'condition': 'checkout_android',
   },
   'src/third_party/ced/src': {
-    'url': Var('chromium_git') + '/external/github.com/google/compact_enc_det.git' + '@' + 'ba412eaaacd3186085babcd901679a48863c7dd5',
+    'url': Var('chromium_git') + '/external/github.com/google/compact_enc_det.git' + '@' + '94c367a1fe3a13207f4b22604fcfd1d9f9ddf6d9',
     'condition': 'checkout_android',
   },
   'src/third_party/errorprone/lib': {
-      'url': Var('chromium_git') + '/chromium/third_party/errorprone.git' + '@' + '980d49e839aa4984015efed34b0134d4b2c9b6d7',
+      'url': Var('chromium_git') + '/chromium/third_party/errorprone.git' + '@' + 'ecc57c2b00627667874744b9ad8efe10734d97a8',
       'condition': 'checkout_android',
   },
   'src/third_party/findbugs': {
     'url': Var('chromium_git') + '/chromium/deps/findbugs.git' + '@' + '4275d9ac8610db6b1bc9a5e887f97e41b33fac67',
     'condition': 'checkout_android',
   },
-  'src/third_party/gson': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/gson',
-              'version': '681931c9778045903a0ed59856ce2dd8dd7bf7ca',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/guava': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/guava',
-              'version': 'a6fba501f3a0de88b9be1daa2052632de5b96a46',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/hamcrest': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/hamcrest',
-              'version': '37eccfc658fe79695d6abb6dd497463c4372032f',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-
   'src/third_party/icu': {
-    'url': Var('chromium_git') + '/chromium/deps/icu.git' + '@' + 'bf66d373ae781a3498f2babe7b61d933dd774b82',
-  },
-  'src/third_party/icu4j': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/icu4j',
-              'version': 'e87e5bed2b4935913ee26a3ebd0b723ee2344354',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/intellij': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/intellij',
-              'version': '77c2721b024b36ee073402c08e6d8428c0295336',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/jdk': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/jdk',
-              'version': 'PfRSnxe8Od6WU4zBXomq-zsgcJgWmm3z4gMQNB-r2QcC',
-          },
-          {
-              'package': 'chromium/third_party/jdk/extras',
-              'version': 'fkhuOQ3r-zKtWEdKplpo6k0vKkjl-LY_rJTmtzFCQN4C',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
+    'url': Var('chromium_git') + '/chromium/deps/icu.git' + '@' + 'd888fd2a1be890f4d35e43f68d6d79f42519a357',
   },
   'src/third_party/jsr-305/src': {
     'url': Var('chromium_git') + '/external/jsr-305.git' + '@' + '642c508235471f7220af6d5df2d3210e3bfc0919',
     'condition': 'checkout_android',
   },
   'src/third_party/junit/src': {
     'url': Var('chromium_git') + '/external/junit.git' + '@' + '64155f8a9babcfcf4263cf4d08253a1556e75481',
     'condition': 'checkout_android',
   },
-  'src/third_party/libunwindstack': {
-      'url': Var('chromium_git') + '/chromium/src/third_party/libunwindstack.git' + '@' + '6868358481bb1e5e20d155c1084dc436c88b5e6b',
-      'condition': 'checkout_android',
-  },
   'src/third_party/mockito/src': {
-    'url': Var('chromium_git') + '/external/mockito/mockito.git' + '@' + '04a2a289a4222f80ad20717c25144981210d2eac',
+    'url': Var('chromium_git') + '/external/mockito/mockito.git' + '@' + 'de83ad4598ad4cf5ea53c69a8a8053780b04b850',
     'condition': 'checkout_android',
   },
-  'src/third_party/objenesis': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/objenesis',
-              'version': '9e367f55e5a65781ee77bfcbaa88fb82b30e75c0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/ow2_asm': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/ow2_asm',
-              'version': 'NNAhdJzMdnutUVqfSJm5v0tVazA9l3Dd6CRwH6N4Q5kC',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/r8': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/r8',
-              'version': 'Nu_mvQJe34CotIXadFlA3w732CJ9EvQGuVs4udcZedAC',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/proguard': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/proguard',
-              'version': 'Fd91BJFVlmiO6c46YMTsdy7n2f5Sk2hVVGlzPLvqZPsC',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
   'src/third_party/requests/src': {
-    'url': Var('chromium_git') + '/external/github.com/kennethreitz/requests.git' + '@' + 'refs/tags/v2.23.0',
+    'url': Var('chromium_git') + '/external/github.com/kennethreitz/requests.git' + '@' + 'f172b30356d821d180fa4ecfa3e71c7274a32de4',
     'condition': 'checkout_android',
   },
-  'src/third_party/robolectric': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/robolectric',
-              'version': 'iC6RDM5EH3GEAzR-1shW_Mg0FeeNE5shq1okkFfuuNQC',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/sqlite4java': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/sqlite4java',
-              'version': '889660698187baa7c8b0d79f7bf58563125fbd66',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/turbine': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/turbine',
-              'version': 'Om6yIEXgJxuqghErK29h9RcMH6VaymMbxwScwXmcN6EC',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
+  'src/third_party/robolectric/robolectric': {
+    'url': Var('chromium_git') + '/external/robolectric.git' + '@' + '7e067f1112e1502caa742f7be72d37b5678d3403',
+    'condition': 'checkout_android',
   },
   'src/third_party/ub-uiautomator/lib': {
     'url': Var('chromium_git') + '/chromium/third_party/ub-uiautomator.git' + '@' + '00270549ce3161ae72ceb24712618ea28b4f9434',
     'condition': 'checkout_android',
   },
 
   # iOS deps:
   'src/ios': {
-    'url': Var('chromium_git') + '/chromium/src/ios' + '@' + '81826d980c159f949c2c7901f4dbec9a09788964',
+    'url': Var('chromium_git') + '/chromium/src/ios' + '@' + '299ef76e844a74a1f2f4ce7f06d101861fb49aba',
     'condition': 'checkout_ios'
   },
 
-  # Everything coming after this is automatically updated by the auto-roller.
-  # === ANDROID_DEPS Generated Code Start ===
-
-  'src/third_party/android_deps/libs/android_arch_core_common': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/android_arch_core_common',
-              'version': 'version:2@1.1.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/android_arch_core_runtime': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/android_arch_core_runtime',
-              'version': 'version:2@1.1.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/android_arch_lifecycle_common': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/android_arch_lifecycle_common',
-              'version': 'version:2@1.1.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/android_arch_lifecycle_common_java8': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/android_arch_lifecycle_common_java8',
-              'version': 'version:2@1.1.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/android_arch_lifecycle_livedata': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/android_arch_lifecycle_livedata',
-              'version': 'version:2@1.1.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/android_arch_lifecycle_livedata_core': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/android_arch_lifecycle_livedata_core',
-              'version': 'version:2@1.1.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/android_arch_lifecycle_runtime': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/android_arch_lifecycle_runtime',
-              'version': 'version:2@1.1.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/android_arch_lifecycle_viewmodel': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/android_arch_lifecycle_viewmodel',
-              'version': 'version:2@1.1.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/backport_util_concurrent_backport_util_concurrent': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/backport_util_concurrent_backport_util_concurrent',
-              'version': 'version:2@3.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/classworlds_classworlds': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/classworlds_classworlds',
-              'version': 'version:2@1.1-alpha-2.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_animated_vector_drawable': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_animated_vector_drawable',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_appcompat_v7': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_appcompat_v7',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_asynclayoutinflater': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_asynclayoutinflater',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_cardview_v7': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_cardview_v7',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_collections': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_collections',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_coordinatorlayout': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_coordinatorlayout',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_cursoradapter': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_cursoradapter',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_customview': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_customview',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_design': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_design',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_documentfile': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_documentfile',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_drawerlayout': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_drawerlayout',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_interpolator': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_interpolator',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_loader': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_loader',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_localbroadcastmanager': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_localbroadcastmanager',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_multidex': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_multidex',
-              'version': 'version:2@1.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_print': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_print',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_recyclerview_v7': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_recyclerview_v7',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_slidingpanelayout': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_slidingpanelayout',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_support_annotations': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_support_annotations',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_support_compat': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_support_compat',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_support_core_ui': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_support_core_ui',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_support_core_utils': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_support_core_utils',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_support_fragment': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_support_fragment',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_support_media_compat': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_support_media_compat',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_support_v4': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_support_v4',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_support_vector_drawable': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_support_vector_drawable',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_swiperefreshlayout': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_swiperefreshlayout',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_transition': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_transition',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_versionedparcelable': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_versionedparcelable',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_support_viewpager': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_support_viewpager',
-              'version': 'version:2@28.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_tools_common': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_tools_common',
-              'version': 'version:2@30.0.0-alpha10.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_tools_desugar_jdk_libs': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_tools_desugar_jdk_libs',
-              'version': 'version:2@1.1.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_tools_desugar_jdk_libs_configuration': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_tools_desugar_jdk_libs_configuration',
-              'version': 'version:2@1.1.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_tools_layoutlib_layoutlib_api': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_tools_layoutlib_layoutlib_api',
-              'version': 'version:2@30.0.0-alpha10.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_android_tools_sdk_common': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_android_tools_sdk_common',
-              'version': 'version:2@30.0.0-alpha10.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_github_ben_manes_caffeine_caffeine': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_github_ben_manes_caffeine_caffeine',
-              'version': 'version:2@2.8.8.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_github_kevinstern_software_and_algorithms': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_github_kevinstern_software_and_algorithms',
-              'version': 'version:2@1.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_android_datatransport_transport_api': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_android_datatransport_transport_api',
-              'version': 'version:2@2.2.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_android_gms_play_services_auth': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_auth',
-              'version': 'version:2@17.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_android_gms_play_services_auth_api_phone': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_auth_api_phone',
-              'version': 'version:2@17.5.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_android_gms_play_services_auth_base': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_auth_base',
-              'version': 'version:2@17.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_android_gms_play_services_base': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_base',
-              'version': 'version:2@17.5.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_android_gms_play_services_basement': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_basement',
-              'version': 'version:2@17.5.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_android_gms_play_services_cast': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_cast',
-              'version': 'version:2@17.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_android_gms_play_services_cast_framework': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_cast_framework',
-              'version': 'version:2@17.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_android_gms_play_services_clearcut': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_clearcut',
-              'version': 'version:2@17.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_android_gms_play_services_cloud_messaging': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_cloud_messaging',
-              'version': 'version:2@16.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_android_gms_play_services_fido': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_fido',
-              'version': 'version:2@19.0.0-beta.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_android_gms_play_services_flags': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_flags',
-              'version': 'version:2@17.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_android_gms_play_services_gcm': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_gcm',
-              'version': 'version:2@17.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_android_gms_play_services_iid': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_iid',
-              'version': 'version:2@17.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_android_gms_play_services_instantapps': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_instantapps',
-              'version': 'version:2@17.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_android_gms_play_services_location': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_location',
-              'version': 'version:2@17.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_android_gms_play_services_phenotype': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_phenotype',
-              'version': 'version:2@17.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_android_gms_play_services_places_placereport': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_places_placereport',
-              'version': 'version:2@17.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_android_gms_play_services_stats': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_stats',
-              'version': 'version:2@17.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_android_gms_play_services_tasks': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_tasks',
-              'version': 'version:2@17.2.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_android_gms_play_services_vision': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_vision',
-              'version': 'version:2@18.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_android_gms_play_services_vision_common': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_android_gms_play_services_vision_common',
-              'version': 'version:2@18.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_android_material_material': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_android_material_material',
-              'version': 'version:2@1.6.0-alpha01.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_android_play_core': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_android_play_core',
-              'version': 'version:2@1.10.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_auto_auto_common': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_auto_auto_common',
-              'version': 'version:2@1.1.2.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_auto_service_auto_service': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_auto_service_auto_service',
-              'version': 'version:2@1.0-rc6.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_auto_service_auto_service_annotations': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_auto_service_auto_service_annotations',
-              'version': 'version:2@1.0-rc6.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_auto_value_auto_value_annotations': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_auto_value_auto_value_annotations',
-              'version': 'version:2@1.7.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_code_findbugs_jformatstring': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_code_findbugs_jformatstring',
-              'version': 'version:2@3.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_code_findbugs_jsr305': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_code_findbugs_jsr305',
-              'version': 'version:2@3.0.2.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_code_gson_gson': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_code_gson_gson',
-              'version': 'version:2@2.8.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_dagger_dagger': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_dagger_dagger',
-              'version': 'version:2@2.30.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_dagger_dagger_compiler': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_dagger_dagger_compiler',
-              'version': 'version:2@2.30.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_dagger_dagger_producers': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_dagger_dagger_producers',
-              'version': 'version:2@2.30.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_dagger_dagger_spi': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_dagger_dagger_spi',
-              'version': 'version:2@2.30.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_errorprone_error_prone_annotation': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_errorprone_error_prone_annotation',
-              'version': 'version:2@2.10.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_errorprone_error_prone_annotations': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_errorprone_error_prone_annotations',
-              'version': 'version:2@2.10.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_errorprone_error_prone_check_api': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_errorprone_error_prone_check_api',
-              'version': 'version:2@2.10.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
+  # Win deps:
+  # Dependencies used by libjpeg-turbo
+  'src/third_party/yasm/binaries': {
+    'url': Var('chromium_git') + '/chromium/deps/yasm/binaries.git' + '@' + '52f9b3f4b0aa06da24ef8b123058bb61ee468881',
+    'condition': 'checkout_win',
   },
-  'src/third_party/android_deps/libs/com_google_errorprone_error_prone_core': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_errorprone_error_prone_core',
-              'version': 'version:2@2.10.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_errorprone_error_prone_type_annotations': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_errorprone_error_prone_type_annotations',
-              'version': 'version:2@2.10.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_errorprone_javac': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_errorprone_javac',
-              'version': 'version:2@9+181-r4173-1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_errorprone_javac_shaded': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_errorprone_javac_shaded',
-              'version': 'version:2@9-dev-r4023-3.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_firebase_firebase_annotations': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_firebase_firebase_annotations',
-              'version': 'version:2@16.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_firebase_firebase_common': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_firebase_firebase_common',
-              'version': 'version:2@19.5.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_firebase_firebase_components': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_firebase_firebase_components',
-              'version': 'version:2@16.1.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_firebase_firebase_encoders': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_firebase_firebase_encoders',
-              'version': 'version:2@16.1.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_firebase_firebase_encoders_json': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_firebase_firebase_encoders_json',
-              'version': 'version:2@17.1.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_firebase_firebase_iid': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_firebase_firebase_iid',
-              'version': 'version:2@21.0.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_firebase_firebase_iid_interop': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_firebase_firebase_iid_interop',
-              'version': 'version:2@17.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_firebase_firebase_installations': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_firebase_firebase_installations',
-              'version': 'version:2@16.3.5.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_firebase_firebase_installations_interop': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_firebase_firebase_installations_interop',
-              'version': 'version:2@16.0.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_firebase_firebase_measurement_connector': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_firebase_firebase_measurement_connector',
-              'version': 'version:2@18.0.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_firebase_firebase_messaging': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_firebase_firebase_messaging',
-              'version': 'version:2@21.0.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_flatbuffers_flatbuffers_java': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_flatbuffers_flatbuffers_java',
-              'version': 'version:2@2.0.3.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_googlejavaformat_google_java_format': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_googlejavaformat_google_java_format',
-              'version': 'version:2@1.5.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_guava_failureaccess': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_guava_failureaccess',
-              'version': 'version:2@1.0.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_guava_guava': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_guava_guava',
-              'version': 'version:2@31.0-jre.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_guava_guava_android': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_guava_guava_android',
-              'version': 'version:2@31.0-android.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_guava_listenablefuture': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_guava_listenablefuture',
-              'version': 'version:2@1.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_j2objc_j2objc_annotations': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_j2objc_j2objc_annotations',
-              'version': 'version:2@1.3.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_protobuf_protobuf_java': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_protobuf_protobuf_java',
-              'version': 'version:2@3.4.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_google_protobuf_protobuf_javalite': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_google_protobuf_protobuf_javalite',
-              'version': 'version:2@3.13.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_googlecode_java_diff_utils_diffutils': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_googlecode_java_diff_utils_diffutils',
-              'version': 'version:2@1.3.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_squareup_javapoet': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_squareup_javapoet',
-              'version': 'version:2@1.13.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/com_squareup_javawriter': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/com_squareup_javawriter',
-              'version': 'version:2@2.1.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/io_github_java_diff_utils_java_diff_utils': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/io_github_java_diff_utils_java_diff_utils',
-              'version': 'version:2@4.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/javax_annotation_javax_annotation_api': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/javax_annotation_javax_annotation_api',
-              'version': 'version:2@1.3.2.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/javax_annotation_jsr250_api': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/javax_annotation_jsr250_api',
-              'version': 'version:2@1.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/javax_inject_javax_inject': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/javax_inject_javax_inject',
-              'version': 'version:2@1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/nekohtml_nekohtml': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/nekohtml_nekohtml',
-              'version': 'version:2@1.9.6.2.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/nekohtml_xercesminimal': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/nekohtml_xercesminimal',
-              'version': 'version:2@1.9.6.2.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/net_ltgt_gradle_incap_incap': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/net_ltgt_gradle_incap_incap',
-              'version': 'version:2@0.2.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/net_sf_kxml_kxml2': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/net_sf_kxml_kxml2',
-              'version': 'version:2@2.3.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_apache_ant_ant': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_apache_ant_ant',
-              'version': 'version:2@1.8.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_apache_ant_ant_launcher': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_apache_ant_ant_launcher',
-              'version': 'version:2@1.8.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_apache_maven_maven_ant_tasks': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_apache_maven_maven_ant_tasks',
-              'version': 'version:2@2.1.3.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_apache_maven_maven_artifact': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_apache_maven_maven_artifact',
-              'version': 'version:2@2.2.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_apache_maven_maven_artifact_manager': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_apache_maven_maven_artifact_manager',
-              'version': 'version:2@2.2.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_apache_maven_maven_error_diagnostics': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_apache_maven_maven_error_diagnostics',
-              'version': 'version:2@2.2.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_apache_maven_maven_model': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_apache_maven_maven_model',
-              'version': 'version:2@2.2.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_apache_maven_maven_plugin_registry': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_apache_maven_maven_plugin_registry',
-              'version': 'version:2@2.2.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_apache_maven_maven_profile': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_apache_maven_maven_profile',
-              'version': 'version:2@2.2.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_apache_maven_maven_project': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_apache_maven_maven_project',
-              'version': 'version:2@2.2.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_apache_maven_maven_repository_metadata': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_apache_maven_maven_repository_metadata',
-              'version': 'version:2@2.2.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_apache_maven_maven_settings': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_apache_maven_maven_settings',
-              'version': 'version:2@2.2.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_apache_maven_wagon_wagon_file': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_apache_maven_wagon_wagon_file',
-              'version': 'version:2@1.0-beta-6.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_apache_maven_wagon_wagon_http_lightweight': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_apache_maven_wagon_wagon_http_lightweight',
-              'version': 'version:2@1.0-beta-6.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_apache_maven_wagon_wagon_http_shared': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_apache_maven_wagon_wagon_http_shared',
-              'version': 'version:2@1.0-beta-6.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_apache_maven_wagon_wagon_provider_api': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_apache_maven_wagon_wagon_provider_api',
-              'version': 'version:2@1.0-beta-6.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_ccil_cowan_tagsoup_tagsoup': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_ccil_cowan_tagsoup_tagsoup',
-              'version': 'version:2@1.2.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_checkerframework_checker_compat_qual': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_checkerframework_checker_compat_qual',
-              'version': 'version:2@2.5.5.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_checkerframework_checker_qual': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_checkerframework_checker_qual',
-              'version': 'version:2@3.12.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_checkerframework_dataflow_errorprone': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_checkerframework_dataflow_errorprone',
-              'version': 'version:2@3.15.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_codehaus_mojo_animal_sniffer_annotations': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_codehaus_mojo_animal_sniffer_annotations',
-              'version': 'version:2@1.17.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_codehaus_plexus_plexus_container_default': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_codehaus_plexus_plexus_container_default',
-              'version': 'version:2@1.0-alpha-9-stable-1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_codehaus_plexus_plexus_interpolation': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_codehaus_plexus_plexus_interpolation',
-              'version': 'version:2@1.11.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_codehaus_plexus_plexus_utils': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_codehaus_plexus_plexus_utils',
-              'version': 'version:2@1.5.15.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_eclipse_jgit_org_eclipse_jgit': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_eclipse_jgit_org_eclipse_jgit',
-              'version': 'version:2@4.4.1.201607150455-r.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_jetbrains_annotations': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_jetbrains_annotations',
-              'version': 'version:2@13.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib',
-              'version': 'version:2@1.6.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_common': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_common',
-              'version': 'version:2@1.6.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_jdk7': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_jdk7',
-              'version': 'version:2@1.5.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_jdk8': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_jdk8',
-              'version': 'version:2@1.5.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_jetbrains_kotlinx_kotlinx_coroutines_android': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlinx_kotlinx_coroutines_android',
-              'version': 'version:2@1.5.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_jetbrains_kotlinx_kotlinx_coroutines_core_jvm': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlinx_kotlinx_coroutines_core_jvm',
-              'version': 'version:2@1.5.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_jetbrains_kotlinx_kotlinx_metadata_jvm': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_jetbrains_kotlinx_kotlinx_metadata_jvm',
-              'version': 'version:2@0.1.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_ow2_asm_asm': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_ow2_asm_asm',
-              'version': 'version:2@7.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_ow2_asm_asm_analysis': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_ow2_asm_asm_analysis',
-              'version': 'version:2@7.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_ow2_asm_asm_commons': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_ow2_asm_asm_commons',
-              'version': 'version:2@7.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_ow2_asm_asm_tree': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_ow2_asm_asm_tree',
-              'version': 'version:2@7.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_ow2_asm_asm_util': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_ow2_asm_asm_util',
-              'version': 'version:2@7.0.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_pcollections_pcollections': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_pcollections_pcollections',
-              'version': 'version:2@2.1.2.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_robolectric_annotations': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_robolectric_annotations',
-              'version': 'version:2@4.3.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_robolectric_junit': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_robolectric_junit',
-              'version': 'version:2@4.3.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_robolectric_pluginapi': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_robolectric_pluginapi',
-              'version': 'version:2@4.3.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_robolectric_plugins_maven_dependency_resolver': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_robolectric_plugins_maven_dependency_resolver',
-              'version': 'version:2@4.3.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_robolectric_resources': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_robolectric_resources',
-              'version': 'version:2@4.3.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_robolectric_robolectric': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_robolectric_robolectric',
-              'version': 'version:2@4.3.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_robolectric_sandbox': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_robolectric_sandbox',
-              'version': 'version:2@4.3.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_robolectric_shadowapi': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_robolectric_shadowapi',
-              'version': 'version:2@4.3.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_robolectric_shadows_framework': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_robolectric_shadows_framework',
-              'version': 'version:2@4.3.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_robolectric_shadows_playservices': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_robolectric_shadows_playservices',
-              'version': 'version:2@4.3.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_robolectric_utils': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_robolectric_utils',
-              'version': 'version:2@4.3.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
-  'src/third_party/android_deps/libs/org_robolectric_utils_reflector': {
-      'packages': [
-          {
-              'package': 'chromium/third_party/android_deps/libs/org_robolectric_utils_reflector',
-              'version': 'version:2@4.3.1.cr0',
-          },
-      ],
-      'condition': 'checkout_android',
-      'dep_type': 'cipd',
-  },
+}
 
-  # === ANDROID_DEPS Generated Code End ===
-}
+# Define rules for which include paths are allowed in our source.
+include_rules = [ '+gflags' ]
 
 pre_deps_hooks = [
   {
     # Remove any symlinks from before 177567c518b121731e507e9b9c4049c4dc96e4c8.
     # TODO(kjellander): Remove this in March 2017.
     'name': 'cleanup_links',
     'pattern': '.',
-    'action': ['python3', 'src/cleanup_links.py'],
+    'action': ['python', 'src/cleanup_links.py'],
   },
 ]
 
 hooks = [
   {
     # This clobbers when necessary (based on get_landmines.py). It should be
     # an early hook but it will need to be run after syncing Chromium and
     # setting up the links, so the script actually exists.
     'name': 'landmines',
     'pattern': '.',
     'action': [
-        'python3',
+        'python',
         'src/build/landmines.py',
         '--landmine-scripts',
         'src/tools_libyuv/get_landmines.py',
         '--src-dir',
         'src',
     ],
   },
   # Downloads the current stable linux sysroot to build/linux/ if needed.
   {
     'name': 'sysroot_arm',
     'pattern': '.',
     'condition': 'checkout_linux and checkout_arm',
-    'action': ['python3', 'src/build/linux/sysroot_scripts/install-sysroot.py',
+    'action': ['python', 'src/build/linux/sysroot_scripts/install-sysroot.py',
                '--arch=arm'],
   },
   {
     'name': 'sysroot_arm64',
     'pattern': '.',
     'condition': 'checkout_linux and checkout_arm64',
-    'action': ['python3', 'src/build/linux/sysroot_scripts/install-sysroot.py',
+    'action': ['python', 'src/build/linux/sysroot_scripts/install-sysroot.py',
                '--arch=arm64'],
   },
   {
     'name': 'sysroot_x86',
     'pattern': '.',
     'condition': 'checkout_linux and (checkout_x86 or checkout_x64)',
-    'action': ['python3', 'src/build/linux/sysroot_scripts/install-sysroot.py',
+    'action': ['python', 'src/build/linux/sysroot_scripts/install-sysroot.py',
                '--arch=x86'],
   },
   {
     'name': 'sysroot_mips',
     'pattern': '.',
     'condition': 'checkout_linux and checkout_mips',
-    'action': ['python3', 'src/build/linux/sysroot_scripts/install-sysroot.py',
+    'action': ['python', 'src/build/linux/sysroot_scripts/install-sysroot.py',
                '--arch=mips'],
   },
   {
     'name': 'sysroot_x64',
     'pattern': '.',
     'condition': 'checkout_linux and checkout_x64',
-    'action': ['python3', 'src/build/linux/sysroot_scripts/install-sysroot.py',
+    'action': ['python', 'src/build/linux/sysroot_scripts/install-sysroot.py',
                '--arch=x64'],
   },
   {
     # Update the Windows toolchain if necessary.
     'name': 'win_toolchain',
     'pattern': '.',
-    'action': ['python3', 'src/build/vs_toolchain.py', 'update'],
+    'action': ['python', 'src/build/vs_toolchain.py', 'update'],
   },
-  {
-    # Update the Mac toolchain if necessary.
-    'name': 'mac_toolchain',
-    'pattern': '.',
-    'action': ['python3', 'src/build/mac_toolchain.py'],
-    'condition': 'checkout_mac',
-  },
+  # Pull binutils for linux, enabled debug fission for faster linking /
+  # debugging when used with clang on Ubuntu Precise.
+  # https://code.google.com/p/chromium/issues/detail?id=352046
   {
-    'name': 'msan_chained_origins',
-    'pattern': '.',
-    'condition': 'checkout_instrumented_libraries',
-    'action': [ 'python',
-                'src/third_party/depot_tools/download_from_google_storage.py',
-                "--no_resume",
-                "--no_auth",
-                "--bucket", "chromium-instrumented-libraries",
-                "-s", "src/third_party/instrumented_libraries/binaries/msan-chained-origins.tgz.sha1",
-              ],
-  },
-  {
-    'name': 'msan_no_origins',
-    'pattern': '.',
-    'condition': 'checkout_instrumented_libraries',
-    'action': [ 'python',
-                'src/third_party/depot_tools/download_from_google_storage.py',
-                "--no_resume",
-                "--no_auth",
-                "--bucket", "chromium-instrumented-libraries",
-                "-s", "src/third_party/instrumented_libraries/binaries/msan-no-origins.tgz.sha1",
-              ],
+    'name': 'binutils',
+    'pattern': 'src/third_party/binutils',
+    'action': [
+        'python',
+        'src/third_party/binutils/download.py',
+    ],
   },
   {
     # Pull clang if needed or requested via GYP_DEFINES.
     # Note: On Win, this should run after win_toolchain, as it may use it.
     'name': 'clang',
     'pattern': '.',
-    'action': ['python3', 'src/tools/clang/scripts/update.py'],
+    'action': ['python', 'src/tools/clang/scripts/update.py', '--if-needed'],
   },
   {
     # Update LASTCHANGE.
     'name': 'lastchange',
     'pattern': '.',
-    'action': ['python3', 'src/build/util/lastchange.py',
+    'action': ['python', 'src/build/util/lastchange.py',
                '-o', 'src/build/util/LASTCHANGE'],
   },
+  # Pull GN binaries.
+  {
+    'name': 'gn_win',
+    'pattern': '.',
+    'action': [ 'download_from_google_storage',
+                '--no_resume',
+                '--platform=win32',
+                '--no_auth',
+                '--bucket', 'chromium-gn',
+                '-s', 'src/buildtools/win/gn.exe.sha1',
+    ],
+  },
+  {
+    'name': 'gn_mac',
+    'pattern': '.',
+    'action': [ 'download_from_google_storage',
+                '--no_resume',
+                '--platform=darwin',
+                '--no_auth',
+                '--bucket', 'chromium-gn',
+                '-s', 'src/buildtools/mac/gn.sha1',
+    ],
+  },
+  {
+    'name': 'gn_linux64',
+    'pattern': '.',
+    'action': [ 'download_from_google_storage',
+                '--no_resume',
+                '--platform=linux*',
+                '--no_auth',
+                '--bucket', 'chromium-gn',
+                '-s', 'src/buildtools/linux64/gn.sha1',
+    ],
+  },
   # Pull clang-format binaries using checked-in hashes.
   {
     'name': 'clang_format_win',
     'pattern': '.',
     'action': [ 'download_from_google_storage',
                 '--no_resume',
                 '--platform=win32',
                 '--no_auth',
@@ -2255,17 +277,16 @@ hooks = [
                 '--no_auth',
                 '--bucket', 'chromium-clang-format',
                 '-s', 'src/buildtools/mac/clang-format.sha1',
     ],
   },
   {
     'name': 'clang_format_linux',
     'pattern': '.',
-    'condition': 'host_os == "linux"',
     'action': [ 'download_from_google_storage',
                 '--no_resume',
                 '--platform=linux*',
                 '--no_auth',
                 '--bucket', 'chromium-clang-format',
                 '-s', 'src/buildtools/linux64/clang-format.sha1',
     ],
   },
@@ -2299,32 +320,39 @@ hooks = [
                 '--no_resume',
                 '--platform=linux*',
                 '--no_auth',
                 '--bucket', 'chromium-luci',
                 '-d', 'src/tools/luci-go/linux64',
     ],
   },
   {
-    # We used to use src as a CIPD root. We moved it to a different directory
-    # in crrev.com/c/930178 but left the clobber here to ensure that that CL
-    # could be reverted safely. This can be safely removed once crbug.com/794764
-    # is resolved.
-    'name': 'Android Clobber Deprecated CIPD Root',
+    'name': 'Android CIPD Ensure',
     'pattern': '.',
     'condition': 'checkout_android',
-    'action': ['src/build/cipd/clobber_cipd_root.py',
-               '--root', 'src',
+    'action': ['src/build/cipd/cipd_wrapper.py',
+               '--chromium-root', 'src',
+               '--ensure-file', 'src/build/cipd/android/android.ensure',
     ],
   },
+  # Android dependencies. Many are downloaded using Google Storage these days.
+  # They're copied from https://cs.chromium.org/chromium/src/DEPS for all
+  # such dependencies we share with Chromium.
   {
-    'name': 'Generate component metadata for tests',
+    # This downloads SDK extras and puts them in the
+    # third_party/android_tools/sdk/extras directory.
+    'name': 'sdkextras',
     'pattern': '.',
-    'action': [
-      'vpython3',
-      'src/testing/generate_location_tags.py',
-      '--out',
-      'src/testing/location_tags.json',
+    # When adding a new sdk extras package to download, add the package
+    # directory and zip file to .gitignore in third_party/android_tools.
+    'action': ['python',
+               'src/build/android/play_services/update.py',
+               'download'
     ],
   },
 ]
 
-recursedeps = []
+recursedeps = [
+  # buildtools provides clang_format, libc++, and libc++abi.
+  'src/buildtools',
+  # android_tools manages the NDK.
+  'src/third_party/android_tools',
+]
deleted file mode 100644
--- a/media/libyuv/libyuv/DIR_METADATA
+++ /dev/null
@@ -1,3 +0,0 @@
-monorail {
-  component: "Internals>Images>Codecs"
-}
new file mode 100644
--- /dev/null
+++ b/media/libyuv/libyuv/LICENSE_THIRD_PARTY
@@ -0,0 +1,8 @@
+This source tree contains third party source code which is governed by third
+party licenses. This file contains references to files which are under other
+licenses than the one provided in the LICENSE file in the root of the source
+tree.
+
+Files governed by third party licenses:
+source/x86inc.asm
+
--- a/media/libyuv/libyuv/OWNERS
+++ b/media/libyuv/libyuv/OWNERS
@@ -1,10 +1,8 @@
-mbonadei@chromium.org
 fbarchard@chromium.org
 magjed@chromium.org
-wtc@google.com
 
-per-file *.gn=mbonadei@chromium.org
+per-file *.gn=phoglund@chromium.org
 per-file .gitignore=*
 per-file AUTHORS=*
 per-file DEPS=*
-per-file PRESUBMIT.py=mbonadei@chromium.org
+per-file PRESUBMIT.py=phoglund@chromium.org
--- a/media/libyuv/libyuv/PRESUBMIT.py
+++ b/media/libyuv/libyuv/PRESUBMIT.py
@@ -1,40 +1,60 @@
 # Copyright 2017 The LibYuv Project Authors. All rights reserved.
 #
 # Use of this source code is governed by a BSD-style license
 # that can be found in the LICENSE file in the root of the source
 # tree. An additional intellectual property rights grant can be found
 # in the file PATENTS. All contributing project authors may
 # be found in the AUTHORS file in the root of the source tree.
 
-# Runs PRESUBMIT.py in py3 mode by git cl presubmit.
-USE_PYTHON3 = True
+import os
+
+
+def _RunPythonTests(input_api, output_api):
+  def join(*args):
+    return input_api.os_path.join(input_api.PresubmitLocalPath(), *args)
+
+  test_directories = [
+      root for root, _, files in os.walk(join('tools_libyuv'))
+      if any(f.endswith('_test.py') for f in files)
+  ]
+
+  tests = []
+  for directory in test_directories:
+    tests.extend(
+      input_api.canned_checks.GetUnitTestsInDirectory(
+          input_api,
+          output_api,
+          directory,
+          whitelist=[r'.+_test\.py$']))
+  return input_api.RunTests(tests, parallel=True)
+
 
 def _CommonChecks(input_api, output_api):
   """Checks common to both upload and commit."""
   results = []
   results.extend(input_api.canned_checks.RunPylint(input_api, output_api,
-      files_to_skip=(r'^base[\\\/].*\.py$',
-                     r'^build[\\\/].*\.py$',
-                     r'^buildtools[\\\/].*\.py$',
-                     r'^ios[\\\/].*\.py$',
-                     r'^out.*[\\\/].*\.py$',
-                     r'^testing[\\\/].*\.py$',
-                     r'^third_party[\\\/].*\.py$',
-                     r'^tools[\\\/].*\.py$',
-                     # TODO(kjellander): should arguably be checked.
-                     r'^tools_libyuv[\\\/]valgrind[\\\/].*\.py$',
-                     r'^xcodebuild.*[\\\/].*\.py$',),
+      black_list=(r'^base[\\\/].*\.py$',
+                  r'^build[\\\/].*\.py$',
+                  r'^buildtools[\\\/].*\.py$',
+                  r'^ios[\\\/].*\.py$',
+                  r'^out.*[\\\/].*\.py$',
+                  r'^testing[\\\/].*\.py$',
+                  r'^third_party[\\\/].*\.py$',
+                  r'^tools[\\\/].*\.py$',
+                  # TODO(kjellander): should arguably be checked.
+                  r'^tools_libyuv[\\\/]valgrind[\\\/].*\.py$',
+                  r'^xcodebuild.*[\\\/].*\.py$',),
       disabled_warnings=['F0401',  # Failed to import x
                          'E0611',  # No package y in x
                          'W0232',  # Class has no __init__ method
                         ],
-      pylintrc='pylintrc',
-      version='2.7'))
+      pylintrc='pylintrc'))
+  results.extend(_RunPythonTests(input_api, output_api))
   return results
 
 
 def CheckChangeOnUpload(input_api, output_api):
   results = []
   results.extend(_CommonChecks(input_api, output_api))
   results.extend(
       input_api.canned_checks.CheckGNFormatted(input_api, output_api))
--- a/media/libyuv/libyuv/README.chromium
+++ b/media/libyuv/libyuv/README.chromium
@@ -1,9 +1,8 @@
 Name: libyuv
 URL: http://code.google.com/p/libyuv/
-Version: 1831
+Version: 1703
 License: BSD
 License File: LICENSE
 
 Description:
 libyuv is an open source project that includes YUV conversion and scaling functionality.
-
--- a/media/libyuv/libyuv/README.md
+++ b/media/libyuv/libyuv/README.md
@@ -5,14 +5,14 @@
 * Convert to RGB formats for rendering/effects.
 * Rotate by 90/180/270 degrees to adjust for mobile devices in portrait mode.
 * Optimized for SSSE3/AVX2 on x86/x64.
 * Optimized for Neon on Arm.
 * Optimized for MSA on Mips.
 
 ### Development
 
-See [Getting started][1] for instructions on how to get started developing.
+See [Getting started] [1] for instructions on how to get started developing.
 
-You can also browse the [docs directory][2] for more documentation.
+You can also browse the [docs directory] [2] for more documentation.
 
-[1]: ./docs/getting_started.md
-[2]: ./docs/
+[1]: https://chromium.googlesource.com/libyuv/libyuv/+/master/docs/getting_started.md
+[2]: https://chromium.googlesource.com/libyuv/libyuv/+/master/docs/
new file mode 100644
--- /dev/null
+++ b/media/libyuv/libyuv/all.gyp
@@ -0,0 +1,21 @@
+# Copyright 2013 The LibYuv Project Authors. All rights reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+# all.gyp and All target are for benefit of android gyp build.
+{
+  'targets': [
+    {
+      'target_name': 'All',
+      'type': 'none',
+      'dependencies': [
+        'libyuv.gyp:*',
+        'libyuv_test.gyp:*',
+      ],
+    },
+  ],
+}
--- a/media/libyuv/libyuv/build_overrides/build.gni
+++ b/media/libyuv/libyuv/build_overrides/build.gni
@@ -1,16 +1,19 @@
 # Copyright 2016 The LibYuv Project Authors. All rights reserved.
 #
 # Use of this source code is governed by a BSD-style license
 # that can be found in the LICENSE file in the root of the source
 # tree. An additional intellectual property rights grant can be found
 # in the file PATENTS. All contributing project authors may
 # be found in the AUTHORS file in the root of the source tree.
 
+# Some non-Chromium builds don't use Chromium's third_party/binutils.
+linux_use_bundled_binutils_override = true
+
 # Variable that can be used to support multiple build scenarios, like having
 # Chromium specific targets in a client project's GN file etc.
 build_with_chromium = false
 
 # Some non-Chromium builds don't support building java targets.
 enable_java_templates = true
 
 # Allow using custom suppressions files (currently not used by libyuv).
@@ -25,36 +28,11 @@ ubsan_blacklist_path =
 ubsan_vptr_blacklist_path =
     rebase_path("//tools_libyuv/ubsan/vptr_blacklist.txt", root_build_dir)
 
 # For Chromium, Android 32-bit non-component, non-clang builds hit a 4GiB size
 # limit, making them requiring symbol_level=2. WebRTC doesn't hit that problem
 # so we just ignore that assert. See https://crbug.com/648948 for more info.
 ignore_elf32_limitations = true
 
-# Use bundled hermetic Xcode installation maintained by Chromium,
-# except for local iOS builds where it is unsupported.
-if (host_os == "mac") {
-  _result = exec_script("//build/mac/should_use_hermetic_xcode.py",
-                        [ target_os ],
-                        "value")
-  assert(_result != 2,
-         "Do not allow building targets with the default" +
-             "hermetic toolchain if the minimum OS version is not met.")
-  use_system_xcode = _result == 0
-}
-
-declare_args() {
-  # Tracing support requires //third_party/perfetto.
-  enable_base_tracing = false
-  use_perfetto_client_library = false
-
-  # Limits the defined //third_party/android_deps targets to only "buildCompile"
-  # and "buildCompileNoDeps" targets. This is useful for third-party
-  # repositories which do not use JUnit tests. For instance,
-  # limit_android_deps == true removes "gn gen" requirement for
-  # //third_party/robolectric .
-  limit_android_deps = false
-
-  # Allows googletest to pretty-print various absl types.
-  # Defined here rather than in gtest.gni to match chromium.
-  gtest_enable_absl_printers = true
-}
+# Use system Xcode installation instead of the Chromium bundled Mac toolchain,
+# since it contains only SDK 10.11, not 10.12 which WebRTC needs.
+use_system_xcode = true
--- a/media/libyuv/libyuv/cleanup_links.py
+++ b/media/libyuv/libyuv/cleanup_links.py
@@ -1,10 +1,9 @@
-#!/usr/bin/env vpython3
-
+#!/usr/bin/env python
 # Copyright 2017 The LibYuv Project Authors. All rights reserved.
 #
 # Use of this source code is governed by a BSD-style license
 # that can be found in the LICENSE file in the root of the source
 # tree. An additional intellectual property rights grant can be found
 # in the file PATENTS. All contributing project authors may
 # be found in the AUTHORS file in the root of the source tree.
 
@@ -14,38 +13,38 @@
 """Script to cleanup symlinks created from setup_links.py.
 
 Before 177567c518b121731e507e9b9c4049c4dc96e4c8 (#15754) we had a Chromium
 checkout which we created symlinks into. In order to do clean syncs after
 landing that change, this script cleans up any old symlinks, avoiding annoying
 manual cleanup needed in order to complete gclient sync.
 """
 
-import argparse
 import logging
+import optparse
 import os
 import shelve
 import subprocess
 import sys
 
 
 ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
 LINKS_DB = 'links'
 
 # Version management to make future upgrades/downgrades easier to support.
 SCHEMA_VERSION = 1
 
-class WebRTCLinkSetup():
+class WebRTCLinkSetup(object):
   def __init__(self, links_db, dry_run=False):
     self._dry_run = dry_run
     self._links_db = links_db
 
   def CleanupLinks(self):
     logging.debug('CleanupLinks')
-    for source, link_path  in self._links_db.tems():
+    for source, link_path  in self._links_db.iteritems():
       if source == 'SCHEMA_VERSION':
         continue
       if os.path.islink(link_path) or sys.platform.startswith('win'):
         # os.path.islink() always returns false on Windows
         # See http://bugs.python.org/issue13143.
         logging.debug('Removing link to %s at %s', source, link_path)
         if not self._dry_run:
           if os.path.exists(link_path):
@@ -67,25 +66,25 @@ def _initialize_database(filename):
                  'supports %s. Wiping previous database contents.', version,
                  SCHEMA_VERSION)
     links_database.clear()
   links_database['SCHEMA_VERSION'] = SCHEMA_VERSION
   return links_database
 
 
 def main():
-  p = argparse.ArgumentParser()
-  p.add_argument('-d', '--dry-run', action='store_true', default=False,
-                 help='Print what would be done, but don\'t perform any '
-                      'operations. This will automatically set logging to '
-                      'verbose.')
-  p.add_argument('-v', '--verbose', action='store_const',
-                 const=logging.DEBUG, default=logging.INFO,
-                 help='Print verbose output for debugging.')
-  options = p.parse_args()
+  parser = optparse.OptionParser()
+  parser.add_option('-d', '--dry-run', action='store_true', default=False,
+                    help='Print what would be done, but don\'t perform any '
+                         'operations. This will automatically set logging to '
+                         'verbose.')
+  parser.add_option('-v', '--verbose', action='store_const',
+                    const=logging.DEBUG, default=logging.INFO,
+                    help='Print verbose output for debugging.')
+  options, _ = parser.parse_args()
 
   if options.dry_run:
     options.verbose = logging.DEBUG
   logging.basicConfig(format='%(message)s', level=options.verbose)
 
   # Work from the root directory of the checkout.
   script_dir = os.path.dirname(os.path.abspath(__file__))
   os.chdir(script_dir)
--- a/media/libyuv/libyuv/codereview.settings
+++ b/media/libyuv/libyuv/codereview.settings
@@ -1,5 +1,6 @@
-# This file is used by `git cl` to get repository specific information.
+# This file is used by git cl to get repository specific information.
 CODE_REVIEW_SERVER: codereview.chromium.org
 GERRIT_HOST: True
 PROJECT: libyuv
+TRY_ON_UPLOAD: False
 VIEW_VC: https://chromium.googlesource.com/libyuv/libyuv/+/
--- a/media/libyuv/libyuv/docs/deprecated_builds.md
+++ b/media/libyuv/libyuv/docs/deprecated_builds.md
@@ -234,17 +234,16 @@ If you get a compile error for atlthunk.
 
 
 ### Build targets
 
     ninja -C out/Debug libyuv
     ninja -C out/Debug libyuv_unittest
     ninja -C out/Debug compare
     ninja -C out/Debug yuvconvert
-    ninja -C out/Debug yuvconstants
     ninja -C out/Debug psnr
     ninja -C out/Debug cpuid
 
 
 ## Building the Library with make
 
 ### Linux
 
--- a/media/libyuv/libyuv/docs/environment_variables.md
+++ b/media/libyuv/libyuv/docs/environment_variables.md
@@ -1,50 +1,30 @@
 # Introduction
 
 For test purposes, environment variables can be set to control libyuv behavior.  These should only be used for testing, to narrow down bugs or to test performance.
 
 # CPU
 
 By default the cpu is detected and the most advanced form of SIMD is used.  But you can disable instruction sets selectively, or completely, falling back on C code.  Set the variable to 1 to disable the specified instruction set.
 
-## All CPUs
     LIBYUV_DISABLE_ASM
-
-## Intel CPUs
     LIBYUV_DISABLE_X86
     LIBYUV_DISABLE_SSE2
     LIBYUV_DISABLE_SSSE3
     LIBYUV_DISABLE_SSE41
     LIBYUV_DISABLE_SSE42
     LIBYUV_DISABLE_AVX
     LIBYUV_DISABLE_AVX2
+    LIBYUV_DISABLE_AVX512BW
     LIBYUV_DISABLE_ERMS
     LIBYUV_DISABLE_FMA3
-    LIBYUV_DISABLE_F16C
-    LIBYUV_DISABLE_AVX512BW
-    LIBYUV_DISABLE_AVX512VL
-    LIBYUV_DISABLE_AVX512VNNI
-    LIBYUV_DISABLE_AVX512VBMI
-    LIBYUV_DISABLE_AVX512VBMI2
-    LIBYUV_DISABLE_AVX512VBITALG
-    LIBYUV_DISABLE_AVX512VPOPCNTDQ
-    LIBYUV_DISABLE_GFNI
-
-## ARM CPUs
-
+    LIBYUV_DISABLE_MSA
     LIBYUV_DISABLE_NEON
 
-## MIPS CPUs
-    LIBYUV_DISABLE_MSA
-
-## LOONGARCH CPUs
-    LIBYUV_DISABLE_LSX
-    LIBYUV_DISABLE_LASX
-
 # Test Width/Height/Repeat
 
 The unittests default to a small image (128x72) to run fast.  This can be set by environment variable to test a specific resolutions.
 You can also repeat the test a specified number of iterations, allowing benchmarking and profiling.
 
     set LIBYUV_WIDTH=1280
     set LIBYUV_HEIGHT=720
     set LIBYUV_REPEAT=999
--- a/media/libyuv/libyuv/docs/formats.md
+++ b/media/libyuv/libyuv/docs/formats.md
@@ -1,17 +1,15 @@
 # Introduction
 
 Formats (FOURCC) supported by libyuv are detailed here.
 
 # Core Formats
 
-There are 2 core formats supported by libyuv - I420 and ARGB.
-  All YUV formats can be converted to/from I420.
-  All RGB formats can be converted to/from ARGB.
+There are 2 core formats supported by libyuv - I420 and ARGB.  All YUV formats can be converted to/from I420.  All RGB formats can be converted to/from ARGB.
 
 Filtering functions such as scaling and planar functions work on I420 and/or ARGB.
 
 # OSX Core Media Pixel Formats
 
 This is how OSX formats map to libyuv
 
     enum {
@@ -33,62 +31,54 @@ This is how OSX formats map to libyuv
       kCMPixelFormat_8IndexedGray_WhiteIsZero = 0x00000028,  Not supported.
     };
 
 
 # FOURCC (Four Charactacter Code) List
 
 The following is extracted from video_common.h as a complete list of formats supported by libyuv.
     enum FourCC {
-      // 10 Primary YUV formats: 5 planar, 2 biplanar, 2 packed.
+      // 9 Primary YUV formats: 5 planar, 2 biplanar, 2 packed.
       FOURCC_I420 = FOURCC('I', '4', '2', '0'),
       FOURCC_I422 = FOURCC('I', '4', '2', '2'),
       FOURCC_I444 = FOURCC('I', '4', '4', '4'),
       FOURCC_I400 = FOURCC('I', '4', '0', '0'),
       FOURCC_NV21 = FOURCC('N', 'V', '2', '1'),
       FOURCC_NV12 = FOURCC('N', 'V', '1', '2'),
       FOURCC_YUY2 = FOURCC('Y', 'U', 'Y', '2'),
       FOURCC_UYVY = FOURCC('U', 'Y', 'V', 'Y'),
       FOURCC_H010 = FOURCC('H', '0', '1', '0'),  // unofficial fourcc. 10 bit lsb
-      FOURCC_U010 = FOURCC('U', '0', '1', '0'),  // bt.2020, unofficial fourcc.
-                                                 // 10 bit lsb
 
       // 1 Secondary YUV format: row biplanar.
-      FOURCC_M420 = FOURCC('M', '4', '2', '0'),  // deprecated.
+      FOURCC_M420 = FOURCC('M', '4', '2', '0'),
 
-      // 13 Primary RGB formats: 4 32 bpp, 2 24 bpp, 3 16 bpp, 1 10 bpc, 2 64 bpp
+      // 11 Primary RGB formats: 4 32 bpp, 2 24 bpp, 3 16 bpp, 1 10 bpc
       FOURCC_ARGB = FOURCC('A', 'R', 'G', 'B'),
       FOURCC_BGRA = FOURCC('B', 'G', 'R', 'A'),
       FOURCC_ABGR = FOURCC('A', 'B', 'G', 'R'),
       FOURCC_AR30 = FOURCC('A', 'R', '3', '0'),  // 10 bit per channel. 2101010.
       FOURCC_AB30 = FOURCC('A', 'B', '3', '0'),  // ABGR version of 10 bit
-      FOURCC_AR64 = FOURCC('A', 'R', '6', '4'),  // 16 bit per channel.
-      FOURCC_AB64 = FOURCC('A', 'B', '6', '4'),  // ABGR version of 16 bit
       FOURCC_24BG = FOURCC('2', '4', 'B', 'G'),
       FOURCC_RAW = FOURCC('r', 'a', 'w', ' '),
       FOURCC_RGBA = FOURCC('R', 'G', 'B', 'A'),
       FOURCC_RGBP = FOURCC('R', 'G', 'B', 'P'),  // rgb565 LE.
       FOURCC_RGBO = FOURCC('R', 'G', 'B', 'O'),  // argb1555 LE.
       FOURCC_R444 = FOURCC('R', '4', '4', '4'),  // argb4444 LE.
 
       // 1 Primary Compressed YUV format.
       FOURCC_MJPG = FOURCC('M', 'J', 'P', 'G'),
 
-      // 11 Auxiliary YUV variations: 3 with U and V planes are swapped, 1 Alias.
+      // 7 Auxiliary YUV variations: 3 with U and V planes are swapped, 1 Alias.
       FOURCC_YV12 = FOURCC('Y', 'V', '1', '2'),
       FOURCC_YV16 = FOURCC('Y', 'V', '1', '6'),
       FOURCC_YV24 = FOURCC('Y', 'V', '2', '4'),
       FOURCC_YU12 = FOURCC('Y', 'U', '1', '2'),  // Linux version of I420.
       FOURCC_J420 = FOURCC('J', '4', '2', '0'),
       FOURCC_J400 = FOURCC('J', '4', '0', '0'),  // unofficial fourcc
       FOURCC_H420 = FOURCC('H', '4', '2', '0'),  // unofficial fourcc
-      FOURCC_H422 = FOURCC('H', '4', '2', '2'),  // unofficial fourcc
-      FOURCC_U420 = FOURCC('U', '4', '2', '0'),  // bt.2020, unofficial fourcc
-      FOURCC_U422 = FOURCC('U', '4', '2', '2'),  // bt.2020, unofficial fourcc
-      FOURCC_U444 = FOURCC('U', '4', '4', '4'),  // bt.2020, unofficial fourcc
 
       // 14 Auxiliary aliases.  CanonicalFourCC() maps these to canonical fourcc.
       FOURCC_IYUV = FOURCC('I', 'Y', 'U', 'V'),  // Alias for I420.
       FOURCC_YU16 = FOURCC('Y', 'U', '1', '6'),  // Alias for I422.
       FOURCC_YU24 = FOURCC('Y', 'U', '2', '4'),  // Alias for I444.
       FOURCC_YUYV = FOURCC('Y', 'U', 'Y', 'V'),  // Alias for YUY2.
       FOURCC_YUVS = FOURCC('y', 'u', 'v', 's'),  // Alias for YUY2 on Mac.
       FOURCC_HDYC = FOURCC('H', 'D', 'Y', 'C'),  // Alias for UYVY.
@@ -108,37 +98,16 @@ The following is extracted from video_co
       The following formats contains a full size Y plane followed by 1 or 2
         planes for UV: I420, I422, I444, I400, NV21, NV12, I400
       The size (subsampling) of the UV varies.
         I420, NV12 and NV21 are half width, half height
         I422, NV16 and NV61 are half width, full height
         I444, NV24 and NV42 are full width, full height
         I400 and J400 have no chroma channel.
 
-# Color space
-      The YUV formats start with a letter to specify the color space. e.g. I420
-        I = BT.601 limited range
-        J = BT.601 full range     (J = JPEG that uses this)
-        H = BT.709 limited range  (H for HD)
-        F = BT.709 full range     (F for Full range)
-        U = BT.2020 limited range (U for UHD)
-        V = BT.2020 full range
-        For YUV to RGB conversions, a matrix can be passed.  See also convert_argh.h
-
-# HDR formats
-      Planar formats with 10 or 12 bits use the following fourcc:
-        I010, I012, P010, P012 are half width, half height
-        I210, I212, P210, P212 are half width, full height
-        I410, I412, P410, P412 are full width, full height
-      where
-        I is the color space (see above) and 3 planes: Y, U and V.
-        P is a biplanar format, similar to NV12 but 16 bits, with the valid bits in the high bits.  There is a Y plane and a UV plane.
-        0, 2 or 4 is the last digit of subsampling: 4:2:0, 4:2:2, or 4:4:4
-        10 or 12 is the bits per channel.  The bits are in the low bits of a 16 bit channel.
-
 # The ARGB FOURCC
 
 There are 4 ARGB layouts - ARGB, BGRA, ABGR and RGBA.  ARGB is most common by far, used for screen formats, and windows webcam drivers.
 
 The fourcc describes the order of channels in a ***register***.
 
 A fourcc provided by capturer, can be thought of string, e.g. "ARGB".
 
@@ -177,32 +146,17 @@ AR30 is 2 10 10 10 ARGB stored in little
 The 2 bit alpha has 4 values.  Here are the comparable 8 bit alpha values.
 0 - 0.    00000000b = 0x00 = 0
 1 - 33%.  01010101b = 0x55 = 85
 2 - 66%.  10101010b = 0xaa = 170
 3 - 100%. 11111111b = 0xff = 255
 The 10 bit RGB values range from 0 to 1023.
 XR30 is the same as AR30 but with no alpha channel.
 
-# AB64 and AR64
-
-AB64 is similar to ABGR, with 16 bit (2 bytes) per channel. Each channel stores an unsigned short.
-In memory R is the lowest and A is the highest.
-Each channel has value ranges from 0 to 65535.
-AR64 is similar to ARGB.
-
 # NV12 and NV21
 
 NV12 is a biplanar format with a full sized Y plane followed by a single
 chroma plane with weaved U and V values.
 NV21 is the same but with weaved V and U values.
 The 12 in NV12 refers to 12 bits per pixel.  NV12 has a half width and half
 height chroma channel, and therefore is a 420 subsampling.
 NV16 is 16 bits per pixel, with half width and full height.  aka 422.
 NV24 is 24 bits per pixel with full sized chroma channel. aka 444.
-Most NV12 functions allow the destination Y pointer to be NULL.
-
-# YUY2 and UYVY
-
-YUY2 is a packed YUV format with half width, full height.
-
-YUY2 is YUYV in memory
-UYVY is UYVY in memory
--- a/media/libyuv/libyuv/docs/getting_started.md
+++ b/media/libyuv/libyuv/docs/getting_started.md
@@ -22,17 +22,17 @@ Then you'll get a .gclient file like:
         "deps_file"   : "DEPS",
         "managed"     : True,
         "custom_deps" : {
         },
         "safesync_url": "",
       },
     ];
 
-For iOS add `;target_os=['ios'];` to your OSX .gclient and run `gclient sync.`
+For iOS add `;target_os=['ios'];` to your OSX .gclient and run `GYP_DEFINES="OS=ios" gclient sync.`
 
 Browse the Git reprository: https://chromium.googlesource.com/libyuv/libyuv/+/master
 
 ### Android
 For Android add `;target_os=['android'];` to your Linux .gclient
 
     solutions = [
       { "name"        : "src",
@@ -43,18 +43,21 @@ For Android add `;target_os=['android'];
         },
         "safesync_url": "",
       },
     ];
     target_os = ["android", "linux"];
 
 Then run:
 
+    export GYP_DEFINES="OS=android"
     gclient sync
 
+The sync will generate native build files for your environment using gyp (Windows: Visual Studio, OSX: XCode, Linux: make). This generation can also be forced manually: `gclient runhooks`
+
 To get just the source (not buildable):
 
     git clone https://chromium.googlesource.com/libyuv/libyuv
 
 
 ## Building the Library and Unittests
 
 ### Windows
@@ -90,25 +93,21 @@ arm64
 
     gn gen out/Release "--args=is_debug=false target_os=\"ios\" ios_enable_code_signing=false target_cpu=\"arm64\""
     gn gen out/Debug "--args=is_debug=true target_os=\"ios\" ios_enable_code_signing=false target_cpu=\"arm64\""
     ninja -v -C out/Debug libyuv_unittest
     ninja -v -C out/Release libyuv_unittest
 
 ios simulator
 
-    gn gen out/Release "--args=is_debug=false target_os=\"ios\" ios_enable_code_signing=false use_xcode_clang=true target_cpu=\"x86\""
-    gn gen out/Debug "--args=is_debug=true target_os=\"ios\" ios_enable_code_signing=false use_xcode_clang=true target_cpu=\"x86\""
+    gn gen out/Release "--args=is_debug=false target_os=\"ios\" ios_enable_code_signing=false target_cpu=\"x86\""
+    gn gen out/Debug "--args=is_debug=true target_os=\"ios\" ios_enable_code_signing=false target_cpu=\"x86\""
     ninja -v -C out/Debug libyuv_unittest
     ninja -v -C out/Release libyuv_unittest
 
-ios disassembly
-
-    otool -tV ./out/Release/obj/libyuv_neon/row_neon64.o >row_neon64.txt
-
 ### Android
 https://code.google.com/p/chromium/wiki/AndroidBuildInstructions
 
 Add to .gclient last line: `target_os=['android'];`
 
 arm64
 
     gn gen out/Release "--args=is_debug=false target_os=\"android\" target_cpu=\"arm64\""
@@ -127,76 +126,64 @@ ia32
 
     gn gen out/Release "--args=is_debug=false target_os=\"android\" target_cpu=\"x86\""
     gn gen out/Debug "--args=is_debug=true target_os=\"android\" target_cpu=\"x86\""
     ninja -v -C out/Debug libyuv_unittest
     ninja -v -C out/Release libyuv_unittest
 
 mips
 
-    gn gen out/Release "--args=is_debug=false target_os=\"android\" target_cpu=\"mips64el\" mips_arch_variant=\"r6\" mips_use_msa=true is_component_build=true"
-    gn gen out/Debug "--args=is_debug=true target_os=\"android\" target_cpu=\"mips64el\" mips_arch_variant=\"r6\" mips_use_msa=true is_component_build=true"
+    gn gen out/Release "--args=is_debug=false target_os=\"android\" target_cpu=\"mips64el\" mips_arch_variant=\"r6\" mips_use_msa=true is_component_build=true is_clang=true"
+    gn gen out/Debug "--args=is_debug=true target_os=\"android\" target_cpu=\"mips64el\" mips_arch_variant=\"r6\" mips_use_msa=true is_component_build=true is_clang=true"
     ninja -v -C out/Debug libyuv_unittest
     ninja -v -C out/Release libyuv_unittest
 
 arm disassembly:
 
     third_party/android_ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-objdump -d ./out/Release/obj/libyuv/row_common.o >row_common.txt
 
     third_party/android_ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-objdump -d ./out/Release/obj/libyuv_neon/row_neon.o >row_neon.txt
 
     third_party/android_ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-objdump -d ./out/Release/obj/libyuv_neon/row_neon64.o >row_neon64.txt
 
-    Caveat: Disassembly may require optimize_max be disabled in BUILD.gn
-
 Running tests:
 
-    out/Release/bin/run_libyuv_unittest -vv --gtest_filter=*
+    build/android/test_runner.py gtest -s libyuv_unittest -t 7200 --verbose --release --gtest_filter=*
 
 Running test as benchmark:
 
-    out/Release/bin/run_libyuv_unittest -vv --gtest_filter=* --libyuv_width=1280 --libyuv_height=720 --libyuv_repeat=999 --libyuv_flags=-1  --libyuv_cpu_info=-1
+    build/android/test_runner.py gtest -s libyuv_unittest -t 7200 --verbose --release --gtest_filter=* -a "--libyuv_width=1280 --libyuv_height=720 --libyuv_repeat=999 --libyuv_flags=-1  --libyuv_cpu_info=-1"
 
 Running test with C code:
 
-    out/Release/bin/run_libyuv_unittest -vv --gtest_filter=* --libyuv_width=1280 --libyuv_height=720 --libyuv_repeat=999 --libyuv_flags=1 --libyuv_cpu_info=1
+    build/android/test_runner.py gtest -s libyuv_unittest -t 7200 --verbose --release --gtest_filter=* -a "--libyuv_width=1280 --libyuv_height=720 --libyuv_repeat=999 --libyuv_flags=1 --libyuv_cpu_info=1"
 
 ### Build targets
 
     ninja -C out/Debug libyuv
     ninja -C out/Debug libyuv_unittest
     ninja -C out/Debug compare
     ninja -C out/Debug yuvconvert
-    ninja -C out/Debug yuvconstants
     ninja -C out/Debug psnr
     ninja -C out/Debug cpuid
 
 ### ARM Linux
 
     gn gen out/Release "--args=is_debug=false target_cpu=\"arm64\""
     gn gen out/Debug "--args=is_debug=true target_cpu=\"arm64\""
     ninja -v -C out/Debug libyuv_unittest
     ninja -v -C out/Release libyuv_unittest
 
-### MIPS Linux
-
-mips
-
-   gn gen out/Release "--args=is_debug=false target_os=\"linux\" target_cpu=\"mips64el\" mips_arch_variant=\"loongson3\" is_component_build=false use_sysroot=false use_gold=false"
-   gn gen out/Debug "--args=is_debug=true target_os=\"linux\" target_cpu=\"mips64el\" mips_arch_variant=\"loongson3\" is_component_build=false use_sysroot=false use_gold=false"
-   ninja -v -C out/Debug libyuv_unittest
-   ninja -v -C out/Release libyuv_unittest
-
 ## Building the Library with make
 
 ### Linux
 
     make V=1 -f linux.mk
     make V=1 -f linux.mk clean
-    make V=1 -f linux.mk CXX=clang++ CC=clang
+    make V=1 -f linux.mk CXX=clang++
 
 ## Building the library with cmake
 
 Install cmake: http://www.cmake.org/
 
 ### Default debug build:
 
     mkdir out
--- a/media/libyuv/libyuv/docs/rotation.md
+++ b/media/libyuv/libyuv/docs/rotation.md
@@ -95,13 +95,9 @@ Mirror functions for horizontally flippi
 Mirror functionality can also be achieved with the I420Scale and ARGBScale functions by passing negative width and/or height.
 
 # Invert - Vertical Flip
 
 Inverting can be achieved with almost any libyuv function by passing a negative source height.
 
 I420Mirror and ARGBMirror can also be used to rotate by 180 degrees by passing a negative height.
 
-# Cropping - Vertical Flip
 
-When cropping from a subsampled format like NV21, the method of setting the start pointers wont work for odd crop start y on the UV plane.
-If the height after cropping will be odd, invert the source - point to the last row, negate the strides, and pass negative height, which
-will re-invert the image as the conversion outputs.
--- a/media/libyuv/libyuv/download_vs_toolchain.py
+++ b/media/libyuv/libyuv/download_vs_toolchain.py
@@ -1,10 +1,10 @@
-#!/usr/bin/env vpython3
-
+#!/usr/bin/env python
+#
 # Copyright 2014 The LibYuv Project Authors. All rights reserved.
 #
 # Use of this source code is governed by a BSD-style license
 # that can be found in the LICENSE file in the root of the source
 # tree. An additional intellectual property rights grant can be found
 # in the file PATENTS. All contributing project authors may
 # be found in the AUTHORS file in the root of the source tree.
 
@@ -17,13 +17,13 @@ import os
 import sys
 
 
 checkout_root = os.path.dirname(os.path.realpath(__file__))
 sys.path.insert(0, os.path.join(checkout_root, 'build'))
 sys.path.insert(0, os.path.join(checkout_root, 'tools', 'find_depot_tools'))
 
 
-import vs_toolchain  # pylint: disable=wrong-import-position
+import vs_toolchain
 
 
 if __name__ == '__main__':
   sys.exit(vs_toolchain.main())
new file mode 100755
--- /dev/null
+++ b/media/libyuv/libyuv/gyp_libyuv
@@ -0,0 +1,101 @@
+#!/usr/bin/env python
+#
+# Copyright 2014 The LibYuv Project Authors. All rights reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+# This script is used to run GYP for libyuv. It contains selected parts of the
+# main function from the src/build/gyp_chromium file.
+
+import glob
+import os
+import shlex
+import sys
+
+checkout_root = os.path.dirname(os.path.realpath(__file__))
+
+sys.path.insert(0, os.path.join(checkout_root, 'build'))
+import gyp_chromium
+import gyp_helper
+import vs_toolchain
+
+sys.path.insert(0, os.path.join(checkout_root, 'tools', 'gyp', 'pylib'))
+import gyp
+
+def GetSupplementalFiles():
+  """Returns a list of the supplemental files that are included in all GYP
+  sources."""
+  # Can't use the one in gyp_chromium since the directory location of the root
+  # is different.
+  return glob.glob(os.path.join(checkout_root, '*', 'supplement.gypi'))
+
+
+if __name__ == '__main__':
+  args = sys.argv[1:]
+
+  if int(os.environ.get('GYP_CHROMIUM_NO_ACTION', 0)):
+    print 'Skipping gyp_libyuv due to GYP_CHROMIUM_NO_ACTION env var.'
+    sys.exit(0)
+
+  # This could give false positives since it doesn't actually do real option
+  # parsing.  Oh well.
+  gyp_file_specified = False
+  for arg in args:
+    if arg.endswith('.gyp'):
+      gyp_file_specified = True
+      break
+
+  # If we didn't get a file, assume 'all.gyp' in the root of the checkout.
+  if not gyp_file_specified:
+    # Because of a bug in gyp, simply adding the abspath to all.gyp doesn't
+    # work, but chdir'ing and adding the relative path does. Spooky :/
+    os.chdir(checkout_root)
+    args.append('all.gyp')
+
+  # There shouldn't be a circular dependency relationship between .gyp files,
+  args.append('--no-circular-check')
+
+  # Default to ninja unless GYP_GENERATORS is set.
+  if not os.environ.get('GYP_GENERATORS'):
+    os.environ['GYP_GENERATORS'] = 'ninja'
+
+  vs2013_runtime_dll_dirs = None
+  if int(os.environ.get('DEPOT_TOOLS_WIN_TOOLCHAIN', '1')):
+    vs2013_runtime_dll_dirs = vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs()
+
+  # Enforce gyp syntax checking. This adds about 20% execution time.
+  args.append('--check')
+
+  supplemental_includes = gyp_chromium.GetSupplementalFiles()
+  gyp_vars_dict = gyp_chromium.GetGypVars(supplemental_includes)
+
+  # Automatically turn on crosscompile support for platforms that need it.
+  if all(('ninja' in os.environ.get('GYP_GENERATORS', ''),
+          gyp_vars_dict.get('OS') in ['android', 'ios'],
+          'GYP_CROSSCOMPILE' not in os.environ)):
+    os.environ['GYP_CROSSCOMPILE'] = '1'
+
+  args.extend(['-I' + i for i in
+               gyp_chromium.additional_include_files(supplemental_includes,
+                                                     args)])
+
+  # Set the gyp depth variable to the root of the checkout.
+  args.append('--depth=' + os.path.relpath(checkout_root))
+
+  print 'Updating projects from gyp files...'
+  sys.stdout.flush()
+
+  # Off we go...
+  gyp_rc = gyp.main(args)
+
+  if vs2013_runtime_dll_dirs:
+    x64_runtime, x86_runtime = vs2013_runtime_dll_dirs
+    vs_toolchain.CopyVsRuntimeDlls(
+        os.path.join(checkout_root, gyp_chromium.GetOutputDirectory()),
+        (x86_runtime, x64_runtime))
+
+  sys.exit(gyp_rc)
new file mode 100644
--- /dev/null
+++ b/media/libyuv/libyuv/gyp_libyuv.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
+#
+# Copyright 2014 The LibYuv Project Authors. All rights reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+
+# This script is a modified copy of the src/build/gyp_chromium.py file.
+# It is needed for parallel processing.
+
+# This file is (possibly, depending on python version) imported by
+# gyp_libyuv when GYP_PARALLEL=1 and it creates sub-processes
+# through the multiprocessing library.
+
+# Importing in Python 2.6 (fixed in 2.7) on Windows doesn't search for
+# imports that don't end in .py (and aren't directories with an
+# __init__.py). This wrapper makes "import gyp_libyuv" work with
+# those old versions and makes it possible to execute gyp_libyuv.py
+# directly on Windows where the extension is useful.
+
+import os
+
+path = os.path.abspath(os.path.split(__file__)[0])
+execfile(os.path.join(path, 'gyp_libyuv'))
--- a/media/libyuv/libyuv/include/libyuv.h
+++ b/media/libyuv/libyuv/include/libyuv.h
@@ -21,13 +21,12 @@
 #include "libyuv/mjpeg_decoder.h"
 #include "libyuv/planar_functions.h"
 #include "libyuv/rotate.h"
 #include "libyuv/rotate_argb.h"
 #include "libyuv/row.h"
 #include "libyuv/scale.h"
 #include "libyuv/scale_argb.h"
 #include "libyuv/scale_row.h"
-#include "libyuv/scale_uv.h"
 #include "libyuv/version.h"
 #include "libyuv/video_common.h"
 
 #endif  // INCLUDE_LIBYUV_H_
--- a/media/libyuv/libyuv/include/libyuv/basic_types.h
+++ b/media/libyuv/libyuv/include/libyuv/basic_types.h
@@ -24,27 +24,24 @@ typedef unsigned int uint32_t;
 typedef int int32_t;
 typedef unsigned short uint16_t;
 typedef short int16_t;
 typedef unsigned char uint8_t;
 typedef signed char int8_t;
 #else
 #include <stdint.h>  // for uintptr_t and C99 types
 #endif               // defined(_MSC_VER) && (_MSC_VER < 1600)
-// Types are deprecated.  Enable this macro for legacy types.
-#ifdef LIBYUV_LEGACY_TYPES
 typedef uint64_t uint64;
 typedef int64_t int64;
 typedef uint32_t uint32;
 typedef int32_t int32;
 typedef uint16_t uint16;
 typedef int16_t int16;
 typedef uint8_t uint8;
 typedef int8_t int8;
-#endif  // LIBYUV_LEGACY_TYPES
 #endif  // INT_TYPES_DEFINED
 
 #if !defined(LIBYUV_API)
 #if defined(_WIN32) || defined(__CYGWIN__)
 #if defined(LIBYUV_BUILDING_SHARED_LIBRARY)
 #define LIBYUV_API __declspec(dllexport)
 #elif defined(LIBYUV_USING_SHARED_LIBRARY)
 #define LIBYUV_API __declspec(dllimport)
--- a/media/libyuv/libyuv/include/libyuv/compare_row.h
+++ b/media/libyuv/libyuv/include/libyuv/compare_row.h
@@ -50,30 +50,30 @@ extern "C" {
     (defined(__x86_64__) || defined(__i386__) || defined(_M_IX86))
 #define HAS_HASHDJB2_SSE41
 #define HAS_SUMSQUAREERROR_SSE2
 #define HAS_HAMMINGDISTANCE_SSE42
 #endif
 
 // The following are available for Visual C and clangcl 32 bit:
 #if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) && defined(_MSC_VER) && \
-    !defined(__clang__) &&                                                   \
     (defined(VISUALC_HAS_AVX2) || defined(CLANG_HAS_AVX2))
 #define HAS_HASHDJB2_AVX2
 #define HAS_SUMSQUAREERROR_AVX2
 #endif
 
-// The following are available for GCC and clangcl:
-#if !defined(LIBYUV_DISABLE_X86) && (defined(__x86_64__) || defined(__i386__))
+// The following are available for GCC and clangcl 64 bit:
+#if !defined(LIBYUV_DISABLE_X86) && \
+    (defined(__x86_64__) || (defined(__i386__) && !defined(_MSC_VER)))
 #define HAS_HAMMINGDISTANCE_SSSE3
 #endif
 
-// The following are available for GCC and clangcl:
+// The following are available for GCC and clangcl 64 bit:
 #if !defined(LIBYUV_DISABLE_X86) && defined(CLANG_HAS_AVX2) && \
-    (defined(__x86_64__) || defined(__i386__))
+    (defined(__x86_64__) || (defined(__i386__) && !defined(_MSC_VER)))
 #define HAS_HAMMINGDISTANCE_AVX2
 #endif
 
 // The following are available for Neon:
 #if !defined(LIBYUV_DISABLE_NEON) && \
     (defined(__ARM_NEON__) || defined(LIBYUV_NEON) || defined(__aarch64__))
 #define HAS_SUMSQUAREERROR_NEON
 #define HAS_HAMMINGDISTANCE_NEON
@@ -97,16 +97,17 @@ uint32_t HammingDistance_AVX2(const uint
                               const uint8_t* src_b,
                               int count);
 uint32_t HammingDistance_NEON(const uint8_t* src_a,
                               const uint8_t* src_b,
                               int count);
 uint32_t HammingDistance_MSA(const uint8_t* src_a,
                              const uint8_t* src_b,
                              int count);
+
 uint32_t SumSquareError_C(const uint8_t* src_a,
                           const uint8_t* src_b,
                           int count);
 uint32_t SumSquareError_SSE2(const uint8_t* src_a,
                              const uint8_t* src_b,
                              int count);
 uint32_t SumSquareError_AVX2(const uint8_t* src_a,
                              const uint8_t* src_b,
--- a/media/libyuv/libyuv/include/libyuv/convert.h
+++ b/media/libyuv/libyuv/include/libyuv/convert.h
@@ -37,46 +37,16 @@ int I444ToI420(const uint8_t* src_y,
                int dst_stride_y,
                uint8_t* dst_u,
                int dst_stride_u,
                uint8_t* dst_v,
                int dst_stride_v,
                int width,
                int height);
 
-// Convert I444 to NV12.
-LIBYUV_API
-int I444ToNV12(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_y,
-               int dst_stride_y,
-               uint8_t* dst_uv,
-               int dst_stride_uv,
-               int width,
-               int height);
-
-// Convert I444 to NV21.
-LIBYUV_API
-int I444ToNV21(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_y,
-               int dst_stride_y,
-               uint8_t* dst_vu,
-               int dst_stride_vu,
-               int width,
-               int height);
-
 // Convert I422 to I420.
 LIBYUV_API
 int I422ToI420(const uint8_t* src_y,
                int src_stride_y,
                const uint8_t* src_u,
                int src_stride_u,
                const uint8_t* src_v,
                int src_stride_v,
@@ -84,93 +54,16 @@ int I422ToI420(const uint8_t* src_y,
                int dst_stride_y,
                uint8_t* dst_u,
                int dst_stride_u,
                uint8_t* dst_v,
                int dst_stride_v,
                int width,
                int height);
 
-// Convert I422 to I444.
-LIBYUV_API
-int I422ToI444(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_y,
-               int dst_stride_y,
-               uint8_t* dst_u,
-               int dst_stride_u,
-               uint8_t* dst_v,
-               int dst_stride_v,
-               int width,
-               int height);
-
-// Convert I422 to I210.
-LIBYUV_API
-int I422ToI210(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint16_t* dst_y,
-               int dst_stride_y,
-               uint16_t* dst_u,
-               int dst_stride_u,
-               uint16_t* dst_v,
-               int dst_stride_v,
-               int width,
-               int height);
-
-// Convert MM21 to NV12.
-LIBYUV_API
-int MM21ToNV12(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_uv,
-               int src_stride_uv,
-               uint8_t* dst_y,
-               int dst_stride_y,
-               uint8_t* dst_uv,
-               int dst_stride_uv,
-               int width,
-               int height);
-
-// Convert MM21 to I420.
-LIBYUV_API
-int MM21ToI420(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_uv,
-               int src_stride_uv,
-               uint8_t* dst_y,
-               int dst_stride_y,
-               uint8_t* dst_u,
-               int dst_stride_u,
-               uint8_t* dst_v,
-               int dst_stride_v,
-               int width,
-               int height);
-
-// Convert I422 to NV21.
-LIBYUV_API
-int I422ToNV21(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_y,
-               int dst_stride_y,
-               uint8_t* dst_vu,
-               int dst_stride_vu,
-               int width,
-               int height);
-
 // Copy I420 to I420.
 #define I420ToI420 I420Copy
 LIBYUV_API
 int I420Copy(const uint8_t* src_y,
              int src_stride_y,
              const uint8_t* src_u,
              int src_stride_u,
              const uint8_t* src_v,
@@ -179,33 +72,16 @@ int I420Copy(const uint8_t* src_y,
              int dst_stride_y,
              uint8_t* dst_u,
              int dst_stride_u,
              uint8_t* dst_v,
              int dst_stride_v,
              int width,
              int height);
 
-// Convert I420 to I444.
-LIBYUV_API
-int I420ToI444(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_y,
-               int dst_stride_y,
-               uint8_t* dst_u,
-               int dst_stride_u,
-               uint8_t* dst_v,
-               int dst_stride_v,
-               int width,
-               int height);
-
 // Copy I010 to I010
 #define I010ToI010 I010Copy
 #define H010ToH010 I010Copy
 LIBYUV_API
 int I010Copy(const uint16_t* src_y,
              int src_stride_y,
              const uint16_t* src_u,
              int src_stride_u,
@@ -233,280 +109,29 @@ int I010ToI420(const uint16_t* src_y,
                int dst_stride_y,
                uint8_t* dst_u,
                int dst_stride_u,
                uint8_t* dst_v,
                int dst_stride_v,
                int width,
                int height);
 
-#define H210ToH420 I210ToI420
-LIBYUV_API
-int I210ToI420(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_u,
-               int src_stride_u,
-               const uint16_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_y,
-               int dst_stride_y,
-               uint8_t* dst_u,
-               int dst_stride_u,
-               uint8_t* dst_v,
-               int dst_stride_v,
-               int width,
-               int height);
-
-#define H210ToH422 I210ToI422
-LIBYUV_API
-int I210ToI422(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_u,
-               int src_stride_u,
-               const uint16_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_y,
-               int dst_stride_y,
-               uint8_t* dst_u,
-               int dst_stride_u,
-               uint8_t* dst_v,
-               int dst_stride_v,
-               int width,
-               int height);
-
-#define H410ToH444 I410ToI444
-LIBYUV_API
-int I410ToI444(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_u,
-               int src_stride_u,
-               const uint16_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_y,
-               int dst_stride_y,
-               uint8_t* dst_u,
-               int dst_stride_u,
-               uint8_t* dst_v,
-               int dst_stride_v,
-               int width,
-               int height);
-
-#define H012ToH420 I012ToI420
-LIBYUV_API
-int I012ToI420(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_u,
-               int src_stride_u,
-               const uint16_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_y,
-               int dst_stride_y,
-               uint8_t* dst_u,
-               int dst_stride_u,
-               uint8_t* dst_v,
-               int dst_stride_v,
-               int width,
-               int height);
-
-#define H212ToH422 I212ToI422
-LIBYUV_API
-int I212ToI422(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_u,
-               int src_stride_u,
-               const uint16_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_y,
-               int dst_stride_y,
-               uint8_t* dst_u,
-               int dst_stride_u,
-               uint8_t* dst_v,
-               int dst_stride_v,
-               int width,
-               int height);
-
-#define H412ToH444 I412ToI444
-LIBYUV_API
-int I412ToI444(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_u,
-               int src_stride_u,
-               const uint16_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_y,
-               int dst_stride_y,
-               uint8_t* dst_u,
-               int dst_stride_u,
-               uint8_t* dst_v,
-               int dst_stride_v,
-               int width,
-               int height);
-
-#define I412ToI012 I410ToI010
-#define H410ToH010 I410ToI010
-#define H412ToH012 I410ToI010
-LIBYUV_API
-int I410ToI010(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_u,
-               int src_stride_u,
-               const uint16_t* src_v,
-               int src_stride_v,
-               uint16_t* dst_y,
-               int dst_stride_y,
-               uint16_t* dst_u,
-               int dst_stride_u,
-               uint16_t* dst_v,
-               int dst_stride_v,
-               int width,
-               int height);
-
-#define I212ToI012 I210ToI010
-#define H210ToH010 I210ToI010
-#define H212ToH012 I210ToI010
-LIBYUV_API
-int I210ToI010(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_u,
-               int src_stride_u,
-               const uint16_t* src_v,
-               int src_stride_v,
-               uint16_t* dst_y,
-               int dst_stride_y,
-               uint16_t* dst_u,
-               int dst_stride_u,
-               uint16_t* dst_v,
-               int dst_stride_v,
-               int width,
-               int height);
-
-// Convert I010 to I410
-LIBYUV_API
-int I010ToI410(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_u,
-               int src_stride_u,
-               const uint16_t* src_v,
-               int src_stride_v,
-               uint16_t* dst_y,
-               int dst_stride_y,
-               uint16_t* dst_u,
-               int dst_stride_u,
-               uint16_t* dst_v,
-               int dst_stride_v,
-               int width,
-               int height);
-
-// Convert I012 to I412
-#define I012ToI412 I010ToI410
-
-// Convert I210 to I410
-LIBYUV_API
-int I210ToI410(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_u,
-               int src_stride_u,
-               const uint16_t* src_v,
-               int src_stride_v,
-               uint16_t* dst_y,
-               int dst_stride_y,
-               uint16_t* dst_u,
-               int dst_stride_u,
-               uint16_t* dst_v,
-               int dst_stride_v,
-               int width,
-               int height);
-
-// Convert I212 to I412
-#define I212ToI412 I210ToI410
-
-// Convert I010 to P010
-LIBYUV_API
-int I010ToP010(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_u,
-               int src_stride_u,
-               const uint16_t* src_v,
-               int src_stride_v,
-               uint16_t* dst_y,
-               int dst_stride_y,
-               uint16_t* dst_uv,
-               int dst_stride_uv,
-               int width,
-               int height);
-
-// Convert I210 to P210
-LIBYUV_API
-int I210ToP210(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_u,
-               int src_stride_u,
-               const uint16_t* src_v,
-               int src_stride_v,
-               uint16_t* dst_y,
-               int dst_stride_y,
-               uint16_t* dst_uv,
-               int dst_stride_uv,
-               int width,
-               int height);
-
-// Convert I012 to P012
-LIBYUV_API
-int I012ToP012(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_u,
-               int src_stride_u,
-               const uint16_t* src_v,
-               int src_stride_v,
-               uint16_t* dst_y,
-               int dst_stride_y,
-               uint16_t* dst_uv,
-               int dst_stride_uv,
-               int width,
-               int height);
-
-// Convert I212 to P212
-LIBYUV_API
-int I212ToP212(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_u,
-               int src_stride_u,
-               const uint16_t* src_v,
-               int src_stride_v,
-               uint16_t* dst_y,
-               int dst_stride_y,
-               uint16_t* dst_uv,
-               int dst_stride_uv,
-               int width,
-               int height);
-
 // Convert I400 (grey) to I420.
 LIBYUV_API
 int I400ToI420(const uint8_t* src_y,
                int src_stride_y,
                uint8_t* dst_y,
                int dst_stride_y,
                uint8_t* dst_u,
                int dst_stride_u,
                uint8_t* dst_v,
                int dst_stride_v,
                int width,
                int height);
 
-// Convert I400 (grey) to NV21.
-LIBYUV_API
-int I400ToNV21(const uint8_t* src_y,
-               int src_stride_y,
-               uint8_t* dst_y,
-               int dst_stride_y,
-               uint8_t* dst_vu,
-               int dst_stride_vu,
-               int width,
-               int height);
-
 #define J400ToJ420 I400ToI420
 
 // Convert NV12 to I420.
 LIBYUV_API
 int NV12ToI420(const uint8_t* src_y,
                int src_stride_y,
                const uint8_t* src_uv,
                int src_stride_uv,
@@ -529,80 +154,16 @@ int NV21ToI420(const uint8_t* src_y,
                int dst_stride_y,
                uint8_t* dst_u,
                int dst_stride_u,
                uint8_t* dst_v,
                int dst_stride_v,
                int width,
                int height);
 
-// Convert NV12 to NV24.
-LIBYUV_API
-int NV12ToNV24(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_uv,
-               int src_stride_uv,
-               uint8_t* dst_y,
-               int dst_stride_y,
-               uint8_t* dst_uv,
-               int dst_stride_uv,
-               int width,
-               int height);
-
-// Convert NV16 to NV24.
-LIBYUV_API
-int NV16ToNV24(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_uv,
-               int src_stride_uv,
-               uint8_t* dst_y,
-               int dst_stride_y,
-               uint8_t* dst_uv,
-               int dst_stride_uv,
-               int width,
-               int height);
-
-// Convert P010 to P410.
-LIBYUV_API
-int P010ToP410(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_uv,
-               int src_stride_uv,
-               uint16_t* dst_y,
-               int dst_stride_y,
-               uint16_t* dst_uv,
-               int dst_stride_uv,
-               int width,
-               int height);
-
-// Convert P012 to P412.
-#define P012ToP412 P010ToP410
-
-// Convert P016 to P416.
-#define P016ToP416 P010ToP410
-
-// Convert P210 to P410.
-LIBYUV_API
-int P210ToP410(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_uv,
-               int src_stride_uv,
-               uint16_t* dst_y,
-               int dst_stride_y,
-               uint16_t* dst_uv,
-               int dst_stride_uv,
-               int width,
-               int height);
-
-// Convert P212 to P412.
-#define P212ToP412 P210ToP410
-
-// Convert P216 to P416.
-#define P216ToP416 P210ToP410
-
 // Convert YUY2 to I420.
 LIBYUV_API
 int YUY2ToI420(const uint8_t* src_yuy2,
                int src_stride_yuy2,
                uint8_t* dst_y,
                int dst_stride_y,
                uint8_t* dst_u,
                int dst_stride_u,
@@ -619,35 +180,26 @@ int UYVYToI420(const uint8_t* src_uyvy,
                int dst_stride_y,
                uint8_t* dst_u,
                int dst_stride_u,
                uint8_t* dst_v,
                int dst_stride_v,
                int width,
                int height);
 
-// Convert AYUV to NV12.
+// Convert M420 to I420.
 LIBYUV_API
-int AYUVToNV12(const uint8_t* src_ayuv,
-               int src_stride_ayuv,
+int M420ToI420(const uint8_t* src_m420,
+               int src_stride_m420,
                uint8_t* dst_y,
                int dst_stride_y,
-               uint8_t* dst_uv,
-               int dst_stride_uv,
-               int width,
-               int height);
-
-// Convert AYUV to NV21.
-LIBYUV_API
-int AYUVToNV21(const uint8_t* src_ayuv,
-               int src_stride_ayuv,
-               uint8_t* dst_y,
-               int dst_stride_y,
-               uint8_t* dst_vu,
-               int dst_stride_vu,
+               uint8_t* dst_u,
+               int dst_stride_u,
+               uint8_t* dst_v,
+               int dst_stride_v,
                int width,
                int height);
 
 // Convert Android420 to I420.
 LIBYUV_API
 int Android420ToI420(const uint8_t* src_y,
                      int src_stride_y,
                      const uint8_t* src_u,
@@ -724,55 +276,29 @@ int RGB24ToI420(const uint8_t* src_rgb24
                 int dst_stride_y,
                 uint8_t* dst_u,
                 int dst_stride_u,
                 uint8_t* dst_v,
                 int dst_stride_v,
                 int width,
                 int height);
 
-// RGB little endian (bgr in memory) to J420.
-LIBYUV_API
-int RGB24ToJ420(const uint8_t* src_rgb24,
-                int src_stride_rgb24,
-                uint8_t* dst_y,
-                int dst_stride_y,
-                uint8_t* dst_u,
-                int dst_stride_u,
-                uint8_t* dst_v,
-                int dst_stride_v,
-                int width,
-                int height);
-
 // RGB big endian (rgb in memory) to I420.
 LIBYUV_API
 int RAWToI420(const uint8_t* src_raw,
               int src_stride_raw,
               uint8_t* dst_y,
               int dst_stride_y,
               uint8_t* dst_u,
               int dst_stride_u,
               uint8_t* dst_v,
               int dst_stride_v,
               int width,
               int height);
 
-// RGB big endian (rgb in memory) to J420.
-LIBYUV_API
-int RAWToJ420(const uint8_t* src_raw,
-              int src_stride_raw,
-              uint8_t* dst_y,
-              int dst_stride_y,
-              uint8_t* dst_u,
-              int dst_stride_u,
-              uint8_t* dst_v,
-              int dst_stride_v,
-              int width,
-              int height);
-
 // RGB16 (RGBP fourcc) little endian to I420.
 LIBYUV_API
 int RGB565ToI420(const uint8_t* src_rgb565,
                  int src_stride_rgb565,
                  uint8_t* dst_y,
                  int dst_stride_y,
                  uint8_t* dst_u,
                  int dst_stride_u,
@@ -802,82 +328,40 @@ int ARGB4444ToI420(const uint8_t* src_ar
                    int dst_stride_y,
                    uint8_t* dst_u,
                    int dst_stride_u,
                    uint8_t* dst_v,
                    int dst_stride_v,
                    int width,
                    int height);
 
-// RGB little endian (bgr in memory) to J400.
-LIBYUV_API
-int RGB24ToJ400(const uint8_t* src_rgb24,
-                int src_stride_rgb24,
-                uint8_t* dst_yj,
-                int dst_stride_yj,
-                int width,
-                int height);
-
-// RGB big endian (rgb in memory) to J400.
-LIBYUV_API
-int RAWToJ400(const uint8_t* src_raw,
-              int src_stride_raw,
-              uint8_t* dst_yj,
-              int dst_stride_yj,
-              int width,
-              int height);
-
+#ifdef HAVE_JPEG
 // src_width/height provided by capture.
 // dst_width/height for clipping determine final size.
 LIBYUV_API
 int MJPGToI420(const uint8_t* sample,
                size_t sample_size,
                uint8_t* dst_y,
                int dst_stride_y,
                uint8_t* dst_u,
                int dst_stride_u,
                uint8_t* dst_v,
                int dst_stride_v,
                int src_width,
                int src_height,
                int dst_width,
                int dst_height);
 
-// JPEG to NV21
-LIBYUV_API
-int MJPGToNV21(const uint8_t* sample,
-               size_t sample_size,
-               uint8_t* dst_y,
-               int dst_stride_y,
-               uint8_t* dst_vu,
-               int dst_stride_vu,
-               int src_width,
-               int src_height,
-               int dst_width,
-               int dst_height);
-
-// JPEG to NV12
-LIBYUV_API
-int MJPGToNV12(const uint8_t* sample,
-               size_t sample_size,
-               uint8_t* dst_y,
-               int dst_stride_y,
-               uint8_t* dst_uv,
-               int dst_stride_uv,
-               int src_width,
-               int src_height,
-               int dst_width,
-               int dst_height);
-
 // Query size of MJPG in pixels.
 LIBYUV_API
 int MJPGSize(const uint8_t* sample,
              size_t sample_size,
              int* width,
              int* height);
+#endif
 
 // Convert camera sample to I420 with cropping, rotation and vertical flip.
 // "src_size" is needed to parse MJPG.
 // "dst_stride_y" number of bytes in a row of the dst_y plane.
 //   Normally this would be the same as dst_width, with recommended alignment
 //   to 16 bytes for better efficiency.
 //   If rotation of 90 or 270 is used, stride is affected. The caller should
 //   allocate the I420 buffer according to rotation.
--- a/media/libyuv/libyuv/include/libyuv/convert_argb.h
+++ b/media/libyuv/libyuv/include/libyuv/convert_argb.h
@@ -9,82 +9,27 @@
  */
 
 #ifndef INCLUDE_LIBYUV_CONVERT_ARGB_H_
 #define INCLUDE_LIBYUV_CONVERT_ARGB_H_
 
 #include "libyuv/basic_types.h"
 
 #include "libyuv/rotate.h"  // For enum RotationMode.
-#include "libyuv/scale.h"   // For enum FilterMode.
+
+// TODO(fbarchard): This set of functions should exactly match convert.h
+// TODO(fbarchard): Add tests. Create random content of right size and convert
+// with C vs Opt and or to I420 and compare.
+// TODO(fbarchard): Some of these functions lack parameter setting.
 
 #ifdef __cplusplus
 namespace libyuv {
 extern "C" {
 #endif
 
-// Conversion matrix for YUV to RGB
-LIBYUV_API extern const struct YuvConstants kYuvI601Constants;   // BT.601
-LIBYUV_API extern const struct YuvConstants kYuvJPEGConstants;   // BT.601 full
-LIBYUV_API extern const struct YuvConstants kYuvH709Constants;   // BT.709
-LIBYUV_API extern const struct YuvConstants kYuvF709Constants;   // BT.709 full
-LIBYUV_API extern const struct YuvConstants kYuv2020Constants;   // BT.2020
-LIBYUV_API extern const struct YuvConstants kYuvV2020Constants;  // BT.2020 full
-
-// Conversion matrix for YVU to BGR
-LIBYUV_API extern const struct YuvConstants kYvuI601Constants;   // BT.601
-LIBYUV_API extern const struct YuvConstants kYvuJPEGConstants;   // BT.601 full
-LIBYUV_API extern const struct YuvConstants kYvuH709Constants;   // BT.709
-LIBYUV_API extern const struct YuvConstants kYvuF709Constants;   // BT.709 full
-LIBYUV_API extern const struct YuvConstants kYvu2020Constants;   // BT.2020
-LIBYUV_API extern const struct YuvConstants kYvuV2020Constants;  // BT.2020 full
-
-// Macros for end swapped destination Matrix conversions.
-// Swap UV and pass mirrored kYvuJPEGConstants matrix.
-// TODO(fbarchard): Add macro for each Matrix function.
-#define kYuvI601ConstantsVU kYvuI601Constants
-#define kYuvJPEGConstantsVU kYvuJPEGConstants
-#define kYuvH709ConstantsVU kYvuH709Constants
-#define kYuvF709ConstantsVU kYvuF709Constants
-#define kYuv2020ConstantsVU kYvu2020Constants
-#define kYuvV2020ConstantsVU kYvuV2020Constants
-
-#define NV12ToABGRMatrix(a, b, c, d, e, f, g, h, i) \
-  NV21ToARGBMatrix(a, b, c, d, e, f, g##VU, h, i)
-#define NV21ToABGRMatrix(a, b, c, d, e, f, g, h, i) \
-  NV12ToARGBMatrix(a, b, c, d, e, f, g##VU, h, i)
-#define NV12ToRAWMatrix(a, b, c, d, e, f, g, h, i) \
-  NV21ToRGB24Matrix(a, b, c, d, e, f, g##VU, h, i)
-#define NV21ToRAWMatrix(a, b, c, d, e, f, g, h, i) \
-  NV12ToRGB24Matrix(a, b, c, d, e, f, g##VU, h, i)
-#define I010ToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k) \
-  I010ToARGBMatrix(a, b, e, f, c, d, g, h, i##VU, j, k)
-#define I210ToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k) \
-  I210ToARGBMatrix(a, b, e, f, c, d, g, h, i##VU, j, k)
-#define I410ToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k) \
-  I410ToARGBMatrix(a, b, e, f, c, d, g, h, i##VU, j, k)
-#define I010ToAB30Matrix(a, b, c, d, e, f, g, h, i, j, k) \
-  I010ToAR30Matrix(a, b, e, f, c, d, g, h, i##VU, j, k)
-#define I210ToAB30Matrix(a, b, c, d, e, f, g, h, i, j, k) \
-  I210ToAR30Matrix(a, b, e, f, c, d, g, h, i##VU, j, k)
-#define I410ToAB30Matrix(a, b, c, d, e, f, g, h, i, j, k) \
-  I410ToAR30Matrix(a, b, e, f, c, d, g, h, i##VU, j, k)
-#define I420AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
-  I420AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n)
-#define I422AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
-  I422AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n)
-#define I444AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
-  I444AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n)
-#define I010AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
-  I010AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n)
-#define I210AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
-  I210AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n)
-#define I410AlphaToABGRMatrix(a, b, c, d, e, f, g, h, i, j, k, l, m, n) \
-  I410AlphaToARGBMatrix(a, b, e, f, c, d, g, h, i, j, k##VU, l, m, n)
-
 // Alias.
 #define ARGBToARGB ARGBCopy
 
 // Copy ARGB to ARGB.
 LIBYUV_API
 int ARGBCopy(const uint8_t* src_argb,
              int src_stride_argb,
              uint8_t* dst_argb,
@@ -100,315 +45,42 @@ int I420ToARGB(const uint8_t* src_y,
                int src_stride_u,
                const uint8_t* src_v,
                int src_stride_v,
                uint8_t* dst_argb,
                int dst_stride_argb,
                int width,
                int height);
 
-// Convert I420 to ABGR.
+// Duplicate prototype for function in convert_from.h for remoting.
 LIBYUV_API
 int I420ToABGR(const uint8_t* src_y,
                int src_stride_y,
                const uint8_t* src_u,
                int src_stride_u,
                const uint8_t* src_v,
                int src_stride_v,
                uint8_t* dst_abgr,
                int dst_stride_abgr,
                int width,
                int height);
 
-// Convert J420 to ARGB.
-LIBYUV_API
-int J420ToARGB(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_argb,
-               int dst_stride_argb,
-               int width,
-               int height);
-
-// Convert J420 to ABGR.
-LIBYUV_API
-int J420ToABGR(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_abgr,
-               int dst_stride_abgr,
-               int width,
-               int height);
-
-// Convert H420 to ARGB.
+// Convert I010 to ARGB.
 LIBYUV_API
-int H420ToARGB(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_argb,
-               int dst_stride_argb,
-               int width,
-               int height);
-
-// Convert H420 to ABGR.
-LIBYUV_API
-int H420ToABGR(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_abgr,
-               int dst_stride_abgr,
-               int width,
-               int height);
-
-// Convert U420 to ARGB.
-LIBYUV_API
-int U420ToARGB(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_argb,
-               int dst_stride_argb,
-               int width,
-               int height);
-
-// Convert U420 to ABGR.
-LIBYUV_API
-int U420ToABGR(const uint8_t* src_y,
+int I010ToARGB(const uint16_t* src_y,
                int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_abgr,
-               int dst_stride_abgr,
-               int width,
-               int height);
-
-// Convert I422 to ARGB.
-LIBYUV_API
-int I422ToARGB(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_argb,
-               int dst_stride_argb,
-               int width,
-               int height);
-
-// Convert I422 to ABGR.
-LIBYUV_API
-int I422ToABGR(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
+               const uint16_t* src_u,
                int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_abgr,
-               int dst_stride_abgr,
-               int width,
-               int height);
-
-// Convert J422 to ARGB.
-LIBYUV_API
-int J422ToARGB(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_argb,
-               int dst_stride_argb,
-               int width,
-               int height);
-
-// Convert J422 to ABGR.
-LIBYUV_API
-int J422ToABGR(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_abgr,
-               int dst_stride_abgr,
-               int width,
-               int height);
-
-// Convert H422 to ARGB.
-LIBYUV_API
-int H422ToARGB(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
+               const uint16_t* src_v,
                int src_stride_v,
                uint8_t* dst_argb,
                int dst_stride_argb,
                int width,
                int height);
 
-// Convert H422 to ABGR.
-LIBYUV_API
-int H422ToABGR(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_abgr,
-               int dst_stride_abgr,
-               int width,
-               int height);
-
-// Convert U422 to ARGB.
-LIBYUV_API
-int U422ToARGB(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_argb,
-               int dst_stride_argb,
-               int width,
-               int height);
-
-// Convert U422 to ABGR.
-LIBYUV_API
-int U422ToABGR(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_abgr,
-               int dst_stride_abgr,
-               int width,
-               int height);
-
-// Convert I444 to ARGB.
-LIBYUV_API
-int I444ToARGB(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_argb,
-               int dst_stride_argb,
-               int width,
-               int height);
-
-// Convert I444 to ABGR.
-LIBYUV_API
-int I444ToABGR(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_abgr,
-               int dst_stride_abgr,
-               int width,
-               int height);
-
-// Convert J444 to ARGB.
-LIBYUV_API
-int J444ToARGB(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_argb,
-               int dst_stride_argb,
-               int width,
-               int height);
-
-// Convert J444 to ABGR.
-LIBYUV_API
-int J444ToABGR(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_abgr,
-               int dst_stride_abgr,
-               int width,
-               int height);
-
-// Convert H444 to ARGB.
-LIBYUV_API
-int H444ToARGB(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_argb,
-               int dst_stride_argb,
-               int width,
-               int height);
-
-// Convert H444 to ABGR.
-LIBYUV_API
-int H444ToABGR(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_abgr,
-               int dst_stride_abgr,
-               int width,
-               int height);
-
-// Convert U444 to ARGB.
-LIBYUV_API
-int U444ToARGB(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_argb,
-               int dst_stride_argb,
-               int width,
-               int height);
-
-// Convert U444 to ABGR.
-LIBYUV_API
-int U444ToABGR(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_abgr,
-               int dst_stride_abgr,
-               int width,
-               int height);
-
 // Convert I010 to ARGB.
 LIBYUV_API
 int I010ToARGB(const uint16_t* src_y,
                int src_stride_y,
                const uint16_t* src_u,
                int src_stride_u,
                const uint16_t* src_v,
                int src_stride_v,
@@ -451,114 +123,86 @@ int H010ToABGR(const uint16_t* src_y,
                int src_stride_u,
                const uint16_t* src_v,
                int src_stride_v,
                uint8_t* dst_abgr,
                int dst_stride_abgr,
                int width,
                int height);
 
-// Convert U010 to ARGB.
+// Convert I422 to ARGB.
 LIBYUV_API
-int U010ToARGB(const uint16_t* src_y,
+int I422ToARGB(const uint8_t* src_y,
                int src_stride_y,
-               const uint16_t* src_u,
+               const uint8_t* src_u,
                int src_stride_u,
-               const uint16_t* src_v,
+               const uint8_t* src_v,
                int src_stride_v,
                uint8_t* dst_argb,
                int dst_stride_argb,
                int width,
                int height);
 
-// Convert U010 to ABGR.
+// Convert I444 to ARGB.
 LIBYUV_API
-int U010ToABGR(const uint16_t* src_y,
+int I444ToARGB(const uint8_t* src_y,
                int src_stride_y,
-               const uint16_t* src_u,
+               const uint8_t* src_u,
                int src_stride_u,
-               const uint16_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_abgr,
-               int dst_stride_abgr,
-               int width,
-               int height);
-
-// Convert I210 to ARGB.
-LIBYUV_API
-int I210ToARGB(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_u,
-               int src_stride_u,
-               const uint16_t* src_v,
+               const uint8_t* src_v,
                int src_stride_v,
                uint8_t* dst_argb,
                int dst_stride_argb,
                int width,
                int height);
 
-// Convert I210 to ABGR.
 LIBYUV_API
-int I210ToABGR(const uint16_t* src_y,
+int H444ToARGB(const uint8_t* src_y,
                int src_stride_y,
-               const uint16_t* src_u,
+               const uint8_t* src_u,
                int src_stride_u,
-               const uint16_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_abgr,
-               int dst_stride_abgr,
-               int width,
-               int height);
-
-// Convert H210 to ARGB.
-LIBYUV_API
-int H210ToARGB(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_u,
-               int src_stride_u,
-               const uint16_t* src_v,
+               const uint8_t* src_v,
                int src_stride_v,
                uint8_t* dst_argb,
                int dst_stride_argb,
                int width,
                int height);
 
-// Convert H210 to ABGR.
 LIBYUV_API
-int H210ToABGR(const uint16_t* src_y,
+int U444ToARGB(const uint8_t* src_y,
                int src_stride_y,
-               const uint16_t* src_u,
+               const uint8_t* src_u,
                int src_stride_u,
-               const uint16_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_abgr,
-               int dst_stride_abgr,
-               int width,
-               int height);
-
-// Convert U210 to ARGB.
-LIBYUV_API
-int U210ToARGB(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_u,
-               int src_stride_u,
-               const uint16_t* src_v,
+               const uint8_t* src_v,
                int src_stride_v,
                uint8_t* dst_argb,
                int dst_stride_argb,
                int width,
                int height);
 
-// Convert U210 to ABGR.
+// Convert J444 to ARGB.
 LIBYUV_API
-int U210ToABGR(const uint16_t* src_y,
+int J444ToARGB(const uint8_t* src_y,
                int src_stride_y,
-               const uint16_t* src_u,
+               const uint8_t* src_u,
                int src_stride_u,
-               const uint16_t* src_v,
+               const uint8_t* src_v,
+               int src_stride_v,
+               uint8_t* dst_argb,
+               int dst_stride_argb,
+               int width,
+               int height);
+
+// Convert I444 to ABGR.
+LIBYUV_API
+int I444ToABGR(const uint8_t* src_y,
+               int src_stride_y,
+               const uint8_t* src_u,
+               int src_stride_u,
+               const uint8_t* src_v,
                int src_stride_v,
                uint8_t* dst_abgr,
                int dst_stride_abgr,
                int width,
                int height);
 
 // Convert I420 with Alpha to preattenuated ARGB.
 LIBYUV_API
@@ -587,80 +231,16 @@ int I420AlphaToABGR(const uint8_t* src_y
                     const uint8_t* src_a,
                     int src_stride_a,
                     uint8_t* dst_abgr,
                     int dst_stride_abgr,
                     int width,
                     int height,
                     int attenuate);
 
-// Convert I422 with Alpha to preattenuated ARGB.
-LIBYUV_API
-int I422AlphaToARGB(const uint8_t* src_y,
-                    int src_stride_y,
-                    const uint8_t* src_u,
-                    int src_stride_u,
-                    const uint8_t* src_v,
-                    int src_stride_v,
-                    const uint8_t* src_a,
-                    int src_stride_a,
-                    uint8_t* dst_argb,
-                    int dst_stride_argb,
-                    int width,
-                    int height,
-                    int attenuate);
-
-// Convert I422 with Alpha to preattenuated ABGR.
-LIBYUV_API
-int I422AlphaToABGR(const uint8_t* src_y,
-                    int src_stride_y,
-                    const uint8_t* src_u,
-                    int src_stride_u,
-                    const uint8_t* src_v,
-                    int src_stride_v,
-                    const uint8_t* src_a,
-                    int src_stride_a,
-                    uint8_t* dst_abgr,
-                    int dst_stride_abgr,
-                    int width,
-                    int height,
-                    int attenuate);
-
-// Convert I444 with Alpha to preattenuated ARGB.
-LIBYUV_API
-int I444AlphaToARGB(const uint8_t* src_y,
-                    int src_stride_y,
-                    const uint8_t* src_u,
-                    int src_stride_u,
-                    const uint8_t* src_v,
-                    int src_stride_v,
-                    const uint8_t* src_a,
-                    int src_stride_a,
-                    uint8_t* dst_argb,
-                    int dst_stride_argb,
-                    int width,
-                    int height,
-                    int attenuate);
-
-// Convert I444 with Alpha to preattenuated ABGR.
-LIBYUV_API
-int I444AlphaToABGR(const uint8_t* src_y,
-                    int src_stride_y,
-                    const uint8_t* src_u,
-                    int src_stride_u,
-                    const uint8_t* src_v,
-                    int src_stride_v,
-                    const uint8_t* src_a,
-                    int src_stride_a,
-                    uint8_t* dst_abgr,
-                    int dst_stride_abgr,
-                    int width,
-                    int height,
-                    int attenuate);
-
 // Convert I400 (grey) to ARGB.  Reverse of ARGBToI400.
 LIBYUV_API
 int I400ToARGB(const uint8_t* src_y,
                int src_stride_y,
                uint8_t* dst_argb,
                int dst_stride_argb,
                int width,
                int height);
@@ -695,17 +275,16 @@ int NV21ToARGB(const uint8_t* src_y,
                const uint8_t* src_vu,
                int src_stride_vu,
                uint8_t* dst_argb,
                int dst_stride_argb,
                int width,
                int height);
 
 // Convert NV12 to ABGR.
-LIBYUV_API
 int NV12ToABGR(const uint8_t* src_y,
                int src_stride_y,
                const uint8_t* src_uv,
                int src_stride_uv,
                uint8_t* dst_abgr,
                int dst_stride_abgr,
                int width,
                int height);
@@ -738,48 +317,24 @@ int NV21ToRGB24(const uint8_t* src_y,
                 int src_stride_y,
                 const uint8_t* src_vu,
                 int src_stride_vu,
                 uint8_t* dst_rgb24,
                 int dst_stride_rgb24,
                 int width,
                 int height);
 
-// Convert NV21 to YUV24.
-LIBYUV_API
-int NV21ToYUV24(const uint8_t* src_y,
-                int src_stride_y,
-                const uint8_t* src_vu,
-                int src_stride_vu,
-                uint8_t* dst_yuv24,
-                int dst_stride_yuv24,
-                int width,
-                int height);
-
-// Convert NV12 to RAW.
+// Convert M420 to ARGB.
 LIBYUV_API
-int NV12ToRAW(const uint8_t* src_y,
-              int src_stride_y,
-              const uint8_t* src_uv,
-              int src_stride_uv,
-              uint8_t* dst_raw,
-              int dst_stride_raw,
-              int width,
-              int height);
-
-// Convert NV21 to RAW.
-LIBYUV_API
-int NV21ToRAW(const uint8_t* src_y,
-              int src_stride_y,
-              const uint8_t* src_vu,
-              int src_stride_vu,
-              uint8_t* dst_raw,
-              int dst_stride_raw,
-              int width,
-              int height);
+int M420ToARGB(const uint8_t* src_m420,
+               int src_stride_m420,
+               uint8_t* dst_argb,
+               int dst_stride_argb,
+               int width,
+               int height);
 
 // Convert YUY2 to ARGB.
 LIBYUV_API
 int YUY2ToARGB(const uint8_t* src_yuy2,
                int src_stride_yuy2,
                uint8_t* dst_argb,
                int dst_stride_argb,
                int width,
@@ -789,16 +344,159 @@ int YUY2ToARGB(const uint8_t* src_yuy2,
 LIBYUV_API
 int UYVYToARGB(const uint8_t* src_uyvy,
                int src_stride_uyvy,
                uint8_t* dst_argb,
                int dst_stride_argb,
                int width,
                int height);
 
+// Convert J420 to ARGB.
+LIBYUV_API
+int J420ToARGB(const uint8_t* src_y,
+               int src_stride_y,
+               const uint8_t* src_u,
+               int src_stride_u,
+               const uint8_t* src_v,
+               int src_stride_v,
+               uint8_t* dst_argb,
+               int dst_stride_argb,
+               int width,
+               int height);
+
+// Convert J422 to ARGB.
+LIBYUV_API
+int J422ToARGB(const uint8_t* src_y,
+               int src_stride_y,
+               const uint8_t* src_u,
+               int src_stride_u,
+               const uint8_t* src_v,
+               int src_stride_v,
+               uint8_t* dst_argb,
+               int dst_stride_argb,
+               int width,
+               int height);
+
+// Convert J420 to ABGR.
+LIBYUV_API
+int J420ToABGR(const uint8_t* src_y,
+               int src_stride_y,
+               const uint8_t* src_u,
+               int src_stride_u,
+               const uint8_t* src_v,
+               int src_stride_v,
+               uint8_t* dst_abgr,
+               int dst_stride_abgr,
+               int width,
+               int height);
+
+// Convert J422 to ABGR.
+LIBYUV_API
+int J422ToABGR(const uint8_t* src_y,
+               int src_stride_y,
+               const uint8_t* src_u,
+               int src_stride_u,
+               const uint8_t* src_v,
+               int src_stride_v,
+               uint8_t* dst_abgr,
+               int dst_stride_abgr,
+               int width,
+               int height);
+
+// Convert H420 to ARGB.
+LIBYUV_API
+int H420ToARGB(const uint8_t* src_y,
+               int src_stride_y,
+               const uint8_t* src_u,
+               int src_stride_u,
+               const uint8_t* src_v,
+               int src_stride_v,
+               uint8_t* dst_argb,
+               int dst_stride_argb,
+               int width,
+               int height);
+
+// Convert U420 to ARGB.
+LIBYUV_API
+int U420ToARGB(const uint8_t* src_y,
+               int src_stride_y,
+               const uint8_t* src_u,
+               int src_stride_u,
+               const uint8_t* src_v,
+               int src_stride_v,
+               uint8_t* dst_argb,
+               int dst_stride_argb,
+               int width,
+               int height);
+
+// Convert H422 to ARGB.
+LIBYUV_API
+int H422ToARGB(const uint8_t* src_y,
+               int src_stride_y,
+               const uint8_t* src_u,
+               int src_stride_u,
+               const uint8_t* src_v,
+               int src_stride_v,
+               uint8_t* dst_argb,
+               int dst_stride_argb,
+               int width,
+               int height);
+
+// Convert U422 to ARGB.
+LIBYUV_API
+int U422ToARGB(const uint8_t* src_y,
+               int src_stride_y,
+               const uint8_t* src_u,
+               int src_stride_u,
+               const uint8_t* src_v,
+               int src_stride_v,
+               uint8_t* dst_argb,
+               int dst_stride_argb,
+               int width,
+               int height);
+
+// Convert H420 to ABGR.
+LIBYUV_API
+int H420ToABGR(const uint8_t* src_y,
+               int src_stride_y,
+               const uint8_t* src_u,
+               int src_stride_u,
+               const uint8_t* src_v,
+               int src_stride_v,
+               uint8_t* dst_abgr,
+               int dst_stride_abgr,
+               int width,
+               int height);
+
+// Convert H422 to ABGR.
+LIBYUV_API
+int H422ToABGR(const uint8_t* src_y,
+               int src_stride_y,
+               const uint8_t* src_u,
+               int src_stride_u,
+               const uint8_t* src_v,
+               int src_stride_v,
+               uint8_t* dst_abgr,
+               int dst_stride_abgr,
+               int width,
+               int height);
+
+// Convert H010 to ARGB.
+LIBYUV_API
+int H010ToARGB(const uint16_t* src_y,
+               int src_stride_y,
+               const uint16_t* src_u,
+               int src_stride_u,
+               const uint16_t* src_v,
+               int src_stride_v,
+               uint8_t* dst_argb,
+               int dst_stride_argb,
+               int width,
+               int height);
+
 // Convert I010 to AR30.
 LIBYUV_API
 int I010ToAR30(const uint16_t* src_y,
                int src_stride_y,
                const uint16_t* src_u,
                int src_stride_u,
                const uint16_t* src_v,
                int src_stride_v,
@@ -841,120 +539,16 @@ int H010ToAB30(const uint16_t* src_y,
                int src_stride_u,
                const uint16_t* src_v,
                int src_stride_v,
                uint8_t* dst_ab30,
                int dst_stride_ab30,
                int width,
                int height);
 
-// Convert U010 to AR30.
-LIBYUV_API
-int U010ToAR30(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_u,
-               int src_stride_u,
-               const uint16_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_ar30,
-               int dst_stride_ar30,
-               int width,
-               int height);
-
-// Convert U010 to AB30.
-LIBYUV_API
-int U010ToAB30(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_u,
-               int src_stride_u,
-               const uint16_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_ab30,
-               int dst_stride_ab30,
-               int width,
-               int height);
-
-// Convert I210 to AR30.
-LIBYUV_API
-int I210ToAR30(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_u,
-               int src_stride_u,
-               const uint16_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_ar30,
-               int dst_stride_ar30,
-               int width,
-               int height);
-
-// Convert I210 to AB30.
-LIBYUV_API
-int I210ToAB30(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_u,
-               int src_stride_u,
-               const uint16_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_ab30,
-               int dst_stride_ab30,
-               int width,
-               int height);
-
-// Convert H210 to AR30.
-LIBYUV_API
-int H210ToAR30(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_u,
-               int src_stride_u,
-               const uint16_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_ar30,
-               int dst_stride_ar30,
-               int width,
-               int height);
-
-// Convert H210 to AB30.
-LIBYUV_API
-int H210ToAB30(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_u,
-               int src_stride_u,
-               const uint16_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_ab30,
-               int dst_stride_ab30,
-               int width,
-               int height);
-
-// Convert U210 to AR30.
-LIBYUV_API
-int U210ToAR30(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_u,
-               int src_stride_u,
-               const uint16_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_ar30,
-               int dst_stride_ar30,
-               int width,
-               int height);
-
-// Convert U210 to AB30.
-LIBYUV_API
-int U210ToAB30(const uint16_t* src_y,
-               int src_stride_y,
-               const uint16_t* src_u,
-               int src_stride_u,
-               const uint16_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_ab30,
-               int dst_stride_ab30,
-               int width,
-               int height);
-
 // BGRA little endian (argb in memory) to ARGB.
 LIBYUV_API
 int BGRAToARGB(const uint8_t* src_bgra,
                int src_stride_bgra,
                uint8_t* dst_argb,
                int dst_stride_argb,
                int width,
                int height);
@@ -993,25 +587,16 @@ int RGB24ToARGB(const uint8_t* src_rgb24
 LIBYUV_API
 int RAWToARGB(const uint8_t* src_raw,
               int src_stride_raw,
               uint8_t* dst_argb,
               int dst_stride_argb,
               int width,
               int height);
 
-// RGB big endian (rgb in memory) to RGBA.
-LIBYUV_API
-int RAWToRGBA(const uint8_t* src_raw,
-              int src_stride_raw,
-              uint8_t* dst_rgba,
-              int dst_stride_rgba,
-              int width,
-              int height);
-
 // RGB16 (RGBP fourcc) little endian to ARGB.
 LIBYUV_API
 int RGB565ToARGB(const uint8_t* src_rgb565,
                  int src_stride_rgb565,
                  uint8_t* dst_argb,
                  int dst_stride_argb,
                  int width,
                  int height);
@@ -1061,63 +646,29 @@ int AR30ToABGR(const uint8_t* src_ar30,
 LIBYUV_API
 int AR30ToAB30(const uint8_t* src_ar30,
                int src_stride_ar30,
                uint8_t* dst_ab30,
                int dst_stride_ab30,
                int width,
                int height);
 
-// Convert AR64 to ARGB.
-LIBYUV_API
-int AR64ToARGB(const uint16_t* src_ar64,
-               int src_stride_ar64,
-               uint8_t* dst_argb,
-               int dst_stride_argb,
-               int width,
-               int height);
-
-// Convert AB64 to ABGR.
-#define AB64ToABGR AR64ToARGB
-
-// Convert AB64 to ARGB.
-LIBYUV_API
-int AB64ToARGB(const uint16_t* src_ab64,
-               int src_stride_ab64,
-               uint8_t* dst_argb,
-               int dst_stride_argb,
-               int width,
-               int height);
-
-// Convert AR64 to ABGR.
-#define AR64ToABGR AB64ToARGB
-
-// Convert AR64 To AB64.
-LIBYUV_API
-int AR64ToAB64(const uint16_t* src_ar64,
-               int src_stride_ar64,
-               uint16_t* dst_ab64,
-               int dst_stride_ab64,
-               int width,
-               int height);
-
-// Convert AB64 To AR64.
-#define AB64ToAR64 AR64ToAB64
-
+#ifdef HAVE_JPEG
 // src_width/height provided by capture
 // dst_width/height for clipping determine final size.
 LIBYUV_API
 int MJPGToARGB(const uint8_t* sample,
                size_t sample_size,
                uint8_t* dst_argb,
                int dst_stride_argb,
                int src_width,
                int src_height,
                int dst_width,
                int dst_height);
+#endif
 
 // Convert Android420 to ARGB.
 LIBYUV_API
 int Android420ToARGB(const uint8_t* src_y,
                      int src_stride_y,
                      const uint8_t* src_u,
                      int src_stride_u,
                      const uint8_t* src_v,
@@ -1137,1019 +688,58 @@ int Android420ToABGR(const uint8_t* src_
                      const uint8_t* src_v,
                      int src_stride_v,
                      int src_pixel_stride_uv,
                      uint8_t* dst_abgr,
                      int dst_stride_abgr,
                      int width,
                      int height);
 
-// Convert NV12 to RGB565.
-LIBYUV_API
-int NV12ToRGB565(const uint8_t* src_y,
-                 int src_stride_y,
-                 const uint8_t* src_uv,
-                 int src_stride_uv,
-                 uint8_t* dst_rgb565,
-                 int dst_stride_rgb565,
-                 int width,
-                 int height);
-
-// Convert I422 to BGRA.
-LIBYUV_API
-int I422ToBGRA(const uint8_t* src_y,
-               int src_stride_y,
-               const uint8_t* src_u,
-               int src_stride_u,
-               const uint8_t* src_v,
-               int src_stride_v,
-               uint8_t* dst_bgra,
-               int dst_stride_bgra,
-               int width,
-               int height);
-
-// Convert I422 to ABGR.