diff --git a/AUTHORS b/AUTHORS
index ea13f21..5123c7e 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -519,6 +519,7 @@
 Leung Wing Chung <lwchkg@gmail.com>
 Li Yin <li.yin@intel.com>
 Lidwine Genevet <lgenevet@cisco.com>
+Lin Sun <lin.sun@intel.com>
 Lingyun Cai <lingyun.cai@intel.com>
 Lionel Landwerlin <lionel.g.landwerlin@intel.com>
 Lizhi Fan <lizhi.fan@samsung.com>
diff --git a/DEPS b/DEPS
index 84dd2aa..a23827e 100644
--- a/DEPS
+++ b/DEPS
@@ -112,11 +112,11 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling sfntly
   # and whatever else without interference from each other.
-  'sfntly_revision': '2804148152d27fa2e6ec97a32bc2d56318e51142',
+  'sfntly_revision': 'b55ff303ea2f9e26702b514cf6a3196a2e3e2974',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling Skia
   # and whatever else without interference from each other.
-  'skia_revision': '5d3deb7301b1f41764b9959d44c7d6d6312d74a4',
+  'skia_revision': '0e50a38dcaee9f3061aa0ddd850322fec5998d78',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling V8
   # and whatever else without interference from each other.
@@ -176,7 +176,7 @@
   # 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': '0273c5e3c23ad25ac6626cbadd00695bf0d93b3f',
+  'catapult_revision': '2e722b007d34e61aad0b5f13d74e5a5d9616c1a0',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling libFuzzer
   # and whatever else without interference from each other.
@@ -908,7 +908,7 @@
   },
 
   'src/third_party/libvpx/source/libvpx':
-    Var('chromium_git') + '/webm/libvpx.git' + '@' +  'fa0076282e62f649483bde868602aab86448a661',
+    Var('chromium_git') + '/webm/libvpx.git' + '@' +  '7808cc796ef1b7dde0a5e03f6d71e8a7f0174a1e',
 
   'src/third_party/libwebm/source':
     Var('chromium_git') + '/webm/libwebm.git' + '@' + 'e4931ebc0a816458c18a6734e91a4d1b5acd5c56',
@@ -1009,7 +1009,7 @@
   },
 
   'src/third_party/perfetto':
-    Var('android_git') + '/platform/external/perfetto.git' + '@' +  'cc7964918f7c9fd3ba0eba8fb7a097ad05a36ec1',
+    Var('android_git') + '/platform/external/perfetto.git' + '@' +  '3ca5cecde5b0c64c9310b4380a5379e65700de21',
 
   'src/third_party/perl': {
       'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + 'ac0d98b5cee6c024b0cffeb4f8f45b6fc5ccdb78',
@@ -1161,7 +1161,7 @@
     Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + '0d55c887e92b645f6effe753528323ab2ffd94c2',
 
   'src/third_party/webrtc':
-    Var('webrtc_git') + '/src.git' + '@' + '34fc346a0c77e21bffb6a6631e265a707e6e4ae2',
+    Var('webrtc_git') + '/src.git' + '@' + 'dc98b9b975fae15e31c11a5d3f3ec499f3d5c6d3',
 
   'src/third_party/xdg-utils': {
       'url': Var('chromium_git') + '/chromium/deps/xdg-utils.git' + '@' + 'd80274d5869b17b8c9067a1022e4416ee7ed5e0d',
@@ -1192,7 +1192,7 @@
     Var('chromium_git') + '/v8/v8.git' + '@' +  Var('v8_revision'),
 
   'src-internal': {
-    'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@6eef2ff50b8c294d3a0fa6dd457546d6e60f08a5',
+    'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@0ab40518b6d4ce37271f94b172a212c14f5d101c',
     'condition': 'checkout_src_internal',
   },
 
diff --git a/android_webview/browser/aw_autofill_client.cc b/android_webview/browser/aw_autofill_client.cc
index a9da8427..287941f 100644
--- a/android_webview/browser/aw_autofill_client.cc
+++ b/android_webview/browser/aw_autofill_client.cc
@@ -299,8 +299,9 @@
     const autofill::CreditCard& card,
     std::unique_ptr<base::DictionaryValue> legal_message,
     bool should_request_name_from_user,
+    bool should_request_expiration_date_from_user,
     bool show_prompt,
-    base::OnceCallback<void(const base::string16&)> callback) {
+    UserAcceptedUploadCallback callback) {
   NOTIMPLEMENTED();
 }
 
diff --git a/android_webview/browser/aw_autofill_client.h b/android_webview/browser/aw_autofill_client.h
index ef7ec7d..a2ae178 100644
--- a/android_webview/browser/aw_autofill_client.h
+++ b/android_webview/browser/aw_autofill_client.h
@@ -91,8 +91,9 @@
       const autofill::CreditCard& card,
       std::unique_ptr<base::DictionaryValue> legal_message,
       bool should_request_name_from_user,
+      bool should_request_expiration_date_from_user,
       bool show_prompt,
-      base::OnceCallback<void(const base::string16&)> callback) override;
+      UserAcceptedUploadCallback callback) override;
   void ConfirmCreditCardFillAssist(const autofill::CreditCard& card,
                                    const base::Closure& callback) override;
   void LoadRiskData(
diff --git a/android_webview/browser/aw_metrics_service_client.cc b/android_webview/browser/aw_metrics_service_client.cc
index 70d1371..d9fe0807 100644
--- a/android_webview/browser/aw_metrics_service_client.cc
+++ b/android_webview/browser/aw_metrics_service_client.cc
@@ -32,6 +32,7 @@
 #include "components/metrics/metrics_pref_names.h"
 #include "components/metrics/metrics_service.h"
 #include "components/metrics/metrics_state_manager.h"
+#include "components/metrics/net/network_metrics_provider.h"
 #include "components/metrics/ui/screen_info_metrics_provider.h"
 #include "components/metrics/url_constants.h"
 #include "components/metrics/version_utils.h"
@@ -39,6 +40,7 @@
 #include "components/version_info/android/channel_getter.h"
 #include "components/version_info/version_info.h"
 #include "content/public/browser/browser_thread.h"
+#include "content/public/browser/network_service_instance.h"
 
 namespace android_webview {
 
@@ -167,7 +169,8 @@
 
   metrics_service_->RegisterMetricsProvider(
       std::unique_ptr<metrics::MetricsProvider>(
-          new metrics::NetworkMetricsProvider));
+          new metrics::NetworkMetricsProvider(
+              content::CreateNetworkConnectionTrackerAsyncGetter())));
 
   metrics_service_->RegisterMetricsProvider(
       std::unique_ptr<metrics::MetricsProvider>(
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index d288af8..85eeb09 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -1678,9 +1678,6 @@
             String baseUrl, String data, String mimeType, String encoding, String historyUrl) {
         if (TRACE) Log.i(TAG, "%s loadDataWithBaseURL=%s", this, baseUrl);
         if (isDestroyedOrNoOperation(WARN)) return;
-        if (data != null && data.contains("#")) {
-            RecordHistogram.recordBooleanHistogram(DATA_URI_HISTOGRAM_NAME, true);
-        }
 
         data = fixupData(data);
         mimeType = fixupMimeType(mimeType);
@@ -1697,6 +1694,10 @@
         }
 
         if (baseUrl.startsWith("data:")) {
+            // We record only for this branch, because the other branch assumes unencoded content.
+            if (data != null && data.contains("#")) {
+                RecordHistogram.recordBooleanHistogram(DATA_URI_HISTOGRAM_NAME, true);
+            }
             // For backwards compatibility with WebViewClassic, we use the value of |encoding|
             // as the charset, as long as it's not "base64".
             boolean isBase64 = isBase64Encoded(encoding);
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java
index 66000c7..cb0bdbc 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsTest.java
@@ -844,11 +844,19 @@
         });
         Assert.assertEquals(0, getHistogramSampleCount(AwContents.DATA_URI_HISTOGRAM_NAME));
 
-        // Check a URL with a '#' character.
+        // '#' is legal if the baseUrl is not data scheme, because loadDataWithBaseURL accepts
+        // unencoded content.
         mActivityTestRule.runOnUiThread(() -> {
             awContents.loadDataWithBaseURL(
                     "http://www.example.com", "<html>test#foo</html>", "text/html", null, null);
         });
+        Assert.assertEquals(0, getHistogramSampleCount(AwContents.DATA_URI_HISTOGRAM_NAME));
+
+        // Check a URL with a '#' character, with data-scheme baseUrl.
+        mActivityTestRule.runOnUiThread(() -> {
+            awContents.loadDataWithBaseURL(
+                    "data:text/html", "<html>test#foo</html>", "text/html", null, null);
+        });
         Assert.assertEquals(1, getHistogramSampleCount(AwContents.DATA_URI_HISTOGRAM_NAME));
 
         // An encoded '#' should not cause the histogram to increment.
diff --git a/android_webview/support_library/callback/java/src/org/chromium/support_lib_callback_glue/SupportLibWebViewContentsClientAdapter.java b/android_webview/support_library/callback/java/src/org/chromium/support_lib_callback_glue/SupportLibWebViewContentsClientAdapter.java
index 8024a39..566fffe 100644
--- a/android_webview/support_library/callback/java/src/org/chromium/support_lib_callback_glue/SupportLibWebViewContentsClientAdapter.java
+++ b/android_webview/support_library/callback/java/src/org/chromium/support_lib_callback_glue/SupportLibWebViewContentsClientAdapter.java
@@ -14,6 +14,7 @@
 import org.chromium.android_webview.AwSafeBrowsingResponse;
 import org.chromium.android_webview.ScopedSysTraceEvent;
 import org.chromium.base.Callback;
+import org.chromium.base.metrics.RecordHistogram;
 import org.chromium.support_lib_boundary.SafeBrowsingResponseBoundaryInterface;
 import org.chromium.support_lib_boundary.WebResourceErrorBoundaryInterface;
 import org.chromium.support_lib_boundary.WebViewClientBoundaryInterface;
@@ -30,6 +31,9 @@
     private static final String WEBVIEW_CLIENT_COMPAT_NAME = "androidx.webkit.WebViewClientCompat";
     private static final String[] EMPTY_FEATURE_LIST = new String[0];
 
+    private static final String COMPAT_CLIENT_HISTOGRAM =
+            "Android.WebView.SupportLibrary.ClientIsCompat";
+
     // If {@code null}, this indicates the WebViewClient is not a WebViewClientCompat. Otherwise,
     // this is a Proxy for the WebViewClientCompat.
     @Nullable
@@ -47,6 +51,13 @@
             mWebViewClientSupportedFeatures = mWebViewClient == null
                     ? EMPTY_FEATURE_LIST
                     : mWebViewClient.getSupportedFeatures();
+
+            // We ignore the case where the client is set to null, since this is often done by
+            // WebView's internal logic (such as during destroy()), and would otherwise skew data.
+            if (possiblyCompatClient != null) {
+                RecordHistogram.recordBooleanHistogram(
+                        COMPAT_CLIENT_HISTOGRAM, mWebViewClient != null);
+            }
         }
     }
 
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index 0e043b2..f48967a 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -165,7 +165,7 @@
           l10n_util::GetStringUTF16(IDS_DEPRECATED_SHORTCUT_TITLE), message,
           base::string16(), GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT,
+              message_center::NotifierType::SYSTEM_COMPONENT,
               kNotifierAccelerator),
           message_center::RichNotificationData(), std::move(delegate),
           kNotificationKeyboardIcon, SystemNotificationWarningLevel::NORMAL);
@@ -799,6 +799,16 @@
   return features::IsDockedMagnifierEnabled();
 }
 
+bool CanHandleToggleOverview() {
+  auto windows = Shell::Get()->mru_window_tracker()->BuildMruWindowList();
+  // Do not toggle overview if there is a window being dragged.
+  for (auto* window : windows) {
+    if (wm::GetWindowState(window)->is_dragged())
+      return false;
+  }
+  return true;
+}
+
 void CreateAndShowStickyNotification(const int title_id,
                                      const int message_id,
                                      const std::string& notification_id) {
@@ -809,7 +819,7 @@
           l10n_util::GetStringUTF16(message_id),
           base::string16() /* display source */, GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT,
+              message_center::NotifierType::SYSTEM_COMPONENT,
               kNotifierAccelerator),
           message_center::RichNotificationData(), nullptr,
           kNotificationAccessibilityIcon,
@@ -1314,6 +1324,8 @@
       return true;
     case TOGGLE_MIRROR_MODE:
       return true;
+    case TOGGLE_OVERVIEW:
+      return CanHandleToggleOverview();
     case TOUCH_HUD_CLEAR:
     case TOUCH_HUD_MODE_CHANGE:
       return CanHandleTouchHud();
@@ -1369,7 +1381,6 @@
     case TOGGLE_FULLSCREEN:
     case TOGGLE_HIGH_CONTRAST:
     case TOGGLE_MAXIMIZED:
-    case TOGGLE_OVERVIEW:
     case TOGGLE_SPOKEN_FEEDBACK:
     case TOGGLE_SYSTEM_TRAY_BUBBLE:
     case TOGGLE_WIFI:
diff --git a/ash/accessibility/accessibility_controller.cc b/ash/accessibility/accessibility_controller.cc
index ac02fd1..9b67554 100644
--- a/ash/accessibility/accessibility_controller.cc
+++ b/ash/accessibility/accessibility_controller.cc
@@ -214,7 +214,7 @@
           message_center::NOTIFICATION_TYPE_SIMPLE, kNotificationId, title,
           text, base::string16(), GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT,
+              message_center::NotifierType::SYSTEM_COMPONENT,
               kNotifierAccessibility),
           options, nullptr, GetNotificationIcon(type),
           message_center::SystemNotificationWarningLevel::NORMAL);
diff --git a/ash/app_menu/notification_menu_controller_unittest.cc b/ash/app_menu/notification_menu_controller_unittest.cc
index 5c5c94b..a4fdfbc 100644
--- a/ash/app_menu/notification_menu_controller_unittest.cc
+++ b/ash/app_menu/notification_menu_controller_unittest.cc
@@ -20,7 +20,7 @@
 void BuildAndSendNotification(const std::string& app_id,
                               const std::string& notification_id) {
   const message_center::NotifierId notifier_id(
-      message_center::NotifierId::APPLICATION, app_id);
+      message_center::NotifierType::APPLICATION, app_id);
   std::unique_ptr<message_center::Notification> notification =
       std::make_unique<message_center::Notification>(
           message_center::NOTIFICATION_TYPE_SIMPLE, notification_id,
diff --git a/ash/app_menu/notification_menu_view_unittest.cc b/ash/app_menu/notification_menu_view_unittest.cc
index 390f294f..00ce257 100644
--- a/ash/app_menu/notification_menu_view_unittest.cc
+++ b/ash/app_menu/notification_menu_view_unittest.cc
@@ -121,7 +121,7 @@
       const base::string16& title,
       const base::string16& message) {
     const message_center::NotifierId notifier_id(
-        message_center::NotifierId::APPLICATION, kTestAppId);
+        message_center::NotifierType::APPLICATION, kTestAppId);
     message_center::Notification notification(
         message_center::NOTIFICATION_TYPE_SIMPLE, notification_id, title,
         message, gfx::Image(), base::ASCIIToUTF16("www.test.org"), GURL(),
@@ -137,7 +137,7 @@
       const base::string16& title,
       const base::string16& message) {
     const message_center::NotifierId notifier_id(
-        message_center::NotifierId::APPLICATION, kTestAppId);
+        message_center::NotifierType::APPLICATION, kTestAppId);
     message_center::Notification notification(
         message_center::NOTIFICATION_TYPE_SIMPLE, notification_id, title,
         message, gfx::Image(), base::ASCIIToUTF16("www.test.org"), GURL(),
diff --git a/ash/assistant/assistant_notification_controller.cc b/ash/assistant/assistant_notification_controller.cc
index 0f3c727..03c88560 100644
--- a/ash/assistant/assistant_notification_controller.cc
+++ b/ash/assistant/assistant_notification_controller.cc
@@ -98,7 +98,7 @@
 
 message_center::NotifierId GetNotifierId() {
   return message_center::NotifierId(
-      message_center::NotifierId::SYSTEM_COMPONENT, kNotifierAssistant);
+      message_center::NotifierType::SYSTEM_COMPONENT, kNotifierAssistant);
 }
 
 }  // namespace
diff --git a/ash/detachable_base/detachable_base_notification_controller.cc b/ash/detachable_base/detachable_base_notification_controller.cc
index b7b81f5..c630130 100644
--- a/ash/detachable_base/detachable_base_notification_controller.cc
+++ b/ash/detachable_base/detachable_base_notification_controller.cc
@@ -69,7 +69,7 @@
           kBaseRequiresUpdateNotificationId, title, message, base::string16(),
           GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT,
+              message_center::NotifierType::SYSTEM_COMPONENT,
               kDetachableBaseNotifierId),
           message_center::RichNotificationData(), nullptr,
           kNotificationWarningIcon,
@@ -144,7 +144,7 @@
           message_center::NOTIFICATION_TYPE_SIMPLE, kBaseChangedNotificationId,
           title, message, base::string16(), GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT,
+              message_center::NotifierType::SYSTEM_COMPONENT,
               kDetachableBaseNotifierId),
           options, nullptr, kNotificationWarningIcon,
           message_center::SystemNotificationWarningLevel::CRITICAL_WARNING);
diff --git a/ash/display/display_util.cc b/ash/display/display_util.cc
index 3e2d26c3..9fb914576 100644
--- a/ash/display/display_util.cc
+++ b/ash/display/display_util.cc
@@ -159,7 +159,7 @@
           base::string16(),  // display_source
           GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT,
+              message_center::NotifierType::SYSTEM_COMPONENT,
               kNotifierDisplayError),
           data,
           base::MakeRefCounted<message_center::HandleNotificationClickDelegate>(
diff --git a/ash/display/resolution_notification_controller.cc b/ash/display/resolution_notification_controller.cc
index 1a1fadd..890a9fe 100644
--- a/ash/display/resolution_notification_controller.cc
+++ b/ash/display/resolution_notification_controller.cc
@@ -227,7 +227,7 @@
           base::string16(),  // display_source
           GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT,
+              message_center::NotifierType::SYSTEM_COMPONENT,
               kNotifierDisplayResolutionChange),
           data,
           base::MakeRefCounted<message_center::ThunkNotificationDelegate>(
diff --git a/ash/host/ash_window_tree_host_platform.cc b/ash/host/ash_window_tree_host_platform.cc
index b5f7d96..903b733 100644
--- a/ash/host/ash_window_tree_host_platform.cc
+++ b/ash/host/ash_window_tree_host_platform.cc
@@ -175,10 +175,9 @@
 
 void AshWindowTreeHostPlatform::SetBoundsInPixels(
     const gfx::Rect& bounds,
-    const viz::LocalSurfaceId& local_surface_id,
-    base::TimeTicks allocation_time) {
-  WindowTreeHostPlatform::SetBoundsInPixels(bounds, local_surface_id,
-                                            allocation_time);
+    const viz::LocalSurfaceIdAllocation& local_surface_id_allocation) {
+  WindowTreeHostPlatform::SetBoundsInPixels(bounds,
+                                            local_surface_id_allocation);
   ConfineCursorToRootWindow();
 }
 
diff --git a/ash/host/ash_window_tree_host_platform.h b/ash/host/ash_window_tree_host_platform.h
index 9f1ad01a..243ff476 100644
--- a/ash/host/ash_window_tree_host_platform.h
+++ b/ash/host/ash_window_tree_host_platform.h
@@ -66,8 +66,8 @@
       const gfx::Size& host_size_in_pixels) const override;
   void OnCursorVisibilityChangedNative(bool show) override;
   void SetBoundsInPixels(const gfx::Rect& bounds,
-                         const viz::LocalSurfaceId& local_surface_id,
-                         base::TimeTicks allocation_time) override;
+                         const viz::LocalSurfaceIdAllocation&
+                             local_surface_id_allocation) override;
   void DispatchEvent(ui::Event* event) override;
   bool ShouldSendKeyEventToIme() override;
 
diff --git a/ash/host/ash_window_tree_host_unified.cc b/ash/host/ash_window_tree_host_unified.cc
index 5e796fc..c4d4921 100644
--- a/ash/host/ash_window_tree_host_unified.cc
+++ b/ash/host/ash_window_tree_host_unified.cc
@@ -94,10 +94,9 @@
 
 void AshWindowTreeHostUnified::SetBoundsInPixels(
     const gfx::Rect& bounds,
-    const viz::LocalSurfaceId& local_surface_id,
-    base::TimeTicks allocation_time) {
-  AshWindowTreeHostPlatform::SetBoundsInPixels(bounds, local_surface_id,
-                                               allocation_time);
+    const viz::LocalSurfaceIdAllocation& local_surface_id_allocation) {
+  AshWindowTreeHostPlatform::SetBoundsInPixels(bounds,
+                                               local_surface_id_allocation);
   OnHostResizedInPixels(bounds.size());
 }
 
diff --git a/ash/host/ash_window_tree_host_unified.h b/ash/host/ash_window_tree_host_unified.h
index f3d89e1..5d8b1bcc 100644
--- a/ash/host/ash_window_tree_host_unified.h
+++ b/ash/host/ash_window_tree_host_unified.h
@@ -32,8 +32,8 @@
 
   // aura::WindowTreeHost:
   void SetBoundsInPixels(const gfx::Rect& bounds,
-                         const viz::LocalSurfaceId& local_surface_id,
-                         base::TimeTicks allocation_time) override;
+                         const viz::LocalSurfaceIdAllocation&
+                             local_surface_id_allocation) override;
   void SetCursorNative(gfx::NativeCursor cursor) override;
   void OnCursorVisibilityChangedNative(bool show) override;
 
diff --git a/ash/media/media_notification_controller.cc b/ash/media/media_notification_controller.cc
index 1508534..e71f378 100644
--- a/ash/media/media_notification_controller.cc
+++ b/ash/media/media_notification_controller.cc
@@ -70,7 +70,7 @@
           kMediaSessionNotificationId, base::string16(), base::string16(),
           base::string16(), GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT,
+              message_center::NotifierType::SYSTEM_COMPONENT,
               kMediaSessionNotifierId),
           message_center::RichNotificationData(),
           base::MakeRefCounted<message_center::HandleNotificationClickDelegate>(
diff --git a/ash/multi_device_setup/multi_device_notification_presenter.cc b/ash/multi_device_setup/multi_device_notification_presenter.cc
index 9df2913..83716894 100644
--- a/ash/multi_device_setup/multi_device_notification_presenter.cc
+++ b/ash/multi_device_setup/multi_device_notification_presenter.cc
@@ -253,9 +253,8 @@
       message_center::NotificationType::NOTIFICATION_TYPE_SIMPLE,
       kNotificationId, title, message, base::string16() /* display_source */,
       GURL() /* origin_url */,
-      message_center::NotifierId(
-          message_center::NotifierId::NotifierType::SYSTEM_COMPONENT,
-          kNotifierMultiDevice),
+      message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
+                                 kNotifierMultiDevice),
       message_center::RichNotificationData(),
       new message_center::HandleNotificationClickDelegate(base::BindRepeating(
           &MultiDeviceNotificationPresenter::OnNotificationClicked,
diff --git a/ash/shelf/shelf_controller.cc b/ash/shelf/shelf_controller.cc
index af96c81..8e3e3e8 100644
--- a/ash/shelf/shelf_controller.cc
+++ b/ash/shelf/shelf_controller.cc
@@ -415,9 +415,9 @@
 
   // Skip this if the notification shouldn't badge an app.
   if (notification->notifier_id().type !=
-          message_center::NotifierId::APPLICATION &&
+          message_center::NotifierType::APPLICATION &&
       notification->notifier_id().type !=
-          message_center::NotifierId::ARC_APPLICATION) {
+          message_center::NotifierType::ARC_APPLICATION) {
     return;
   }
 
diff --git a/ash/shelf/shelf_controller_unittest.cc b/ash/shelf/shelf_controller_unittest.cc
index 9d965f5..819322b 100644
--- a/ash/shelf/shelf_controller_unittest.cc
+++ b/ash/shelf/shelf_controller_unittest.cc
@@ -42,7 +42,7 @@
                               const std::string& app_id,
                               const std::string& notification_id) {
   const message_center::NotifierId notifier_id(
-      message_center::NotifierId::APPLICATION, app_id);
+      message_center::NotifierType::APPLICATION, app_id);
   std::unique_ptr<message_center::Notification> notification =
       std::make_unique<message_center::Notification>(
           message_center::NOTIFICATION_TYPE_SIMPLE, notification_id,
diff --git a/ash/shell/window_type_launcher.cc b/ash/shell/window_type_launcher.cc
index 95a2b54..14e7d0b2 100644
--- a/ash/shell/window_type_launcher.cc
+++ b/ash/shell/window_type_launcher.cc
@@ -289,8 +289,8 @@
             base::ASCIIToUTF16("Test Shell Web Notification"),
             base::ASCIIToUTF16("Notification message body."), gfx::Image(),
             base::ASCIIToUTF16("www.testshell.org"), GURL(),
-            message_center::NotifierId(message_center::NotifierId::APPLICATION,
-                                       "test-id"),
+            message_center::NotifierId(
+                message_center::NotifierType::APPLICATION, "test-id"),
             message_center::RichNotificationData(), nullptr /* delegate */);
 
     message_center::MessageCenter::Get()->AddNotification(
diff --git a/ash/system/bluetooth/bluetooth_notification_controller.cc b/ash/system/bluetooth/bluetooth_notification_controller.cc
index 98dd3b3..7fc992e 100644
--- a/ash/system/bluetooth/bluetooth_notification_controller.cc
+++ b/ash/system/bluetooth/bluetooth_notification_controller.cc
@@ -279,7 +279,8 @@
                                      base::UTF8ToUTF16(adapter_->GetAddress())),
           base::string16() /* display source */, GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT, kNotifierBluetooth),
+              message_center::NotifierType::SYSTEM_COMPONENT,
+              kNotifierBluetooth),
           optional, nullptr, kNotificationBluetoothIcon,
           message_center::SystemNotificationWarningLevel::NORMAL);
   MessageCenter::Get()->AddNotification(std::move(notification));
@@ -303,7 +304,8 @@
           kBluetoothDevicePairingNotificationId, base::string16() /* title */,
           message, base::string16() /* display source */, GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT, kNotifierBluetooth),
+              message_center::NotifierType::SYSTEM_COMPONENT,
+              kNotifierBluetooth),
           optional,
           new BluetoothPairingNotificationDelegate(adapter_,
                                                    device->GetAddress()),
@@ -330,7 +332,8 @@
                                      device->GetNameForDisplay()),
           base::string16() /* display source */, GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT, kNotifierBluetooth),
+              message_center::NotifierType::SYSTEM_COMPONENT,
+              kNotifierBluetooth),
           optional, nullptr, kNotificationBluetoothIcon,
           message_center::SystemNotificationWarningLevel::NORMAL);
   MessageCenter::Get()->AddNotification(std::move(notification));
diff --git a/ash/system/caps_lock_notification_controller.cc b/ash/system/caps_lock_notification_controller.cc
index 92d5767d..ae66a03 100644
--- a/ash/system/caps_lock_notification_controller.cc
+++ b/ash/system/caps_lock_notification_controller.cc
@@ -39,7 +39,8 @@
           l10n_util::GetStringUTF16(string_id),
           base::string16() /* display_source */, GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT, kNotifierCapsLock),
+              message_center::NotifierType::SYSTEM_COMPONENT,
+              kNotifierCapsLock),
           message_center::RichNotificationData(), nullptr,
           kNotificationCapslockIcon,
           message_center::SystemNotificationWarningLevel::NORMAL);
diff --git a/ash/system/cast/cast_notification_controller.cc b/ash/system/cast/cast_notification_controller.cc
index 2aec527..b2b0c4e 100644
--- a/ash/system/cast/cast_notification_controller.cc
+++ b/ash/system/cast/cast_notification_controller.cc
@@ -95,7 +95,7 @@
             GetNotificationTitle(sink, route), GetNotificationMessage(route),
             base::string16() /* display_source */, GURL(),
             message_center::NotifierId(
-                message_center::NotifierId::SYSTEM_COMPONENT, kNotifierId),
+                message_center::NotifierType::SYSTEM_COMPONENT, kNotifierId),
             data,
             base::MakeRefCounted<
                 message_center::HandleNotificationClickDelegate>(
diff --git a/ash/system/locale/locale_notification_controller.cc b/ash/system/locale/locale_notification_controller.cc
index cdc69cd..1e32be6 100644
--- a/ash/system/locale/locale_notification_controller.cc
+++ b/ash/system/locale/locale_notification_controller.cc
@@ -108,7 +108,7 @@
                                      from, to),
           base::string16() /* display_source */, GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT, kNotifierLocale),
+              message_center::NotifierType::SYSTEM_COMPONENT, kNotifierLocale),
           optional, new LocaleNotificationDelegate(std::move(callback)),
           kNotificationSettingsIcon,
           message_center::SystemNotificationWarningLevel::NORMAL);
diff --git a/ash/system/message_center/arc/arc_notification_content_view_unittest.cc b/ash/system/message_center/arc/arc_notification_content_view_unittest.cc
index 6c07e84a..f945d31 100644
--- a/ash/system/message_center/arc/arc_notification_content_view_unittest.cc
+++ b/ash/system/message_center/arc/arc_notification_content_view_unittest.cc
@@ -215,8 +215,8 @@
         notification_item->GetNotificationId(), base::UTF8ToUTF16("title"),
         base::UTF8ToUTF16("message"), gfx::Image(), base::UTF8ToUTF16("arc"),
         GURL(),
-        message_center::NotifierId(message_center::NotifierId::ARC_APPLICATION,
-                                   "ARC_NOTIFICATION"),
+        message_center::NotifierId(
+            message_center::NotifierType::ARC_APPLICATION, "ARC_NOTIFICATION"),
         optional_fields,
         new ArcNotificationDelegate(notification_item->GetWeakPtr()));
     notification.set_custom_view_type(kArcNotificationCustomViewType);
@@ -314,7 +314,7 @@
       notification_item->GetNotificationId(), base::UTF8ToUTF16("title"),
       base::UTF8ToUTF16("message"), gfx::Image(), base::UTF8ToUTF16("arc"),
       GURL(),
-      message_center::NotifierId(message_center::NotifierId::ARC_APPLICATION,
+      message_center::NotifierId(message_center::NotifierType::ARC_APPLICATION,
                                  "ARC_NOTIFICATION"),
       message_center::RichNotificationData(), nullptr);
   MessageCenter::Get()->AddNotification(std::move(mc_notification));
diff --git a/ash/system/message_center/arc/arc_notification_item_impl.cc b/ash/system/message_center/arc/arc_notification_item_impl.cc
index e0e6c6e..ca2d097 100644
--- a/ash/system/message_center/arc/arc_notification_item_impl.cc
+++ b/ash/system/message_center/arc/arc_notification_item_impl.cc
@@ -110,7 +110,7 @@
       is_snooze_supported && !is_setting_shown;
 
   message_center::NotifierId notifier_id(
-      message_center::NotifierId::ARC_APPLICATION,
+      message_center::NotifierType::ARC_APPLICATION,
       app_id.empty() ? kDefaultArcNotifierId : app_id);
   notifier_id.profile_id = profile_id_.GetUserEmail();
 
diff --git a/ash/system/message_center/arc/arc_notification_manager.cc b/ash/system/message_center/arc/arc_notification_manager.cc
index 14bf0c0..b923fed4 100644
--- a/ash/system/message_center/arc/arc_notification_manager.cc
+++ b/ash/system/message_center/arc/arc_notification_manager.cc
@@ -44,7 +44,7 @@
 std::unique_ptr<message_center::MessageView> CreateCustomMessageView(
     const message_center::Notification& notification) {
   DCHECK_EQ(notification.notifier_id().type,
-            message_center::NotifierId::ARC_APPLICATION);
+            message_center::NotifierType::ARC_APPLICATION);
   DCHECK_EQ(kArcNotificationCustomViewType, notification.custom_view_type());
   auto* arc_delegate =
       static_cast<ArcNotificationDelegate*>(notification.delegate());
diff --git a/ash/system/message_center/arc/arc_notification_view_unittest.cc b/ash/system/message_center/arc/arc_notification_view_unittest.cc
index 1e6ac07..bea8621 100644
--- a/ash/system/message_center/arc/arc_notification_view_unittest.cc
+++ b/ash/system/message_center/arc/arc_notification_view_unittest.cc
@@ -105,8 +105,8 @@
         message_center::NOTIFICATION_TYPE_CUSTOM, kDefaultNotificationId,
         base::UTF8ToUTF16("title"), base::UTF8ToUTF16("message"), gfx::Image(),
         base::UTF8ToUTF16("display source"), GURL(),
-        message_center::NotifierId(message_center::NotifierId::ARC_APPLICATION,
-                                   "test_app_id"),
+        message_center::NotifierId(
+            message_center::NotifierType::ARC_APPLICATION, "test_app_id"),
         message_center::RichNotificationData(), nullptr);
 
     notification->set_custom_view_type(kArcNotificationCustomViewType);
@@ -304,7 +304,7 @@
       message_center::NOTIFICATION_TYPE_CUSTOM, kDefaultNotificationId,
       base::UTF8ToUTF16("title"), base::UTF8ToUTF16("message"), gfx::Image(),
       base::UTF8ToUTF16("display source"), GURL(),
-      message_center::NotifierId(message_center::NotifierId::ARC_APPLICATION,
+      message_center::NotifierId(message_center::NotifierType::ARC_APPLICATION,
                                  "test_app_id"),
       rich_data, nullptr);
 
diff --git a/ash/system/message_center/fullscreen_notification_blocker.cc b/ash/system/message_center/fullscreen_notification_blocker.cc
index 381044f9..f97441ac 100644
--- a/ash/system/message_center/fullscreen_notification_blocker.cc
+++ b/ash/system/message_center/fullscreen_notification_blocker.cc
@@ -36,8 +36,7 @@
 
   if (enabled && !should_block_) {
     UMA_HISTOGRAM_ENUMERATION("Notifications.Display_Windowed",
-                              notification.notifier_id().type,
-                              message_center::NotifierId::SIZE);
+                              notification.notifier_id().type);
   }
 
   return enabled;
diff --git a/ash/system/message_center/inactive_user_notification_blocker_unittest.cc b/ash/system/message_center/inactive_user_notification_blocker_unittest.cc
index 53d49e0..aa655e5e 100644
--- a/ash/system/message_center/inactive_user_notification_blocker_unittest.cc
+++ b/ash/system/message_center/inactive_user_notification_blocker_unittest.cc
@@ -112,14 +112,15 @@
 
 TEST_F(InactiveUserNotificationBlockerTest, Basic) {
   message_center::NotifierId notifier_id(
-      message_center::NotifierId::APPLICATION, "test-app");
+      message_center::NotifierType::APPLICATION, "test-app");
   // System priority notifiers should always show regardless of fullscreen
   // or lock state.
   message_center::NotifierId ash_system_notifier(
-      message_center::NotifierId::SYSTEM_COMPONENT, kNotifierSystemPriority);
+      message_center::NotifierType::SYSTEM_COMPONENT, kNotifierSystemPriority);
   // Other system notifiers should be treated as same as a normal notifier.
   message_center::NotifierId random_system_notifier(
-      message_center::NotifierId::SYSTEM_COMPONENT, "ash.some-other-component");
+      message_center::NotifierType::SYSTEM_COMPONENT,
+      "ash.some-other-component");
 
   // Notifications are not blocked before login.
   const std::string kEmptyUserId;
diff --git a/ash/system/message_center/notifier_settings_view_unittest.cc b/ash/system/message_center/notifier_settings_view_unittest.cc
index 8d88ee1..027155d 100644
--- a/ash/system/message_center/notifier_settings_view_unittest.cc
+++ b/ash/system/message_center/notifier_settings_view_unittest.cc
@@ -56,11 +56,11 @@
     std::vector<mojom::NotifierUiDataPtr> ui_data;
     if (!no_notifiers_) {
       ui_data.push_back(mojom::NotifierUiData::New(
-          NotifierId(NotifierId::APPLICATION, "id"),
+          NotifierId(message_center::NotifierType::APPLICATION, "id"),
           base::ASCIIToUTF16("title"), true /* enabled */, false /* enforced */,
           gfx::ImageSkia()));
       ui_data.push_back(mojom::NotifierUiData::New(
-          NotifierId(NotifierId::APPLICATION, "id2"),
+          NotifierId(message_center::NotifierType::APPLICATION, "id2"),
           base::ASCIIToUTF16("other title"), false /* enabled */,
           false /* enforced */, gfx::ImageSkia()));
     }
diff --git a/ash/system/message_center/session_state_notification_blocker_unittest.cc b/ash/system/message_center/session_state_notification_blocker_unittest.cc
index 96f1a6b5..deff813 100644
--- a/ash/system/message_center/session_state_notification_blocker_unittest.cc
+++ b/ash/system/message_center/session_state_notification_blocker_unittest.cc
@@ -83,7 +83,7 @@
 TEST_F(SessionStateNotificationBlockerTest, BaseTest) {
   // Default status: OOBE.
   message_center::NotifierId notifier_id(
-      message_center::NotifierId::APPLICATION, "test-notifier");
+      message_center::NotifierType::APPLICATION, "test-notifier");
   EXPECT_FALSE(ShouldShowNotificationAsPopup(notifier_id));
 
   // Login screen.
@@ -110,7 +110,7 @@
 TEST_F(SessionStateNotificationBlockerTest, AlwaysAllowedNotifier) {
   // NOTIFIER_DISPLAY is allowed to shown in the login screen.
   message_center::NotifierId notifier_id(
-      message_center::NotifierId::SYSTEM_COMPONENT, kNotifierSystemPriority);
+      message_center::NotifierType::SYSTEM_COMPONENT, kNotifierSystemPriority);
 
   // Default status: OOBE.
   EXPECT_TRUE(ShouldShowNotificationAsPopup(notifier_id));
@@ -139,7 +139,7 @@
 TEST_F(SessionStateNotificationBlockerTest, BlockOnPrefService) {
   // Default status: OOBE.
   message_center::NotifierId notifier_id(
-      message_center::NotifierId::APPLICATION, "test-notifier");
+      message_center::NotifierType::APPLICATION, "test-notifier");
   EXPECT_FALSE(ShouldShowNotificationAsPopup(notifier_id));
 
   // Login screen.
@@ -177,7 +177,7 @@
 
 TEST_F(SessionStateNotificationBlockerTest, BlockInKioskMode) {
   message_center::NotifierId notifier_id(
-      message_center::NotifierId::SYSTEM_COMPONENT, kNotifierSystemPriority);
+      message_center::NotifierType::SYSTEM_COMPONENT, kNotifierSystemPriority);
   EXPECT_TRUE(ShouldShowNotificationAsPopup(notifier_id));
 
   SimulateKioskMode(user_manager::USER_TYPE_KIOSK_APP);
diff --git a/ash/system/network/auto_connect_notifier.cc b/ash/system/network/auto_connect_notifier.cc
index 707fcb6c..fce94064a 100644
--- a/ash/system/network/auto_connect_notifier.cc
+++ b/ash/system/network/auto_connect_notifier.cc
@@ -132,9 +132,8 @@
       l10n_util::GetStringUTF16(
           IDS_ASH_NETWORK_AUTOCONNECT_NOTIFICATION_MESSAGE),
       base::string16() /* display_source */, GURL() /* origin_url */,
-      message_center::NotifierId(
-          message_center::NotifierId::NotifierType::SYSTEM_COMPONENT,
-          kNotifierAutoConnect),
+      message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
+                                 kNotifierAutoConnect),
       {} /* optional_fields */,
       base::MakeRefCounted<message_center::NotificationDelegate>(),
       gfx::VectorIcon() /* small_image */,
diff --git a/ash/system/network/sms_observer.cc b/ash/system/network/sms_observer.cc
index 47a2cd6..f6ec50a 100644
--- a/ash/system/network/sms_observer.cc
+++ b/ash/system/network/sms_observer.cc
@@ -45,7 +45,7 @@
       base::CollapseWhitespace(base::UTF8ToUTF16(message_text),
                                false /* trim_sequences_with_line_breaks */),
       base::string16(), GURL(),
-      message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT,
+      message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
                                  kNotifierSms),
       message_center::RichNotificationData(), nullptr, kNotificationSmsSyncIcon,
       message_center::SystemNotificationWarningLevel::NORMAL);
diff --git a/ash/system/network/wifi_toggle_notification_controller.cc b/ash/system/network/wifi_toggle_notification_controller.cc
index fa62839..03f2832 100644
--- a/ash/system/network/wifi_toggle_notification_controller.cc
+++ b/ash/system/network/wifi_toggle_notification_controller.cc
@@ -34,7 +34,7 @@
       base::string16(), l10n_util::GetStringUTF16(string_id),
       gfx::Image(network_icon::GetImageForWiFiEnabledState(wifi_enabled)),
       base::string16() /* display_source */, GURL(),
-      message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT,
+      message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
                                  kNotifierWifiToggle),
       message_center::RichNotificationData(), nullptr);
   return notification;
diff --git a/ash/system/power/battery_notification.cc b/ash/system/power/battery_notification.cc
index 10f2ad3..4da3c5c 100644
--- a/ash/system/power/battery_notification.cc
+++ b/ash/system/power/battery_notification.cc
@@ -98,7 +98,7 @@
           message_center::NOTIFICATION_TYPE_SIMPLE, kBatteryNotificationId,
           base::string16(), message, base::string16(), GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT, kNotifierBattery),
+              message_center::NotifierType::SYSTEM_COMPONENT, kNotifierBattery),
           message_center::RichNotificationData(), nullptr,
           GetBatteryImageMD(notification_state),
           GetWarningLevelMD(notification_state));
diff --git a/ash/system/power/dual_role_notification.cc b/ash/system/power/dual_role_notification.cc
index 4eb76651..fcc3dd9 100644
--- a/ash/system/power/dual_role_notification.cc
+++ b/ash/system/power/dual_role_notification.cc
@@ -138,7 +138,8 @@
           l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_DUAL_ROLE_MESSAGE),
           base::string16(), GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT, kNotifierDualRole),
+              message_center::NotifierType::SYSTEM_COMPONENT,
+              kNotifierDualRole),
           message_center::RichNotificationData(), std::move(delegate),
           kNotificationChargingUsbCIcon,
           message_center::SystemNotificationWarningLevel::NORMAL);
diff --git a/ash/system/power/peripheral_battery_notifier.cc b/ash/system/power/peripheral_battery_notifier.cc
index ecb3071c..39f058f0 100644
--- a/ash/system/power/peripheral_battery_notifier.cc
+++ b/ash/system/power/peripheral_battery_notifier.cc
@@ -281,7 +281,7 @@
   auto notification = message_center::Notification::CreateSystemNotification(
       message_center::NOTIFICATION_TYPE_SIMPLE, params.id, params.title,
       params.message, base::string16(), params.url,
-      message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT,
+      message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
                                  params.notifier_name),
       message_center::RichNotificationData(), nullptr, *params.icon,
       message_center::SystemNotificationWarningLevel::CRITICAL_WARNING);
diff --git a/ash/system/power/power_notification_controller.cc b/ash/system/power/power_notification_controller.cc
index cc25f75..ce13d101 100644
--- a/ash/system/power/power_notification_controller.cc
+++ b/ash/system/power/power_notification_controller.cc
@@ -139,7 +139,7 @@
                 IDS_ASH_STATUS_TRAY_LOW_POWER_CHARGER_MESSAGE_SHORT),
             base::string16(), GURL(),
             message_center::NotifierId(
-                message_center::NotifierId::SYSTEM_COMPONENT, kNotifierPower),
+                message_center::NotifierType::SYSTEM_COMPONENT, kNotifierPower),
             message_center::RichNotificationData(),
             new UsbNotificationDelegate(this), kNotificationLowPowerChargerIcon,
             message_center::SystemNotificationWarningLevel::WARNING);
diff --git a/ash/system/screen_layout_observer.cc b/ash/system/screen_layout_observer.cc
index 1b51acba..6fd86db4 100644
--- a/ash/system/screen_layout_observer.cc
+++ b/ash/system/screen_layout_observer.cc
@@ -367,7 +367,7 @@
           base::string16(),  // display_source
           GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT, kNotifierDisplay),
+              message_center::NotifierType::SYSTEM_COMPONENT, kNotifierDisplay),
           message_center::RichNotificationData(),
           new message_center::HandleNotificationClickDelegate(
               base::Bind(&OnNotificationClicked)),
diff --git a/ash/system/screen_security/screen_security_notification_controller.cc b/ash/system/screen_security/screen_security_notification_controller.cc
index 97401d6d..8169055 100644
--- a/ash/system/screen_security/screen_security_notification_controller.cc
+++ b/ash/system/screen_security/screen_security_notification_controller.cc
@@ -71,7 +71,7 @@
           l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SCREEN_SHARE_TITLE),
           message, base::string16() /* display_source */, GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT,
+              message_center::NotifierType::SYSTEM_COMPONENT,
               is_capture ? kNotifierScreenCapture : kNotifierScreenShare),
           data, std::move(delegate), kNotificationScreenshareIcon,
           message_center::SystemNotificationWarningLevel::NORMAL);
diff --git a/ash/system/session/session_limit_notification_controller.cc b/ash/system/session/session_limit_notification_controller.cc
index 23a1dda..5596b538 100644
--- a/ash/system/session/session_limit_notification_controller.cc
+++ b/ash/system/session/session_limit_notification_controller.cc
@@ -93,7 +93,7 @@
               IDS_ASH_STATUS_TRAY_NOTIFICATION_SESSION_LENGTH_LIMIT_MESSAGE),
           base::string16() /* display_source */, GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT,
+              message_center::NotifierType::SYSTEM_COMPONENT,
               kNotifierSessionLengthTimeout),
           data, nullptr /* delegate */, kNotificationTimerIcon,
           message_center::SystemNotificationWarningLevel::NORMAL);
diff --git a/ash/system/supervised/supervised_notification_controller.cc b/ash/system/supervised/supervised_notification_controller.cc
index bf9009e..24115fa 100644
--- a/ash/system/supervised/supervised_notification_controller.cc
+++ b/ash/system/supervised/supervised_notification_controller.cc
@@ -82,7 +82,7 @@
           GetSupervisedUserMessage(), base::string16() /* display_source */,
           GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT,
+              message_center::NotifierType::SYSTEM_COMPONENT,
               kNotifierSupervisedUser),
           message_center::RichNotificationData(), nullptr,
           kNotificationSupervisedUserIcon,
diff --git a/ash/system/tracing_notification_controller.cc b/ash/system/tracing_notification_controller.cc
index aec8cf20..888f9dd 100644
--- a/ash/system/tracing_notification_controller.cc
+++ b/ash/system/tracing_notification_controller.cc
@@ -65,7 +65,7 @@
               IDS_ASH_STATUS_TRAY_TRACING_NOTIFICATION_MESSAGE),
           base::string16() /* display_source */, GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT, kNotifierId),
+              message_center::NotifierType::SYSTEM_COMPONENT, kNotifierId),
           message_center::RichNotificationData(),
           base::MakeRefCounted<message_center::HandleNotificationClickDelegate>(
               base::BindRepeating(&HandleNotificationClick)),
diff --git a/ash/system/update/update_notification_controller.cc b/ash/system/update/update_notification_controller.cc
index 4580fbb..48edb53 100644
--- a/ash/system/update/update_notification_controller.cc
+++ b/ash/system/update/update_notification_controller.cc
@@ -54,7 +54,7 @@
           GetNotificationTitle(), GetNotificationMessage(),
           base::string16() /* display_source */, GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT, kNotifierId),
+              message_center::NotifierType::SYSTEM_COMPONENT, kNotifierId),
           message_center::RichNotificationData(),
           base::MakeRefCounted<message_center::HandleNotificationClickDelegate>(
               base::BindRepeating(
diff --git a/ash/wm/non_client_frame_controller_unittest.cc b/ash/wm/non_client_frame_controller_unittest.cc
index 21cb261..0c840cd 100644
--- a/ash/wm/non_client_frame_controller_unittest.cc
+++ b/ash/wm/non_client_frame_controller_unittest.cc
@@ -142,7 +142,9 @@
   // Give the ui::Compositor a LocalSurfaceId so that it does not defer commit
   // when a draw is scheduled.
   viz::LocalSurfaceId local_surface_id(1, base::UnguessableToken::Create());
-  compositor->SetLocalSurfaceId(local_surface_id, base::TimeTicks());
+  compositor->SetScaleAndSize(
+      1.f, gfx::Size(100, 100),
+      viz::LocalSurfaceIdAllocation(local_surface_id, base::TimeTicks::Now()));
 
   // Without the window visible, there should be a tile for the wallpaper at
   // (tile_x, tile_y) of size |tile_size|.
diff --git a/ash/wm/overview/window_selector_controller_unittest.cc b/ash/wm/overview/window_selector_controller_unittest.cc
index a9234f5..5c8e532 100644
--- a/ash/wm/overview/window_selector_controller_unittest.cc
+++ b/ash/wm/overview/window_selector_controller_unittest.cc
@@ -7,18 +7,52 @@
 #include "ash/shell.h"
 #include "ash/test/ash_test_base.h"
 #include "ash/wm/tablet_mode/tablet_mode_controller_test_api.h"
+#include "ash/wm/window_resizer.h"
 #include "services/ws/public/cpp/input_devices/input_device_client_test_api.h"
+#include "ui/base/hit_test.h"
 #include "ui/events/devices/touchscreen_device.h"
+#include "ui/events/test/event_generator.h"
 #include "ui/keyboard/keyboard_controller.h"
 #include "ui/keyboard/keyboard_util.h"
 #include "ui/keyboard/test/keyboard_test_util.h"
 
+namespace {
+
+gfx::Point CalculateDragPoint(const ash::WindowResizer& resizer,
+                              int delta_x,
+                              int delta_y) {
+  gfx::Point location = resizer.GetInitialLocation();
+  location.set_x(location.x() + delta_x);
+  location.set_y(location.y() + delta_y);
+  return location;
+}
+
+}  // namespace
+
 namespace ash {
 
-class WindowSelectorControllerTest : public AshTestBase {
+using WindowSelectorControllerTest = AshTestBase;
+
+// Tests that press the overview key in keyboard when a window is being dragged
+// in clamshell mode should not toggle overview.
+TEST_F(WindowSelectorControllerTest,
+       PressOverviewKeyDuringWindowDragInClamshellMode) {
+  ASSERT_FALSE(TabletModeControllerTestApi().IsTabletModeStarted());
+  std::unique_ptr<aura::Window> dragged_window = CreateTestWindow();
+  std::unique_ptr<WindowResizer> resizer =
+      CreateWindowResizer(dragged_window.get(), gfx::Point(), HTCAPTION,
+                          ::wm::WINDOW_MOVE_SOURCE_MOUSE);
+  resizer->Drag(CalculateDragPoint(*resizer, 10, 0), 0);
+  EXPECT_TRUE(wm::GetWindowState(dragged_window.get())->is_dragged());
+  GetEventGenerator()->PressKey(ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_NONE);
+  EXPECT_FALSE(Shell::Get()->window_selector_controller()->IsSelecting());
+  resizer->CompleteDrag();
+}
+
+class OverviewVirtualKeyboardTest : public WindowSelectorControllerTest {
  protected:
   void SetUp() override {
-    AshTestBase::SetUp();
+    WindowSelectorControllerTest::SetUp();
 
     ws::InputDeviceClientTestApi().SetKeyboardDevices({});
     ws::InputDeviceClientTestApi().SetTouchscreenDevices(
@@ -42,7 +76,7 @@
   }
 };
 
-TEST_F(WindowSelectorControllerTest, ToggleOverviewModeHidesVirtualKeyboard) {
+TEST_F(OverviewVirtualKeyboardTest, ToggleOverviewModeHidesVirtualKeyboard) {
   keyboard_controller()->ShowKeyboard(false /* locked */);
   keyboard::WaitUntilShown();
 
@@ -52,7 +86,7 @@
   keyboard::WaitUntilHidden();
 }
 
-TEST_F(WindowSelectorControllerTest,
+TEST_F(OverviewVirtualKeyboardTest,
        ToggleOverviewModeDoesNotHideLockedVirtualKeyboard) {
   keyboard_controller()->ShowKeyboard(true /* locked */);
   keyboard::WaitUntilShown();
diff --git a/ash/wm/splitview/split_view_controller_unittest.cc b/ash/wm/splitview/split_view_controller_unittest.cc
index 7e61c57..4579c37b 100644
--- a/ash/wm/splitview/split_view_controller_unittest.cc
+++ b/ash/wm/splitview/split_view_controller_unittest.cc
@@ -3329,6 +3329,28 @@
   EXPECT_EQ(window2->bounds(), snapped_bounds2);
 }
 
+// Tests that press overview key in keyboard during drag should not put the
+// dragged window into overview.
+TEST_F(SplitViewTabDraggingTest, PressOverviewKeyDuringDrag) {
+  const gfx::Rect bounds(0, 0, 400, 400);
+  std::unique_ptr<aura::Window> dragged_window(
+      CreateWindowWithType(bounds, AppType::BROWSER));
+  wm::GetWindowState(dragged_window.get())->Maximize();
+  std::unique_ptr<WindowResizer> resizer =
+      StartDrag(dragged_window.get(), dragged_window.get());
+  DragWindowTo(resizer.get(), gfx::Point(300, 300));
+  EXPECT_TRUE(wm::GetWindowState(dragged_window.get())->is_dragged());
+  EXPECT_TRUE(Shell::Get()->window_selector_controller()->IsSelecting());
+  GetEventGenerator()->PressKey(ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_NONE);
+  EXPECT_TRUE(Shell::Get()->window_selector_controller()->IsSelecting());
+  EXPECT_FALSE(Shell::Get()
+                   ->window_selector_controller()
+                   ->window_selector()
+                   ->IsWindowInOverview(dragged_window.get()));
+  EXPECT_TRUE(wm::GetWindowState(dragged_window.get())->is_dragged());
+  resizer->CompleteDrag();
+}
+
 class TestWindowDelegateWithWidget : public views::WidgetDelegate {
  public:
   TestWindowDelegateWithWidget(bool can_activate)
diff --git a/ash/wm/window_finder.cc b/ash/wm/window_finder.cc
index 708325e..b2a582f9 100644
--- a/ash/wm/window_finder.cc
+++ b/ash/wm/window_finder.cc
@@ -9,6 +9,8 @@
 #include "services/ws/window_service.h"
 #include "ui/aura/client/screen_position_client.h"
 #include "ui/aura/window.h"
+#include "ui/aura/window_targeter.h"
+#include "ui/events/event.h"
 
 namespace {
 
@@ -20,10 +22,35 @@
          ws::WindowService::HasRemoteClient(window);
 }
 
+// Returns true if |window| can be a target at |screen_point| by |targeter|.
+// If |targeter| is null, it will check with Window::GetEventHandlerForPoint().
+bool IsWindowTargeted(aura::Window* window,
+                      const gfx::Point& screen_point,
+                      aura::WindowTargeter* targeter) {
+  aura::client::ScreenPositionClient* client =
+      aura::client::GetScreenPositionClient(window->GetRootWindow());
+  gfx::Point local_point = screen_point;
+  if (targeter) {
+    client->ConvertPointFromScreen(window->parent(), &local_point);
+    // TODO(mukai): consider the hittest differences between mouse and touch.
+    gfx::Point point_in_root = local_point;
+    aura::Window::ConvertPointToTarget(window, window->GetRootWindow(),
+                                       &point_in_root);
+    ui::MouseEvent event(ui::ET_MOUSE_MOVED, local_point, point_in_root,
+                         base::TimeTicks::Now(), 0, 0);
+    return targeter->SubtreeShouldBeExploredForEvent(window, event);
+  }
+  // TODO(mukai): maybe we can remove this, simply return false if targeter does
+  // not exist.
+  client->ConvertPointFromScreen(window, &local_point);
+  return window->GetEventHandlerForPoint(local_point);
+}
+
 // Get the toplevel window at |screen_point| among the descendants of |window|.
 aura::Window* GetTopmostWindowAtPointWithinWindow(
     const gfx::Point& screen_point,
     aura::Window* window,
+    aura::WindowTargeter* targeter,
     const std::set<aura::Window*> ignore,
     aura::Window** real_topmost) {
   if (!window->IsVisible())
@@ -35,11 +62,7 @@
     return nullptr;
 
   if (IsTopLevelWindow(window)) {
-    aura::client::ScreenPositionClient* client =
-        aura::client::GetScreenPositionClient(window->GetRootWindow());
-    gfx::Point local_point = screen_point;
-    client->ConvertPointFromScreen(window, &local_point);
-    if (window->GetEventHandlerForPoint(local_point)) {
+    if (IsWindowTargeted(window, screen_point, targeter)) {
       if (real_topmost && !(*real_topmost))
         *real_topmost = window;
       return (ignore.find(window) == ignore.end()) ? window : nullptr;
@@ -50,8 +73,10 @@
   for (aura::Window::Windows::const_reverse_iterator i =
            window->children().rbegin();
        i != window->children().rend(); ++i) {
+    aura::WindowTargeter* child_targeter =
+        (*i)->targeter() ? (*i)->targeter() : targeter;
     aura::Window* result = GetTopmostWindowAtPointWithinWindow(
-        screen_point, *i, ignore, real_topmost);
+        screen_point, *i, child_targeter, ignore, real_topmost);
     if (result)
       return result;
   }
@@ -68,8 +93,9 @@
                                       aura::Window** real_topmost) {
   if (real_topmost)
     *real_topmost = nullptr;
+  aura::Window* root = GetRootWindowAt(screen_point);
   return GetTopmostWindowAtPointWithinWindow(
-      screen_point, GetRootWindowAt(screen_point), ignore, real_topmost);
+      screen_point, root, root->targeter(), ignore, real_topmost);
 }
 
 }  // namespace wm
diff --git a/ash/wm/window_finder_unittest.cc b/ash/wm/window_finder_unittest.cc
index 300940c..3799fe13 100644
--- a/ash/wm/window_finder_unittest.cc
+++ b/ash/wm/window_finder_unittest.cc
@@ -7,7 +7,9 @@
 #include "ash/public/cpp/shell_window_ids.h"
 #include "ash/shell.h"
 #include "ash/test/ash_test_base.h"
+#include "ui/aura/window_targeter.h"
 #include "ui/compositor/layer_type.h"
+#include "ui/gfx/geometry/insets.h"
 
 namespace ash {
 namespace wm {
@@ -91,5 +93,30 @@
             GetTopmostWindowAtPoint(gfx::Point(10, 210), ignore, nullptr));
 }
 
+TEST_F(WindowFinderTest, WindowTargeterWithHitTestRects) {
+  std::unique_ptr<aura::Window> window1 =
+      CreateTestWindow(gfx::Rect(0, 0, 100, 100));
+  std::unique_ptr<aura::Window> window2 =
+      CreateTestWindow(gfx::Rect(0, 0, 100, 100));
+
+  std::set<aura::Window*> ignore;
+
+  aura::Window* real_topmost = nullptr;
+  EXPECT_EQ(window2.get(),
+            GetTopmostWindowAtPoint(gfx::Point(10, 10), ignore, &real_topmost));
+  EXPECT_EQ(window2.get(), real_topmost);
+
+  auto targeter = std::make_unique<aura::WindowTargeter>();
+  targeter->SetInsets(gfx::Insets(0, 50, 0, 0));
+  window2->SetEventTargeter(std::move(targeter));
+
+  EXPECT_EQ(window1.get(),
+            GetTopmostWindowAtPoint(gfx::Point(10, 10), ignore, &real_topmost));
+  EXPECT_EQ(window1.get(), real_topmost);
+  EXPECT_EQ(window2.get(),
+            GetTopmostWindowAtPoint(gfx::Point(60, 10), ignore, &real_topmost));
+  EXPECT_EQ(window2.get(), real_topmost);
+}
+
 }  // namespace wm
 }  // namespace ash
diff --git a/base/message_loop/message_loop.cc b/base/message_loop/message_loop.cc
index 0eb3766..3f2c646 100644
--- a/base/message_loop/message_loop.cc
+++ b/base/message_loop/message_loop.cc
@@ -181,8 +181,7 @@
 }
 
 MessageLoop::MessageLoop(Type type, MessagePumpFactoryCallback pump_factory)
-    : MessageLoopCurrent(this),
-      pump_(nullptr),
+    : pump_(nullptr),
       message_loop_impl_(std::make_unique<MessageLoopImpl>()),
       type_(type),
       pump_factory_(std::move(pump_factory)) {
@@ -257,10 +256,14 @@
 }
 
 void MessageLoop::SetTaskExecutionAllowed(bool allowed) {
-  return message_loop_impl_->SetTaskExecutionAllowed(allowed);
+  DCHECK_CALLED_ON_VALID_THREAD(bound_thread_checker_);
+  if (allowed)
+    pump_->ScheduleWork();
+  message_loop_impl_->SetTaskExecutionAllowed(allowed);
 }
 
 bool MessageLoop::IsTaskExecutionAllowed() const {
+  DCHECK_CALLED_ON_VALID_THREAD(bound_thread_checker_);
   return message_loop_impl_->IsTaskExecutionAllowed();
 }
 
diff --git a/base/message_loop/message_loop.h b/base/message_loop/message_loop.h
index 0a21cbb..1553996 100644
--- a/base/message_loop/message_loop.h
+++ b/base/message_loop/message_loop.h
@@ -78,12 +78,8 @@
 //   // Process |hr| (the result returned by DoDragDrop()).
 //
 // Please be SURE your task is reentrant (nestable) and all global variables
-// are stable and accessible before using ScopedNestableTaskAllower.
-//
-// TODO(gab): MessageLoop doesn't need to be a MessageLoopCurrent once callers
-// that store MessageLoop::current() in a MessageLoop* variable have been
-// updated to use a MessageLoopCurrent variable.
-class BASE_EXPORT MessageLoop : public MessageLoopCurrent {
+// are stable and accessible before calling SetNestableTasksAllowed(true).
+class BASE_EXPORT MessageLoop {
  public:
   // TODO(gab): Migrate usage of this class to MessageLoopCurrent and remove
   // this forwarded declaration.
diff --git a/base/message_loop/message_loop_current.cc b/base/message_loop/message_loop_current.cc
index 39cd2af..7fcde6c 100644
--- a/base/message_loop/message_loop_current.cc
+++ b/base/message_loop/message_loop_current.cc
@@ -99,28 +99,21 @@
 
 void MessageLoopCurrent::SetNestableTasksAllowed(bool allowed) {
   DCHECK_CALLED_ON_VALID_THREAD(current_->bound_thread_checker_);
-  if (allowed) {
-    // Kick the native pump just in case we enter a OS-driven nested message
-    // loop that does not go through RunLoop::Run().
-    current_->pump_->ScheduleWork();
-  }
-
   current_->SetTaskExecutionAllowed(allowed);
 }
 
 bool MessageLoopCurrent::NestableTasksAllowed() const {
-  DCHECK_CALLED_ON_VALID_THREAD(current_->bound_thread_checker_);
   return current_->IsTaskExecutionAllowed();
 }
 
 MessageLoopCurrent::ScopedNestableTaskAllower::ScopedNestableTaskAllower()
     : loop_(GetTLSMessageLoop()->Get()),
-      old_state_(loop_->NestableTasksAllowed()) {
-  loop_->SetNestableTasksAllowed(true);
+      old_state_(loop_->IsTaskExecutionAllowed()) {
+  loop_->SetTaskExecutionAllowed(true);
 }
 
 MessageLoopCurrent::ScopedNestableTaskAllower::~ScopedNestableTaskAllower() {
-  loop_->SetNestableTasksAllowed(old_state_);
+  loop_->SetTaskExecutionAllowed(old_state_);
 }
 
 // static
diff --git a/base/message_loop/message_loop_task_runner_perftest.cc b/base/message_loop/message_loop_task_runner_perftest.cc
index 69d954de..e427f5e9 100644
--- a/base/message_loop/message_loop_task_runner_perftest.cc
+++ b/base/message_loop/message_loop_task_runner_perftest.cc
@@ -28,8 +28,7 @@
 
 // Tests below will post tasks in a loop until |kPostTaskPerfTestDuration| has
 // elapsed.
-constexpr TimeDelta kPostTaskPerfTestDuration =
-    base::TimeDelta::FromSeconds(30);
+constexpr TimeDelta kPostTaskPerfTestDuration = base::TimeDelta::FromSeconds(5);
 
 }  // namespace
 
@@ -157,7 +156,7 @@
     do {
       for (int i = 0; i < batch_size; ++i) {
         for (int j = 0; j < tasks_per_reload; ++j) {
-          loop->task_runner()->PostTask(FROM_HERE, DoNothing());
+          loop.task_runner()->PostTask(FROM_HERE, DoNothing());
           num_posted++;
         }
         RunLoop().RunUntilIdle();
diff --git a/base/message_loop/message_loop_unittest.cc b/base/message_loop/message_loop_unittest.cc
index f2b3ea9e..a70cd7b 100644
--- a/base/message_loop/message_loop_unittest.cc
+++ b/base/message_loop/message_loop_unittest.cc
@@ -2049,7 +2049,7 @@
   bool destruction_observer_called = false;
 
   MLDestructionObserver observer(&task_destroyed, &destruction_observer_called);
-  loop->AddDestructionObserver(&observer);
+  MessageLoopCurrent::Get()->AddDestructionObserver(&observer);
   loop->task_runner()->PostDelayedTask(
       FROM_HERE,
       BindOnce(&DestructionObserverProbe::Run,
diff --git a/base/message_loop/message_pump_perftest.cc b/base/message_loop/message_pump_perftest.cc
index b3d53a3..21243e9 100644
--- a/base/message_loop/message_pump_perftest.cc
+++ b/base/message_loop/message_pump_perftest.cc
@@ -180,7 +180,7 @@
     if (java_thread_)
       return java_thread_->message_loop();
 #endif
-    return target_->message_loop()->ToMessageLoopDeprecated();
+    return target_->message_loop();
   }
 
  private:
diff --git a/base/synchronization/waitable_event_perftest.cc b/base/synchronization/waitable_event_perftest.cc
index 1888077a..9aba4e9 100644
--- a/base/synchronization/waitable_event_perftest.cc
+++ b/base/synchronization/waitable_event_perftest.cc
@@ -150,7 +150,8 @@
   PrintPerfWaitableEvent(&signaler, "_signaler", "multithread-1000-samples");
 }
 
-TEST(WaitableEventPerfTest, Throughput) {
+// See crbug.com/848499.
+TEST(WaitableEventPerfTest, DISABLED_Throughput) {
   // Reserve a lot of sample space.
   const size_t kCapacity = 500000;
   TraceWaitableEvent event(kCapacity);
diff --git a/base/task/sequence_manager/sequence_manager_perftest.cc b/base/task/sequence_manager/sequence_manager_perftest.cc
index a83e659..af81063 100644
--- a/base/task/sequence_manager/sequence_manager_perftest.cc
+++ b/base/task/sequence_manager/sequence_manager_perftest.cc
@@ -33,6 +33,9 @@
 
 namespace base {
 namespace sequence_manager {
+namespace {
+const int kNumTasks = 1000000;
+}
 
 // To reduce noise related to the OS timer, we use a mock time domain to
 // fast forward the timers.
@@ -356,6 +359,7 @@
     for (size_t i = 0; i < num_tasks_; i++) {
       while (num_tasks_in_flight_.load(std::memory_order_acquire) >
              max_tasks_in_flight_) {
+        PlatformThread::YieldCurrentThread();
       }
       // Choose a queue weighted towards queue 0.
       unsigned int queue = i % (num_queues_ + 1);
@@ -394,13 +398,12 @@
  public:
   SingleThreadImmediateTestCase(
       PerfTestDelegate* delegate,
-      std::vector<scoped_refptr<TaskRunner>> task_runners,
-      size_t num_tasks)
+      std::vector<scoped_refptr<TaskRunner>> task_runners)
       : TestCase(delegate),
         task_source_(std::make_unique<SingleThreadImmediateTaskSource>(
             delegate,
             std::move(task_runners),
-            num_tasks)) {}
+            kNumTasks)) {}
 
   void Start() override { task_source_->Start(); }
 
@@ -432,13 +435,12 @@
  public:
   SingleThreadDelayedTestCase(
       PerfTestDelegate* delegate,
-      std::vector<scoped_refptr<TaskRunner>> task_runners,
-      size_t num_tasks)
+      std::vector<scoped_refptr<TaskRunner>> task_runners)
       : TestCase(delegate),
         task_source_(std::make_unique<SingleThreadDelayedTaskSource>(
             delegate,
             std::move(task_runners),
-            num_tasks)) {}
+            kNumTasks)) {}
 
   void Start() override { task_source_->Start(); }
 
@@ -472,11 +474,10 @@
 class TwoThreadTestCase : public TestCase {
  public:
   TwoThreadTestCase(PerfTestDelegate* delegate,
-                    std::vector<scoped_refptr<TaskRunner>> task_runners,
-                    size_t num_tasks)
+                    std::vector<scoped_refptr<TaskRunner>> task_runners)
       : TestCase(delegate),
         task_runners_(std::move(task_runners)),
-        num_tasks_(num_tasks),
+        num_tasks_(kNumTasks),
         auxiliary_thread_("auxillary thread") {
     auxiliary_thread_.Start();
   }
@@ -558,9 +559,6 @@
 class SequenceManagerPerfTest : public testing::TestWithParam<PerfTestType> {
  public:
   void SetUp() override {
-    if (ThreadTicks::IsSupported())
-      ThreadTicks::WaitUntilInitialized();
-
     delegate_ = CreateDelegate();
   }
 
@@ -617,6 +615,13 @@
     }
   }
 
+  bool ShouldMeasureQueueScaling() const {
+    // To limit test run time, we only measure multiple queues specific sequence
+    // manager configurations.
+    return delegate_->MultipleQueuesSupported() &&
+           GetParam() == PerfTestType::kUseSequenceManagerWithUIMessagePump;
+  }
+
   std::vector<scoped_refptr<TaskRunner>> CreateTaskRunners(int num) {
     std::vector<scoped_refptr<TaskRunner>> task_runners;
     for (int i = 0; i < num; i++) {
@@ -628,23 +633,18 @@
   void Benchmark(const std::string& trace, TestCase* TestCase) {
     TimeTicks start = TimeTicks::Now();
     TimeTicks now;
-    unsigned long long num_iterations = 0;
-    do {
-      TestCase->Start();
-      delegate_->WaitUntilDone();
-      now = TimeTicks::Now();
-      num_iterations++;
-    } while (now - start < TimeDelta::FromSeconds(5));
+    TestCase->Start();
+    delegate_->WaitUntilDone();
+    now = TimeTicks::Now();
 
     perf_test::PrintResult(
         "task", "", trace + delegate_->GetName(),
-        (now - start).InMicroseconds() / static_cast<double>(num_iterations),
-        "us/run", true);
-
+        (now - start).InMicroseconds() / static_cast<double>(kNumTasks),
+        "us/task", true);
     LOG(ERROR) << "task " << trace << delegate_->GetName()
                << ((now - start).InMicroseconds() /
-                   static_cast<double>(num_iterations))
-               << " us/run";
+                   static_cast<double>(kNumTasks))
+               << " us/task";
   }
 
   std::unique_ptr<PerfTestDelegate> delegate_;
@@ -664,165 +664,123 @@
                     PerfTestType::kUseIOMessageLoop,
                     PerfTestType::kUseSingleThreadInWorkerPool));
 
-TEST_P(SequenceManagerPerfTest, RunTenThousandDelayedTasks_OneQueue) {
-  if (!ThreadTicks::IsSupported())
-    return;
-
+TEST_P(SequenceManagerPerfTest, PostDelayedTasks_OneQueue) {
   if (!delegate_->VirtualTimeIsSupported()) {
     LOG(INFO) << "Unsupported";
     return;
   }
 
-  SingleThreadDelayedTestCase task_source(delegate_.get(), CreateTaskRunners(1),
-                                          10000u);
-  Benchmark("run 10000 delayed tasks with one queue", &task_source);
+  SingleThreadDelayedTestCase task_source(delegate_.get(),
+                                          CreateTaskRunners(1));
+  Benchmark("post delayed tasks with one queue", &task_source);
 }
 
-TEST_P(SequenceManagerPerfTest, RunTenThousandDelayedTasks_FourQueues) {
-  if (!ThreadTicks::IsSupported())
-    return;
-
-  if (!delegate_->VirtualTimeIsSupported() ||
-      !delegate_->MultipleQueuesSupported()) {
-    LOG(INFO) << "Unsupported";
-    return;
-  }
-
-  SingleThreadDelayedTestCase task_source(delegate_.get(), CreateTaskRunners(4),
-                                          10000u);
-  Benchmark("run 10000 delayed tasks with four queues", &task_source);
-}
-
-TEST_P(SequenceManagerPerfTest, RunTenThousandDelayedTasks_EightQueues) {
-  if (!ThreadTicks::IsSupported())
-    return;
-
-  if (!delegate_->VirtualTimeIsSupported() ||
-      !delegate_->MultipleQueuesSupported()) {
-    LOG(INFO) << "Unsupported";
-    return;
-  }
-
-  SingleThreadDelayedTestCase task_source(delegate_.get(), CreateTaskRunners(8),
-                                          10000u);
-  Benchmark("run 10000 delayed tasks with eight queues", &task_source);
-}
-
-TEST_P(SequenceManagerPerfTest, RunTenThousandDelayedTasks_ThirtyTwoQueues) {
-  if (!ThreadTicks::IsSupported())
-    return;
-
-  if (!delegate_->VirtualTimeIsSupported() ||
-      !delegate_->MultipleQueuesSupported()) {
+TEST_P(SequenceManagerPerfTest, PostDelayedTasks_FourQueues) {
+  if (!delegate_->VirtualTimeIsSupported() || !ShouldMeasureQueueScaling()) {
     LOG(INFO) << "Unsupported";
     return;
   }
 
   SingleThreadDelayedTestCase task_source(delegate_.get(),
-                                          CreateTaskRunners(32), 10000u);
-  Benchmark("run 10000 delayed tasks with thirty two queues", &task_source);
+                                          CreateTaskRunners(4));
+  Benchmark("post delayed tasks with four queues", &task_source);
 }
 
-TEST_P(SequenceManagerPerfTest, RunTenThousandImmediateTasks_OneQueue) {
-  if (!ThreadTicks::IsSupported())
+TEST_P(SequenceManagerPerfTest, PostDelayedTasks_EightQueues) {
+  if (!delegate_->VirtualTimeIsSupported() || !ShouldMeasureQueueScaling()) {
+    LOG(INFO) << "Unsupported";
     return;
+  }
 
+  SingleThreadDelayedTestCase task_source(delegate_.get(),
+                                          CreateTaskRunners(8));
+  Benchmark("post delayed tasks with eight queues", &task_source);
+}
+
+TEST_P(SequenceManagerPerfTest, PostDelayedTasks_ThirtyTwoQueues) {
+  if (!delegate_->VirtualTimeIsSupported() || !ShouldMeasureQueueScaling()) {
+    LOG(INFO) << "Unsupported";
+    return;
+  }
+
+  SingleThreadDelayedTestCase task_source(delegate_.get(),
+                                          CreateTaskRunners(32));
+  Benchmark("post delayed tasks with thirty two queues", &task_source);
+}
+
+TEST_P(SequenceManagerPerfTest, PostImmediateTasks_OneQueue) {
   SingleThreadImmediateTestCase task_source(delegate_.get(),
-                                            CreateTaskRunners(1), 10000u);
-  Benchmark("run 10000 immediate tasks with one queue", &task_source);
+                                            CreateTaskRunners(1));
+  Benchmark("post immediate tasks with one queue", &task_source);
 }
 
-TEST_P(SequenceManagerPerfTest, RunTenThousandImmediateTasks_FourQueues) {
-  if (!ThreadTicks::IsSupported())
-    return;
-
-  if (!delegate_->MultipleQueuesSupported()) {
+TEST_P(SequenceManagerPerfTest, PostImmediateTasks_FourQueues) {
+  if (!ShouldMeasureQueueScaling()) {
     LOG(INFO) << "Unsupported";
     return;
   }
 
   SingleThreadImmediateTestCase task_source(delegate_.get(),
-                                            CreateTaskRunners(4), 10000u);
-  Benchmark("run 10000 immediate tasks with four queues", &task_source);
+                                            CreateTaskRunners(4));
+  Benchmark("post immediate tasks with four queues", &task_source);
 }
 
-TEST_P(SequenceManagerPerfTest, RunTenThousandImmediateTasks_EightQueues) {
-  if (!ThreadTicks::IsSupported())
-    return;
-
-  if (!delegate_->MultipleQueuesSupported()) {
+TEST_P(SequenceManagerPerfTest, PostImmediateTasks_EightQueues) {
+  if (!ShouldMeasureQueueScaling()) {
     LOG(INFO) << "Unsupported";
     return;
   }
 
   SingleThreadImmediateTestCase task_source(delegate_.get(),
-                                            CreateTaskRunners(8), 10000u);
-  Benchmark("run 10000 immediate tasks with eight queues", &task_source);
+                                            CreateTaskRunners(8));
+  Benchmark("post immediate tasks with eight queues", &task_source);
 }
 
-TEST_P(SequenceManagerPerfTest, RunTenThousandImmediateTasks_ThirtyTwoQueues) {
-  if (!ThreadTicks::IsSupported())
-    return;
-
-  if (!delegate_->MultipleQueuesSupported()) {
+TEST_P(SequenceManagerPerfTest, PostImmediateTasks_ThirtyTwoQueues) {
+  if (!ShouldMeasureQueueScaling()) {
     LOG(INFO) << "Unsupported";
     return;
   }
 
   SingleThreadImmediateTestCase task_source(delegate_.get(),
-                                            CreateTaskRunners(32), 10000u);
-  Benchmark("run 10000 immediate tasks with thirty two queues", &task_source);
+                                            CreateTaskRunners(32));
+  Benchmark("post immediate tasks with thirty two queues", &task_source);
 }
 
-TEST_P(SequenceManagerPerfTest,
-       RunTenThousandImmediateTasksFromTwoThreads_OneQueue) {
-  if (!ThreadTicks::IsSupported())
-    return;
-
-  TwoThreadTestCase task_source(delegate_.get(), CreateTaskRunners(1), 10000u);
-  Benchmark("run 10000 immediate tasks with one queue", &task_source);
+TEST_P(SequenceManagerPerfTest, PostImmediateTasksFromTwoThreads_OneQueue) {
+  TwoThreadTestCase task_source(delegate_.get(), CreateTaskRunners(1));
+  Benchmark("post immediate tasks with one queue", &task_source);
 }
 
-TEST_P(SequenceManagerPerfTest,
-       RunTenThousandImmediateTasksFromTwoThreads_FourQueues) {
-  if (!ThreadTicks::IsSupported())
-    return;
-
-  if (!delegate_->MultipleQueuesSupported()) {
+TEST_P(SequenceManagerPerfTest, PostImmediateTasksFromTwoThreads_FourQueues) {
+  if (!ShouldMeasureQueueScaling()) {
     LOG(INFO) << "Unsupported";
     return;
   }
 
-  TwoThreadTestCase task_source(delegate_.get(), CreateTaskRunners(4), 10000u);
-  Benchmark("run 10000 immediate tasks with four queues", &task_source);
+  TwoThreadTestCase task_source(delegate_.get(), CreateTaskRunners(4));
+  Benchmark("post immediate tasks with four queues", &task_source);
 }
 
-TEST_P(SequenceManagerPerfTest,
-       RunTenThousandImmediateTasksFromTwoThreads_EightQueues) {
-  if (!ThreadTicks::IsSupported())
-    return;
-
-  if (!delegate_->MultipleQueuesSupported()) {
+TEST_P(SequenceManagerPerfTest, PostImmediateTasksFromTwoThreads_EightQueues) {
+  if (!ShouldMeasureQueueScaling()) {
     LOG(INFO) << "Unsupported";
     return;
   }
 
-  TwoThreadTestCase task_source(delegate_.get(), CreateTaskRunners(8), 10000u);
-  Benchmark("run 10000 immediate tasks with eight queues", &task_source);
+  TwoThreadTestCase task_source(delegate_.get(), CreateTaskRunners(8));
+  Benchmark("post immediate tasks with eight queues", &task_source);
 }
 
 TEST_P(SequenceManagerPerfTest,
-       RunTenThousandImmediateTasksFromTwoThreads_ThirtyTwoQueues) {
-  if (!ThreadTicks::IsSupported())
-    return;
-
-  if (!delegate_->MultipleQueuesSupported()) {
+       PostImmediateTasksFromTwoThreads_ThirtyTwoQueues) {
+  if (!ShouldMeasureQueueScaling()) {
     LOG(INFO) << "Unsupported";
     return;
   }
 
-  TwoThreadTestCase task_source(delegate_.get(), CreateTaskRunners(32), 10000u);
-  Benchmark("run 10000 immediate tasks with thirty two queues", &task_source);
+  TwoThreadTestCase task_source(delegate_.get(), CreateTaskRunners(32));
+  Benchmark("post immediate tasks with thirty two queues", &task_source);
 }
 
 // TODO(alexclarke): Add additional tests with different mixes of non-delayed vs
diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni
index 9825f59..5d71655 100644
--- a/build/config/android/internal_rules.gni
+++ b/build/config/android/internal_rules.gni
@@ -1418,7 +1418,7 @@
     _enable_bytecode_rewriter =
         _enable_assert || _enable_custom_resources || _enable_thread_annotations
     _is_prebuilt = defined(invoker.is_prebuilt) && invoker.is_prebuilt
-    _enable_bytecode_checks = defined(invoker.enable_bytecode_checks) &&
+    _enable_bytecode_checks = !defined(invoker.enable_bytecode_checks) ||
                               invoker.enable_bytecode_checks
 
     # Release builds don't have asserts enabled, so they often will not run the
diff --git a/build/fuchsia/fidlgen_js/gen.py b/build/fuchsia/fidlgen_js/gen.py
index c1083ad..f58090a 100755
--- a/build/fuchsia/fidlgen_js/gen.py
+++ b/build/fuchsia/fidlgen_js/gen.py
@@ -58,24 +58,6 @@
   return mapping[t]
 
 
-def _InlineSizeOfType(t):
-  if t.kind == fidl.TypeKind.PRIMITIVE:
-    return {
-        'int16': 2,
-        'int32': 4,
-        'int64': 8,
-        'int8': 1,
-        'uint16': 2,
-        'uint32': 4,
-        'uint64': 8,
-        'uint8': 1,
-    }[t.subtype]
-  elif t.kind == fidl.TypeKind.STRING:
-    return 16
-  else:
-    raise NotImplementedError(t.kind)
-
-
 def _CompileConstant(val, assignment_type):
   """|assignment_type| is the TypeClass to which |val| will be assigned. This is
   is currently used to scope identifiers to their enum."""
@@ -117,6 +99,7 @@
     self.f = output_file
     self.output_deferred_to_eof = ''
     self.type_table_defined = set()
+    self.type_inline_size_by_name = {}
 
   def Compile(self):
     self._EmitHeader()
@@ -133,6 +116,29 @@
 
     self.f.write(self.output_deferred_to_eof)
 
+  def _InlineSizeOfType(self, t):
+    if t.kind == fidl.TypeKind.PRIMITIVE:
+      return {
+          'int16': 2,
+          'int32': 4,
+          'int64': 8,
+          'int8': 1,
+          'uint16': 2,
+          'uint32': 4,
+          'uint64': 8,
+          'uint8': 1,
+      }[t.subtype]
+    elif t.kind == fidl.TypeKind.STRING:
+      return 16
+    elif t.kind == fidl.TypeKind.IDENTIFIER:
+      size = self.type_inline_size_by_name.get(t.identifier)
+      if size is None:
+        raise Exception('expected ' + t.identifier +
+                        ' to be in self.type_inline_size_by_name')
+      return size
+    else:
+      raise NotImplementedError(t.kind)
+
   def _EmitHeader(self):
     self.f.write('''// Copyright 2018 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
@@ -173,6 +179,7 @@
     self.f.write('const _kTT_%(name)s = _kTT_%(type)s;\n\n' % data)
 
   def _CompileUnion(self, union):
+    self.type_inline_size_by_name[union.name] = union.size
     compound = _ParseCompoundIdentifier(union.name)
     name = _CompileCompoundIdentifier(compound)
     member_names = []
@@ -273,6 +280,7 @@
       })
 
   def _CompileStruct(self, struct):
+    self.type_inline_size_by_name[struct.name] = struct.size
     compound = _ParseCompoundIdentifier(struct.name)
     name = _CompileCompoundIdentifier(compound)
     param_names = [_ChangeIfReserved(x.name) for x in struct.members]
@@ -376,13 +384,12 @@
             'ttname': ttname,
             'element_ttname': element_ttname,
             'element_count': t.element_count,
-            'element_size': _InlineSizeOfType(t.element_type),
+            'element_size': self._InlineSizeOfType(t.element_type),
         })
       return ttname
     elif t.kind == fidl.TypeKind.VECTOR:
       element_ttname = self._CompileType(t.element_type)
-      ttname = (
-          'VEC_' + ('Nullable_' if t.nullable else '') + element_ttname)
+      ttname = ('VEC_' + ('Nullable_' if t.nullable else '') + element_ttname)
       pointer_set = '''    if (v === null || v === undefined) {
       e.data.setUint32(o + 8, 0, $fidl__kLE);
       e.data.setUint32(o + 12, 0, $fidl__kLE);
@@ -429,7 +436,7 @@
 ''' % {
             'ttname': ttname,
             'element_ttname': element_ttname,
-            'element_size': _InlineSizeOfType(t.element_type),
+            'element_size': self._InlineSizeOfType(t.element_type),
             'pointer_set': pointer_set,
             'throw_if_null_enc': throw_if_null_enc,
             'throw_if_null_dec': throw_if_null_dec
diff --git a/build/fuchsia/fidlgen_js/test/fidlgen_js_unittest.cc b/build/fuchsia/fidlgen_js/test/fidlgen_js_unittest.cc
index 4bd64fd7..fad0d4fa 100644
--- a/build/fuchsia/fidlgen_js/test/fidlgen_js_unittest.cc
+++ b/build/fuchsia/fidlgen_js/test/fidlgen_js_unittest.cc
@@ -231,7 +231,7 @@
     }
 
     EXPECT_TRUE(somu.trailing.is_swu());
-    EXPECT_EQ(somu.trailing.swu().length, 123456u);
+    EXPECT_EQ(somu.trailing.swu().num, 123456u);
 
     did_receive_union_ = true;
   }
@@ -244,16 +244,17 @@
 
     resp.optional = std::make_unique<fidljstest::UnionOfStructs>();
     resp.optional->set_swu(fidljstest::StructWithUint());
-    resp.optional->swu().length = 987654;
+    resp.optional->swu().num = 987654;
 
     resp.trailing.set_lswa(fidljstest::LargerStructWithArray());
 
     callback(std::move(resp));
   }
 
-  void SendVectorsOfString(fidl::VectorPtr<fidl::StringPtr> unsized,
-                           fidl::VectorPtr<fidl::StringPtr> nullable,
-                           fidl::VectorPtr<fidl::StringPtr> sized10) override {
+  void SendVectorsOfString(
+      fidl::VectorPtr<fidl::StringPtr> unsized,
+      fidl::VectorPtr<fidl::StringPtr> nullable,
+      fidl::VectorPtr<fidl::StringPtr> max_strlen) override {
     ASSERT_EQ(unsized->size(), 3u);
     EXPECT_EQ((*unsized)[0], "str0");
     EXPECT_EQ((*unsized)[1], "str1");
@@ -266,12 +267,30 @@
     EXPECT_TRUE((*nullable)[3].is_null());
     EXPECT_EQ((*nullable)[4], "str4");
 
-    ASSERT_EQ(sized10->size(), 1u);
-    EXPECT_EQ((*sized10)[0], "0123456789");
+    ASSERT_EQ(max_strlen->size(), 1u);
+    EXPECT_EQ((*max_strlen)[0], "0123456789");
 
     did_get_vectors_of_string_ = true;
   }
 
+  void VectorOfStruct(fidl::VectorPtr<fidljstest::StructWithUint> stuff,
+                      VectorOfStructCallback callback) override {
+    ASSERT_EQ(stuff->size(), 4u);
+    EXPECT_EQ((*stuff)[0].num, 456u);
+    EXPECT_EQ((*stuff)[1].num, 789u);
+    EXPECT_EQ((*stuff)[2].num, 123u);
+    EXPECT_EQ((*stuff)[3].num, 0xfffffu);
+
+    fidl::VectorPtr<fidljstest::StructWithUint> response;
+    fidljstest::StructWithUint a;
+    a.num = 369;
+    response.push_back(a);
+    fidljstest::StructWithUint b;
+    b.num = 258;
+    response.push_back(b);
+    callback(std::move(response));
+  }
+
   bool was_do_something_called() const { return was_do_something_called_; }
   int32_t received_int() const { return received_int_; }
   const std::string& received_msg() const { return received_msg_; }
@@ -710,7 +729,7 @@
       this.result_trailing_is_lswa = resp.trailing.is_lswa();
 
       this.result_initial_some_bool = resp.initial.swb.some_bool;
-      this.result_length = resp.optional.swu.length;
+      this.result_optional_num = resp.optional.swu.num;
     }).catch((e) => log('FAILED: ' + e));
   )";
   helper.runner().Run(source, "test.js");
@@ -730,7 +749,7 @@
   EXPECT_TRUE(helper.Get<bool>("result_trailing_is_lswa"));
 
   EXPECT_TRUE(helper.Get<bool>("result_initial_some_bool"));
-  EXPECT_EQ(helper.Get<uint32_t>("result_length"), 987654u);
+  EXPECT_EQ(helper.Get<uint32_t>("result_optional_num"), 987654u);
 }
 
 TEST_F(FidlGenJsTest, DefaultUsingIdentifier) {
@@ -793,6 +812,38 @@
   EXPECT_FALSE(testola_impl.did_get_vectors_of_string());
 }
 
+TEST_F(FidlGenJsTest, VectorOfStruct) {
+  v8::Isolate* isolate = instance_->isolate();
+  BindingsSetupHelper helper(isolate);
+
+  TestolaImpl testola_impl;
+  fidl::Binding<fidljstest::Testola> binding(&testola_impl);
+  binding.Bind(std::move(helper.server()));
+
+  std::string source = R"(
+    var proxy = new TestolaProxy();
+    proxy.$bind(testHandle);
+
+    var data = [
+      new StructWithUint(456),
+      new StructWithUint(789),
+      new StructWithUint(123),
+      new StructWithUint(0xfffff),
+    ];
+    proxy.VectorOfStruct(data).then(resp => {
+      this.result_length = resp.length;
+      this.result_0 = resp[0].num;
+      this.result_1 = resp[1].num;
+    }).catch((e) => log('FAILED: ' + e));
+  )";
+  helper.runner().Run(source, "test.js");
+  base::RunLoop().RunUntilIdle();
+
+  EXPECT_EQ(helper.Get<uint32_t>("result_length"), 2u);
+  EXPECT_EQ(helper.Get<int>("result_0"), 369);
+  EXPECT_EQ(helper.Get<int>("result_1"), 258);
+}
+
 int main(int argc, char** argv) {
   base::TestSuite test_suite(argc, argv);
 
diff --git a/build/fuchsia/fidlgen_js/test/simple.fidl b/build/fuchsia/fidlgen_js/test/simple.fidl
index 43a2f72a..1a2417cc4 100644
--- a/build/fuchsia/fidlgen_js/test/simple.fidl
+++ b/build/fuchsia/fidlgen_js/test/simple.fidl
@@ -38,7 +38,7 @@
 };
 
 struct StructWithUint {
-  uint32 length;
+  uint32 num;
 };
 
 struct LargerStructWithArray {
@@ -84,5 +84,8 @@
 
   11: SendVectorsOfString(vector<string> unsized,
                           vector<string?> nullable,
-                          vector<string:10> sized10);
+                          vector<string:10> max_strlen);
+
+  12: VectorOfStruct(vector<StructWithUint> stuff)
+        -> (vector<StructWithUint> result);
 };
diff --git a/cc/layers/scrollbar_layer_unittest.cc b/cc/layers/scrollbar_layer_unittest.cc
index 29458d59..4425f72 100644
--- a/cc/layers/scrollbar_layer_unittest.cc
+++ b/cc/layers/scrollbar_layer_unittest.cc
@@ -1342,8 +1342,7 @@
 
     layer_tree_host_->SetViewportSizeAndScale(
         layer_tree_host_->device_viewport_size(), test_scale,
-        layer_tree_host_->local_surface_id_from_parent(),
-        layer_tree_host_->local_surface_id_allocation_time_from_parent());
+        layer_tree_host_->local_surface_id_allocation_from_parent());
 
     scrollbar_layer->Update();
 
@@ -1408,8 +1407,7 @@
 
     layer_tree_host_->SetViewportSizeAndScale(
         layer_tree_host_->device_viewport_size(), test_scale,
-        layer_tree_host_->local_surface_id_from_parent(),
-        layer_tree_host_->local_surface_id_allocation_time_from_parent());
+        layer_tree_host_->local_surface_id_allocation_from_parent());
 
     scrollbar_layer->Update();
 
diff --git a/cc/layers/surface_layer_unittest.cc b/cc/layers/surface_layer_unittest.cc
index 9782814..3faa62a 100644
--- a/cc/layers/surface_layer_unittest.cc
+++ b/cc/layers/surface_layer_unittest.cc
@@ -56,8 +56,8 @@
     animation_host_ = AnimationHost::CreateForTesting(ThreadInstance::MAIN);
     layer_tree_host_ = FakeLayerTreeHost::Create(
         &fake_client_, &task_graph_runner_, animation_host_.get());
-    layer_tree_host_->SetViewportSizeAndScale(
-        gfx::Size(10, 10), 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host_->SetViewportSizeAndScale(gfx::Size(10, 10), 1.f,
+                                              viz::LocalSurfaceIdAllocation());
     host_impl_.CreatePendingTree();
   }
 
diff --git a/cc/layers/texture_layer_unittest.cc b/cc/layers/texture_layer_unittest.cc
index 9b34d77..de62de0 100644
--- a/cc/layers/texture_layer_unittest.cc
+++ b/cc/layers/texture_layer_unittest.cc
@@ -174,8 +174,8 @@
     layer_tree_host_ = MockLayerTreeHost::Create(
         &fake_client_, &task_graph_runner_, animation_host_.get());
     EXPECT_CALL(*layer_tree_host_, SetNeedsCommit()).Times(AnyNumber());
-    layer_tree_host_->SetViewportSizeAndScale(
-        gfx::Size(10, 10), 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host_->SetViewportSizeAndScale(gfx::Size(10, 10), 1.f,
+                                              viz::LocalSurfaceIdAllocation());
     Mock::VerifyAndClearExpectations(layer_tree_host_.get());
   }
 
@@ -267,8 +267,8 @@
           viz::SingleReleaseCallback::Create(test_data_.sw_release_callback_));
     }
 
-    host->SetViewportSizeAndScale(gfx::Size(10, 10), 1.f, viz::LocalSurfaceId(),
-                                  base::TimeTicks());
+    host->SetViewportSizeAndScale(gfx::Size(10, 10), 1.f,
+                                  viz::LocalSurfaceIdAllocation());
     host->SetVisible(true);
     host->SetRootLayer(layer);
 
@@ -709,8 +709,8 @@
 
     root_->AddChild(layer_);
     layer_tree_host()->SetRootLayer(root_);
-    layer_tree_host()->SetViewportSizeAndScale(
-        bounds, 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(bounds, 1.f,
+                                               viz::LocalSurfaceIdAllocation());
     SetMailbox('1');
     EXPECT_EQ(0, callback_count_);
 
@@ -780,8 +780,8 @@
 
     root_->AddChild(layer_);
     layer_tree_host()->SetRootLayer(root_);
-    layer_tree_host()->SetViewportSizeAndScale(
-        bounds, 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(bounds, 1.f,
+                                               viz::LocalSurfaceIdAllocation());
     SetMailbox('1');
 
     PostSetNeedsCommitToMainThread();
@@ -1311,8 +1311,8 @@
 
     root_->AddChild(layer_);
     layer_tree_host()->SetRootLayer(root_);
-    layer_tree_host()->SetViewportSizeAndScale(
-        bounds, 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(bounds, 1.f,
+                                               viz::LocalSurfaceIdAllocation());
   }
 
   void BeginTest() override {
@@ -1381,8 +1381,8 @@
 
     root_->AddChild(layer_);
     layer_tree_host()->SetRootLayer(root_);
-    layer_tree_host()->SetViewportSizeAndScale(
-        bounds, 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(bounds, 1.f,
+                                               viz::LocalSurfaceIdAllocation());
   }
 
   void BeginTest() override {
diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc
index d94c3b6..d33c08f 100644
--- a/cc/test/layer_tree_test.cc
+++ b/cc/test/layer_tree_test.cc
@@ -870,9 +870,9 @@
   gfx::Size root_bounds = layer_tree_host()->root_layer()->bounds();
   gfx::Size device_root_bounds =
       gfx::ScaleToCeiledSize(root_bounds, initial_device_scale_factor_);
-  layer_tree_host()->SetViewportSizeAndScale(
-      device_root_bounds, initial_device_scale_factor_, viz::LocalSurfaceId(),
-      base::TimeTicks());
+  layer_tree_host()->SetViewportSizeAndScale(device_root_bounds,
+                                             initial_device_scale_factor_,
+                                             viz::LocalSurfaceIdAllocation());
   layer_tree_host()->root_layer()->SetIsDrawable(true);
   layer_tree_host()->SetElementIdsForTesting();
 }
@@ -925,8 +925,9 @@
     const viz::LocalSurfaceId& local_surface_id) {
   DCHECK(main_task_runner_->BelongsToCurrentThread());
   if (layer_tree_host_)
-    layer_tree_host_->SetLocalSurfaceIdFromParent(local_surface_id,
-                                                  base::TimeTicks());
+    layer_tree_host_->SetLocalSurfaceIdAllocationFromParent(
+        viz::LocalSurfaceIdAllocation(local_surface_id,
+                                      base::TimeTicks::Now()));
 }
 
 void LayerTreeTest::DispatchRequestNewLocalSurfaceId() {
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 3ccc554f..3855fbda 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -438,9 +438,10 @@
 
 
 void LayerTreeHost::UpdateDeferCommitsInternal() {
-  proxy_->SetDeferCommits(defer_commits_count_ > 0 ||
-                          (settings_.enable_surface_synchronization &&
-                           !local_surface_id_from_parent_.is_valid()));
+  proxy_->SetDeferCommits(
+      defer_commits_count_ > 0 ||
+      (settings_.enable_surface_synchronization &&
+       !local_surface_id_allocation_from_parent_.IsValid()));
 }
 
 bool LayerTreeHost::IsUsingLayerLists() const {
@@ -860,7 +861,8 @@
 
   if (inner_viewport_scroll_delta.IsZero() && info.page_scale_delta == 1.f &&
       info.elastic_overscroll_delta.IsZero() && !info.top_controls_delta &&
-      !info.browser_controls_constraint_changed) {
+      !info.browser_controls_constraint_changed &&
+      !info.scroll_gesture_did_end) {
     return;
   }
 
@@ -878,10 +880,10 @@
                                    info.elastic_overscroll_delta);
   // TODO(ccameron): pass the elastic overscroll here so that input events
   // may be translated appropriately.
-  client_->ApplyViewportChanges({inner_viewport_scroll_delta,
-                                 info.elastic_overscroll_delta,
-                                 info.page_scale_delta, info.top_controls_delta,
-                                 info.browser_controls_constraint});
+  client_->ApplyViewportChanges(
+      {inner_viewport_scroll_delta, info.elastic_overscroll_delta,
+       info.page_scale_delta, info.top_controls_delta,
+       info.browser_controls_constraint, info.scroll_gesture_did_end});
   SetNeedsUpdateLayers();
 }
 
@@ -1126,10 +1128,10 @@
 void LayerTreeHost::SetViewportSizeAndScale(
     const gfx::Size& device_viewport_size,
     float device_scale_factor,
-    const viz::LocalSurfaceId& local_surface_id_from_parent,
-    base::TimeTicks local_surface_id_allocation_time_from_parent) {
-  SetLocalSurfaceIdFromParent(local_surface_id_from_parent,
-                              local_surface_id_allocation_time_from_parent);
+    const viz::LocalSurfaceIdAllocation&
+        local_surface_id_allocation_from_parent) {
+  SetLocalSurfaceIdAllocationFromParent(
+      local_surface_id_allocation_from_parent);
 
   bool changed = false;
   if (device_viewport_size_ != device_viewport_size) {
@@ -1158,7 +1160,7 @@
     // be.
     CHECK(!has_pushed_local_surface_id_from_parent_ ||
           new_local_surface_id_request_ ||
-          !local_surface_id_from_parent_.is_valid());
+          !local_surface_id_allocation_from_parent_.IsValid());
 #endif
   }
 }
@@ -1267,26 +1269,34 @@
   content_source_id_ = id;
 }
 
-void LayerTreeHost::SetLocalSurfaceIdFromParent(
-    const viz::LocalSurfaceId& local_surface_id_from_parent,
-    base::TimeTicks local_surface_id_allocation_time_from_parent) {
-  if (local_surface_id_from_parent_.parent_sequence_number() ==
+void LayerTreeHost::SetLocalSurfaceIdAllocationFromParent(
+    const viz::LocalSurfaceIdAllocation&
+        local_surface_id_allocation_from_parent) {
+  const viz::LocalSurfaceId& local_surface_id_from_parent =
+      local_surface_id_allocation_from_parent.local_surface_id();
+  const viz::LocalSurfaceId& current_local_surface_id_from_parent =
+      local_surface_id_allocation_from_parent_.local_surface_id();
+  if (current_local_surface_id_from_parent.parent_sequence_number() ==
           local_surface_id_from_parent.parent_sequence_number() &&
-      local_surface_id_from_parent_.embed_token() ==
+      current_local_surface_id_from_parent.embed_token() ==
           local_surface_id_from_parent.embed_token()) {
     return;
   }
 
+  // If the viz::LocalSurfaceId is valid but the allocation time is invalid then
+  // this API is not being used correctly.
+  DCHECK_EQ(local_surface_id_from_parent.is_valid(),
+            local_surface_id_allocation_from_parent.IsValid());
+
   TRACE_EVENT_WITH_FLOW2(
       TRACE_DISABLED_BY_DEFAULT("viz.surface_id_flow"),
       "LocalSurfaceId.Submission.Flow",
       TRACE_ID_GLOBAL(local_surface_id_from_parent.submission_trace_id()),
       TRACE_EVENT_FLAG_FLOW_IN | TRACE_EVENT_FLAG_FLOW_OUT, "step",
-      "SetLocalSurfaceIdFromParent", "local_surface_id",
-      local_surface_id_from_parent.ToString());
-  local_surface_id_from_parent_ = local_surface_id_from_parent;
-  local_surface_id_allocation_time_from_parent_ =
-      local_surface_id_allocation_time_from_parent;
+      "SetLocalSurfaceAllocationIdFromParent", "local_surface_id_allocation",
+      local_surface_id_allocation_from_parent.ToString());
+  local_surface_id_allocation_from_parent_ =
+      local_surface_id_allocation_from_parent;
   has_pushed_local_surface_id_from_parent_ = false;
   UpdateDeferCommitsInternal();
   SetNeedsCommit();
@@ -1301,7 +1311,7 @@
   // viz::LocalSurfaceId but that request will be deferred until we have a valid
   // viz::LocalSurfaceId from the parent.
   DCHECK(settings_.enable_surface_synchronization ||
-         local_surface_id_from_parent_.is_valid());
+         local_surface_id_allocation_from_parent_.IsValid());
   if (new_local_surface_id_request_)
     return;
   new_local_surface_id_request_ = true;
@@ -1506,9 +1516,8 @@
   if (TakeNewLocalSurfaceIdRequest())
     tree_impl->RequestNewLocalSurfaceId();
 
-  tree_impl->SetLocalSurfaceIdFromParent(
-      local_surface_id_from_parent_,
-      local_surface_id_allocation_time_from_parent_);
+  tree_impl->SetLocalSurfaceIdAllocationFromParent(
+      local_surface_id_allocation_from_parent_);
   has_pushed_local_surface_id_from_parent_ = true;
 
   if (pending_page_scale_animation_) {
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h
index 7be47d9..323e521 100644
--- a/cc/trees/layer_tree_host.h
+++ b/cc/trees/layer_tree_host.h
@@ -44,6 +44,7 @@
 #include "cc/trees/swap_promise_manager.h"
 #include "cc/trees/target_property.h"
 #include "components/viz/common/resources/resource_format.h"
+#include "components/viz/common/surfaces/local_surface_id_allocation.h"
 #include "services/metrics/public/cpp/ukm_source_id.h"
 #include "third_party/skia/include/core/SkColor.h"
 #include "ui/gfx/geometry/rect.h"
@@ -359,11 +360,10 @@
     return event_listener_properties_[static_cast<size_t>(event_class)];
   }
 
-  void SetViewportSizeAndScale(
-      const gfx::Size& device_viewport_size,
-      float device_scale_factor,
-      const viz::LocalSurfaceId& local_surface_id_from_parent,
-      base::TimeTicks local_surface_id_allocation_time_from_parent);
+  void SetViewportSizeAndScale(const gfx::Size& device_viewport_size,
+                               float device_scale_factor,
+                               const viz::LocalSurfaceIdAllocation&
+                                   local_surface_id_allocation_from_parent);
 
   void SetViewportVisibleRect(const gfx::Rect& visible_rect);
 
@@ -410,14 +410,13 @@
 
   // If this LayerTreeHost needs a valid viz::LocalSurfaceId then commits will
   // be deferred until a valid viz::LocalSurfaceId is provided.
-  void SetLocalSurfaceIdFromParent(
-      const viz::LocalSurfaceId& local_surface_id_from_parent,
-      base::TimeTicks local_surface_id_allocation_time_from_parent);
-  const viz::LocalSurfaceId& local_surface_id_from_parent() const {
-    return local_surface_id_from_parent_;
-  }
-  base::TimeTicks local_surface_id_allocation_time_from_parent() const {
-    return local_surface_id_allocation_time_from_parent_;
+  void SetLocalSurfaceIdAllocationFromParent(
+      const viz::LocalSurfaceIdAllocation&
+          local_surface_id_allocation_from_parent);
+
+  const viz::LocalSurfaceIdAllocation& local_surface_id_allocation_from_parent()
+      const {
+    return local_surface_id_allocation_from_parent_;
   }
 
   // Requests the allocation of a new LocalSurfaceId on the compositor thread.
@@ -739,8 +738,7 @@
 
   bool clear_caches_on_next_commit_ = false;
   uint32_t content_source_id_;
-  viz::LocalSurfaceId local_surface_id_from_parent_;
-  base::TimeTicks local_surface_id_allocation_time_from_parent_;
+  viz::LocalSurfaceIdAllocation local_surface_id_allocation_from_parent_;
   // Used to detect surface invariant violations.
   bool has_pushed_local_surface_id_from_parent_ = false;
   bool new_local_surface_id_request_ = false;
diff --git a/cc/trees/layer_tree_host_client.h b/cc/trees/layer_tree_host_client.h
index e6e1c360..d216ff5 100644
--- a/cc/trees/layer_tree_host_client.h
+++ b/cc/trees/layer_tree_host_client.h
@@ -42,6 +42,10 @@
   // Whether the browser controls have been locked to fully hidden or shown or
   // whether they can be freely moved.
   BrowserControlsState browser_controls_constraint;
+
+  // Set to true when a scroll gesture being handled on the compositor has
+  // ended.
+  bool scroll_gesture_did_end;
 };
 
 // A LayerTreeHost is bound to a LayerTreeHostClient. The main rendering
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc
index 7ce5bae..16bee16 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -181,7 +181,8 @@
       browser_controls_constraint(BrowserControlsState::kBoth),
       browser_controls_constraint_changed(false),
       has_scrolled_by_wheel(false),
-      has_scrolled_by_touch(false) {}
+      has_scrolled_by_touch(false),
+      scroll_gesture_did_end(false) {}
 
 ScrollAndScaleSet::~ScrollAndScaleSet() = default;
 
diff --git a/cc/trees/layer_tree_host_common.h b/cc/trees/layer_tree_host_common.h
index 14f797f..42de6d2 100644
--- a/cc/trees/layer_tree_host_common.h
+++ b/cc/trees/layer_tree_host_common.h
@@ -177,6 +177,10 @@
   bool has_scrolled_by_wheel;
   bool has_scrolled_by_touch;
 
+  // Set to true when a scroll gesture being handled on the compositor has
+  // ended.
+  bool scroll_gesture_did_end;
+
  private:
   DISALLOW_COPY_AND_ASSIGN(ScrollAndScaleSet);
 };
diff --git a/cc/trees/layer_tree_host_common_perftest.cc b/cc/trees/layer_tree_host_common_perftest.cc
index 2ed1325..561cdd1 100644
--- a/cc/trees/layer_tree_host_common_perftest.cc
+++ b/cc/trees/layer_tree_host_common_perftest.cc
@@ -49,8 +49,8 @@
 
   void SetupTree() override {
     gfx::Size viewport = gfx::Size(720, 1038);
-    layer_tree_host()->SetViewportSizeAndScale(
-        viewport, 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(viewport, 1.f,
+                                               viz::LocalSurfaceIdAllocation());
     scoped_refptr<Layer> root =
         ParseTreeFromJson(json_, &content_layer_client_);
     ASSERT_TRUE(root.get());
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 7f2daca..ef9f0b99b 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -331,7 +331,8 @@
       frame_metrics_(LTHI_FrameMetricsSettings(settings_)),
       skipped_frame_tracker_(&frame_metrics_),
       is_animating_for_snap_(false),
-      paint_image_generator_client_id_(PaintImage::GetNextGeneratorClientId()) {
+      paint_image_generator_client_id_(PaintImage::GetNextGeneratorClientId()),
+      scroll_gesture_did_end_(false) {
   DCHECK(mutator_host_);
   mutator_host_->SetMutatorHostClient(this);
 
@@ -2221,7 +2222,7 @@
     // LocalSurfaceId might slip through, but single-thread-without-scheduler
     // mode is only used in tests so it doesn't matter.
     CHECK(!settings_.single_thread_proxy_scheduler ||
-          active_tree()->local_surface_id_from_parent().is_valid());
+          active_tree()->local_surface_id_allocation_from_parent().IsValid());
     layer_tree_frame_sink_->SetLocalSurfaceId(
         child_local_surface_id_allocator_.GetCurrentLocalSurfaceId());
   }
@@ -2904,11 +2905,9 @@
   UpdateRootLayerStateForSynchronousInputHandler();
 
   // Update the child's LocalSurfaceId.
-  if (active_tree()->local_surface_id_from_parent().is_valid()) {
+  if (active_tree()->local_surface_id_allocation_from_parent().IsValid()) {
     child_local_surface_id_allocator_.UpdateFromParent(
-        viz::LocalSurfaceIdAllocation(
-            active_tree()->local_surface_id_from_parent(),
-            active_tree()->local_surface_id_allocation_time_from_parent()));
+        active_tree()->local_surface_id_allocation_from_parent());
     if (active_tree()->TakeNewLocalSurfaceIdRequest())
       child_local_surface_id_allocator_.GenerateId();
   }
@@ -4602,6 +4601,8 @@
 }
 
 void LayerTreeHostImpl::ScrollEnd(ScrollState* scroll_state, bool should_snap) {
+  scroll_gesture_did_end_ = true;
+
   if (should_snap && SnapAtScrollEnd())
     return;
 
@@ -4781,6 +4782,7 @@
   // Record and reset scroll source flags.
   scroll_info->has_scrolled_by_wheel = has_scrolled_by_wheel_;
   scroll_info->has_scrolled_by_touch = has_scrolled_by_touch_;
+  scroll_info->scroll_gesture_did_end = scroll_gesture_did_end_;
   has_scrolled_by_wheel_ = has_scrolled_by_touch_ = false;
 
   if (browser_controls_manager()) {
@@ -4789,6 +4791,7 @@
             &scroll_info->browser_controls_constraint_changed);
   }
 
+  scroll_gesture_did_end_ = false;
   return scroll_info;
 }
 
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index fc8bfce..f879057 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -1110,6 +1110,10 @@
 
   const PaintImage::GeneratorClientId paint_image_generator_client_id_;
 
+  // Set to true when a scroll gesture being handled on the compositor has
+  // ended.
+  bool scroll_gesture_did_end_;
+
   DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
 };
 
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index ca072ef..48db654 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -193,9 +193,10 @@
   }
   void DidActivateSyncTree() override {
     // Make sure the active tree always has a valid LocalSurfaceId.
-    host_impl_->active_tree()->SetLocalSurfaceIdFromParent(
-        viz::LocalSurfaceId(1, base::UnguessableToken::Deserialize(2u, 3u)),
-        base::TimeTicks());
+    host_impl_->active_tree()->SetLocalSurfaceIdAllocationFromParent(
+        viz::LocalSurfaceIdAllocation(
+            viz::LocalSurfaceId(1, base::UnguessableToken::Deserialize(2u, 3u)),
+            base::TimeTicks::Now()));
   }
   void WillPrepareTiles() override {}
   void DidPrepareTiles() override {}
@@ -256,9 +257,10 @@
     bool init = host_impl_->InitializeFrameSink(layer_tree_frame_sink_.get());
     host_impl_->active_tree()->SetDeviceViewportSize(gfx::Size(10, 10));
     host_impl_->active_tree()->PushPageScaleFromMainThread(1.f, 1.f, 1.f);
-    host_impl_->active_tree()->SetLocalSurfaceIdFromParent(
-        viz::LocalSurfaceId(1, base::UnguessableToken::Deserialize(2u, 3u)),
-        base::TimeTicks());
+    host_impl_->active_tree()->SetLocalSurfaceIdAllocationFromParent(
+        viz::LocalSurfaceIdAllocation(
+            viz::LocalSurfaceId(1, base::UnguessableToken::Deserialize(2u, 3u)),
+            base::TimeTicks::Now()));
     // Set the viz::BeginFrameArgs so that methods which use it are able to.
     host_impl_->WillBeginImplFrame(viz::CreateBeginFrameArgsForTesting(
         BEGINFRAME_FROM_HERE, 0, 1,
@@ -3582,9 +3584,10 @@
     host_impl_->active_tree()->BuildPropertyTreesForTesting();
     host_impl_->active_tree()->DidBecomeActive();
     host_impl_->active_tree()->HandleScrollbarShowRequestsFromMain();
-    host_impl_->active_tree()->SetLocalSurfaceIdFromParent(
-        viz::LocalSurfaceId(1, base::UnguessableToken::Deserialize(2u, 3u)),
-        base::TimeTicks());
+    host_impl_->active_tree()->SetLocalSurfaceIdAllocationFromParent(
+        viz::LocalSurfaceIdAllocation(
+            viz::LocalSurfaceId(1, base::UnguessableToken::Deserialize(2u, 3u)),
+            base::TimeTicks::Now()));
     DrawFrame();
 
     // SetScrollElementId will initialize the scrollbar which will cause it to
@@ -9320,9 +9323,10 @@
   root->test_properties()->AddChild(std::move(child));
   layer_tree_host_impl->active_tree()->SetRootLayerForTesting(std::move(root));
   layer_tree_host_impl->active_tree()->BuildPropertyTreesForTesting();
-  layer_tree_host_impl->active_tree()->SetLocalSurfaceIdFromParent(
-      viz::LocalSurfaceId(1, base::UnguessableToken::Deserialize(2u, 3u)),
-      base::TimeTicks());
+  layer_tree_host_impl->active_tree()->SetLocalSurfaceIdAllocationFromParent(
+      viz::LocalSurfaceIdAllocation(
+          viz::LocalSurfaceId(1, base::UnguessableToken::Deserialize(2u, 3u)),
+          base::TimeTicks::Now()));
 
   TestFrameData frame;
 
diff --git a/cc/trees/layer_tree_host_perftest.cc b/cc/trees/layer_tree_host_perftest.cc
index d4b8ddc..9c800d9 100644
--- a/cc/trees/layer_tree_host_perftest.cc
+++ b/cc/trees/layer_tree_host_perftest.cc
@@ -147,8 +147,8 @@
 
   void BuildTree() override {
     gfx::Size viewport = gfx::Size(720, 1038);
-    layer_tree_host()->SetViewportSizeAndScale(
-        viewport, 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(viewport, 1.f,
+                                               viz::LocalSurfaceIdAllocation());
     scoped_refptr<Layer> root = ParseTreeFromJson(json_,
                                                   &fake_content_layer_client_);
     ASSERT_TRUE(root.get());
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 20be4609..a7ab71ce8 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -1316,8 +1316,8 @@
   void SetupTree() override {
     root_ = Layer::Create();
 
-    layer_tree_host()->SetViewportSizeAndScale(
-        gfx::Size(10, 10), 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(gfx::Size(10, 10), 1.f,
+                                               viz::LocalSurfaceIdAllocation());
 
     layer_tree_host()->SetRootLayer(root_);
 
@@ -1413,8 +1413,8 @@
     child_ = Layer::Create();
     root_->AddChild(child_);
 
-    layer_tree_host()->SetViewportSizeAndScale(
-        gfx::Size(100, 100), 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(gfx::Size(100, 100), 1.f,
+                                               viz::LocalSurfaceIdAllocation());
 
     layer_tree_host()->SetRootLayer(root_);
     root_->SetBounds(gfx::Size(50, 50));
@@ -1501,8 +1501,8 @@
     child_layer_ = Layer::Create();
     layer_tree_host()->root_layer()->AddChild(child_layer_);
 
-    layer_tree_host()->SetViewportSizeAndScale(
-        gfx::Size(10, 10), 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(gfx::Size(10, 10), 1.f,
+                                               viz::LocalSurfaceIdAllocation());
 
     layer_tree_host()->root_layer()->SetBounds(gfx::Size(50, 50));
     child_layer_->SetBounds(gfx::Size(50, 50));
@@ -2333,8 +2333,8 @@
     root_layer_->SetIsDrawable(true);
     root_layer_->SetBounds(bounds_);
     layer_tree_host()->SetRootLayer(root_layer_);
-    layer_tree_host()->SetViewportSizeAndScale(
-        bounds_, 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(bounds_, 1.f,
+                                               viz::LocalSurfaceIdAllocation());
     PostSetNeedsCommitToMainThread();
     client_.set_bounds(root_layer_->bounds());
   }
@@ -2398,8 +2398,8 @@
     root_layer_->SetTransform(transform);
     root_layer_->SetBounds(bounds_);
     layer_tree_host()->SetRootLayer(root_layer_);
-    layer_tree_host()->SetViewportSizeAndScale(
-        bounds_, 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(bounds_, 1.f,
+                                               viz::LocalSurfaceIdAllocation());
 
     PostSetNeedsCommitToMainThread();
     client_.set_bounds(root_layer_->bounds());
@@ -2435,7 +2435,7 @@
     // On the second commit, resize the viewport.
     if (num_draws_ == 1) {
       layer_tree_host()->SetViewportSizeAndScale(
-          gfx::Size(400, 64), 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+          gfx::Size(400, 64), 1.f, viz::LocalSurfaceIdAllocation());
     }
     if (num_draws_ < 2) {
       layer_tree_host()->SetNeedsRedrawRect(invalid_rect_);
@@ -2550,8 +2550,7 @@
         // a second commit as a result.
         layer_tree_host()->SetViewportSizeAndScale(
             layer_tree_host()->device_viewport_size(), 4.f,
-            layer_tree_host()->local_surface_id_from_parent(),
-            layer_tree_host()->local_surface_id_allocation_time_from_parent());
+            layer_tree_host()->local_surface_id_allocation_from_parent());
         break;
       default:
         // No extra commits.
@@ -2596,8 +2595,7 @@
     if (layer_tree_host()->SourceFrameNumber() == 1) {
       layer_tree_host()->SetViewportSizeAndScale(
           layer_tree_host()->device_viewport_size(), 4.f,
-          layer_tree_host()->local_surface_id_from_parent(),
-          layer_tree_host()->local_surface_id_allocation_time_from_parent());
+          layer_tree_host()->local_surface_id_allocation_from_parent());
     }
   }
 
@@ -2775,8 +2773,8 @@
     root_layer_->SetIsDrawable(true);
     root_layer_->SetBounds(bounds_);
     layer_tree_host()->SetRootLayer(root_layer_);
-    layer_tree_host()->SetViewportSizeAndScale(
-        bounds_, 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(bounds_, 1.f,
+                                               viz::LocalSurfaceIdAllocation());
     PostSetNeedsCommitToMainThread();
     client_.set_bounds(root_layer_->bounds());
   }
@@ -3064,8 +3062,8 @@
   LayerTreeHostTestCommit() = default;
 
   void BeginTest() override {
-    layer_tree_host()->SetViewportSizeAndScale(
-        gfx::Size(20, 20), 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(gfx::Size(20, 20), 1.f,
+                                               viz::LocalSurfaceIdAllocation());
     layer_tree_host()->set_background_color(SK_ColorGRAY);
     layer_tree_host()->SetEventListenerProperties(
         EventListenerClass::kMouseWheel, EventListenerProperties::kPassive);
@@ -3112,8 +3110,8 @@
       : frame_count_with_pending_tree_(0) {}
 
   void BeginTest() override {
-    layer_tree_host()->SetViewportSizeAndScale(
-        gfx::Size(20, 20), 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(gfx::Size(20, 20), 1.f,
+                                               viz::LocalSurfaceIdAllocation());
     layer_tree_host()->set_background_color(SK_ColorGRAY);
 
     PostSetNeedsCommitToMainThread();
@@ -3166,8 +3164,8 @@
   LayerTreeHostTestFrameTimeUpdatesAfterDraw() : frame_(0) {}
 
   void BeginTest() override {
-    layer_tree_host()->SetViewportSizeAndScale(
-        gfx::Size(20, 20), 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(gfx::Size(20, 20), 1.f,
+                                               viz::LocalSurfaceIdAllocation());
     layer_tree_host()->set_background_color(SK_ColorGRAY);
 
     PostSetNeedsCommitToMainThread();
@@ -3380,8 +3378,8 @@
     root_layer_ = FakePictureLayer::Create(&client_);
     child_layer_ = FakePictureLayer::Create(&client_);
 
-    layer_tree_host()->SetViewportSizeAndScale(
-        gfx::Size(60, 60), 1.5f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(gfx::Size(60, 60), 1.5f,
+                                               viz::LocalSurfaceIdAllocation());
     EXPECT_EQ(gfx::Size(60, 60), layer_tree_host()->device_viewport_size());
 
     root_layer_->AddChild(child_layer_);
@@ -3477,8 +3475,8 @@
       : num_commit_complete_(0), num_draw_layers_(0) {}
 
   void BeginTest() override {
-    layer_tree_host()->SetViewportSizeAndScale(
-        gfx::Size(10, 10), 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(gfx::Size(10, 10), 1.f,
+                                               viz::LocalSurfaceIdAllocation());
     layer_tree_host()->root_layer()->SetBounds(gfx::Size(10, 10));
 
     layer_ = FakePictureLayer::Create(&client_);
@@ -4484,7 +4482,7 @@
         break;
       case 10:
         layer_tree_host()->SetViewportSizeAndScale(
-            gfx::Size(20, 20), 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+            gfx::Size(20, 20), 1.f, viz::LocalSurfaceIdAllocation());
         // No layers need commit.
         break;
       case 11:
@@ -5505,8 +5503,8 @@
   void BeginTest() override {
     // The viewport is empty, but we still need to update layers on the main
     // thread.
-    layer_tree_host()->SetViewportSizeAndScale(
-        gfx::Size(0, 0), 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(gfx::Size(0, 0), 1.f,
+                                               viz::LocalSurfaceIdAllocation());
     PostSetNeedsCommitToMainThread();
   }
 
@@ -5837,8 +5835,8 @@
     layer_->SetBounds(gfx::Size(10, 10));
     layer_tree_host()->SetRootLayer(layer_);
     gfx::Size bounds(100, 100);
-    layer_tree_host()->SetViewportSizeAndScale(
-        bounds, 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(bounds, 1.f,
+                                               viz::LocalSurfaceIdAllocation());
     PostSetNeedsCommitToMainThread();
   }
 
@@ -5934,8 +5932,8 @@
     layer_->SetBounds(gfx::Size(10, 10));
     layer_tree_host()->SetRootLayer(layer_);
     gfx::Size bounds(100, 100);
-    layer_tree_host()->SetViewportSizeAndScale(
-        bounds, 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(bounds, 1.f,
+                                               viz::LocalSurfaceIdAllocation());
     PostSetNeedsCommitToMainThread();
   }
 
@@ -6877,12 +6875,12 @@
         // Setting an empty viewport causes draws to get skipped, so the active
         // tree won't update draw properties.
         layer_tree_host()->SetViewportSizeAndScale(
-            gfx::Size(), 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+            gfx::Size(), 1.f, viz::LocalSurfaceIdAllocation());
         child_->SetForceRenderSurfaceForTesting(false);
         break;
       case 3:
         layer_tree_host()->SetViewportSizeAndScale(
-            root_->bounds(), 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+            root_->bounds(), 1.f, viz::LocalSurfaceIdAllocation());
     }
   }
 
@@ -7320,8 +7318,8 @@
 
     layer_tree_host()->SetRootLayer(root);
     LayerTreeHostTest::SetupTree();
-    layer_tree_host()->SetViewportSizeAndScale(
-        viewport_size_, 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(viewport_size_, 1.f,
+                                               viz::LocalSurfaceIdAllocation());
     client_.set_bounds(root->bounds());
   }
 
@@ -7546,8 +7544,8 @@
   }
 
   void BeginTest() override {
-    layer_tree_host()->SetViewportSizeAndScale(
-        gfx::Size(16, 16), 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(gfx::Size(16, 16), 1.f,
+                                               viz::LocalSurfaceIdAllocation());
     PostSetNeedsCommitToMainThread();
   }
 
@@ -7928,7 +7926,9 @@
                                    DrawResult draw_result) override {
     EXPECT_EQ(DRAW_SUCCESS, draw_result);
     EXPECT_EQ(expected_local_surface_id_,
-              host_impl->active_tree()->local_surface_id_from_parent());
+              host_impl->active_tree()
+                  ->local_surface_id_allocation_from_parent()
+                  .local_surface_id());
     return draw_result;
   }
 
@@ -7970,7 +7970,9 @@
     EXPECT_EQ(DRAW_SUCCESS, draw_result);
     // We should not be picking up the newer |child_local_surface_id_|.
     EXPECT_EQ(expected_local_surface_id_,
-              host_impl->active_tree()->local_surface_id_from_parent());
+              host_impl->active_tree()
+                  ->local_surface_id_allocation_from_parent()
+                  .local_surface_id());
     return draw_result;
   }
 
@@ -8008,7 +8010,9 @@
                                    DrawResult draw_result) override {
     EXPECT_EQ(DRAW_SUCCESS, draw_result);
     EXPECT_EQ(expected_parent_local_surface_id_,
-              host_impl->active_tree()->local_surface_id_from_parent());
+              host_impl->active_tree()
+                  ->local_surface_id_allocation_from_parent()
+                  .local_surface_id());
     return draw_result;
   }
 
@@ -8077,8 +8081,8 @@
 
     layer_tree_host()->SetRootLayer(root);
     LayerTreeHostTest::SetupTree();
-    layer_tree_host()->SetViewportSizeAndScale(
-        viewport_size_, 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(viewport_size_, 1.f,
+                                               viz::LocalSurfaceIdAllocation());
     client_.set_bounds(root->bounds());
   }
 
@@ -8886,8 +8890,8 @@
   }
 
   void BeginTest() override {
-    layer_tree_host()->SetViewportSizeAndScale(
-        gfx::Size(10, 10), 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(gfx::Size(10, 10), 1.f,
+                                               viz::LocalSurfaceIdAllocation());
     layer_tree_host()->root_layer()->SetBounds(gfx::Size(10, 10));
     allocator_.GenerateId();
     local_surface_id_ = allocator_.GetCurrentLocalSurfaceId();
diff --git a/cc/trees/layer_tree_host_unittest_copyrequest.cc b/cc/trees/layer_tree_host_unittest_copyrequest.cc
index 3d035883..2bc31da1 100644
--- a/cc/trees/layer_tree_host_unittest_copyrequest.cc
+++ b/cc/trees/layer_tree_host_unittest_copyrequest.cc
@@ -338,7 +338,7 @@
 
         // Prevent drawing so we can't make a copy of the impl_destroyed layer.
         layer_tree_host()->SetViewportSizeAndScale(
-            gfx::Size(), 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+            gfx::Size(), 1.f, viz::LocalSurfaceIdAllocation());
         break;
       case 2:
         // Flush the message loops and make sure the callbacks run.
@@ -736,8 +736,8 @@
     PostSetNeedsCommitToMainThread();
 
     // Prevent drawing.
-    layer_tree_host()->SetViewportSizeAndScale(
-        gfx::Size(0, 0), 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(gfx::Size(0, 0), 1.f,
+                                               viz::LocalSurfaceIdAllocation());
 
     AddCopyRequest(copy_layer_.get());
   }
@@ -752,9 +752,8 @@
   void DidCommit() override {
     if (layer_tree_host()->SourceFrameNumber() == 1) {
       // Allow drawing.
-      layer_tree_host()->SetViewportSizeAndScale(gfx::Size(root_->bounds()),
-                                                 1.f, viz::LocalSurfaceId(),
-                                                 base::TimeTicks());
+      layer_tree_host()->SetViewportSizeAndScale(
+          gfx::Size(root_->bounds()), 1.f, viz::LocalSurfaceIdAllocation());
 
       AddCopyRequest(copy_layer_.get());
     }
@@ -1100,7 +1099,7 @@
         copy_layer_->RequestCopyOfOutput(std::move(request));
 
         layer_tree_host()->SetViewportSizeAndScale(
-            gfx::Size(), 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+            gfx::Size(), 1.f, viz::LocalSurfaceIdAllocation());
         break;
       }
       case 2:
@@ -1113,7 +1112,7 @@
         // Allow us to draw now.
         layer_tree_host()->SetViewportSizeAndScale(
             layer_tree_host()->root_layer()->bounds(), 1.f,
-            viz::LocalSurfaceId(), base::TimeTicks());
+            viz::LocalSurfaceIdAllocation());
         break;
       case 4:
         EXPECT_EQ(1, callback_count_);
@@ -1181,7 +1180,7 @@
         copy_layer_->RequestCopyOfOutput(std::move(request));
 
         layer_tree_host()->SetViewportSizeAndScale(
-            gfx::Size(), 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+            gfx::Size(), 1.f, viz::LocalSurfaceIdAllocation());
         break;
       }
       case 2:
diff --git a/cc/trees/layer_tree_host_unittest_damage.cc b/cc/trees/layer_tree_host_unittest_damage.cc
index 87e10ba..809985a 100644
--- a/cc/trees/layer_tree_host_unittest_damage.cc
+++ b/cc/trees/layer_tree_host_unittest_damage.cc
@@ -109,7 +109,7 @@
     switch (layer_tree_host()->SourceFrameNumber()) {
       case 1:
         layer_tree_host()->SetViewportSizeAndScale(
-            gfx::Size(15, 15), 1.f, viz::LocalSurfaceId(), base::TimeTicks());
+            gfx::Size(15, 15), 1.f, viz::LocalSurfaceIdAllocation());
         break;
     }
   }
diff --git a/cc/trees/layer_tree_host_unittest_masks.cc b/cc/trees/layer_tree_host_unittest_masks.cc
index 38bb73df..d0dfd9b9 100644
--- a/cc/trees/layer_tree_host_unittest_masks.cc
+++ b/cc/trees/layer_tree_host_unittest_masks.cc
@@ -534,7 +534,7 @@
       case 1:
         gfx::Size double_root_size(200, 200);
         layer_tree_host()->SetViewportSizeAndScale(
-            double_root_size, 2.f, viz::LocalSurfaceId(), base::TimeTicks());
+            double_root_size, 2.f, viz::LocalSurfaceIdAllocation());
         break;
     }
   }
diff --git a/cc/trees/layer_tree_host_unittest_picture.cc b/cc/trees/layer_tree_host_unittest_picture.cc
index 69c8a72..7eed6e1 100644
--- a/cc/trees/layer_tree_host_unittest_picture.cc
+++ b/cc/trees/layer_tree_host_unittest_picture.cc
@@ -193,9 +193,8 @@
         // Change the picture layer's size along with the viewport, so it will
         // consider picking a new tile size.
         picture_->SetBounds(gfx::Size(768, 1056));
-        layer_tree_host()->SetViewportSizeAndScale(gfx::Size(768, 1056), 1.f,
-                                                   viz::LocalSurfaceId(),
-                                                   base::TimeTicks());
+        layer_tree_host()->SetViewportSizeAndScale(
+            gfx::Size(768, 1056), 1.f, viz::LocalSurfaceIdAllocation());
         break;
       case 2:
         EndTest();
@@ -600,8 +599,8 @@
     root->AddChild(normal_layer_);
 
     layer_tree_host()->SetRootLayer(root);
-    layer_tree_host()->SetViewportSizeAndScale(size, 1.f, viz::LocalSurfaceId(),
-                                               base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(size, 1.f,
+                                               viz::LocalSurfaceIdAllocation());
 
     client_.set_fill_with_nonsolid_color(true);
     client_.set_bounds(size);
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 370373629..ff0eaf35 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -491,9 +491,8 @@
 
   if (TakeNewLocalSurfaceIdRequest())
     target_tree->RequestNewLocalSurfaceId();
-  target_tree->SetLocalSurfaceIdFromParent(
-      local_surface_id_from_parent(),
-      local_surface_id_allocation_time_from_parent_);
+  target_tree->SetLocalSurfaceIdAllocationFromParent(
+      local_surface_id_allocation_from_parent());
 
   target_tree->pending_page_scale_animation_ =
       std::move(pending_page_scale_animation_);
@@ -1044,12 +1043,11 @@
   host_impl_->SetNeedUpdateGpuRasterizationStatus();
 }
 
-void LayerTreeImpl::SetLocalSurfaceIdFromParent(
-    const viz::LocalSurfaceId& local_surface_id_from_parent,
-    base::TimeTicks local_surface_id_allocation_time_from_parent) {
-  local_surface_id_from_parent_ = local_surface_id_from_parent;
-  local_surface_id_allocation_time_from_parent_ =
-      local_surface_id_allocation_time_from_parent;
+void LayerTreeImpl::SetLocalSurfaceIdAllocationFromParent(
+    const viz::LocalSurfaceIdAllocation&
+        local_surface_id_allocation_from_parent) {
+  local_surface_id_allocation_from_parent_ =
+      local_surface_id_allocation_from_parent;
 }
 
 void LayerTreeImpl::RequestNewLocalSurfaceId() {
diff --git a/cc/trees/layer_tree_impl.h b/cc/trees/layer_tree_impl.h
index e858749e..4221e201 100644
--- a/cc/trees/layer_tree_impl.h
+++ b/cc/trees/layer_tree_impl.h
@@ -320,15 +320,12 @@
   void set_content_source_id(uint32_t id) { content_source_id_ = id; }
   uint32_t content_source_id() { return content_source_id_; }
 
-  void SetLocalSurfaceIdFromParent(
-      const viz::LocalSurfaceId& local_surface_id_from_parent,
-      base::TimeTicks local_surface_id_allocation_time_from_parent);
-  const viz::LocalSurfaceId& local_surface_id_from_parent() const {
-    return local_surface_id_from_parent_;
-  }
-
-  base::TimeTicks local_surface_id_allocation_time_from_parent() const {
-    return local_surface_id_allocation_time_from_parent_;
+  void SetLocalSurfaceIdAllocationFromParent(
+      const viz::LocalSurfaceIdAllocation&
+          local_surface_id_allocation_from_parent);
+  const viz::LocalSurfaceIdAllocation& local_surface_id_allocation_from_parent()
+      const {
+    return local_surface_id_allocation_from_parent_;
   }
 
   void RequestNewLocalSurfaceId();
@@ -657,8 +654,7 @@
   gfx::ColorSpace raster_color_space_;
 
   uint32_t content_source_id_;
-  viz::LocalSurfaceId local_surface_id_from_parent_;
-  base::TimeTicks local_surface_id_allocation_time_from_parent_;
+  viz::LocalSurfaceIdAllocation local_surface_id_allocation_from_parent_;
   bool new_local_surface_id_request_ = false;
   gfx::Size device_viewport_size_;
 
diff --git a/chrome/android/java/res/values/dimens.xml b/chrome/android/java/res/values/dimens.xml
index 2326b8a..e546c72 100644
--- a/chrome/android/java/res/values/dimens.xml
+++ b/chrome/android/java/res/values/dimens.xml
@@ -546,7 +546,6 @@
     <dimen name="download_manager_ideal_image_width">150dp</dimen>
     <dimen name="download_manager_recycler_view_min_padding_wide_screen">16dp</dimen>
     <dimen name="download_manager_max_image_item_width_wide_screen">300dp</dimen>
-    <dimen name="download_manager_wide_screen_threshold">600dp</dimen>
     <dimen name="download_manager_image_padding">2dp</dimen>
     <dimen name="download_manager_prefetch_horizontal_margin">16dp</dimen>
     <dimen name="download_manager_prefetch_vertical_margin">12dp</dimen>
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/cached_image_fetcher/CachedImageFetcher.java b/chrome/android/java/src/org/chromium/chrome/browser/cached_image_fetcher/CachedImageFetcher.java
new file mode 100644
index 0000000..0fa4faf
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/cached_image_fetcher/CachedImageFetcher.java
@@ -0,0 +1,117 @@
+// Copyright 2018 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.
+
+package org.chromium.chrome.browser.cached_image_fetcher;
+
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+
+import org.chromium.base.Callback;
+import org.chromium.base.ThreadUtils;
+import org.chromium.base.VisibleForTesting;
+import org.chromium.base.task.AsyncTask;
+import org.chromium.chrome.browser.profiles.Profile;
+/**
+ * Provides cached image fetching capabilities. Uses getLastUsedProfile, which
+ * will need to be changed when supporting multi-profile.
+ */
+public class CachedImageFetcher {
+    private static CachedImageFetcher sInstance;
+
+    public static CachedImageFetcher getInstance() {
+        ThreadUtils.assertOnUiThread();
+
+        if (sInstance == null) {
+            sInstance = new CachedImageFetcher(Profile.getLastUsedProfile());
+        }
+
+        return sInstance;
+    }
+
+    private CachedImageFetcherBridge mCachedImageFetcherBridge;
+
+    /**
+     * Creates a CachedImageFetcher for the current user.
+     *
+     * @param profile Profile of the user we are fetching for.
+     */
+    private CachedImageFetcher(Profile profile) {
+        this(new CachedImageFetcherBridge(profile));
+    }
+
+    /**
+     * Creates a CachedImageFetcher for testing.
+     *
+     * @param bridge Mock bridge to use.
+     */
+    @VisibleForTesting
+    CachedImageFetcher(CachedImageFetcherBridge bridge) {
+        mCachedImageFetcherBridge = bridge;
+    }
+
+    /**
+     * Fetches the image at url with the desired size. Image is null if not
+     * found or fails decoding.
+     *
+     * @param url The url to fetch the image from.
+     * @param width The new bitmap's desired width (in pixels).
+     * @param height The new bitmap's desired height (in pixels).
+     * @param callback The function which will be called when the image is ready.
+     */
+    public void fetchImage(String url, int width, int height, Callback<Bitmap> callback) {
+        BitmapFactory.Options options = new BitmapFactory.Options();
+        options.outWidth = width;
+        options.outHeight = height;
+
+        fetchImage(url, options, callback);
+    }
+
+    /**
+     * Alias of fetchImage that ignores scaling.
+     *
+     * @param url The url to fetch the image from.
+     * @param callback The function which will be called when the image is ready.
+     */
+    public void fetchImage(String url, Callback<Bitmap> callback) {
+        fetchImage(url, new BitmapFactory.Options(), callback);
+    }
+
+    /**
+     * Starts an AsyncTask to first check the disk for the desired image, then
+     * fetches from the network if it isn't found.
+     *
+     * @param url The url to fetch the image from.
+     * @param options Settings when loading the image.
+     * @param callback The function which will be called when the image is ready.
+     */
+    @VisibleForTesting
+    protected void fetchImage(
+            String url, BitmapFactory.Options options, Callback<Bitmap> callback) {
+        String filePath = mCachedImageFetcherBridge.getFilePath(url);
+        new AsyncTask<Bitmap>() {
+            @Override
+            protected Bitmap doInBackground() {
+                return tryToLoadImageFromDisk(filePath, options);
+            }
+
+            @Override
+            protected void onPostExecute(Bitmap bitmap) {
+                if (bitmap != null) {
+                    callback.onResult(bitmap);
+                    return;
+                }
+
+                mCachedImageFetcherBridge.fetchImage(
+                        url, options.outWidth, options.outHeight, callback);
+            }
+        }
+                .executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
+    }
+
+    /** Wrapper function to decode a file for disk, useful for testing. */
+    @VisibleForTesting
+    Bitmap tryToLoadImageFromDisk(String filePath, BitmapFactory.Options options) {
+        return BitmapFactory.decodeFile(filePath, options);
+    }
+}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/cached_image_fetcher/CachedImageFetcherBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/cached_image_fetcher/CachedImageFetcherBridge.java
new file mode 100644
index 0000000..eda84b9
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/cached_image_fetcher/CachedImageFetcherBridge.java
@@ -0,0 +1,65 @@
+// Copyright 2018 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.
+
+package org.chromium.chrome.browser.cached_image_fetcher;
+
+import android.graphics.Bitmap;
+
+import org.chromium.base.Callback;
+import org.chromium.base.annotations.JNINamespace;
+import org.chromium.chrome.browser.profiles.Profile;
+
+/**
+ * Provides access to native implementations of CachedImageFetcher for the given profile.
+ */
+@JNINamespace("image_fetcher")
+class CachedImageFetcherBridge {
+    private long mNativeCachedImageFetcherBridge;
+
+    /**
+     * Creates a CachedImageFetcherBridge for accessing the native CachedImageFetcher
+     * implementation.
+     */
+    public CachedImageFetcherBridge(Profile profile) {
+        mNativeCachedImageFetcherBridge = nativeInit(profile);
+    }
+
+    /** Cleans up native half of bridge. */
+    public void destroy() {
+        assert mNativeCachedImageFetcherBridge != 0;
+        nativeDestroy(mNativeCachedImageFetcherBridge);
+        mNativeCachedImageFetcherBridge = 0;
+    }
+
+    /**
+     * Get the full path of the given url on disk.
+     *
+     * @param url The url to hash.
+     * @return The full path to the resource on disk.
+     */
+    public String getFilePath(String url) {
+        assert mNativeCachedImageFetcherBridge != 0;
+        return nativeGetFilePath(mNativeCachedImageFetcherBridge, url);
+    }
+
+    /**
+     * Fetch the image from native.
+     *
+     * @param url The url to fetch.
+     * @param width The width to use when resizing the image.
+     * @param height The height to use when resizing the image.
+     * @param callback The callback to call when the image is ready.
+     */
+    public void fetchImage(String url, int width, int height, Callback<Bitmap> callback) {
+        assert mNativeCachedImageFetcherBridge != 0;
+        nativeFetchImage(mNativeCachedImageFetcherBridge, url, width, height, callback);
+    }
+
+    // Native methods
+    private static native long nativeInit(Profile profile);
+    private native void nativeDestroy(long nativeCachedImageFetcherBridge);
+    private native String nativeGetFilePath(long nativeCachedImageFetcherBridge, String url);
+    private native void nativeFetchImage(long nativeCachedImageFetcherBridge, String url,
+            int widthPx, int heightPx, Callback<Bitmap> callback);
+}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/cached_image_fetcher/OWNERS b/chrome/android/java/src/org/chromium/chrome/browser/cached_image_fetcher/OWNERS
new file mode 100644
index 0000000..833f4d66
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/cached_image_fetcher/OWNERS
@@ -0,0 +1 @@
+file://components/image_fetcher/OWNERS
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListView.java b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListView.java
index 2e12d1f..abc8664 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListView.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/download/home/list/DateOrderedListView.java
@@ -41,7 +41,6 @@
     private final int mPrefetchVerticalPaddingPx;
     private final int mPrefetchHorizontalPaddingPx;
     private final int mMaxWidthImageItemPx;
-    private final int mWideScreenThreshold;
 
     private final RecyclerView mView;
     private final UiConfig mUiConfig;
@@ -62,8 +61,6 @@
                 R.dimen.download_manager_prefetch_vertical_margin);
         mMaxWidthImageItemPx = context.getResources().getDimensionPixelSize(
                 R.dimen.download_manager_max_image_item_width_wide_screen);
-        mWideScreenThreshold = context.getResources().getDimensionPixelSize(
-                R.dimen.download_manager_wide_screen_threshold);
 
         mView = new RecyclerView(context) {
             private int mScreenOrientation = Configuration.ORIENTATION_UNDEFINED;
@@ -130,6 +127,12 @@
         return padding;
     }
 
+    /** @return The view width available after start and end padding. */
+    private int getAvailableViewWidth() {
+        return mView.getWidth() - ViewCompat.getPaddingStart(mView)
+                - ViewCompat.getPaddingEnd(mView);
+    }
+
     private class GridLayoutManagerImpl extends GridLayoutManager {
         /** Creates an instance of a {@link GridLayoutManagerImpl}. */
         public GridLayoutManagerImpl(Context context) {
@@ -142,7 +145,7 @@
         public void onLayoutChildren(Recycler recycler, State state) {
             assert getOrientation() == VERTICAL;
 
-            int availableWidth = getWidth() - mImagePaddingPx;
+            int availableWidth = getAvailableViewWidth() - mImagePaddingPx;
             int columnWidth = mIdealImageWidthPx - mImagePaddingPx;
 
             int easyFitSpan = availableWidth / columnWidth;
@@ -202,8 +205,10 @@
                     break;
             }
 
-            if (isFullWidthMedia && mView.getWidth() > mWideScreenThreshold) {
-                outRect.right += Math.max(mView.getWidth() - mMaxWidthImageItemPx, 0);
+            if (isFullWidthMedia
+                    && mUiConfig.getCurrentDisplayStyle().horizontal
+                            == HorizontalDisplayStyle.WIDE) {
+                outRect.right += Math.max(getAvailableViewWidth() - mMaxWidthImageItemPx, 0);
             }
         }
     }
diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni
index 3143615..b79fae7 100644
--- a/chrome/android/java_sources.gni
+++ b/chrome/android/java_sources.gni
@@ -1354,6 +1354,8 @@
   "java/src/org/chromium/chrome/browser/subresource_filter/TestSubresourceFilterPublisher.java",
   "java/src/org/chromium/chrome/browser/printing/PrintShareActivity.java",
   "java/src/org/chromium/chrome/browser/printing/TabPrinter.java",
+  "java/src/org/chromium/chrome/browser/cached_image_fetcher/CachedImageFetcher.java",
+  "java/src/org/chromium/chrome/browser/cached_image_fetcher/CachedImageFetcherBridge.java",
   "java/src/org/chromium/chrome/browser/profiles/Profile.java",
   "java/src/org/chromium/chrome/browser/profiles/ProfileDownloader.java",
   "java/src/org/chromium/chrome/browser/profiles/ProfileManagerUtils.java",
@@ -2258,6 +2260,7 @@
   "junit/src/org/chromium/chrome/browser/browserservices/OriginTest.java",
   "junit/src/org/chromium/chrome/browser/browserservices/TrustedWebActivityClientTest.java",
   "junit/src/org/chromium/chrome/browser/browserservices/TrustedWebActivityDisclosureTest.java",
+  "junit/src/org/chromium/chrome/browser/cached_image_fetcher/CachedImageFetcherTest.java",
   "junit/src/org/chromium/chrome/browser/compositor/animation/CompositorAnimatorTest.java",
   "junit/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelperTest.java",
   "junit/src/org/chromium/chrome/browser/compositor/CompositorSurfaceManagerImplTest.java",
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/cached_image_fetcher/CachedImageFetcherTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/cached_image_fetcher/CachedImageFetcherTest.java
new file mode 100644
index 0000000..932ccf6
--- /dev/null
+++ b/chrome/android/junit/src/org/chromium/chrome/browser/cached_image_fetcher/CachedImageFetcherTest.java
@@ -0,0 +1,140 @@
+// Copyright 2018 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.
+
+package org.chromium.chrome.browser.cached_image_fetcher;
+
+import static org.junit.Assert.assertEquals;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyInt;
+import static org.mockito.ArgumentMatchers.anyObject;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.support.test.filters.SmallTest;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Captor;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.mockito.invocation.InvocationOnMock;
+import org.robolectric.annotation.Config;
+
+import org.chromium.base.Callback;
+import org.chromium.base.task.test.CustomShadowAsyncTask;
+import org.chromium.base.test.BaseRobolectricTestRunner;
+import org.chromium.chrome.browser.contextmenu.ChromeContextMenuPopulatorTest.ShadowUrlUtilities;
+
+/**
+ * Unit tests for CachedImageFetcher.
+ */
+@RunWith(BaseRobolectricTestRunner.class)
+@Config(manifest = Config.NONE, shadows = {ShadowUrlUtilities.class, CustomShadowAsyncTask.class})
+public class CachedImageFetcherTest {
+    private static String sDummyUrl = "foo.bar";
+
+    CachedImageFetcher mCachedImageFetcher;
+
+    @Mock
+    CachedImageFetcherBridge mCachedImageFetcherBridge;
+
+    @Mock
+    Bitmap mBitmap;
+
+    @Captor
+    ArgumentCaptor<Callback<Bitmap>> mCallbackArgument;
+
+    @Before
+    public void setUp() throws Exception {
+        MockitoAnnotations.initMocks(this);
+        mCachedImageFetcher = Mockito.spy(new CachedImageFetcher(mCachedImageFetcherBridge));
+        Mockito.doReturn(sDummyUrl).when(mCachedImageFetcherBridge).getFilePath(anyObject());
+    }
+
+    private void answerCallback() {
+        Mockito.doAnswer((InvocationOnMock invocation) -> {
+                   mCallbackArgument.getValue().onResult(null);
+                   return null;
+               })
+                .when(mCachedImageFetcherBridge)
+                .fetchImage(anyObject(), anyInt(), anyInt(), mCallbackArgument.capture());
+    }
+
+    @Test
+    @SmallTest
+    public void testFetchImageWithDimensionsFoundOnDisk() {
+        answerCallback();
+        Mockito.doReturn(mBitmap)
+                .when(mCachedImageFetcher)
+                .tryToLoadImageFromDisk(anyObject(), anyObject());
+        mCachedImageFetcher.fetchImage(sDummyUrl, 100, 100,
+                (Bitmap bitmap)
+                        -> {
+                                // Do nothing.
+                        });
+        ArgumentCaptor<BitmapFactory.Options> optionsCaptor =
+                ArgumentCaptor.forClass(BitmapFactory.Options.class);
+        verify(mCachedImageFetcher).fetchImage(eq(sDummyUrl), optionsCaptor.capture(), any());
+
+        BitmapFactory.Options opts = optionsCaptor.getValue();
+        assertEquals(opts.outWidth, 100);
+        assertEquals(opts.outHeight, 100);
+
+        verify(mCachedImageFetcherBridge, never())
+                .fetchImage(eq(sDummyUrl), anyInt(), anyInt(), any());
+    }
+
+    @Test
+    @SmallTest
+    public void testFetchImageWithNoDimensionsFoundOnDisk() {
+        answerCallback();
+        Mockito.doReturn(mBitmap)
+                .when(mCachedImageFetcher)
+                .tryToLoadImageFromDisk(anyObject(), anyObject());
+        mCachedImageFetcher.fetchImage(sDummyUrl,
+                (Bitmap bitmap)
+                        -> {
+                                // Do nothing.
+                        });
+        ArgumentCaptor<BitmapFactory.Options> optionsCaptor =
+                ArgumentCaptor.forClass(BitmapFactory.Options.class);
+        verify(mCachedImageFetcher).fetchImage(eq(sDummyUrl), optionsCaptor.capture(), any());
+
+        BitmapFactory.Options opts = optionsCaptor.getValue();
+        assertEquals(opts.outWidth, 0);
+        assertEquals(opts.outHeight, 0);
+
+        verify(mCachedImageFetcherBridge, never())
+                .fetchImage(eq(sDummyUrl), anyInt(), anyInt(), any());
+    }
+
+    @Test
+    @SmallTest
+    public void testFetchImageWithNoDimensionsCallToNative() {
+        answerCallback();
+        Mockito.doReturn(null)
+                .when(mCachedImageFetcher)
+                .tryToLoadImageFromDisk(anyObject(), anyObject());
+        mCachedImageFetcher.fetchImage(sDummyUrl,
+                (Bitmap bitmap)
+                        -> {
+                                // Do nothing.
+                        });
+        ArgumentCaptor<BitmapFactory.Options> optionsCaptor =
+                ArgumentCaptor.forClass(BitmapFactory.Options.class);
+        verify(mCachedImageFetcher).fetchImage(eq(sDummyUrl), optionsCaptor.capture(), any());
+
+        BitmapFactory.Options opts = optionsCaptor.getValue();
+        assertEquals(opts.outWidth, 0);
+        assertEquals(opts.outHeight, 0);
+
+        verify(mCachedImageFetcherBridge).fetchImage(eq(sDummyUrl), anyInt(), anyInt(), any());
+    }
+}
\ No newline at end of file
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 59b2c5e..bfaed79 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -834,10 +834,6 @@
     "net/net_error_tab_helper.h",
     "net/net_export_helper.cc",
     "net/net_export_helper.h",
-    "net/nqe/ui_network_quality_estimator_service.cc",
-    "net/nqe/ui_network_quality_estimator_service.h",
-    "net/nqe/ui_network_quality_estimator_service_factory.cc",
-    "net/nqe/ui_network_quality_estimator_service_factory.h",
     "net/prediction_options.cc",
     "net/prediction_options.h",
     "net/probe_message.cc",
@@ -2021,6 +2017,8 @@
       "android/browsing_data/browsing_data_counter_bridge.h",
       "android/browsing_data/url_filter_bridge.cc",
       "android/browsing_data/url_filter_bridge.h",
+      "android/cached_image_fetcher/cached_image_fetcher_bridge.cc",
+      "android/cached_image_fetcher/cached_image_fetcher_bridge.h",
       "android/chrome_backup_agent.cc",
       "android/chrome_backup_agent.h",
       "android/chrome_backup_watcher.cc",
@@ -4637,6 +4635,7 @@
       "../android/java/src/org/chromium/chrome/browser/browserservices/OriginVerifier.java",
       "../android/java/src/org/chromium/chrome/browser/browserservices/UkmRecorder.java",
       "../android/java/src/org/chromium/chrome/browser/browsing_data/UrlFilterBridge.java",
+      "../android/java/src/org/chromium/chrome/browser/cached_image_fetcher/CachedImageFetcherBridge.java",
       "../android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountFeedbackReporter.java",
       "../android/java/src/org/chromium/chrome/browser/childaccounts/ChildAccountService.java",
       "../android/java/src/org/chromium/chrome/browser/component_updater/UpdateScheduler.java",
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 019960d..4468f2b 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -2798,6 +2798,9 @@
      ENABLE_DISABLE_VALUE_TYPE(
          chromeos::switches::kEnableEncryptionMigration,
          chromeos::switches::kDisableEncryptionMigration)},
+    {"enable-cros-ime-service", flag_descriptions::kImeServiceName,
+     flag_descriptions::kImeServiceDescription, kOsCrOS,
+     FEATURE_VALUE_TYPE(chromeos::features::kImeServiceConnectable)},
 #endif  // OS_CHROMEOS
 #if !defined(OS_ANDROID) && defined(GOOGLE_CHROME_BUILD)
     {"enable-google-branded-context-menu",
@@ -4186,6 +4189,12 @@
      FEATURE_VALUE_TYPE(chromeos::features::kDriveFs)},
 #endif  // OS_CHROMEOS
 
+#if defined(OS_CHROMEOS)
+    {"enable-myfiles-volume", flag_descriptions::kEnableMyFilesVolumeName,
+     flag_descriptions::kEnableMyFilesVolumeDescription, kOsCrOS,
+     FEATURE_VALUE_TYPE(chromeos::features::kMyFilesVolume)},
+#endif  // OS_CHROMEOS
+
 #if defined(OS_ANDROID)
     {"background-task-component-update",
      flag_descriptions::kBackgroundTaskComponentUpdateName,
diff --git a/chrome/browser/android/cached_image_fetcher/OWNERS b/chrome/browser/android/cached_image_fetcher/OWNERS
new file mode 100644
index 0000000..49c1d56
--- /dev/null
+++ b/chrome/browser/android/cached_image_fetcher/OWNERS
@@ -0,0 +1,2 @@
+file://components/image_fetcher/OWNERS
+
diff --git a/chrome/browser/android/cached_image_fetcher/cached_image_fetcher_bridge.cc b/chrome/browser/android/cached_image_fetcher/cached_image_fetcher_bridge.cc
new file mode 100644
index 0000000..657d0e2
--- /dev/null
+++ b/chrome/browser/android/cached_image_fetcher/cached_image_fetcher_bridge.cc
@@ -0,0 +1,131 @@
+// Copyright 2018 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 "chrome/browser/android/cached_image_fetcher/cached_image_fetcher_bridge.h"
+
+#include <jni.h>
+
+#include <utility>
+
+#include "base/android/callback_android.h"
+#include "base/android/jni_string.h"
+#include "base/files/file_path.h"
+#include "chrome/browser/cached_image_fetcher/cached_image_fetcher_service_factory.h"
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/profiles/profile_android.h"
+#include "components/image_fetcher/core/cache/image_cache.h"
+#include "components/image_fetcher/core/cached_image_fetcher.h"
+#include "components/image_fetcher/core/cached_image_fetcher_service.h"
+#include "jni/CachedImageFetcherBridge_jni.h"
+#include "ui/gfx/android/java_bitmap.h"
+#include "ui/gfx/image/image.h"
+
+using base::android::JavaRef;
+using base::android::JavaParamRef;
+using base::android::ScopedJavaGlobalRef;
+using base::android::ScopedJavaLocalRef;
+
+namespace image_fetcher {
+
+namespace {
+
+// Keep in sync with postfix found in image_data_store_disk.cc.
+const base::FilePath::CharType kPathPostfix[] =
+    FILE_PATH_LITERAL("image_data_storage");
+
+constexpr net::NetworkTrafficAnnotationTag kTrafficAnnotation =
+    net::DefineNetworkTrafficAnnotation("cached_image_fetcher", R"(
+        semantics {
+          sender: "Cached Image Fetcher Fetch"
+          description:
+            "Fetches and caches images for Chrome features."
+          trigger:
+            "Triggered when a feature requests an image fetch."
+          data: "None."
+          destination: WEBSITE
+        }
+        policy {
+          cookies_allowed: NO
+          setting:
+            "Cache can be cleared through settings."
+        policy_exception_justification:
+          "This feature allows many different Chrome features to fetch/cache "
+          "images and thus there is no Chrome-wide policy to disable it."
+      })");
+
+}  // namespace
+
+// static
+jlong JNI_CachedImageFetcherBridge_Init(
+    JNIEnv* j_env,
+    const JavaParamRef<jclass>& j_caller,
+    const JavaParamRef<jobject>& j_profile) {
+  Profile* profile = ProfileAndroid::FromProfileAndroid(j_profile);
+  base::FilePath file_path =
+      CachedImageFetcherServiceFactory::GetCachePath(profile).Append(
+          kPathPostfix);
+
+  CachedImageFetcherService* cif_service =
+      CachedImageFetcherServiceFactory::GetForBrowserContext(profile);
+  CachedImageFetcherBridge* native_cif_bridge = new CachedImageFetcherBridge(
+      cif_service->CreateCachedImageFetcher(), file_path);
+  return reinterpret_cast<intptr_t>(native_cif_bridge);
+}
+
+CachedImageFetcherBridge::CachedImageFetcherBridge(
+    std::unique_ptr<CachedImageFetcher> cached_image_fetcher,
+    base::FilePath base_file_path)
+    : cached_image_fetcher_(std::move(cached_image_fetcher)),
+      base_file_path_(base_file_path),
+      weak_ptr_factory_(this) {}
+
+CachedImageFetcherBridge::~CachedImageFetcherBridge() = default;
+
+void CachedImageFetcherBridge::Destroy(JNIEnv* j_env,
+                                       const JavaRef<jobject>& j_this) {
+  delete this;
+}
+
+ScopedJavaLocalRef<jstring> CachedImageFetcherBridge::GetFilePath(
+    JNIEnv* j_env,
+    const JavaRef<jobject>& j_this,
+    const JavaRef<jstring>& j_url) {
+  std::string url = base::android::ConvertJavaStringToUTF8(j_url);
+  std::string file_path =
+      base_file_path_.Append(ImageCache::HashUrlToKey(url)).MaybeAsASCII();
+  return base::android::ConvertUTF8ToJavaString(j_env, file_path);
+}
+
+void CachedImageFetcherBridge::FetchImage(JNIEnv* j_env,
+                                          const JavaRef<jobject>& j_this,
+                                          const JavaRef<jstring>& j_url,
+                                          const jint width_px,
+                                          const jint height_px,
+                                          const JavaRef<jobject>& j_callback) {
+  ScopedJavaGlobalRef<jobject> callback(j_callback);
+  std::string url = base::android::ConvertJavaStringToUTF8(j_url);
+  cached_image_fetcher_->SetDesiredImageFrameSize(
+      gfx::Size(width_px, height_px));
+  // TODO(wylieb): We checked disk in Java, so provide a way to tell
+  // CachedImageFetcher to skip checking disk in native.
+  cached_image_fetcher_->FetchImage(
+      url, GURL(url),
+      base::BindOnce(&CachedImageFetcherBridge::OnImageFetched,
+                     weak_ptr_factory_.GetWeakPtr(), callback),
+      kTrafficAnnotation);
+}
+
+void CachedImageFetcherBridge::OnImageFetched(
+    base::android::ScopedJavaGlobalRef<jobject> callback,
+    const std::string& id,
+    const gfx::Image& image,
+    const RequestMetadata& request_metadata) {
+  ScopedJavaLocalRef<jobject> j_bitmap;
+  if (!image.IsEmpty()) {
+    j_bitmap = gfx::ConvertToJavaBitmap(image.ToSkBitmap());
+  }
+  RunObjectCallbackAndroid(callback, j_bitmap);
+}
+
+}  // namespace image_fetcher
diff --git a/chrome/browser/android/cached_image_fetcher/cached_image_fetcher_bridge.h b/chrome/browser/android/cached_image_fetcher/cached_image_fetcher_bridge.h
new file mode 100644
index 0000000..3a0107a
--- /dev/null
+++ b/chrome/browser/android/cached_image_fetcher/cached_image_fetcher_bridge.h
@@ -0,0 +1,60 @@
+// Copyright 2018 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.
+
+#ifndef CHROME_BROWSER_ANDROID_CACHED_IMAGE_FETCHER_CACHED_IMAGE_FETCHER_BRIDGE_H_
+#define CHROME_BROWSER_ANDROID_CACHED_IMAGE_FETCHER_CACHED_IMAGE_FETCHER_BRIDGE_H_
+
+#include <memory>
+#include <string>
+
+#include "base/android/scoped_java_ref.h"
+#include "base/files/file_path.h"
+#include "base/memory/weak_ptr.h"
+#include "components/image_fetcher/core/request_metadata.h"
+#include "ui/gfx/image/image.h"
+
+namespace image_fetcher {
+
+class CachedImageFetcher;
+
+// Native counterpart of CachedImageFetcherBridge.java. Owns an instance of
+// CachedImageFetcher.
+class CachedImageFetcherBridge {
+ public:
+  explicit CachedImageFetcherBridge(
+      std::unique_ptr<CachedImageFetcher> cached_image_fetcher,
+      base::FilePath base_file_path);
+  ~CachedImageFetcherBridge();
+
+  void Destroy(JNIEnv* j_env, const base::android::JavaRef<jobject>& j_this);
+
+  base::android::ScopedJavaLocalRef<jstring> GetFilePath(
+      JNIEnv* j_env,
+      const base::android::JavaRef<jobject>& j_this,
+      const base::android::JavaRef<jstring>& j_url);
+
+  void FetchImage(JNIEnv* j_env,
+                  const base::android::JavaRef<jobject>& j_this,
+                  const base::android::JavaRef<jstring>& j_url,
+                  const jint width_px,
+                  const jint height_px,
+                  const base::android::JavaRef<jobject>& j_callback);
+
+ private:
+  void OnImageFetched(base::android::ScopedJavaGlobalRef<jobject> callback,
+                      const std::string& id,
+                      const gfx::Image& image,
+                      const RequestMetadata& request_metadata);
+
+  std::unique_ptr<CachedImageFetcher> cached_image_fetcher_;
+  base::FilePath base_file_path_;
+
+  base::WeakPtrFactory<CachedImageFetcherBridge> weak_ptr_factory_;
+
+  DISALLOW_COPY_AND_ASSIGN(CachedImageFetcherBridge);
+};
+
+}  // namespace image_fetcher
+
+#endif  // CHROME_BROWSER_ANDROID_CACHED_IMAGE_FETCHER_CACHED_IMAGE_FETCHER_BRIDGE_H_
diff --git a/chrome/browser/android/download/download_manager_service.cc b/chrome/browser/android/download/download_manager_service.cc
index 8f4c854..ddb4c4f 100644
--- a/chrome/browser/android/download/download_manager_service.cc
+++ b/chrome/browser/android/download/download_manager_service.cc
@@ -229,6 +229,9 @@
     content::BrowserContext* context) {
   if (in_progress_manager_) {
     DCHECK(!context->IsOffTheRecord());
+    // Set |is_pending_downloads_loaded_| to false so that we need to wait for
+    // download history to initialize before performing new download actions.
+    is_pending_downloads_loaded_ = false;
     return in_progress_manager_.release();
   }
   return nullptr;
@@ -562,6 +565,10 @@
 }
 
 void DownloadManagerService::OnPendingDownloadsLoaded() {
+  // If |in_progress_manager_| is null, wait for DownloadHistory to initialize
+  // before performing any pending actions.
+  if (!in_progress_manager_ && !is_history_query_complete_)
+    return;
   is_pending_downloads_loaded_ = true;
   for (auto iter = pending_actions_.begin(); iter != pending_actions_.end();
        ++iter) {
diff --git a/chrome/browser/android/vr/gvr_graphics_delegate.cc b/chrome/browser/android/vr/gvr_graphics_delegate.cc
index ac73b79a..baf8880 100644
--- a/chrome/browser/android/vr/gvr_graphics_delegate.cc
+++ b/chrome/browser/android/vr/gvr_graphics_delegate.cc
@@ -738,10 +738,6 @@
   }
 }
 
-void GvrGraphicsDelegate::OnResume() {
-  viewports_need_updating_ = true;
-}
-
 void GvrGraphicsDelegate::BufferBoundsChanged(
     const gfx::Size& content_buffer_size,
     const gfx::Size& overlay_buffer_size) {
diff --git a/chrome/browser/android/vr/gvr_graphics_delegate.h b/chrome/browser/android/vr/gvr_graphics_delegate.h
index ff39cdba..0ca82c6 100644
--- a/chrome/browser/android/vr/gvr_graphics_delegate.h
+++ b/chrome/browser/android/vr/gvr_graphics_delegate.h
@@ -115,7 +115,6 @@
 
  private:
   // GraphicsDelegate overrides.
-  void OnResume() override;
   FovRectangles GetRecommendedFovs() override;
   float GetZNear() override;
   RenderInfo GetRenderInfo(FrameType frame_type,
diff --git a/chrome/browser/autofill/autofill_save_card_infobar_delegate_mobile_unittest.cc b/chrome/browser/autofill/autofill_save_card_infobar_delegate_mobile_unittest.cc
index 23d11d05..87c7aee 100644
--- a/chrome/browser/autofill/autofill_save_card_infobar_delegate_mobile_unittest.cc
+++ b/chrome/browser/autofill/autofill_save_card_infobar_delegate_mobile_unittest.cc
@@ -50,7 +50,8 @@
   std::unique_ptr<TestPersonalDataManager> personal_data_;
 
  private:
-  void UploadSaveCardCallback(const base::string16& cardholder_name) {
+  void UploadSaveCardCallback(const AutofillClient::UserProvidedCardDetails&
+                                  user_provided_card_details) {
     personal_data_.get()->SaveImportedCreditCard(credit_card_to_save_);
   }
 
@@ -133,7 +134,7 @@
           is_uploading, credit_card, std::move(legal_message),
           /*strike_database=*/nullptr,
           /*upload_save_card_callback=*/
-          base::OnceCallback<void(const base::string16&)>(),
+          AutofillClient::UserAcceptedUploadCallback(),
           /*local_save_card_callback=*/
           base::Bind(base::IgnoreResult(
                          &TestPersonalDataManager::SaveImportedCreditCard),
diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc
index eca65516..499477a 100644
--- a/chrome/browser/background/background_contents_service.cc
+++ b/chrome/browser/background/background_contents_service.cc
@@ -160,7 +160,7 @@
   message_center::Notification notification(
       message_center::NOTIFICATION_TYPE_SIMPLE, id, base::string16(), message,
       notification_icon, base::string16(), GURL("chrome://extension-crash"),
-      message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT,
+      message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
                                  kNotifierId),
       {}, delegate);
 
diff --git a/chrome/browser/background/background_mode_manager_win.cc b/chrome/browser/background/background_mode_manager_win.cc
index f523b4e..f8d633f 100644
--- a/chrome/browser/background/background_mode_manager_win.cc
+++ b/chrome/browser/background/background_mode_manager_win.cc
@@ -47,7 +47,7 @@
       l10n_util::GetStringFUTF16(IDS_BACKGROUND_APP_INSTALLED_BALLOON_BODY,
                                  name,
                                  l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)),
-      message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT,
+      message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
                                  kAppInstalledNotifierId));
 }
 
diff --git a/chrome/browser/browsing_data/browsing_data_remover_browsertest.cc b/chrome/browser/browsing_data/browsing_data_remover_browsertest.cc
index aebf916..0f827aa 100644
--- a/chrome/browser/browsing_data/browsing_data_remover_browsertest.cc
+++ b/chrome/browser/browsing_data/browsing_data_remover_browsertest.cc
@@ -15,6 +15,7 @@
 #include "base/run_loop.h"
 #include "base/strings/string_util.h"
 #include "base/test/bind_test_util.h"
+#include "base/test/metrics/histogram_tester.h"
 #include "base/test/scoped_feature_list.h"
 #include "base/threading/thread_restrictions.h"
 #include "base/time/time.h"
@@ -30,6 +31,7 @@
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/content_settings/host_content_settings_map_factory.h"
 #include "chrome/browser/external_protocol/external_protocol_handler.h"
+#include "chrome/browser/metrics/subprocess_metrics_provider.h"
 #include "chrome/browser/net/system_network_context_manager.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/profiles/profile_manager.h"
@@ -845,6 +847,34 @@
   RemoveAndWait(content::BrowsingDataRemover::DATA_TYPE_CACHE);
 }
 
+// Verifies that the network quality prefs are cleared.
+IN_PROC_BROWSER_TEST_F(BrowsingDataRemoverBrowserTest, VerifyNQECacheCleared) {
+  base::HistogramTester histogram_tester;
+  RemoveAndWait(content::BrowsingDataRemover::DATA_TYPE_CACHE);
+
+  // Wait until there is at least one sample in NQE.PrefsSizeOnClearing.
+  bool histogram_populated = false;
+  for (size_t attempt = 0; attempt < 3; ++attempt) {
+    const std::vector<base::Bucket> buckets =
+        histogram_tester.GetAllSamples("NQE.PrefsSizeOnClearing");
+    for (const auto& bucket : buckets) {
+      if (bucket.count > 0) {
+        histogram_populated = true;
+        break;
+      }
+    }
+    if (histogram_populated)
+      break;
+
+    // Retry fetching the histogram since it's not populated yet.
+    content::FetchHistogramsFromChildProcesses();
+    SubprocessMetricsProvider::MergeHistogramDeltasForTesting();
+    base::RunLoop().RunUntilIdle();
+  }
+
+  histogram_tester.ExpectTotalCount("NQE.PrefsSizeOnClearing", 1);
+}
+
 IN_PROC_BROWSER_TEST_F(BrowsingDataRemoverBrowserTest,
                        ExternalProtocolHandlerPrefs) {
   Profile* profile = GetBrowser()->profile();
diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
index 32860c0..edcc47ee8 100644
--- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
+++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
@@ -41,8 +41,6 @@
 #include "chrome/browser/media/media_device_id_salt.h"
 #include "chrome/browser/media/media_engagement_service.h"
 #include "chrome/browser/media/webrtc/webrtc_event_log_manager.h"
-#include "chrome/browser/net/nqe/ui_network_quality_estimator_service.h"
-#include "chrome/browser/net/nqe/ui_network_quality_estimator_service_factory.h"
 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_factory.h"
 #include "chrome/browser/ntp_snippets/content_suggestions_service_factory.h"
@@ -915,20 +913,6 @@
 #endif  // BUILDFLAG(ENABLE_FEED_IN_CHROME)
 #endif  // defined(OS_ANDROID)
 
-    // |ui_nqe_service| may be null if |profile_| is not a regular profile.
-    UINetworkQualityEstimatorService* ui_nqe_service =
-        UINetworkQualityEstimatorServiceFactory::GetForProfile(profile_);
-    DCHECK(profile_->GetProfileType() !=
-               Profile::ProfileType::REGULAR_PROFILE ||
-           ui_nqe_service != nullptr);
-    if (ui_nqe_service) {
-      // Network Quality Estimator (NQE) stores the quality (RTT, bandwidth
-      // etc.) of different networks in prefs. The stored quality is not
-      // broken down by URLs or timestamps, so clearing the cache should
-      // completely clear the prefs.
-      ui_nqe_service->ClearPrefs();
-    }
-
     // Notify data reduction component.
     data_reduction_proxy::DataReductionProxySettings*
         data_reduction_proxy_settings =
diff --git a/chrome/browser/cached_image_fetcher/cached_image_fetcher_service_factory.cc b/chrome/browser/cached_image_fetcher/cached_image_fetcher_service_factory.cc
index acba3a0..74f775ae 100644
--- a/chrome/browser/cached_image_fetcher/cached_image_fetcher_service_factory.cc
+++ b/chrome/browser/cached_image_fetcher/cached_image_fetcher_service_factory.cc
@@ -22,10 +22,6 @@
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/storage_partition.h"
 
-#if defined(OS_ANDROID)
-#include "base/path_service.h"
-#endif
-
 namespace image_fetcher {
 
 namespace {
@@ -41,6 +37,13 @@
 
 }  // namespace
 
+// static
+base::FilePath CachedImageFetcherServiceFactory::GetCachePath(
+    Profile* profile) {
+  return profile->GetCachePath().Append(kImageCacheSubdir);
+}
+
+// static
 CachedImageFetcherService*
 CachedImageFetcherServiceFactory::GetForBrowserContext(
     content::BrowserContext* context) {
@@ -48,6 +51,7 @@
       GetInstance()->GetServiceForBrowserContext(context, true));
 }
 
+// static
 CachedImageFetcherServiceFactory*
 CachedImageFetcherServiceFactory::GetInstance() {
   return base::Singleton<CachedImageFetcherServiceFactory>::get();
@@ -62,17 +66,8 @@
 
 KeyedService* CachedImageFetcherServiceFactory::BuildServiceInstanceFor(
     content::BrowserContext* context) const {
-  base::FilePath cache_path;
-#if defined(OS_ANDROID)
-  // On Android, get a special cache directory that is cleared under pressure.
-  // The subdirectory under needs to be registered file_paths.xml as well.
-  if (base::PathService::Get(base::DIR_CACHE, &cache_path)) {
-    cache_path = cache_path.Append(kImageCacheSubdir);
-  }
-#else
-  // On other platforms, GetCachePath can be cleared by the user.
-  cache_path = context->GetCachePath().Append(kImageCacheSubdir);
-#endif
+  Profile* profile = Profile::FromBrowserContext(context);
+  base::FilePath cache_path = GetCachePath(profile);
 
   scoped_refptr<base::SequencedTaskRunner> task_runner =
       base::CreateSequencedTaskRunnerWithTraits(
@@ -84,7 +79,6 @@
   auto data_store =
       std::make_unique<ImageDataStoreDisk>(cache_path, task_runner);
 
-  Profile* profile = Profile::FromBrowserContext(context);
   scoped_refptr<ImageCache> image_cache = base::MakeRefCounted<ImageCache>(
       std::move(data_store), std::move(metadata_store), profile->GetPrefs(),
       clock, task_runner);
diff --git a/chrome/browser/cached_image_fetcher/cached_image_fetcher_service_factory.h b/chrome/browser/cached_image_fetcher/cached_image_fetcher_service_factory.h
index 90c95f5..0c68a082 100644
--- a/chrome/browser/cached_image_fetcher/cached_image_fetcher_service_factory.h
+++ b/chrome/browser/cached_image_fetcher/cached_image_fetcher_service_factory.h
@@ -5,6 +5,7 @@
 #ifndef CHROME_BROWSER_CACHED_IMAGE_FETCHER_CACHED_IMAGE_FETCHER_SERVICE_FACTORY_H_
 #define CHROME_BROWSER_CACHED_IMAGE_FETCHER_CACHED_IMAGE_FETCHER_SERVICE_FACTORY_H_
 
+#include "base/files/file_path.h"
 #include "base/macros.h"
 #include "base/memory/singleton.h"
 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
@@ -13,6 +14,8 @@
 class BrowserContext;
 }  // namespace content
 
+class Profile;
+
 namespace image_fetcher {
 
 class CachedImageFetcherService;
@@ -21,6 +24,9 @@
 class CachedImageFetcherServiceFactory
     : public BrowserContextKeyedServiceFactory {
  public:
+  // Return the cache path for the given profile.
+  static base::FilePath GetCachePath(Profile* profile);
+
   static CachedImageFetcherService* GetForBrowserContext(
       content::BrowserContext* context);
   static CachedImageFetcherServiceFactory* GetInstance();
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 1864097..15a2d2e 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -1339,8 +1339,8 @@
   service_manager::Identity renderer_identity = host->GetChildIdentity();
   ChromeService::GetInstance()->connector()->StartService(
       service_manager::Identity(chrome::mojom::kRendererServiceName,
-                                renderer_identity.user_id(),
-                                renderer_identity.instance()),
+                                renderer_identity.instance_group(),
+                                renderer_identity.instance_id()),
       std::move(service), mojo::MakeRequest(&pid_receiver));
 }
 
@@ -4400,8 +4400,8 @@
     net::HttpRequestHeaders headers;
     data_reduction_proxy::DataReductionProxyRequestOptions* request_options =
         io_data->data_reduction_proxy_io_data()->request_options();
-    request_options->AddRequestHeader(&headers,
-                                      request_options->GeneratePageId());
+    request_options->AddPageIDRequestHeader(&headers,
+                                            request_options->GeneratePageId());
     result.push_back(std::make_unique<
                      data_reduction_proxy::DataReductionProxyURLLoaderThrottle>(
         headers, io_data->data_reduction_proxy_io_data()));
diff --git a/chrome/browser/chrome_site_per_process_browsertest.cc b/chrome/browser/chrome_site_per_process_browsertest.cc
index 3c660487..baab7c1 100644
--- a/chrome/browser/chrome_site_per_process_browsertest.cc
+++ b/chrome/browser/chrome_site_per_process_browsertest.cc
@@ -1022,8 +1022,9 @@
       spellcheck::mojom::SpellCheckHostRequest request,
       const service_manager::BindSourceInfo& source_info) {
     service_manager::Identity renderer_identity(
-        content::mojom::kRendererServiceName, source_info.identity.user_id(),
-        source_info.identity.instance());
+        content::mojom::kRendererServiceName,
+        source_info.identity.instance_group(),
+        source_info.identity.instance_id());
     content::RenderProcessHost* host =
         content::RenderProcessHost::FromRendererIdentity(renderer_identity);
     auto spell_check_host = std::make_unique<MockSpellCheckHost>(host);
diff --git a/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge_unittest.cc b/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge_unittest.cc
index fc27c71..ab1d070 100644
--- a/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge_unittest.cc
+++ b/chrome/browser/chromeos/arc/accessibility/arc_accessibility_helper_bridge_unittest.cc
@@ -158,8 +158,8 @@
         message_center::NOTIFICATION_TYPE_CUSTOM, kNotificationKey,
         base::UTF8ToUTF16("title"), base::UTF8ToUTF16("message"), gfx::Image(),
         base::UTF8ToUTF16("display_source"), GURL(),
-        message_center::NotifierId(message_center::NotifierId::ARC_APPLICATION,
-                                   "test_app_id"),
+        message_center::NotifierId(
+            message_center::NotifierType::ARC_APPLICATION, "test_app_id"),
         message_center::RichNotificationData(), nullptr);
     notification->set_custom_view_type(ash::kArcNotificationCustomViewType);
     return notification;
diff --git a/chrome/browser/chromeos/arc/arc_migration_guide_notification.cc b/chrome/browser/chromeos/arc/arc_migration_guide_notification.cc
index d2fe64e..f377dfa 100644
--- a/chrome/browser/chromeos/arc/arc_migration_guide_notification.cc
+++ b/chrome/browser/chromeos/arc/arc_migration_guide_notification.cc
@@ -37,7 +37,7 @@
 // static
 void ShowArcMigrationGuideNotification(Profile* profile) {
   message_center::NotifierId notifier_id(
-      message_center::NotifierId::SYSTEM_COMPONENT, kNotifierId);
+      message_center::NotifierType::SYSTEM_COMPONENT, kNotifierId);
   notifier_id.profile_id =
       multi_user_util::GetAccountIdFromProfile(profile).GetUserEmail();
 
diff --git a/chrome/browser/chromeos/arc/input_method_manager/input_connection_impl.cc b/chrome/browser/chromeos/arc/input_method_manager/input_connection_impl.cc
index a81725d..f48ec53 100644
--- a/chrome/browser/chromeos/arc/input_method_manager/input_connection_impl.cc
+++ b/chrome/browser/chromeos/arc/input_method_manager/input_connection_impl.cc
@@ -116,8 +116,6 @@
 }
 
 void InputConnectionImpl::DeleteSurroundingText(int before, int after) {
-  StartStateUpdateTimer();
-
   if (before == 0 && after == 0) {
     // This should be no-op.
     // Return the current state immediately.
@@ -177,8 +175,6 @@
   // so 0 means the cursor should be just before the last character of the text.
   new_cursor_pos += text.length() - 1;
 
-  StartStateUpdateTimer();
-
   const int selection_start = new_selection_range
                                   ? new_selection_range.value().start()
                                   : new_cursor_pos;
diff --git a/chrome/browser/chromeos/arc/notification/arc_boot_error_notification.cc b/chrome/browser/chromeos/arc/notification/arc_boot_error_notification.cc
index d24c546c..b799785 100644
--- a/chrome/browser/chromeos/arc/notification/arc_boot_error_notification.cc
+++ b/chrome/browser/chromeos/arc/notification/arc_boot_error_notification.cc
@@ -53,7 +53,7 @@
   optional_fields.buttons.push_back(storage_settings);
 
   message_center::NotifierId notifier_id(
-      message_center::NotifierId::SYSTEM_COMPONENT, kNotifierId);
+      message_center::NotifierType::SYSTEM_COMPONENT, kNotifierId);
   const AccountId& account_id =
       user_manager::UserManager::Get()->GetPrimaryUser()->GetAccountId();
   notifier_id.profile_id = account_id.GetUserEmail();
diff --git a/chrome/browser/chromeos/arc/notification/arc_provision_notification_service.cc b/chrome/browser/chromeos/arc/notification/arc_provision_notification_service.cc
index d0deba0..30c18a7 100644
--- a/chrome/browser/chromeos/arc/notification/arc_provision_notification_service.cc
+++ b/chrome/browser/chromeos/arc/notification/arc_provision_notification_service.cc
@@ -79,7 +79,7 @@
 void ArcProvisionNotificationService::ShowNotification() {
   Profile* profile = Profile::FromBrowserContext(context_);
   message_center::NotifierId notifier_id(
-      message_center::NotifierId::SYSTEM_COMPONENT,
+      message_center::NotifierType::SYSTEM_COMPONENT,
       kManagedProvisionNotifierId);
   notifier_id.profile_id =
       multi_user_util::GetAccountIdFromProfile(profile).GetUserEmail();
diff --git a/chrome/browser/chromeos/arc/notification/arc_supervision_transition_notification.cc b/chrome/browser/chromeos/arc/notification/arc_supervision_transition_notification.cc
index 409db83..74318da 100644
--- a/chrome/browser/chromeos/arc/notification/arc_supervision_transition_notification.cc
+++ b/chrome/browser/chromeos/arc/notification/arc_supervision_transition_notification.cc
@@ -92,7 +92,7 @@
          transition == ArcSupervisionTransition::REGULAR_TO_CHILD);
 
   message_center::NotifierId notifier_id(
-      message_center::NotifierId::SYSTEM_COMPONENT, kNotifierId);
+      message_center::NotifierType::SYSTEM_COMPONENT, kNotifierId);
   notifier_id.profile_id =
       multi_user_util::GetAccountIdFromProfile(profile).GetUserEmail();
 
diff --git a/chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager.cc b/chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager.cc
index fdaf7b4..26d5ed7 100644
--- a/chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager.cc
+++ b/chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager.cc
@@ -307,7 +307,7 @@
                                       profile_->GetProfileUserName() +
                                       std::to_string(message_id);
   message_center::NotifierId notifier_id(
-      message_center::NotifierId::SYSTEM_COMPONENT,
+      message_center::NotifierType::SYSTEM_COMPONENT,
       kProfileSigninNotificationId);
 
   // Set |profile_id| for multi-user notification blocker.
diff --git a/chrome/browser/chromeos/child_accounts/time_limit_notifier.cc b/chrome/browser/chromeos/child_accounts/time_limit_notifier.cc
index 377b9b9..115f4ef 100644
--- a/chrome/browser/chromeos/child_accounts/time_limit_notifier.cc
+++ b/chrome/browser/chromeos/child_accounts/time_limit_notifier.cc
@@ -49,7 +49,7 @@
           l10n_util::GetStringUTF16(IDS_TIME_LIMIT_NOTIFICATION_DISPLAY_SOURCE),
           GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT,
+              message_center::NotifierType::SYSTEM_COMPONENT,
               kTimeLimitNotifierId),
           message_center::RichNotificationData(),
           base::MakeRefCounted<message_center::NotificationDelegate>(),
diff --git a/chrome/browser/chromeos/crostini/crostini_package_installer_notification.cc b/chrome/browser/chromeos/crostini/crostini_package_installer_notification.cc
index 1f3510a..141e848 100644
--- a/chrome/browser/chromeos/crostini/crostini_package_installer_notification.cc
+++ b/chrome/browser/chromeos/crostini/crostini_package_installer_notification.cc
@@ -44,7 +44,7 @@
       l10n_util::GetStringUTF16(
           IDS_CROSTINI_PACKAGE_INSTALL_NOTIFICATION_DISPLAY_SOURCE),
       GURL(),  // origin_url
-      message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT,
+      message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
                                  kNotifierCrostiniPackageInstaller),
       rich_notification_data,
       base::MakeRefCounted<message_center::ThunkNotificationDelegate>(
diff --git a/chrome/browser/chromeos/eol_notification.cc b/chrome/browser/chromeos/eol_notification.cc
index 32f58515..f586bd3 100644
--- a/chrome/browser/chromeos/eol_notification.cc
+++ b/chrome/browser/chromeos/eol_notification.cc
@@ -156,7 +156,8 @@
           GetStringUTF16(IDS_EOL_NOTIFICATION_DISPLAY_SOURCE),
           GURL(kEolNotificationId),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT, kEolNotificationId),
+              message_center::NotifierType::SYSTEM_COMPONENT,
+              kEolNotificationId),
           data, new EolNotificationDelegate(profile_),
           ash::kNotificationEndOfSupportIcon,
           message_center::SystemNotificationWarningLevel::CRITICAL_WARNING);
diff --git a/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc b/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
index bfe4025..f8fdb24 100644
--- a/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
+++ b/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc
@@ -278,12 +278,9 @@
 WRAPPED_INSTANTIATE_TEST_CASE_P(
     CreateNewFolder, /* create_new_folder.js */
     FilesAppBrowserTest,
-    ::testing::Values(TestCase("selectCreateFolderDownloads"),
-// Some GuestMode tests are flaky on MSAN and ASAN, crbug.com/899664
-#if !(defined(MEMORY_SANITIZER) || defined(ADDRESS_SANITIZER))
-                      TestCase("selectCreateFolderDownloads").InGuestMode(),
+    ::testing::Values(TestCase("selectCreateFolderDownloads").InGuestMode(),
+                      TestCase("selectCreateFolderDownloads"),
                       TestCase("createFolderDownloads").InGuestMode(),
-#endif
                       TestCase("createFolderDownloads"),
                       TestCase("createFolderNestedDownloads"),
                       TestCase("createFolderDrive").DisableDriveFs(),
diff --git a/chrome/browser/chromeos/file_system_provider/notification_manager.cc b/chrome/browser/chromeos/file_system_provider/notification_manager.cc
index 63296a97..9353bba 100644
--- a/chrome/browser/chromeos/file_system_provider/notification_manager.cc
+++ b/chrome/browser/chromeos/file_system_provider/notification_manager.cc
@@ -93,7 +93,7 @@
           IDS_FILE_SYSTEM_PROVIDER_UNRESPONSIVE_ABORT_BUTTON)));
 
   message_center::NotifierId notifier_id(
-      message_center::NotifierId::SYSTEM_COMPONENT,
+      message_center::NotifierType::SYSTEM_COMPONENT,
       "chrome://file_system_provider_notification");
   notifier_id.profile_id =
       multi_user_util::GetAccountIdFromProfile(profile_).GetUserEmail();
diff --git a/chrome/browser/chromeos/first_run/drive_first_run_controller.cc b/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
index 108223d..d084ac1 100644
--- a/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
+++ b/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
@@ -452,7 +452,7 @@
       l10n_util::GetStringUTF16(IDS_DRIVE_OFFLINE_NOTIFICATION_MESSAGE),
       resource_bundle.GetImageNamed(IDR_NOTIFICATION_DRIVE),
       base::UTF8ToUTF16(extension->name()), GURL(),
-      message_center::NotifierId(message_center::NotifierId::APPLICATION,
+      message_center::NotifierId(message_center::NotifierType::APPLICATION,
                                  kDriveHostedAppId),
       data, std::move(delegate));
   notification.set_priority(message_center::LOW_PRIORITY);
diff --git a/chrome/browser/chromeos/hats/hats_notification_controller.cc b/chrome/browser/chromeos/hats/hats_notification_controller.cc
index 6e447e75..1b21688 100644
--- a/chrome/browser/chromeos/hats/hats_notification_controller.cc
+++ b/chrome/browser/chromeos/hats/hats_notification_controller.cc
@@ -197,7 +197,7 @@
           l10n_util::GetStringUTF16(IDS_MESSAGE_CENTER_NOTIFIER_HATS_NAME),
           GURL(kNotificationOriginUrl),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT, kNotifierHats),
+              message_center::NotifierType::SYSTEM_COMPONENT, kNotifierHats),
           message_center::RichNotificationData(), this,
           ash::kNotificationGoogleIcon,
           message_center::SystemNotificationWarningLevel::NORMAL);
diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_notification_controller.cc b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_notification_controller.cc
index a36889f2..519847a 100644
--- a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_notification_controller.cc
+++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_notification_controller.cc
@@ -45,8 +45,8 @@
       message_center::NotificationType::NOTIFICATION_TYPE_SIMPLE, id, title,
       message, icon, base::string16() /* display_source */,
       GURL() /* origin_url */,
-      message_center::NotifierId(
-          message_center::NotifierId::NotifierType::SYSTEM_COMPONENT, id),
+      message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
+                                 id),
       rich_notification_data, delegate);
 }
 
diff --git a/chrome/browser/chromeos/printing/cups_print_job_notification.cc b/chrome/browser/chromeos/printing/cups_print_job_notification.cc
index 92a2474b..1dc59da 100644
--- a/chrome/browser/chromeos/printing/cups_print_job_notification.cc
+++ b/chrome/browser/chromeos/printing/cups_print_job_notification.cc
@@ -53,7 +53,7 @@
       gfx::Image(),      // icon
       l10n_util::GetStringUTF16(IDS_PRINT_JOB_NOTIFICATION_DISPLAY_SOURCE),
       GURL(kCupsPrintJobNotificationId),
-      message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT,
+      message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
                                  kCupsPrintJobNotificationId),
       message_center::RichNotificationData(),
       base::MakeRefCounted<message_center::ThunkNotificationDelegate>(
diff --git a/chrome/browser/chromeos/tpm_firmware_update_notification.cc b/chrome/browser/chromeos/tpm_firmware_update_notification.cc
index 005b4ea2..d2dacf2 100644
--- a/chrome/browser/chromeos/tpm_firmware_update_notification.cc
+++ b/chrome/browser/chromeos/tpm_firmware_update_notification.cc
@@ -76,7 +76,7 @@
               ui::GetChromeOSDeviceName()),
           base::string16(), GURL(kTPMFirmwareUpdateNotificationId),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT,
+              message_center::NotifierType::SYSTEM_COMPONENT,
               kTPMFirmwareUpdateNotificationId),
           message_center::RichNotificationData(),
           base::MakeRefCounted<TPMFirmwareUpdateNotificationDelegate>(profile),
diff --git a/chrome/browser/chromeos/ui/low_disk_notification.cc b/chrome/browser/chromeos/ui/low_disk_notification.cc
index 910e7bd..9720136 100644
--- a/chrome/browser/chromeos/ui/low_disk_notification.cc
+++ b/chrome/browser/chromeos/ui/low_disk_notification.cc
@@ -99,7 +99,7 @@
   optional_fields.buttons.push_back(storage_settings);
 
   message_center::NotifierId notifier_id(
-      message_center::NotifierId::SYSTEM_COMPONENT, kNotifierLowDisk);
+      message_center::NotifierType::SYSTEM_COMPONENT, kNotifierLowDisk);
 
   auto on_click = base::BindRepeating([](base::Optional<int> button_index) {
     if (button_index) {
diff --git a/chrome/browser/download/download_history.cc b/chrome/browser/download/download_history.cc
index 95b9df1..8fc46d1 100644
--- a/chrome/browser/download/download_history.cc
+++ b/chrome/browser/download/download_history.cc
@@ -319,8 +319,7 @@
       ScheduleRemoveDownload(it->id);
       continue;
     }
-    if (item->GetId() == loading_id_)
-      OnDownloadRestoredFromHistory(item);
+    DCHECK_EQ(download::DownloadItem::kInvalidId, loading_id_);
 
     // The download might have been completed or cancelled without informing
     // history DB. If this is the case, populate the new state back to history
diff --git a/chrome/browser/download/download_history_unittest.cc b/chrome/browser/download/download_history_unittest.cc
index 9a47cf6..4329fda 100644
--- a/chrome/browser/download/download_history_unittest.cc
+++ b/chrome/browser/download/download_history_unittest.cc
@@ -209,12 +209,9 @@
     return manager_observer_;
   }
 
-  // Creates the DownloadHistory. If |call_on_download_created| is false,
-  // DownloadHistory::OnDownloadCreated() will not be called by |manager_|.
-  // If |return_null_item| is true, |manager_| will return nullptr on
-  // CreateDownloadItem() call,
+  // Creates the DownloadHistory. If |return_null_item| is true, |manager_|
+  // will return nullptr on CreateDownloadItem() call,
   void CreateDownloadHistory(std::unique_ptr<InfoVector> infos,
-                             bool call_on_download_created = true,
                              bool return_null_item = false) {
     DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
     CHECK(infos.get());
@@ -235,28 +232,20 @@
           history::ToContentDownloadInterruptReason(row.interrupt_reason),
           row.opened, row.last_access_time, row.transient,
           history::ToContentReceivedSlices(row.download_slice_info));
-      if (call_on_download_created) {
+      if (return_null_item) {
+        EXPECT_CALL(manager(), MockCreateDownloadItem(adapter))
+            .WillOnce(Return(nullptr));
+      } else {
         EXPECT_CALL(manager(), MockCreateDownloadItem(adapter))
             .WillOnce(DoAll(
                 InvokeWithoutArgs(
                     this, &DownloadHistoryTest::CallOnDownloadCreatedInOrder),
                 Return(&item(index))));
-      } else {
-        download::DownloadItem* download =
-            return_null_item ? nullptr : &item(index);
-        EXPECT_CALL(manager(), MockCreateDownloadItem(adapter))
-            .WillOnce(Return(download));
       }
     }
     history_ = new FakeHistoryAdapter();
     history_->ExpectWillQueryDownloads(std::move(infos));
-    if (call_on_download_created) {
-      EXPECT_CALL(manager(), GetAllDownloads(_)).WillRepeatedly(Return());
-    } else {
-      EXPECT_CALL(manager(), GetAllDownloads(_))
-          .WillRepeatedly(
-              WithArg<0>(Invoke(this, &DownloadHistoryTest::AddAllDownloads)));
-    }
+    EXPECT_CALL(manager(), GetAllDownloads(_)).WillRepeatedly(Return());
     download_history_.reset(new DownloadHistory(
         &manager(),
         std::unique_ptr<DownloadHistory::HistoryAdapter>(history_)));
@@ -892,7 +881,7 @@
   EXPECT_CALL(item(0), GetReceivedBytes()).WillRepeatedly(Return(50));
   std::unique_ptr<InfoVector> infos(new InfoVector());
   infos->push_back(info);
-  CreateDownloadHistory(std::move(infos), false);
+  CreateDownloadHistory(std::move(infos));
   EXPECT_TRUE(DownloadHistory::IsPersisted(&item(0)));
 
   // Modify the item, it should not trigger any updates.
@@ -924,7 +913,7 @@
 
   std::unique_ptr<InfoVector> infos(new InfoVector());
   infos->push_back(info);
-  CreateDownloadHistory(std::move(infos), false, true);
+  CreateDownloadHistory(std::move(infos), true);
 
   // The download should be removed from history afterwards.
   IdSet ids;
diff --git a/chrome/browser/download/notification/download_item_notification.cc b/chrome/browser/download/notification/download_item_notification.cc
index 0520f00..00b846e 100644
--- a/chrome/browser/download/notification/download_item_notification.cc
+++ b/chrome/browser/download/notification/download_item_notification.cc
@@ -198,7 +198,7 @@
       l10n_util::GetStringUTF16(
           IDS_DOWNLOAD_NOTIFICATION_DISPLAY_SOURCE),  // display_source
       GURL(kDownloadNotificationOrigin),              // origin_url
-      message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT,
+      message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
                                  kDownloadNotificationNotifierId),
       rich_notification_data,
       base::MakeRefCounted<message_center::ThunkNotificationDelegate>(
diff --git a/chrome/browser/extensions/api/file_system/request_file_system_notification.cc b/chrome/browser/extensions/api/file_system/request_file_system_notification.cc
index 0815a0b..cbb73bb 100644
--- a/chrome/browser/extensions/api/file_system/request_file_system_notification.cc
+++ b/chrome/browser/extensions/api/file_system/request_file_system_notification.cc
@@ -108,7 +108,7 @@
       gfx::Image(),      // Updated asynchronously later.
       base::string16(),  // display_source
       GURL(),
-      message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT,
+      message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
                                  notification_id),
       data, base::MakeRefCounted<message_center::NotificationDelegate>()));
 
diff --git a/chrome/browser/extensions/api/notifications/extension_notification_handler.cc b/chrome/browser/extensions/api/notifications/extension_notification_handler.cc
index da8e0798..104923d 100644
--- a/chrome/browser/extensions/api/notifications/extension_notification_handler.cc
+++ b/chrome/browser/extensions/api/notifications/extension_notification_handler.cc
@@ -112,7 +112,7 @@
 void ExtensionNotificationHandler::DisableNotifications(Profile* profile,
                                                         const GURL& origin) {
   message_center::NotifierId notifier_id(
-      message_center::NotifierId::APPLICATION, origin.host());
+      message_center::NotifierType::APPLICATION, origin.host());
   NotifierStateTrackerFactory::GetForProfile(profile)->SetNotifierEnabled(
       notifier_id, false /* enabled */);
 }
diff --git a/chrome/browser/extensions/api/notifications/notifications_api.cc b/chrome/browser/extensions/api/notifications/notifications_api.cc
index c25a1ba..a08cb49 100644
--- a/chrome/browser/extensions/api/notifications/notifications_api.cc
+++ b/chrome/browser/extensions/api/notifications/notifications_api.cc
@@ -378,7 +378,7 @@
   message_center::Notification notification(
       type, notification_id, title, message, icon,
       base::UTF8ToUTF16(extension_->name()), extension_->url(),
-      message_center::NotifierId(message_center::NotifierId::APPLICATION,
+      message_center::NotifierId(message_center::NotifierType::APPLICATION,
                                  extension_->id()),
       optional_fields, nullptr /* delegate */);
 
@@ -535,9 +535,8 @@
   NotifierStateTracker* notifier_state_tracker =
       NotifierStateTrackerFactory::GetForProfile(GetProfile());
 
-  return notifier_state_tracker->IsNotifierEnabled(
-      message_center::NotifierId(message_center::NotifierId::APPLICATION,
-                                 extension_->id()));
+  return notifier_state_tracker->IsNotifierEnabled(message_center::NotifierId(
+      message_center::NotifierType::APPLICATION, extension_->id()));
 }
 
 bool NotificationsApiFunction::IsNotificationsApiEnabled() const {
diff --git a/chrome/browser/extensions/api/notifications/notifications_apitest.cc b/chrome/browser/extensions/api/notifications/notifications_apitest.cc
index 1e71eef..599e8ca 100644
--- a/chrome/browser/extensions/api/notifications/notifications_apitest.cc
+++ b/chrome/browser/extensions/api/notifications/notifications_apitest.cc
@@ -330,8 +330,7 @@
     notification_function->set_has_callback(true);
 
     message_center::NotifierId notifier_id(
-        message_center::NotifierId::APPLICATION,
-        empty_extension->id());
+        message_center::NotifierType::APPLICATION, empty_extension->id());
     GetNotifierStateTracker()->SetNotifierEnabled(notifier_id, false);
 
     std::unique_ptr<base::Value> result(utils::RunFunctionAndReturnSingleResult(
@@ -355,8 +354,7 @@
     ResultCatcher catcher;
 
     message_center::NotifierId notifier_id(
-        message_center::NotifierId::APPLICATION,
-        extension->id());
+        message_center::NotifierType::APPLICATION, extension->id());
     GetNotifierStateTracker()->SetNotifierEnabled(notifier_id, false);
 
     EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
@@ -367,8 +365,7 @@
     ResultCatcher catcher;
 
     message_center::NotifierId notifier_id(
-        message_center::NotifierId::APPLICATION,
-        extension->id());
+        message_center::NotifierType::APPLICATION, extension->id());
     GetNotifierStateTracker()->SetNotifierEnabled(notifier_id, true);
 
     EXPECT_TRUE(catcher.GetNextResult()) << catcher.message();
diff --git a/chrome/browser/extensions/api/safe_browsing_private/OWNERS b/chrome/browser/extensions/api/safe_browsing_private/OWNERS
index 50851251..ba1319fe 100644
--- a/chrome/browser/extensions/api/safe_browsing_private/OWNERS
+++ b/chrome/browser/extensions/api/safe_browsing_private/OWNERS
@@ -1,3 +1,4 @@
-jialiul@chromium.org
 nparker@chromium.org
 vakh@chromium.org
+
+# COMPONENT: Services>Safebrowsing
diff --git a/chrome/browser/extensions/extension_storage_monitor.cc b/chrome/browser/extensions/extension_storage_monitor.cc
index b1000628..4d2666f2 100644
--- a/chrome/browser/extensions/extension_storage_monitor.cc
+++ b/chrome/browser/extensions/extension_storage_monitor.cc
@@ -427,7 +427,7 @@
           base::UTF8ToUTF16(extension->name()),
           base::Int64ToString16(current_usage / kMBytes)),
       notification_image, base::string16() /* display source */, GURL(),
-      message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT,
+      message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
                                  kSystemNotifierId),
       notification_data,
       new message_center::HandleNotificationClickDelegate(
diff --git a/chrome/browser/extensions/extension_system_impl.cc b/chrome/browser/extensions/extension_system_impl.cc
index 8d8e126f..dde1acd 100644
--- a/chrome/browser/extensions/extension_system_impl.cc
+++ b/chrome/browser/extensions/extension_system_impl.cc
@@ -474,8 +474,7 @@
 
   bool notifications_disabled = false;
   message_center::NotifierId notifier_id(
-      message_center::NotifierId::APPLICATION,
-      extension->id());
+      message_center::NotifierType::APPLICATION, extension->id());
 
   NotifierStateTracker* notifier_state_tracker =
       NotifierStateTrackerFactory::GetForProfile(profile_);
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index b47eca9..deb5840 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -3249,6 +3249,11 @@
 const char kEnableDriveFsDescription[] =
     "Enables use of the new DriveFS-based Drive sync client.";
 
+const char kEnableMyFilesVolumeName[] = "Enable MyFiles as Volume";
+const char kEnableMyFilesVolumeDescription[] =
+    "Enables use of the MyFiles as a read/write volume. This should be only "
+    "used for testing or for trying to restore previous Downloads content.";
+
 const char kEnableEhvInputName[] =
     "Emoji, handwriting and voice input on opt-in IME menu";
 const char kEnableEhvInputDescription[] =
@@ -3383,6 +3388,10 @@
     "Enable IME extensions to supply custom views for user input such as "
     "virtual keyboards.";
 
+const char kImeServiceName[] = "Enable IME service";
+const char kImeServiceDescription[] =
+    "Enable IME service to provide the IME functionality instead of NaCl";
+
 const char kLockScreenNotificationName[] = "Lock screen notification";
 const char kLockScreenNotificationDescription[] =
     "Enable notifications on the lock screen.";
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
index a492f94..9076fd0 100644
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -1976,6 +1976,9 @@
 extern const char kEnableDriveFsName[];
 extern const char kEnableDriveFsDescription[];
 
+extern const char kEnableMyFilesVolumeName[];
+extern const char kEnableMyFilesVolumeDescription[];
+
 extern const char kEnableEhvInputName[];
 extern const char kEnableEhvInputDescription[];
 
@@ -2057,6 +2060,9 @@
 extern const char kInputViewName[];
 extern const char kInputViewDescription[];
 
+extern const char kImeServiceName[];
+extern const char kImeServiceDescription[];
+
 extern const char kLockScreenNotificationName[];
 extern const char kLockScreenNotificationDescription[];
 
diff --git a/chrome/browser/metrics/chrome_metrics_service_client.cc b/chrome/browser/metrics/chrome_metrics_service_client.cc
index a6b55d1d..38f0f3ab 100644
--- a/chrome/browser/metrics/chrome_metrics_service_client.cc
+++ b/chrome/browser/metrics/chrome_metrics_service_client.cc
@@ -90,6 +90,7 @@
 #include "content/public/browser/browser_task_traits.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/histogram_fetcher.h"
+#include "content/public/browser/network_service_instance.h"
 #include "content/public/browser/notification_service.h"
 #include "ppapi/buildflags/buildflags.h"
 #include "printing/buildflags/buildflags.h"
@@ -606,6 +607,7 @@
 
   metrics_service_->RegisterMetricsProvider(
       std::make_unique<metrics::NetworkMetricsProvider>(
+          content::CreateNetworkConnectionTrackerAsyncGetter(),
           std::make_unique<metrics::NetworkQualityEstimatorProviderImpl>()));
 
   // Currently, we configure OmniboxMetricsProvider to not log events to UMA
@@ -727,6 +729,7 @@
 void ChromeMetricsServiceClient::RegisterUKMProviders() {
   ukm_service_->RegisterMetricsProvider(
       std::make_unique<metrics::NetworkMetricsProvider>(
+          content::CreateNetworkConnectionTrackerAsyncGetter(),
           std::make_unique<metrics::NetworkQualityEstimatorProviderImpl>()));
 
 #if defined(OS_CHROMEOS)
diff --git a/chrome/browser/net/nqe/OWNERS b/chrome/browser/net/nqe/OWNERS
deleted file mode 100644
index 470cb3de..0000000
--- a/chrome/browser/net/nqe/OWNERS
+++ /dev/null
@@ -1,3 +0,0 @@
-ryansturm@chromium.org
-
-file://net/nqe/OWNERS
\ No newline at end of file
diff --git a/chrome/browser/net/nqe/ui_network_quality_estimator_service.cc b/chrome/browser/net/nqe/ui_network_quality_estimator_service.cc
deleted file mode 100644
index 4691cef9..0000000
--- a/chrome/browser/net/nqe/ui_network_quality_estimator_service.cc
+++ /dev/null
@@ -1,144 +0,0 @@
-// Copyright 2016 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 "chrome/browser/net/nqe/ui_network_quality_estimator_service.h"
-
-#include <string>
-
-#include "base/bind.h"
-#include "base/memory/ptr_util.h"
-#include "base/metrics/histogram_macros.h"
-#include "base/task/post_task.h"
-#include "base/threading/thread_checker.h"
-#include "base/values.h"
-#include "chrome/browser/browser_process.h"
-#include "chrome/browser/io_thread.h"
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/common/pref_names.h"
-#include "components/prefs/pref_registry.h"
-#include "components/prefs/pref_registry_simple.h"
-#include "components/prefs/pref_service.h"
-#include "content/public/browser/browser_task_traits.h"
-#include "content/public/browser/browser_thread.h"
-#include "net/nqe/network_qualities_prefs_manager.h"
-#include "net/nqe/network_quality_estimator.h"
-#include "net/url_request/url_request_context.h"
-
-namespace {
-
-// PrefDelegateImpl writes the provided dictionary value to the network quality
-// estimator prefs on the disk.
-class PrefDelegateImpl
-    : public net::NetworkQualitiesPrefsManager::PrefDelegate {
- public:
-  // |pref_service| is used to read and write prefs from/to the disk.
-  explicit PrefDelegateImpl(PrefService* pref_service)
-      : pref_service_(pref_service), path_(prefs::kNetworkQualities) {
-    DCHECK(pref_service_);
-  }
-  ~PrefDelegateImpl() override {}
-
-  void SetDictionaryValue(const base::DictionaryValue& value) override {
-    DCHECK(thread_checker_.CalledOnValidThread());
-
-    pref_service_->Set(path_, value);
-    UMA_HISTOGRAM_EXACT_LINEAR("NQE.Prefs.WriteCount", 1, 2);
-  }
-
-  std::unique_ptr<base::DictionaryValue> GetDictionaryValue() override {
-    DCHECK(thread_checker_.CalledOnValidThread());
-    UMA_HISTOGRAM_EXACT_LINEAR("NQE.Prefs.ReadCount", 1, 2);
-    return pref_service_->GetDictionary(path_)->CreateDeepCopy();
-  }
-
- private:
-  PrefService* pref_service_;
-
-  // |path_| is the location of the network quality estimator prefs.
-  const std::string path_;
-
-  base::ThreadChecker thread_checker_;
-
-  DISALLOW_COPY_AND_ASSIGN(PrefDelegateImpl);
-};
-
-// Initializes |pref_manager| on |io_thread|.
-void SetNQEOnIOThread(net::NetworkQualitiesPrefsManager* prefs_manager,
-                      IOThread* io_thread) {
-  DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
-
-  // Avoid null pointer referencing during browser shutdown, or when the network
-  // service is running out of process.
-  if (!io_thread->globals()->system_request_context ||
-      !io_thread->globals()
-           ->system_request_context->network_quality_estimator()) {
-    return;
-  }
-
-  prefs_manager->InitializeOnNetworkThread(
-      io_thread->globals()
-          ->system_request_context->network_quality_estimator());
-}
-
-}  // namespace
-
-UINetworkQualityEstimatorService::UINetworkQualityEstimatorService(
-    Profile* profile)
-    : weak_factory_(this) {
-  DCHECK(profile);
-  // If this is running in a context without an IOThread, don't try to create
-  // the IO object.
-  if (!g_browser_process->io_thread())
-    return;
-  std::unique_ptr<PrefDelegateImpl> pref_delegate(
-      new PrefDelegateImpl(profile->GetPrefs()));
-  prefs_manager_ = base::WrapUnique(
-      new net::NetworkQualitiesPrefsManager(std::move(pref_delegate)));
-
-  base::PostTaskWithTraits(
-      FROM_HERE, {content::BrowserThread::IO},
-      base::BindOnce(&SetNQEOnIOThread, prefs_manager_.get(),
-                     g_browser_process->io_thread()));
-}
-
-UINetworkQualityEstimatorService::~UINetworkQualityEstimatorService() {
-  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
-}
-
-void UINetworkQualityEstimatorService::Shutdown() {
-  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
-  weak_factory_.InvalidateWeakPtrs();
-  if (prefs_manager_) {
-    prefs_manager_->ShutdownOnPrefSequence();
-    bool deleted = content::BrowserThread::DeleteSoon(
-        content::BrowserThread::IO, FROM_HERE, prefs_manager_.release());
-    DCHECK(deleted);
-    // Silence unused variable warning in release builds.
-    (void)deleted;
-  }
-}
-
-void UINetworkQualityEstimatorService::ClearPrefs() {
-  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
-  if (!prefs_manager_)
-    return;
-  prefs_manager_->ClearPrefs();
-}
-
-// static
-void UINetworkQualityEstimatorService::RegisterProfilePrefs(
-    PrefRegistrySimple* registry) {
-  registry->RegisterDictionaryPref(prefs::kNetworkQualities,
-                                   PrefRegistry::LOSSY_PREF);
-}
-
-std::map<net::nqe::internal::NetworkID,
-         net::nqe::internal::CachedNetworkQuality>
-UINetworkQualityEstimatorService::ForceReadPrefsForTesting() const {
-  if (!prefs_manager_) {
-    return std::map<net::nqe::internal::NetworkID,
-                    net::nqe::internal::CachedNetworkQuality>();
-  }
-  return prefs_manager_->ForceReadPrefsForTesting();
-}
diff --git a/chrome/browser/net/nqe/ui_network_quality_estimator_service.h b/chrome/browser/net/nqe/ui_network_quality_estimator_service.h
deleted file mode 100644
index 58401fa8..0000000
--- a/chrome/browser/net/nqe/ui_network_quality_estimator_service.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2016 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.
-
-#ifndef CHROME_BROWSER_NET_NQE_UI_NETWORK_QUALITY_ESTIMATOR_SERVICE_H_
-#define CHROME_BROWSER_NET_NQE_UI_NETWORK_QUALITY_ESTIMATOR_SERVICE_H_
-
-#include <stdint.h>
-
-#include <map>
-#include <memory>
-
-#include "base/macros.h"
-#include "base/memory/weak_ptr.h"
-#include "base/time/time.h"
-#include "components/keyed_service/core/keyed_service.h"
-#include "net/nqe/cached_network_quality.h"
-#include "net/nqe/network_id.h"
-
-class PrefRegistrySimple;
-class Profile;
-
-namespace net {
-class NetworkQualitiesPrefsManager;
-}
-
-// UI service to manage storage of network quality prefs.
-class UINetworkQualityEstimatorService : public KeyedService {
- public:
-  explicit UINetworkQualityEstimatorService(Profile* profile);
-  ~UINetworkQualityEstimatorService() override;
-
-  // Registers the profile-specific network quality estimator prefs.
-  static void RegisterProfilePrefs(PrefRegistrySimple* registry);
-
-  // Clear the network quality estimator prefs.
-  void ClearPrefs();
-
-  // Reads the prefs from the disk, parses them into a map of NetworkIDs and
-  // CachedNetworkQualities, and returns the map.
-  std::map<net::nqe::internal::NetworkID,
-           net::nqe::internal::CachedNetworkQuality>
-  ForceReadPrefsForTesting() const;
-
- private:
-  // KeyedService implementation:
-  void Shutdown() override;
-
-  // Prefs manager that is owned by this service. Created on the UI thread, but
-  // used and deleted on the IO thread.
-  std::unique_ptr<net::NetworkQualitiesPrefsManager> prefs_manager_;
-
-  base::WeakPtrFactory<UINetworkQualityEstimatorService> weak_factory_;
-
-  DISALLOW_COPY_AND_ASSIGN(UINetworkQualityEstimatorService);
-};
-
-#endif  // CHROME_BROWSER_NET_NQE_UI_NETWORK_QUALITY_ESTIMATOR_SERVICE_H_
diff --git a/chrome/browser/net/nqe/ui_network_quality_estimator_service_browsertest.cc b/chrome/browser/net/nqe/ui_network_quality_estimator_service_browsertest.cc
deleted file mode 100644
index 0027edd..0000000
--- a/chrome/browser/net/nqe/ui_network_quality_estimator_service_browsertest.cc
+++ /dev/null
@@ -1,124 +0,0 @@
-// Copyright 2016 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 <map>
-#include <string>
-
-#include "base/bind.h"
-#include "base/macros.h"
-#include "base/metrics/field_trial.h"
-#include "base/run_loop.h"
-#include "base/test/metrics/histogram_tester.h"
-#include "chrome/browser/browser_process.h"
-#include "chrome/browser/io_thread.h"
-#include "chrome/browser/net/nqe/ui_network_quality_estimator_service.h"
-#include "chrome/browser/net/nqe/ui_network_quality_estimator_service_factory.h"
-#include "chrome/browser/net/nqe/ui_network_quality_estimator_service_test_util.h"
-#include "chrome/browser/profiles/profile_manager.h"
-#include "chrome/test/base/in_process_browser_test.h"
-#include "components/variations/variations_associated_data.h"
-#include "content/public/browser/browser_thread.h"
-#include "content/public/test/browser_test.h"
-#include "net/base/network_change_notifier.h"
-#include "net/nqe/cached_network_quality.h"
-#include "net/nqe/effective_connection_type.h"
-#include "net/nqe/network_id.h"
-#include "net/nqe/network_quality_estimator.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-class Profile;
-
-namespace {
-
-class UINetworkQualityEstimatorServiceBrowserTest
-    : public InProcessBrowserTest {
- public:
-  UINetworkQualityEstimatorServiceBrowserTest() {}
-
-  // Verifies that the network quality prefs are written amd read correctly.
-  void VerifyWritingReadingPrefs() {
-    variations::testing::ClearAllVariationParams();
-    std::map<std::string, std::string> variation_params;
-
-    variations::AssociateVariationParams("NetworkQualityEstimator", "Enabled",
-                                         variation_params);
-    base::FieldTrialList::CreateFieldTrial("NetworkQualityEstimator",
-                                           "Enabled");
-
-    // Verifies that NQE notifying EffectiveConnectionTypeObservers causes the
-    // UINetworkQualityEstimatorService to receive an updated
-    // EffectiveConnectionType.
-    Profile* profile = ProfileManager::GetActiveUserProfile();
-
-    UINetworkQualityEstimatorService* nqe_service =
-        UINetworkQualityEstimatorServiceFactory::GetForProfile(profile);
-    ASSERT_NE(nullptr, nqe_service);
-    // NetworkQualityEstimator must be notified of the read prefs at startup.
-    EXPECT_FALSE(histogram_tester_.GetAllSamples("NQE.Prefs.ReadSize").empty());
-
-    {
-      base::HistogramTester histogram_tester;
-      nqe_test_util::OverrideEffectiveConnectionTypeAndWait(
-          net::EFFECTIVE_CONNECTION_TYPE_OFFLINE);
-
-      // Prefs are written only if persistent caching was enabled.
-      EXPECT_FALSE(
-          histogram_tester.GetAllSamples("NQE.Prefs.WriteCount").empty());
-      histogram_tester.ExpectTotalCount("NQE.Prefs.ReadCount", 0);
-
-      // NetworkQualityEstimator should not be notified of change in prefs.
-      histogram_tester.ExpectTotalCount("NQE.Prefs.ReadSize", 0);
-    }
-
-    {
-      base::HistogramTester histogram_tester;
-      nqe_test_util::OverrideEffectiveConnectionTypeAndWait(
-          net::EFFECTIVE_CONNECTION_TYPE_SLOW_2G);
-
-      // Prefs are written even if the network id was unavailable.
-      EXPECT_FALSE(
-          histogram_tester.GetAllSamples("NQE.Prefs.WriteCount").empty());
-      histogram_tester.ExpectTotalCount("NQE.Prefs.ReadCount", 0);
-
-      // NetworkQualityEstimator should not be notified of change in prefs.
-      histogram_tester.ExpectTotalCount("NQE.Prefs.ReadSize", 0);
-    }
-
-    // Verify the contents of the prefs by reading them again.
-    std::map<net::nqe::internal::NetworkID,
-             net::nqe::internal::CachedNetworkQuality>
-        read_prefs = nqe_service->ForceReadPrefsForTesting();
-    // Number of entries must be between 1 and 2. It's possible that 2 entries
-    // are added if the connection type is unknown to network quality estimator
-    // at the time of startup, and shortly after it receives a notification
-    // about the change in the connection type.
-    EXPECT_LE(1u, read_prefs.size());
-    EXPECT_GE(2u, read_prefs.size());
-
-    // Verify that the cached network quality was written correctly.
-    EXPECT_EQ(net::EFFECTIVE_CONNECTION_TYPE_SLOW_2G,
-              read_prefs.begin()->second.effective_connection_type());
-    if (net::NetworkChangeNotifier::GetConnectionType() ==
-        net::NetworkChangeNotifier::CONNECTION_ETHERNET) {
-      // Verify that the network ID was written correctly.
-      net::nqe::internal::NetworkID ethernet_network_id(
-          net::NetworkChangeNotifier::CONNECTION_ETHERNET, std::string(),
-          INT32_MIN);
-      EXPECT_EQ(ethernet_network_id, read_prefs.begin()->first);
-      }
-  }
-
- private:
-  base::HistogramTester histogram_tester_;
-
-  DISALLOW_COPY_AND_ASSIGN(UINetworkQualityEstimatorServiceBrowserTest);
-};
-
-}  // namespace
-
-// Verify that prefs are writen and read correctly.
-IN_PROC_BROWSER_TEST_F(UINetworkQualityEstimatorServiceBrowserTest,
-                       WritingReadingToPrefsEnabled) {
-  VerifyWritingReadingPrefs();
-}
diff --git a/chrome/browser/net/nqe/ui_network_quality_estimator_service_factory.cc b/chrome/browser/net/nqe/ui_network_quality_estimator_service_factory.cc
deleted file mode 100644
index d6aacd8..0000000
--- a/chrome/browser/net/nqe/ui_network_quality_estimator_service_factory.cc
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright 2016 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 "chrome/browser/net/nqe/ui_network_quality_estimator_service_factory.h"
-
-#include "chrome/browser/net/nqe/ui_network_quality_estimator_service.h"
-#include "chrome/browser/profiles/incognito_helpers.h"
-#include "chrome/browser/profiles/profile.h"
-#include "components/keyed_service/content/browser_context_dependency_manager.h"
-#include "content/public/browser/browser_context.h"
-
-// static
-UINetworkQualityEstimatorService*
-UINetworkQualityEstimatorServiceFactory::GetForProfile(Profile* profile) {
-  return static_cast<UINetworkQualityEstimatorService*>(
-      GetInstance()->GetServiceForBrowserContext(profile, true));
-}
-
-// static
-UINetworkQualityEstimatorServiceFactory*
-UINetworkQualityEstimatorServiceFactory::GetInstance() {
-  return base::Singleton<UINetworkQualityEstimatorServiceFactory>::get();
-}
-
-UINetworkQualityEstimatorServiceFactory::
-    UINetworkQualityEstimatorServiceFactory()
-    : BrowserContextKeyedServiceFactory(
-          "UINetworkQualityEstimatorService",
-          BrowserContextDependencyManager::GetInstance()) {}
-
-UINetworkQualityEstimatorServiceFactory::
-    ~UINetworkQualityEstimatorServiceFactory() {}
-
-bool UINetworkQualityEstimatorServiceFactory::
-    ServiceIsCreatedWithBrowserContext() const {
-  // Initialize the UI network quality estimator service so it can
-  // read/write the prefs.
-  return true;
-}
-
-KeyedService* UINetworkQualityEstimatorServiceFactory::BuildServiceInstanceFor(
-    content::BrowserContext* context) const {
-  return new UINetworkQualityEstimatorService(
-      Profile::FromBrowserContext(context));
-}
-
-content::BrowserContext*
-UINetworkQualityEstimatorServiceFactory::GetBrowserContextToUse(
-    content::BrowserContext* context) const {
-  return chrome::GetBrowserContextOwnInstanceInIncognito(context);
-}
diff --git a/chrome/browser/net/nqe/ui_network_quality_estimator_service_factory.h b/chrome/browser/net/nqe/ui_network_quality_estimator_service_factory.h
deleted file mode 100644
index 4fb6c48..0000000
--- a/chrome/browser/net/nqe/ui_network_quality_estimator_service_factory.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2016 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.
-
-#ifndef CHROME_BROWSER_NET_NQE_UI_NETWORK_QUALITY_ESTIMATOR_SERVICE_FACTORY_H_
-#define CHROME_BROWSER_NET_NQE_UI_NETWORK_QUALITY_ESTIMATOR_SERVICE_FACTORY_H_
-
-#include "base/memory/singleton.h"
-#include "components/keyed_service/content/browser_context_keyed_service_factory.h"
-
-class Profile;
-
-namespace content {
-class BrowserContext;
-}
-
-class UINetworkQualityEstimatorService;
-
-class UINetworkQualityEstimatorServiceFactory
-    : public BrowserContextKeyedServiceFactory {
- public:
-  static UINetworkQualityEstimatorService* GetForProfile(Profile* profile);
-
-  static UINetworkQualityEstimatorServiceFactory* GetInstance();
-
- private:
-  friend struct base::DefaultSingletonTraits<
-      UINetworkQualityEstimatorServiceFactory>;
-
-  UINetworkQualityEstimatorServiceFactory();
-  ~UINetworkQualityEstimatorServiceFactory() override;
-
-  // BrowserContextKeyedServiceFactory:
-  KeyedService* BuildServiceInstanceFor(
-      content::BrowserContext* context) const override;
-  content::BrowserContext* GetBrowserContextToUse(
-      content::BrowserContext* context) const override;
-
-  bool ServiceIsCreatedWithBrowserContext() const override;
-};
-
-#endif  // CHROME_BROWSER_NET_NQE_UI_NETWORK_QUALITY_ESTIMATOR_SERVICE_FACTORY_H_
diff --git a/chrome/browser/net/nqe/ui_network_quality_estimator_service_test_util.cc b/chrome/browser/net/nqe/ui_network_quality_estimator_service_test_util.cc
deleted file mode 100644
index 14307b1..0000000
--- a/chrome/browser/net/nqe/ui_network_quality_estimator_service_test_util.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-// Copyright 2016 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 "chrome/browser/net/nqe/ui_network_quality_estimator_service_test_util.h"
-
-#include "base/bind.h"
-#include "base/run_loop.h"
-#include "base/task/post_task.h"
-#include "chrome/browser/browser_process.h"
-#include "chrome/browser/io_thread.h"
-#include "content/public/browser/browser_task_traits.h"
-#include "content/public/browser/browser_thread.h"
-#include "net/nqe/network_quality_estimator.h"
-#include "net/url_request/url_request_context.h"
-
-namespace nqe_test_util {
-
-namespace {
-
-// Reports |type| to all of NetworkQualityEstimator's
-// EffectiveConnectionTypeObservers.
-void OverrideEffectiveConnectionTypeOnIO(net::EffectiveConnectionType type,
-                                         IOThread* io_thread) {
-  net::NetworkQualityEstimator* network_quality_estimator =
-      io_thread->globals()->system_request_context->network_quality_estimator();
-  if (!network_quality_estimator)
-    return;
-  network_quality_estimator->ReportEffectiveConnectionTypeForTesting(type);
-}
-
-void OverrideRTTsAndWaitOnIO(base::TimeDelta rtt, IOThread* io_thread) {
-  net::NetworkQualityEstimator* network_quality_estimator =
-      io_thread->globals()->system_request_context->network_quality_estimator();
-  if (!network_quality_estimator)
-    return;
-  network_quality_estimator->ReportRTTsAndThroughputForTesting(rtt, rtt, -1);
-}
-
-}  // namespace
-
-void OverrideEffectiveConnectionTypeAndWait(net::EffectiveConnectionType type) {
-  // Block |run_loop| until OverrideEffectiveConnectionTypeOnIO has completed.
-  // Any UI tasks posted by calling OverrideEffectiveConnectionTypeOnIO will
-  // complete before the reply unblocks |run_loop|.
-  base::RunLoop run_loop;
-  base::PostTaskWithTraitsAndReply(
-      FROM_HERE, {content::BrowserThread::IO},
-      base::BindOnce(&OverrideEffectiveConnectionTypeOnIO, type,
-                     g_browser_process->io_thread()),
-      run_loop.QuitClosure());
-  run_loop.Run();
-}
-
-void OverrideRTTsAndWait(base::TimeDelta rtt) {
-  // Block |run_loop| until OverrideRTTsAndWaitOnIO has completed.
-  // Any UI tasks posted by calling OverrideRTTsAndWaitOnIO will complete before
-  // the reply unblocks |run_loop|.
-  base::RunLoop run_loop;
-  base::PostTaskWithTraitsAndReply(
-      FROM_HERE, {content::BrowserThread::IO},
-      base::BindOnce(&OverrideRTTsAndWaitOnIO, rtt,
-                     g_browser_process->io_thread()),
-      run_loop.QuitClosure());
-  run_loop.Run();
-}
-
-}  // namespace nqe_test_util
diff --git a/chrome/browser/net/nqe/ui_network_quality_estimator_service_test_util.h b/chrome/browser/net/nqe/ui_network_quality_estimator_service_test_util.h
deleted file mode 100644
index 35943ce..0000000
--- a/chrome/browser/net/nqe/ui_network_quality_estimator_service_test_util.h
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2016 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.
-
-#ifndef CHROME_BROWSER_NET_NQE_UI_NETWORK_QUALITY_ESTIMATOR_SERVICE_TEST_UTIL_H_
-#define CHROME_BROWSER_NET_NQE_UI_NETWORK_QUALITY_ESTIMATOR_SERVICE_TEST_UTIL_H_
-
-#include "base/time/time.h"
-#include "net/nqe/effective_connection_type.h"
-
-namespace nqe_test_util {
-
-// Forces NetworkQualityEstimator to report |type| to all its
-// EffectiveConnectionTypeObservers.
-// This blocks execution on the calling thread until the IO task runs and
-// replies.
-void OverrideEffectiveConnectionTypeAndWait(net::EffectiveConnectionType type);
-
-// Forces NetworkQualityEstimator to report |rtt| to all its
-// RTTAndThroughputEstimatesObservers.
-// This blocks execution on the calling thread until the IO task runs and
-// replies.
-void OverrideRTTsAndWait(base::TimeDelta rtt);
-
-}  // namespace nqe_test_util
-
-#endif  // CHROME_BROWSER_NET_NQE_UI_NETWORK_QUALITY_ESTIMATOR_SERVICE_TEST_UTIL_H_
diff --git a/chrome/browser/notifications/arc_application_notifier_controller.cc b/chrome/browser/notifications/arc_application_notifier_controller.cc
index 1ed467e..16a9bb6 100644
--- a/chrome/browser/notifications/arc_application_notifier_controller.cc
+++ b/chrome/browser/notifications/arc_application_notifier_controller.cc
@@ -94,7 +94,7 @@
     // Add notifiers.
     package_to_app_ids_.insert(std::make_pair(app->package_name, app_id));
     message_center::NotifierId notifier_id(
-        message_center::NotifierId::ARC_APPLICATION, app_id);
+        message_center::NotifierType::ARC_APPLICATION, app_id);
     auto ui_data = ash::mojom::NotifierUiData::New(
         notifier_id, base::UTF8ToUTF16(app->name), app->notifications_enabled,
         false /* enforced */, icon->image_skia());
@@ -116,7 +116,7 @@
 
 void ArcApplicationNotifierController::OnIconUpdated(ArcAppIcon* icon) {
   observer_->OnIconImageUpdated(
-      message_center::NotifierId(message_center::NotifierId::ARC_APPLICATION,
+      message_center::NotifierId(message_center::NotifierType::ARC_APPLICATION,
                                  icon->app_id()),
       icon->image_skia());
 }
@@ -128,7 +128,7 @@
   if (it == package_to_app_ids_.end())
     return;
   observer_->OnNotifierEnabledChanged(
-      message_center::NotifierId(message_center::NotifierId::ARC_APPLICATION,
+      message_center::NotifierId(message_center::NotifierType::ARC_APPLICATION,
                                  it->second),
       enabled);
 }
diff --git a/chrome/browser/notifications/chrome_ash_message_center_client.cc b/chrome/browser/notifications/chrome_ash_message_center_client.cc
index 3566f2b8..154e721 100644
--- a/chrome/browser/notifications/chrome_ash_message_center_client.cc
+++ b/chrome/browser/notifications/chrome_ash_message_center_client.cc
@@ -76,14 +76,15 @@
   }
 
   sources_.insert(
-      std::make_pair(NotifierId::APPLICATION,
+      std::make_pair(message_center::NotifierType::APPLICATION,
                      std::make_unique<ExtensionNotifierController>(this)));
 
-  sources_.insert(std::make_pair(
-      NotifierId::WEB_PAGE, std::make_unique<WebPageNotifierController>(this)));
+  sources_.insert(
+      std::make_pair(message_center::NotifierType::WEB_PAGE,
+                     std::make_unique<WebPageNotifierController>(this)));
 
   sources_.insert(std::make_pair(
-      NotifierId::ARC_APPLICATION,
+      message_center::NotifierType::ARC_APPLICATION,
       std::make_unique<arc::ArcApplicationNotifierController>(this)));
 }
 
diff --git a/chrome/browser/notifications/chrome_ash_message_center_client.h b/chrome/browser/notifications/chrome_ash_message_center_client.h
index 23b570e..3d93c3a 100644
--- a/chrome/browser/notifications/chrome_ash_message_center_client.h
+++ b/chrome/browser/notifications/chrome_ash_message_center_client.h
@@ -68,8 +68,7 @@
   std::map<base::UnguessableToken, std::string> displayed_notifications_;
 
   // Notifier source for each notifier type.
-  std::map<message_center::NotifierId::NotifierType,
-           std::unique_ptr<NotifierController>>
+  std::map<message_center::NotifierType, std::unique_ptr<NotifierController>>
       sources_;
 
   ash::mojom::AshMessageCenterControllerPtr controller_;
diff --git a/chrome/browser/notifications/chrome_ash_message_center_client_browsertest.cc b/chrome/browser/notifications/chrome_ash_message_center_client_browsertest.cc
index cce4b606..b374f19 100644
--- a/chrome/browser/notifications/chrome_ash_message_center_client_browsertest.cc
+++ b/chrome/browser/notifications/chrome_ash_message_center_client_browsertest.cc
@@ -47,7 +47,7 @@
       message_center::NOTIFICATION_TYPE_SIMPLE, id, base::string16(),
       base::string16(), gfx::Image(), base::ASCIIToUTF16("display_source"),
       GURL(),
-      message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT,
+      message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
                                  "notifier_id"),
       {}, delegate);
 
diff --git a/chrome/browser/notifications/extension_notifier_controller.cc b/chrome/browser/notifications/extension_notifier_controller.cc
index 8e25a4a0..9c0e575 100644
--- a/chrome/browser/notifications/extension_notifier_controller.cc
+++ b/chrome/browser/notifications/extension_notifier_controller.cc
@@ -50,7 +50,7 @@
       continue;
 
     message_center::NotifierId notifier_id(
-        message_center::NotifierId::APPLICATION, extension->id());
+        message_center::NotifierType::APPLICATION, extension->id());
     NotifierStateTracker* const notifier_state_tracker =
         NotifierStateTrackerFactory::GetForProfile(profile);
     ui_data.push_back(ash::mojom::NotifierUiData::New(
@@ -76,6 +76,6 @@
     const std::string& id,
     const gfx::ImageSkia& image) {
   observer_->OnIconImageUpdated(
-      message_center::NotifierId(message_center::NotifierId::APPLICATION, id),
+      message_center::NotifierId(message_center::NotifierType::APPLICATION, id),
       image);
 }
diff --git a/chrome/browser/notifications/fullscreen_notification_blocker.cc b/chrome/browser/notifications/fullscreen_notification_blocker.cc
index c79310a5..ad10782 100644
--- a/chrome/browser/notifications/fullscreen_notification_blocker.cc
+++ b/chrome/browser/notifications/fullscreen_notification_blocker.cc
@@ -39,8 +39,7 @@
 
   if (enabled && !is_fullscreen_mode_) {
     UMA_HISTOGRAM_ENUMERATION("Notifications.Display_Windowed",
-                              notification.notifier_id().type,
-                              NotifierId::SIZE);
+                              notification.notifier_id().type);
   }
 
   return enabled;
diff --git a/chrome/browser/notifications/notification_permission_context.cc b/chrome/browser/notifications/notification_permission_context.cc
index f87eb5409..52f5afb 100644
--- a/chrome/browser/notifications/notification_permission_context.cc
+++ b/chrome/browser/notifications/notification_permission_context.cc
@@ -241,7 +241,7 @@
   DCHECK(notifier_state_tracker);
 
   message_center::NotifierId notifier_id(
-      message_center::NotifierId::APPLICATION, extension->id());
+      message_center::NotifierType::APPLICATION, extension->id());
   return notifier_state_tracker->IsNotifierEnabled(notifier_id)
              ? CONTENT_SETTING_ALLOW
              : CONTENT_SETTING_BLOCK;
diff --git a/chrome/browser/notifications/notification_permission_context_apitest.cc b/chrome/browser/notifications/notification_permission_context_apitest.cc
index 05b88a6a..9648b7d0 100644
--- a/chrome/browser/notifications/notification_permission_context_apitest.cc
+++ b/chrome/browser/notifications/notification_permission_context_apitest.cc
@@ -38,7 +38,7 @@
     DCHECK(notifier_state_tracker);
 
     notifier_state_tracker->SetNotifierEnabled(
-        message_center::NotifierId(message_center::NotifierId::APPLICATION,
+        message_center::NotifierId(message_center::NotifierType::APPLICATION,
                                    extension->id()),
         enabled_);
   }
diff --git a/chrome/browser/notifications/notification_permission_context_unittest.cc b/chrome/browser/notifications/notification_permission_context_unittest.cc
index 61b4a6d..9364658 100644
--- a/chrome/browser/notifications/notification_permission_context_unittest.cc
+++ b/chrome/browser/notifications/notification_permission_context_unittest.cc
@@ -552,7 +552,7 @@
 
   // Disable the |extension|'s notification ability through the state tracker.
   message_center::NotifierId notifier_id(
-      message_center::NotifierId::APPLICATION, extension->id());
+      message_center::NotifierType::APPLICATION, extension->id());
   notifier_state_tracker->SetNotifierEnabled(notifier_id, /* enabled= */ false);
 
   ASSERT_EQ(CONTENT_SETTING_BLOCK,
diff --git a/chrome/browser/notifications/notification_ui_manager_browsertest.cc b/chrome/browser/notifications/notification_ui_manager_browsertest.cc
index 6302f11b..609a9bf 100644
--- a/chrome/browser/notifications/notification_ui_manager_browsertest.cc
+++ b/chrome/browser/notifications/notification_ui_manager_browsertest.cc
@@ -104,7 +104,7 @@
         base::ASCIIToUTF16("title"), base::ASCIIToUTF16("message"),
         gfx::Image(), base::UTF8ToUTF16("chrome-test://testing/"),
         GURL("chrome-test://testing/"),
-        message_center::NotifierId(message_center::NotifierId::APPLICATION,
+        message_center::NotifierId(message_center::NotifierType::APPLICATION,
                                    "extension_id"),
         data, new_delegate);
   }
diff --git a/chrome/browser/notifications/notification_ui_manager_unittest.cc b/chrome/browser/notifications/notification_ui_manager_unittest.cc
index d5dba81..8740f1b 100644
--- a/chrome/browser/notifications/notification_ui_manager_unittest.cc
+++ b/chrome/browser/notifications/notification_ui_manager_unittest.cc
@@ -55,7 +55,7 @@
         message_center::NOTIFICATION_TYPE_SIMPLE, id, base::string16(),
         base::string16(), gfx::Image(), base::string16(),
         GURL("chrome-extension://adflkjsdflkdsfdsflkjdsflkdjfs"),
-        NotifierId(NotifierId::APPLICATION, "adflkjsdflkdsfdsflkjdsflkdjfs"),
+        NotifierId(NotifierType::APPLICATION, "adflkjsdflkdsfdsflkjdsflkdjfs"),
         message_center::RichNotificationData(),
         new message_center::NotificationDelegate());
   }
diff --git a/chrome/browser/notifications/notifier_state_tracker.cc b/chrome/browser/notifications/notifier_state_tracker.cc
index c6328bf..9fd11f3e 100644
--- a/chrome/browser/notifications/notifier_state_tracker.cc
+++ b/chrome/browser/notifications/notifier_state_tracker.cc
@@ -72,18 +72,18 @@
 bool NotifierStateTracker::IsNotifierEnabled(
     const NotifierId& notifier_id) const {
   switch (notifier_id.type) {
-    case NotifierId::APPLICATION:
+    case message_center::NotifierType::APPLICATION:
       return disabled_extension_ids_.find(notifier_id.id) ==
           disabled_extension_ids_.end();
-    case NotifierId::WEB_PAGE:
+    case message_center::NotifierType::WEB_PAGE:
       return PermissionManager::Get(profile_)
                  ->GetPermissionStatus(CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
                                        notifier_id.url, notifier_id.url)
                  .content_setting == CONTENT_SETTING_ALLOW;
-    case NotifierId::SYSTEM_COMPONENT:
+    case message_center::NotifierType::SYSTEM_COMPONENT:
       // We do not disable system component notifications.
       return true;
-    case NotifierId::ARC_APPLICATION:
+    case message_center::NotifierType::ARC_APPLICATION:
 #if defined(OS_CHROMEOS)
       // TODO(hriono): Ask Android if the application's notifications are
       // enabled.
@@ -91,15 +91,13 @@
 #else
       break;
 #endif
-    case NotifierId::CROSTINI_APPLICATION:
+    case message_center::NotifierType::CROSTINI_APPLICATION:
 #if defined(OS_CHROMEOS)
       // Disabling Crostini notifications is not supported yet.
       return true;
 #else
       break;
 #endif
-    case NotifierId::SIZE:
-      break;
   }
 
   NOTREACHED();
@@ -109,13 +107,13 @@
 void NotifierStateTracker::SetNotifierEnabled(
     const NotifierId& notifier_id,
     bool enabled) {
-  DCHECK_NE(NotifierId::WEB_PAGE, notifier_id.type);
+  DCHECK_NE(message_center::NotifierType::WEB_PAGE, notifier_id.type);
 
   bool add_new_item = false;
   const char* pref_name = NULL;
   std::unique_ptr<base::Value> id;
   switch (notifier_id.type) {
-    case NotifierId::APPLICATION:
+    case message_center::NotifierType::APPLICATION:
 #if BUILDFLAG(ENABLE_EXTENSIONS)
       pref_name = prefs::kMessageCenterDisabledExtensionIds;
       add_new_item = !enabled;
@@ -160,7 +158,8 @@
     content::BrowserContext* browser_context,
     const extensions::Extension* extension,
     extensions::UninstallReason reason) {
-  NotifierId notifier_id(NotifierId::APPLICATION, extension->id());
+  NotifierId notifier_id(message_center::NotifierType::APPLICATION,
+                         extension->id());
   if (IsNotifierEnabled(notifier_id))
     return;
 
@@ -169,7 +168,7 @@
 
 void NotifierStateTracker::FirePermissionLevelChangedEvent(
     const NotifierId& notifier_id, bool enabled) {
-  DCHECK_EQ(NotifierId::APPLICATION, notifier_id.type);
+  DCHECK_EQ(message_center::NotifierType::APPLICATION, notifier_id.type);
   extensions::EventRouter* event_router =
       extensions::EventRouter::Get(profile_);
   if (!event_router) {
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index c6be13b..f308b91 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -32,7 +32,6 @@
 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h"
 #include "chrome/browser/media/webrtc/media_stream_devices_controller.h"
 #include "chrome/browser/metrics/chrome_metrics_service_client.h"
-#include "chrome/browser/net/nqe/ui_network_quality_estimator_service.h"
 #include "chrome/browser/net/prediction_options.h"
 #include "chrome/browser/net/profile_network_context_service.h"
 #include "chrome/browser/net/system_network_context_manager.h"
@@ -378,6 +377,9 @@
 // Deprecated 10/2018
 const char kReverseAutologinEnabled[] = "reverse_autologin.enabled";
 
+// Deprecated 11/2018.
+const char kNetworkQualities[] = "net.network_qualities";
+
 // Register prefs used only for migration (clearing or moving to a new key).
 void RegisterProfilePrefsForMigration(
     user_prefs::PrefRegistrySyncable* registry) {
@@ -403,6 +405,8 @@
   registry->RegisterBooleanPref(kSupervisedUserCreationAllowed, true);
 
   registry->RegisterBooleanPref(kReverseAutologinEnabled, true);
+
+  registry->RegisterDictionaryPref(kNetworkQualities, PrefRegistry::LOSSY_PREF);
 }
 
 }  // namespace
@@ -603,7 +607,6 @@
   syncer::InvalidatorRegistrarWithMemory::RegisterProfilePrefs(registry);
   TemplateURLPrepopulateData::RegisterProfilePrefs(registry);
   translate::TranslatePrefs::RegisterProfilePrefs(registry);
-  UINetworkQualityEstimatorService::RegisterProfilePrefs(registry);
   ZeroSuggestProvider::RegisterProfilePrefs(registry);
 
 #if BUILDFLAG(ENABLE_EXTENSIONS)
@@ -862,4 +865,7 @@
 
   // Added 10/2018
   profile_prefs->ClearPref(kReverseAutologinEnabled);
+
+  // Added 11/2018.
+  profile_prefs->ClearPref(kNetworkQualities);
 }
diff --git a/chrome/browser/printing/cloud_print/privet_notifications.cc b/chrome/browser/printing/cloud_print/privet_notifications.cc
index 4f25a76..196bd9d5 100644
--- a/chrome/browser/printing/cloud_print/privet_notifications.cc
+++ b/chrome/browser/printing/cloud_print/privet_notifications.cc
@@ -286,7 +286,7 @@
       ui::ResourceBundle::GetSharedInstance().GetImageNamed(
           IDR_LOCAL_DISCOVERY_CLOUDPRINT_ICON),
       product_name, GURL(kPrivetNotificationOriginUrl),
-      message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT,
+      message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
                                  kPrivetNotificationID),
       rich_notification_data, CreateNotificationDelegate(profile));
 
diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
index 21ccdb1..5120f5b 100644
--- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
+++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
@@ -41,7 +41,6 @@
 #include "chrome/browser/media/webrtc/webrtc_event_log_manager_keyed_service_factory.h"
 #include "chrome/browser/media_galleries/media_galleries_preferences_factory.h"
 #include "chrome/browser/metrics/desktop_session_duration/desktop_profile_session_durations_service_factory.h"
-#include "chrome/browser/net/nqe/ui_network_quality_estimator_service_factory.h"
 #include "chrome/browser/notifications/notifier_state_tracker_factory.h"
 #include "chrome/browser/ntp_snippets/content_suggestions_service_factory.h"
 #include "chrome/browser/password_manager/password_store_factory.h"
@@ -381,7 +380,6 @@
 #if defined(OS_WIN)
   TriggeredProfileResetterFactory::GetInstance();
 #endif
-  UINetworkQualityEstimatorServiceFactory::GetInstance();
   UnifiedConsentServiceFactory::GetInstance();
   UrlLanguageHistogramFactory::GetInstance();
 #if !defined(OS_ANDROID)
diff --git a/chrome/browser/resources/chromeos/switch_access/BUILD.gn b/chrome/browser/resources/chromeos/switch_access/BUILD.gn
index 6b338115..12b03fa 100644
--- a/chrome/browser/resources/chromeos/switch_access/BUILD.gn
+++ b/chrome/browser/resources/chromeos/switch_access/BUILD.gn
@@ -3,6 +3,7 @@
 # found in the LICENSE file.
 
 import("//build/config/features.gni")
+import("//chrome/common/features.gni")
 import("//testing/test.gni")
 import("//chrome/test/base/js2gtest.gni")
 import("//chrome/browser/resources/chromeos/chromevox/run_jsbundler.gni")
@@ -55,23 +56,43 @@
   ]
 }
 
-test("switch_access_tests") {
+source_set("browser_tests") {
+  testonly = true
+  assert(enable_extensions)
+
   deps = [
-    ":switch_access_webuijs_tests",
-    "//chrome/test:browser_tests_runner",
+    ":switch_access_extjs_tests",
+  ]
+
+  data = [
+    "//chrome/browser/resources/chromeos/chromevox/",
+    "//chrome/browser/resources/chromeos/switch_access/",
+    "//chrome/third_party/mock4js/",
+    "//third_party/accessibility-audit/axs_testing.js",
+    "//third_party/chaijs/chai.js",
+    "//ui/webui/resources/js/cr.js",
   ]
 }
 
-js2gtest("switch_access_webuijs_tests") {
-  test_type = "webui"
+js2gtest("switch_access_extjs_tests") {
+  test_type = "extension"
   sources = [
-    "auto_scan_manager_unittest.gtestjs",
-    "switch_access_predicate_unittest.gtestjs",
+    "auto_scan_manager_test.extjs",
+    "switch_access_predicate_test.extjs",
   ]
-  extra_js_files = [
-    "auto_scan_manager.js",
-    "switch_access_predicate.js",
-    "test_support.js",
+  gen_include_files = [
+    "../chromevox/testing/callback_helper.js",
+    "switch_access_e2e_test_base.js",
+  ]
+
+  # The test base classes generate C++ code with these deps.
+  deps = [
+    "//ash",
+    "//base",
+    "//chrome/browser/chromeos",
+    "//chrome/common",
+    "//chromeos",
+    "//ui/keyboard",
   ]
   defines = [ "HAS_OUT_OF_PROC_TEST_RUNNER" ]
 }
diff --git a/chrome/browser/resources/chromeos/switch_access/auto_scan_manager_test.extjs b/chrome/browser/resources/chromeos/switch_access/auto_scan_manager_test.extjs
new file mode 100644
index 0000000..57d4a5aa
--- /dev/null
+++ b/chrome/browser/resources/chromeos/switch_access/auto_scan_manager_test.extjs
@@ -0,0 +1,162 @@
+// Copyright 2018 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.
+
+GEN_INCLUDE(['switch_access_e2e_test_base.js']);
+
+UNDEFINED_INTERVAL_DELAY = -1;
+
+/**
+ * @constructor
+ * @extends {SwitchAccessE2ETest}
+ */
+function SwitchAccessAutoScanManagerTest() {
+  SwitchAccessE2ETest.call(this);
+}
+
+SwitchAccessAutoScanManagerTest.prototype = {
+  __proto__: SwitchAccessE2ETest.prototype,
+
+  /** @override */
+  setUp: function() {
+    // Use intervalCount and intervalDelay to check how many intervals are
+    // currently running (should be no more than 1) and the current delay.
+    window.intervalCount = 0;
+    window.intervalDelay = UNDEFINED_INTERVAL_DELAY;
+    window.defaultSetInterval = window.setInterval;
+    window.defaultClearInterval = window.clearInterval;
+    window.switchAccess.defaultMoveForward = window.switchAccess.moveForward;
+    window.switchAccess.moveForwardCount = 0;
+
+
+    window.setInterval = function(func, delay) {
+      window.intervalCount++;
+      window.intervalDelay = delay;
+
+      // Override the delay to 1 ms to speed up the test.
+      return window.defaultSetInterval(func, 1);
+    };
+
+    window.clearInterval = function(intervalId) {
+      if (intervalId)
+        window.intervalCount--;
+      window.defaultClearInterval(intervalId);
+    };
+
+    window.switchAccess.moveForward = function() {
+      window.switchAccess.moveForwardCount++;
+      window.switchAccess.defaultMoveForward();
+    };
+
+    this.autoScanManager = window.switchAccess.autoScanManager_;
+    switchAccess.onMoveForwardForTesting_ = null;
+  }
+};
+
+TEST_F('SwitchAccessAutoScanManagerTest', 'SetEnabled', function() {
+  this.runWithLoadedTree('data:text/html;charset=utf-8,',
+      function(desktop) {
+        assertFalse(this.autoScanManager.isRunning());
+        assertEquals(0, switchAccess.moveForwardCount);
+        assertEquals(0, intervalCount);
+
+        switchAccess.onMoveForwardForTesting_ =
+          this.newCallback(function() {
+            assertTrue(this.autoScanManager.isRunning());
+            assertGT(switchAccess.moveForwardCount, 0);
+            assertEquals(1, intervalCount);
+          });
+
+        this.autoScanManager.setEnabled(true);
+        assertTrue(this.autoScanManager.isRunning());
+        assertEquals(1, intervalCount);
+      }
+  );
+});
+
+TEST_F('SwitchAccessAutoScanManagerTest', 'SetEnabledMultiple', function() {
+  this.runWithLoadedTree('data:text/html;charset=utf-8,',
+      function(desktop) {
+        assertFalse(this.autoScanManager.isRunning());
+        assertEquals(0, intervalCount);
+
+        this.autoScanManager.setEnabled(true);
+        this.autoScanManager.setEnabled(true);
+        this.autoScanManager.setEnabled(true);
+
+        assertTrue(this.autoScanManager.isRunning());
+        assertEquals(1, intervalCount);
+      }
+  );
+});
+
+TEST_F('SwitchAccessAutoScanManagerTest', 'EnableAndDisable', function() {
+  this.runWithLoadedTree('data:text/html;charset=utf-8,',
+      function(desktop) {
+        assertFalse(this.autoScanManager.isRunning());
+        assertEquals(0, intervalCount);
+
+        this.autoScanManager.setEnabled(true);
+        assertTrue(this.autoScanManager.isRunning());
+        assertEquals(1, intervalCount);
+
+
+        this.autoScanManager.setEnabled(false);
+        assertFalse(this.autoScanManager.isRunning());
+        assertEquals(0, intervalCount);
+      }
+  );
+});
+
+TEST_F('SwitchAccessAutoScanManagerTest', 'RestartIfRunningMultiple', function() {
+  this.runWithLoadedTree('data:text/html;charset=utf-8,',
+      function(desktop) {
+        assertFalse(this.autoScanManager.isRunning());
+        assertEquals(0, switchAccess.moveForwardCount);
+        assertEquals(0, intervalCount);
+
+        this.autoScanManager.setEnabled(true);
+        this.autoScanManager.restartIfRunning();
+        this.autoScanManager.restartIfRunning();
+        this.autoScanManager.restartIfRunning();
+
+        assertTrue(this.autoScanManager.isRunning());
+        assertEquals(1, intervalCount);
+      }
+  );
+});
+
+TEST_F('SwitchAccessAutoScanManagerTest', 'RestartIfRunningWhenOff', function() {
+  this.runWithLoadedTree('data:text/html;charset=utf-8,',
+      function(desktop) {
+        assertFalse(this.autoScanManager.isRunning());
+        this.autoScanManager.restartIfRunning();
+        assertFalse(this.autoScanManager.isRunning());
+      }
+  );
+});
+
+TEST_F('SwitchAccessAutoScanManagerTest', 'SetScanTime', function() {
+  this.runWithLoadedTree('data:text/html;charset=utf-8,',
+      function(desktop) {
+        assertFalse(this.autoScanManager.isRunning());
+        assertEquals(UNDEFINED_INTERVAL_DELAY, intervalDelay);
+
+        this.autoScanManager.setScanTime(2);
+        assertFalse(this.autoScanManager.isRunning());
+        assertEquals(2, this.autoScanManager.scanTime_);
+        assertEquals(UNDEFINED_INTERVAL_DELAY, intervalDelay);
+
+        this.autoScanManager.setEnabled(true);
+        assertTrue(this.autoScanManager.isRunning());
+        assertEquals(2, this.autoScanManager.scanTime_);
+        assertEquals(2, intervalDelay);
+
+        this.autoScanManager.setScanTime(5);
+        assertTrue(this.autoScanManager.isRunning());
+        assertEquals(5, this.autoScanManager.scanTime_);
+        assertEquals(5, intervalDelay);
+      }
+  );
+});
+
diff --git a/chrome/browser/resources/chromeos/switch_access/auto_scan_manager_unittest.gtestjs b/chrome/browser/resources/chromeos/switch_access/auto_scan_manager_unittest.gtestjs
deleted file mode 100644
index 8f11bda0..0000000
--- a/chrome/browser/resources/chromeos/switch_access/auto_scan_manager_unittest.gtestjs
+++ /dev/null
@@ -1,174 +0,0 @@
-// Copyright 2017 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.
-
-/**
- * @constructor
- * @implements {SwitchAccessInterface}
- */
-function FakeSwitchAccess() {
-  this.moveToNextCount = 0;
-  this.getNumberPref = function(key) {
-    if (key === 'autoScanTime')
-      return 1;
-  };
-  this.getBooleanPref = function(key) {
-    if (key === 'enableAutoScan')
-      return false;
-  };
-};
-
-FakeSwitchAccess.prototype = {
-  /** @override */
-  moveForward: function() {
-      this.moveToNextCount += 1;
-  },
-};
-
-/**
- * Test fixture for auto_scan_manager.js.
- * @constructor
- * @extends {testing.Test}
- */
-function AutoScanManagerUnitTest() {
-  testing.Test.call(this);
-};
-
-AutoScanManagerUnitTest.prototype = {
-  __proto__: testing.Test.prototype,
-
-  /** @override */
-  extraLibraries: [
-    'auto_scan_manager.js',
-  ],
-
-  /** @override */
-  isAsync: true,
-
-  /** @override */
-  browsePreload: DUMMY_URL,
-
-  /** @override */
-  setUp: function() {
-    // Use intervalCount and intervalDelay to check how many intervals are
-    // currently running (should be 1 at most) and what the current delay is.
-    window.intervalCount = 0;
-    window.intervalDelay = undefined;
-    window.realSetInterval = window.setInterval;
-    window.realClearInterval = window.clearInterval;
-
-    window.setInterval = function(func, delay) {
-      window.intervalCount += 1;
-      window.intervalDelay = delay;
-
-      // Set the actual delay to 1 ms to speed up the test.
-      return window.realSetInterval(func, 1);
-    };
-
-    window.clearInterval = function(intervalID) {
-      if (intervalID)
-        window.intervalCount -= 1;
-      window.realClearInterval(intervalID);
-    };
-  }
-};
-
-TEST_F('AutoScanManagerUnitTest', 'SetEnabled', function() {
-  let switchAccess = new FakeSwitchAccess();
-  let autoScanManager = new AutoScanManager(switchAccess);
-  assertFalse(autoScanManager.isRunning());
-  assertEquals(0, switchAccess.moveToNextCount);
-  assertEquals(0, window.intervalCount);
-
-  autoScanManager.setEnabled(true);
-  window.setTimeout(function() {
-    assertTrue(autoScanManager.isRunning());
-    assertGT(switchAccess.moveToNextCount, 1);
-    assertEquals(1, window.intervalCount);
-    testDone();
-  }, 10);
-});
-
-TEST_F('AutoScanManagerUnitTest', 'EnableMultiple', function() {
-  let switchAccess = new FakeSwitchAccess();
-  let autoScanManager = new AutoScanManager(switchAccess);
-  assertFalse(autoScanManager.isRunning());
-  assertEquals(0, switchAccess.moveToNextCount);
-  assertEquals(0, window.intervalCount);
-
-  autoScanManager.setEnabled(true);
-  autoScanManager.setEnabled(true);
-  autoScanManager.setEnabled(true);
-  window.setTimeout(function() {
-    assertTrue(autoScanManager.isRunning());
-    assertGT(switchAccess.moveToNextCount, 1);
-    assertEquals(1, window.intervalCount);
-    testDone();
-  }, 10);
-});
-
-TEST_F('AutoScanManagerUnitTest', 'EnableAndDisable', function() {
-  let switchAccess = new FakeSwitchAccess();
-  let autoScanManager = new AutoScanManager(switchAccess);
-  assertFalse(autoScanManager.isRunning());
-
-  autoScanManager.setEnabled(true);
-  assertTrue(autoScanManager.isRunning());
-
-  autoScanManager.setEnabled(false);
-  assertFalse(autoScanManager.isRunning());
-  testDone();
-});
-
-TEST_F('AutoScanManagerUnitTest', 'RestartMultiple', function() {
-  let switchAccess = new FakeSwitchAccess();
-  let autoScanManager = new AutoScanManager(switchAccess);
-  assertFalse(autoScanManager.isRunning());
-  assertEquals(0, switchAccess.moveToNextCount);
-  assertEquals(0, window.intervalCount);
-
-  autoScanManager.setEnabled(true);
-  autoScanManager.restartIfRunning();
-  autoScanManager.restartIfRunning();
-  autoScanManager.restartIfRunning();
-  window.setTimeout(function() {
-    assertTrue(autoScanManager.isRunning());
-    assertGT(switchAccess.moveToNextCount, 1);
-    assertEquals(1, window.intervalCount);
-    testDone();
-  }, 10);
-});
-
-TEST_F('AutoScanManagerUnitTest', 'RestartWhenOff', function() {
-  let switchAccess = new FakeSwitchAccess();
-  let autoScanManager = new AutoScanManager(switchAccess);
-  assertFalse(autoScanManager.isRunning());
-
-  autoScanManager.restartIfRunning();
-  assertFalse(autoScanManager.isRunning());
-  testDone();
-});
-
-TEST_F('AutoScanManagerUnitTest', 'SetScanTime', function() {
-  let switchAccess = new FakeSwitchAccess();
-  let autoScanManager = new AutoScanManager(switchAccess);
-  assertFalse(autoScanManager.isRunning());
-  assertEquals(1, autoScanManager.scanTime_);
-  assertEquals(undefined, window.intervalDelay);
-
-  autoScanManager.setScanTime(2);
-  assertFalse(autoScanManager.isRunning());
-  assertEquals(2, autoScanManager.scanTime_);
-  assertEquals(undefined, window.intervalDelay);
-
-  autoScanManager.setEnabled(true);
-  assertTrue(autoScanManager.isRunning());
-  assertEquals(2, autoScanManager.scanTime_);
-  assertEquals(2, window.intervalDelay);
-
-  autoScanManager.setScanTime(5);
-  assertTrue(autoScanManager.isRunning());
-  assertEquals(5, autoScanManager.scanTime_);
-  assertEquals(5, window.intervalDelay);
-  testDone();
-});
diff --git a/chrome/browser/resources/chromeos/switch_access/switch_access.js b/chrome/browser/resources/chromeos/switch_access/switch_access.js
index b3a7f4f..6af5930 100644
--- a/chrome/browser/resources/chromeos/switch_access/switch_access.js
+++ b/chrome/browser/resources/chromeos/switch_access/switch_access.js
@@ -41,6 +41,12 @@
      */
     this.navigationManager_ = null;
 
+    /**
+     * Callback for testing use only.
+     * @private {?function()}
+     */
+    this.onMoveForwardForTesting_ = null;
+
     this.init_();
   }
 
@@ -78,6 +84,7 @@
   moveForward() {
     if (this.navigationManager_)
       this.navigationManager_.moveForward();
+    this.onMoveForwardForTesting_ && this.onMoveForwardForTesting_();
   }
 
   /**
diff --git a/chrome/browser/resources/chromeos/switch_access/switch_access_e2e_test_base.js b/chrome/browser/resources/chromeos/switch_access/switch_access_e2e_test_base.js
new file mode 100644
index 0000000..f2d76c88
--- /dev/null
+++ b/chrome/browser/resources/chromeos/switch_access/switch_access_e2e_test_base.js
@@ -0,0 +1,107 @@
+// Copyright 2018 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.
+
+GEN_INCLUDE(['../chromevox/testing/callback_helper.js']);
+
+/**
+ * Base class for browser tests for Switch Access.
+ * @constructor
+ */
+function SwitchAccessE2ETest() {
+  this.callbackHelper_ = new CallbackHelper(this);
+}
+
+SwitchAccessE2ETest.prototype = {
+  __proto__: testing.Test.prototype,
+
+  /**
+   * @override
+   * No UI in the background context.
+   */
+  runAccessibilityChecks: false,
+
+  /** @override */
+  isAsync: true,
+
+  /** @override */
+  browsePreload: null,
+
+  /** @override */
+  testGenCppIncludes: function() {
+    GEN_BLOCK(function() { /*!
+#include "ash/accessibility/accessibility_delegate.h"
+#include "ash/shell.h"
+#include "base/bind.h"
+#include "base/callback.h"
+#include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
+#include "chrome/common/extensions/extension_constants.h"
+#include "ui/accessibility/accessibility_switches.h"
+#include "ui/keyboard/keyboard_util.h"
+    */ });
+  },
+
+  /** @override */
+  testGenPreamble: function() {
+    GEN_BLOCK(function() { /*!
+  //keyboard::SetRequestedKeyboardState(keyboard::KEYBOARD_STATE_ENABLED);
+  //ash::Shell::Get()->CreateKeyboard();
+  base::Closure load_cb =
+      base::Bind(&chromeos::AccessibilityManager::SetSwitchAccessEnabled,
+          base::Unretained(chromeos::AccessibilityManager::Get()),
+          true);
+  base::CommandLine::ForCurrentProcess()->AppendSwitch(
+      ::switches::kEnableExperimentalAccessibilityFeatures);
+  chromeos::AccessibilityManager::Get()->SetSwitchAccessEnabled(true);
+  WaitForExtension(extension_misc::kSwitchAccessExtensionId, load_cb);
+    */ });
+  },
+
+  /**
+   * Creates a callback that optionally calls {@code opt_callback} when
+   * called.  If this method is called one or more times, then
+   * {@code testDone()} will be called when all callbacks have been called.
+   * @param {Function=} opt_callback Wrapped callback that will have its this
+   *        reference bound to the test fixture.
+   * @return {Function}
+   */
+  newCallback: function(opt_callback) {
+    return this.callbackHelper_.wrap(opt_callback);
+  },
+
+  /**
+   * From chromevox_next_e2e_test_base.js
+   * Gets the desktop from the automation API and Launches a new tab with
+   * the given document, and runs |callback| with the desktop when a load
+   * complete fires on the created tab.
+   * Arranges to call |testDone()| after |callback| returns.
+   * NOTE: Callbacks created inside |callback| must be wrapped with
+   * |this.newCallback| if passed to asynchonous calls.  Otherwise, the test
+   * will be finished prematurely.
+   * @param {string} url Url to load and wait for.
+   * @param {function(chrome.automation.AutomationNode)} callback Called with
+   *     the desktop node once the document is ready.
+   */
+  runWithLoadedTree: function(url, callback) {
+    callback = this.newCallback(callback);
+    chrome.automation.getDesktop(function(desktopRootNode) {
+      var createParams = {active: true, url: url};
+      chrome.tabs.create(createParams, function(unused_tab) {
+        chrome.automation.getTree(function(returnedRootNode) {
+          rootNode = returnedRootNode;
+          if (rootNode.docLoaded) {
+            callback && callback(desktopRootNode);
+            callback = null;
+            return;
+          }
+          rootNode.addEventListener('loadComplete', function(evt) {
+            if (evt.target.root.url != url)
+              return;
+            callback && callback(desktopRootNode);
+            callback = null;
+          });
+        });
+      });
+    }.bind(this));
+  },
+};
diff --git a/chrome/browser/resources/chromeos/switch_access/switch_access_predicate.js b/chrome/browser/resources/chromeos/switch_access/switch_access_predicate.js
index 3d15415..9b3efc3 100644
--- a/chrome/browser/resources/chromeos/switch_access/switch_access_predicate.js
+++ b/chrome/browser/resources/chromeos/switch_access/switch_access_predicate.js
@@ -185,8 +185,6 @@
     }
 
     // Check various indicators that the node is actionable.
-    // TODO(zhelfins): Update tests to reflect this updated behavior.
-
     if (defaultActionVerb && defaultActionVerb !== 'none' &&
         defaultActionVerb !== DefaultActionVerb.CLICK_ANCESTOR)
       return true;
diff --git a/chrome/browser/resources/chromeos/switch_access/switch_access_predicate_test.extjs b/chrome/browser/resources/chromeos/switch_access/switch_access_predicate_test.extjs
new file mode 100644
index 0000000..0195bd78
--- /dev/null
+++ b/chrome/browser/resources/chromeos/switch_access/switch_access_predicate_test.extjs
@@ -0,0 +1,303 @@
+// Copyright 2018 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.
+
+GEN_INCLUDE(['switch_access_e2e_test_base.js']);
+
+/**
+ * @constructor
+ * @extends {SwitchAccessE2ETest}
+ */
+function SwitchAccessPredicateTest() {
+  SwitchAccessE2ETest.call(this);
+}
+
+SwitchAccessPredicateTest.prototype = {
+  __proto__: SwitchAccessE2ETest.prototype,
+
+  setDesktop: function(desktop) {
+    this.desktop = desktop;
+  },
+
+  getNodeByName: function(name) {
+    assertTrue(this.desktop != undefined);
+    const node = new AutomationTreeWalker(this.desktop, constants.Dir.FORWARD,
+      { visit:
+          function(node) { return node.name === this.name; }.bind({name})
+      }).next().node;
+    assertTrue(node != null);
+
+    return node;
+  },
+
+  getNodesForRole: function(role) {
+    return new AutomationTreeWalker(this.desktop, constants.Dir.FORWARD,
+      { visit: (node) => node.role === role });
+  }
+};
+
+function fakeLoc(x) {
+  return {left: x, top: x, width: x, height: x};
+}
+
+// This page has a 1:1 correlation between DOM nodes and accessibility nodes.
+function testWebsite() {
+  return 'data:text/html;charset=utf-8,' +
+         '<div aria-label="upper1">' +
+           '<div aria-label="lower1">' +
+             '<button>leaf1</button>' +
+             '<p aria-label="leaf2">leaf2</p>' +
+             '<button>leaf3</button>' +
+           '</div><div aria-label="lower2">' +
+             '<p aria-label="leaf4">leaf4</p>' +
+             '<button>leaf5</button>' +
+           '</div>' +
+         '</div><div aria-label="upper2" role="button">' +
+           '<div aria-label="lower3" >' +
+             '<p aria-label="leaf6">leaf6</p>' +
+             '<p aria-label="leaf7">leaf7</p>';
+}
+
+function getTree(desktop) {
+  const root = new AutomationTreeWalker(desktop, constants.Dir.FORWARD,
+    { visit: (node) =>
+                  node.role === chrome.automation.RoleType.ROOT_WEB_AREA &&
+                  node.firstChild && node.firstChild.name === "upper1"
+    }
+  ).next().node;
+  assertTrue(root != null);
+
+  const upper1 = root.firstChild;
+  assertTrue(upper1 && upper1.name === "upper1");
+  const upper2 = upper1.nextSibling;
+  assertTrue(upper2 && upper2.name === "upper2");
+  const lower1 = upper1.firstChild;
+  assertTrue(lower1 && lower1.name === "lower1");
+  const lower2 = lower1.nextSibling;
+  assertTrue(lower2 && lower2.name === "lower2");
+  const lower3 = upper2.firstChild;
+  assertTrue(lower3 && lower3.name === "lower3");
+  const leaf1 = lower1.firstChild;
+  assertTrue(leaf1 && leaf1.name === "leaf1");
+  const leaf2 = leaf1.nextSibling;
+  assertTrue(leaf2 && leaf2.name === "leaf2");
+  const leaf3 = leaf2.nextSibling;
+  assertTrue(leaf3 && leaf3.name === "leaf3");
+  const leaf4 = lower2.firstChild;
+  assertTrue(leaf4 && leaf4.name === "leaf4");
+  const leaf5 = leaf4.nextSibling;
+  assertTrue(leaf5 && leaf5.name === "leaf5");
+  const leaf6 = lower3.firstChild;
+  assertTrue(leaf6 && leaf6.name === "leaf6");
+  const leaf7 = leaf6.nextSibling;
+  assertTrue(leaf7 && leaf7.name === "leaf7");
+
+  return { root, upper1, upper2, lower1, lower2, lower3, leaf1, leaf2, leaf3,
+           leaf4, leaf5, leaf6, leaf7 };
+}
+
+TEST_F('SwitchAccessPredicateTest', 'IsSubtreeLeaf', function() {
+  this.runWithLoadedTree(testWebsite(),
+      function(desktop) {
+        const t = getTree(desktop);
+
+        assertTrue(SwitchAccessPredicate.isSubtreeLeaf(t.root, t.root));
+        assertTrue(SwitchAccessPredicate.isSubtreeLeaf(t.upper1, t.root));
+        assertTrue(SwitchAccessPredicate.isSubtreeLeaf(t.upper2, t.root));
+        assertTrue(SwitchAccessPredicate.isSubtreeLeaf(t.lower1, t.upper1));
+        assertFalse(SwitchAccessPredicate.isSubtreeLeaf(t.lower2, t.upper1));
+        assertFalse(SwitchAccessPredicate.isSubtreeLeaf(t.lower3, t.root));
+        assertTrue(SwitchAccessPredicate.isSubtreeLeaf(t.leaf1, t.lower1));
+        assertFalse(SwitchAccessPredicate.isSubtreeLeaf(t.leaf2, t.lower1));
+        assertTrue(SwitchAccessPredicate.isSubtreeLeaf(t.leaf3, t.lower1));
+        assertFalse(SwitchAccessPredicate.isSubtreeLeaf(t.leaf4, t.upper1));
+        assertTrue(SwitchAccessPredicate.isSubtreeLeaf(t.leaf5, t.upper1));
+        assertFalse(SwitchAccessPredicate.isSubtreeLeaf(t.leaf6, t.lower3));
+        assertFalse(SwitchAccessPredicate.isSubtreeLeaf(t.leaf7, t.lower3));
+      }
+  );
+});
+
+TEST_F('SwitchAccessPredicateTest', 'IsGroup', function() {
+  this.runWithLoadedTree(testWebsite(),
+      function(desktop) {
+        const t = getTree(desktop);
+
+        assertTrue(SwitchAccessPredicate.isGroup(t.root, t.root));
+        assertTrue(SwitchAccessPredicate.isGroup(t.upper1, t.root));
+        assertFalse(SwitchAccessPredicate.isGroup(t.upper2, t.root));
+        assertTrue(SwitchAccessPredicate.isGroup(t.lower1, t.upper1));
+        assertFalse(SwitchAccessPredicate.isGroup(t.lower2, t.upper1));
+        assertFalse(SwitchAccessPredicate.isGroup(t.lower3, t.root));
+        assertFalse(SwitchAccessPredicate.isGroup(t.leaf1, t.lower1));
+        assertFalse(SwitchAccessPredicate.isGroup(t.leaf2, t.lower1));
+        assertFalse(SwitchAccessPredicate.isGroup(t.leaf3, t.lower1));
+        assertFalse(SwitchAccessPredicate.isGroup(t.leaf4, t.upper1));
+        assertFalse(SwitchAccessPredicate.isGroup(t.leaf5, t.upper1));
+        assertFalse(SwitchAccessPredicate.isGroup(t.leaf6, t.lower3));
+        assertFalse(SwitchAccessPredicate.isGroup(t.leaf7, t.lower3));
+      }
+  );
+});
+
+TEST_F('SwitchAccessPredicateTest', 'IsInterestingSubtree', function() {
+  this.runWithLoadedTree(testWebsite(),
+      function(desktop) {
+        const t = getTree(desktop);
+
+        assertTrue(SwitchAccessPredicate.isInterestingSubtree(t.root));
+        assertTrue(SwitchAccessPredicate.isInterestingSubtree(t.upper1));
+        assertTrue(SwitchAccessPredicate.isInterestingSubtree(t.upper2));
+        assertTrue(SwitchAccessPredicate.isInterestingSubtree(t.lower1));
+        assertTrue(SwitchAccessPredicate.isInterestingSubtree(t.lower2));
+        assertFalse(SwitchAccessPredicate.isInterestingSubtree(t.lower3));
+        assertTrue(SwitchAccessPredicate.isInterestingSubtree(t.leaf1));
+        assertFalse(SwitchAccessPredicate.isInterestingSubtree(t.leaf2));
+        assertTrue(SwitchAccessPredicate.isInterestingSubtree(t.leaf3));
+        assertFalse(SwitchAccessPredicate.isInterestingSubtree(t.leaf4));
+        assertTrue(SwitchAccessPredicate.isInterestingSubtree(t.leaf5));
+        assertFalse(SwitchAccessPredicate.isInterestingSubtree(t.leaf6));
+        assertFalse(SwitchAccessPredicate.isInterestingSubtree(t.leaf7));
+      }
+  );
+});
+
+TEST_F('SwitchAccessPredicateTest', 'IsActionable', function() {
+  const treeString =
+      '<button style="position:absolute; top:-100px;">button1</button>' +
+      '<button disabled>button2</button>' +
+      '<a href="https://www.google.com/" aria-label="link1">link1</a>' +
+      '<input type="text" aria-label="input1">input1</input>' +
+      '<button>button3</button>' +
+      '<div aria-label="div1"><p>p1</p></div>'
+  this.runWithLoadedTree('data:text/html;charset=utf-8,' + treeString,
+      function(desktop) {
+        this.setDesktop(desktop);
+        // Objects that are offscreen should not be actionable.
+        const button1 = this.getNodeByName('button1');
+        assertFalse(SwitchAccessPredicate.isActionable(button1));
+
+        // Disabled objects are not actionable.
+        const button2 = this.getNodeByName('button2');
+        assertFalse(SwitchAccessPredicate.isActionable(button2));
+
+        // Root web areas are not directly actionable.
+        const treeWalker = this.getNodesForRole(
+                               chrome.automation.RoleType.ROOT_WEB_AREA);
+        while (treeWalker.node) {
+          assertFalse(SwitchAccessPredicate.isActionable(treeWalker.node));
+          treeWalker.next();
+        }
+
+        // Links are considered actionable.
+        const link1 = this.getNodeByName('link1');
+        assertTrue(SwitchAccessPredicate.isActionable(link1));
+
+        // Inputs are also considered actionable.
+        const input1 = this.getNodeByName('input1');
+        assertTrue(SwitchAccessPredicate.isActionable(input1));
+
+        // Buttons are generally actionable.
+        const button3 = this.getNodeByName('button3');
+        assertTrue(SwitchAccessPredicate.isActionable(button3));
+
+        // Divs are not generally actionable.
+        const div1 = this.getNodeByName('div1');
+        assertFalse(SwitchAccessPredicate.isActionable(div1));
+
+        // Static text is not actionable.
+        const p1 = this.getNodeByName('p1');
+        assertFalse(SwitchAccessPredicate.isActionable(p1));
+      }
+  );
+});
+
+
+TEST_F('SwitchAccessPredicateTest', 'LeafPredicate', function() {
+  this.runWithLoadedTree(testWebsite(),
+      function(desktop) {
+        const t = getTree(desktop);
+
+        // Start with root as scope
+        let leaf = SwitchAccessPredicate.leaf(t.root);
+        assertFalse(leaf(t.root));
+        assertTrue(leaf(t.upper1));
+        assertTrue(leaf(t.upper2));
+
+        // Set upper1 as scope
+        leaf = SwitchAccessPredicate.leaf(t.upper1);
+        assertFalse(leaf(t.upper1));
+        assertTrue(leaf(t.lower1));
+        assertTrue(leaf(t.leaf4));
+        assertTrue(leaf(t.leaf5));
+
+        // Set lower1 as scope
+        leaf = SwitchAccessPredicate.leaf(t.lower1);
+        assertFalse(leaf(t.lower1));
+        assertTrue(leaf(t.leaf1));
+        assertTrue(leaf(t.leaf2));
+        assertTrue(leaf(t.leaf3));
+      }
+  );
+});
+
+TEST_F('SwitchAccessPredicateTest', 'RootPredicate', function() {
+  this.runWithLoadedTree(testWebsite(),
+      function(desktop) {
+        const t = getTree(desktop);
+
+        // Start with root as scope
+        let root = SwitchAccessPredicate.root(t.root);
+        assertTrue(root(t.root));
+        assertFalse(root(t.upper1));
+        assertFalse(root(t.upper2));
+
+        // Set upper1 as scope
+        root = SwitchAccessPredicate.root(t.upper1);
+        assertTrue(root(t.upper1));
+        assertFalse(root(t.lower1));
+        assertFalse(root(t.lower2));
+
+        // Set lower1 as scope
+        root = SwitchAccessPredicate.root(t.lower1);
+        assertTrue(root(t.lower1));
+        assertFalse(root(t.leaf1));
+        assertFalse(root(t.leaf2));
+        assertFalse(root(t.leaf3));
+      }
+  );
+});
+
+TEST_F('SwitchAccessPredicateTest', 'VisitPredicate', function() {
+  this.runWithLoadedTree(testWebsite(),
+      function(desktop) {
+        const t = getTree(desktop);
+
+        // Start with root as scope
+        let visit = SwitchAccessPredicate.visit(t.root);
+        assertTrue(visit(t.root));
+        assertTrue(visit(t.upper1));
+        assertTrue(visit(t.upper2));
+
+        // Set upper1 as scope
+        visit = SwitchAccessPredicate.visit(t.upper1);
+        assertTrue(visit(t.upper1));
+        assertTrue(visit(t.lower1));
+        assertFalse(visit(t.lower2));
+        assertFalse(visit(t.leaf4));
+        assertTrue(visit(t.leaf5));
+
+        // Set lower1 as scope
+        visit = SwitchAccessPredicate.visit(t.lower1);
+        assertTrue(visit(t.lower1));
+        assertTrue(visit(t.leaf1));
+        assertFalse(visit(t.leaf2));
+        assertTrue(visit(t.leaf3));
+
+        // An uninteresting subtree should return false, regardless of scope
+        assertFalse(visit(t.lower3));
+        assertFalse(visit(t.leaf6));
+        assertFalse(visit(t.leaf7));
+      }
+  );
+});
diff --git a/chrome/browser/resources/chromeos/switch_access/switch_access_predicate_unittest.gtestjs b/chrome/browser/resources/chromeos/switch_access/switch_access_predicate_unittest.gtestjs
deleted file mode 100644
index 9c0d19b..0000000
--- a/chrome/browser/resources/chromeos/switch_access/switch_access_predicate_unittest.gtestjs
+++ /dev/null
@@ -1,282 +0,0 @@
-// Copyright 2017 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.
-
-/**
- * Test fixture for switch_access_predicate.js.
- * @constructor
- * @extends {testing.Test}
- */
-function SwitchAccessPredicateUnitTest () {
-  testing.Test.call(this);
-};
-
-SwitchAccessPredicateUnitTest.prototype = {
-  __proto__: testing.Test.prototype,
-
-  /** @override */
-  extraLibraries: [
-    'switch_access_predicate.js',
-    'test_support.js'
-  ],
-
-  /** @override */
-  browsePreload: DUMMY_URL,
-
-  /** @override */
-  setUp: function() {
-    chrome.automation = {
-      RoleType: {
-        CLIENT: 'client', DESKTOP: 'desktop', ROOT_WEB_AREA: 'rootWebArea',
-        TAB: 'tab', TAB_LIST: 'tabList', WEB_VIEW: 'webView'
-      },
-      StateType: {FOCUSABLE: 'focusable', OFFSCREEN: 'offscreen'}
-    };
-  },
-
-  fakeLoc: function(x) {
-    return {left: x, top: x, width: x, height: x};
-  },
-
-  getSampleTree: function() {
-    // - = interesting, (g) = group
-    // root (g)
-    //   upper1 (g)
-    //     lower1 (g)
-    //       leaf1 -
-    //       leaf2
-    //       leaf3 -
-    //     lower2
-    //       leaf4
-    //       leaf5 -
-    //   upper2 -
-    //     lower3
-    //       leaf6
-    //       leaf7
-    let root = {location: this.fakeLoc(0), state: {}};
-    let upper1 = {location: this.fakeLoc(1), state: {}};
-    let upper2 = {location: this.fakeLoc(2), state: {focusable: true}};
-    let lower1 = {location: this.fakeLoc(3), state: {}};
-    let lower2 = {location: this.fakeLoc(4), state: {}};
-    let lower3 = {location: this.fakeLoc(5), state: {}};
-    let leaf1 = {location: this.fakeLoc(6), state: {focusable: true}};
-    let leaf2 = {location: this.fakeLoc(7), state: {}};
-    let leaf3 = {location: this.fakeLoc(8), state: {focusable: true}};
-    let leaf4 = {location: this.fakeLoc(9), state: {}};
-    let leaf5 = {location: this.fakeLoc(10), state: {focusable: true}};
-    let leaf6 = {location: this.fakeLoc(11), state: {}};
-    let leaf7 = {location: this.fakeLoc(12), state: {}};
-
-    let ts = new TestSupport();
-    ts.setChildren(root, [upper1, upper2]);
-    ts.setChildren(upper1, [lower1, lower2]);
-    ts.setChildren(upper2, [lower3]);
-    ts.setChildren(lower1, [leaf1, leaf2, leaf3]);
-    ts.setChildren(lower2, [leaf4, leaf5]);
-    ts.setChildren(lower3, [leaf6, leaf7]);
-
-    return {
-      root: root,
-      upper1: upper1,
-      upper2: upper2,
-      lower1: lower1,
-      lower2: lower2,
-      lower3: lower3,
-      leaf1: leaf1,
-      leaf2: leaf2,
-      leaf3: leaf3,
-      leaf4: leaf4,
-      leaf5: leaf5,
-      leaf6: leaf6,
-      leaf7: leaf7,
-    };
-  },
-};
-
-TEST_F('SwitchAccessPredicateUnitTest', 'IsSubtreeLeaf', function() {
-  let t = this.getSampleTree();
-
-  // Make t.leaf6 and t.leaf7 interesting. t.lower3 becomes a group.
-  t.leaf6.state = {focusable: true};
-  t.leaf7.state = {focusable: true};
-
-  assertTrue(SwitchAccessPredicate.isSubtreeLeaf(t.root, t.root));
-  assertTrue(SwitchAccessPredicate.isSubtreeLeaf(t.upper1, t.root));
-  assertTrue(SwitchAccessPredicate.isSubtreeLeaf(t.upper2, t.root));
-  assertTrue(SwitchAccessPredicate.isSubtreeLeaf(t.lower1, t.upper1));
-  assertFalse(SwitchAccessPredicate.isSubtreeLeaf(t.lower2, t.upper1));
-  assertTrue(SwitchAccessPredicate.isSubtreeLeaf(t.lower3, t.root));
-  assertTrue(SwitchAccessPredicate.isSubtreeLeaf(t.leaf1, t.lower1));
-  assertFalse(SwitchAccessPredicate.isSubtreeLeaf(t.leaf2, t.lower1));
-  assertTrue(SwitchAccessPredicate.isSubtreeLeaf(t.leaf3, t.lower1));
-  assertFalse(SwitchAccessPredicate.isSubtreeLeaf(t.leaf4, t.upper1));
-  assertTrue(SwitchAccessPredicate.isSubtreeLeaf(t.leaf5, t.upper1));
-  assertTrue(SwitchAccessPredicate.isSubtreeLeaf(t.leaf6, t.lower3));
-  assertTrue(SwitchAccessPredicate.isSubtreeLeaf(t.leaf7, t.lower3));
-});
-
-TEST_F('SwitchAccessPredicateUnitTest', 'IsGroup', function() {
-  let t = this.getSampleTree();
-
-  // Make t.leaf6 and t.leaf7 interesting. t.lower3 becomes a group.
-  t.leaf6.state = {focusable: true};
-  t.leaf7.state = {focusable: true};
-
-  assertTrue(SwitchAccessPredicate.isGroup(t.root, t.root));
-  assertTrue(SwitchAccessPredicate.isGroup(t.upper1, t.root));
-  assertFalse(SwitchAccessPredicate.isGroup(t.upper2, t.root));
-  assertTrue(SwitchAccessPredicate.isGroup(t.lower1, t.upper1));
-  assertFalse(SwitchAccessPredicate.isGroup(t.lower2, t.upper1));
-  assertTrue(SwitchAccessPredicate.isGroup(t.lower3, t.root));
-  assertFalse(SwitchAccessPredicate.isGroup(t.leaf1, t.lower1));
-  assertFalse(SwitchAccessPredicate.isGroup(t.leaf2, t.lower1));
-  assertFalse(SwitchAccessPredicate.isGroup(t.leaf3, t.lower1));
-  assertFalse(SwitchAccessPredicate.isGroup(t.leaf4, t.upper1));
-  assertFalse(SwitchAccessPredicate.isGroup(t.leaf5, t.upper1));
-  assertFalse(SwitchAccessPredicate.isGroup(t.leaf6, t.lower3));
-  assertFalse(SwitchAccessPredicate.isGroup(t.leaf7, t.lower3));
-
-  // Set location of t.upper1 to equal location of t.root
-  t.upper1.location = this.fakeLoc(0);
-  assertFalse(SwitchAccessPredicate.isGroup(t.upper1, t.root));
-});
-
-TEST_F('SwitchAccessPredicateUnitTest', 'IsInterestingSubtree', function() {
-  let t = this.getSampleTree();
-
-  assertTrue(SwitchAccessPredicate.isInterestingSubtree(t.root));
-  assertTrue(SwitchAccessPredicate.isInterestingSubtree(t.upper1));
-  assertTrue(SwitchAccessPredicate.isInterestingSubtree(t.upper2));
-  assertTrue(SwitchAccessPredicate.isInterestingSubtree(t.lower1));
-  assertTrue(SwitchAccessPredicate.isInterestingSubtree(t.lower2));
-  assertFalse(SwitchAccessPredicate.isInterestingSubtree(t.lower3));
-  assertTrue(SwitchAccessPredicate.isInterestingSubtree(t.leaf1));
-  assertFalse(SwitchAccessPredicate.isInterestingSubtree(t.leaf2));
-  assertTrue(SwitchAccessPredicate.isInterestingSubtree(t.leaf3));
-  assertFalse(SwitchAccessPredicate.isInterestingSubtree(t.leaf4));
-  assertTrue(SwitchAccessPredicate.isInterestingSubtree(t.leaf5));
-  assertFalse(SwitchAccessPredicate.isInterestingSubtree(t.leaf6));
-  assertFalse(SwitchAccessPredicate.isInterestingSubtree(t.leaf7));
-});
-
-TEST_F('SwitchAccessPredicateUnitTest', 'IsInteresting', function() {
-  // Testing focusable.
-  let loc1 = {left: 0, top: 0, width: 0, height: 0};
-  let node1 = {location: loc1, state: {}};
-  let node2 = {location: loc1, state: {focusable: false}};
-  let node3 = {location: loc1, state: {focusable: true}};
-  assertFalse(SwitchAccessPredicate.isActionable(node1));
-  assertFalse(SwitchAccessPredicate.isActionable(node2));
-  assertTrue(SwitchAccessPredicate.isActionable(node3));
-
-  // Testing onscreen.
-  let loc2 = {left: -1, top: 0, width: 0, height: 0};
-  let loc3 = {left: 0, top: -1, width: 0, height: 0};
-  let node4 = {location: loc2, state: {focusable: true}};
-  let node5 = {location: loc3, state: {focusable: true}};
-  let node6 = {location: loc1, state: {focusable: true, offscreen: true}}
-  assertFalse(SwitchAccessPredicate.isActionable(node4));
-  assertFalse(SwitchAccessPredicate.isActionable(node5));
-  assertFalse(SwitchAccessPredicate.isActionable(node6));
-
-  // Testing if tab.
-  let node7 = {location: loc1, role: 'desktop', state: {}};
-  let node8 = {location: loc1, role: 'tabList', state: {}};
-  let node9 =
-      {location: loc1, parent: node8, root: node7, role: 'tab', state: {}};
-  assertFalse(SwitchAccessPredicate.isActionable(node7));
-  assertFalse(SwitchAccessPredicate.isActionable(node8));
-  assertTrue(SwitchAccessPredicate.isActionable(node9));
-
-  // Testing if webView or rootWebArea.
-  let node10 = {location: loc1, role: 'webView', state: {focusable: true}};
-  let node11 = {location: loc1, role: 'rootWebArea', state: {focusable: true}};
-  assertFalse(SwitchAccessPredicate.isActionable(node10));
-  assertFalse(SwitchAccessPredicate.isActionable(node11));
-});
-
-TEST_F('SwitchAccessPredicateUnitTest', 'LeafPredicate', function() {
-  let t = this.getSampleTree();
-
-  // Start with root as scope
-  let leaf = SwitchAccessPredicate.leaf(t.root);
-
-  assertFalse(leaf(t.root));
-  assertTrue(leaf(t.upper1));
-  assertTrue(leaf(t.upper2));
-
-  // upper 1 as scope
-  leaf = SwitchAccessPredicate.leaf(t.upper1);
-
-  assertFalse(leaf(t.upper1));
-  assertTrue(leaf(t.lower1));
-  assertTrue(leaf(t.leaf4));
-  assertTrue(leaf(t.leaf5));
-
-  // lower 1 as scope
-  leaf = SwitchAccessPredicate.leaf(t.lower1);
-
-  assertFalse(leaf(t.lower1));
-  assertTrue(leaf(t.leaf1));
-  assertTrue(leaf(t.leaf2));
-  assertTrue(leaf(t.leaf3));
-});
-
-TEST_F('SwitchAccessPredicateUnitTest', 'RootPredicate', function() {
-  let t = this.getSampleTree();
-
-  // Start with root as scope
-  let root = SwitchAccessPredicate.root(t.root);
-
-  assertTrue(root(t.root));
-  assertFalse(root(t.upper1));
-  assertFalse(root(t.upper2));
-
-  // upper 1 as scope
-  root = SwitchAccessPredicate.root(t.upper1);
-
-  assertTrue(root(t.upper1));
-  assertFalse(root(t.lower1));
-  assertFalse(root(t.lower2));
-
-  // lower 1 as scope
-  root = SwitchAccessPredicate.root(t.lower1);
-
-  assertTrue(root(t.lower1));
-  assertFalse(root(t.leaf1));
-  assertFalse(root(t.leaf2));
-  assertFalse(root(t.leaf3));
-});
-
-TEST_F('SwitchAccessPredicateUnitTest', 'VisitPredicate', function() {
-  let t = this.getSampleTree();
-
-  // root as scope
-  let visit = SwitchAccessPredicate.visit(t.root);
-
-  assertTrue(visit(t.root));
-  assertTrue(visit(t.upper1));
-  assertTrue(visit(t.upper2));
-
-  // upper1 as scope
-  visit = SwitchAccessPredicate.visit(t.upper1);
-
-  assertTrue(visit(t.upper1));
-  assertTrue(visit(t.lower1));
-  assertFalse(visit(t.lower2));
-  assertFalse(visit(t.leaf4));
-  assertTrue(visit(t.leaf5));
-
-  // lower1 as scope
-  visit = SwitchAccessPredicate.visit(t.lower1);
-
-  assertTrue(visit(t.lower1));
-  assertTrue(visit(t.leaf1));
-  assertFalse(visit(t.leaf2));
-  assertTrue(visit(t.leaf3));
-
-  // An uninteresting subtree should return false, regardless of scope
-  assertFalse(visit(t.lower3));
-  assertFalse(visit(t.leaf6));
-  assertFalse(visit(t.leaf7));
-});
diff --git a/chrome/browser/resources/chromeos/switch_access/test_support.js b/chrome/browser/resources/chromeos/switch_access/test_support.js
deleted file mode 100644
index 72d668f..0000000
--- a/chrome/browser/resources/chromeos/switch_access/test_support.js
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2017 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.
-
-
-const TestSupport = {
-  /**
-   * Connect |parent| and |children| to each other.
-   *
-   * @param {!Object} parent
-   * @param {Array<Object>} children
-   */
-  setChildren: (parent, children) => {
-    // Connect parent to its children.
-    parent.children = children;
-    parent.firstChild = children[0];
-    parent.lastChild = children[children.length - 1];
-
-    for (const i = 0; i < children.length; i++) {
-      let child = children[i];
-
-      // Connect children to their parent.
-      child.parent = parent;
-
-      // Connect children to each other
-      if (i < children.length - 1)
-        child.nextSibling = children[i + 1];
-      if (i > 0)
-        child.previousSibling = children[i - 1];
-    }
-  },
-};
diff --git a/chrome/browser/resources/component_extension_resources.grd b/chrome/browser/resources/component_extension_resources.grd
index 4e084c75..f33cb28 100644
--- a/chrome/browser/resources/component_extension_resources.grd
+++ b/chrome/browser/resources/component_extension_resources.grd
@@ -43,7 +43,7 @@
         <include name="IDR_FEEDBACK_BLUETOOTHLOGSINFO_HTML" file="feedback/html/bluetooth_logs_info.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" />
         <include name="IDR_FEEDBACK_DEFAULT_HTML" file="feedback/html/default.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" />
         <include name="IDR_FEEDBACK_SYSINFO_HTML" file="feedback/html/sys_info.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" />
-        <include name="IDR_FEEDBACK_FEEDBACK_DATA_JS" file="feedback/js/data.js" flattenhtml="true" type="BINDATA" />
+        <include name="IDR_FEEDBACK_FEEDBACK_UTIL_JS" file="feedback/js/feedback_util.js" flattenhtml="true" type="BINDATA" />
         <include name="IDR_FEEDBACK_EVENT_HANDLER_JS" file="feedback/js/event_handler.js" flattenhtml="true" type="BINDATA" />
         <include name="IDR_FEEDBACK_FEEDBACK_JS" file="feedback/js/feedback.js" flattenhtml="true" type="BINDATA" />
         <include name="IDR_FEEDBACK_SYSINFO_JS" file="feedback/js/sys_info.js" flattenhtml="true" type="BINDATA" />
diff --git a/chrome/browser/resources/feedback/html/default.html b/chrome/browser/resources/feedback/html/default.html
index 6caf36b..d46201a 100644
--- a/chrome/browser/resources/feedback/html/default.html
+++ b/chrome/browser/resources/feedback/html/default.html
@@ -10,7 +10,7 @@
 <script src="chrome://resources/js/load_time_data.js"></script>
 <script src="chrome://resources/js/i18n_template_no_process.js"></script>
 <script src="chrome://resources/js/util.js"></script>
-<script src="../js/data.js"></script>
+<script src="../js/feedback_util.js"></script>
 <script src="../js/take_screenshot.js"></script>
 <script src="../js/topbar_handlers.js"></script>
 <script src="../js/feedback.js"></script>
diff --git a/chrome/browser/resources/feedback/js/event_handler.js b/chrome/browser/resources/feedback/js/event_handler.js
index bea05c2..68e3af5 100644
--- a/chrome/browser/resources/feedback/js/event_handler.js
+++ b/chrome/browser/resources/feedback/js/event_handler.js
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-// <include src="data.js">
+// <include src="feedback_util.js">
 
 /**
  * @type {number}
@@ -187,7 +187,7 @@
                       chrome.feedbackPrivate.LandingPageType.NORMAL ?
                   FEEDBACK_LANDING_PAGE :
                   FEEDBACK_LANDING_PAGE_TECHSTOP;
-              window.open(landingPage, '_blank');
+              openUrlInAppWindow(landingPage);
             }
           } else {
             console.log(
diff --git a/chrome/browser/resources/feedback/js/feedback.js b/chrome/browser/resources/feedback/js/feedback.js
index e0bfd6c..550102b 100644
--- a/chrome/browser/resources/feedback/js/feedback.js
+++ b/chrome/browser/resources/feedback/js/feedback.js
@@ -46,11 +46,6 @@
  */
 var SYSINFO_WINDOW_ID = 'sysinfo_window';
 
-/** @type {string}
- * @const
- */
-var STATS_WINDOW_ID = 'stats_window';
-
 /**
  * SRT Prompt Result defined in feedback_private.idl.
  * @enum {string}
@@ -158,19 +153,6 @@
 }
 
 /**
- * Creates a closure that creates or shows a window with the given url.
- * @param {string} windowId A string with the ID of the window we are opening.
- * @param {string} url The destination URL of the new window.
- * @return {function()} A function to be called to open the window.
- */
-function windowOpener(windowId, url) {
-  return function(e) {
-    e.preventDefault();
-    chrome.app.window.create(url, {id: windowId});
-  };
-}
-
-/**
  * Sets up the event handlers for the given |anchorElement|.
  * @param {HTMLElement} anchorElement The <a> html element.
  * @param {string} url The destination URL for the link.
@@ -178,7 +160,7 @@
 function setupLinkHandlers(anchorElement, url) {
   anchorElement.onclick = function(e) {
     e.preventDefault();
-    window.open(url, '_blank');
+    openUrlInAppWindow(url);
   };
 
   anchorElement.onauxclick = function(e) {
@@ -378,7 +360,7 @@
 
         $('srt-accept-button').onclick = function() {
           chrome.feedbackPrivate.logSrtPromptResult(SrtPromptResult.ACCEPTED);
-          window.open(SRT_DOWNLOAD_PAGE, '_blank');
+          openUrlInAppWindow(SRT_DOWNLOAD_PAGE);
           scheduleWindowClose();
         };
 
@@ -528,12 +510,7 @@
         var histogramUrlElement = $('histograms-url');
         if (histogramUrlElement) {
           // Opens a new window showing the histogram metrics.
-          histogramUrlElement.onclick =
-              windowOpener(STATS_WINDOW_ID, 'chrome://histograms');
-
-          histogramUrlElement.onauxclick = function(e) {
-            e.preventDefault();
-          };
+          setupLinkHandlers(histogramUrlElement, 'chrome://histograms');
         }
 
         var legalHelpPageUrlElement = $('legal-help-page-url');
diff --git a/chrome/browser/resources/feedback/js/data.js b/chrome/browser/resources/feedback/js/feedback_util.js
similarity index 69%
rename from chrome/browser/resources/feedback/js/data.js
rename to chrome/browser/resources/feedback/js/feedback_util.js
index ad698083..572f88e4 100644
--- a/chrome/browser/resources/feedback/js/data.js
+++ b/chrome/browser/resources/feedback/js/feedback_util.js
@@ -28,3 +28,18 @@
  * @const
  */
 var FEEDBACK_TERM_OF_SERVICE_URL = 'https://policies.google.com/terms';
+
+/**
+ * Opens the supplied url in an app window. It uses the url as the window ID.
+ * @param {string} url The destination URL for the link.
+ */
+function openUrlInAppWindow(url) {
+  chrome.app.window.create(url, {
+    frame: 'chrome',
+    id: url,
+    width: 640,
+    height: 400,
+    hidden: false,
+    resizable: true
+  });
+}
diff --git a/chrome/browser/resources/safe_browsing/OWNERS b/chrome/browser/resources/safe_browsing/OWNERS
index a1b4d4d..bbaf9c8 100644
--- a/chrome/browser/resources/safe_browsing/OWNERS
+++ b/chrome/browser/resources/safe_browsing/OWNERS
@@ -1,4 +1,6 @@
 asanka@chromium.org
-jialiul@chromium.org
+drubery@chromium.org
 nparker@chromium.org
 vakh@chromium.org
+
+# COMPONENT: Services>Safebrowsing
diff --git a/chrome/browser/safe_browsing/OWNERS b/chrome/browser/safe_browsing/OWNERS
index 174907a0..f7647c14 100644
--- a/chrome/browser/safe_browsing/OWNERS
+++ b/chrome/browser/safe_browsing/OWNERS
@@ -1,6 +1,7 @@
-jialiul@chromium.org
 nparker@chromium.org
 vakh@chromium.org
 
 # For interstitial-related changes:
 per-file *safe_browsing_blocking_page*=felt@chromium.org
+
+# COMPONENT: Services>Safebrowsing
diff --git a/chrome/browser/safe_browsing/client_side_detection_service.cc b/chrome/browser/safe_browsing/client_side_detection_service.cc
index d7a05441b2..dc0c5eb 100644
--- a/chrome/browser/safe_browsing/client_side_detection_service.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_service.cc
@@ -260,8 +260,8 @@
   }
   ChromeService::GetInstance()->connector()->BindInterface(
       service_manager::Identity(chrome::mojom::kRendererServiceName,
-                                process->GetChildIdentity().user_id(),
-                                process->GetChildIdentity().instance()),
+                                process->GetChildIdentity().instance_group(),
+                                process->GetChildIdentity().instance_id()),
       &phishing);
   phishing->SetPhishingModel(model);
 }
diff --git a/chrome/browser/signin/signin_error_notifier_ash.cc b/chrome/browser/signin/signin_error_notifier_ash.cc
index 9c96931f..f3b76dd3 100644
--- a/chrome/browser/signin/signin_error_notifier_ash.cc
+++ b/chrome/browser/signin/signin_error_notifier_ash.cc
@@ -87,7 +87,7 @@
       l10n_util::GetStringUTF16(IDS_SYNC_RELOGIN_LINK_LABEL)));
 
   message_center::NotifierId notifier_id(
-      message_center::NotifierId::SYSTEM_COMPONENT,
+      message_center::NotifierType::SYSTEM_COMPONENT,
       kProfileSigninNotificationId);
 
   // Set |profile_id| for multi-user notification blocker.
diff --git a/chrome/browser/spellchecker/spell_check_host_chrome_impl.cc b/chrome/browser/spellchecker/spell_check_host_chrome_impl.cc
index ea6619d7..f93d8c5 100644
--- a/chrome/browser/spellchecker/spell_check_host_chrome_impl.cc
+++ b/chrome/browser/spellchecker/spell_check_host_chrome_impl.cc
@@ -82,7 +82,7 @@
   // service, calls CallSpellingServiceDone.
   content::BrowserContext* context =
       content::BrowserContext::GetBrowserContextForServiceUserId(
-          renderer_identity_.user_id());
+          renderer_identity_.instance_group());
   client_.RequestTextCheck(
       context, SpellingServiceClient::SPELLCHECK, text,
       base::BindOnce(&SpellCheckHostChromeImpl::CallSpellingServiceDone,
diff --git a/chrome/browser/spellchecker/spell_check_host_chrome_impl_mac.cc b/chrome/browser/spellchecker/spell_check_host_chrome_impl_mac.cc
index db9eca3..85ab6e6 100644
--- a/chrome/browser/spellchecker/spell_check_host_chrome_impl_mac.cc
+++ b/chrome/browser/spellchecker/spell_check_host_chrome_impl_mac.cc
@@ -138,7 +138,7 @@
     const service_manager::Identity& renderer_identity) {
   BrowserContext* context =
       content::BrowserContext::GetBrowserContextForServiceUserId(
-          renderer_identity.user_id());
+          renderer_identity.instance_group());
 
   // |this| may be gone at callback invocation if the owner has been removed.
   client->RequestTextCheck(
diff --git a/chrome/browser/spellchecker/spellcheck_factory.cc b/chrome/browser/spellchecker/spellcheck_factory.cc
index 64b5243..a6f438e 100644
--- a/chrome/browser/spellchecker/spellcheck_factory.cc
+++ b/chrome/browser/spellchecker/spellcheck_factory.cc
@@ -29,7 +29,7 @@
     const service_manager::Identity& renderer_identity) {
   content::BrowserContext* context =
       content::BrowserContext::GetBrowserContextForServiceUserId(
-          renderer_identity.user_id());
+          renderer_identity.instance_group());
   if (!context)
     return nullptr;
   return GetForContext(context);
diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc
index e80f87b..6c30f6c 100644
--- a/chrome/browser/spellchecker/spellcheck_service.cc
+++ b/chrome/browser/spellchecker/spellcheck_service.cc
@@ -183,7 +183,7 @@
 
   content::BrowserContext* context =
       content::BrowserContext::GetBrowserContextForServiceUserId(
-          renderer_identity.user_id());
+          renderer_identity.instance_group());
   if (SpellcheckServiceFactory::GetForContext(context) != this)
     return;
 
@@ -208,8 +208,8 @@
   spellcheck::mojom::SpellCheckerPtr spellchecker;
   ChromeService::GetInstance()->connector()->BindInterface(
       service_manager::Identity(chrome::mojom::kRendererServiceName,
-                                renderer_identity.user_id(),
-                                renderer_identity.instance()),
+                                renderer_identity.instance_group(),
+                                renderer_identity.instance_id()),
       &spellchecker);
   spellchecker->Initialize(std::move(dictionaries), custom_words, enable);
 }
@@ -298,8 +298,8 @@
     spellcheck::mojom::SpellCheckerPtr spellchecker;
     ChromeService::GetInstance()->connector()->BindInterface(
         service_manager::Identity(chrome::mojom::kRendererServiceName,
-                                  renderer_identity.user_id(),
-                                  renderer_identity.instance()),
+                                  renderer_identity.instance_group(),
+                                  renderer_identity.instance_id()),
         &spellchecker);
     spellchecker->CustomDictionaryChanged(additions, deletions);
   }
diff --git a/chrome/browser/spellchecker/spellcheck_service_browsertest.cc b/chrome/browser/spellchecker/spellcheck_service_browsertest.cc
index 6e14c7d..d2030083 100644
--- a/chrome/browser/spellchecker/spellcheck_service_browsertest.cc
+++ b/chrome/browser/spellchecker/spellcheck_service_browsertest.cc
@@ -89,8 +89,8 @@
         ChromeService::GetInstance()->connector());
     test_api.OverrideBinderForTesting(
         service_manager::Identity(chrome::mojom::kRendererServiceName,
-                                  renderer_identity.user_id(),
-                                  renderer_identity.instance()),
+                                  renderer_identity.instance_group(),
+                                  renderer_identity.instance_id()),
         spellcheck::mojom::SpellChecker::Name_,
         base::BindRepeating(&SpellcheckServiceBrowserTest::Bind,
                             base::Unretained(this)));
diff --git a/chrome/browser/spellchecker/test/spellcheck_content_browser_client.cc b/chrome/browser/spellchecker/test/spellcheck_content_browser_client.cc
index d0694bb..46ea07d9 100644
--- a/chrome/browser/spellchecker/test/spellcheck_content_browser_client.cc
+++ b/chrome/browser/spellchecker/test/spellcheck_content_browser_client.cc
@@ -54,8 +54,9 @@
     spellcheck::mojom::SpellCheckPanelHostRequest request,
     const service_manager::BindSourceInfo& source_info) {
   service_manager::Identity renderer_identity(
-      content::mojom::kRendererServiceName, source_info.identity.user_id(),
-      source_info.identity.instance());
+      content::mojom::kRendererServiceName,
+      source_info.identity.instance_group(),
+      source_info.identity.instance_id());
   content::RenderProcessHost* render_process_host =
       content::RenderProcessHost::FromRendererIdentity(renderer_identity);
   auto spell_check_panel_host =
diff --git a/chrome/browser/sync/sync_error_notifier_ash.cc b/chrome/browser/sync/sync_error_notifier_ash.cc
index b8dfb94..e89fc06 100644
--- a/chrome/browser/sync/sync_error_notifier_ash.cc
+++ b/chrome/browser/sync/sync_error_notifier_ash.cc
@@ -104,7 +104,8 @@
          sync_ui_util::ShouldShowPassphraseError(sync_service_));
 
   message_center::NotifierId notifier_id(
-      message_center::NotifierId::SYSTEM_COMPONENT, kProfileSyncNotificationId);
+      message_center::NotifierType::SYSTEM_COMPONENT,
+      kProfileSyncNotificationId);
 
   // Set |profile_id| for multi-user notification blocker.
   notifier_id.profile_id =
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
index 29729b464..982a57f39 100644
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -1999,8 +1999,6 @@
       "cocoa/history_menu_cocoa_controller.mm",
       "cocoa/history_overlay_controller.h",
       "cocoa/history_overlay_controller.mm",
-      "cocoa/javascript_app_modal_dialog_cocoa.h",
-      "cocoa/javascript_app_modal_dialog_cocoa.mm",
       "cocoa/key_equivalent_constants.h",
       "cocoa/key_equivalent_constants.mm",
       "cocoa/keystone_infobar_delegate.h",
@@ -2062,6 +2060,7 @@
       "cocoa/window_size_autosaver.mm",
       "views/apps/chrome_app_window_client_views_mac.mm",
       "views/certificate_viewer_mac_views.mm",
+      "views/chrome_javascript_native_dialog_factory_views.cc",
       "views/dropdown_bar_host_mac.mm",
       "views/frame/browser_frame_mac.h",
       "views/frame/browser_frame_mac.mm",
diff --git a/chrome/browser/ui/ash/assistant/assistant_setup.cc b/chrome/browser/ui/ash/assistant/assistant_setup.cc
index 5714e60..37789e3 100644
--- a/chrome/browser/ui/ash/assistant/assistant_setup.cc
+++ b/chrome/browser/ui/ash/assistant/assistant_setup.cc
@@ -133,7 +133,7 @@
   auto notification = message_center::Notification::CreateSystemNotification(
       message_center::NOTIFICATION_TYPE_SIMPLE, kHotwordNotificationId, title,
       base::string16(), display_source, GURL(),
-      message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT,
+      message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
                                  kNotifierAssistant),
       {}, base::MakeRefCounted<AssistantHotwordNotificationDelegate>(profile),
       ash::kNotificationAssistantIcon,
diff --git a/chrome/browser/ui/ash/chrome_screenshot_grabber.cc b/chrome/browser/ui/ash/chrome_screenshot_grabber.cc
index c548ba8..644ceab 100644
--- a/chrome/browser/ui/ash/chrome_screenshot_grabber.cc
+++ b/chrome/browser/ui/ash/chrome_screenshot_grabber.cc
@@ -695,7 +695,7 @@
           l10n_util::GetStringUTF16(IDS_SCREENSHOT_NOTIFICATION_NOTIFIER_NAME),
           GURL(kNotificationOriginUrl),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT,
+              message_center::NotifierType::SYSTEM_COMPONENT,
               kNotifierScreenshot),
           optional_field,
           new ScreenshotGrabberNotificationDelegate(success, GetProfile(),
diff --git a/chrome/browser/ui/ash/network/data_promo_notification.cc b/chrome/browser/ui/ash/network/data_promo_notification.cc
index 24ae44c..dfee058 100644
--- a/chrome/browser/ui/ash/network/data_promo_notification.cc
+++ b/chrome/browser/ui/ash/network/data_promo_notification.cc
@@ -256,7 +256,8 @@
           l10n_util::GetStringUTF16(IDS_MOBILE_DATA_NOTIFICATION_TITLE),
           message, base::string16() /* display_source */, GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT, kNotifierDataPromo),
+              message_center::NotifierType::SYSTEM_COMPONENT,
+              kNotifierDataPromo),
           message_center::RichNotificationData(),
           new message_center::HandleNotificationClickDelegate(base::Bind(
               &NotificationClicked, default_network->guid(), info_url)),
@@ -294,7 +295,8 @@
           message_center::NOTIFICATION_TYPE_SIMPLE, kDataSaverNotificationId,
           title, message, base::string16() /* display_source */, GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT, kNotifierDataSaver),
+              message_center::NotifierType::SYSTEM_COMPONENT,
+              kNotifierDataSaver),
           message_center::RichNotificationData(),
           new message_center::HandleNotificationClickDelegate(
               base::Bind(&NotificationClicked, "", kDataSaverExtensionUrl)),
diff --git a/chrome/browser/ui/ash/network/network_portal_notification_controller.cc b/chrome/browser/ui/ash/network/network_portal_notification_controller.cc
index d740b245..1bc9938d 100644
--- a/chrome/browser/ui/ash/network/network_portal_notification_controller.cc
+++ b/chrome/browser/ui/ash/network/network_portal_notification_controller.cc
@@ -334,7 +334,7 @@
       base::MakeRefCounted<NetworkPortalNotificationControllerDelegate>(
           std::string(), network->guid(), weak_factory_.GetWeakPtr());
   message_center::NotifierId notifier_id(
-      message_center::NotifierId::SYSTEM_COMPONENT,
+      message_center::NotifierType::SYSTEM_COMPONENT,
       kNotifierNetworkPortalDetector);
   bool is_wifi = NetworkTypePattern::WiFi().MatchesType(network->type());
   std::unique_ptr<message_center::Notification> notification =
@@ -365,7 +365,7 @@
       base::MakeRefCounted<NetworkPortalNotificationControllerDelegate>(
           extension->id(), network->guid(), weak_factory_.GetWeakPtr());
   message_center::NotifierId notifier_id(
-      message_center::NotifierId::SYSTEM_COMPONENT,
+      message_center::NotifierType::SYSTEM_COMPONENT,
       kNotifierNetworkPortalDetector);
 
   extensions::NetworkingConfigService::AuthenticationResult
diff --git a/chrome/browser/ui/ash/network/network_state_notifier.cc b/chrome/browser/ui/ash/network/network_state_notifier.cc
index 85961f8..3db5170c 100644
--- a/chrome/browser/ui/ash/network/network_state_notifier.cc
+++ b/chrome/browser/ui/ash/network/network_state_notifier.cc
@@ -82,7 +82,7 @@
           message_center::NOTIFICATION_TYPE_SIMPLE, notification_id, title,
           message, base::string16() /* display_source */, GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT,
+              message_center::NotifierType::SYSTEM_COMPONENT,
               kNotifierNetworkError),
           message_center::RichNotificationData(),
           new message_center::HandleNotificationClickDelegate(callback),
@@ -293,7 +293,7 @@
                                      base::UTF8ToUTF16((cellular->name()))),
           base::string16() /* display_source */, GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT, kNotifierNetwork),
+              message_center::NotifierType::SYSTEM_COMPONENT, kNotifierNetwork),
           {},
           new message_center::HandleNotificationClickDelegate(
               base::Bind(&NetworkStateNotifier::ShowNetworkSettings,
@@ -339,7 +339,7 @@
                                      base::UTF8ToUTF16((cellular->name()))),
           base::string16() /* display_source */, GURL(),
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT,
+              message_center::NotifierType::SYSTEM_COMPONENT,
               kNotifierNetworkError),
           {},
           new message_center::HandleNotificationClickDelegate(
diff --git a/chrome/browser/ui/ash/network/tether_notification_presenter.cc b/chrome/browser/ui/ash/network/tether_notification_presenter.cc
index 7153fcf..2a3369e 100644
--- a/chrome/browser/ui/ash/network/tether_notification_presenter.cc
+++ b/chrome/browser/ui/ash/network/tether_notification_presenter.cc
@@ -214,9 +214,8 @@
       l10n_util::GetStringUTF16(
           IDS_TETHER_NOTIFICATION_CONNECTION_FAILED_MESSAGE),
       base::string16() /* display_source */, GURL() /* origin_url */,
-      message_center::NotifierId(
-          message_center::NotifierId::NotifierType::SYSTEM_COMPONENT,
-          kNotifierTether),
+      message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
+                                 kNotifierTether),
       {} /* rich_notification_data */,
       new message_center::HandleNotificationClickDelegate(base::BindRepeating(
           &TetherNotificationPresenter::OnNotificationClicked,
@@ -296,9 +295,8 @@
       message_center::NotificationType::NOTIFICATION_TYPE_SIMPLE, id, title,
       message, gfx::Image() /* image */, base::string16() /* display_source */,
       GURL() /* origin_url */,
-      message_center::NotifierId(
-          message_center::NotifierId::NotifierType::SYSTEM_COMPONENT,
-          kNotifierTether),
+      message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
+                                 kNotifierTether),
       rich_notification_data,
       new TetherNotificationDelegate(
           base::BindRepeating(
diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.cc b/chrome/browser/ui/autofill/chrome_autofill_client.cc
index 2dab217..8054f32 100644
--- a/chrome/browser/ui/autofill/chrome_autofill_client.cc
+++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc
@@ -265,7 +265,7 @@
               false, card, std::unique_ptr<base::DictionaryValue>(nullptr),
               GetStrikeDatabase(),
               /*upload_save_card_callback=*/
-              base::OnceCallback<void(const base::string16&)>(),
+              UserAcceptedUploadCallback(),
               /*local_save_card_callback=*/std::move(callback), GetPrefs())));
 #else
   // Do lazy initialization of SaveCardBubbleControllerImpl.
@@ -281,8 +281,9 @@
     const CreditCard& card,
     std::unique_ptr<base::DictionaryValue> legal_message,
     bool should_request_name_from_user,
+    bool should_request_expiration_date_from_user,
     bool show_prompt,
-    base::OnceCallback<void(const base::string16&)> callback) {
+    UserAcceptedUploadCallback callback) {
 #if defined(OS_ANDROID)
   DCHECK(show_prompt);
   std::unique_ptr<AutofillSaveCardInfoBarDelegateMobile>
@@ -302,8 +303,9 @@
   autofill::SaveCardBubbleControllerImpl* controller =
       autofill::SaveCardBubbleControllerImpl::FromWebContents(web_contents());
   controller->OfferUploadSave(card, std::move(legal_message),
-                              should_request_name_from_user, show_prompt,
-                              std::move(callback));
+                              should_request_name_from_user,
+                              should_request_expiration_date_from_user,
+                              show_prompt, std::move(callback));
 #endif
 }
 
@@ -448,7 +450,7 @@
   content::NavigationEntry* navigation_entry =
       web_contents()->GetController().GetLastCommittedEntry();
   if (!navigation_entry)
-     return false;
+    return false;
 
   ssl_status = navigation_entry->GetSSL();
   // Note: If changing the implementation below, also change
diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.h b/chrome/browser/ui/autofill/chrome_autofill_client.h
index c20d6b9a..54fedf12 100644
--- a/chrome/browser/ui/autofill/chrome_autofill_client.h
+++ b/chrome/browser/ui/autofill/chrome_autofill_client.h
@@ -79,8 +79,9 @@
       const CreditCard& card,
       std::unique_ptr<base::DictionaryValue> legal_message,
       bool should_request_name_from_user,
+      bool should_request_expiration_date_from_user,
       bool show_prompt,
-      base::OnceCallback<void(const base::string16&)> callback) override;
+      UserAcceptedUploadCallback callback) override;
   void ConfirmCreditCardFillAssist(const CreditCard& card,
                                    const base::Closure& callback) override;
   void LoadRiskData(
diff --git a/chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc b/chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc
index 29190944..f53a4d8 100644
--- a/chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc
+++ b/chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc
@@ -97,8 +97,9 @@
     const CreditCard& card,
     std::unique_ptr<base::DictionaryValue> legal_message,
     bool should_request_name_from_user,
+    bool should_request_expiration_date_from_user,
     bool show_bubble,
-    base::OnceCallback<void(const base::string16&)> save_card_callback) {
+    AutofillClient::UserAcceptedUploadCallback save_card_callback) {
   // Don't show the bubble if it's already visible.
   if (save_card_bubble_view_)
     return;
@@ -110,6 +111,8 @@
   is_upload_save_ = true;
   is_reshow_ = false;
   should_request_name_from_user_ = should_request_name_from_user;
+  should_request_expiration_date_from_user_ =
+      should_request_expiration_date_from_user;
   show_bubble_ = show_bubble;
   if (show_bubble_) {
     // Can't move this into the other "if (show_bubble_)" below because an
@@ -262,6 +265,10 @@
   return should_request_name_from_user_;
 }
 
+bool SaveCardBubbleControllerImpl::ShouldRequestExpirationDateFromUser() const {
+  return should_request_expiration_date_from_user_;
+}
+
 bool SaveCardBubbleControllerImpl::ShouldShowSignInPromo() const {
   if (is_upload_save_ || !base::FeatureList::IsEnabled(
                              features::kAutofillSaveCardSignInAfterLocalSave))
@@ -293,7 +300,7 @@
 }
 
 void SaveCardBubbleControllerImpl::OnSaveButton(
-    const base::string16& cardholder_name) {
+    const AutofillClient::UserProvidedCardDetails& user_provided_card_details) {
   save_card_bubble_view_ = nullptr;
 
   switch (current_bubble_type_) {
@@ -301,18 +308,19 @@
       DCHECK(!upload_save_card_callback_.is_null());
 
       base::string16 name_provided_by_user;
-      if (!cardholder_name.empty()) {
+      if (!user_provided_card_details.cardholder_name.empty()) {
         // Log whether the name was changed by the user or simply accepted
         // without edits.
         AutofillMetrics::LogSaveCardCardholderNameWasEdited(
-            cardholder_name != base::UTF8ToUTF16(account_info_.full_name));
+            user_provided_card_details.cardholder_name !=
+            base::UTF8ToUTF16(account_info_.full_name));
         // Trim the cardholder name provided by the user and send it in the
         // callback so it can be included in the final request.
         DCHECK(ShouldRequestNameFromUser());
-        base::TrimWhitespace(cardholder_name, base::TRIM_ALL,
-                             &name_provided_by_user);
+        base::TrimWhitespace(user_provided_card_details.cardholder_name,
+                             base::TRIM_ALL, &name_provided_by_user);
       }
-      std::move(upload_save_card_callback_).Run(name_provided_by_user);
+      std::move(upload_save_card_callback_).Run(user_provided_card_details);
       break;
     }
     case BubbleType::LOCAL_SAVE:
diff --git a/chrome/browser/ui/autofill/save_card_bubble_controller_impl.h b/chrome/browser/ui/autofill/save_card_bubble_controller_impl.h
index e0bbc08..6aba7a03 100644
--- a/chrome/browser/ui/autofill/save_card_bubble_controller_impl.h
+++ b/chrome/browser/ui/autofill/save_card_bubble_controller_impl.h
@@ -9,6 +9,7 @@
 
 #include "base/macros.h"
 #include "chrome/browser/ui/autofill/save_card_ui.h"
+#include "components/autofill/core/browser/autofill_client.h"
 #include "components/autofill/core/browser/credit_card.h"
 #include "components/autofill/core/browser/ui/save_card_bubble_controller.h"
 #include "components/security_state/core/security_state.h"
@@ -53,14 +54,18 @@
   // |save_card_callback| will be invoked if and when the Save button is
   // pressed. The contents of |legal_message| will be displayed in the bubble.
   // A textfield confirming the cardholder name will appear in the bubble if
-  // |should_request_name_from_user| is true. If |show_bubble| is true, pops up
-  // the offer-to-save bubble; otherwise, only the omnibox icon is displayed.
+  // |should_request_name_from_user| is true. A pair of dropdowns for entering
+  // the expiration date will appear in the bubble if
+  // |should_request_expiration_date_from_user| is true. If |show_bubble| is
+  // true, pops up the offer-to-save bubble; otherwise, only the omnibox icon is
+  // displayed.
   void OfferUploadSave(
       const CreditCard& card,
       std::unique_ptr<base::DictionaryValue> legal_message,
       bool should_request_name_from_user,
+      bool should_request_expiration_from_user,
       bool show_bubble,
-      base::OnceCallback<void(const base::string16&)> save_card_callback);
+      AutofillClient::UserAcceptedUploadCallback save_card_callback);
 
   // Sets up the controller for the sign in promo and shows the bubble.
   // This bubble is only shown after a local save is accepted and if
@@ -88,6 +93,7 @@
   Profile* GetProfile() const override;
   const CreditCard& GetCard() const override;
   bool ShouldRequestNameFromUser() const override;
+  bool ShouldRequestExpirationDateFromUser() const override;
 
   // Returns true only if at least one of the following cases is true:
   // 1) The user is signed out.
@@ -102,8 +108,8 @@
   void OnSyncPromoAccepted(const AccountInfo& account,
                            signin_metrics::AccessPoint access_point,
                            bool is_default_promo_account) override;
-  void OnSaveButton(
-      const base::string16& cardholder_name = base::string16()) override;
+  void OnSaveButton(const AutofillClient::UserProvidedCardDetails&
+                        user_provided_card_details) override;
   void OnCancelButton() override;
   void OnLegalMessageLinkClicked(const GURL& url) override;
   void OnManageCardsClicked() override;
@@ -175,9 +181,10 @@
 
   // Callback to run if user presses Save button in the upload save bubble. Will
   // return the cardholder name provided/confirmed by the user if it was
-  // requested. If both callbacks are null then no bubble is available to show
-  // and the icon is not visible.
-  base::OnceCallback<void(const base::string16&)> upload_save_card_callback_;
+  // requested. Will also return the expiration month and year provided by the
+  // user if the expiration date was requested. If both callbacks are null then
+  // no bubble is available to show and the icon is not visible.
+  AutofillClient::UserAcceptedUploadCallback upload_save_card_callback_;
 
   // Callback to run if user presses Save button in the local save bubble. If
   // both callbacks return true for .is_null() then no bubble is available to
@@ -194,6 +201,10 @@
   // requesting the cardholder name.
   bool should_request_name_from_user_ = false;
 
+  // Whether the upload save version of the UI should surface a pair of
+  // dropdowns requesting the expiration date.
+  bool should_request_expiration_date_from_user_ = false;
+
   // Whether the offer-to-save bubble should be shown or not. If true, behaves
   // normally. If false, the omnibox icon will be displayed when offering credit
   // card save, but the bubble itself will not pop up.
diff --git a/chrome/browser/ui/autofill/save_card_bubble_controller_impl_browsertest.cc b/chrome/browser/ui/autofill/save_card_bubble_controller_impl_browsertest.cc
index 760e7cba..331934852 100644
--- a/chrome/browser/ui/autofill/save_card_bubble_controller_impl_browsertest.cc
+++ b/chrome/browser/ui/autofill/save_card_bubble_controller_impl_browsertest.cc
@@ -87,10 +87,11 @@
                                     base::DoNothing());
         break;
       case BubbleType::UPLOAD_SAVE:
-        controller_->OfferUploadSave(test::GetMaskedServerCard(),
-                                     GetTestLegalMessage(),
-                                     should_request_name_from_user,
-                                     /*show_bubble=*/true, base::DoNothing());
+        controller_->OfferUploadSave(
+            test::GetMaskedServerCard(), GetTestLegalMessage(),
+            should_request_name_from_user,
+            /*should_request_expiration_date_from_user=*/false,
+            /*show_bubble=*/true, base::DoNothing());
         break;
       case BubbleType::SIGN_IN_PROMO:
         controller_->ShowBubbleForSignInPromo();
diff --git a/chrome/browser/ui/autofill/save_card_bubble_controller_impl_unittest.cc b/chrome/browser/ui/autofill/save_card_bubble_controller_impl_unittest.cc
index 94142db7..12159655 100644
--- a/chrome/browser/ui/autofill/save_card_bubble_controller_impl_unittest.cc
+++ b/chrome/browser/ui/autofill/save_card_bubble_controller_impl_unittest.cc
@@ -93,7 +93,8 @@
   }
 
   void SetLegalMessage(const std::string& message_json,
-                       bool should_request_name_from_user = false) {
+                       bool should_request_name_from_user = false,
+                       bool should_request_expiration_date_from_user = false) {
     std::unique_ptr<base::Value> value(base::JSONReader::Read(message_json));
     ASSERT_TRUE(value);
     base::DictionaryValue* dictionary;
@@ -102,6 +103,7 @@
         dictionary->CreateDeepCopy();
     controller()->OfferUploadSave(
         CreditCard(), std::move(legal_message), should_request_name_from_user,
+        should_request_expiration_date_from_user,
         /*show_bubble=*/true, base::BindOnce(&UploadSaveCardCallback));
   }
 
@@ -113,14 +115,16 @@
         /*show_bubble=*/true, base::BindOnce(&LocalSaveCardCallback));
   }
 
-  void ShowUploadBubble(bool should_request_name_from_user = false) {
+  void ShowUploadBubble(bool should_request_name_from_user = false,
+                        bool should_request_expiration_date_from_user = false) {
     SetLegalMessage(
         "{"
         "  \"line\" : [ {"
         "     \"template\": \"This is the entire message.\""
         "  } ]"
         "}",
-        should_request_name_from_user);
+        should_request_name_from_user,
+        should_request_expiration_date_from_user);
   }
 
   void CloseAndReshowBubble() {
@@ -129,7 +133,7 @@
   }
 
   void ClickSaveButton() {
-    controller()->OnSaveButton();
+    controller()->OnSaveButton({});
     if (controller()->CanAnimate())
       controller()->OnAnimationEnded();
   }
@@ -164,7 +168,9 @@
     std::unique_ptr<TestSaveCardBubbleView> save_card_bubble_view_;
   };
 
-  static void UploadSaveCardCallback(const base::string16& cardholder_name) {}
+  static void UploadSaveCardCallback(
+      const AutofillClient::UserProvidedCardDetails&
+          user_provided_card_details) {}
   static void LocalSaveCardCallback() {}
 
   DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleControllerImplTest);
@@ -955,7 +961,7 @@
   base::HistogramTester histogram_tester;
 
   ShowLocalBubble();
-  controller()->OnSaveButton();
+  controller()->OnSaveButton({});
 
   // No other bubbles should have popped up.
   histogram_tester.ExpectTotalCount("Autofill.SignInPromo", 0);
@@ -988,7 +994,7 @@
   base::HistogramTester histogram_tester;
 
   ShowLocalBubble();
-  controller()->OnSaveButton();
+  controller()->OnSaveButton({});
   CloseAndReshowBubble();
 
   // After closing the sign-in promo, clicking the icon should bring
@@ -1006,7 +1012,7 @@
   base::HistogramTester histogram_tester;
 
   ShowLocalBubble();
-  controller()->OnSaveButton();
+  controller()->OnSaveButton({});
   CloseAndReshowBubble();
   CloseAndReshowBubble();
 
@@ -1042,7 +1048,7 @@
   base::HistogramTester histogram_tester;
 
   ShowLocalBubble();
-  controller()->OnSaveButton();
+  controller()->OnSaveButton({});
   CloseAndReshowBubble();
 
   test_clock_.Advance(base::TimeDelta::FromSeconds(6));
@@ -1061,7 +1067,7 @@
   base::HistogramTester histogram_tester;
 
   ShowLocalBubble();
-  controller()->OnSaveButton();
+  controller()->OnSaveButton({});
   CloseAndReshowBubble();
   controller()->OnBubbleClosed();
 
@@ -1080,9 +1086,9 @@
   base::HistogramTester histogram_tester;
 
   ShowLocalBubble();
-  controller()->OnSaveButton();
+  controller()->OnSaveButton({});
   CloseAndReshowBubble();
-  controller()->OnSaveButton();
+  controller()->OnSaveButton({});
 
   EXPECT_THAT(
       histogram_tester.GetAllSamples("Autofill.ManageCardsPrompt.Local"),
@@ -1097,7 +1103,7 @@
   base::HistogramTester histogram_tester;
 
   ShowLocalBubble();
-  controller()->OnSaveButton();
+  controller()->OnSaveButton({});
   CloseAndReshowBubble();
   controller()->OnManageCardsClicked();
 
@@ -1128,7 +1134,7 @@
   base::HistogramTester histogram_tester;
 
   ShowUploadBubble();
-  controller()->OnSaveButton();
+  controller()->OnSaveButton({});
 
   // No other bubbles should have popped up.
   histogram_tester.ExpectTotalCount("Autofill.SignInPromo", 0);
@@ -1142,7 +1148,7 @@
   base::HistogramTester histogram_tester;
 
   ShowUploadBubble();
-  controller()->OnSaveButton();
+  controller()->OnSaveButton({});
   controller()->ShowBubbleForManageCardsForTesting(
       autofill::test::GetCreditCard());
 
@@ -1152,4 +1158,18 @@
   histogram_tester.ExpectTotalCount("Autofill.ManageCardsPrompt.Upload", 1);
 }
 
+TEST_F(SaveCardBubbleControllerImplTest,
+       PropagateShouldRequestExpirationDateFromUserWhenFalse) {
+  ShowUploadBubble(/*should_request_name_from_user=*/true,
+                   /*should_request_expiration_date_from_user=*/false);
+  EXPECT_FALSE(controller()->ShouldRequestExpirationDateFromUser());
+}
+
+TEST_F(SaveCardBubbleControllerImplTest,
+       PropagateShouldRequestExpirationDateFromUserWhenTrue) {
+  ShowUploadBubble(/*should_request_name_from_user=*/true,
+                   /*should_request_expiration_date_from_user=*/true);
+  EXPECT_TRUE(controller()->ShouldRequestExpirationDateFromUser());
+}
+
 }  // namespace autofill
diff --git a/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.cc b/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.cc
index 68d864b..de4cf8b0 100644
--- a/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.cc
+++ b/chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.cc
@@ -80,7 +80,7 @@
           IDR_PRODUCT_LOGO_128),
       l10n_util::GetStringUTF16(IDS_QUIT_WITH_APPS_NOTIFICATION_DISPLAY_SOURCE),
       GURL(kQuitWithAppsOriginUrl),
-      message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT,
+      message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
                                  kQuitWithAppsNotificationID),
       rich_notification_data, this));
 }
diff --git a/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.h b/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.h
deleted file mode 100644
index 04a258a..0000000
--- a/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) 2012 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.
-
-#ifndef CHROME_BROWSER_UI_COCOA_JAVASCRIPT_APP_MODAL_DIALOG_COCOA_H_
-#define CHROME_BROWSER_UI_COCOA_JAVASCRIPT_APP_MODAL_DIALOG_COCOA_H_
-
-#include <memory>
-
-#include "base/logging.h"
-#include "base/mac/scoped_nsobject.h"
-#include "base/macros.h"
-#include "components/app_modal/native_app_modal_dialog.h"
-
-class PopunderPreventer;
-
-namespace app_modal {
-class JavaScriptAppModalDialog;
-}
-
-#if __OBJC__
-@class NSAlert;
-@class JavaScriptAppModalDialogHelper;
-#else
-class NSAlert;
-class JavaScriptAppModalDialogHelper;
-#endif
-
-class JavaScriptAppModalDialogCocoa : public app_modal::NativeAppModalDialog {
- public:
-  explicit JavaScriptAppModalDialogCocoa(
-      app_modal::JavaScriptAppModalDialog* dialog);
-  ~JavaScriptAppModalDialogCocoa() override;
-
-  // Overridden from NativeAppModalDialog:
-  int GetAppModalDialogButtons() const override;
-  void ShowAppModalDialog() override;
-  void ActivateAppModalDialog() override;
-  void CloseAppModalDialog() override;
-  void AcceptAppModalDialog() override;
-  void CancelAppModalDialog() override;
-  bool IsShowing() const override;
-
-  app_modal::JavaScriptAppModalDialog* dialog() const {
-    return dialog_.get();
-  }
-
- private:
-  // Returns the NSAlert associated with the modal dialog.
-  NSAlert* GetAlert() const;
-
-  std::unique_ptr<app_modal::JavaScriptAppModalDialog> dialog_;
-  std::unique_ptr<PopunderPreventer> popunder_preventer_;
-
-  // Created in the constructor and destroyed in the destructor.
-  base::scoped_nsobject<JavaScriptAppModalDialogHelper> helper_;
-
-  bool is_showing_;
-
-  DISALLOW_COPY_AND_ASSIGN(JavaScriptAppModalDialogCocoa);
-};
-
-#endif  // CHROME_BROWSER_UI_COCOA_JAVASCRIPT_APP_MODAL_DIALOG_COCOA_H_
diff --git a/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm b/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm
deleted file mode 100644
index 2a520cb6..0000000
--- a/chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.mm
+++ /dev/null
@@ -1,477 +0,0 @@
-// Copyright (c) 2012 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 "chrome/browser/ui/cocoa/javascript_app_modal_dialog_cocoa.h"
-
-#import <Cocoa/Cocoa.h>
-#include <stddef.h>
-
-#include "base/i18n/rtl.h"
-#include "base/logging.h"
-#import "base/mac/foundation_util.h"
-#include "base/macros.h"
-#include "base/memory/ptr_util.h"
-#include "base/strings/sys_string_conversions.h"
-#import "chrome/browser/chrome_browser_application_mac.h"
-#include "chrome/browser/ui/blocked_content/popunder_preventer.h"
-#include "chrome/browser/ui/javascript_dialogs/chrome_javascript_native_dialog_factory.h"
-#include "components/app_modal/javascript_app_modal_dialog.h"
-#include "components/app_modal/javascript_dialog_manager.h"
-#include "components/app_modal/javascript_native_dialog_factory.h"
-#include "components/strings/grit/components_strings.h"
-#include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_delegate.h"
-#include "ui/base/l10n/l10n_util_mac.h"
-#include "ui/base/ui_base_types.h"
-#include "ui/gfx/text_elider.h"
-#include "ui/strings/grit/ui_strings.h"
-
-namespace {
-
-const int kSlotsPerLine = 50;
-const int kMessageTextMaxSlots = 2000;
-
-}  // namespace
-
-// Helper object that receives the notification that the dialog/sheet is
-// going away. Is responsible for cleaning itself up.
-@interface JavaScriptAppModalDialogHelper : NSObject<NSAlertDelegate> {
- @private
-  base::scoped_nsobject<NSAlert> alert_;
-  JavaScriptAppModalDialogCocoa* nativeDialog_;  // Weak.
-  base::scoped_nsobject<NSTextField> textField_;
-  BOOL alertShown_;
-}
-
-// Creates an NSAlert if one does not already exist. Otherwise returns the
-// existing NSAlert.
-- (NSAlert*)alert;
-- (void)addTextFieldWithPrompt:(NSString*)prompt;
-
-// Presents an AppKit blocking dialog.
-- (void)showAlert;
-
-// Selects the first button of the alert, which should accept it.
-- (void)acceptAlert;
-
-// Selects the second button of the alert, which should cancel it.
-- (void)cancelAlert;
-
-// Closes the window, and the alert along with it.
-- (void)closeWindow;
-
-// Designated initializer.
-- (instancetype)initWithNativeDialog:(JavaScriptAppModalDialogCocoa*)dialog;
-
-@end
-
-@implementation JavaScriptAppModalDialogHelper
-
-- (instancetype)init {
-  NOTREACHED();
-  return nil;
-}
-
-- (instancetype)initWithNativeDialog:(JavaScriptAppModalDialogCocoa*)dialog {
-  DCHECK(dialog);
-  self = [super init];
-  if (self)
-    nativeDialog_ = dialog;
-  return self;
-}
-
-- (NSAlert*)alert {
-  if (!alert_) {
-    alert_.reset([[NSAlert alloc] init]);
-    if (!nativeDialog_->dialog()->is_before_unload_dialog()) {
-      // Set a blank icon for dialogs with text provided by the page.
-      // "onbeforeunload" dialogs don't have text provided by the page, so it's
-      // OK to use the app icon.
-      NSImage* image =
-          [[[NSImage alloc] initWithSize:NSMakeSize(1, 1)] autorelease];
-      [alert_ setIcon:image];
-    }
-  }
-  return alert_;
-}
-
-- (void)addTextFieldWithPrompt:(NSString*)prompt {
-  DCHECK(!textField_);
-  textField_.reset(
-      [[NSTextField alloc] initWithFrame:NSMakeRect(0, 0, 300, 22)]);
-  [[textField_ cell] setLineBreakMode:NSLineBreakByTruncatingTail];
-  [[self alert] setAccessoryView:textField_];
-  [[alert_ window] setInitialFirstResponder:textField_];
-
-  [textField_ setStringValue:prompt];
-}
-
-// |contextInfo| is the JavaScriptAppModalDialogCocoa that owns us.
-- (void)alertDidEnd:(NSAlert*)alert
-         returnCode:(int)returnCode
-        contextInfo:(void*)contextInfo {
-  switch (returnCode) {
-    case NSAlertFirstButtonReturn:  {  // OK
-      [self sendAcceptToNativeDialog];
-      break;
-    }
-    case NSAlertSecondButtonReturn:  {  // Cancel
-      // If the user wants to stay on this page, stop quitting (if a quit is in
-      // progress).
-      [self sendCancelToNativeDialog];
-      break;
-    }
-    case NSRunStoppedResponse: {  // Window was closed underneath us
-      // Need to call OnClose() because there is some cleanup that needs
-      // to be done.  It won't call back to the javascript since the
-      // JavaScriptAppModalDialog knows that the WebContents was destroyed.
-      [self sendCloseToNativeDialog];
-      break;
-    }
-    default:  {
-      NOTREACHED();
-    }
-  }
-}
-
-- (void)showAlert {
-  DCHECK(nativeDialog_);
-  DCHECK(!alertShown_);
-  alertShown_ = YES;
-  NSAlert* alert = [self alert];
-
-  [alert layout];
-  [[alert window] recalculateKeyViewLoop];
-
-  [alert beginSheetModalForWindow:nil  // nil here makes it app-modal
-                    modalDelegate:self
-                   didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:)
-                      contextInfo:NULL];
-}
-
-- (void)acceptAlert {
-  DCHECK(nativeDialog_);
-  if (!alertShown_) {
-    [self sendAcceptToNativeDialog];
-    return;
-  }
-  NSButton* first = [[[self alert] buttons] objectAtIndex:0];
-  [first performClick:nil];
-}
-
-- (void)cancelAlert {
-  DCHECK(nativeDialog_);
-  if (!alertShown_) {
-    [self sendCancelToNativeDialog];
-    return;
-  }
-  DCHECK_GE([[[self alert] buttons] count], 2U);
-  NSButton* second = [[[self alert] buttons] objectAtIndex:1];
-  [second performClick:nil];
-}
-
-- (void)closeWindow {
-  DCHECK(nativeDialog_);
-  if (!alertShown_) {
-    [self sendCloseToNativeDialog];
-    return;
-  }
-  [NSApp endSheet:[[self alert] window]];
-}
-
-- (void)sendAcceptToNativeDialog {
-  DCHECK(nativeDialog_);
-  nativeDialog_->dialog()->OnAccept([self input], [self shouldSuppress]);
-  [self destroyNativeDialog];
-}
-
-- (void)sendCancelToNativeDialog {
-  DCHECK(nativeDialog_);
-  // If the user wants to stay on this page, stop quitting (if a quit is in
-  // progress).
-  if (nativeDialog_->dialog()->is_before_unload_dialog())
-    chrome_browser_application_mac::CancelTerminate();
-  nativeDialog_->dialog()->OnCancel([self shouldSuppress]);
-  [self destroyNativeDialog];
-}
-
-- (void)sendCloseToNativeDialog {
-  DCHECK(nativeDialog_);
-  nativeDialog_->dialog()->OnClose();
-  [self destroyNativeDialog];
-}
-
-- (void)destroyNativeDialog {
-  DCHECK(nativeDialog_);
-  JavaScriptAppModalDialogCocoa* nativeDialog = nativeDialog_;
-  nativeDialog_ = nil;  // Need to fail on DCHECK if something wrong happens.
-  delete nativeDialog;  // Careful, this will delete us.
-}
-
-- (base::string16)input {
-  if (textField_)
-    return base::SysNSStringToUTF16([textField_ stringValue]);
-  return base::string16();
-}
-
-- (bool)shouldSuppress {
-  if ([[self alert] showsSuppressionButton])
-    return [[[self alert] suppressionButton] state] == NSOnState;
-  return false;
-}
-
-@end
-
-////////////////////////////////////////////////////////////////////////////////
-// JavaScriptAppModalDialogCocoa, public:
-
-JavaScriptAppModalDialogCocoa::JavaScriptAppModalDialogCocoa(
-    app_modal::JavaScriptAppModalDialog* dialog)
-    : dialog_(dialog),
-      popunder_preventer_(new PopunderPreventer(dialog->web_contents())),
-      is_showing_(false) {
-  // Determine the names of the dialog buttons based on the flags. "Default"
-  // is the OK button. "Other" is the cancel button. We don't use the
-  // "Alternate" button in NSRunAlertPanel.
-  NSString* default_button = l10n_util::GetNSStringWithFixup(IDS_APP_OK);
-  NSString* other_button = l10n_util::GetNSStringWithFixup(IDS_APP_CANCEL);
-  bool text_field = false;
-  bool one_button = false;
-  switch (dialog_->javascript_dialog_type()) {
-    case content::JAVASCRIPT_DIALOG_TYPE_ALERT:
-      one_button = true;
-      break;
-    case content::JAVASCRIPT_DIALOG_TYPE_CONFIRM:
-      if (dialog_->is_before_unload_dialog()) {
-        if (dialog_->is_reload()) {
-          default_button = l10n_util::GetNSStringWithFixup(
-              IDS_BEFORERELOAD_MESSAGEBOX_OK_BUTTON_LABEL);
-        } else {
-          default_button = l10n_util::GetNSStringWithFixup(
-              IDS_BEFOREUNLOAD_MESSAGEBOX_OK_BUTTON_LABEL);
-        }
-      }
-      break;
-    case content::JAVASCRIPT_DIALOG_TYPE_PROMPT:
-      text_field = true;
-      break;
-
-    default:
-      NOTREACHED();
-  }
-
-  // Create a helper which will receive the sheet ended selector. It will
-  // delete itself when done.
-  helper_.reset(
-      [[JavaScriptAppModalDialogHelper alloc] initWithNativeDialog:this]);
-
-  // Show the modal dialog.
-  if (text_field) {
-    [helper_ addTextFieldWithPrompt:base::SysUTF16ToNSString(
-        dialog_->default_prompt_text())];
-  }
-  [GetAlert() setDelegate:helper_];
-  NSString* informative_text =
-      base::SysUTF16ToNSString(dialog_->message_text());
-
-  // Truncate long JS alerts - crbug.com/331219
-  NSCharacterSet* newline_char_set = [NSCharacterSet newlineCharacterSet];
-  for (size_t index = 0, slots_count = 0; index < informative_text.length;
-      ++index) {
-    unichar current_char = [informative_text characterAtIndex:index];
-    if ([newline_char_set characterIsMember:current_char])
-      slots_count += kSlotsPerLine;
-    else
-      slots_count++;
-    if (slots_count > kMessageTextMaxSlots) {
-      base::string16 info_text = base::SysNSStringToUTF16(informative_text);
-      informative_text = base::SysUTF16ToNSString(
-          gfx::TruncateString(info_text, index, gfx::WORD_BREAK));
-      break;
-    }
-  }
-
-  [GetAlert() setInformativeText:informative_text];
-  NSString* message_text =
-      base::SysUTF16ToNSString(dialog_->title());
-  [GetAlert() setMessageText:message_text];
-  [GetAlert() addButtonWithTitle:default_button];
-  if (!one_button) {
-    NSButton* other = [GetAlert() addButtonWithTitle:other_button];
-    [other setKeyEquivalent:@"\e"];
-  }
-  if (dialog_->display_suppress_checkbox()) {
-    [GetAlert() setShowsSuppressionButton:YES];
-    NSString* suppression_title = l10n_util::GetNSStringWithFixup(
-        IDS_JAVASCRIPT_MESSAGEBOX_SUPPRESS_OPTION);
-    [[GetAlert() suppressionButton] setTitle:suppression_title];
-  }
-
-  // Fix RTL dialogs.
-  //
-  // Mac OS X will always display NSAlert strings as LTR. A workaround is to
-  // manually set the text as attributed strings in the implementing
-  // NSTextFields. This is a basic correctness issue.
-  //
-  // In addition, for readability, the overall alignment is set based on the
-  // directionality of the first strongly-directional character.
-  //
-  // If the dialog fields are selectable then they will scramble when clicked.
-  // Therefore, selectability is disabled.
-  //
-  // See http://crbug.com/70806 for more details.
-
-  bool message_has_rtl =
-      base::i18n::StringContainsStrongRTLChars(dialog_->title());
-  bool informative_has_rtl =
-      base::i18n::StringContainsStrongRTLChars(dialog_->message_text());
-
-  NSTextField* message_text_field = nil;
-  NSTextField* informative_text_field = nil;
-  if (message_has_rtl || informative_has_rtl) {
-    // Force layout of the dialog. NSAlert leaves its dialog alone once laid
-    // out; if this is not done then all the modifications that are to come will
-    // be un-done when the dialog is finally displayed.
-    [GetAlert() layout];
-
-    // Locate the NSTextFields that implement the text display. These are
-    // actually available as the ivars |_messageField| and |_informationField|
-    // of the NSAlert, but it is safer (and more forward-compatible) to search
-    // for them in the subviews.
-    for (NSView* view in [[[GetAlert() window] contentView] subviews]) {
-      NSTextField* text_field = base::mac::ObjCCast<NSTextField>(view);
-      if ([[text_field stringValue] isEqualTo:message_text])
-        message_text_field = text_field;
-      else if ([[text_field stringValue] isEqualTo:informative_text])
-        informative_text_field = text_field;
-    }
-
-    // This may fail in future OS releases, but it will still work for shipped
-    // versions of Chromium.
-    DCHECK(message_text_field);
-    DCHECK(informative_text_field);
-  }
-
-  if (message_has_rtl && message_text_field) {
-    base::scoped_nsobject<NSMutableParagraphStyle> alignment(
-        [[NSParagraphStyle defaultParagraphStyle] mutableCopy]);
-    [alignment setAlignment:NSRightTextAlignment];
-
-    NSDictionary* alignment_attributes =
-        @{ NSParagraphStyleAttributeName : alignment };
-    base::scoped_nsobject<NSAttributedString> attr_string(
-        [[NSAttributedString alloc] initWithString:message_text
-                                        attributes:alignment_attributes]);
-
-    [message_text_field setAttributedStringValue:attr_string];
-    [message_text_field setSelectable:NO];
-  }
-
-  if (informative_has_rtl && informative_text_field) {
-    base::i18n::TextDirection direction =
-        base::i18n::GetFirstStrongCharacterDirection(dialog_->message_text());
-    base::scoped_nsobject<NSMutableParagraphStyle> alignment(
-        [[NSParagraphStyle defaultParagraphStyle] mutableCopy]);
-    [alignment setAlignment:
-        (direction == base::i18n::RIGHT_TO_LEFT) ? NSRightTextAlignment
-                                                 : NSLeftTextAlignment];
-
-    NSDictionary* alignment_attributes =
-        @{ NSParagraphStyleAttributeName : alignment };
-    base::scoped_nsobject<NSAttributedString> attr_string(
-        [[NSAttributedString alloc] initWithString:informative_text
-                                        attributes:alignment_attributes]);
-
-    [informative_text_field setAttributedStringValue:attr_string];
-    [informative_text_field setSelectable:NO];
-  }
-}
-
-JavaScriptAppModalDialogCocoa::~JavaScriptAppModalDialogCocoa() {
-  [NSObject cancelPreviousPerformRequestsWithTarget:helper_.get()];
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// JavaScriptAppModalDialogCocoa, private:
-
-NSAlert* JavaScriptAppModalDialogCocoa::GetAlert() const {
-  return [helper_ alert];
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// JavaScriptAppModalDialogCocoa, NativeAppModalDialog implementation:
-
-int JavaScriptAppModalDialogCocoa::GetAppModalDialogButtons() const {
-  // From the above, it is the case that if there is 1 button, it is always the
-  // OK button.  The second button, if it exists, is always the Cancel button.
-  int num_buttons = [[GetAlert() buttons] count];
-  switch (num_buttons) {
-    case 1:
-      return ui::DIALOG_BUTTON_OK;
-    case 2:
-      return ui::DIALOG_BUTTON_OK | ui::DIALOG_BUTTON_CANCEL;
-    default:
-      NOTREACHED();
-      return 0;
-  }
-}
-
-void JavaScriptAppModalDialogCocoa::ShowAppModalDialog() {
-  is_showing_ = true;
-
-  // Dispatch the method to show the alert back to the top of the CFRunLoop.
-  // This fixes an interaction bug with NSSavePanel. http://crbug.com/375785
-  // When this object is destroyed, outstanding performSelector: requests
-  // should be cancelled.
-  [helper_.get() performSelector:@selector(showAlert)
-                      withObject:nil
-                      afterDelay:0];
-}
-
-void JavaScriptAppModalDialogCocoa::ActivateAppModalDialog() {
-}
-
-void JavaScriptAppModalDialogCocoa::CloseAppModalDialog() {
-  [helper_ closeWindow];
-}
-
-void JavaScriptAppModalDialogCocoa::AcceptAppModalDialog() {
-  [helper_ acceptAlert];
-}
-
-void JavaScriptAppModalDialogCocoa::CancelAppModalDialog() {
-  [helper_ cancelAlert];
-}
-
-bool JavaScriptAppModalDialogCocoa::IsShowing() const {
-  return is_showing_;
-}
-
-namespace {
-
-class ChromeJavaScriptNativeDialogCocoaFactory
-    : public app_modal::JavaScriptNativeDialogFactory {
- public:
-  ChromeJavaScriptNativeDialogCocoaFactory() {}
-  ~ChromeJavaScriptNativeDialogCocoaFactory() override {}
-
- private:
-  app_modal::NativeAppModalDialog* CreateNativeJavaScriptDialog(
-      app_modal::JavaScriptAppModalDialog* dialog) override {
-    app_modal::NativeAppModalDialog* d =
-        new JavaScriptAppModalDialogCocoa(dialog);
-    dialog->web_contents()->GetDelegate()->ActivateContents(
-        dialog->web_contents());
-    return d;
-  }
-
-  DISALLOW_COPY_AND_ASSIGN(ChromeJavaScriptNativeDialogCocoaFactory);
-};
-
-}  // namespace
-
-void InstallChromeJavaScriptNativeDialogFactory() {
-  app_modal::JavaScriptDialogManager::GetInstance()->SetNativeDialogFactory(
-      base::WrapUnique(new ChromeJavaScriptNativeDialogCocoaFactory));
-}
diff --git a/chrome/browser/ui/extensions/extension_installed_notification.cc b/chrome/browser/ui/extensions/extension_installed_notification.cc
index 164e2908d..2f803da 100644
--- a/chrome/browser/ui/extensions/extension_installed_notification.cc
+++ b/chrome/browser/ui/extensions/extension_installed_notification.cc
@@ -48,7 +48,7 @@
           l10n_util::GetStringUTF16(IDS_EXTENSION_NOTIFICATION_DISPLAY_SOURCE),
           GURL(extension_urls::kChromeWebstoreBaseURL) /* origin_url */,
           message_center::NotifierId(
-              message_center::NotifierId::SYSTEM_COMPONENT, kNotifierId),
+              message_center::NotifierType::SYSTEM_COMPONENT, kNotifierId),
           {}, this, ash::kNotificationInstalledIcon,
           message_center::SystemNotificationWarningLevel::NORMAL);
 
diff --git a/chrome/browser/ui/views/autofill/save_card_bubble_views.cc b/chrome/browser/ui/views/autofill/save_card_bubble_views.cc
index 550cc33..af2355e 100644
--- a/chrome/browser/ui/views/autofill/save_card_bubble_views.cc
+++ b/chrome/browser/ui/views/autofill/save_card_bubble_views.cc
@@ -83,7 +83,7 @@
 
 bool SaveCardBubbleViews::Accept() {
   if (controller_)
-    controller_->OnSaveButton(base::string16());
+    controller_->OnSaveButton({});
   return true;
 }
 
diff --git a/chrome/browser/ui/views/autofill/save_card_offer_bubble_views.cc b/chrome/browser/ui/views/autofill/save_card_offer_bubble_views.cc
index 9f5137ad..385ad88 100644
--- a/chrome/browser/ui/views/autofill/save_card_offer_bubble_views.cc
+++ b/chrome/browser/ui/views/autofill/save_card_offer_bubble_views.cc
@@ -13,6 +13,7 @@
 #include "chrome/browser/ui/views/autofill/dialog_view_ids.h"
 #include "chrome/browser/ui/views/chrome_layout_provider.h"
 #include "chrome/browser/ui/views/chrome_typography.h"
+#include "chrome/grit/generated_resources.h"
 #include "components/autofill/core/browser/autofill_experiments.h"
 #include "components/autofill/core/browser/autofill_metrics.h"
 #include "components/autofill/core/browser/credit_card.h"
@@ -30,6 +31,7 @@
 #include "ui/views/bubble/bubble_frame_view.h"
 #include "ui/views/bubble/tooltip_icon.h"
 #include "ui/views/controls/button/label_button.h"
+#include "ui/views/controls/combobox/combobox.h"
 #include "ui/views/controls/label.h"
 #include "ui/views/controls/separator.h"
 #include "ui/views/controls/styled_label.h"
@@ -64,10 +66,17 @@
 }
 
 bool SaveCardOfferBubbleViews::Accept() {
-  if (controller())
-    controller()->OnSaveButton(cardholder_name_textfield_
-                                   ? cardholder_name_textfield_->text()
-                                   : base::string16());
+  if (controller()) {
+    controller()->OnSaveButton(
+        {cardholder_name_textfield_ ? cardholder_name_textfield_->text()
+                                    : base::string16(),
+         month_input_dropdown_ ? month_input_dropdown_->GetTextForRow(
+                                     month_input_dropdown_->selected_index())
+                               : base::string16(),
+         year_input_dropdown_ ? year_input_dropdown_->GetTextForRow(
+                                    year_input_dropdown_->selected_index())
+                              : base::string16()});
+  }
   return true;
 }
 
@@ -85,12 +94,24 @@
 
   DCHECK_EQ(ui::DIALOG_BUTTON_OK, button);
   if (cardholder_name_textfield_) {
+    // Make sure we are not requesting cardholder name and expiration date at
+    // the same time.
+    DCHECK(!month_input_dropdown_ && !year_input_dropdown_);
     // If requesting the user confirm the name, it cannot be blank.
     base::string16 trimmed_text;
     base::TrimWhitespace(cardholder_name_textfield_->text(), base::TRIM_ALL,
                          &trimmed_text);
     return !trimmed_text.empty();
   }
+  // If requesting the user select the expiration date, it cannot be unselected.
+  if (month_input_dropdown_ || year_input_dropdown_) {
+    // Make sure we are not requesting cardholder name and expiration date at
+    // the same time.
+    DCHECK(!cardholder_name_textfield_);
+    return !(month_input_dropdown_->selected_index() == 0 ||
+             year_input_dropdown_->selected_index() == 0);
+  }
+
   return true;
 }
 
@@ -111,6 +132,11 @@
   DialogModelChanged();
 }
 
+void SaveCardOfferBubbleViews::OnPerformAction(views::Combobox* sender) {
+  DCHECK(month_input_dropdown_ == sender || year_input_dropdown_ == sender);
+  DialogModelChanged();
+}
+
 SaveCardOfferBubbleViews::~SaveCardOfferBubbleViews() {}
 
 std::unique_ptr<views::View> SaveCardOfferBubbleViews::CreateMainContentView() {
@@ -191,7 +217,48 @@
     view->AddChildView(cardholder_name_view.release());
   }
 
+  if (controller()->ShouldRequestExpirationDateFromUser())
+    view->AddChildView(CreateRequestExpirationDateView().release());
+
   return view;
 }
 
+std::unique_ptr<views::View>
+SaveCardOfferBubbleViews::CreateRequestExpirationDateView() {
+  auto expiration_date_view = std::make_unique<views::View>();
+  ChromeLayoutProvider* provider = ChromeLayoutProvider::Get();
+  expiration_date_view->SetLayoutManager(std::make_unique<views::BoxLayout>(
+      views::BoxLayout::kVertical, gfx::Insets(),
+      provider->GetDistanceMetric(views::DISTANCE_RELATED_CONTROL_VERTICAL)));
+
+  // Set up the month and year comboboxes.
+  month_input_dropdown_ = new views::Combobox(&month_combobox_model_);
+  month_input_dropdown_->set_listener(this);
+  month_input_dropdown_->SetAccessibleName(
+      l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_PLACEHOLDER_EXPIRY_MONTH));
+
+  year_input_dropdown_ = new views::Combobox(&year_combobox_model_);
+  year_input_dropdown_->set_listener(this);
+  year_input_dropdown_->SetAccessibleName(
+      l10n_util::GetStringUTF16(IDS_AUTOFILL_DIALOG_PLACEHOLDER_EXPIRY_YEAR));
+
+  auto input_row = std::make_unique<views::View>();
+  input_row->SetLayoutManager(std::make_unique<views::BoxLayout>(
+      views::BoxLayout::kHorizontal, gfx::Insets(),
+      provider->GetDistanceMetric(DISTANCE_RELATED_CONTROL_HORIZONTAL_SMALL)));
+  input_row->AddChildView(month_input_dropdown_);
+  input_row->AddChildView(year_input_dropdown_);
+
+  // Set up expiration date label.
+  auto expiration_date_label = std::make_unique<views::Label>(
+      l10n_util::GetStringUTF16(IDS_AUTOFILL_FIELD_LABEL_EXPIRATION_DATE),
+      CONTEXT_BODY_TEXT_LARGE, ChromeTextStyle::STYLE_SECONDARY);
+  expiration_date_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
+
+  expiration_date_view->AddChildView(expiration_date_label.release());
+  expiration_date_view->AddChildView(input_row.release());
+
+  return expiration_date_view;
+}
+
 }  // namespace autofill
diff --git a/chrome/browser/ui/views/autofill/save_card_offer_bubble_views.h b/chrome/browser/ui/views/autofill/save_card_offer_bubble_views.h
index 56b21ff..9d2c5fd 100644
--- a/chrome/browser/ui/views/autofill/save_card_offer_bubble_views.h
+++ b/chrome/browser/ui/views/autofill/save_card_offer_bubble_views.h
@@ -7,7 +7,9 @@
 
 #include "chrome/browser/ui/views/autofill/save_card_bubble_views.h"
 
+#include "chrome/browser/ui/autofill/autofill_dialog_models.h"
 #include "chrome/browser/ui/views/autofill/view_util.h"
+#include "ui/views/controls/combobox/combobox_listener.h"
 #include "ui/views/controls/styled_label_listener.h"
 #include "ui/views/controls/textfield/textfield_controller.h"
 
@@ -22,6 +24,7 @@
 // previously saved. It includes a description of the card that is being saved
 // and an [Save] button. (Non-material UI's include a [No Thanks] button).
 class SaveCardOfferBubbleViews : public SaveCardBubbleViews,
+                                 public views::ComboboxListener,
                                  public views::StyledLabelListener,
                                  public views::TextfieldController {
  public:
@@ -31,7 +34,7 @@
                            content::WebContents* web_contents,
                            SaveCardBubbleController* controller);
 
-  // BubbleDialogDelegateView
+  // BubbleDialogDelegateView:
   views::View* CreateFootnoteView() override;
   bool Accept() override;
   base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
@@ -46,15 +49,26 @@
   void ContentsChanged(views::Textfield* sender,
                        const base::string16& new_contents) override;
 
+  // views::ComboboxListener:
+  void OnPerformAction(views::Combobox* combobox) override;
+
  private:
   std::unique_ptr<views::View> CreateMainContentView() override;
 
+  std::unique_ptr<views::View> CreateRequestExpirationDateView();
+
   ~SaveCardOfferBubbleViews() override;
 
   views::Textfield* cardholder_name_textfield_ = nullptr;
 
   LegalMessageView* legal_message_view_ = nullptr;
 
+  // Holds expiration inputs:
+  views::Combobox* month_input_dropdown_ = nullptr;
+  views::Combobox* year_input_dropdown_ = nullptr;
+  MonthComboboxModel month_combobox_model_;
+  YearComboboxModel year_combobox_model_;
+
   DISALLOW_COPY_AND_ASSIGN(SaveCardOfferBubbleViews);
 };
 
diff --git a/chrome/browser/ui/views/message_center/popups_only_ui_delegate_unittest.cc b/chrome/browser/ui/views/message_center/popups_only_ui_delegate_unittest.cc
index 2986c5b65..95ce00b0 100644
--- a/chrome/browser/ui/views/message_center/popups_only_ui_delegate_unittest.cc
+++ b/chrome/browser/ui/views/message_center/popups_only_ui_delegate_unittest.cc
@@ -60,7 +60,7 @@
         base::ASCIIToUTF16("Notification message body."), gfx::Image(),
         base::ASCIIToUTF16("Some Chrome extension"),
         GURL("chrome-extension://abbccedd"),
-        NotifierId(NotifierId::APPLICATION, id),
+        NotifierId(message_center::NotifierType::APPLICATION, id),
         message_center::RichNotificationData(), nullptr);
 
     MessageCenter::Get()->AddNotification(std::move(notification));
@@ -73,7 +73,7 @@
         base::ASCIIToUTF16("Notification message body."), gfx::Image(),
         base::ASCIIToUTF16("Some Chrome extension"),
         GURL("chrome-extension://abbccedd"),
-        NotifierId(NotifierId::APPLICATION, id),
+        NotifierId(message_center::NotifierType::APPLICATION, id),
         message_center::RichNotificationData(), nullptr);
 
     MessageCenter::Get()->UpdateNotification(id, std::move(notification));
diff --git a/chrome/browser/ui/views/safe_browsing/OWNERS b/chrome/browser/ui/views/safe_browsing/OWNERS
index 48509a8..580466e 100644
--- a/chrome/browser/ui/views/safe_browsing/OWNERS
+++ b/chrome/browser/ui/views/safe_browsing/OWNERS
@@ -1,4 +1,5 @@
-jialiul@chromium.org
 lpz@chromium.org
 nparker@chromium.org
 vakh@chromium.org
+
+# COMPONENT: UI>Browser>Safebrowsing
diff --git a/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc b/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc
index 9fbe8c92..6b9c6f5 100644
--- a/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc
+++ b/chrome/browser/ui/views/tabs/tab_drag_controller_interactive_uitest.cc
@@ -656,31 +656,18 @@
 }
 
 #if defined(USE_AURA)
-namespace {
-
-// We need both MaskedWindowTargeter and MaskedWindowDelegate as they
-// are used in two different pathes. crbug.com/493354.
-class MaskedWindowTargeter : public aura::WindowTargeter {
- public:
-  MaskedWindowTargeter() {}
-  ~MaskedWindowTargeter() override {}
-
-  // aura::WindowTargeter:
-  bool EventLocationInsideBounds(aura::Window* target,
-                                 const ui::LocatedEvent& event) const override {
-    aura::Window* window = static_cast<aura::Window*>(target);
-    gfx::Point local_point = event.location();
-    if (window->parent())
-      aura::Window::ConvertPointToTarget(window->parent(), window,
-                                         &local_point);
-    return window->GetEventHandlerForPoint(local_point);
-  }
-
- private:
-  DISALLOW_COPY_AND_ASSIGN(MaskedWindowTargeter);
-};
-
-}  // namespace
+bool SubtreeShouldBeExplored(aura::Window* window,
+                             const gfx::Point& local_point) {
+  gfx::Point point_in_parent = local_point;
+  aura::Window::ConvertPointToTarget(window, window->parent(),
+                                     &point_in_parent);
+  gfx::Point point_in_root = local_point;
+  aura::Window::ConvertPointToTarget(window, window->GetRootWindow(),
+                                     &point_in_root);
+  ui::MouseEvent event(ui::ET_MOUSE_MOVED, point_in_parent, point_in_root,
+                       base::TimeTicks::Now(), 0, 0);
+  return window->targeter()->SubtreeShouldBeExploredForEvent(window, event);
+}
 
 // The logic to find the target tabstrip should take the window mask into
 // account. This test hangs without the fix. crbug.com/473080.
@@ -690,19 +677,20 @@
 
   aura::Window* browser_window = browser()->window()->GetNativeWindow();
   const gfx::Rect bounds = browser_window->GetBoundsInScreen();
-  aura::test::MaskedWindowDelegate masked_window_delegate(
-      gfx::Rect(bounds.width() - 10, 0, 10, bounds.height()));
-  gfx::Rect test(bounds);
+  aura::test::TestWindowDelegate masked_window_delegate;
   masked_window_delegate.set_can_focus(false);
   std::unique_ptr<aura::Window> masked_window(
-      aura::test::CreateTestWindowWithDelegate(&masked_window_delegate, 10,
-                                               test, browser_window->parent()));
-  masked_window->SetEventTargeter(std::make_unique<MaskedWindowTargeter>());
+      aura::test::CreateTestWindowWithDelegate(
+          &masked_window_delegate, 10, bounds, browser_window->parent()));
+  masked_window->SetProperty(aura::client::kAlwaysOnTopKey, true);
+  auto targeter = std::make_unique<aura::WindowTargeter>();
+  targeter->SetInsets(gfx::Insets(0, bounds.width() - 10, 0, 0));
+  masked_window->SetEventTargeter(std::move(targeter));
 
-  ASSERT_FALSE(masked_window->GetEventHandlerForPoint(
-      gfx::Point(bounds.width() - 11, 0)));
-  ASSERT_TRUE(masked_window->GetEventHandlerForPoint(
-      gfx::Point(bounds.width() - 9, 0)));
+  ASSERT_FALSE(SubtreeShouldBeExplored(masked_window.get(),
+                                       gfx::Point(bounds.width() - 11, 0)));
+  ASSERT_TRUE(SubtreeShouldBeExplored(masked_window.get(),
+                                      gfx::Point(bounds.width() - 9, 0)));
   TabStrip* tab_strip = GetTabStripForBrowser(browser());
   TabStripModel* model = browser()->tab_strip_model();
 
diff --git a/chrome/browser/ui/webui/reset_password/OWNERS b/chrome/browser/ui/webui/reset_password/OWNERS
index 22146ba..310210e 100644
--- a/chrome/browser/ui/webui/reset_password/OWNERS
+++ b/chrome/browser/ui/webui/reset_password/OWNERS
@@ -1,8 +1,7 @@
 per-file *.mojom=set noparent
 per-file *.mojom=file://ipc/SECURITY_OWNERS
 
-jialiul@chromium.org
 nparker@chromium.org
 vakh@chromium.org
 
-# COMPONENT: Services>Safebrowsing
+# COMPONENT: UI>Browser>Safebrowsing
diff --git a/chrome/browser/usb/web_usb_detector.cc b/chrome/browser/usb/web_usb_detector.cc
index 3984d92..ef2d1f0 100644
--- a/chrome/browser/usb/web_usb_detector.cc
+++ b/chrome/browser/usb/web_usb_detector.cc
@@ -232,7 +232,7 @@
       gfx::Image(gfx::CreateVectorIcon(vector_icons::kUsbIcon, 64,
                                        gfx::kChromeIconGrey)),
       base::string16(), GURL(),
-      message_center::NotifierId(message_center::NotifierId::SYSTEM_COMPONENT,
+      message_center::NotifierId(message_center::NotifierType::SYSTEM_COMPONENT,
                                  kNotifierWebUsb),
       rich_notification_data,
       base::MakeRefCounted<WebUsbNotificationDelegate>(landing_page,
diff --git a/chrome/browser/vr/BUILD.gn b/chrome/browser/vr/BUILD.gn
index 8807045..cf25ca26 100644
--- a/chrome/browser/vr/BUILD.gn
+++ b/chrome/browser/vr/BUILD.gn
@@ -296,8 +296,12 @@
     sources += [
       "service/isolated_device_provider.cc",
       "service/isolated_device_provider.h",
-      "win/simple_overlay_renderer_win.cc",
-      "win/simple_overlay_renderer_win.h",
+      "win/graphics_delegate_win.cc",
+      "win/graphics_delegate_win.h",
+      "win/input_delegate_win.cc",
+      "win/input_delegate_win.h",
+      "win/scheduler_delegate_win.cc",
+      "win/scheduler_delegate_win.h",
       "win/vr_browser_renderer_thread_win.cc",
       "win/vr_browser_renderer_thread_win.h",
       "win/vr_renderloop_host_win.cc",
diff --git a/chrome/browser/vr/browser_renderer.cc b/chrome/browser/vr/browser_renderer.cc
index 8f4049a..7c9a2705 100644
--- a/chrome/browser/vr/browser_renderer.cc
+++ b/chrome/browser/vr/browser_renderer.cc
@@ -28,13 +28,13 @@
     std::unique_ptr<InputDelegate> input_delegate,
     BrowserRendererBrowserInterface* browser,
     size_t sliding_time_size)
-    : ui_(std::move(ui)),
-      scheduler_delegate_(std::move(scheduler_delegate)),
+    : scheduler_delegate_(std::move(scheduler_delegate)),
       graphics_delegate_(std::move(graphics_delegate)),
       input_delegate_(std::move(input_delegate)),
       browser_(browser),
       ui_processing_time_(sliding_time_size),
       ui_controller_update_time_(sliding_time_size),
+      ui_(std::move(ui)),
       weak_ptr_factory_(this) {
   scheduler_delegate_->SetBrowserRenderer(this);
 }
diff --git a/chrome/browser/vr/browser_renderer.h b/chrome/browser/vr/browser_renderer.h
index 30f60d4..f1ec6a5ea 100644
--- a/chrome/browser/vr/browser_renderer.h
+++ b/chrome/browser/vr/browser_renderer.h
@@ -112,7 +112,6 @@
       const base::TimeTicks& current_time);
   void ReportElementVisibilityResultForTesting(UiTestOperationResult result);
 
-  std::unique_ptr<UiInterface> ui_;
   std::unique_ptr<SchedulerDelegate> scheduler_delegate_;
   std::unique_ptr<GraphicsDelegate> graphics_delegate_;
   std::unique_ptr<InputDelegate> input_delegate_;
@@ -129,6 +128,10 @@
   SlidingTimeDeltaAverage ui_processing_time_;
   SlidingTimeDeltaAverage ui_controller_update_time_;
 
+  // ui_ is using gl contexts during destruction (skia context specifically), so
+  // it must be destroyed before graphics_delegate_.
+  std::unique_ptr<UiInterface> ui_;
+
   base::WeakPtrFactory<BrowserRenderer> weak_ptr_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(BrowserRenderer);
diff --git a/chrome/browser/vr/graphics_delegate.h b/chrome/browser/vr/graphics_delegate.h
index 7bb46e6..2644365 100644
--- a/chrome/browser/vr/graphics_delegate.h
+++ b/chrome/browser/vr/graphics_delegate.h
@@ -5,7 +5,10 @@
 #ifndef CHROME_BROWSER_VR_GRAPHICS_DELEGATE_H_
 #define CHROME_BROWSER_VR_GRAPHICS_DELEGATE_H_
 
+#include <string>
+
 #include "base/callback_forward.h"
+#include "base/memory/scoped_refptr.h"
 #include "chrome/browser/vr/fov_rectangle.h"
 #include "chrome/browser/vr/frame_type.h"
 #include "chrome/browser/vr/gl_texture_location.h"
@@ -34,8 +37,6 @@
       void(GlTextureLocation, unsigned int, unsigned int, unsigned int)>;
   virtual ~GraphicsDelegate() {}
 
-  virtual void OnResume() = 0;
-
   virtual FovRectangles GetRecommendedFovs() = 0;
   virtual float GetZNear() = 0;
   virtual RenderInfo GetRenderInfo(FrameType frame_type,
diff --git a/chrome/browser/vr/service/browser_xr_runtime.cc b/chrome/browser/vr/service/browser_xr_runtime.cc
index fccecce..6007ca2 100644
--- a/chrome/browser/vr/service/browser_xr_runtime.cc
+++ b/chrome/browser/vr/service/browser_xr_runtime.cc
@@ -42,6 +42,11 @@
   for (XRDeviceImpl* device : renderer_device_connections_) {
     device->RuntimesChanged();
   }
+
+  // Notify observers of the new display info.
+  for (BrowserXRRuntimeObserver& observer : observers_) {
+    observer.SetVRDisplayInfo(display_info_.Clone());
+  }
 }
 
 void BrowserXRRuntime::StopImmersiveSession() {
diff --git a/chrome/browser/vr/service/browser_xr_runtime.h b/chrome/browser/vr/service/browser_xr_runtime.h
index 3c402f2..0755cc20 100644
--- a/chrome/browser/vr/service/browser_xr_runtime.h
+++ b/chrome/browser/vr/service/browser_xr_runtime.h
@@ -27,6 +27,8 @@
 // browser thread.  Currently this is used on Windows to drive overlays.
 class BrowserXRRuntimeObserver : public base::CheckedObserver {
  public:
+  virtual void SetVRDisplayInfo(
+      device::mojom::VRDisplayInfoPtr display_info) = 0;
   virtual void SetWebXRWebContents(content::WebContents* contents) = 0;
 };
 
@@ -62,6 +64,7 @@
   // Methods called to support metrics/overlays on Windows.
   void AddObserver(BrowserXRRuntimeObserver* observer) {
     observers_.AddObserver(observer);
+    observer->SetVRDisplayInfo(display_info_.Clone());
   }
   void RemoveObserver(BrowserXRRuntimeObserver* observer) {
     observers_.RemoveObserver(observer);
diff --git a/chrome/browser/vr/testapp/gl_renderer.cc b/chrome/browser/vr/testapp/gl_renderer.cc
index e58058e..bb8b21d 100644
--- a/chrome/browser/vr/testapp/gl_renderer.cc
+++ b/chrome/browser/vr/testapp/gl_renderer.cc
@@ -41,7 +41,6 @@
 }
 
 // TODO(crbug/895313): Provide actual implementation for the methods.
-void GlRenderer::OnResume() {}
 FovRectangles GlRenderer::GetRecommendedFovs() {
   return {{}, {}};
 }
diff --git a/chrome/browser/vr/testapp/gl_renderer.h b/chrome/browser/vr/testapp/gl_renderer.h
index 342f37eb..391fbb3f 100644
--- a/chrome/browser/vr/testapp/gl_renderer.h
+++ b/chrome/browser/vr/testapp/gl_renderer.h
@@ -27,7 +27,6 @@
 
   // GraphicsDelegate implementation.
   bool Initialize(const scoped_refptr<gl::GLSurface>& surface) override;
-  void OnResume() override;
   FovRectangles GetRecommendedFovs() override;
   float GetZNear() override;
   RenderInfo GetRenderInfo(FrameType frame_type,
diff --git a/chrome/browser/vr/ui.cc b/chrome/browser/vr/ui.cc
index 9d74615..196a3d1 100644
--- a/chrome/browser/vr/ui.cc
+++ b/chrome/browser/vr/ui.cc
@@ -720,6 +720,8 @@
 }
 
 void Ui::DrawWebXr(int texture_data_handle, const float (&uv_transform)[16]) {
+  if (!texture_data_handle)
+    return;
   ui_element_renderer_->DrawTextureCopy(texture_data_handle, uv_transform, 0,
                                         0);
 }
diff --git a/chrome/browser/vr/win/graphics_delegate_win.cc b/chrome/browser/vr/win/graphics_delegate_win.cc
new file mode 100644
index 0000000..e156569
--- /dev/null
+++ b/chrome/browser/vr/win/graphics_delegate_win.cc
@@ -0,0 +1,376 @@
+// Copyright 2018 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 "chrome/browser/vr/win/graphics_delegate_win.h"
+
+#include "base/numerics/math_constants.h"
+#include "content/public/browser/gpu_utils.h"
+#include "content/public/common/gpu_stream_constants.h"
+#include "gpu/command_buffer/client/gles2_interface.h"
+#include "gpu/command_buffer/client/gles2_lib.h"
+#include "mojo/public/cpp/system/platform_handle.h"
+
+namespace vr {
+
+namespace {
+constexpr float kZNear = 0.1f;
+constexpr float kZFar = 10000.0f;
+}  // namespace
+
+GraphicsDelegateWin::GraphicsDelegateWin() {}
+
+GraphicsDelegateWin::~GraphicsDelegateWin() {}
+
+bool GraphicsDelegateWin::InitializeOnMainThread() {
+  gpu::GpuChannelEstablishFactory* factory =
+      content::GetGpuChannelEstablishFactory();
+  scoped_refptr<gpu::GpuChannelHost> host = factory->EstablishGpuChannelSync();
+
+  gpu::ContextCreationAttribs attributes;
+  attributes.alpha_size = -1;
+  attributes.red_size = 8;
+  attributes.green_size = 8;
+  attributes.blue_size = 8;
+  attributes.stencil_size = 0;
+  attributes.depth_size = 0;
+  attributes.samples = 0;
+  attributes.sample_buffers = 0;
+  attributes.bind_generates_resource = false;
+
+  context_provider_ = base::MakeRefCounted<ws::ContextProviderCommandBuffer>(
+      host, factory->GetGpuMemoryBufferManager(), content::kGpuStreamIdDefault,
+      content::kGpuStreamPriorityUI, gpu::kNullSurfaceHandle,
+      GURL(std::string("chrome://gpu/VrUiWin")), false /* automatic flushes */,
+      false /* support locking */, false /* support grcontext */,
+      gpu::SharedMemoryLimits::ForMailboxContext(), attributes,
+      ws::command_buffer_metrics::ContextType::XR_COMPOSITING);
+  gpu_memory_buffer_manager_ = factory->GetGpuMemoryBufferManager();
+  return true;
+}
+
+void GraphicsDelegateWin::InitializeOnGLThread() {
+  DCHECK(context_provider_);
+  if (context_provider_->BindToCurrentThread() == gpu::ContextResult::kSuccess)
+    gl_ = context_provider_->ContextGL();
+}
+
+bool GraphicsDelegateWin::BindContext() {
+  if (!gl_)
+    return false;
+
+  gles2::SetGLContext(gl_);
+  return true;
+}
+
+void GraphicsDelegateWin::ClearContext() {
+  gles2::SetGLContext(nullptr);
+}
+
+gfx::Rect GraphicsDelegateWin::GetTextureSize() {
+  int width = info_->leftEye->renderWidth + info_->rightEye->renderWidth;
+  int height =
+      std::max(info_->leftEye->renderHeight, info_->rightEye->renderWidth);
+  return gfx::Rect(width, height);
+}
+
+void GraphicsDelegateWin::PreRender() {
+  if (!gl_)
+    return;
+
+  BindContext();
+  gfx::Rect size = GetTextureSize();
+
+  // Create a memory buffer, and an image referencing that memory buffer.
+  if (!EnsureMemoryBuffer(size.width(), size.height()))
+    return;
+
+  // Create a texture id, and associate it with our image.
+  gl_->GenTextures(1, &dest_texture_id_);
+  gl_->BindTexture(GL_TEXTURE_2D, dest_texture_id_);
+  gl_->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+  gl_->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+  gl_->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+  gl_->TexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+  gl_->BindTexImage2DCHROMIUM(GL_TEXTURE_2D, image_id_);
+  gl_->BindTexture(GL_TEXTURE_2D, 0);
+
+  // Bind our image/texture/memory buffer as the draw framebuffer.
+  gl_->GenFramebuffers(1, &draw_frame_buffer_);
+  gl_->BindFramebuffer(GL_DRAW_FRAMEBUFFER, draw_frame_buffer_);
+  gl_->FramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
+                            GL_TEXTURE_2D, dest_texture_id_, 0);
+}
+
+void GraphicsDelegateWin::PostRender() {
+  // Unbind the drawing buffer.
+  gl_->BindFramebuffer(GL_FRAMEBUFFER, 0);
+  gl_->DeleteFramebuffers(1, &draw_frame_buffer_);
+  gl_->BindTexture(GL_TEXTURE_2D, dest_texture_id_);
+  gl_->ReleaseTexImage2DCHROMIUM(GL_TEXTURE_2D, image_id_);
+  gl_->DeleteTextures(1, &dest_texture_id_);
+  gl_->BindTexture(GL_TEXTURE_2D, 0);
+  dest_texture_id_ = 0;
+  draw_frame_buffer_ = 0;
+
+  // Flush.
+  gl_->ShallowFlushCHROMIUM();
+  ClearContext();
+}
+
+mojo::ScopedHandle GraphicsDelegateWin::GetTexture() {
+  // Hand out the gpu memory buffer.
+  mojo::ScopedHandle handle;
+  if (!gpu_memory_buffer_) {
+    return handle;
+  }
+
+  gfx::GpuMemoryBufferHandle gpu_handle = gpu_memory_buffer_->CloneHandle();
+  return mojo::WrapPlatformFile(gpu_handle.dxgi_handle.GetHandle());
+}
+
+gfx::RectF GraphicsDelegateWin::GetLeft() {
+  gfx::Rect size = GetTextureSize();
+  return gfx::RectF(
+      0, 0, static_cast<float>(info_->leftEye->renderWidth) / size.width(),
+      static_cast<float>(info_->leftEye->renderHeight) / size.height());
+}
+
+gfx::RectF GraphicsDelegateWin::GetRight() {
+  gfx::Rect size = GetTextureSize();
+  return gfx::RectF(
+      static_cast<float>(info_->leftEye->renderWidth) / size.width(), 0,
+      static_cast<float>(info_->rightEye->renderWidth) / size.width(),
+      static_cast<float>(info_->rightEye->renderHeight) / size.height());
+}
+
+void GraphicsDelegateWin::Cleanup() {
+  context_provider_ = nullptr;
+}
+
+bool GraphicsDelegateWin::EnsureMemoryBuffer(int width, int height) {
+  if (last_width_ != width || last_height_ != height || !gpu_memory_buffer_) {
+    if (!gpu_memory_buffer_manager_)
+      return false;
+
+    if (image_id_) {
+      gl_->DestroyImageCHROMIUM(image_id_);
+      image_id_ = 0;
+    }
+
+    gpu_memory_buffer_ = gpu_memory_buffer_manager_->CreateGpuMemoryBuffer(
+        gfx::Size(width, height), gfx::BufferFormat::RGBA_8888,
+        gfx::BufferUsage::SCANOUT, gpu::kNullSurfaceHandle);
+    if (!gpu_memory_buffer_)
+      return false;
+
+    last_width_ = width;
+    last_height_ = height;
+
+    image_id_ = gl_->CreateImageCHROMIUM(gpu_memory_buffer_->AsClientBuffer(),
+                                         width, height, GL_RGBA);
+    if (!image_id_) {
+      gpu_memory_buffer_ = nullptr;
+      return false;
+    }
+  }
+  return true;
+}
+
+void GraphicsDelegateWin::ResetMemoryBuffer() {
+  // Stop using a memory buffer if we had an error submitting with it.
+  gpu_memory_buffer_ = nullptr;
+}
+
+void GraphicsDelegateWin::SetVRDisplayInfo(
+    device::mojom::VRDisplayInfoPtr info) {
+  info_ = std::move(info);
+}
+
+FovRectangles GraphicsDelegateWin::GetRecommendedFovs() {
+  DCHECK(info_);
+  FovRectangle left = {
+      info_->leftEye->fieldOfView->leftDegrees,
+      info_->leftEye->fieldOfView->rightDegrees,
+      info_->leftEye->fieldOfView->downDegrees,
+      info_->leftEye->fieldOfView->upDegrees,
+  };
+
+  FovRectangle right = {
+      info_->rightEye->fieldOfView->leftDegrees,
+      info_->rightEye->fieldOfView->rightDegrees,
+      info_->rightEye->fieldOfView->downDegrees,
+      info_->rightEye->fieldOfView->upDegrees,
+  };
+
+  return std::pair<FovRectangle, FovRectangle>(left, right);
+}
+
+float GraphicsDelegateWin::GetZNear() {
+  return kZNear;
+}
+
+namespace {
+
+CameraModel CameraModelViewProjFromVREyeParameters(
+    const device::mojom::VREyeParametersPtr& eye_params,
+    gfx::Transform head_from_world) {
+  CameraModel model = {};
+  gfx::Transform eye_from_head;
+  // We have offsets of the eyes in head space, so invert the translation to
+  // calculate the transform from head space to eye space.  For example,
+  // (0, 0, 0) in head space is (-offset.x, -offset.y, -offset.z) in eye space,
+  // and (offset.x, offset.y, offset.z) in head space is (0, 0, 0) in eye space.
+  eye_from_head.Translate3d(-eye_params->offset[0], -eye_params->offset[1],
+                            -eye_params->offset[2]);
+  model.view_matrix = eye_from_head * head_from_world;
+
+  float up_tan =
+      tanf(eye_params->fieldOfView->upDegrees * base::kPiFloat / 180.0);
+  float left_tan =
+      tanf(eye_params->fieldOfView->leftDegrees * base::kPiFloat / 180.0);
+  float right_tan =
+      tanf(eye_params->fieldOfView->rightDegrees * base::kPiFloat / 180.0);
+  float down_tan =
+      tanf(eye_params->fieldOfView->downDegrees * base::kPiFloat / 180.0);
+  float x_scale = 2.0f / (left_tan + right_tan);
+  float y_scale = 2.0f / (up_tan + down_tan);
+  // clang-format off
+  model.proj_matrix =
+      gfx::Transform(x_scale, 0, -((left_tan - right_tan) * x_scale * 0.5), 0,
+                     0, y_scale, ((up_tan - down_tan) * y_scale * 0.5), 0,
+                     0, 0, (kZFar + kZNear) / (kZNear - kZFar),
+                        2 * kZFar * kZNear / (kZNear - kZFar),
+                     0, 0, -1, 0);
+  // clang-format on
+  model.view_proj_matrix = model.proj_matrix * model.view_matrix;
+  return model;
+}
+
+}  // namespace
+
+RenderInfo GraphicsDelegateWin::GetRenderInfo(FrameType frame_type,
+                                              const gfx::Transform& head_pose) {
+  RenderInfo info;
+  info.head_pose = head_pose;
+
+  CameraModel left =
+      CameraModelViewProjFromVREyeParameters(info_->leftEye, head_pose);
+  left.eye_type = kLeftEye;
+  left.viewport = gfx::Rect(0, 0, info_->leftEye->renderWidth,
+                            info_->leftEye->renderHeight);
+  info.left_eye_model = left;
+
+  CameraModel right =
+      CameraModelViewProjFromVREyeParameters(info_->rightEye, head_pose);
+  right.eye_type = kRightEye;
+  right.viewport =
+      gfx::Rect(info_->leftEye->renderWidth, 0, info_->rightEye->renderWidth,
+                info_->rightEye->renderHeight);
+  info.right_eye_model = right;
+  cached_info_ = info;
+  return info;
+}
+
+RenderInfo GraphicsDelegateWin::GetOptimizedRenderInfoForFovs(
+    const FovRectangles& fovs) {
+  RenderInfo info = cached_info_;
+  // TODO(billorr): consider optimizing overlays to save texture size.
+  // For now, we use a full-size texture when we could get by with less.
+  return info;
+}
+
+void GraphicsDelegateWin::InitializeBuffers() {
+  // No-op since we intiailize buffers elsewhere.
+}
+
+void GraphicsDelegateWin::PrepareBufferForWebXr() {
+  // Desktop doesn't render WebXR through the browser renderer.
+  DCHECK(prepared_drawing_buffer_ == DrawingBufferMode::kNone);
+  prepared_drawing_buffer_ = DrawingBufferMode::kWebXr;
+}
+
+void GraphicsDelegateWin::PrepareBufferForWebXrOverlayElements() {
+  // No-op.  We reuse the same buffer for overlays and other content, which is
+  // intialized in PreRender.
+  DCHECK(prepared_drawing_buffer_ == DrawingBufferMode::kNone);
+  prepared_drawing_buffer_ = DrawingBufferMode::kWebXrOverlayElements;
+}
+
+void GraphicsDelegateWin::PrepareBufferForContentQuadLayer(
+    const gfx::Transform& quad_transform) {
+  // Content quad is never ready - unused on desktop.
+  NOTREACHED();
+}
+
+void GraphicsDelegateWin::PrepareBufferForBrowserUi() {
+  gl_->ClearColor(0, 1, 0, 1);
+  gl_->Clear(GL_COLOR_BUFFER_BIT);
+
+  DCHECK(prepared_drawing_buffer_ == DrawingBufferMode::kNone);
+  prepared_drawing_buffer_ = DrawingBufferMode::kBrowserUi;
+}
+
+void GraphicsDelegateWin::OnFinishedDrawingBuffer() {
+  DCHECK(prepared_drawing_buffer_ != DrawingBufferMode::kNone);
+  prepared_drawing_buffer_ = DrawingBufferMode::kNone;
+}
+
+void GraphicsDelegateWin::GetWebXrDrawParams(int* texture_id,
+                                             Transform* uv_transform) {
+  // Reporting a texture_id of 0 will skip texture copies.
+  *texture_id = 0;
+}
+
+bool GraphicsDelegateWin::IsContentQuadReady() {
+  // The content quad is not used.  If we integrate with the views framework at
+  // some point, we may return true later.
+  return false;
+}
+
+void GraphicsDelegateWin::ResumeContentRendering() {
+  NOTREACHED();
+}
+
+void GraphicsDelegateWin::BufferBoundsChanged(
+    const gfx::Size& content_buffer_size,
+    const gfx::Size& overlay_buffer_size) {
+  // Allows the browser to specify size, but we just use headset default always.
+  NOTREACHED();
+}
+
+void GraphicsDelegateWin::GetContentQuadDrawParams(Transform* uv_transform,
+                                                   float* border_x,
+                                                   float* border_y) {
+  NOTREACHED();
+}
+
+int GraphicsDelegateWin::GetContentBufferWidth() {
+  // Called when rendering AlertDialogs, which we don't do.
+  NOTREACHED();
+  return 0;
+}
+
+// These methods return true when succeeded.
+bool GraphicsDelegateWin::Initialize(
+    const scoped_refptr<gl::GLSurface>& surface) {
+  // Commandbuffer intialization is split between the main thread and the render
+  // thread.  Additionally, it can be async, so we can't really do intialization
+  // here - instead, we are initalized earlier.
+  NOTREACHED();
+  return false;
+}
+
+bool GraphicsDelegateWin::RunInSkiaContext(base::OnceClosure callback) {
+  // TODO(billorr): Support multiple contexts in a share group.  For now just
+  // share one context.
+  std::move(callback).Run();
+  return true;
+}
+
+void GraphicsDelegateWin::SetFrameDumpFilepathBase(std::string& filepath_base) {
+  // We don't support saving filepaths currently.
+  // TODO(billorr): Support this if/when needed for tests.
+}
+
+}  // namespace vr
diff --git a/chrome/browser/vr/win/graphics_delegate_win.h b/chrome/browser/vr/win/graphics_delegate_win.h
new file mode 100644
index 0000000..993562b
--- /dev/null
+++ b/chrome/browser/vr/win/graphics_delegate_win.h
@@ -0,0 +1,113 @@
+// Copyright 2018 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.
+
+#ifndef CHROME_BROWSER_VR_WIN_GRAPHICS_DELEGATE_WIN_H_
+#define CHROME_BROWSER_VR_WIN_GRAPHICS_DELEGATE_WIN_H_
+
+#include <string>
+#include "base/callback.h"
+#include "base/memory/scoped_refptr.h"
+#include "chrome/browser/vr/graphics_delegate.h"
+#include "chrome/browser/vr/render_info.h"
+#include "device/vr/public/mojom/vr_service.mojom.h"
+#include "gpu/GLES2/gl2extchromium.h"
+#include "gpu/command_buffer/client/gles2_interface.h"
+#include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
+#include "gpu/command_buffer/common/context_creation_attribs.h"
+#include "gpu/ipc/client/gpu_channel_host.h"
+#include "mojo/public/cpp/system/handle.h"
+#include "services/ws/public/cpp/gpu/context_provider_command_buffer.h"
+#include "ui/gfx/geometry/rect_f.h"
+
+namespace gpu {
+namespace gles2 {
+class GLES2Interface;
+}
+}  // namespace gpu
+
+namespace vr {
+
+class GraphicsDelegateWin : public GraphicsDelegate {
+ public:
+  using Transform = float[16];
+  using TexturesInitializedCallback = base::OnceCallback<
+      void(GlTextureLocation, unsigned int, unsigned int, unsigned int)>;
+  GraphicsDelegateWin();
+  ~GraphicsDelegateWin() override;
+
+  // Called on main UI thread.
+  bool InitializeOnMainThread();
+
+  // Called on background GL thread.
+  void InitializeOnGLThread();
+  void SetVRDisplayInfo(device::mojom::VRDisplayInfoPtr info);
+  void Cleanup();
+  void PreRender();
+  void PostRender();
+  mojo::ScopedHandle GetTexture();
+  gfx::RectF GetLeft();
+  gfx::RectF GetRight();
+  void ResetMemoryBuffer();
+  bool BindContext();
+  void ClearContext();
+
+ private:
+  // GraphicsDelegate:
+  FovRectangles GetRecommendedFovs() override;
+  float GetZNear() override;
+  RenderInfo GetRenderInfo(FrameType frame_type,
+                           const gfx::Transform& head_pose) override;
+  RenderInfo GetOptimizedRenderInfoForFovs(const FovRectangles& fovs) override;
+  void InitializeBuffers() override;
+  void PrepareBufferForWebXr() override;
+  void PrepareBufferForWebXrOverlayElements() override;
+  void PrepareBufferForContentQuadLayer(
+      const gfx::Transform& quad_transform) override;
+  void PrepareBufferForBrowserUi() override;
+  void OnFinishedDrawingBuffer() override;
+  void GetWebXrDrawParams(int* texture_id, Transform* uv_transform) override;
+  bool IsContentQuadReady() override;
+  void ResumeContentRendering() override;
+  void BufferBoundsChanged(const gfx::Size& content_buffer_size,
+                           const gfx::Size& overlay_buffer_size) override;
+  void GetContentQuadDrawParams(Transform* uv_transform,
+                                float* border_x,
+                                float* border_y) override;
+  int GetContentBufferWidth() override;
+  bool Initialize(const scoped_refptr<gl::GLSurface>& surface) override;
+  bool RunInSkiaContext(base::OnceClosure callback) override;
+  void SetFrameDumpFilepathBase(std::string& filepath_base) override;
+
+  // Helpers:
+  bool EnsureMemoryBuffer(int width, int height);
+  gfx::Rect GetTextureSize();
+
+  device::mojom::VRDisplayInfoPtr info_;
+
+  scoped_refptr<ws::ContextProviderCommandBuffer> context_provider_;
+  gpu::gles2::GLES2Interface* gl_ = nullptr;
+  int last_width_ = 0;
+  int last_height_ = 0;
+  GLuint image_id_ = 0;  // Image corresponding to our target GpuMemoryBuffer.
+  GLuint dest_texture_id_ = 0;
+  GLuint draw_frame_buffer_ = 0;
+  std::unique_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer_;
+  gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_ = nullptr;
+
+  RenderInfo cached_info_ = {};
+
+  enum class DrawingBufferMode {
+    kWebXr,
+    kWebXrOverlayElements,
+    kContentQuad,
+    kBrowserUi,
+    kNone,
+  };
+
+  DrawingBufferMode prepared_drawing_buffer_ = DrawingBufferMode::kNone;
+};
+
+}  // namespace vr
+
+#endif  // CHROME_BROWSER_VR_WIN_GRAPHICS_DELEGATE_WIN_H_
diff --git a/chrome/browser/vr/win/input_delegate_win.cc b/chrome/browser/vr/win/input_delegate_win.cc
new file mode 100644
index 0000000..63dd5aa
--- /dev/null
+++ b/chrome/browser/vr/win/input_delegate_win.cc
@@ -0,0 +1,51 @@
+// Copyright 2018 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 "chrome/browser/vr/win/input_delegate_win.h"
+
+#include "chrome/browser/vr/input_event.h"
+#include "chrome/browser/vr/model/controller_model.h"
+
+namespace vr {
+
+InputDelegateWin::~InputDelegateWin() {}
+
+gfx::Transform InputDelegateWin::GetHeadPose() {
+  return head_pose_for_current_frame_;
+}
+
+void InputDelegateWin::OnTriggerEvent(bool pressed) {
+  // No input currently processed for desktop.
+}
+
+void InputDelegateWin::UpdateController(const gfx::Transform& head_pose,
+                                        base::TimeTicks current_time,
+                                        bool is_webxr_frame) {
+  // No input currently processed for desktop.
+}
+
+ControllerModel InputDelegateWin::GetControllerModel(
+    const gfx::Transform& head_pose) {
+  return {};
+}
+
+InputEventList InputDelegateWin::GetGestures(base::TimeTicks current_time) {
+  return {};
+}
+
+device::mojom::XRInputSourceStatePtr InputDelegateWin::GetInputSourceState() {
+  NOTREACHED();
+  device::mojom::XRInputSourceStatePtr state;
+  return state;
+}
+
+void InputDelegateWin::OnResume() {
+  NOTREACHED();
+}
+
+void InputDelegateWin::OnPause() {
+  NOTREACHED();
+}
+
+}  // namespace vr
diff --git a/chrome/browser/vr/win/input_delegate_win.h b/chrome/browser/vr/win/input_delegate_win.h
new file mode 100644
index 0000000..882374c
--- /dev/null
+++ b/chrome/browser/vr/win/input_delegate_win.h
@@ -0,0 +1,38 @@
+// Copyright 2018 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.
+
+#ifndef CHROME_BROWSER_VR_WIN_INPUT_DELEGATE_WIN_H_
+#define CHROME_BROWSER_VR_WIN_INPUT_DELEGATE_WIN_H_
+
+#include "chrome/browser/vr/input_delegate.h"
+
+namespace vr {
+
+class InputDelegateWin : public InputDelegate {
+ public:
+  ~InputDelegateWin() override;
+
+  // Push input state (head pose, current_time)
+  void OnPose(gfx::Transform head_pose_for_current_frame) {
+    head_pose_for_current_frame_ = head_pose_for_current_frame;
+  }
+
+ private:
+  gfx::Transform GetHeadPose() override;
+  void OnTriggerEvent(bool pressed) override;
+  void UpdateController(const gfx::Transform& head_pose,
+                        base::TimeTicks current_time,
+                        bool is_webxr_frame) override;
+  ControllerModel GetControllerModel(const gfx::Transform& head_pose) override;
+  InputEventList GetGestures(base::TimeTicks current_time) override;
+  device::mojom::XRInputSourceStatePtr GetInputSourceState() override;
+  void OnResume() override;
+  void OnPause() override;
+
+  gfx::Transform head_pose_for_current_frame_;
+};
+
+}  // namespace vr
+
+#endif  // CHROME_BROWSER_VR_WIN_INPUT_DELEGATE_WIN_H_
diff --git a/chrome/browser/vr/win/scheduler_delegate_win.cc b/chrome/browser/vr/win/scheduler_delegate_win.cc
new file mode 100644
index 0000000..0b23f1c
--- /dev/null
+++ b/chrome/browser/vr/win/scheduler_delegate_win.cc
@@ -0,0 +1,63 @@
+// Copyright 2018 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 "chrome/browser/vr/win/scheduler_delegate_win.h"
+
+#include "chrome/browser/vr/scheduler_browser_renderer_interface.h"
+
+namespace vr {
+
+SchedulerDelegateWin::SchedulerDelegateWin() = default;
+SchedulerDelegateWin::~SchedulerDelegateWin() {}
+
+void SchedulerDelegateWin::OnPose(base::OnceCallback<void()> on_frame_ended,
+                                  gfx::Transform head_pose) {
+  on_frame_ended_ = std::move(on_frame_ended);
+  base::TimeTicks now = base::TimeTicks::Now();
+  browser_renderer_->DrawWebXrFrame(now, head_pose);
+}
+
+void SchedulerDelegateWin::OnPause() {
+  NOTREACHED();
+}
+
+void SchedulerDelegateWin::OnResume() {
+  NOTREACHED();
+}
+
+void SchedulerDelegateWin::OnExitPresent() {
+  NOTREACHED();
+}
+
+void SchedulerDelegateWin::SetWebXrMode(bool enabled) {
+  NOTREACHED();
+}
+
+void SchedulerDelegateWin::SetShowingVrDialog(bool showing) {
+  NOTREACHED();
+}
+
+void SchedulerDelegateWin::SetBrowserRenderer(
+    SchedulerBrowserRendererInterface* browser_renderer) {
+  browser_renderer_ = browser_renderer;
+}
+
+void SchedulerDelegateWin::SubmitDrawnFrame(FrameType frame_type,
+                                            const gfx::Transform& head_pose) {
+  DCHECK(frame_type == FrameType::kWebXrFrame);
+  std::move(on_frame_ended_).Run();
+}
+
+void SchedulerDelegateWin::AddInputSourceState(
+    device::mojom::XRInputSourceStatePtr state) {
+  NOTREACHED();
+}
+
+void SchedulerDelegateWin::ConnectPresentingService(
+    device::mojom::VRDisplayInfoPtr display_info,
+    device::mojom::XRRuntimeSessionOptionsPtr options) {
+  NOTREACHED();
+}
+
+}  // namespace vr
diff --git a/chrome/browser/vr/win/scheduler_delegate_win.h b/chrome/browser/vr/win/scheduler_delegate_win.h
new file mode 100644
index 0000000..595f5047
--- /dev/null
+++ b/chrome/browser/vr/win/scheduler_delegate_win.h
@@ -0,0 +1,44 @@
+// Copyright 2018 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.
+
+#ifndef CHROME_BROWSER_VR_WIN_SCHEDULER_DELEGATE_WIN_H_
+#define CHROME_BROWSER_VR_WIN_SCHEDULER_DELEGATE_WIN_H_
+
+#include "chrome/browser/vr/scheduler_delegate.h"
+
+namespace vr {
+
+class SchedulerDelegateWin : public SchedulerDelegate {
+ public:
+  SchedulerDelegateWin();
+  ~SchedulerDelegateWin() override;
+
+  // Tell browser when poses available, when we rendered, etc.
+  void OnPose(base::OnceCallback<void()> on_frame_ended,
+              gfx::Transform head_pose);
+
+ private:
+  void OnPause() override;
+  void OnResume() override;
+
+  void OnExitPresent() override;
+  void SetWebXrMode(bool enabled) override;
+  void SetShowingVrDialog(bool showing) override;
+  void SetBrowserRenderer(
+      SchedulerBrowserRendererInterface* browser_renderer) override;
+  void SubmitDrawnFrame(FrameType frame_type,
+                        const gfx::Transform& head_pose) override;
+  void AddInputSourceState(device::mojom::XRInputSourceStatePtr state) override;
+  void ConnectPresentingService(
+      device::mojom::VRDisplayInfoPtr display_info,
+      device::mojom::XRRuntimeSessionOptionsPtr options) override;
+
+ private:
+  SchedulerBrowserRendererInterface* browser_renderer_ = nullptr;
+  base::OnceCallback<void()> on_frame_ended_;
+};
+
+}  // namespace vr
+
+#endif  // CHROME_BROWSER_VR_WIN_SCHEDULER_DELEGATE_WIN_H_
diff --git a/chrome/browser/vr/win/simple_overlay_renderer_win.cc b/chrome/browser/vr/win/simple_overlay_renderer_win.cc
deleted file mode 100644
index 1c6bedd..0000000
--- a/chrome/browser/vr/win/simple_overlay_renderer_win.cc
+++ /dev/null
@@ -1,155 +0,0 @@
-// Copyright 2018 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 <dxgi1_2.h>
-
-#include "chrome/browser/vr/win/simple_overlay_renderer_win.h"
-#include "content/public/browser/gpu_utils.h"
-#include "content/public/common/gpu_stream_constants.h"
-#include "gpu/command_buffer/client/gles2_interface.h"
-#include "mojo/public/cpp/system/platform_handle.h"
-
-namespace vr {
-
-SimpleOverlayRenderer::SimpleOverlayRenderer() {}
-SimpleOverlayRenderer::~SimpleOverlayRenderer() {}
-
-bool SimpleOverlayRenderer::InitializeOnMainThread() {
-  gpu::GpuChannelEstablishFactory* factory =
-      content::GetGpuChannelEstablishFactory();
-  scoped_refptr<gpu::GpuChannelHost> host = factory->EstablishGpuChannelSync();
-
-  gpu::ContextCreationAttribs attributes;
-  attributes.alpha_size = -1;
-  attributes.red_size = 8;
-  attributes.green_size = 8;
-  attributes.blue_size = 8;
-  attributes.stencil_size = 0;
-  attributes.depth_size = 0;
-  attributes.samples = 0;
-  attributes.sample_buffers = 0;
-  attributes.bind_generates_resource = false;
-
-  context_provider_ = base::MakeRefCounted<ws::ContextProviderCommandBuffer>(
-      host, factory->GetGpuMemoryBufferManager(), content::kGpuStreamIdDefault,
-      content::kGpuStreamPriorityUI, gpu::kNullSurfaceHandle,
-      GURL(std::string("chrome://gpu/SimpleOverlayRendererWin")),
-      false /* automatic flushes */, false /* support locking */,
-      false /* support grcontext */,
-      gpu::SharedMemoryLimits::ForMailboxContext(), attributes,
-      ws::command_buffer_metrics::ContextType::XR_COMPOSITING);
-  gpu_memory_buffer_manager_ = factory->GetGpuMemoryBufferManager();
-  return true;
-}
-
-void SimpleOverlayRenderer::InitializeOnGLThread() {
-  DCHECK(context_provider_);
-  if (context_provider_->BindToCurrentThread() == gpu::ContextResult::kSuccess)
-    gl_ = context_provider_->ContextGL();
-}
-
-void SimpleOverlayRenderer::Render() {
-  if (!gl_)
-    return;
-
-  int width = 512;
-  int height = 512;
-
-  // Create a memory buffer, and an image referencing that memory buffer.
-  if (!EnsureMemoryBuffer(width, height))
-    return;
-
-  // Create a texture id, and associate it with our image.
-  GLuint dest_texture_id;
-  gl_->GenTextures(1, &dest_texture_id);
-  GLenum target = GL_TEXTURE_2D;
-  gl_->BindTexture(target, dest_texture_id);
-  gl_->TexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-  gl_->TexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-  gl_->TexParameteri(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-  gl_->TexParameteri(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-  gl_->BindTexImage2DCHROMIUM(target, image_id_);
-  gl_->BindTexture(GL_TEXTURE_2D, 0);
-
-  // Bind our image/texture/memory buffer as the draw framebuffer.
-  GLuint draw_frame_buffer_;
-  gl_->GenFramebuffers(1, &draw_frame_buffer_);
-  gl_->BindFramebuffer(GL_DRAW_FRAMEBUFFER, draw_frame_buffer_);
-  gl_->FramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, target,
-                            dest_texture_id, 0);
-
-  // Do some drawing.
-  gl_->ClearColor(0, 1, 0, 0.5f);
-  gl_->Clear(GL_COLOR_BUFFER_BIT);
-
-  // Unbind the drawing buffer.
-  gl_->BindFramebuffer(GL_FRAMEBUFFER, 0);
-  gl_->DeleteFramebuffers(1, &draw_frame_buffer_);
-  gl_->BindTexture(target, dest_texture_id);
-  gl_->ReleaseTexImage2DCHROMIUM(target, image_id_);
-  gl_->DeleteTextures(1, &dest_texture_id);
-  gl_->BindTexture(target, 0);
-
-  // Flush.
-  gl_->ShallowFlushCHROMIUM();
-}
-
-mojo::ScopedHandle SimpleOverlayRenderer::GetTexture() {
-  // Hand out the gpu memory buffer.
-  mojo::ScopedHandle handle;
-  if (!gpu_memory_buffer_) {
-    return handle;
-  }
-
-  gfx::GpuMemoryBufferHandle gpu_handle = gpu_memory_buffer_->CloneHandle();
-  return mojo::WrapPlatformFile(gpu_handle.dxgi_handle.GetHandle());
-}
-
-gfx::RectF SimpleOverlayRenderer::GetLeft() {
-  return gfx::RectF(0, 0, 0.5, 1);
-}
-
-gfx::RectF SimpleOverlayRenderer::GetRight() {
-  return gfx::RectF(0.5, 0, 0.5, 1);
-}
-
-void SimpleOverlayRenderer::Cleanup() {
-  context_provider_ = nullptr;
-}
-
-bool SimpleOverlayRenderer::EnsureMemoryBuffer(int width, int height) {
-  if (last_width_ != width || last_height_ != height || !gpu_memory_buffer_) {
-    if (!gpu_memory_buffer_manager_)
-      return false;
-
-    if (image_id_) {
-      gl_->DestroyImageCHROMIUM(image_id_);
-      image_id_ = 0;
-    }
-
-    gpu_memory_buffer_ = gpu_memory_buffer_manager_->CreateGpuMemoryBuffer(
-        gfx::Size(width, height), gfx::BufferFormat::RGBA_8888,
-        gfx::BufferUsage::SCANOUT, gpu::kNullSurfaceHandle);
-    if (!gpu_memory_buffer_)
-      return false;
-
-    last_width_ = width;
-    last_height_ = height;
-
-    image_id_ = gl_->CreateImageCHROMIUM(gpu_memory_buffer_->AsClientBuffer(),
-                                         width, height, GL_RGBA);
-    if (!image_id_) {
-      gpu_memory_buffer_ = nullptr;
-      return false;
-    }
-  }
-  return true;
-}
-
-void SimpleOverlayRenderer::ResetMemoryBuffer() {
-  // Stop using a memory buffer if we had an error submitting with it.
-  gpu_memory_buffer_ = nullptr;
-}
-
-}  // namespace vr
diff --git a/chrome/browser/vr/win/simple_overlay_renderer_win.h b/chrome/browser/vr/win/simple_overlay_renderer_win.h
deleted file mode 100644
index 9d08078a..0000000
--- a/chrome/browser/vr/win/simple_overlay_renderer_win.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2018 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.
-
-#ifndef CHROME_BROWSER_VR_WIN_SIMPLE_OVERLAY_RENDERER_WIN_H_
-#define CHROME_BROWSER_VR_WIN_SIMPLE_OVERLAY_RENDERER_WIN_H_
-
-#include "gpu/GLES2/gl2extchromium.h"
-#include "gpu/command_buffer/client/gles2_interface.h"
-#include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
-#include "gpu/command_buffer/common/context_creation_attribs.h"
-#include "gpu/ipc/client/gpu_channel_host.h"
-#include "mojo/public/cpp/system/handle.h"
-#include "services/ws/public/cpp/gpu/context_provider_command_buffer.h"
-#include "ui/gfx/geometry/rect_f.h"
-
-namespace vr {
-
-// This class renders an simple solid-color overlay that can be submitted to
-// be composited on top of WebXR content.  Note that it is not used outside
-// manual testing (requires build changes to enable), and will be replaced with
-// VR-UI overlays.
-class SimpleOverlayRenderer {
- public:
-  SimpleOverlayRenderer();
-  ~SimpleOverlayRenderer();
-
-  // Called on main UI thread.
-  bool InitializeOnMainThread();
-
-  // Called on background GL thread.
-  void InitializeOnGLThread();
-  void Cleanup();
-  void Render();
-  mojo::ScopedHandle GetTexture();
-  gfx::RectF GetLeft();
-  gfx::RectF GetRight();
-  void ResetMemoryBuffer();
-
- private:
-  bool EnsureMemoryBuffer(int width, int height);
-
-  scoped_refptr<ws::ContextProviderCommandBuffer> context_provider_;
-  gpu::gles2::GLES2Interface* gl_ = nullptr;
-  int last_width_ = 0;
-  int last_height_ = 0;
-  GLuint image_id_ = 0;
-  std::unique_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer_;
-  gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_ = nullptr;
-};
-
-}  // namespace vr
-
-#endif  // CHROME_BROWSER_VR_WIN_SIMPLE_OVERLAY_RENDERER_WIN_H_
diff --git a/chrome/browser/vr/win/vr_browser_renderer_thread_win.cc b/chrome/browser/vr/win/vr_browser_renderer_thread_win.cc
index 67b4ec9cc..a4c84d17 100644
--- a/chrome/browser/vr/win/vr_browser_renderer_thread_win.cc
+++ b/chrome/browser/vr/win/vr_browser_renderer_thread_win.cc
@@ -4,26 +4,53 @@
 
 #include "chrome/browser/vr/win/vr_browser_renderer_thread_win.h"
 
+#include "chrome/browser/vr/audio_delegate.h"
+#include "chrome/browser/vr/browser_renderer.h"
+#include "chrome/browser/vr/content_input_delegate.h"
+#include "chrome/browser/vr/keyboard_delegate.h"
+#include "chrome/browser/vr/text_input_delegate.h"
+#include "chrome/browser/vr/ui.h"
+#include "chrome/browser/vr/ui_browser_interface.h"
+#include "chrome/browser/vr/ui_initial_state.h"
+#include "chrome/browser/vr/win/graphics_delegate_win.h"
+#include "chrome/browser/vr/win/input_delegate_win.h"
+#include "chrome/browser/vr/win/scheduler_delegate_win.h"
+#include "gpu/command_buffer/client/gles2_interface.h"
+#include "gpu/command_buffer/client/gles2_lib.h"
+#include "ui/gfx/geometry/quaternion.h"
+
 namespace vr {
 
 VRBrowserRendererThreadWin::VRBrowserRendererThreadWin()
-    : base::Thread("VRBrowserRenderThread") {}
+    : MaybeThread("VRBrowserRenderThread") {}
 
 VRBrowserRendererThreadWin::~VRBrowserRendererThreadWin() {
   Stop();
 }
 
+void VRBrowserRendererThreadWin::SetVRDisplayInfo(
+    device::mojom::VRDisplayInfoPtr display_info) {
+  task_runner()->PostTask(
+      FROM_HERE,
+      base::BindOnce(&VRBrowserRendererThreadWin::SetDisplayInfoOnRenderThread,
+                     base::Unretained(this), std::move(display_info)));
+}
+
+void VRBrowserRendererThreadWin::SetDisplayInfoOnRenderThread(
+    device::mojom::VRDisplayInfoPtr display_info) {
+  display_info_ = std::move(display_info);
+  if (graphics_)
+    graphics_->SetVRDisplayInfo(display_info_.Clone());
+}
+
 void VRBrowserRendererThreadWin::StartOverlay(
     device::mojom::XRCompositorHost* compositor) {
   device::mojom::ImmersiveOverlayPtrInfo overlay_info;
   compositor->CreateImmersiveOverlay(mojo::MakeRequest(&overlay_info));
 
-  if (!IsRunning()) {
-    if (!renderer_.InitializeOnMainThread()) {
-      return;
-    }
-
-    Start();
+  initializing_graphics_ = std::make_unique<GraphicsDelegateWin>();
+  if (!initializing_graphics_->InitializeOnMainThread()) {
+    return;
   }
 
   // Post a task to the thread to start an overlay.
@@ -34,33 +61,146 @@
 }
 
 void VRBrowserRendererThreadWin::CleanUp() {
-  renderer_.Cleanup();
+  browser_renderer_ = nullptr;
+  initializing_graphics_ = nullptr;
   overlay_ = nullptr;
 }
 
+namespace {
+// Number of frames to use for sliding averages for pose timings,
+// as used for estimating prediction times.
+constexpr unsigned kSlidingAverageSize = 5;
+}  // namespace
+
+class VRUiBrowserInterface : public UiBrowserInterface {
+ public:
+  ~VRUiBrowserInterface() override = default;
+
+  void ExitPresent() override {}
+  void ExitFullscreen() override {}
+  void Navigate(GURL gurl, NavigationMethod method) override {}
+  void NavigateBack() override {}
+  void NavigateForward() override {}
+  void ReloadTab() override {}
+  void OpenNewTab(bool incognito) override {}
+  void SelectTab(int id, bool incognito) override {}
+  void OpenBookmarks() override {}
+  void OpenRecentTabs() override {}
+  void OpenHistory() override {}
+  void OpenDownloads() override {}
+  void OpenShare() override {}
+  void OpenSettings() override {}
+  void CloseTab(int id, bool incognito) override {}
+  void CloseAllTabs() override {}
+  void CloseAllIncognitoTabs() override {}
+  void OpenFeedback() override {}
+  void CloseHostedDialog() override {}
+  void OnUnsupportedMode(UiUnsupportedMode mode) override {}
+  void OnExitVrPromptResult(ExitVrPromptChoice choice,
+                            UiUnsupportedMode reason) override {}
+  void OnContentScreenBoundsChanged(const gfx::SizeF& bounds) override {}
+  void SetVoiceSearchActive(bool active) override {}
+  void StartAutocomplete(const AutocompleteRequest& request) override {}
+  void StopAutocomplete() override {}
+  void ShowPageInfo() override {}
+};
+
 void VRBrowserRendererThreadWin::StartOverlayOnRenderThread(
     device::mojom::ImmersiveOverlayPtrInfo overlay) {
   overlay_.Bind(std::move(overlay));
+  initializing_graphics_->InitializeOnGLThread();
+  initializing_graphics_->BindContext();
 
-  renderer_.InitializeOnGLThread();
+  // Create a vr::Ui
+  BrowserRendererBrowserInterface* browser_renderer_interface = nullptr;
+  ui_browser_interface_ = std::make_unique<VRUiBrowserInterface>();
+  PlatformInputHandler* input = nullptr;
+  std::unique_ptr<KeyboardDelegate> keyboard_delegate;
+  std::unique_ptr<TextInputDelegate> text_input_delegate;
+  std::unique_ptr<AudioDelegate> audio_delegate;
+  UiInitialState ui_initial_state = {};
+  ui_initial_state.in_web_vr = true;
+  ui_initial_state.browsing_disabled = true;
+  ui_initial_state.supports_selection = false;
+  std::unique_ptr<Ui> ui = std::make_unique<Ui>(
+      ui_browser_interface_.get(), input, std::move(keyboard_delegate),
+      std::move(text_input_delegate), std::move(audio_delegate),
+      ui_initial_state);
+  static_cast<UiInterface*>(ui.get())->OnGlInitialized(
+      kGlTextureLocationLocal,
+      0 /* content_texture_id - we don't support content */,
+      0 /* content_overlay_texture_id - we don't support content overlays */,
+      0 /* platform_ui_texture_id - we don't support platform UI */);
+  static_cast<BrowserUiInterface*>(ui.get())->SetWebVrMode(true);
+
+  // Create the delegates, and keep raw pointers to them.  They are owned by
+  // browser_renderer_.
+  std::unique_ptr<SchedulerDelegateWin> scheduler_delegate =
+      std::make_unique<SchedulerDelegateWin>();
+  scheduler_ = scheduler_delegate.get();
+  graphics_ = initializing_graphics_.get();
+  graphics_->SetVRDisplayInfo(display_info_.Clone());
+  std::unique_ptr<InputDelegateWin> input_delegate =
+      std::make_unique<InputDelegateWin>();
+  input_ = input_delegate.get();
+
+  // Create the BrowserRenderer to drive UI rendering based on the delegates.
+  browser_renderer_ = std::make_unique<BrowserRenderer>(
+      std::move(ui), std::move(scheduler_delegate),
+      std::move(initializing_graphics_), std::move(input_delegate),
+      browser_renderer_interface, kSlidingAverageSize);
 
   overlay_->SetOverlayAndWebXRVisibility(true, true);
   overlay_->RequestNextOverlayPose(base::BindOnce(
       &VRBrowserRendererThreadWin::OnPose, base::Unretained(this)));
+  graphics_->ClearContext();
 }
 
 void VRBrowserRendererThreadWin::OnPose(device::mojom::XRFrameDataPtr data) {
-  renderer_.Render();
+  // Deliver pose to input and scheduler.
+  const std::vector<float>& quat = *data->pose->orientation;
+  const std::vector<float>& pos = *data->pose->position;
+
+  // The incoming pose represents where the headset is in "world space".  So
+  // we'll need to invert to get the view transform.
+
+  // Negating the w component will invert the rotation.
+  gfx::Transform head_from_unoriented_head(
+      gfx::Quaternion(quat[0], quat[1], quat[2], -quat[3]));
+
+  // Negating all components will invert the translation.
+  gfx::Transform unoriented_head_from_world;
+  unoriented_head_from_world.Translate3d(-pos[0], -pos[1], -pos[2]);
+
+  // Compose these to get the base "view" matrix (before accounting for per-eye
+  // transforms).
+  gfx::Transform head_from_world =
+      head_from_unoriented_head * unoriented_head_from_world;
+
+  input_->OnPose(head_from_world);
+  graphics_->PreRender();
+
+  // base::Unretained is safe because scheduler_ will be destroyed without
+  // calling the callback if we are destroyed.
+  scheduler_->OnPose(base::BindOnce(&VRBrowserRendererThreadWin::SubmitFrame,
+                                    base::Unretained(this), std::move(data)),
+                     head_from_world);
+}
+
+void VRBrowserRendererThreadWin::SubmitFrame(
+    device::mojom::XRFrameDataPtr data) {
+  graphics_->PostRender();
+
   overlay_->SubmitOverlayTexture(
-      data->frame_id, renderer_.GetTexture(), renderer_.GetLeft(),
-      renderer_.GetRight(),
+      data->frame_id, graphics_->GetTexture(), graphics_->GetLeft(),
+      graphics_->GetRight(),
       base::BindOnce(&VRBrowserRendererThreadWin::SubmitResult,
                      base::Unretained(this)));
 }
 
 void VRBrowserRendererThreadWin::SubmitResult(bool success) {
   if (!success) {
-    renderer_.ResetMemoryBuffer();
+    graphics_->ResetMemoryBuffer();
   }
   overlay_->RequestNextOverlayPose(base::BindOnce(
       &VRBrowserRendererThreadWin::OnPose, base::Unretained(this)));
diff --git a/chrome/browser/vr/win/vr_browser_renderer_thread_win.h b/chrome/browser/vr/win/vr_browser_renderer_thread_win.h
index f6e9fa7..5ded2e6f 100644
--- a/chrome/browser/vr/win/vr_browser_renderer_thread_win.h
+++ b/chrome/browser/vr/win/vr_browser_renderer_thread_win.h
@@ -6,36 +6,82 @@
 #define CHROME_BROWSER_VR_WIN_VR_BROWSER_RENDERER_THREAD_WIN_H_
 
 #include "base/threading/thread.h"
+#include "chrome/browser/vr/browser_renderer.h"
+#include "chrome/browser/vr/service/browser_xr_runtime.h"
 #include "content/public/browser/web_contents.h"
 #include "device/vr/public/mojom/isolated_xr_service.mojom.h"
 #include "device/vr/public/mojom/vr_service.mojom.h"
 
-#include "chrome/browser/vr/win/simple_overlay_renderer_win.h"
-
-#include "chrome/browser/vr/service/browser_xr_runtime.h"
-
 namespace vr {
 
-class VRBrowserRendererThreadWin : base::Thread {
+class InputDelegateWin;
+class GraphicsDelegateWin;
+class SchedulerDelegateWin;
+class VRUiBrowserInterface;
+
+// TODO(https://crbug.com/902576) There were issues initializing gfx::FontList
+// on a background thread, so run UI on the main thread.
+#define VR_UI_ON_MAIN_THREAD
+
+#ifdef VR_UI_ON_MAIN_THREAD
+
+class MaybeThread {
+ public:
+  explicit MaybeThread(std::string) {}
+  virtual ~MaybeThread() = default;
+  virtual void CleanUp() {}
+  void Start() {}
+  void Stop() { CleanUp(); }
+  scoped_refptr<base::SingleThreadTaskRunner> task_runner() {
+    return scoped_refptr<base::SingleThreadTaskRunner>(
+        base::ThreadTaskRunnerHandle::Get());
+  }
+};
+
+#else
+
+class MaybeThread : public base::Thread {
+  explicit MaybeThread(std::string name) : base::Thread(name) {}
+};
+
+#endif
+
+class VRBrowserRendererThreadWin : public MaybeThread {
  public:
   VRBrowserRendererThreadWin();
   ~VRBrowserRendererThreadWin() override;
 
+  // Methods called on the browser's main thread.
+  void StartOverlay(device::mojom::XRCompositorHost* host);
+  void SetVRDisplayInfo(device::mojom::VRDisplayInfoPtr display_info);
+
+ private:
   // base::Thread overrides
   void CleanUp() override;
 
-  // Initially we are just rendering a solid-color rectangle overlay as a
-  // proof-of-concept.  Eventually, this will draw real content.
-  void StartOverlay(device::mojom::XRCompositorHost* host);
-
- private:
+  // Methods called on render thread.
   void StartOverlayOnRenderThread(
       device::mojom::ImmersiveOverlayPtrInfo overlay);
+  void SetDisplayInfoOnRenderThread(
+      device::mojom::VRDisplayInfoPtr display_info);
   void OnPose(device::mojom::XRFrameDataPtr data);
   void SubmitResult(bool success);
+  void SubmitFrame(device::mojom::XRFrameDataPtr data);
 
-  SimpleOverlayRenderer renderer_;
+  // We need to do some initialization of GraphicsDelegateWin before
+  // browser_renderer_, so we first store it in a unique_ptr, then transition
+  // ownership to browser_renderer_.
+  std::unique_ptr<GraphicsDelegateWin> initializing_graphics_;
+  std::unique_ptr<VRUiBrowserInterface> ui_browser_interface_;
+  std::unique_ptr<BrowserRenderer> browser_renderer_;
+
+  // Raw pointers to objects owned by browser_renderer_:
+  InputDelegateWin* input_ = nullptr;
+  GraphicsDelegateWin* graphics_ = nullptr;
+  SchedulerDelegateWin* scheduler_ = nullptr;
+
   device::mojom::ImmersiveOverlayPtr overlay_;
+  device::mojom::VRDisplayInfoPtr display_info_;
 };
 
 }  // namespace vr
diff --git a/chrome/browser/vr/win/vr_renderloop_host_win.cc b/chrome/browser/vr/win/vr_renderloop_host_win.cc
index f3c3aa5..ad5e7de9 100644
--- a/chrome/browser/vr/win/vr_renderloop_host_win.cc
+++ b/chrome/browser/vr/win/vr_renderloop_host_win.cc
@@ -40,6 +40,14 @@
     StopBrowserRenderer();
 }
 
+void VRBrowserRendererHostWin::SetVRDisplayInfo(
+    device::mojom::VRDisplayInfoPtr display_info) {
+  info_ = std::move(display_info);
+  if (render_thread_) {
+    render_thread_->SetVRDisplayInfo(info_.Clone());
+  }
+}
+
 void VRBrowserRendererHostWin::AddCompositor(
     device::mojom::VRDisplayInfoPtr info,
     device::mojom::XRCompositorHostPtr compositor) {
@@ -58,9 +66,11 @@
 
 void VRBrowserRendererHostWin::StartBrowserRenderer() {
 // Only used for testing currently.  To see an example overlay, enable the
-// following two lines.
+// following few lines.
 #if 0
   render_thread_ = std::make_unique<VRBrowserRendererThreadWin>();
+  render_thread_->Start();
+  render_thread_->SetVRDisplayInfo(info_.Clone());
   render_thread_->StartOverlay(compositor_.get());
 #endif
 }
diff --git a/chrome/browser/vr/win/vr_renderloop_host_win.h b/chrome/browser/vr/win/vr_renderloop_host_win.h
index a3575dce..56d4f287 100644
--- a/chrome/browser/vr/win/vr_renderloop_host_win.h
+++ b/chrome/browser/vr/win/vr_renderloop_host_win.h
@@ -32,6 +32,7 @@
   // The parameter contents indicate which page is rendering with WebXR or WebVR
   // presentation.  When null, no page is presenting.
   void SetWebXRWebContents(content::WebContents* contents) override;
+  void SetVRDisplayInfo(device::mojom::VRDisplayInfoPtr display_info) override;
 
   void StartBrowserRenderer();
   void StopBrowserRenderer();
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
index a306ac17..a0c75a7 100644
--- a/chrome/common/chrome_features.cc
+++ b/chrome/common/chrome_features.cc
@@ -648,7 +648,7 @@
 
 // Enable running shill in a minijail sandbox on Chrome OS.
 const base::Feature kShillSandboxing{"ShillSandboxing",
-                                     base::FEATURE_DISABLED_BY_DEFAULT};
+                                     base::FEATURE_ENABLED_BY_DEFAULT};
 #endif  // defined(OS_CHROMEOS)
 
 // Enable showing a tab-modal dialog while a Web Authentication API request is
diff --git a/chrome/common/safe_browsing/OWNERS b/chrome/common/safe_browsing/OWNERS
index 5c8681db..1b014cb 100644
--- a/chrome/common/safe_browsing/OWNERS
+++ b/chrome/common/safe_browsing/OWNERS
@@ -1,4 +1,4 @@
-jialiul@chromium.org
+drubery@chromium.org
 nparker@chromium.org
 vakh@chromium.org
 
@@ -19,3 +19,5 @@
 per-file *_param_traits*.*=file://ipc/SECURITY_OWNERS
 per-file *.typemap=set noparent
 per-file *.typemap=file://ipc/SECURITY_OWNERS
+
+# COMPONENT: Services>Safebrowsing
diff --git a/chrome/renderer/safe_browsing/OWNERS b/chrome/renderer/safe_browsing/OWNERS
index 50851251..ba1319fe 100644
--- a/chrome/renderer/safe_browsing/OWNERS
+++ b/chrome/renderer/safe_browsing/OWNERS
@@ -1,3 +1,4 @@
-jialiul@chromium.org
 nparker@chromium.org
 vakh@chromium.org
+
+# COMPONENT: Services>Safebrowsing
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index c354063..c4fec94 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -678,9 +678,6 @@
       "../browser/net/network_quality_netinfo_browsertest.cc",
       "../browser/net/network_quality_tracker_browsertest.cc",
       "../browser/net/network_request_metrics_browsertest.cc",
-      "../browser/net/nqe/ui_network_quality_estimator_service_browsertest.cc",
-      "../browser/net/nqe/ui_network_quality_estimator_service_test_util.cc",
-      "../browser/net/nqe/ui_network_quality_estimator_service_test_util.h",
       "../browser/net/nss_context_chromeos_browsertest.cc",
       "../browser/net/profile_network_context_service_browsertest.cc",
       "../browser/net/proxy_browsertest.cc",
@@ -1850,6 +1847,7 @@
         "//chrome/browser/chromeos:arc_test_support",
         "//chrome/browser/resources/chromeos/chromevox:browser_tests",
         "//chrome/browser/resources/chromeos/select_to_speak:browser_tests",
+        "//chrome/browser/resources/chromeos/switch_access:browser_tests",
         "//chrome/services/file_util/public/cpp:browser_tests",
         "//chromeos/components/drivefs:test_support",
         "//components/arc:arc_test_support",
diff --git a/chrome/test/chromedriver/client/chromedriver.py b/chrome/test/chromedriver/client/chromedriver.py
index 4d9bcde..c22d3bc 100644
--- a/chrome/test/chromedriver/client/chromedriver.py
+++ b/chrome/test/chromedriver/client/chromedriver.py
@@ -312,7 +312,8 @@
     if (not self.w3c_compliant and 'status' in response
         and response['status'] != 0):
       raise _ExceptionForLegacyResponse(response)
-    elif self.w3c_compliant and 'error' in response['value']:
+    elif (self.w3c_compliant and response['value'] is not None
+          and 'error' in response['value']):
       raise _ExceptionForStandardResponse(response)
     return response
 
diff --git a/chrome/test/chromedriver/client/webelement.py b/chrome/test/chromedriver/client/webelement.py
index 7f777fc..9eda862 100644
--- a/chrome/test/chromedriver/client/webelement.py
+++ b/chrome/test/chromedriver/client/webelement.py
@@ -61,6 +61,9 @@
         typing.append(value[i])
     self._Execute(Command.SEND_KEYS_TO_ELEMENT, {'value': typing})
 
+  def SendKeysW3c(self, text):
+    self._Execute(Command.SEND_KEYS_TO_ELEMENT, {'text': text})
+
   def GetLocation(self):
     return self._Execute(Command.GET_ELEMENT_LOCATION)
 
diff --git a/chrome/test/chromedriver/element_commands.cc b/chrome/test/chromedriver/element_commands.cc
index a25ad7e..73d3fe1d 100644
--- a/chrome/test/chromedriver/element_commands.cc
+++ b/chrome/test/chromedriver/element_commands.cc
@@ -319,8 +319,17 @@
                                 const base::DictionaryValue& params,
                                 std::unique_ptr<base::Value>* value) {
   const base::ListValue* key_list;
-  if (!params.GetList("value", &key_list))
-    return Status(kUnknownError, "'value' must be a list");
+  base::ListValue key_list_local;
+  if (session->w3c_compliant) {
+    const base::Value* text;
+    if (!params.Get("text", &text) || !text->is_string())
+      return Status(kInvalidArgument, "'text' must be a string");
+    key_list_local.Set(0, std::make_unique<base::Value>(text->Clone()));
+    key_list = &key_list_local;
+  } else {
+    if (!params.GetList("value", &key_list))
+      return Status(kUnknownError, "'value' must be a list");
+  }
 
   bool is_input = false;
   Status status = IsElementAttributeEqualToIgnoreCase(
diff --git a/chrome/test/chromedriver/test/run_py_tests.py b/chrome/test/chromedriver/test/run_py_tests.py
index 00e7786..0e2ef4e 100755
--- a/chrome/test/chromedriver/test/run_py_tests.py
+++ b/chrome/test/chromedriver/test/run_py_tests.py
@@ -1757,6 +1757,29 @@
     self.assertEquals('test', report['type']);
     self.assertEquals('test report message', report['body']['message']);
 
+# Tests in the following class are expected to be moved to ChromeDriverTest
+# class when we no longer support the legacy mode.
+class ChromeDriverW3cTest(ChromeDriverBaseTestWithWebServer):
+  """W3C mode specific tests."""
+
+  def setUp(self):
+    self._driver = self.CreateDriver(
+        send_w3c_capability=True, send_w3c_request=True)
+
+  def testSendKeysToElement(self):
+    self._driver.Load(self.GetHttpUrlForFile('/chromedriver/empty.html'))
+    text = self._driver.ExecuteScript(
+        'document.body.innerHTML = \'<input type="text">\';'
+        'var input = document.getElementsByTagName("input")[0];'
+        'input.addEventListener("change", function() {'
+        '  document.body.appendChild(document.createElement("br"));'
+        '});'
+        'return input;')
+    text.SendKeysW3c('0123456789+-*/ Hi')
+    text.SendKeysW3c(', there!')
+    value = self._driver.ExecuteScript('return arguments[0].value;', text)
+    self.assertEquals('0123456789+-*/ Hi, there!', value)
+
 class ChromeDriverSiteIsolation(ChromeDriverBaseTestWithWebServer):
   """Tests for ChromeDriver with the new Site Isolation Chrome feature.
 
diff --git a/chrome/utility/safe_browsing/OWNERS b/chrome/utility/safe_browsing/OWNERS
index 50851251..fede9e2 100644
--- a/chrome/utility/safe_browsing/OWNERS
+++ b/chrome/utility/safe_browsing/OWNERS
@@ -1,3 +1,5 @@
-jialiul@chromium.org
+drubery@chromium.org
 nparker@chromium.org
 vakh@chromium.org
+
+# COMPONENT: Services>Safebrowsing
diff --git a/chromecast/BUILD.gn b/chromecast/BUILD.gn
index 72ecbb35..1778877 100644
--- a/chromecast/BUILD.gn
+++ b/chromecast/BUILD.gn
@@ -575,6 +575,7 @@
     "DISABLE_SECURE_FLAC_OPUS_DECODING=$disable_secure_flac_and_opus_decoding",
     "ENABLE_ASSISTANT=$enable_assistant",
     "ENABLE_CAST_FRAGMENT=$enable_cast_fragment",
+    "ENABLE_CAST_WAYLAND_SERVER=$enable_cast_wayland_server",
     "ENABLE_CHROMECAST_EXTENSIONS=$enable_chromecast_extensions",
     "ENABLE_HEADLESS_MUSIC_MODE=$enable_headless_music_mode",
     "ENABLE_PLAYREADY=$enable_playready",
diff --git a/chromecast/browser/BUILD.gn b/chromecast/browser/BUILD.gn
index 6b80433..f388bbe9 100644
--- a/chromecast/browser/BUILD.gn
+++ b/chromecast/browser/BUILD.gn
@@ -329,6 +329,17 @@
     ]
   }
 
+  if (enable_cast_wayland_server) {
+    sources += [
+      "exo/wm_helper_cast_shell.cc",
+      "exo/wm_helper_cast_shell.h",
+    ]
+    deps += [
+      "//components/exo",
+      "//components/exo/wayland",
+    ]
+  }
+
   configs += [ "//media/audio:platform_config" ]
 }
 
diff --git a/chromecast/browser/exo/DEPS b/chromecast/browser/exo/DEPS
new file mode 100644
index 0000000..c0058eb
--- /dev/null
+++ b/chromecast/browser/exo/DEPS
@@ -0,0 +1,3 @@
+include_rules = [
+  "+components/exo"
+]
diff --git a/chromecast/browser/exo/wm_helper_cast_shell.cc b/chromecast/browser/exo/wm_helper_cast_shell.cc
new file mode 100644
index 0000000..83b08a9
--- /dev/null
+++ b/chromecast/browser/exo/wm_helper_cast_shell.cc
@@ -0,0 +1,199 @@
+// Copyright 2018 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 "chromecast/browser/exo/wm_helper_cast_shell.h"
+
+#include "base/memory/singleton.h"
+#include "chromecast/browser/cast_browser_process.h"
+#include "chromecast/graphics/cast_screen.h"
+#include "chromecast/graphics/cast_window_manager_aura.h"
+#include "ui/aura/client/focus_client.h"
+#include "ui/base/dragdrop/drag_drop_types.h"
+#include "ui/display/display.h"
+#include "ui/display/manager/display_configurator.h"
+#include "ui/display/manager/display_manager.h"
+#include "ui/display/screen.h"
+#include "ui/display/types/display_snapshot.h"
+#include "ui/events/devices/input_device_manager.h"
+#include "ui/wm/public/activation_client.h"
+
+namespace exo {
+
+WMHelperCastShell::WMHelperCastShell(
+    aura::Env* env,
+    chromecast::CastWindowManagerAura* cast_window_manager_aura,
+    CastScreen* cast_screen)
+    : cast_window_manager_aura_(cast_window_manager_aura),
+      env_(env),
+      cast_screen_(cast_screen) {
+  cast_screen_->AddObserver(&display_observer_);
+}
+
+WMHelperCastShell::~WMHelperCastShell() {
+  cast_screen_->RemoveObserver(&display_observer_);
+}
+
+aura::Env* WMHelperCastShell::env() {
+  return env_;
+}
+
+void WMHelperCastShell::AddActivationObserver(
+    wm::ActivationChangeObserver* observer) {
+  NOTIMPLEMENTED();
+}
+
+void WMHelperCastShell::RemoveActivationObserver(
+    wm::ActivationChangeObserver* observer) {
+  NOTIMPLEMENTED();
+}
+
+void WMHelperCastShell::AddFocusObserver(
+    aura::client::FocusChangeObserver* observer) {
+  NOTIMPLEMENTED();
+}
+
+void WMHelperCastShell::RemoveFocusObserver(
+    aura::client::FocusChangeObserver* observer) {
+  NOTIMPLEMENTED();
+}
+
+void WMHelperCastShell::AddDragDropObserver(DragDropObserver* observer) {
+  drag_drop_observers_.AddObserver(observer);
+}
+
+void WMHelperCastShell::RemoveDragDropObserver(DragDropObserver* observer) {
+  drag_drop_observers_.RemoveObserver(observer);
+}
+
+void WMHelperCastShell::SetDragDropDelegate(aura::Window* window) {
+  aura::client::SetDragDropDelegate(window, this);
+}
+
+void WMHelperCastShell::ResetDragDropDelegate(aura::Window* window) {
+  aura::client::SetDragDropDelegate(window, nullptr);
+}
+
+void WMHelperCastShell::AddVSyncObserver(
+    ui::CompositorVSyncManager::Observer* observer) {
+  NOTIMPLEMENTED();
+}
+
+void WMHelperCastShell::RemoveVSyncObserver(
+    ui::CompositorVSyncManager::Observer* observer) {
+  NOTIMPLEMENTED();
+}
+
+void WMHelperCastShell::OnDragEntered(const ui::DropTargetEvent& event) {}
+
+int WMHelperCastShell::OnDragUpdated(const ui::DropTargetEvent& event) {}
+
+void WMHelperCastShell::OnDragExited() {}
+
+int WMHelperCastShell::OnPerformDrop(const ui::DropTargetEvent& event) {
+  NOTIMPLEMENTED();
+  return ui::DragDropTypes::DRAG_MOVE;
+}
+
+const display::ManagedDisplayInfo& WMHelperCastShell::GetDisplayInfo(
+    int64_t display_id) const {
+  return display_observer_.GetDisplayInfo(display_id);
+}
+
+const std::vector<uint8_t>& WMHelperCastShell::GetDisplayIdentificationData(
+    int64_t display_id) const {
+  NOTIMPLEMENTED();
+  static std::vector<uint8_t> no_data;
+  return no_data;
+}
+
+aura::Window* WMHelperCastShell::GetPrimaryDisplayContainer(int container_id) {
+  return cast_window_manager_aura_->GetRootWindow();
+}
+
+aura::Window* WMHelperCastShell::GetActiveWindow() const {
+  NOTIMPLEMENTED();
+  return nullptr;
+}
+
+aura::Window* WMHelperCastShell::GetFocusedWindow() const {
+  NOTIMPLEMENTED();
+  return nullptr;
+}
+
+aura::Window* WMHelperCastShell::GetRootWindowForNewWindows() const {
+  return cast_window_manager_aura_->GetRootWindow();
+}
+
+aura::client::CursorClient* WMHelperCastShell::GetCursorClient() {
+  NOTIMPLEMENTED();
+  return nullptr;
+}
+
+void WMHelperCastShell::AddPreTargetHandler(ui::EventHandler* handler) {
+  NOTIMPLEMENTED();
+}
+
+void WMHelperCastShell::PrependPreTargetHandler(ui::EventHandler* handler) {
+  NOTIMPLEMENTED();
+}
+
+void WMHelperCastShell::RemovePreTargetHandler(ui::EventHandler* handler) {
+  NOTIMPLEMENTED();
+}
+
+void WMHelperCastShell::AddPostTargetHandler(ui::EventHandler* handler) {
+  NOTIMPLEMENTED();
+}
+
+void WMHelperCastShell::RemovePostTargetHandler(ui::EventHandler* handler) {
+  NOTIMPLEMENTED();
+}
+
+bool WMHelperCastShell::IsTabletModeWindowManagerEnabled() const {
+  NOTIMPLEMENTED();
+  return false;
+}
+
+double WMHelperCastShell::GetDefaultDeviceScaleFactor() const {
+  NOTIMPLEMENTED();
+  return 1.0;
+}
+
+WMHelperCastShell::CastDisplayObserver::CastDisplayObserver() {}
+
+WMHelperCastShell::CastDisplayObserver::~CastDisplayObserver() {}
+
+void WMHelperCastShell::CastDisplayObserver::OnWillProcessDisplayChanges() {}
+
+void WMHelperCastShell::CastDisplayObserver::OnDidProcessDisplayChanges() {}
+
+void WMHelperCastShell::CastDisplayObserver::OnDisplayAdded(
+    const display::Display& new_display) {
+  display::ManagedDisplayInfo md(new_display.id(), "CastDisplayInfo", true);
+  md.SetBounds(new_display.bounds());
+  display_info_.emplace(new_display.id(), md);
+}
+
+void WMHelperCastShell::CastDisplayObserver::OnDisplayRemoved(
+    const display::Display& old_display) {
+  display_info_.erase(old_display.id());
+}
+
+void WMHelperCastShell::CastDisplayObserver::OnDisplayMetricsChanged(
+    const display::Display& display,
+    uint32_t changed_metrics) {
+  // Currently only updates bounds
+  if ((DISPLAY_METRIC_BOUNDS & changed_metrics) == DISPLAY_METRIC_BOUNDS)
+    display_info_[display.id()].SetBounds(display.bounds());
+}
+
+const display::ManagedDisplayInfo&
+WMHelperCastShell::CastDisplayObserver::GetDisplayInfo(
+    int64_t display_id) const {
+  auto iter = display_info_.find(display_id);
+  CHECK(iter != display_info_.end()) << display_id;
+  return iter->second;
+}
+
+}  // namespace exo
diff --git a/chromecast/browser/exo/wm_helper_cast_shell.h b/chromecast/browser/exo/wm_helper_cast_shell.h
new file mode 100644
index 0000000..9dbb55f
--- /dev/null
+++ b/chromecast/browser/exo/wm_helper_cast_shell.h
@@ -0,0 +1,134 @@
+// Copyright 2018 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.
+
+#ifndef CHROMECAST_BROWSER_EXO_WM_HELPER_CAST_SHELL_H_
+#define CHROMECAST_BROWSER_EXO_WM_HELPER_CAST_SHELL_H_
+
+#include <cstdint>
+#include <map>
+#include <vector>
+
+#include "base/macros.h"
+#include "base/observer_list.h"
+#include "components/exo/wm_helper.h"
+#include "ui/aura/client/drag_drop_delegate.h"
+#include "ui/base/cursor/cursor.h"
+#include "ui/compositor/compositor_vsync_manager.h"
+#include "ui/display/display_observer.h"
+
+namespace aura {
+class env;
+class Window;
+namespace client {
+class CursorClient;
+class FocusChangeObserver;
+}  // namespace client
+}  // namespace aura
+
+namespace chromecast {
+class CastWindowManagerAura;
+}
+
+namespace wm {
+class ActivationChangeObserver;
+}
+
+namespace display {
+class ManagedDisplayInfo;
+}
+
+namespace ui {
+class EventHandler;
+class DropTargetEvent;
+}  // namespace ui
+
+namespace wm {
+class ActivationChangeObserver;
+}
+
+class CastScreen;
+
+namespace exo {
+
+// A CastShell-specific helper class for accessing WindowManager related
+// features.
+class WMHelperCastShell : public WMHelper {
+ public:
+  WMHelperCastShell(aura::Env* env,
+                    chromecast::CastWindowManagerAura* cast_window_manager_aura,
+                    CastScreen* cast_screen);
+  ~WMHelperCastShell() override;
+
+  // Overridden from WMHelper
+  aura::Env* env() override;
+  void AddActivationObserver(wm::ActivationChangeObserver* observer) override;
+  void RemoveActivationObserver(
+      wm::ActivationChangeObserver* observer) override;
+  void AddFocusObserver(aura::client::FocusChangeObserver* observer) override;
+  void RemoveFocusObserver(
+      aura::client::FocusChangeObserver* observer) override;
+
+  void AddDragDropObserver(DragDropObserver* observer) override;
+  void RemoveDragDropObserver(DragDropObserver* observer) override;
+  void SetDragDropDelegate(aura::Window*) override;
+  void ResetDragDropDelegate(aura::Window*) override;
+  void AddVSyncObserver(
+      ui::CompositorVSyncManager::Observer* observer) override;
+  void RemoveVSyncObserver(
+      ui::CompositorVSyncManager::Observer* observer) override;
+
+  const display::ManagedDisplayInfo& GetDisplayInfo(
+      int64_t display_id) const override;
+  const std::vector<uint8_t>& GetDisplayIdentificationData(
+      int64_t display_id) const override;
+
+  aura::Window* GetPrimaryDisplayContainer(int container_id) override;
+  aura::Window* GetActiveWindow() const override;
+  aura::Window* GetFocusedWindow() const override;
+  aura::Window* GetRootWindowForNewWindows() const override;
+  aura::client::CursorClient* GetCursorClient() override;
+  void AddPreTargetHandler(ui::EventHandler* handler) override;
+  void PrependPreTargetHandler(ui::EventHandler* handler) override;
+  void RemovePreTargetHandler(ui::EventHandler* handler) override;
+  void AddPostTargetHandler(ui::EventHandler* handler) override;
+  void RemovePostTargetHandler(ui::EventHandler* handler) override;
+  bool IsTabletModeWindowManagerEnabled() const override;
+  double GetDefaultDeviceScaleFactor() const override;
+
+  // Overridden from aura::client::DragDropDelegate:
+  void OnDragEntered(const ui::DropTargetEvent& event) override;
+  int OnDragUpdated(const ui::DropTargetEvent& event) override;
+  void OnDragExited() override;
+  int OnPerformDrop(const ui::DropTargetEvent& event) override;
+
+ private:
+  class CastDisplayObserver : public display::DisplayObserver {
+   public:
+    CastDisplayObserver();
+    ~CastDisplayObserver() override;
+
+    // Overridden from display::DisplayObserver
+    void OnWillProcessDisplayChanges() override;
+    void OnDidProcessDisplayChanges() override;
+    void OnDisplayAdded(const display::Display& new_display) override;
+    void OnDisplayRemoved(const display::Display& old_display) override;
+    void OnDisplayMetricsChanged(const display::Display& display,
+                                 uint32_t changed_metrics) override;
+
+    const display::ManagedDisplayInfo& GetDisplayInfo(int64_t display_id) const;
+
+   private:
+    std::map<int64_t, display::ManagedDisplayInfo> display_info_;
+  };
+
+  chromecast::CastWindowManagerAura* cast_window_manager_aura_;
+  aura::Env* const env_;
+  CastScreen* cast_screen_;
+  CastDisplayObserver display_observer_;
+  DISALLOW_COPY_AND_ASSIGN(WMHelperCastShell);
+};
+
+}  // namespace exo
+
+#endif  // CHROMECAST_BROWSER_EXO_EM_HELPER_CAST_SHELL_H_
diff --git a/chromecast/browser/metrics/cast_metrics_service_client.cc b/chromecast/browser/metrics/cast_metrics_service_client.cc
index b58217a..eac7e7e 100644
--- a/chromecast/browser/metrics/cast_metrics_service_client.cc
+++ b/chromecast/browser/metrics/cast_metrics_service_client.cc
@@ -35,6 +35,7 @@
 #include "components/prefs/pref_registry_simple.h"
 #include "components/prefs/pref_service.h"
 #include "content/public/browser/histogram_fetcher.h"
+#include "content/public/browser/network_service_instance.h"
 #include "content/public/common/content_switches.h"
 #include "services/network/public/cpp/shared_url_loader_factory.h"
 
@@ -355,7 +356,8 @@
             new ::metrics::ScreenInfoMetricsProvider));
   }
   metrics_service_->RegisterMetricsProvider(
-      std::make_unique<::metrics::NetworkMetricsProvider>());
+      std::make_unique<::metrics::NetworkMetricsProvider>(
+          content::CreateNetworkConnectionTrackerAsyncGetter()));
   shell::CastBrowserProcess::GetInstance()->browser_client()->
       RegisterMetricsProviders(metrics_service_.get());
 
diff --git a/chromecast/chromecast.gni b/chromecast/chromecast.gni
index 76fa24b..da609a9 100644
--- a/chromecast/chromecast.gni
+++ b/chromecast/chromecast.gni
@@ -98,6 +98,9 @@
   # Set to true to disable secure flac/opus support in EME, when using
   # cast CMA media backend and supporting Widevine or Playready.
   disable_secure_flac_and_opus_decoding = false
+
+  # Set to true to enable wayland server
+  enable_cast_wayland_server = false
 }
 
 declare_args() {
diff --git a/chromecast/common/cast_content_client.cc b/chromecast/common/cast_content_client.cc
index 1b15869f..c15ec3e 100644
--- a/chromecast/common/cast_content_client.cc
+++ b/chromecast/common/cast_content_client.cc
@@ -86,6 +86,11 @@
 CastContentClient::~CastContentClient() {
 }
 
+void CastContentClient::SetActiveURL(const GURL& url, std::string top_origin) {
+  LOG(INFO) << "Active URL: " << url.possibly_invalid_spec() << " for origin '"
+            << top_origin << "'";
+}
+
 void CastContentClient::AddAdditionalSchemes(Schemes* schemes) {
   schemes->standard_schemes.push_back(kChromeResourceScheme);
 #if BUILDFLAG(ENABLE_CHROMECAST_EXTENSIONS)
diff --git a/chromecast/common/cast_content_client.h b/chromecast/common/cast_content_client.h
index bc6b903..a180a96 100644
--- a/chromecast/common/cast_content_client.h
+++ b/chromecast/common/cast_content_client.h
@@ -17,6 +17,7 @@
   ~CastContentClient() override;
 
   // content::ContentClient implementation:
+  void SetActiveURL(const GURL& url, std::string top_origin) override;
   void AddAdditionalSchemes(Schemes* schemes) override;
   std::string GetUserAgent() const override;
   base::string16 GetLocalizedString(int message_id) const override;
diff --git a/components/arc/arc_features.cc b/components/arc/arc_features.cc
index 4a16481..870a426 100644
--- a/components/arc/arc_features.cc
+++ b/components/arc/arc_features.cc
@@ -52,7 +52,7 @@
 // When enabled, the context menu will show contextual quick actions based on
 // the current text selection.
 const base::Feature kSmartTextSelectionFeature{
-    "ArcSmartTextSelection", base::FEATURE_DISABLED_BY_DEFAULT};
+    "ArcSmartTextSelection", base::FEATURE_ENABLED_BY_DEFAULT};
 
 // Controls ARC USB host integration.
 // When enabled, Android apps will be able to use usb host features.
diff --git a/components/autofill/core/browser/autofill_client.h b/components/autofill/core/browser/autofill_client.h
index c3179a8e..c09af73 100644
--- a/components/autofill/core/browser/autofill_client.h
+++ b/components/autofill/core/browser/autofill_client.h
@@ -93,6 +93,17 @@
     UNMASK_FOR_AUTOFILL,
   };
 
+  // Used for explicitly requesting the user to enter/confirm cardholder name,
+  // expiration date month and year.
+  struct UserProvidedCardDetails {
+    base::string16 cardholder_name;
+    base::string16 expiration_date_month;
+    base::string16 expiration_date_year;
+  };
+  typedef base::OnceCallback<void(
+      const UserProvidedCardDetails& user_provided_card_details)>
+      UserAcceptedUploadCallback;
+
   typedef base::Callback<void(const CreditCard&)> CreditCardScanCallback;
   // Callback to run if user presses the Save button in the migration dialog.
   // Will pass a vector of GUIDs of cards that the user selects to upload to
@@ -171,16 +182,19 @@
 
   // Runs |callback| if the |card| should be uploaded to Payments. Displays the
   // contents of |legal_message| to the user. Displays a cardholder name
-  // textfield in the bubble if |should_request_name_from_user| is true. On
-  // desktop, shows the offer-to-save bubble if |show_prompt| is true; otherwise
-  // only shows the omnibox icon. On mobile, shows the offer-to-save infobar if
+  // textfield in the bubble if |should_request_name_from_user| is true.
+  // Displays a pair of expiration date dropdowns in the bubble if
+  // |should_request_expiration_date_from_user| is true. On desktop,
+  // shows the offer-to-save bubble if |show_prompt| is true; otherwise only
+  // shows the omnibox icon. On mobile, shows the offer-to-save infobar if
   // |show_prompt| is true; otherwise does not offer to save at all.
   virtual void ConfirmSaveCreditCardToCloud(
       const CreditCard& card,
       std::unique_ptr<base::DictionaryValue> legal_message,
       bool should_request_name_from_user,
+      bool should_request_expiration_date_from_user,
       bool show_prompt,
-      base::OnceCallback<void(const base::string16&)> callback) = 0;
+      UserAcceptedUploadCallback callback) = 0;
 
   // Will show an infobar to get user consent for Credit Card assistive filling.
   // Will run |callback| on success.
diff --git a/components/autofill/core/browser/autofill_metrics.cc b/components/autofill/core/browser/autofill_metrics.cc
index 1d673a90..125d8061 100644
--- a/components/autofill/core/browser/autofill_metrics.cc
+++ b/components/autofill/core/browser/autofill_metrics.cc
@@ -938,6 +938,13 @@
 }
 
 // static
+void AutofillMetrics::LogSaveCardReachedPersonalDataManager(bool is_local) {
+  std::string histogram_name = "Autofill.SaveCardReachedPersonalDataManager.";
+  histogram_name += is_local ? "Local" : "Server";
+  base::UmaHistogramBoolean(histogram_name, true);
+}
+
+// static
 void AutofillMetrics::LogUnmaskPromptEvent(UnmaskPromptEvent event) {
   UMA_HISTOGRAM_ENUMERATION("Autofill.UnmaskPrompt.Events", event,
                             NUM_UNMASK_PROMPT_EVENTS);
diff --git a/components/autofill/core/browser/autofill_metrics.h b/components/autofill/core/browser/autofill_metrics.h
index d8c27ed..d9b4104 100644
--- a/components/autofill/core/browser/autofill_metrics.h
+++ b/components/autofill/core/browser/autofill_metrics.h
@@ -943,6 +943,7 @@
 
   static void LogSaveCardWithFirstAndLastNameOffered(bool is_local);
   static void LogSaveCardWithFirstAndLastNameComplete(bool is_local);
+  static void LogSaveCardReachedPersonalDataManager(bool is_local);
 
   static void LogDeveloperEngagementMetric(DeveloperEngagementMetric metric);
 
diff --git a/components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.cc b/components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.cc
index dc67ab8..c480f98 100644
--- a/components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.cc
+++ b/components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.cc
@@ -32,7 +32,7 @@
     const CreditCard& card,
     std::unique_ptr<base::DictionaryValue> legal_message,
     StrikeDatabase* strike_database,
-    base::OnceCallback<void(const base::string16&)> upload_save_card_callback,
+    AutofillClient::UserAcceptedUploadCallback upload_save_card_callback,
     base::OnceClosure local_save_card_callback,
     PrefService* pref_service)
     : ConfirmInfoBarDelegate(),
@@ -174,7 +174,7 @@
 
 bool AutofillSaveCardInfoBarDelegateMobile::Accept() {
   if (upload_)
-    std::move(upload_save_card_callback_).Run(base::string16());
+    std::move(upload_save_card_callback_).Run({});
   else
     std::move(local_save_card_callback_).Run();
   LogUserAction(AutofillMetrics::INFOBAR_ACCEPTED);
diff --git a/components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.h b/components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.h
index 27d7e01..95de739 100644
--- a/components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.h
+++ b/components/autofill/core/browser/autofill_save_card_infobar_delegate_mobile.h
@@ -10,6 +10,7 @@
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/strings/string16.h"
+#include "components/autofill/core/browser/autofill_client.h"
 #include "components/autofill/core/browser/autofill_metrics.h"
 #include "components/autofill/core/browser/legal_message_line.h"
 #include "components/infobars/core/confirm_infobar_delegate.h"
@@ -34,7 +35,7 @@
       const CreditCard& card,
       std::unique_ptr<base::DictionaryValue> legal_message,
       StrikeDatabase* strike_database,
-      base::OnceCallback<void(const base::string16&)> upload_save_card_callback,
+      AutofillClient::UserAcceptedUploadCallback upload_save_card_callback,
       base::OnceClosure local_save_card_callback,
       PrefService* pref_service);
 
@@ -78,7 +79,7 @@
 
   // The callback to save the credit card to Google Payments if |upload_| is
   // true and the user accepts the infobar.
-  base::OnceCallback<void(const base::string16&)> upload_save_card_callback_;
+  AutofillClient::UserAcceptedUploadCallback upload_save_card_callback_;
 
   // The callback to save the credit card locally to the device if |upload_| is
   // false and the user accepts the infobar.
diff --git a/components/autofill/core/browser/credit_card_save_manager.cc b/components/autofill/core/browser/credit_card_save_manager.cc
index 5c7370c..54010f82 100644
--- a/components/autofill/core/browser/credit_card_save_manager.cc
+++ b/components/autofill/core/browser/credit_card_save_manager.cc
@@ -434,7 +434,8 @@
     user_did_accept_upload_prompt_ = false;
     client_->ConfirmSaveCreditCardToCloud(
         upload_request_.card, std::move(legal_message_),
-        should_request_name_from_user_, show_save_prompt_.value(),
+        should_request_name_from_user_,
+        should_request_expiration_date_from_user_, show_save_prompt_.value(),
         base::BindOnce(&CreditCardSaveManager::OnUserDidAcceptUpload,
                        weak_ptr_factory_.GetWeakPtr()));
     client_->LoadRiskData(
@@ -717,17 +718,30 @@
 }
 
 void CreditCardSaveManager::OnUserDidAcceptUpload(
-    const base::string16& cardholder_name) {
+    const AutofillClient::UserProvidedCardDetails& user_provided_card_details) {
   // If cardholder name was explicitly requested for the user to enter/confirm,
   // replace the name on |upload_request_.card| with the entered name.  (Note
   // that it is possible a name already existed on the card if conflicting names
   // were found, which this intentionally overwrites.)
-  if (!cardholder_name.empty()) {
+  if (!user_provided_card_details.cardholder_name.empty()) {
     DCHECK(should_request_name_from_user_);
-    upload_request_.card.SetInfo(CREDIT_CARD_NAME_FULL, cardholder_name,
+    upload_request_.card.SetInfo(CREDIT_CARD_NAME_FULL,
+                                 user_provided_card_details.cardholder_name,
                                  app_locale_);
   }
   user_did_accept_upload_prompt_ = true;
+  // If expiration date was explicitly requested for the user to select, replace
+  // the expiration date on |upload_request_.card| with the selected date.
+  if (!user_provided_card_details.expiration_date_month.empty() &&
+      !user_provided_card_details.expiration_date_year.empty()) {
+    DCHECK(should_request_expiration_date_from_user_);
+    upload_request_.card.SetInfo(
+        CREDIT_CARD_EXP_MONTH, user_provided_card_details.expiration_date_month,
+        app_locale_);
+    upload_request_.card.SetInfo(
+        CREDIT_CARD_EXP_4_DIGIT_YEAR,
+        user_provided_card_details.expiration_date_year, app_locale_);
+  }
   // Populating risk data and offering upload occur asynchronously.
   // If |risk_data| has already been loaded, send the upload card request.
   // Otherwise, continue to wait and let OnDidGetUploadRiskData handle it.
diff --git a/components/autofill/core/browser/credit_card_save_manager.h b/components/autofill/core/browser/credit_card_save_manager.h
index 2aea741af..236f385 100644
--- a/components/autofill/core/browser/credit_card_save_manager.h
+++ b/components/autofill/core/browser/credit_card_save_manager.h
@@ -175,9 +175,12 @@
 
   // Sets |user_did_accept_upload_prompt_| and calls SendUploadCardRequest if
   // the risk data is available. Sets the cardholder name on the upload request
-  // if |cardholder_name| is set.
-  void OnUserDidAcceptUpload(const base::string16& cardholder_name);
-
+  // if |user_provided_card_details.cardholder_name| is set. Sets the expiration
+  // date on the upload request if
+  // |user_provided_card_details.expiration_date_month| and
+  // |user_provided_card_details.expiration_date_year| are both set.
+  void OnUserDidAcceptUpload(const AutofillClient::UserProvidedCardDetails&
+                                 user_provided_card_details);
   // Saves risk data in |uploading_risk_data_| and calls SendUploadCardRequest
   // if the user has accepted the prompt.
   void OnDidGetUploadRiskData(const std::string& risk_data);
diff --git a/components/autofill/core/browser/credit_card_save_manager_unittest.cc b/components/autofill/core/browser/credit_card_save_manager_unittest.cc
index 2291b6f0..9e929a06 100644
--- a/components/autofill/core/browser/credit_card_save_manager_unittest.cc
+++ b/components/autofill/core/browser/credit_card_save_manager_unittest.cc
@@ -143,8 +143,10 @@
         form, false, SubmissionSource::FORM_SUBMISSION, base::TimeTicks::Now());
   }
 
-  void UserHasAcceptedUpload(const base::string16& cardholder_name) {
-    credit_card_save_manager_->OnUserDidAcceptUpload(cardholder_name);
+  void UserHasAcceptedUpload(
+      AutofillClient::UserProvidedCardDetails user_provided_card_details) {
+    credit_card_save_manager_->OnUserDidAcceptUpload(
+        user_provided_card_details);
   }
 
   // Populates |form| with data corresponding to a simple credit card form.
@@ -489,9 +491,8 @@
   // modified the profile.
   histogram_tester.ExpectTotalCount(
       "Autofill.DaysSincePreviousUseAtSubmission.Profile", 0);
-
   // Simulate that the user has accepted the upload from the prompt.
-  UserHasAcceptedUpload(/*cardholder_name=*/base::ASCIIToUTF16(""));
+  UserHasAcceptedUpload({});
   // We should find that full addresses are included in the UploadCard request.
   EXPECT_THAT(
       payments_client_->addresses_in_upload_card(),
@@ -562,7 +563,7 @@
       "Autofill.DaysSincePreviousUseAtSubmission.Profile", 0);
 
   // Simulate that the user has accepted the upload from the prompt.
-  UserHasAcceptedUpload(/*cardholder_name=*/base::ASCIIToUTF16(""));
+  UserHasAcceptedUpload({});
   // We should find that full addresses are included in the UploadCard request,
   // even though only countries were included in GetUploadDetails.
   EXPECT_THAT(
@@ -680,6 +681,49 @@
       "Autofill.SaveCardWithFirstAndLastNameOffered.Server", 0);
 }
 
+// Tests metrics for SaveCardReachedPersonalDataManager for local cards.
+TEST_F(CreditCardSaveManagerTest,
+       LocalCreditCard_LogReachedPersonalDataManager) {
+  credit_card_save_manager_->SetCreditCardUploadEnabled(false);
+
+  // Create, fill and submit an address form in order to establish a recent
+  // profile which can be selected for the upload request.
+  FormData address_form;
+  test::CreateTestAddressFormData(&address_form);
+  FormsSeen(std::vector<FormData>(1, address_form));
+  ExpectUniqueFillableFormParsedUkm();
+
+  ManuallyFillAddressForm("Flo", "Master", "77401", "US", &address_form);
+  FormSubmitted(address_form);
+
+  // Set up our credit card form data with credit card first and last name
+  // fields.
+  FormData credit_card_form;
+  CreateTestCreditCardFormData(&credit_card_form, /*is_https=*/true,
+                               /*use_month_type=*/false, /*split_names=*/true);
+  FormsSeen(std::vector<FormData>(1, credit_card_form));
+
+  // Edit the data, and submit.
+  credit_card_form.fields[0].value = ASCIIToUTF16("Flo");
+  credit_card_form.fields[1].value = ASCIIToUTF16("Master");
+  credit_card_form.fields[2].value = ASCIIToUTF16("4111111111111111");
+  credit_card_form.fields[3].value = ASCIIToUTF16(NextMonth());
+  credit_card_form.fields[4].value = ASCIIToUTF16(NextYear());
+  credit_card_form.fields[5].value = ASCIIToUTF16("123");
+
+  base::HistogramTester histogram_tester;
+
+  FormSubmitted(credit_card_form);
+  EXPECT_TRUE(autofill_client_.ConfirmSaveCardLocallyWasCalled());
+  EXPECT_FALSE(credit_card_save_manager_->CreditCardWasUploaded());
+
+  // Verify the histogram entry for SaveCardReachedPersonalDataManager.
+  histogram_tester.ExpectTotalCount(
+      "Autofill.SaveCardReachedPersonalDataManager.Local", 1);
+  histogram_tester.ExpectTotalCount(
+      "Autofill.SaveCardReachedPersonalDataManager.Server", 0);
+}
+
 // Tests that a credit card inferred from a form with a credit card first and
 // last name can be uploaded.
 TEST_F(CreditCardSaveManagerTest, UploadCreditCard_FirstAndLastName) {
diff --git a/components/autofill/core/browser/form_data_importer.cc b/components/autofill/core/browser/form_data_importer.cc
index df485ac8..c4cf426 100644
--- a/components/autofill/core/browser/form_data_importer.cc
+++ b/components/autofill/core/browser/form_data_importer.cc
@@ -442,6 +442,11 @@
   // there is for local cards.
   for (const CreditCard* card :
        personal_data_manager_->GetServerCreditCards()) {
+    // Don't update card if the expiration date is missing
+    if (candidate_credit_card.expiration_month() == 0 ||
+        candidate_credit_card.expiration_year() == 0) {
+      return false;
+    }
     if (candidate_credit_card.HasSameNumberAs(*card)) {
       // Don't update card if the expiration date is missing
       if (candidate_credit_card.expiration_month() == 0 ||
diff --git a/components/autofill/core/browser/personal_data_manager.cc b/components/autofill/core/browser/personal_data_manager.cc
index 7ede3878..b925232 100644
--- a/components/autofill/core/browser/personal_data_manager.cc
+++ b/components/autofill/core/browser/personal_data_manager.cc
@@ -2009,6 +2009,12 @@
   if (is_off_the_record_)
     return std::string();
 
+  // Log that local credit card save reached the PersonalDataManager. This is a
+  // temporary metric to measure the impact, if any, of CreditCardSaveManager's
+  // destruction before its callbacks are executed.
+  // TODO(crbug.com/892299): Remove this once the overall problem is fixed.
+  AutofillMetrics::LogSaveCardReachedPersonalDataManager(/*is_local=*/true);
+
   return SaveImportedCreditCard(imported_card);
 }
 
diff --git a/components/autofill/core/browser/test_autofill_client.cc b/components/autofill/core/browser/test_autofill_client.cc
index a80e5c7..a3e5bdf 100644
--- a/components/autofill/core/browser/test_autofill_client.cc
+++ b/components/autofill/core/browser/test_autofill_client.cc
@@ -115,10 +115,11 @@
     const CreditCard& card,
     std::unique_ptr<base::DictionaryValue> legal_message,
     bool should_request_name_from_user,
+    bool should_request_expiration_date_from_user,
     bool show_prompt,
-    base::OnceCallback<void(const base::string16&)> callback) {
+    UserAcceptedUploadCallback callback) {
   offer_to_save_credit_card_bubble_was_shown_ = show_prompt;
-  std::move(callback).Run(base::string16());
+  std::move(callback).Run({});
 }
 
 void TestAutofillClient::ConfirmCreditCardFillAssist(
diff --git a/components/autofill/core/browser/test_autofill_client.h b/components/autofill/core/browser/test_autofill_client.h
index d92fe1de..a7f1217 100644
--- a/components/autofill/core/browser/test_autofill_client.h
+++ b/components/autofill/core/browser/test_autofill_client.h
@@ -59,8 +59,9 @@
       const CreditCard& card,
       std::unique_ptr<base::DictionaryValue> legal_message,
       bool should_request_name_from_user,
+      bool should_request_expiration_date_from_user,
       bool show_prompt,
-      base::OnceCallback<void(const base::string16&)> callback) override;
+      UserAcceptedUploadCallback callback) override;
   void ConfirmCreditCardFillAssist(const CreditCard& card,
                                    const base::Closure& callback) override;
   void LoadRiskData(
diff --git a/components/autofill/core/browser/ui/save_card_bubble_controller.h b/components/autofill/core/browser/ui/save_card_bubble_controller.h
index cfc1fff5..1ae14e7 100644
--- a/components/autofill/core/browser/ui/save_card_bubble_controller.h
+++ b/components/autofill/core/browser/ui/save_card_bubble_controller.h
@@ -10,6 +10,7 @@
 
 #include "base/macros.h"
 #include "base/strings/string16.h"
+#include "components/autofill/core/browser/autofill_client.h"
 #include "components/autofill/core/browser/legal_message_line.h"
 #include "components/signin/core/browser/account_info.h"
 #include "url/gurl.h"
@@ -52,6 +53,10 @@
   // to confirm/provide cardholder name.
   virtual bool ShouldRequestNameFromUser() const = 0;
 
+  // Returns whether the dialog should include a pair of dropdown lists
+  // allowing the user to provide expiration date.
+  virtual bool ShouldRequestExpirationDateFromUser() const = 0;
+
   // Returns whether or not a sign in / sync promo needs to be shown.
   virtual bool ShouldShowSignInPromo() const = 0;
 
@@ -63,10 +68,11 @@
   virtual void OnSyncPromoAccepted(const AccountInfo& account,
                                    signin_metrics::AccessPoint access_point,
                                    bool is_default_promo_account) = 0;
-  // OnSaveButton takes in a string value representing the cardholder name
-  // confirmed/entered by the user if it was requested, or an empty string
-  // otherwise.
-  virtual void OnSaveButton(const base::string16& cardholder_name) = 0;
+  // OnSaveButton takes in a struct representing the cardholder name,
+  // expiration date month and expiration date year confirmed/entered by the
+  // user if they were requested, or struct with empty strings otherwise.
+  virtual void OnSaveButton(const AutofillClient::UserProvidedCardDetails&
+                                user_provided_card_details) = 0;
   virtual void OnCancelButton() = 0;
   virtual void OnLegalMessageLinkClicked(const GURL& url) = 0;
   virtual void OnManageCardsClicked() = 0;
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc
index 78f082b..0c35eb1 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_network_delegate_unittest.cc
@@ -398,7 +398,7 @@
         io_data()->test_request_options()->GetHeaderValueForTesting().empty());
 
     std::string suffix =
-        std::string("Chrome-Proxy: ") +
+        std::string("chrome-proxy: ") +
         io_data()->test_request_options()->GetHeaderValueForTesting() +
         std::string("\r\n\r\n");
 
@@ -596,7 +596,7 @@
                              "\r\n";
 
     std::string suffix_headers =
-        std::string("Chrome-Proxy: ") +
+        std::string("chrome-proxy: ") +
         io_data()->test_request_options()->GetHeaderValueForTesting() +
         std::string("\r\n\r\n");
 
@@ -709,7 +709,7 @@
         "keep-alive\r\nUser-Agent: \r\nAccept-Encoding: gzip, "
         "deflate\r\nAccept-Language: en-us,fr\r\n"
         "chrome-proxy-ect: Unknown\r\n"
-        "Chrome-Proxy: " +
+        "chrome-proxy: " +
         io_data()->test_request_options()->GetHeaderValueForTesting() +
         (page_id_value.empty() ? "" : (", " + page_id_value)) + "\r\n\r\n";
 
@@ -1776,7 +1776,7 @@
   std::string response_headers =
       "HTTP/1.1 200 OK\r\n"
       "Via: 1.1 Chrome-Compression-Proxy\r\n"
-      "Chrome-Proxy: ofcl=200\r\n"
+      "chrome-proxy: ofcl=200\r\n"
       "Cache-Control: max-age=1200\r\n"
       "Content-Encoding: br\r\n"
       "Vary: accept-encoding\r\n";
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc
index 9423c03..9ade1a7 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.cc
@@ -129,33 +129,44 @@
     experiments_.push_back(server_experiment);
 }
 
+void DataReductionProxyRequestOptions::AddPageIDRequestHeader(
+    net::HttpRequestHeaders* request_headers,
+    uint64_t page_id) const {
+  DCHECK(thread_checker_.CalledOnValidThread());
+  std::string header_value;
+  if (request_headers->HasHeader(chrome_proxy_header())) {
+    request_headers->GetHeader(chrome_proxy_header(), &header_value);
+    request_headers->RemoveHeader(chrome_proxy_header());
+    header_value += ", ";
+  }
+  // 64 bit uint fits in 17 characters when represented in hexadecimal,
+  // including trailing null terminated character.
+  char page_id_buffer[17];
+  if (base::strings::SafeSPrintf(page_id_buffer, "%x", page_id) > 0) {
+    header_value += FormatOption(kPageIdOption, page_id_buffer);
+  }
+  uint64_t page_id_tested;
+  DCHECK(base::HexStringToUInt64(page_id_buffer, &page_id_tested) &&
+         page_id_tested == page_id);
+  ALLOW_UNUSED_LOCAL(page_id_tested);
+  request_headers->SetHeader(chrome_proxy_header(), header_value);
+}
+
 void DataReductionProxyRequestOptions::AddRequestHeader(
     net::HttpRequestHeaders* request_headers,
     base::Optional<uint64_t> page_id) {
   DCHECK(thread_checker_.CalledOnValidThread());
   DCHECK(!page_id || page_id.value() > 0u);
-  const char kChromeProxyHeader[] = "Chrome-Proxy";
   std::string header_value;
-  if (request_headers->HasHeader(kChromeProxyHeader)) {
-    request_headers->GetHeader(kChromeProxyHeader, &header_value);
-    request_headers->RemoveHeader(kChromeProxyHeader);
+  if (request_headers->HasHeader(chrome_proxy_header())) {
+    request_headers->GetHeader(chrome_proxy_header(), &header_value);
+    request_headers->RemoveHeader(chrome_proxy_header());
     header_value += ", ";
   }
-  header_value += header_value_;
-
-  if (page_id) {
-    // 64 bit uint fits in 16 characters when represented in hexadecimal, but
-    // there needs to be a trailing null termianted character in the buffer.
-    char page_id_buffer[17];
-    if (base::strings::SafeSPrintf(page_id_buffer, "%x", page_id.value()) > 0) {
-      header_value += ", " + FormatOption(kPageIdOption, page_id_buffer);
-    }
-    uint64_t page_id_tested;
-    DCHECK(base::HexStringToUInt64(page_id_buffer, &page_id_tested) &&
-           page_id_tested == page_id.value());
-    ALLOW_UNUSED_LOCAL(page_id_tested);
-  }
-  request_headers->SetHeader(kChromeProxyHeader, header_value);
+  request_headers->SetHeader(chrome_proxy_header(),
+                             header_value + header_value_);
+  if (page_id)
+    AddPageIDRequestHeader(request_headers, page_id.value());
 }
 
 void DataReductionProxyRequestOptions::UpdateCredentials() {
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.h
index 83ee209..0b008c5 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.h
@@ -65,6 +65,11 @@
   void AddRequestHeader(net::HttpRequestHeaders* request_headers,
                         base::Optional<uint64_t> page_id);
 
+  // Adds |page_id| to the 'Chrome-Proxy' header, merging with existing value if
+  // it exists.
+  void AddPageIDRequestHeader(net::HttpRequestHeaders* request_headers,
+                              uint64_t page_id) const;
+
   // Stores the supplied key and sets up credentials suitable for authenticating
   // with the data reduction proxy.
   // This can be called more than once. For example on a platform that does not
diff --git a/components/data_reduction_proxy/core/common/BUILD.gn b/components/data_reduction_proxy/core/common/BUILD.gn
index bd23bdd..6d9547fd 100644
--- a/components/data_reduction_proxy/core/common/BUILD.gn
+++ b/components/data_reduction_proxy/core/common/BUILD.gn
@@ -127,6 +127,7 @@
   ]
 
   deps = [
+    "//mojo/public/mojom/base",
     "//services/network/public/mojom",
   ]
 }
diff --git a/components/exo/notification.cc b/components/exo/notification.cc
index 55645f1..80cd7cf 100644
--- a/components/exo/notification.cc
+++ b/components/exo/notification.cc
@@ -67,7 +67,7 @@
   // TODO(toshikikikuchi): When this class is used for other reasons,
   // re-consider the way to set the notifier type.
   auto notifier = message_center::NotifierId(
-      message_center::NotifierId::CROSTINI_APPLICATION, notifier_id);
+      message_center::NotifierType::CROSTINI_APPLICATION, notifier_id);
   notifier.profile_id = ash::Shell::Get()
                             ->session_controller()
                             ->GetPrimaryUserSession()
diff --git a/components/metrics/BUILD.gn b/components/metrics/BUILD.gn
index 8f0bab6..53317fc6 100644
--- a/components/metrics/BUILD.gn
+++ b/components/metrics/BUILD.gn
@@ -430,6 +430,10 @@
   if (is_ios) {
     sources -= [ "child_call_stack_profile_collector_unittest.cc" ]
   }
+
+  if (!is_ios) {
+    deps += [ "//content/test:test_support" ]
+  }
 }
 
 # Convenience testing target
diff --git a/components/metrics/metrics_service.h b/components/metrics/metrics_service.h
index 265d601c..aa94eab 100644
--- a/components/metrics/metrics_service.h
+++ b/components/metrics/metrics_service.h
@@ -33,7 +33,6 @@
 #include "components/metrics/metrics_log_store.h"
 #include "components/metrics/metrics_provider.h"
 #include "components/metrics/metrics_reporting_service.h"
-#include "components/metrics/net/network_metrics_provider.h"
 #include "components/variations/synthetic_trial_registry.h"
 
 class PrefService;
diff --git a/components/metrics/net/DEPS b/components/metrics/net/DEPS
index 633e4afc..58106e5 100644
--- a/components/metrics/net/DEPS
+++ b/components/metrics/net/DEPS
@@ -4,6 +4,7 @@
   "+components/data_use_measurement/core",
   "+components/encrypted_messages",
   "+components/variations",
+  "+content/public/test/test_browser_thread_bundle.h",
   "+net",
   "+services/network/public/cpp",
   "+services/network/test",
diff --git a/components/metrics/net/network_metrics_provider.cc b/components/metrics/net/network_metrics_provider.cc
index 4cc077b..b585b6e 100644
--- a/components/metrics/net/network_metrics_provider.cc
+++ b/components/metrics/net/network_metrics_provider.cc
@@ -55,10 +55,14 @@
 }
 
 NetworkMetricsProvider::NetworkMetricsProvider(
+    network::NetworkConnectionTrackerAsyncGetter
+        network_connection_tracker_async_getter,
     std::unique_ptr<NetworkQualityEstimatorProvider>
         network_quality_estimator_provider)
-    : connection_type_is_ambiguous_(false),
-      network_change_notifier_initialized_(false),
+    : network_connection_tracker_(nullptr),
+      connection_type_is_ambiguous_(false),
+      connection_type_(network::mojom::ConnectionType::CONNECTION_UNKNOWN),
+      network_connection_tracker_initialized_(false),
       wifi_phy_layer_protocol_is_ambiguous_(false),
       wifi_phy_layer_protocol_(net::WIFI_PHY_LAYER_PROTOCOL_UNKNOWN),
       total_aborts_(0),
@@ -69,11 +73,9 @@
       min_effective_connection_type_(net::EFFECTIVE_CONNECTION_TYPE_UNKNOWN),
       max_effective_connection_type_(net::EFFECTIVE_CONNECTION_TYPE_UNKNOWN),
       weak_ptr_factory_(this) {
-  net::NetworkChangeNotifier::AddNetworkChangeObserver(this);
-  connection_type_ = net::NetworkChangeNotifier::GetConnectionType();
-  if (connection_type_ != net::NetworkChangeNotifier::CONNECTION_UNKNOWN)
-    network_change_notifier_initialized_ = true;
-
+  network_connection_tracker_async_getter.Run(
+      base::BindOnce(&NetworkMetricsProvider::SetNetworkConnectionTracker,
+                     weak_ptr_factory_.GetWeakPtr()));
   ProbeWifiPHYLayerProtocol();
 
   if (network_quality_estimator_provider_) {
@@ -88,7 +90,21 @@
 
 NetworkMetricsProvider::~NetworkMetricsProvider() {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  net::NetworkChangeNotifier::RemoveNetworkChangeObserver(this);
+  if (network_connection_tracker_)
+    network_connection_tracker_->RemoveNetworkConnectionObserver(this);
+}
+
+void NetworkMetricsProvider::SetNetworkConnectionTracker(
+    network::NetworkConnectionTracker* network_connection_tracker) {
+  DCHECK(network_connection_tracker);
+  network_connection_tracker_ = network_connection_tracker;
+  network_connection_tracker_->AddNetworkConnectionObserver(this);
+  network_connection_tracker_->GetConnectionType(
+      &connection_type_,
+      base::BindOnce(&NetworkMetricsProvider::OnConnectionChanged,
+                     weak_ptr_factory_.GetWeakPtr()));
+  if (connection_type_ != network::mojom::ConnectionType::CONNECTION_UNKNOWN)
+    network_connection_tracker_initialized_ = true;
 }
 
 void NetworkMetricsProvider::ProvideCurrentSessionData(
@@ -104,7 +120,7 @@
     SystemProfileProto* system_profile) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
   DCHECK(!connection_type_is_ambiguous_ ||
-         network_change_notifier_initialized_);
+         network_connection_tracker_initialized_);
   SystemProfileProto::Network* network = system_profile->mutable_network();
   network->set_connection_type_is_ambiguous(connection_type_is_ambiguous_);
   network->set_connection_type(GetConnectionType());
@@ -117,13 +133,21 @@
   network->set_max_effective_connection_type(
       ConvertEffectiveConnectionType(max_effective_connection_type_));
 
+  // Note: We get the initial connection type when it becomes available and it
+  // is handled at SetNetworkConnectionTracker() when GetConnectionType() is
+  // called.
+  //
   // Update the connection type. Note that this is necessary to set the network
   // type to "none" if there is no network connection for an entire UMA logging
   // window, since OnConnectionTypeChanged() ignores transitions to the "none"
-  // state.
-  connection_type_ = net::NetworkChangeNotifier::GetConnectionType();
-  if (connection_type_ != net::NetworkChangeNotifier::CONNECTION_UNKNOWN)
-    network_change_notifier_initialized_ = true;
+  // state, and that is ok since it just deals with the current known state.
+  if (network_connection_tracker_) {
+    network_connection_tracker_->GetConnectionType(&connection_type_,
+                                                   base::DoNothing());
+  }
+
+  if (connection_type_ != network::mojom::ConnectionType::CONNECTION_UNKNOWN)
+    network_connection_tracker_initialized_ = true;
   // Reset the "ambiguous" flags, since a new metrics log session has started.
   connection_type_is_ambiguous_ = false;
   wifi_phy_layer_protocol_is_ambiguous_ = false;
@@ -146,8 +170,8 @@
     WriteWifiAccessPointProto(info, network);
 }
 
-void NetworkMetricsProvider::OnNetworkChanged(
-    net::NetworkChangeNotifier::ConnectionType type) {
+void NetworkMetricsProvider::OnConnectionChanged(
+    network::mojom::ConnectionType type) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
   // To avoid reporting an ambiguous connection type for users on flaky
   // connections, ignore transitions to the "none" state. Note that the
@@ -155,26 +179,27 @@
   // new UMA logging window begins, so users who genuinely transition to offline
   // mode for an extended duration will still be at least partially represented
   // in the metrics logs.
-  if (type == net::NetworkChangeNotifier::CONNECTION_NONE) {
-    network_change_notifier_initialized_ = true;
+  if (type == network::mojom::ConnectionType::CONNECTION_NONE) {
+    network_connection_tracker_initialized_ = true;
     return;
   }
 
-  DCHECK(network_change_notifier_initialized_ ||
-         connection_type_ == net::NetworkChangeNotifier::CONNECTION_UNKNOWN);
+  DCHECK(network_connection_tracker_initialized_ ||
+         connection_type_ ==
+             network::mojom::ConnectionType::CONNECTION_UNKNOWN);
 
   if (type != connection_type_ &&
-      connection_type_ != net::NetworkChangeNotifier::CONNECTION_NONE &&
-      network_change_notifier_initialized_) {
-    // If |network_change_notifier_initialized_| is false, it implies that this
-    // is the first connection change callback received from network change
-    // notifier, and the previous connection type was CONNECTION_UNKNOWN. In
-    // that case, connection type should not be marked as ambiguous since there
-    // was no actual change in the connection type.
+      connection_type_ != network::mojom::ConnectionType::CONNECTION_NONE &&
+      network_connection_tracker_initialized_) {
+    // If |network_connection_tracker_initialized_| is false, it implies that
+    // this is the first connection change callback received from network
+    // connection tracker, and the previous connection type was
+    // CONNECTION_UNKNOWN. In that case, connection type should not be marked as
+    // ambiguous since there was no actual change in the connection type.
     connection_type_is_ambiguous_ = true;
   }
 
-  network_change_notifier_initialized_ = true;
+  network_connection_tracker_initialized_ = true;
   connection_type_ = type;
 
   ProbeWifiPHYLayerProtocol();
@@ -184,21 +209,21 @@
 NetworkMetricsProvider::GetConnectionType() const {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
   switch (connection_type_) {
-    case net::NetworkChangeNotifier::CONNECTION_NONE:
+    case network::mojom::ConnectionType::CONNECTION_NONE:
       return SystemProfileProto::Network::CONNECTION_NONE;
-    case net::NetworkChangeNotifier::CONNECTION_UNKNOWN:
+    case network::mojom::ConnectionType::CONNECTION_UNKNOWN:
       return SystemProfileProto::Network::CONNECTION_UNKNOWN;
-    case net::NetworkChangeNotifier::CONNECTION_ETHERNET:
+    case network::mojom::ConnectionType::CONNECTION_ETHERNET:
       return SystemProfileProto::Network::CONNECTION_ETHERNET;
-    case net::NetworkChangeNotifier::CONNECTION_WIFI:
+    case network::mojom::ConnectionType::CONNECTION_WIFI:
       return SystemProfileProto::Network::CONNECTION_WIFI;
-    case net::NetworkChangeNotifier::CONNECTION_2G:
+    case network::mojom::ConnectionType::CONNECTION_2G:
       return SystemProfileProto::Network::CONNECTION_2G;
-    case net::NetworkChangeNotifier::CONNECTION_3G:
+    case network::mojom::ConnectionType::CONNECTION_3G:
       return SystemProfileProto::Network::CONNECTION_3G;
-    case net::NetworkChangeNotifier::CONNECTION_4G:
+    case network::mojom::ConnectionType::CONNECTION_4G:
       return SystemProfileProto::Network::CONNECTION_4G;
-    case net::NetworkChangeNotifier::CONNECTION_BLUETOOTH:
+    case network::mojom::ConnectionType::CONNECTION_BLUETOOTH:
       return SystemProfileProto::Network::CONNECTION_BLUETOOTH;
   }
   NOTREACHED();
diff --git a/components/metrics/net/network_metrics_provider.h b/components/metrics/net/network_metrics_provider.h
index ac9f2524..d10a5db 100644
--- a/components/metrics/net/network_metrics_provider.h
+++ b/components/metrics/net/network_metrics_provider.h
@@ -16,9 +16,9 @@
 #include "base/single_thread_task_runner.h"
 #include "components/metrics/metrics_provider.h"
 #include "components/metrics/net/wifi_access_point_info_provider.h"
-#include "net/base/network_change_notifier.h"
 #include "net/base/network_interfaces.h"
 #include "net/nqe/effective_connection_type.h"
+#include "services/network/public/cpp/network_connection_tracker.h"
 #include "third_party/metrics_proto/system_profile.pb.h"
 
 namespace metrics {
@@ -27,11 +27,11 @@
 ConvertEffectiveConnectionType(
     net::EffectiveConnectionType effective_connection_type);
 
-// Registers as observer with net::NetworkChangeNotifier and
-// network::NetworkQualityTracker to keep track of the network environment.
+// Registers as observer with network::NetworkConnectionTracker and keeps track
+// of the network environment.
 class NetworkMetricsProvider
     : public MetricsProvider,
-      public net::NetworkChangeNotifier::NetworkChangeObserver {
+      public network::NetworkConnectionTracker::NetworkConnectionObserver {
  public:
   // Class that provides |this| with the network quality estimator.
   class NetworkQualityEstimatorProvider {
@@ -54,9 +54,10 @@
   // Creates a NetworkMetricsProvider, where
   // |network_quality_estimator_provider| should be set if it is useful to
   // attach the quality of the network to the metrics report.
-  explicit NetworkMetricsProvider(
-      std::unique_ptr<NetworkQualityEstimatorProvider>
-          network_quality_estimator_provider = nullptr);
+  NetworkMetricsProvider(network::NetworkConnectionTrackerAsyncGetter
+                             network_connection_tracker_async_getter,
+                         std::unique_ptr<NetworkQualityEstimatorProvider>
+                             network_quality_estimator_provider = nullptr);
   ~NetworkMetricsProvider() override;
 
  private:
@@ -73,9 +74,8 @@
       ChromeUserMetricsExtension* uma_proto) override;
   void ProvideSystemProfileMetrics(SystemProfileProto* system_profile) override;
 
-  // NetworkChangeObserver:
-  void OnNetworkChanged(
-      net::NetworkChangeNotifier::ConnectionType type) override;
+  // NetworkConnectionObserver:
+  void OnConnectionChanged(network::mojom::ConnectionType type) override;
 
   SystemProfileProto::Network::ConnectionType GetConnectionType() const;
   SystemProfileProto::Network::WifiPHYLayerProtocol GetWifiPHYLayerProtocol()
@@ -98,12 +98,24 @@
 
   void OnEffectiveConnectionTypeChanged(net::EffectiveConnectionType type);
 
+  // Used as a callback to be given to NetworkConnectionTracker async getter to
+  // set the |network_connection_tracker_|.
+  void SetNetworkConnectionTracker(
+      network::NetworkConnectionTracker* network_connection_tracker);
+
+  // Watches for network connection changes.
+  // This |network_connection_tracker_| raw pointer is not owned by this class.
+  // It is obtained from the global |g_network_connection_tracker| pointer in
+  // //content/public/browser/network_service_instance.cc and points to the same
+  // object.
+  network::NetworkConnectionTracker* network_connection_tracker_;
+
   // True if |connection_type_| changed during the lifetime of the log.
   bool connection_type_is_ambiguous_;
-  // The connection type according to net::NetworkChangeNotifier.
-  net::NetworkChangeNotifier::ConnectionType connection_type_;
-  // True if the network change notifier has been initialized.
-  bool network_change_notifier_initialized_;
+  // The connection type according to network::NetworkConnectionTracker.
+  network::mojom::ConnectionType connection_type_;
+  // True if the network connection tracker has been initialized.
+  bool network_connection_tracker_initialized_;
 
   // True if |wifi_phy_layer_protocol_| changed during the lifetime of the log.
   bool wifi_phy_layer_protocol_is_ambiguous_;
diff --git a/components/metrics/net/network_metrics_provider_unittest.cc b/components/metrics/net/network_metrics_provider_unittest.cc
index 6347306a..835dfa61 100644
--- a/components/metrics/net/network_metrics_provider_unittest.cc
+++ b/components/metrics/net/network_metrics_provider_unittest.cc
@@ -10,9 +10,9 @@
 #include "base/macros.h"
 #include "base/memory/ptr_util.h"
 #include "base/run_loop.h"
-#include "base/test/scoped_task_environment.h"
 #include "base/threading/thread_task_runner_handle.h"
-#include "net/base/network_change_notifier.h"
+#include "build/build_config.h"
+#include "services/network/test/test_network_connection_tracker.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/metrics_proto/system_profile.pb.h"
 
@@ -21,14 +21,26 @@
 #include "chromeos/network/network_handler.h"
 #endif  // OS_CHROMEOS
 
+#if defined(OS_IOS)
+#include "base/test/scoped_task_environment.h"
+#else  // !defined(OS_IOS)
+#include "content/public/test/test_browser_thread_bundle.h"
+#endif  // defined(OS_IOS)
+
 namespace metrics {
 
 class NetworkMetricsProviderTest : public testing::Test {
  public:
  protected:
   NetworkMetricsProviderTest()
+#if defined(OS_IOS)
       : scoped_task_environment_(
-            base::test::ScopedTaskEnvironment::MainThreadType::IO) {
+            base::test::ScopedTaskEnvironment::MainThreadType::IO)
+#else   // !defined(OS_IOS)
+      : test_browser_thread_bundle_(
+            content::TestBrowserThreadBundle::IO_MAINLOOP)
+#endif  // defined(OS_IOS)
+  {
 #if defined(OS_CHROMEOS)
     chromeos::DBusThreadManager::Initialize();
     chromeos::NetworkHandler::Initialize();
@@ -36,13 +48,17 @@
   }
 
  private:
+#if defined(OS_IOS)
   base::test::ScopedTaskEnvironment scoped_task_environment_;
+#else   // !defined(OS_IOS)
+  content::TestBrowserThreadBundle test_browser_thread_bundle_;
+#endif  // defined(OS_IOS)
 };
 
 // Verifies that the effective connection type is correctly set.
 TEST_F(NetworkMetricsProviderTest, EffectiveConnectionType) {
-  SystemProfileProto system_profile;
-  NetworkMetricsProvider network_metrics_provider;
+  NetworkMetricsProvider network_metrics_provider(
+      network::TestNetworkConnectionTracker::CreateAsyncGetter());
   base::RunLoop().RunUntilIdle();
 
   EXPECT_EQ(net::EFFECTIVE_CONNECTION_TYPE_UNKNOWN,
@@ -51,6 +67,7 @@
             network_metrics_provider.min_effective_connection_type_);
   EXPECT_EQ(net::EFFECTIVE_CONNECTION_TYPE_UNKNOWN,
             network_metrics_provider.max_effective_connection_type_);
+  SystemProfileProto system_profile;
   network_metrics_provider.ProvideSystemProfileMetrics(&system_profile);
   EXPECT_EQ(SystemProfileProto::Network::EFFECTIVE_CONNECTION_TYPE_UNKNOWN,
             system_profile.network().min_effective_connection_type());
@@ -99,8 +116,8 @@
 // Verifies that the effective connection type is not set to UNKNOWN when there
 // is a change in the connection type.
 TEST_F(NetworkMetricsProviderTest, ECTAmbiguousOnConnectionTypeChange) {
-  SystemProfileProto system_profile;
-  NetworkMetricsProvider network_metrics_provider;
+  NetworkMetricsProvider network_metrics_provider(
+      network::TestNetworkConnectionTracker::CreateAsyncGetter());
   base::RunLoop().RunUntilIdle();
 
   EXPECT_EQ(net::EFFECTIVE_CONNECTION_TYPE_UNKNOWN,
@@ -121,6 +138,7 @@
 
   // There is no change in the connection type. Effective connection types
   // should be reported as 2G.
+  SystemProfileProto system_profile;
   network_metrics_provider.ProvideSystemProfileMetrics(&system_profile);
   EXPECT_EQ(SystemProfileProto::Network::EFFECTIVE_CONNECTION_TYPE_2G,
             system_profile.network().min_effective_connection_type());
@@ -129,8 +147,8 @@
 
   // Even with change in the connection type, effective connection types
   // should be reported as 2G.
-  network_metrics_provider.OnNetworkChanged(
-      net::NetworkChangeNotifier::CONNECTION_2G);
+  network_metrics_provider.OnConnectionChanged(
+      network::mojom::ConnectionType::CONNECTION_2G);
   network_metrics_provider.ProvideSystemProfileMetrics(&system_profile);
   EXPECT_EQ(SystemProfileProto::Network::EFFECTIVE_CONNECTION_TYPE_2G,
             system_profile.network().min_effective_connection_type());
@@ -144,13 +162,14 @@
   for (net::EffectiveConnectionType force_ect :
        {net::EFFECTIVE_CONNECTION_TYPE_UNKNOWN,
         net::EFFECTIVE_CONNECTION_TYPE_OFFLINE}) {
-    NetworkMetricsProvider network_metrics_provider;
+    NetworkMetricsProvider network_metrics_provider(
+        network::TestNetworkConnectionTracker::CreateAsyncGetter());
     base::RunLoop().RunUntilIdle();
 
-    SystemProfileProto system_profile;
     network_metrics_provider.OnEffectiveConnectionTypeChanged(
         net::EFFECTIVE_CONNECTION_TYPE_2G);
 
+    SystemProfileProto system_profile;
     network_metrics_provider.ProvideSystemProfileMetrics(&system_profile);
 
     network_metrics_provider.OnEffectiveConnectionTypeChanged(force_ect);
@@ -173,46 +192,49 @@
 
 // Verifies that the connection type is ambiguous boolean is correctly set.
 TEST_F(NetworkMetricsProviderTest, ConnectionTypeIsAmbiguous) {
-  SystemProfileProto system_profile;
-  NetworkMetricsProvider network_metrics_provider;
+  NetworkMetricsProvider network_metrics_provider(
+      network::TestNetworkConnectionTracker::CreateAsyncGetter());
 
-  EXPECT_EQ(net::NetworkChangeNotifier::CONNECTION_UNKNOWN,
+  EXPECT_EQ(network::mojom::ConnectionType::CONNECTION_UNKNOWN,
             network_metrics_provider.connection_type_);
   EXPECT_FALSE(network_metrics_provider.connection_type_is_ambiguous_);
-  EXPECT_FALSE(network_metrics_provider.network_change_notifier_initialized_);
+  EXPECT_FALSE(
+      network_metrics_provider.network_connection_tracker_initialized_);
 
   // When a connection type change callback is received, network change notifier
   // should be marked as initialized.
-  network_metrics_provider.OnNetworkChanged(
-      net::NetworkChangeNotifier::CONNECTION_2G);
-  EXPECT_EQ(net::NetworkChangeNotifier::CONNECTION_2G,
+  network_metrics_provider.OnConnectionChanged(
+      network::mojom::ConnectionType::CONNECTION_2G);
+  EXPECT_EQ(network::mojom::ConnectionType::CONNECTION_2G,
             network_metrics_provider.connection_type_);
   // Connection type should not be marked as ambiguous when a delayed connection
   // type change callback is received due to delayed initialization of the
   // network change notifier.
   EXPECT_FALSE(network_metrics_provider.connection_type_is_ambiguous_);
-  EXPECT_TRUE(network_metrics_provider.network_change_notifier_initialized_);
+  EXPECT_TRUE(network_metrics_provider.network_connection_tracker_initialized_);
 
   // On collection of the system profile, |connection_type_is_ambiguous_| should
-  // stay false, and |network_change_notifier_initialized_| should remain true.
+  // stay false, and |network_connection_tracker_initialized_| should remain
+  // true.
+  SystemProfileProto system_profile;
   network_metrics_provider.ProvideSystemProfileMetrics(&system_profile);
   EXPECT_FALSE(network_metrics_provider.connection_type_is_ambiguous_);
-  EXPECT_TRUE(network_metrics_provider.network_change_notifier_initialized_);
+  EXPECT_TRUE(network_metrics_provider.network_connection_tracker_initialized_);
   EXPECT_FALSE(system_profile.network().connection_type_is_ambiguous());
   EXPECT_EQ(SystemProfileProto::Network::CONNECTION_2G,
             system_profile.network().connection_type());
 
-  network_metrics_provider.OnNetworkChanged(
-      net::NetworkChangeNotifier::CONNECTION_3G);
+  network_metrics_provider.OnConnectionChanged(
+      network::mojom::ConnectionType::CONNECTION_3G);
   EXPECT_TRUE(network_metrics_provider.connection_type_is_ambiguous_);
-  EXPECT_TRUE(network_metrics_provider.network_change_notifier_initialized_);
+  EXPECT_TRUE(network_metrics_provider.network_connection_tracker_initialized_);
 
   // On collection of the system profile, |connection_type_is_ambiguous_| should
-  // be reset to false, and |network_change_notifier_initialized_| should remain
-  // true.
+  // be reset to false, and |network_connection_tracker_initialized_| should
+  // remain true.
   network_metrics_provider.ProvideSystemProfileMetrics(&system_profile);
   EXPECT_FALSE(network_metrics_provider.connection_type_is_ambiguous_);
-  EXPECT_TRUE(network_metrics_provider.network_change_notifier_initialized_);
+  EXPECT_TRUE(network_metrics_provider.network_connection_tracker_initialized_);
   EXPECT_TRUE(system_profile.network().connection_type_is_ambiguous());
   EXPECT_EQ(SystemProfileProto::Network::CONNECTION_3G,
             system_profile.network().connection_type());
diff --git a/components/safe_browsing/OWNERS b/components/safe_browsing/OWNERS
index 3f03255..695d379 100644
--- a/components/safe_browsing/OWNERS
+++ b/components/safe_browsing/OWNERS
@@ -1,4 +1,3 @@
-jialiul@chromium.org
 nparker@chromium.org
 vakh@chromium.org
 
diff --git a/components/safe_browsing/base_blocking_page.cc b/components/safe_browsing/base_blocking_page.cc
index a0fc4ca..3799b2f 100644
--- a/components/safe_browsing/base_blocking_page.cc
+++ b/components/safe_browsing/base_blocking_page.cc
@@ -379,11 +379,12 @@
 
 // static
 bool BaseBlockingPage::ShouldReportThreatDetails(SBThreatType threat_type) {
-  return threat_type == SB_THREAT_TYPE_URL_PHISHING ||
-         threat_type == SB_THREAT_TYPE_URL_MALWARE ||
-         threat_type == SB_THREAT_TYPE_URL_UNWANTED ||
+  return threat_type == SB_THREAT_TYPE_BILLING ||
+         threat_type == SB_THREAT_TYPE_URL_CLIENT_SIDE_MALWARE ||
          threat_type == SB_THREAT_TYPE_URL_CLIENT_SIDE_PHISHING ||
-         threat_type == SB_THREAT_TYPE_URL_CLIENT_SIDE_MALWARE;
+         threat_type == SB_THREAT_TYPE_URL_MALWARE ||
+         threat_type == SB_THREAT_TYPE_URL_PHISHING ||
+         threat_type == SB_THREAT_TYPE_URL_UNWANTED;
 }
 
 }  // namespace safe_browsing
diff --git a/components/safe_browsing/browser/threat_details.cc b/components/safe_browsing/browser/threat_details.cc
index 76f34cee..3dca6dc 100644
--- a/components/safe_browsing/browser/threat_details.cc
+++ b/components/safe_browsing/browser/threat_details.cc
@@ -99,6 +99,8 @@
       return ClientSafeBrowsingReportRequest::URL_PASSWORD_PROTECTION_PHISHING;
     case SB_THREAT_TYPE_SUSPICIOUS_SITE:
       return ClientSafeBrowsingReportRequest::URL_SUSPICIOUS;
+    case SB_THREAT_TYPE_BILLING:
+      return ClientSafeBrowsingReportRequest::BILLING;
     default:  // Gated by SafeBrowsingBlockingPage::ShouldReportThreatDetails.
       NOTREACHED() << "We should not send report for threat type "
                    << threat_type;
diff --git a/components/safe_browsing/common/OWNERS b/components/safe_browsing/common/OWNERS
index 599596c..ef88cc7 100644
--- a/components/safe_browsing/common/OWNERS
+++ b/components/safe_browsing/common/OWNERS
@@ -1,5 +1,3 @@
-jialiul@chromium.org
-
 per-file *_messages*.h=set noparent
 per-file *_messages*.h=file://ipc/SECURITY_OWNERS
 per-file *.mojom=set noparent
diff --git a/components/safe_browsing/proto/csd.proto b/components/safe_browsing/proto/csd.proto
index fb1e16f..a7f657a 100644
--- a/components/safe_browsing/proto/csd.proto
+++ b/components/safe_browsing/proto/csd.proto
@@ -1063,6 +1063,7 @@
     DANGEROUS_DOWNLOAD_OPENED = 13;
     AD_SAMPLE = 14;
     URL_SUSPICIOUS = 15;
+    BILLING = 16;
   }
 
   message HTTPHeader {
diff --git a/components/security_interstitials/OWNERS b/components/security_interstitials/OWNERS
index acac5ef..e3577f2c 100644
--- a/components/security_interstitials/OWNERS
+++ b/components/security_interstitials/OWNERS
@@ -4,8 +4,6 @@
 mattm@chromium.org
 meacer@chromium.org
 nparker@chromium.org
-
-# For componentization purpose
-jialiul@chromium.org
+vakh@chromium.org
 
 # COMPONENT: UI>Browser>Interstitials
diff --git a/components/viz/common/surfaces/frame_sink_id.cc b/components/viz/common/surfaces/frame_sink_id.cc
index 3226cfc5..1cc2a10 100644
--- a/components/viz/common/surfaces/frame_sink_id.cc
+++ b/components/viz/common/surfaces/frame_sink_id.cc
@@ -12,6 +12,12 @@
   return base::StringPrintf("FrameSinkId(%u, %u)", client_id_, sink_id_);
 }
 
+std::string FrameSinkId::ToString(base::StringPiece debug_label) const {
+  return base::StringPrintf("FrameSinkId[%s](%u, %u)",
+                            debug_label.as_string().c_str(), client_id_,
+                            sink_id_);
+}
+
 std::ostream& operator<<(std::ostream& out, const FrameSinkId& frame_sink_id) {
   return out << frame_sink_id.ToString();
 }
diff --git a/components/viz/common/surfaces/frame_sink_id.h b/components/viz/common/surfaces/frame_sink_id.h
index f06981ef..33687022 100644
--- a/components/viz/common/surfaces/frame_sink_id.h
+++ b/components/viz/common/surfaces/frame_sink_id.h
@@ -12,6 +12,7 @@
 #include <tuple>
 
 #include "base/hash.h"
+#include "base/strings/string_piece.h"
 #include "components/viz/common/viz_common_export.h"
 
 namespace viz {
@@ -63,6 +64,8 @@
 
   std::string ToString() const;
 
+  std::string ToString(base::StringPiece debug_label) const;
+
  private:
   uint32_t client_id_;
   uint32_t sink_id_;
diff --git a/components/viz/common/surfaces/surface_id.cc b/components/viz/common/surfaces/surface_id.cc
index 40d43b1..764393b9 100644
--- a/components/viz/common/surfaces/surface_id.cc
+++ b/components/viz/common/surfaces/surface_id.cc
@@ -17,6 +17,14 @@
                             local_surface_id_.ToString().c_str());
 }
 
+std::string SurfaceId::ToString(
+    base::StringPiece frame_sink_debug_label) const {
+  return base::StringPrintf(
+      "SurfaceId(%s, %s)",
+      frame_sink_id_.ToString(frame_sink_debug_label).c_str(),
+      local_surface_id_.ToString().c_str());
+}
+
 SurfaceId SurfaceId::ToSmallestId() const {
   return SurfaceId(frame_sink_id_, local_surface_id_.ToSmallestId());
 }
diff --git a/components/viz/common/surfaces/surface_id.h b/components/viz/common/surfaces/surface_id.h
index bfc9946..ed23c6d2d 100644
--- a/components/viz/common/surfaces/surface_id.h
+++ b/components/viz/common/surfaces/surface_id.h
@@ -59,6 +59,8 @@
 
   std::string ToString() const;
 
+  std::string ToString(base::StringPiece frame_sink_debug_label) const;
+
   // Returns whether this SurfaceId was generated after |other|.
   bool IsNewerThan(const SurfaceId& other) const;
 
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
index 9a26a0f..718d5a7 100644
--- a/components/viz/service/BUILD.gn
+++ b/components/viz/service/BUILD.gn
@@ -165,6 +165,7 @@
     "surfaces/surface_hittest_delegate.h",
     "surfaces/surface_manager.cc",
     "surfaces/surface_manager.h",
+    "surfaces/surface_manager_delegate.h",
     "surfaces/surface_reference.cc",
     "surfaces/surface_reference.h",
     "viz_service_export.h",
diff --git a/components/viz/service/display/bsp_tree_perftest.cc b/components/viz/service/display/bsp_tree_perftest.cc
index 7e168b5..29efb30 100644
--- a/components/viz/service/display/bsp_tree_perftest.cc
+++ b/components/viz/service/display/bsp_tree_perftest.cc
@@ -44,8 +44,8 @@
 
   void SetupTree() override {
     gfx::Size viewport = gfx::Size(720, 1038);
-    layer_tree_host()->SetViewportSizeAndScale(viewport, 1.f, LocalSurfaceId(),
-                                               base::TimeTicks());
+    layer_tree_host()->SetViewportSizeAndScale(viewport, 1.f,
+                                               LocalSurfaceIdAllocation());
     scoped_refptr<cc::Layer> root =
         ParseTreeFromJson(json_, &content_layer_client_);
     ASSERT_TRUE(root.get());
diff --git a/components/viz/service/display/display_scheduler_unittest.cc b/components/viz/service/display/display_scheduler_unittest.cc
index 2430f76..d2d324e 100644
--- a/components/viz/service/display/display_scheduler_unittest.cc
+++ b/components/viz/service/display/display_scheduler_unittest.cc
@@ -123,7 +123,7 @@
   explicit DisplaySchedulerTest(bool wait_for_all_surfaces_before_draw = false)
       : fake_begin_frame_source_(0.f, false),
         task_runner_(new base::NullTaskRunner),
-        surface_manager_(4u),
+        surface_manager_(nullptr, 4u),
         scheduler_(&fake_begin_frame_source_,
                    &surface_manager_,
                    task_runner_.get(),
diff --git a/components/viz/service/display_embedder/software_output_device_ozone_unittest.cc b/components/viz/service/display_embedder/software_output_device_ozone_unittest.cc
index b9c42f0..c6368aa 100644
--- a/components/viz/service/display_embedder/software_output_device_ozone_unittest.cc
+++ b/components/viz/service/display_embedder/software_output_device_ozone_unittest.cc
@@ -92,7 +92,7 @@
       false /* enable_surface_synchronization */,
       false /* enable_pixel_canvas */);
   compositor_->SetAcceleratedWidget(window_delegate_.GetAcceleratedWidget());
-  compositor_->SetScaleAndSize(1.0f, size, LocalSurfaceId(), base::TimeTicks());
+  compositor_->SetScaleAndSize(1.0f, size, LocalSurfaceIdAllocation());
 
   ui::SurfaceFactoryOzone* factory =
       ui::OzonePlatform::GetInstance()->GetSurfaceFactoryOzone();
diff --git a/components/viz/service/frame_sinks/frame_sink_manager_impl.cc b/components/viz/service/frame_sinks/frame_sink_manager_impl.cc
index 3f4d721a..4a342a0 100644
--- a/components/viz/service/frame_sinks/frame_sink_manager_impl.cc
+++ b/components/viz/service/frame_sinks/frame_sink_manager_impl.cc
@@ -48,7 +48,7 @@
     DisplayProvider* display_provider)
     : shared_bitmap_manager_(shared_bitmap_manager),
       display_provider_(display_provider),
-      surface_manager_(activation_deadline_in_frames),
+      surface_manager_(this, activation_deadline_in_frames),
       hit_test_manager_(surface_manager()),
       binding_(this) {
   surface_manager_.AddObserver(&hit_test_manager_);
@@ -341,6 +341,14 @@
   }
 }
 
+base::StringPiece FrameSinkManagerImpl::GetFrameSinkDebugLabel(
+    const FrameSinkId& frame_sink_id) const {
+  auto it = frame_sink_data_.find(frame_sink_id);
+  if (it != frame_sink_data_.end())
+    return it->second.debug_label;
+  return base::StringPiece();
+}
+
 void FrameSinkManagerImpl::RegisterCompositorFrameSinkSupport(
     const FrameSinkId& frame_sink_id,
     CompositorFrameSinkSupport* support) {
@@ -537,14 +545,6 @@
   observer_list_.RemoveObserver(obs);
 }
 
-base::StringPiece FrameSinkManagerImpl::GetFrameSinkDebugLabel(
-    const FrameSinkId& frame_sink_id) const {
-  auto it = frame_sink_data_.find(frame_sink_id);
-  if (it != frame_sink_data_.end())
-    return it->second.debug_label;
-  return base::StringPiece();
-}
-
 std::vector<FrameSinkId> FrameSinkManagerImpl::GetCreatedFrameSinkIds() const {
   std::vector<FrameSinkId> frame_sink_ids;
   for (auto& map_entry : support_map_)
diff --git a/components/viz/service/frame_sinks/frame_sink_manager_impl.h b/components/viz/service/frame_sinks/frame_sink_manager_impl.h
index 7dca8e5..ecd7cdde 100644
--- a/components/viz/service/frame_sinks/frame_sink_manager_impl.h
+++ b/components/viz/service/frame_sinks/frame_sink_manager_impl.h
@@ -29,6 +29,7 @@
 #include "components/viz/service/hit_test/hit_test_aggregator_delegate.h"
 #include "components/viz/service/hit_test/hit_test_manager.h"
 #include "components/viz/service/surfaces/surface_manager.h"
+#include "components/viz/service/surfaces/surface_manager_delegate.h"
 #include "components/viz/service/surfaces/surface_observer.h"
 #include "components/viz/service/viz_service_export.h"
 #include "gpu/ipc/common/surface_handle.h"
@@ -50,7 +51,8 @@
     : public SurfaceObserver,
       public FrameSinkVideoCapturerManager,
       public mojom::FrameSinkManager,
-      public HitTestAggregatorDelegate {
+      public HitTestAggregatorDelegate,
+      public SurfaceManagerDelegate {
  public:
   explicit FrameSinkManagerImpl(
       SharedBitmapManager* shared_bitmap_manager,
@@ -123,6 +125,10 @@
       const FrameSinkId& frame_sink_id,
       const std::vector<AggregatedHitTestRegion>& hit_test_data) override;
 
+  // SurfaceManagerDelegate implementation:
+  base::StringPiece GetFrameSinkDebugLabel(
+      const FrameSinkId& frame_sink_id) const override;
+
   // CompositorFrameSinkSupport, hierarchy, and BeginFrameSource can be
   // registered and unregistered in any order with respect to each other.
   //
@@ -175,10 +181,6 @@
   void AddObserver(FrameSinkObserver* obs);
   void RemoveObserver(FrameSinkObserver* obs);
 
-  // Returns the debug label associated with |frame_sink_id| if any.
-  base::StringPiece GetFrameSinkDebugLabel(
-      const FrameSinkId& frame_sink_id) const;
-
   // Returns ids of all FrameSinks that were created.
   std::vector<FrameSinkId> GetCreatedFrameSinkIds() const;
   // Returns ids of all FrameSinks that were registered.
diff --git a/components/viz/service/surfaces/surface_manager.cc b/components/viz/service/surfaces/surface_manager.cc
index dbe663b..f906e793 100644
--- a/components/viz/service/surfaces/surface_manager.cc
+++ b/components/viz/service/surfaces/surface_manager.cc
@@ -20,6 +20,7 @@
 #include "components/viz/common/surfaces/surface_info.h"
 #include "components/viz/service/surfaces/surface.h"
 #include "components/viz/service/surfaces/surface_client.h"
+#include "components/viz/service/surfaces/surface_manager_delegate.h"
 
 #if DCHECK_IS_ON()
 #include <sstream>
@@ -41,8 +42,10 @@
 }  // namespace
 
 SurfaceManager::SurfaceManager(
+    SurfaceManagerDelegate* delegate,
     base::Optional<uint32_t> activation_deadline_in_frames)
-    : activation_deadline_in_frames_(activation_deadline_in_frames),
+    : delegate_(delegate),
+      activation_deadline_in_frames_(activation_deadline_in_frames),
       dependency_tracker_(this),
       root_surface_id_(FrameSinkId(0u, 0u),
                        LocalSurfaceId(1u, base::UnguessableToken::Create())),
@@ -480,7 +483,13 @@
       // The temporary reference has existed for more than 10 seconds, a surface
       // reference should have replaced it by now. To avoid permanently leaking
       // memory delete the temporary reference.
-      DLOG(ERROR) << "Old/orphaned temporary reference to " << surface_id;
+      base::StringPiece frame_sink_debug_label;
+      if (delegate_) {
+        frame_sink_debug_label =
+            delegate_->GetFrameSinkDebugLabel(surface_id.frame_sink_id());
+      }
+      DLOG(ERROR) << "Old/orphaned temporary reference to "
+                  << surface_id.ToString(frame_sink_debug_label);
       temporary_references_to_delete.push_back(surface_id);
     } else if (IsMarkedForDestruction(surface_id)) {
       // Never mark live surfaces as old, they can't be garbage collected.
diff --git a/components/viz/service/surfaces/surface_manager.h b/components/viz/service/surfaces/surface_manager.h
index 7420976..6076dbd 100644
--- a/components/viz/service/surfaces/surface_manager.h
+++ b/components/viz/service/surfaces/surface_manager.h
@@ -39,13 +39,14 @@
 namespace viz {
 
 class Surface;
+class SurfaceManagerDelegate;
 struct BeginFrameAck;
 struct BeginFrameArgs;
 
 class VIZ_SERVICE_EXPORT SurfaceManager {
  public:
-  explicit SurfaceManager(
-      base::Optional<uint32_t> activation_deadline_in_frames);
+  SurfaceManager(SurfaceManagerDelegate* delegate,
+                 base::Optional<uint32_t> activation_deadline_in_frames);
   ~SurfaceManager();
 
 #if DCHECK_IS_ON()
@@ -270,6 +271,9 @@
   // Returns true if |surface_id| is in the garbage collector's queue.
   bool IsMarkedForDestruction(const SurfaceId& surface_id);
 
+  // Can be nullptr.
+  SurfaceManagerDelegate* const delegate_;
+
   base::Optional<uint32_t> activation_deadline_in_frames_;
 
   // SurfaceDependencyTracker needs to be destroyed after Surfaces are destroyed
diff --git a/components/viz/service/surfaces/surface_manager_delegate.h b/components/viz/service/surfaces/surface_manager_delegate.h
new file mode 100644
index 0000000..a697fc7
--- /dev/null
+++ b/components/viz/service/surfaces/surface_manager_delegate.h
@@ -0,0 +1,24 @@
+// Copyright 2018 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.
+
+#ifndef COMPONENTS_VIZ_SERVICE_SURFACES_SURFACE_MANAGER_DELEGATE_H_
+#define COMPONENTS_VIZ_SERVICE_SURFACES_SURFACE_MANAGER_DELEGATE_H_
+
+#include "base/strings/string_piece.h"
+#include "components/viz/service/viz_service_export.h"
+
+namespace viz {
+
+class VIZ_SERVICE_EXPORT SurfaceManagerDelegate {
+ public:
+  virtual ~SurfaceManagerDelegate() = default;
+
+  // Returns the debug label associated with |frame_sink_id| if any.
+  virtual base::StringPiece GetFrameSinkDebugLabel(
+      const FrameSinkId& frame_sink_id) const = 0;
+};
+
+}  // namespace viz
+
+#endif  // COMPONENTS_VIZ_SERVICE_SURFACES_SURFACE_MANAGER_DELEGATE_H_
diff --git a/components/viz/test/test_context_provider.cc b/components/viz/test/test_context_provider.cc
index 9edb2b0c..9295f92 100644
--- a/components/viz/test/test_context_provider.cc
+++ b/components/viz/test/test_context_provider.cc
@@ -122,6 +122,17 @@
     return gpu::Mailbox::Generate();
   }
 
+  gpu::Mailbox CreateSharedImage(
+      gfx::GpuMemoryBuffer* gpu_memory_buffer,
+      gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
+      const gfx::ColorSpace& color_space,
+      uint32_t usage) override {
+    return gpu::Mailbox::Generate();
+  }
+
+  void UpdateSharedImage(const gpu::SyncToken& sync_token,
+                         const gpu::Mailbox& mailbox) override {}
+
   void DestroySharedImage(const gpu::SyncToken& sync_token,
                           const gpu::Mailbox& mailbox) override {}
 
diff --git a/content/browser/background_fetch/background_fetch_embedded_worker_test_helper.cc b/content/browser/background_fetch/background_fetch_embedded_worker_test_helper.cc
index 48338d1..78f2d78 100644
--- a/content/browser/background_fetch/background_fetch_embedded_worker_test_helper.cc
+++ b/content/browser/background_fetch/background_fetch_embedded_worker_test_helper.cc
@@ -24,11 +24,9 @@
   last_registration_ = registration;
 
   if (fail_abort_event_) {
-    std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::REJECTED,
-                            base::TimeTicks::Now());
+    std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::REJECTED);
   } else {
-    std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                            base::TimeTicks::Now());
+    std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
   }
 
   if (abort_event_closure_)
@@ -41,11 +39,9 @@
   last_registration_ = registration;
 
   if (fail_click_event_) {
-    std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::REJECTED,
-                            base::TimeTicks::Now());
+    std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::REJECTED);
   } else {
-    std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                            base::TimeTicks::Now());
+    std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
   }
 
   if (click_event_closure_)
@@ -58,11 +54,9 @@
   last_registration_ = registration;
 
   if (fail_fetch_fail_event_) {
-    std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::REJECTED,
-                            base::TimeTicks::Now());
+    std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::REJECTED);
   } else {
-    std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                            base::TimeTicks::Now());
+    std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
   }
 
   if (fetch_fail_event_closure_)
@@ -76,11 +70,9 @@
   last_registration_ = registration;
 
   if (fail_fetched_event_) {
-    std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::REJECTED,
-                            base::TimeTicks::Now());
+    std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::REJECTED);
   } else {
-    std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                            base::TimeTicks::Now());
+    std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
   }
 
   if (fetched_event_closure_)
diff --git a/content/browser/background_sync/background_sync_manager.cc b/content/browser/background_sync/background_sync_manager.cc
index 5d29aff..0b580589 100644
--- a/content/browser/background_sync/background_sync_manager.cc
+++ b/content/browser/background_sync/background_sync_manager.cc
@@ -150,8 +150,7 @@
 void OnSyncEventFinished(scoped_refptr<ServiceWorkerVersion> active_version,
                          int request_id,
                          ServiceWorkerVersion::StatusCallback callback,
-                         blink::mojom::ServiceWorkerEventStatus status,
-                         base::TimeTicks /* dispatch_event_time */) {
+                         blink::mojom::ServiceWorkerEventStatus status) {
   if (!active_version->FinishRequest(
           request_id,
           status == blink::mojom::ServiceWorkerEventStatus::COMPLETED)) {
diff --git a/content/browser/cookie_store/cookie_store_manager_unittest.cc b/content/browser/cookie_store/cookie_store_manager_unittest.cc
index 0cd0a13..423c034 100644
--- a/content/browser/cookie_store/cookie_store_manager_unittest.cc
+++ b/content/browser/cookie_store/cookie_store_manager_unittest.cc
@@ -166,8 +166,7 @@
       mojom::ServiceWorker::DispatchCookieChangeEventCallback callback)
       override {
     changes_.emplace_back(cookie, cause);
-    std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                            base::TimeTicks::Now());
+    std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
   }
 
  private:
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index f1a1727..a75586f2 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -114,18 +114,6 @@
       BrowserContext::GetStoragePartition(context, site_instance));
 }
 
-bool CanRequestURLFromRenderer(int render_process_id, GURL url) {
-  DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  // Check if the renderer is permitted to request the requested URL.
-  if (!ChildProcessSecurityPolicyImpl::GetInstance()->CanRequestURL(
-          render_process_id, url)) {
-    DVLOG(1) << "Denied unauthorized download request for "
-             << url.possibly_invalid_spec();
-    return false;
-  }
-  return true;
-}
-
 void OnDownloadStarted(
     download::DownloadItemImpl* download,
     const download::DownloadUrlParameters::OnStartedCallback& on_started) {
@@ -560,15 +548,11 @@
       in_progress_downloads = in_progress_manager_->TakeInProgressDownloads();
   uint32_t max_id = download::DownloadItem::kInvalidId;
   for (auto& download : in_progress_downloads) {
-    DCHECK(!base::ContainsKey(downloads_by_guid_, download->GetGuid()));
-    // If this id is not unique, drop this download, this may happen due to a
-    // previous history DB failure. See http://crbug.com/898859.
-    // TODO(qinmin): remove the downloaded files too if wasn't completed.
-    if (base::ContainsKey(downloads_, download->GetId())) {
+    uint32_t id = download->GetId();
+    if (base::ContainsKey(in_progress_downloads_, id)) {
       in_progress_manager_->RemoveInProgressDownload(download->GetGuid());
       continue;
     }
-    uint32_t id = download->GetId();
     if (id > max_id)
       max_id = id;
 #if defined(OS_ANDROID)
@@ -580,14 +564,7 @@
       continue;
     }
 #endif  // defined(OS_ANDROID)
-    DownloadItemUtils::AttachInfo(download.get(), GetBrowserContext(), nullptr);
-    download::DownloadItemImpl* item = download.get();
-    item->SetDelegate(this);
-    downloads_by_guid_[download->GetGuid()] = item;
-    downloads_[id] = std::move(download);
-    for (auto& observer : observers_)
-      observer.OnDownloadCreated(this, item);
-    DVLOG(20) << __func__ << "() download = " << item->DebugString(true);
+    in_progress_downloads_[id] = std::move(download);
   }
   PostInitialization(DOWNLOAD_INITIALIZATION_DEPENDENCY_IN_PROGRESS_CACHE);
   SetNextId(max_id + 1);
@@ -736,11 +713,7 @@
   DownloadItemUtils::AttachInfo(download_item, GetBrowserContext(),
                                 WebContentsImpl::FromRenderFrameHostID(
                                     render_process_id, render_frame_id));
-  downloads_[download_item->GetId()] = base::WrapUnique(download_item);
-  DCHECK(!base::ContainsKey(downloads_by_guid_, download_item->GetGuid()));
-  downloads_by_guid_[download_item->GetGuid()] = download_item;
-  for (auto& observer : observers_)
-    observer.OnDownloadCreated(this, download_item);
+  OnDownloadCreated(base::WrapUnique(download_item));
   if (!item_created.is_null())
     item_created.Run(download_item);
 }
@@ -976,6 +949,9 @@
     base::Time last_access_time,
     bool transient,
     const std::vector<download::DownloadItem::ReceivedSlice>& received_slices) {
+  // Retrive the in-progress download if it exists. Notice that this also
+  // removes it from |in_progress_downloads_|.
+  auto download = RetrieveInProgressDownload(id);
 #if defined(OS_ANDROID)
   // On Android, there is no way to interact with cancelled or non-resumable
   // download. Simply returning null and don't store them in this class to
@@ -989,29 +965,44 @@
     return nullptr;
   }
 #endif
-  if (base::ContainsKey(downloads_, id)) {
+  if (download) {
     // If a completed or cancelled download item is already in the history db,
     // remove it from the in-progress db.
     if (state == download::DownloadItem::COMPLETE ||
         state == download::DownloadItem::CANCELLED) {
       in_progress_manager_->RemoveInProgressDownload(guid);
-    } else {
-      return downloads_[id].get();
+      // Destroy |download| as we can create from the history instead.
+      download.reset();
     }
   }
-  download::DownloadItemImpl* item = item_factory_->CreatePersistedItem(
-      this, guid, id, current_path, target_path, url_chain, referrer_url,
-      site_url, tab_url, tab_refererr_url, mime_type, original_mime_type,
-      start_time, end_time, etag, last_modified, received_bytes, total_bytes,
-      hash, state, danger_type, interrupt_reason, opened, last_access_time,
-      transient, received_slices);
-  DownloadItemUtils::AttachInfo(item, GetBrowserContext(), nullptr);
-  downloads_[id] = base::WrapUnique(item);
-  downloads_by_guid_[guid] = item;
+  download::DownloadItemImpl* item = download.get();
+  if (item) {
+    item->SetDelegate(this);
+    DownloadItemUtils::AttachInfo(item, GetBrowserContext(), nullptr);
+    OnDownloadCreated(std::move(download));
+  } else {
+    item = item_factory_->CreatePersistedItem(
+        this, guid, id, current_path, target_path, url_chain, referrer_url,
+        site_url, tab_url, tab_refererr_url, mime_type, original_mime_type,
+        start_time, end_time, etag, last_modified, received_bytes, total_bytes,
+        hash, state, danger_type, interrupt_reason, opened, last_access_time,
+        transient, received_slices);
+    DownloadItemUtils::AttachInfo(item, GetBrowserContext(), nullptr);
+    OnDownloadCreated(base::WrapUnique(item));
+  }
+  return item;
+}
+
+void DownloadManagerImpl::OnDownloadCreated(
+    std::unique_ptr<download::DownloadItemImpl> download) {
+  DCHECK(!base::ContainsKey(downloads_, download->GetId()));
+  DCHECK(!base::ContainsKey(downloads_by_guid_, download->GetGuid()));
+  download::DownloadItemImpl* item = download.get();
+  downloads_[item->GetId()] = std::move(download);
+  downloads_by_guid_[item->GetGuid()] = item;
   for (auto& observer : observers_)
     observer.OnDownloadCreated(this, item);
   DVLOG(20) << __func__ << "() download = " << item->DebugString(true);
-  return item;
 }
 
 void DownloadManagerImpl::PostInitialization(
@@ -1042,7 +1033,9 @@
   // cache are initialized.
   initialized_ = history_db_initialized_ && in_progress_cache_initialized_;
 
-  if (initialized_) {
+  if (!initialized_)
+    return;
+
 #if defined(OS_ANDROID)
     for (const auto& guid : cleared_download_guids_on_startup_)
       in_progress_manager_->RemoveInProgressDownload(guid);
@@ -1058,9 +1051,19 @@
           interrupted_download_cleared_from_history_);
     }
 #endif
+
+    // If there are still downloads in |in_progress_downloads_|, import them
+    // now.
+    for (auto& download : in_progress_downloads_) {
+      auto item = std::move(download.second);
+      item->SetDelegate(this);
+      DownloadItemUtils::AttachInfo(item.get(), GetBrowserContext(), nullptr);
+      OnDownloadCreated(std::move(item));
+    }
+    in_progress_downloads_.clear();
+
     for (auto& observer : observers_)
       observer.OnManagerInitialized();
-  }
 }
 
 bool DownloadManagerImpl::IsManagerInitialized() const {
@@ -1284,8 +1287,7 @@
     const GURL& site_url) {
   // Check if the renderer is permitted to request the requested URL.
   if (params->render_process_host_id() >= 0 &&
-      !CanRequestURLFromRenderer(params->render_process_host_id(),
-                                 params->url())) {
+      !CanRequestURL(params->render_process_host_id(), params->url())) {
     CreateInterruptedDownload(
         std::move(params),
         download::DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST,
@@ -1357,4 +1359,14 @@
 }
 #endif  // defined(OS_ANDROID)
 
+std::unique_ptr<download::DownloadItemImpl>
+DownloadManagerImpl::RetrieveInProgressDownload(uint32_t id) {
+  if (base::ContainsKey(in_progress_downloads_, id)) {
+    auto download = std::move(in_progress_downloads_[id]);
+    in_progress_downloads_.erase(id);
+    return download;
+  }
+  return nullptr;
+}
+
 }  // namespace content
diff --git a/content/browser/download/download_manager_impl.h b/content/browser/download/download_manager_impl.h
index 143ffcf9..3043520 100644
--- a/content/browser/download/download_manager_impl.h
+++ b/content/browser/download/download_manager_impl.h
@@ -292,6 +292,13 @@
   // Whether |next_download_id_| is initialized.
   bool IsNextIdInitialized() const;
 
+  // Called when a new download is created.
+  void OnDownloadCreated(std::unique_ptr<download::DownloadItemImpl> download);
+
+  // Retrieves a download from |in_progress_downloads_|.
+  std::unique_ptr<download::DownloadItemImpl> RetrieveInProgressDownload(
+      uint32_t id);
+
 #if defined(OS_ANDROID)
   // Check whether a download should be cleared from history. On Android,
   // cancelled and non-resumable interrupted download will be cleaned up to
@@ -367,6 +374,11 @@
   int cancelled_download_cleared_from_history_;
   int interrupted_download_cleared_from_history_;
 
+  // In progress downloads returned by |in_progress_manager_| that are not yet
+  // added to |downloads_|.
+  std::unordered_map<uint32_t, std::unique_ptr<download::DownloadItemImpl>>
+      in_progress_downloads_;
+
   // Callbacks to run once download ID is determined.
   using IdCallbackVector = std::vector<std::unique_ptr<GetNextIdCallback>>;
   IdCallbackVector id_callbacks_;
diff --git a/content/browser/download/download_manager_impl_unittest.cc b/content/browser/download/download_manager_impl_unittest.cc
index 4ee8459..6ad5dcf 100644
--- a/content/browser/download/download_manager_impl_unittest.cc
+++ b/content/browser/download/download_manager_impl_unittest.cc
@@ -521,6 +521,11 @@
     download_manager_->OnInProgressDownloadManagerInitialized();
   }
 
+  void OnHistoryDBInitialized() {
+    download_manager_->PostInitialization(
+        DownloadManager::DOWNLOAD_INITIALIZATION_DEPENDENCY_HISTORY_DB);
+  }
+
   void SetInProgressDownloadManager(
       std::unique_ptr<download::InProgressDownloadManager> manager) {
     download_manager_->in_progress_manager_ = std::move(manager);
@@ -746,8 +751,10 @@
   EXPECT_CALL(GetMockObserver(), OnDownloadCreated(download_manager_.get(), _))
       .WillOnce(Return());
   OnInProgressDownloadManagerInitialized();
-  ASSERT_TRUE(download_manager_->GetDownloadByGuid(kGuid));
+  ASSERT_FALSE(download_manager_->GetDownloadByGuid(kGuid));
 
+  OnHistoryDBInitialized();
+  ASSERT_TRUE(download_manager_->GetDownloadByGuid(kGuid));
   download::DownloadItem* download =
       download_manager_->GetDownloadByGuid(kGuid);
   download->Remove();
diff --git a/content/browser/download/download_utils.cc b/content/browser/download/download_utils.cc
index 491f42c..293272e 100644
--- a/content/browser/download/download_utils.cc
+++ b/content/browser/download/download_utils.cc
@@ -20,6 +20,7 @@
 #include "content/browser/resource_context_impl.h"
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/browser_thread.h"
+#include "content/public/browser/child_process_security_policy.h"
 #include "content/public/browser/download_manager_delegate.h"
 #include "content/public/browser/render_frame_host.h"
 #include "content/public/browser/render_process_host.h"
@@ -99,4 +100,15 @@
   return request;
 }
 
+bool CanRequestURL(int render_process_id, const GURL& url) {
+  // Check if the renderer is permitted to request the requested URL.
+  if (!ChildProcessSecurityPolicy::GetInstance()->CanRequestURL(
+          render_process_id, url)) {
+    DVLOG(1) << "Denied unauthorized download request for "
+             << url.possibly_invalid_spec();
+    return false;
+  }
+  return true;
+}
+
 }  // namespace content
diff --git a/content/browser/download/download_utils.h b/content/browser/download/download_utils.h
index a032894..091774f 100644
--- a/content/browser/download/download_utils.h
+++ b/content/browser/download/download_utils.h
@@ -10,6 +10,7 @@
 #include "base/memory/ref_counted.h"
 #include "base/optional.h"
 #include "content/common/content_export.h"
+#include "url/gurl.h"
 
 namespace download {
 class DownloadUrlParameters;
@@ -37,6 +38,9 @@
 storage::BlobStorageContext* BlobStorageContextGetter(
     ResourceContext* resource_context);
 
+// Returns if the URL passes the security check and can be requested.
+bool CanRequestURL(int render_process_id, const GURL& url);
+
 }  // namespace content
 
 #endif  // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_UTILS_H_
diff --git a/content/browser/download/url_downloader.cc b/content/browser/download/url_downloader.cc
index 62d28be..5b05ad9 100644
--- a/content/browser/download/url_downloader.cc
+++ b/content/browser/download/url_downloader.cc
@@ -17,8 +17,10 @@
 #include "components/download/public/common/url_download_request_handle.h"
 #include "content/browser/byte_stream.h"
 #include "content/browser/download/byte_stream_input_stream.h"
+#include "content/browser/download/download_utils.h"
 #include "content/public/browser/browser_task_traits.h"
 #include "content/public/browser/browser_thread.h"
+#include "content/public/common/child_process_host.h"
 #include "net/base/io_buffer.h"
 #include "net/base/load_flags.h"
 #include "net/base/net_errors.h"
@@ -41,6 +43,7 @@
       Referrer::SanitizeForRequest(request->url(), referrer);
   Referrer::SetReferrerForRequest(request.get(), sanitized_referrer);
 
+  // TODO(xingliu): Figure out if we can support blob scheme.
   if (request->url().SchemeIs(url::kBlobScheme))
     return nullptr;
 
@@ -85,10 +88,13 @@
 void UrlDownloader::OnReceivedRedirect(net::URLRequest* request,
                                        const net::RedirectInfo& redirect_info,
                                        bool* defer_redirect) {
-  if (follow_cross_origin_redirects_)
+  DVLOG(1) << __func__ << " , request url: " << request_->url().spec()
+           << " ,redirect url:" << redirect_info.new_url;
+  if (follow_cross_origin_redirects_ &&
+      CanRequestURL(content::ChildProcessHost::kInvalidUniqueID,
+                    redirect_info.new_url)) {
     return;
-
-  DVLOG(1) << "OnReceivedRedirect: " << request_->url().spec();
+  }
 
   // Block redirects since there is no security policy being applied here.
   core_.OnWillAbort(download::DOWNLOAD_INTERRUPT_REASON_SERVER_UNREACHABLE);
@@ -105,6 +111,14 @@
     return;
   }
 
+  if (!CanRequestURL(content::ChildProcessHost::kInvalidUniqueID,
+                     request_->url())) {
+    core_.OnWillAbort(
+        download::DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST);
+    request_->CancelWithError(net::ERR_DISALLOWED_URL_SCHEME);
+    return;
+  }
+
   if (core_.OnResponseStarted(std::string()))
     StartReading(false);  // Read the first chunk.
   else
diff --git a/content/browser/download/url_downloader.h b/content/browser/download/url_downloader.h
index bd5efee2..6552a403 100644
--- a/content/browser/download/url_downloader.h
+++ b/content/browser/download/url_downloader.h
@@ -79,7 +79,7 @@
   base::WeakPtr<download::UrlDownloadHandler::Delegate> delegate_;
   DownloadRequestCore core_;
 
-  bool follow_cross_origin_redirects_;
+  const bool follow_cross_origin_redirects_;
 
   base::WeakPtrFactory<UrlDownloader> weak_ptr_factory_;
 };
diff --git a/content/browser/fileapi/file_system_manager_impl.cc b/content/browser/fileapi/file_system_manager_impl.cc
index c11ea6c1..d9b2eb6 100644
--- a/content/browser/fileapi/file_system_manager_impl.cc
+++ b/content/browser/fileapi/file_system_manager_impl.cc
@@ -630,6 +630,7 @@
   if (bindings_.empty()) {
     in_transit_snapshot_files_.Clear();
     operation_runner_.reset();
+    cancellable_operations_.CloseAllBindings();
   }
 }
 
diff --git a/content/browser/indexed_db/database_impl.cc b/content/browser/indexed_db/database_impl.cc
index 20acdb1..0176ed1 100644
--- a/content/browser/indexed_db/database_impl.cc
+++ b/content/browser/indexed_db/database_impl.cc
@@ -683,7 +683,10 @@
 
   uint64_t commit_size = mojo_value->bits.size() + key.size_estimate();
   IndexedDBValue value;
-  swap(value.bits, mojo_value->bits);
+  // TODO(crbug.com/902498): Use mojom traits to map directly to std::string.
+  value.bits = std::string(mojo_value->bits.begin(), mojo_value->bits.end());
+  // Release mojo_value->bits std::vector.
+  mojo_value->bits.clear();
   swap(value.blob_info, blob_info);
   connection_->database()->Put(transaction, object_store_id, &value,
                                std::make_unique<IndexedDBKey>(key), mode,
diff --git a/content/browser/indexed_db/indexed_db_browsertest.cc b/content/browser/indexed_db/indexed_db_browsertest.cc
index 1ae750d..f59d959f 100644
--- a/content/browser/indexed_db/indexed_db_browsertest.cc
+++ b/content/browser/indexed_db/indexed_db_browsertest.cc
@@ -447,6 +447,39 @@
   EXPECT_NE(original_size, new_size);
 }
 
+// IndexedDBBrowserTestWithCrbug899446* capture IDB instances from Chrome stable
+// to verify that the current code can read those instances.  For more info on
+// a case when Chrome canary couldn't read stable's IDB instances, see
+// https://crbug.com/899446.
+
+class IndexedDBBrowserTestWithCrbug899446
+    : public IndexedDBBrowserTestWithPreexistingLevelDB {
+  std::string EnclosingLevelDBDir() override { return "crbug899446"; }
+};
+
+IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithCrbug899446, StableTest) {
+  int64_t original_size = RequestUsage(kFileOrigin);
+  EXPECT_GT(original_size, 0);
+  SimpleTest(GetTestUrl("indexeddb", "crbug899446.html"));
+  int64_t new_size = RequestUsage(kFileOrigin);
+  EXPECT_GT(new_size, 0);
+  EXPECT_NE(original_size, new_size);
+}
+
+class IndexedDBBrowserTestWithCrbug899446Noai
+    : public IndexedDBBrowserTestWithPreexistingLevelDB {
+  std::string EnclosingLevelDBDir() override { return "crbug899446_noai"; }
+};
+
+IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTestWithCrbug899446Noai, StableTest) {
+  int64_t original_size = RequestUsage(kFileOrigin);
+  EXPECT_GT(original_size, 0);
+  SimpleTest(GetTestUrl("indexeddb", "crbug899446_noai.html"));
+  int64_t new_size = RequestUsage(kFileOrigin);
+  EXPECT_GT(new_size, 0);
+  EXPECT_NE(original_size, new_size);
+}
+
 IN_PROC_BROWSER_TEST_F(IndexedDBBrowserTest, LevelDBLogFileTest) {
   // Any page that opens an IndexedDB will work here.
   SimpleTest(GetTestUrl("indexeddb", "database_test.html"));
diff --git a/content/browser/indexed_db/indexed_db_callbacks.cc b/content/browser/indexed_db/indexed_db_callbacks.cc
index 84b21d6..dcff2a59 100644
--- a/content/browser/indexed_db/indexed_db_callbacks.cc
+++ b/content/browser/indexed_db/indexed_db_callbacks.cc
@@ -123,8 +123,15 @@
     mojo_value->primary_key = value->primary_key;
     mojo_value->key_path = value->key_path;
   }
-  if (!value->empty())
-    swap(mojo_value->value->bits, value->bits);
+  if (!value->empty()) {
+    // TODO(crbug.com/902498): Use mojom traits to map directly from
+    //                         std::string.
+    const char* value_data = value->bits.data();
+    mojo_value->value->bits =
+        std::vector<uint8_t>(value_data, value_data + value->bits.length());
+    // Release value->bits std::string.
+    value->bits.clear();
+  }
   ConvertBlobInfo(value->blob_info, &mojo_value->value->blob_or_file_info);
   return mojo_value;
 }
@@ -196,8 +203,15 @@
 blink::mojom::IDBValuePtr IndexedDBCallbacks::ConvertAndEraseValue(
     IndexedDBValue* value) {
   auto mojo_value = blink::mojom::IDBValue::New();
-  if (!value->empty())
-    swap(mojo_value->bits, value->bits);
+  if (!value->empty()) {
+    // TODO(crbug.com/902498): Use mojom traits to map directly from
+    //                         std::string.
+    const char* value_data = value->bits.data();
+    mojo_value->bits =
+        std::vector<uint8_t>(value_data, value_data + value->bits.length());
+    // Release value->bits std::string.
+    value->bits.clear();
+  }
   ConvertBlobInfo(value->blob_info, &mojo_value->blob_or_file_info);
   return mojo_value;
 }
diff --git a/content/browser/indexed_db/indexed_db_dispatcher_host_unittest.cc b/content/browser/indexed_db/indexed_db_dispatcher_host_unittest.cc
index 64bae16..470a25a 100644
--- a/content/browser/indexed_db/indexed_db_dispatcher_host_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_dispatcher_host_unittest.cc
@@ -433,12 +433,20 @@
     mojo::MakeRequest(&blob);
     blobs.push_back(blink::mojom::IDBBlobInfo::New(
         std::move(blob), "fakeUUID", base::string16(), 100, nullptr));
-    connection.database->Put(kTransactionId, kObjectStoreId,
-                             IDBValue::New("hello", std::move(blobs)),
-                             IndexedDBKey(base::UTF8ToUTF16("hello")),
-                             blink::kWebIDBPutModeAddOnly,
-                             std::vector<IndexedDBIndexKeys>(),
-                             put_callbacks->CreateInterfacePtrAndBind());
+
+    std::string value = "hello";
+    const char* value_data = value.data();
+    std::vector<uint8_t> value_vector(value_data, value_data + value.length());
+
+    auto new_value = blink::mojom::IDBValue::New();
+    new_value->bits = std::move(value_vector);
+    new_value->blob_or_file_info = std::move(blobs);
+
+    connection.database->Put(
+        kTransactionId, kObjectStoreId, std::move(new_value),
+        IndexedDBKey(base::UTF8ToUTF16("hello")), blink::kWebIDBPutModeAddOnly,
+        std::vector<IndexedDBIndexKeys>(),
+        put_callbacks->CreateInterfacePtrAndBind());
     connection.database->Commit(kTransactionId);
     loop.Run();
   }
@@ -1058,10 +1066,17 @@
     connection1.database->CreateObjectStore(kTransactionId1, kObjectStoreId,
                                             base::UTF8ToUTF16(kObjectStoreName),
                                             blink::IndexedDBKeyPath(), false);
+
+    std::string value = "value";
+    const char* value_data = value.data();
+    std::vector<uint8_t> value_vector(value_data, value_data + value.length());
+
+    auto new_value = blink::mojom::IDBValue::New();
+    new_value->bits = std::move(value_vector);
+    new_value->blob_or_file_info = std::vector<blink::mojom::IDBBlobInfoPtr>();
+
     connection1.database->Put(
-        kTransactionId1, kObjectStoreId,
-        blink::mojom::IDBValue::New(
-            "value", std::vector<blink::mojom::IDBBlobInfoPtr>()),
+        kTransactionId1, kObjectStoreId, std::move(new_value),
         IndexedDBKey(base::UTF8ToUTF16("key")), blink::kWebIDBPutModeAddOnly,
         std::vector<IndexedDBIndexKeys>(),
         put_callbacks->CreateInterfacePtrAndBind());
diff --git a/content/browser/network_service_instance.cc b/content/browser/network_service_instance.cc
index 5438bae..bf67e764 100644
--- a/content/browser/network_service_instance.cc
+++ b/content/browser/network_service_instance.cc
@@ -25,7 +25,6 @@
 #include "net/log/net_log_util.h"
 #include "services/network/network_service.h"
 #include "services/network/public/cpp/features.h"
-#include "services/network/public/cpp/network_connection_tracker.h"
 #include "services/network/public/cpp/network_switches.h"
 #include "services/network/public/mojom/net_log.mojom.h"
 #include "services/network/public/mojom/network_change_manager.mojom.h"
@@ -205,11 +204,32 @@
 
 void GetNetworkConnectionTrackerFromUIThread(
     base::OnceCallback<void(network::NetworkConnectionTracker*)> callback) {
+  // TODO(fdoray): Investigate why this is needed. The IO thread is supposed to
+  // be initialized by the time the UI thread starts running tasks.
+  //
+  // GetNetworkConnectionTracker() will call CreateNetworkServiceOnIO(). Here it
+  // makes sure the IO thread is running when CreateNetworkServiceOnIO() is
+  // called.
+  if (!content::BrowserThread::IsThreadInitialized(
+          content::BrowserThread::IO)) {
+    // IO thread is not yet initialized. Try again in the next message pump.
+    bool task_posted = base::ThreadTaskRunnerHandle::Get()->PostTask(
+        FROM_HERE, base::BindOnce(&GetNetworkConnectionTrackerFromUIThread,
+                                  std::move(callback)));
+    DCHECK(task_posted);
+    return;
+  }
+
   base::PostTaskWithTraitsAndReplyWithResult(
       FROM_HERE, {BrowserThread::UI, base::TaskPriority::BEST_EFFORT},
       base::BindOnce(&GetNetworkConnectionTracker), std::move(callback));
 }
 
+network::NetworkConnectionTrackerAsyncGetter
+CreateNetworkConnectionTrackerAsyncGetter() {
+  return base::BindRepeating(&content::GetNetworkConnectionTrackerFromUIThread);
+}
+
 void SetNetworkConnectionTrackerForTesting(
     network::NetworkConnectionTracker* network_connection_tracker) {
   if (g_network_connection_tracker != network_connection_tracker) {
diff --git a/content/browser/payments/payment_app_content_unittest_base.cc b/content/browser/payments/payment_app_content_unittest_base.cc
index a8d1286..a726975 100644
--- a/content/browser/payments/payment_app_content_unittest_base.cc
+++ b/content/browser/payments/payment_app_content_unittest_base.cc
@@ -94,8 +94,8 @@
           std::move(callback));
     } else {
       pending_response_callback_ = std::move(response_callback);
-      std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                              base::TimeTicks::Now());
+      std::move(callback).Run(
+          blink::mojom::ServiceWorkerEventStatus::COMPLETED);
     }
   }
 
@@ -227,8 +227,7 @@
 void PaymentAppContentUnitTestBase::RespondPendingPaymentRequest() {
   std::move(worker_helper_->pending_response_callback_)
       ->OnResponseForPaymentRequest(
-          payments::mojom::PaymentHandlerResponse::New(),
-          base::TimeTicks::Now());
+          payments::mojom::PaymentHandlerResponse::New());
 }
 
 int64_t PaymentAppContentUnitTestBase::last_sw_registration_id() const {
diff --git a/content/browser/payments/payment_app_provider_impl.cc b/content/browser/payments/payment_app_provider_impl.cc
index b7d0615..d821dc59 100644
--- a/content/browser/payments/payment_app_provider_impl.cc
+++ b/content/browser/payments/payment_app_provider_impl.cc
@@ -125,8 +125,7 @@
   }
 
   void OnResponseForPaymentRequest(
-      payments::mojom::PaymentHandlerResponsePtr response,
-      base::TimeTicks dispatch_event_time) override {
+      payments::mojom::PaymentHandlerResponsePtr response) override {
     DCHECK_CURRENTLY_ON(BrowserThread::IO);
     service_worker_version_->FinishRequest(request_id_, false);
     base::PostTaskWithTraits(
@@ -138,9 +137,7 @@
     delete this;
   }
 
-  void OnResponseForCanMakePayment(
-      bool can_make_payment,
-      base::TimeTicks dispatch_event_time) override {
+  void OnResponseForCanMakePayment(bool can_make_payment) override {
     DCHECK_CURRENTLY_ON(BrowserThread::IO);
     service_worker_version_->FinishRequest(request_id_, false);
     base::PostTaskWithTraits(
@@ -150,8 +147,7 @@
     delete this;
   }
 
-  void OnResponseForAbortPayment(bool payment_aborted,
-                                 base::TimeTicks dispatch_event_time) override {
+  void OnResponseForAbortPayment(bool payment_aborted) override {
     DCHECK_CURRENTLY_ON(BrowserThread::IO);
     service_worker_version_->FinishRequest(request_id_, false);
     base::PostTaskWithTraits(
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.h b/content/browser/renderer_host/browser_compositor_view_mac.h
index 001c5c5..6aa9090 100644
--- a/content/browser/renderer_host/browser_compositor_view_mac.h
+++ b/content/browser/renderer_host/browser_compositor_view_mac.h
@@ -34,9 +34,7 @@
   virtual void BrowserCompositorMacOnBeginFrame(base::TimeTicks frame_time) = 0;
   virtual void OnFrameTokenChanged(uint32_t frame_token) = 0;
   virtual void DestroyCompositorForShutdown() = 0;
-  virtual bool SynchronizeVisualProperties(
-      const base::Optional<viz::LocalSurfaceIdAllocation>&
-          child_local_surface_id_allocation) = 0;
+  virtual bool OnBrowserCompositorSurfaceIdChanged() = 0;
   virtual std::vector<viz::SurfaceId> CollectSurfaceIdsForEviction() = 0;
 };
 
@@ -62,7 +60,9 @@
   // These will not return nullptr until Destroy is called.
   DelegatedFrameHost* GetDelegatedFrameHost();
 
-  bool RequestRepaintForTesting();
+  // Force a new surface id to be allocated. Returns true if the
+  // RenderWidgetHostImpl sent the resulting surface id to the renderer.
+  bool ForceNewSurfaceId();
 
   // Return the parameters of the most recently received frame, or nullptr if
   // no valid frame is available.
@@ -82,12 +82,12 @@
   // NSView. This will allocate a new SurfaceId if needed. This will return
   // true if any properties that need to be communicated to the
   // RenderWidgetHostImpl have changed.
-  bool UpdateNSViewAndDisplay(const gfx::Size& new_size_dip,
-                              const display::Display& new_display);
+  bool UpdateSurfaceFromNSView(const gfx::Size& new_size_dip,
+                               const display::Display& new_display);
 
   // Update the renderer's SurfaceId to reflect |new_size_in_pixels| in
   // anticipation of the NSView resizing during auto-resize.
-  void SynchronizeVisualProperties(
+  void UpdateSurfaceFromChild(
       float new_device_scale_factor,
       const gfx::Size& new_size_in_pixels,
       const viz::LocalSurfaceIdAllocation& child_local_surface_id_allocation);
@@ -115,9 +115,6 @@
       base::OnceCallback<void()> allocation_task);
   const viz::LocalSurfaceId& GetRendererLocalSurfaceId();
   base::TimeTicks GetRendererLocalSurfaceIdAllocationTime() const;
-  const viz::LocalSurfaceId& AllocateNewRendererLocalSurfaceId();
-  bool UpdateRendererLocalSurfaceIdFromChild(
-      const viz::LocalSurfaceIdAllocation& child_local_surface_id_allocation);
   void TransformPointToRootSurface(gfx::PointF* point);
 
   // Indicate that the recyclable compositor should be destroyed, and no future
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.mm b/content/browser/renderer_host/browser_compositor_view_mac.mm
index 48989539..c1cf09c 100644
--- a/content/browser/renderer_host/browser_compositor_view_mac.mm
+++ b/content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -84,14 +84,12 @@
   return delegated_frame_host_.get();
 }
 
-bool BrowserCompositorMac::RequestRepaintForTesting() {
+bool BrowserCompositorMac::ForceNewSurfaceId() {
   dfh_local_surface_id_allocator_.GenerateId();
-  const viz::LocalSurfaceIdAllocation& new_local_surface_id_allocation =
-      dfh_local_surface_id_allocator_.GetCurrentLocalSurfaceIdAllocation();
   delegated_frame_host_->EmbedSurface(
-      new_local_surface_id_allocation.local_surface_id(), dfh_size_dip_,
+      dfh_local_surface_id_allocator_.GetCurrentLocalSurfaceId(), dfh_size_dip_,
       cc::DeadlinePolicy::UseExistingDeadline());
-  return client_->SynchronizeVisualProperties(new_local_surface_id_allocation);
+  return client_->OnBrowserCompositorSurfaceIdChanged();
 }
 
 const gfx::CALayerParams* BrowserCompositorMac::GetLastCALayerParams() const {
@@ -125,7 +123,7 @@
     recyclable_compositor_->compositor()->SetBackgroundColor(background_color_);
 }
 
-bool BrowserCompositorMac::UpdateNSViewAndDisplay(
+bool BrowserCompositorMac::UpdateSurfaceFromNSView(
     const gfx::Size& new_size_dip,
     const display::Display& new_display) {
   if (new_size_dip == dfh_size_dip_ && new_display == dfh_display_)
@@ -145,7 +143,7 @@
 
   if (needs_new_surface_id) {
     dfh_local_surface_id_allocator_.GenerateId();
-    GetDelegatedFrameHost()->EmbedSurface(
+    delegated_frame_host_->EmbedSurface(
         dfh_local_surface_id_allocator_.GetCurrentLocalSurfaceId(),
         dfh_size_dip_, GetDeadlinePolicy(is_resize));
   }
@@ -160,7 +158,7 @@
   return true;
 }
 
-void BrowserCompositorMac::SynchronizeVisualProperties(
+void BrowserCompositorMac::UpdateSurfaceFromChild(
     float new_device_scale_factor,
     const gfx::Size& new_size_in_pixels,
     const viz::LocalSurfaceIdAllocation& child_local_surface_id_allocation) {
@@ -175,11 +173,11 @@
       recyclable_compositor_->UpdateSurface(dfh_size_pixels_,
                                             dfh_display_.device_scale_factor());
     }
-    GetDelegatedFrameHost()->EmbedSurface(
+    delegated_frame_host_->EmbedSurface(
         dfh_local_surface_id_allocator_.GetCurrentLocalSurfaceId(),
         dfh_size_dip_, GetDeadlinePolicy(true /* is_resize */));
   }
-  client_->SynchronizeVisualProperties(child_local_surface_id_allocation);
+  client_->OnBrowserCompositorSurfaceIdChanged();
 }
 
 void BrowserCompositorMac::UpdateVSyncParameters(
@@ -363,12 +361,10 @@
   // use the ID that was already provided.
   if (!is_first_navigation_)
     dfh_local_surface_id_allocator_.GenerateId();
-  const viz::LocalSurfaceIdAllocation& local_surface_id_allocation =
-      dfh_local_surface_id_allocator_.GetCurrentLocalSurfaceIdAllocation();
   delegated_frame_host_->EmbedSurface(
-      local_surface_id_allocation.local_surface_id(), dfh_size_dip_,
+      dfh_local_surface_id_allocator_.GetCurrentLocalSurfaceId(), dfh_size_dip_,
       cc::DeadlinePolicy::UseExistingDeadline());
-  client_->SynchronizeVisualProperties(local_surface_id_allocation);
+  client_->OnBrowserCompositorSurfaceIdChanged();
   delegated_frame_host_->DidNavigate();
   is_first_navigation_ = false;
 }
@@ -389,7 +385,7 @@
 bool BrowserCompositorMac::ForceNewSurfaceForTesting() {
   display::Display new_display(dfh_display_);
   new_display.set_device_scale_factor(new_display.device_scale_factor() * 2.0f);
-  return UpdateNSViewAndDisplay(dfh_size_dip_, new_display);
+  return UpdateSurfaceFromNSView(dfh_size_dip_, new_display);
 }
 
 void BrowserCompositorMac::GetRendererScreenInfo(
@@ -416,18 +412,6 @@
   return dfh_local_surface_id_allocator_.allocation_time();
 }
 
-const viz::LocalSurfaceId&
-BrowserCompositorMac::AllocateNewRendererLocalSurfaceId() {
-  dfh_local_surface_id_allocator_.GenerateId();
-  return dfh_local_surface_id_allocator_.GetCurrentLocalSurfaceId();
-}
-
-bool BrowserCompositorMac::UpdateRendererLocalSurfaceIdFromChild(
-    const viz::LocalSurfaceIdAllocation& child_local_surface_id_allocation) {
-  return dfh_local_surface_id_allocator_.UpdateFromChild(
-      child_local_surface_id_allocation);
-}
-
 void BrowserCompositorMac::TransformPointToRootSurface(gfx::PointF* point) {
   gfx::Transform transform_to_root;
   if (parent_ui_layer_)
diff --git a/content/browser/renderer_host/compositor_impl_android.cc b/content/browser/renderer_host/compositor_impl_android.cc
index f8e8b66..03a28845 100644
--- a/content/browser/renderer_host/compositor_impl_android.cc
+++ b/content/browser/renderer_host/compositor_impl_android.cc
@@ -49,6 +49,7 @@
 #include "components/viz/common/gpu/vulkan_in_process_context_provider.h"
 #include "components/viz/common/quads/compositor_frame.h"
 #include "components/viz/common/surfaces/frame_sink_id_allocator.h"
+#include "components/viz/common/surfaces/local_surface_id_allocation.h"
 #include "components/viz/host/host_display_client.h"
 #include "components/viz/host/host_frame_sink_manager.h"
 #include "components/viz/service/display/display.h"
@@ -835,8 +836,7 @@
   }
   host_->SetRootLayer(root_window_->GetLayer());
   host_->SetViewportSizeAndScale(size_, root_window_->GetDipScale(),
-                                 GenerateLocalSurfaceId(),
-                                 GetLocalSurfaceIdAllocationTime());
+                                 GenerateLocalSurfaceId());
 }
 
 void CompositorImpl::SetRootLayer(scoped_refptr<cc::Layer> root_layer) {
@@ -917,8 +917,7 @@
   host_ = cc::LayerTreeHost::CreateSingleThreaded(this, std::move(params));
   DCHECK(!host_->IsVisible());
   host_->SetViewportSizeAndScale(size_, root_window_->GetDipScale(),
-                                 GenerateLocalSurfaceId(),
-                                 GetLocalSurfaceIdAllocationTime());
+                                 GenerateLocalSurfaceId());
 
   if (needs_animate_)
     host_->SetNeedsAnimate();
@@ -996,8 +995,7 @@
   if (host_) {
     // TODO(ccameron): Ensure a valid LocalSurfaceId here.
     host_->SetViewportSizeAndScale(size_, root_window_->GetDipScale(),
-                                   GenerateLocalSurfaceId(),
-                                   GetLocalSurfaceIdAllocationTime());
+                                   GenerateLocalSurfaceId());
   }
   if (display_)
     display_->Resize(size);
@@ -1315,8 +1313,7 @@
     // TODO(ccameron): This is transiently incorrect -- |size_| must be
     // recalculated here as well. Is the call in SetWindowBounds sufficient?
     host_->SetViewportSizeAndScale(size_, root_window_->GetDipScale(),
-                                   GenerateLocalSurfaceId(),
-                                   GetLocalSurfaceIdAllocationTime());
+                                   GenerateLocalSurfaceId());
   }
 }
 
@@ -1420,21 +1417,15 @@
   display_private_->SetVSyncPaused(vsync_paused_);
 }
 
-viz::LocalSurfaceId CompositorImpl::GenerateLocalSurfaceId() const {
+viz::LocalSurfaceIdAllocation CompositorImpl::GenerateLocalSurfaceId() const {
   if (enable_surface_synchronization_) {
     viz::ParentLocalSurfaceIdAllocator& allocator =
         CompositorDependencies::Get().surface_id_allocator;
     allocator.GenerateId();
-    return allocator.GetCurrentLocalSurfaceId();
+    return allocator.GetCurrentLocalSurfaceIdAllocation();
   }
 
-  return viz::LocalSurfaceId();
-}
-
-base::TimeTicks CompositorImpl::GetLocalSurfaceIdAllocationTime() const {
-  if (enable_surface_synchronization_)
-    return CompositorDependencies::Get().surface_id_allocator.allocation_time();
-  return base::TimeTicks();
+  return viz::LocalSurfaceIdAllocation();
 }
 
 void CompositorImpl::OnFatalOrSurfaceContextCreationFailure(
diff --git a/content/browser/renderer_host/compositor_impl_android.h b/content/browser/renderer_host/compositor_impl_android.h
index cf4cb45..5cabb3d 100644
--- a/content/browser/renderer_host/compositor_impl_android.h
+++ b/content/browser/renderer_host/compositor_impl_android.h
@@ -20,6 +20,7 @@
 #include "components/viz/common/frame_sinks/begin_frame_source.h"
 #include "components/viz/common/surfaces/frame_sink_id.h"
 #include "components/viz/common/surfaces/local_surface_id.h"
+#include "components/viz/common/surfaces/local_surface_id_allocation.h"
 #include "components/viz/host/host_frame_sink_client.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/android/compositor.h"
@@ -182,12 +183,7 @@
 
   // Returns a new surface ID when in surface-synchronization mode. Otherwise
   // returns an empty surface.
-  viz::LocalSurfaceId GenerateLocalSurfaceId() const;
-
-  // Returns the time at which the viz::LocalSurfaceId created by
-  // GenerateLocalSurfaceID() was allocated. When not in surface-synchronization
-  // mode this returns the null base::TimeTicks.
-  base::TimeTicks GetLocalSurfaceIdAllocationTime() const;
+  viz::LocalSurfaceIdAllocation GenerateLocalSurfaceId() const;
 
   // Tears down the display for both Viz and non-Viz, unregistering the root
   // frame sink ID in the process.
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 8a89046..6448e7c 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1374,7 +1374,7 @@
     DCHECK_CURRENTLY_ON(BrowserThread::IO);
     // We only fulfill connections from the renderer we host.
     if (child_identity_.name() != source_info.identity.name() ||
-        child_identity_.instance() != source_info.identity.instance()) {
+        child_identity_.instance_id() != source_info.identity.instance_id()) {
       return;
     }
 
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index b641797..b4edd96 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -2394,7 +2394,7 @@
 
 void RenderWidgetHostImpl::OnTextInputStateChanged(
     const TextInputState& params) {
-  if (delegate_->GetInputEventShim()) {
+  if (delegate_ && delegate_->GetInputEventShim()) {
     delegate_->GetInputEventShim()->DidTextInputStateChange(params);
     return;
   }
@@ -2443,7 +2443,7 @@
 
 void RenderWidgetHostImpl::OnLockMouse(bool user_gesture,
                                        bool privileged) {
-  if (delegate_->GetInputEventShim()) {
+  if (delegate_ && delegate_->GetInputEventShim()) {
     delegate_->GetInputEventShim()->DidLockMouse(user_gesture, privileged);
     return;
   }
@@ -2474,7 +2474,7 @@
 }
 
 void RenderWidgetHostImpl::OnUnlockMouse() {
-  if (delegate_->GetInputEventShim()) {
+  if (delegate_ && delegate_->GetInputEventShim()) {
     delegate_->GetInputEventShim()->DidUnlockMouse();
     return;
   }
@@ -2595,7 +2595,7 @@
 }
 
 void RenderWidgetHostImpl::OnHasTouchEventHandlers(bool has_handlers) {
-  if (delegate_->GetInputEventShim()) {
+  if (delegate_ && delegate_->GetInputEventShim()) {
     delegate_->GetInputEventShim()->DidSetHasTouchEventHandlers(has_handlers);
     return;
   }
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index 0bd1a32..e8835102 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -392,9 +392,7 @@
   void BrowserCompositorMacOnBeginFrame(base::TimeTicks frame_time) override;
   void OnFrameTokenChanged(uint32_t frame_token) override;
   void DestroyCompositorForShutdown() override;
-  bool SynchronizeVisualProperties(
-      const base::Optional<viz::LocalSurfaceIdAllocation>&
-          child_local_surface_id_allocation) override;
+  bool OnBrowserCompositorSurfaceIdChanged() override;
   std::vector<viz::SurfaceId> CollectSurfaceIdsForEviction() override;
 
   // AcceleratedWidgetMacNSView implementation.
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index e35da3e..658000d6 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -97,22 +97,7 @@
   Destroy();
 }
 
-bool RenderWidgetHostViewMac::SynchronizeVisualProperties(
-    const base::Optional<viz::LocalSurfaceIdAllocation>&
-        child_local_surface_id_allocation) {
-  if (child_local_surface_id_allocation) {
-    browser_compositor_->UpdateRendererLocalSurfaceIdFromChild(
-        *child_local_surface_id_allocation);
-  } else {
-    browser_compositor_->AllocateNewRendererLocalSurfaceId();
-  }
-
-  if (auto* host = browser_compositor_->GetDelegatedFrameHost()) {
-    host->EmbedSurface(browser_compositor_->GetRendererLocalSurfaceId(),
-                       browser_compositor_->GetRendererSize(),
-                       cc::DeadlinePolicy::UseDefaultDeadline());
-  }
-
+bool RenderWidgetHostViewMac::OnBrowserCompositorSurfaceIdChanged() {
   return host()->SynchronizeVisualProperties();
 }
 
@@ -405,7 +390,7 @@
   // to send to the renderer, so it is required that BrowserCompositorMac be
   // updated first. Only notify RenderWidgetHostImpl of the update if any
   // properties it will query have changed.
-  if (browser_compositor_->UpdateNSViewAndDisplay(
+  if (browser_compositor_->UpdateSurfaceFromNSView(
           view_bounds_in_window_dip_.size(), display_)) {
     host()->NotifyScreenInfoChanged();
   }
@@ -822,7 +807,7 @@
 
 void RenderWidgetHostViewMac::EnsureSurfaceSynchronizedForLayoutTest() {
   ++latest_capture_sequence_number_;
-  SynchronizeVisualProperties(base::nullopt);
+  browser_compositor_->ForceNewSurfaceId();
 }
 
 void RenderWidgetHostViewMac::SetNeedsBeginFrames(bool needs_begin_frames) {
@@ -836,7 +821,7 @@
 
 void RenderWidgetHostViewMac::OnDidUpdateVisualPropertiesComplete(
     const cc::RenderFrameMetadata& metadata) {
-  browser_compositor_->SynchronizeVisualProperties(
+  browser_compositor_->UpdateSurfaceFromChild(
       metadata.device_scale_factor, metadata.viewport_size_in_pixels,
       metadata.local_surface_id_allocation.value_or(
           viz::LocalSurfaceIdAllocation()));
@@ -1083,7 +1068,7 @@
 }
 
 bool RenderWidgetHostViewMac::RequestRepaintForTesting() {
-  return browser_compositor_->RequestRepaintForTesting();
+  return browser_compositor_->ForceNewSurfaceId();
 }
 
 void RenderWidgetHostViewMac::TransformPointToRootSurface(gfx::PointF* point) {
diff --git a/content/browser/service_worker/embedded_worker_test_helper.cc b/content/browser/service_worker/embedded_worker_test_helper.cc
index 92b6ffc..158f4f5 100644
--- a/content/browser/service_worker/embedded_worker_test_helper.cc
+++ b/content/browser/service_worker/embedded_worker_test_helper.cc
@@ -51,8 +51,7 @@
   response_callback->OnResponse(
       std::move(response), blink::mojom::ServiceWorkerFetchEventTiming::New());
   std::move(finish_callback)
-      .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-           base::TimeTicks::Now());
+      .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
 }
 
 }  // namespace
@@ -581,59 +580,52 @@
 void EmbeddedWorkerTestHelper::OnActivateEvent(
     mojom::ServiceWorker::DispatchActivateEventCallback callback) {
   dispatched_events()->push_back(Event::Activate);
-  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                          base::TimeTicks::Now());
+  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
 }
 
 void EmbeddedWorkerTestHelper::OnBackgroundFetchAbortEvent(
     const BackgroundFetchRegistration& registration,
     mojom::ServiceWorker::DispatchBackgroundFetchAbortEventCallback callback) {
-  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                          base::TimeTicks::Now());
+  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
 }
 
 void EmbeddedWorkerTestHelper::OnBackgroundFetchClickEvent(
     const BackgroundFetchRegistration& registration,
     mojom::ServiceWorker::DispatchBackgroundFetchClickEventCallback callback) {
-  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                          base::TimeTicks::Now());
+  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
 }
 
 void EmbeddedWorkerTestHelper::OnBackgroundFetchFailEvent(
     const BackgroundFetchRegistration& registration,
     mojom::ServiceWorker::DispatchBackgroundFetchFailEventCallback callback) {
-  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                          base::TimeTicks::Now());
+  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
 }
 
 void EmbeddedWorkerTestHelper::OnBackgroundFetchSuccessEvent(
     const BackgroundFetchRegistration& registration,
     mojom::ServiceWorker::DispatchBackgroundFetchSuccessEventCallback
         callback) {
-  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                          base::TimeTicks::Now());
+  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
 }
 
 void EmbeddedWorkerTestHelper::OnCookieChangeEvent(
     const net::CanonicalCookie& cookie,
     ::network::mojom::CookieChangeCause cause,
     mojom::ServiceWorker::DispatchCookieChangeEventCallback callback) {
-  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                          base::TimeTicks::Now());
+  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
 }
 
 void EmbeddedWorkerTestHelper::OnExtendableMessageEvent(
     mojom::ExtendableMessageEventPtr event,
     mojom::ServiceWorker::DispatchExtendableMessageEventCallback callback) {
-  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                          base::TimeTicks::Now());
+  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
 }
 
 void EmbeddedWorkerTestHelper::OnInstallEvent(
     mojom::ServiceWorker::DispatchInstallEventCallback callback) {
   dispatched_events()->push_back(Event::Install);
   std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                          true /* has_fetch_handler */, base::TimeTicks::Now());
+                          true /* has_fetch_handler */);
 }
 
 void EmbeddedWorkerTestHelper::OnFetchEvent(
@@ -649,8 +641,7 @@
 void EmbeddedWorkerTestHelper::OnPushEvent(
     base::Optional<std::string> payload,
     mojom::ServiceWorker::DispatchPushEventCallback callback) {
-  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                          base::TimeTicks::Now());
+  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
 }
 
 void EmbeddedWorkerTestHelper::OnNotificationClickEvent(
@@ -659,24 +650,21 @@
     int action_index,
     const base::Optional<base::string16>& reply,
     mojom::ServiceWorker::DispatchNotificationClickEventCallback callback) {
-  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                          base::TimeTicks::Now());
+  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
 }
 
 void EmbeddedWorkerTestHelper::OnNotificationCloseEvent(
     const std::string& notification_id,
     const blink::PlatformNotificationData& notification_data,
     mojom::ServiceWorker::DispatchNotificationCloseEventCallback callback) {
-  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                          base::TimeTicks::Now());
+  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
 }
 
 void EmbeddedWorkerTestHelper::OnAbortPaymentEvent(
     payments::mojom::PaymentHandlerResponseCallbackPtr response_callback,
     mojom::ServiceWorker::DispatchAbortPaymentEventCallback callback) {
-  response_callback->OnResponseForAbortPayment(true, base::TimeTicks::Now());
-  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                          base::TimeTicks::Now());
+  response_callback->OnResponseForAbortPayment(true);
+  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
 }
 
 void EmbeddedWorkerTestHelper::OnCanMakePaymentEvent(
@@ -690,10 +678,8 @@
       break;
     }
   }
-  response_callback->OnResponseForCanMakePayment(can_make_payment,
-                                                 base::TimeTicks::Now());
-  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                          base::TimeTicks::Now());
+  response_callback->OnResponseForCanMakePayment(can_make_payment);
+  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
 }
 
 void EmbeddedWorkerTestHelper::OnPaymentRequestEvent(
@@ -701,9 +687,8 @@
     payments::mojom::PaymentHandlerResponseCallbackPtr response_callback,
     mojom::ServiceWorker::DispatchPaymentRequestEventCallback callback) {
   response_callback->OnResponseForPaymentRequest(
-      payments::mojom::PaymentHandlerResponse::New(), base::TimeTicks::Now());
-  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                          base::TimeTicks::Now());
+      payments::mojom::PaymentHandlerResponse::New());
+  std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
 }
 
 void EmbeddedWorkerTestHelper::OnSetIdleTimerDelayToZero(
diff --git a/content/browser/service_worker/service_worker_browsertest.cc b/content/browser/service_worker/service_worker_browsertest.cc
index e2622330..80454f2 100644
--- a/content/browser/service_worker/service_worker_browsertest.cc
+++ b/content/browser/service_worker/service_worker_browsertest.cc
@@ -840,8 +840,7 @@
       base::Optional<blink::ServiceWorkerStatusCode>* out_result,
       int request_id,
       blink::mojom::ServiceWorkerEventStatus status,
-      bool has_fetch_handler,
-      base::TimeTicks /* dispatch_event_time */) {
+      bool has_fetch_handler) {
     version_->FinishRequest(
         request_id,
         status == blink::mojom::ServiceWorkerEventStatus::COMPLETED);
diff --git a/content/browser/service_worker/service_worker_context_unittest.cc b/content/browser/service_worker/service_worker_context_unittest.cc
index 25d9dfe5..c4ebf7c 100644
--- a/content/browser/service_worker/service_worker_context_unittest.cc
+++ b/content/browser/service_worker/service_worker_context_unittest.cc
@@ -93,8 +93,7 @@
       mojom::ServiceWorker::DispatchInstallEventCallback callback) override {
     dispatched_events()->push_back(Event::Install);
     std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::REJECTED,
-                            true /* has_fetch_handler */,
-                            base::TimeTicks::Now());
+                            true /* has_fetch_handler */);
   }
 };
 
@@ -105,8 +104,7 @@
   void OnActivateEvent(
       mojom::ServiceWorker::DispatchActivateEventCallback callback) override {
     dispatched_events()->push_back(Event::Activate);
-    std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::REJECTED,
-                            base::TimeTicks::Now());
+    std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::REJECTED);
   }
 };
 
diff --git a/content/browser/service_worker/service_worker_fetch_dispatcher.cc b/content/browser/service_worker/service_worker_fetch_dispatcher.cc
index 01b2a0a..efbd029b 100644
--- a/content/browser/service_worker/service_worker_fetch_dispatcher.cc
+++ b/content/browser/service_worker/service_worker_fetch_dispatcher.cc
@@ -758,8 +758,7 @@
     ServiceWorkerVersion* version,
     int event_finish_id,
     scoped_refptr<URLLoaderAssets> url_loader_assets,
-    blink::mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks /* dispatch_event_time */) {
+    blink::mojom::ServiceWorkerEventStatus status) {
   version->FinishRequest(
       event_finish_id,
       status != blink::mojom::ServiceWorkerEventStatus::ABORTED);
diff --git a/content/browser/service_worker/service_worker_fetch_dispatcher.h b/content/browser/service_worker/service_worker_fetch_dispatcher.h
index 319cf6e..384033a 100644
--- a/content/browser/service_worker/service_worker_fetch_dispatcher.h
+++ b/content/browser/service_worker/service_worker_fetch_dispatcher.h
@@ -115,8 +115,7 @@
       ServiceWorkerVersion* version,
       int event_finish_id,
       scoped_refptr<URLLoaderAssets> url_loader_assets,
-      blink::mojom::ServiceWorkerEventStatus status,
-      base::TimeTicks dispatch_event_time);
+      blink::mojom::ServiceWorkerEventStatus status);
 
   ServiceWorkerMetrics::EventType GetEventType() const;
 
diff --git a/content/browser/service_worker/service_worker_job_unittest.cc b/content/browser/service_worker/service_worker_job_unittest.cc
index 1cc8f7e6..2657630 100644
--- a/content/browser/service_worker/service_worker_job_unittest.cc
+++ b/content/browser/service_worker/service_worker_job_unittest.cc
@@ -1689,13 +1689,12 @@
       mojom::ServiceWorker::DispatchInstallEventCallback callback) override {
     if (!install_callback_.is_null())
       std::move(install_callback_).Run();
-    std::move(callback).Run(install_event_result_, has_fetch_handler_,
-                            base::TimeTicks::Now());
+    std::move(callback).Run(install_event_result_, has_fetch_handler_);
   }
 
   void OnActivateEvent(
       mojom::ServiceWorker::DispatchActivateEventCallback callback) override {
-    std::move(callback).Run(activate_event_result_, base::TimeTicks::Now());
+    std::move(callback).Run(activate_event_result_);
   }
 
   void set_install_callback(base::OnceClosure callback) {
diff --git a/content/browser/service_worker/service_worker_navigation_loader_unittest.cc b/content/browser/service_worker/service_worker_navigation_loader_unittest.cc
index 77a2a8ff..6ec4aee7 100644
--- a/content/browser/service_worker/service_worker_navigation_loader_unittest.cc
+++ b/content/browser/service_worker/service_worker_navigation_loader_unittest.cc
@@ -147,8 +147,7 @@
         std::move(response), std::move(stream_handle),
         blink::mojom::ServiceWorkerFetchEventTiming::New());
     std::move(finish_callback_)
-        .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-             base::TimeTicks::Now());
+        .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
     stream_callback->OnCompleted();
     delete this;
   }
@@ -238,8 +237,7 @@
   void RespondEarly() { response_mode_ = ResponseMode::kEarlyResponse; }
   void FinishWaitUntil() {
     std::move(finish_callback_)
-        .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-             base::TimeTicks::Now());
+        .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
     base::RunLoop().RunUntilIdle();
   }
 
@@ -252,8 +250,7 @@
         blink::mojom::ServiceWorkerFetchEventTiming::New());
     response_callback_.FlushForTesting();
     std::move(finish_callback_)
-        .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-             base::TimeTicks::Now());
+        .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
   }
 
   void ReadRequestBody(std::string* out_string) {
@@ -301,31 +298,27 @@
             OkResponse(std::move(blob_body_)),
             blink::mojom::ServiceWorkerFetchEventTiming::New());
         std::move(finish_callback)
-            .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                 base::TimeTicks::Now());
+            .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
         break;
       case ResponseMode::kStream:
         response_callback->OnResponseStream(
             OkResponse(nullptr /* blob_body */), std::move(stream_handle_),
             blink::mojom::ServiceWorkerFetchEventTiming::New());
         std::move(finish_callback)
-            .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                 base::TimeTicks::Now());
+            .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
         break;
       case ResponseMode::kFallbackResponse:
         response_callback->OnFallback(
             blink::mojom::ServiceWorkerFetchEventTiming::New());
         std::move(finish_callback)
-            .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                 base::TimeTicks::Now());
+            .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
         break;
       case ResponseMode::kErrorResponse:
         response_callback->OnResponse(
             ErrorResponse(),
             blink::mojom::ServiceWorkerFetchEventTiming::New());
         std::move(finish_callback)
-            .Run(blink::mojom::ServiceWorkerEventStatus::REJECTED,
-                 base::TimeTicks::Now());
+            .Run(blink::mojom::ServiceWorkerEventStatus::REJECTED);
         break;
       case ResponseMode::kNavigationPreloadResponse:
         // Deletes itself when done.
@@ -346,8 +339,7 @@
         // ServiceWorkerContextClient would call this when it aborts all
         // callbacks after an unexpected stop.
         std::move(finish_callback)
-            .Run(blink::mojom::ServiceWorkerEventStatus::ABORTED,
-                 base::TimeTicks::Now());
+            .Run(blink::mojom::ServiceWorkerEventStatus::ABORTED);
         break;
       case ResponseMode::kDeferredResponse:
         finish_callback_ = std::move(finish_callback);
@@ -366,8 +358,7 @@
             RedirectResponse(redirected_url_.spec()),
             blink::mojom::ServiceWorkerFetchEventTiming::New());
         std::move(finish_callback)
-            .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                 base::TimeTicks::Now());
+            .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
         break;
     }
 
diff --git a/content/browser/service_worker/service_worker_object_host_unittest.cc b/content/browser/service_worker/service_worker_object_host_unittest.cc
index 35e1376..e2e2373 100644
--- a/content/browser/service_worker/service_worker_object_host_unittest.cc
+++ b/content/browser/service_worker/service_worker_object_host_unittest.cc
@@ -55,8 +55,7 @@
       mojom::ServiceWorker::DispatchExtendableMessageEventCallback callback)
       override {
     events_.push_back(std::move(event));
-    std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                            base::TimeTicks::Now());
+    std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
   }
 
   const std::vector<mojom::ExtendableMessageEventPtr>& events() {
diff --git a/content/browser/service_worker/service_worker_register_job.cc b/content/browser/service_worker/service_worker_register_job.cc
index 5557758..c6996f7 100644
--- a/content/browser/service_worker/service_worker_register_job.cc
+++ b/content/browser/service_worker/service_worker_register_job.cc
@@ -516,8 +516,7 @@
 void ServiceWorkerRegisterJob::OnInstallFinished(
     int request_id,
     blink::mojom::ServiceWorkerEventStatus event_status,
-    bool has_fetch_handler,
-    base::TimeTicks /* dispatch_event_time */) {
+    bool has_fetch_handler) {
   bool succeeded =
       event_status == blink::mojom::ServiceWorkerEventStatus::COMPLETED;
   new_version()->FinishRequest(request_id, succeeded);
diff --git a/content/browser/service_worker/service_worker_register_job.h b/content/browser/service_worker/service_worker_register_job.h
index 2f991a7..13a09a14e 100644
--- a/content/browser/service_worker/service_worker_register_job.h
+++ b/content/browser/service_worker/service_worker_register_job.h
@@ -125,8 +125,7 @@
   void DispatchInstallEvent(blink::ServiceWorkerStatusCode start_worker_status);
   void OnInstallFinished(int request_id,
                          blink::mojom::ServiceWorkerEventStatus event_status,
-                         bool has_fetch_handler,
-                         base::TimeTicks dispatch_event_time);
+                         bool has_fetch_handler);
   void OnInstallFailed(blink::ServiceWorkerStatusCode status);
   void Complete(blink::ServiceWorkerStatusCode status);
   void Complete(blink::ServiceWorkerStatusCode status,
diff --git a/content/browser/service_worker/service_worker_url_request_job_unittest.cc b/content/browser/service_worker/service_worker_url_request_job_unittest.cc
index 06a4ccc..f297013 100644
--- a/content/browser/service_worker/service_worker_url_request_job_unittest.cc
+++ b/content/browser/service_worker/service_worker_url_request_job_unittest.cc
@@ -493,8 +493,7 @@
     response_callback_->OnResponse(
         MakeOkResponse(), blink::mojom::ServiceWorkerFetchEventTiming::New());
     std::move(finish_callback_)
-        .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-             base::TimeTicks::Now());
+        .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
   }
 
  protected:
@@ -711,8 +710,7 @@
     response_callback->OnResponse(
         MakeOkResponse(), blink::mojom::ServiceWorkerFetchEventTiming::New());
     std::move(finish_callback)
-        .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-             base::TimeTicks::Now());
+        .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
   }
 
  private:
@@ -800,8 +798,7 @@
         std::move(response),
         blink::mojom::ServiceWorkerFetchEventTiming::New());
     std::move(finish_callback)
-        .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-             base::TimeTicks::Now());
+        .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
   }
 
   std::string blob_uuid_;
@@ -896,8 +893,7 @@
         std::move(response), std::move(stream_handle_),
         blink::mojom::ServiceWorkerFetchEventTiming::New());
     std::move(finish_callback)
-        .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-             base::TimeTicks::Now());
+        .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
   }
 
   blink::mojom::ServiceWorkerStreamHandlePtr stream_handle_;
@@ -1276,8 +1272,7 @@
       override {
     SimulateWorkerStopped(embedded_worker_id);
     std::move(finish_callback)
-        .Run(blink::mojom::ServiceWorkerEventStatus::ABORTED,
-             base::TimeTicks::Now());
+        .Run(blink::mojom::ServiceWorkerEventStatus::ABORTED);
   }
 
  private:
@@ -1355,8 +1350,7 @@
 
   void FinishWaitUntil() {
     std::move(finish_callback_)
-        .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-             base::TimeTicks::Now());
+        .Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
   }
 
  protected:
diff --git a/content/browser/service_worker/service_worker_version.cc b/content/browser/service_worker/service_worker_version.cc
index 0dea269..b109442e 100644
--- a/content/browser/service_worker/service_worker_version.cc
+++ b/content/browser/service_worker/service_worker_version.cc
@@ -1382,8 +1382,7 @@
 
 void ServiceWorkerVersion::OnSimpleEventFinished(
     int request_id,
-    blink::mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks /* dispatch_event_time */) {
+    blink::mojom::ServiceWorkerEventStatus status) {
   InflightRequest* request = inflight_requests_.Lookup(request_id);
   // |request| will be null when the request has been timed out.
   if (!request)
diff --git a/content/browser/service_worker/service_worker_version.h b/content/browser/service_worker/service_worker_version.h
index c590810..f4970993 100644
--- a/content/browser/service_worker/service_worker_version.h
+++ b/content/browser/service_worker/service_worker_version.h
@@ -120,8 +120,7 @@
   using StatusCallback =
       base::OnceCallback<void(blink::ServiceWorkerStatusCode)>;
   using SimpleEventCallback =
-      base::OnceCallback<void(blink::mojom::ServiceWorkerEventStatus,
-                              base::TimeTicks)>;
+      base::OnceCallback<void(blink::mojom::ServiceWorkerEventStatus)>;
 
   // Current version status; some of the status (e.g. INSTALLED and ACTIVATED)
   // should be persisted unlike running status.
@@ -731,8 +730,7 @@
   // mojom::ServiceWorker. Use CreateSimpleEventCallback() to
   // create a callback for a given |request_id|.
   void OnSimpleEventFinished(int request_id,
-                             blink::mojom::ServiceWorkerEventStatus status,
-                             base::TimeTicks dispatch_event_time);
+                             blink::mojom::ServiceWorkerEventStatus status);
 
   // The timeout timer periodically calls OnTimeoutTimer, which stops the worker
   // if it is excessively idle or unresponsive to ping.
diff --git a/content/browser/service_worker/service_worker_version_unittest.cc b/content/browser/service_worker/service_worker_version_unittest.cc
index 3c3fa77..ef8465c6 100644
--- a/content/browser/service_worker/service_worker_version_unittest.cc
+++ b/content/browser/service_worker/service_worker_version_unittest.cc
@@ -1012,7 +1012,7 @@
   // Simulate the renderer aborting the inflight event.
   // This should not crash: https://crbug.com/676984.
   TakeExtendableMessageEventCallback().Run(
-      blink::mojom::ServiceWorkerEventStatus::ABORTED, base::TimeTicks::Now());
+      blink::mojom::ServiceWorkerEventStatus::ABORTED);
   base::RunLoop().RunUntilIdle();
 
   // Simulate the renderer stopping the worker.
diff --git a/content/common/service_worker/controller_service_worker.mojom b/content/common/service_worker/controller_service_worker.mojom
index e187ea1b..77713f1 100644
--- a/content/common/service_worker/controller_service_worker.mojom
+++ b/content/common/service_worker/controller_service_worker.mojom
@@ -40,8 +40,7 @@
   DispatchFetchEvent(
       blink.mojom.DispatchFetchEventParams params,
       blink.mojom.ServiceWorkerFetchResponseCallback response_callback)
-      => (blink.mojom.ServiceWorkerEventStatus status,
-          mojo_base.mojom.TimeTicks dispatch_event_time);
+      => (blink.mojom.ServiceWorkerEventStatus status);
 
   // TODO(kinuko): Add DispatchExtendableMessageEvent() as well.
 
diff --git a/content/common/service_worker/service_worker.mojom b/content/common/service_worker/service_worker.mojom
index f081c2b8..50b15d8 100644
--- a/content/common/service_worker/service_worker.mojom
+++ b/content/common/service_worker/service_worker.mojom
@@ -75,11 +75,9 @@
 
   DispatchInstallEvent()
       => (blink.mojom.ServiceWorkerEventStatus status,
-          bool has_fetch_handler,
-          mojo_base.mojom.TimeTicks dispatch_event_time);
+          bool has_fetch_handler);
   DispatchActivateEvent()
-      => (blink.mojom.ServiceWorkerEventStatus status,
-          mojo_base.mojom.TimeTicks dispatch_event_time);
+      => (blink.mojom.ServiceWorkerEventStatus status);
 
   // These methods dispatch to the ServiceWorkerGlobalScope the events listed on
   // https://wicg.github.io/background-fetch/#service-worker-global-events.
@@ -88,20 +86,16 @@
   // content::BackgroundFetchRegistrationId.
   DispatchBackgroundFetchAbortEvent(
       blink.mojom.BackgroundFetchRegistration registration)
-      => (blink.mojom.ServiceWorkerEventStatus status,
-          mojo_base.mojom.TimeTicks dispatch_event_time);
+      => (blink.mojom.ServiceWorkerEventStatus status);
   DispatchBackgroundFetchClickEvent(
       blink.mojom.BackgroundFetchRegistration registration)
-      => (blink.mojom.ServiceWorkerEventStatus status,
-          mojo_base.mojom.TimeTicks dispatch_event_time);
+      => (blink.mojom.ServiceWorkerEventStatus status);
  DispatchBackgroundFetchFailEvent(
       blink.mojom.BackgroundFetchRegistration registration)
-      => (blink.mojom.ServiceWorkerEventStatus status,
-          mojo_base.mojom.TimeTicks dispatch_event_time);
+      => (blink.mojom.ServiceWorkerEventStatus status);
   DispatchBackgroundFetchSuccessEvent(
       blink.mojom.BackgroundFetchRegistration registration)
-      => (blink.mojom.ServiceWorkerEventStatus status,
-          mojo_base.mojom.TimeTicks dispatch_event_time);
+      => (blink.mojom.ServiceWorkerEventStatus status);
 
   // Dispatches the cookie change events in the Async Cookie API specification.
   // https://github.com/WICG/cookie-store/
@@ -110,8 +104,7 @@
   DispatchCookieChangeEvent(
       network.mojom.CanonicalCookie cookie,
       network.mojom.CookieChangeCause cause)
-      => (blink.mojom.ServiceWorkerEventStatus status,
-          mojo_base.mojom.TimeTicks dispatch_event_time);
+      => (blink.mojom.ServiceWorkerEventStatus status);
 
   // The Dispatch*FetchEvent() callback is called once the event finishes,
   // which means the event handler ran and all outstanding respondWith() and
@@ -121,26 +114,22 @@
   DispatchFetchEvent(
       blink.mojom.DispatchFetchEventParams params,
       blink.mojom.ServiceWorkerFetchResponseCallback response_callback)
-      => (blink.mojom.ServiceWorkerEventStatus status,
-          mojo_base.mojom.TimeTicks dispatch_event_time);
+      => (blink.mojom.ServiceWorkerEventStatus status);
 
   DispatchNotificationClickEvent(
       string notification_id,
       blink.mojom.NotificationData notification_data,
       int32 action_index,
       mojo_base.mojom.String16? reply)
-      => (blink.mojom.ServiceWorkerEventStatus status,
-          mojo_base.mojom.TimeTicks dispatch_event_time);
+      => (blink.mojom.ServiceWorkerEventStatus status);
   DispatchNotificationCloseEvent(
       string notification_id,
       blink.mojom.NotificationData notification_data)
-      => (blink.mojom.ServiceWorkerEventStatus status,
-          mojo_base.mojom.TimeTicks dispatch_event_time);
+      => (blink.mojom.ServiceWorkerEventStatus status);
   // The payload of a push message can be valid with content, valid with empty
   // content, or null.
   DispatchPushEvent(string? payload)
-      => (blink.mojom.ServiceWorkerEventStatus status,
-          mojo_base.mojom.TimeTicks dispatch_event_time);
+      => (blink.mojom.ServiceWorkerEventStatus status);
   // Arguments are passed to the event handler as parameters of SyncEvent.
   // Ref: https://wicg.github.io/BackgroundSync/spec/#sync-event
   // S13nServiceWorker: |timeout| is the amount of time to allow this event to
@@ -149,32 +138,26 @@
   DispatchSyncEvent(string id,
                     bool last_chance,
                     mojo_base.mojom.TimeDelta timeout)
-      => (blink.mojom.ServiceWorkerEventStatus status,
-          mojo_base.mojom.TimeTicks dispatch_event_time);
+      => (blink.mojom.ServiceWorkerEventStatus status);
   DispatchAbortPaymentEvent(
       payments.mojom.PaymentHandlerResponseCallback result_of_abort_payment)
-          => (blink.mojom.ServiceWorkerEventStatus status,
-              mojo_base.mojom.TimeTicks dispatch_event_time);
+          => (blink.mojom.ServiceWorkerEventStatus status);
   DispatchCanMakePaymentEvent(
       payments.mojom.CanMakePaymentEventData event_data,
       payments.mojom.PaymentHandlerResponseCallback result_of_can_make_payment)
-          => (blink.mojom.ServiceWorkerEventStatus status,
-              mojo_base.mojom.TimeTicks dispatch_event_time);
+          => (blink.mojom.ServiceWorkerEventStatus status);
   DispatchPaymentRequestEvent(
       payments.mojom.PaymentRequestEventData request_data,
       payments.mojom.PaymentHandlerResponseCallback response_callback)
-          => (blink.mojom.ServiceWorkerEventStatus status,
-              mojo_base.mojom.TimeTicks dispatch_event_time);
+          => (blink.mojom.ServiceWorkerEventStatus status);
   DispatchExtendableMessageEvent(ExtendableMessageEvent event)
-      => (blink.mojom.ServiceWorkerEventStatus status,
-          mojo_base.mojom.TimeTicks dispatch_event_time);
+      => (blink.mojom.ServiceWorkerEventStatus status);
 
   // TODO(crbug.com/869714): Remove this code for long living service workers
   // when Android Messages no longer requires it.
   DispatchExtendableMessageEventWithCustomTimeout(ExtendableMessageEvent event,
                                  mojo_base.mojom.TimeDelta timeout)
-      => (blink.mojom.ServiceWorkerEventStatus status,
-          mojo_base.mojom.TimeTicks dispatch_event_time);
+      => (blink.mojom.ServiceWorkerEventStatus status);
 
   // Pings the service worker to check if it is responsive. If the callback is
   // not called within a certain period of time, the browser will terminate the
diff --git a/content/public/android/BUILD.gn b/content/public/android/BUILD.gn
index ab36d92e..f4b8f5aa 100644
--- a/content/public/android/BUILD.gn
+++ b/content/public/android/BUILD.gn
@@ -450,6 +450,7 @@
     "//third_party/android_support_test_runner:runner_java",
     "//third_party/blink/public:android_mojo_bindings_java",
     "//third_party/blink/public:blink_headers_java",
+    "//third_party/hamcrest:hamcrest_java",
     "//third_party/jsr-305:jsr_305_javalib",
     "//third_party/junit",
     "//ui/android:ui_java",
diff --git a/content/public/browser/network_service_instance.h b/content/public/browser/network_service_instance.h
index 71d916a..425931c 100644
--- a/content/public/browser/network_service_instance.h
+++ b/content/public/browser/network_service_instance.h
@@ -10,9 +10,9 @@
 #include "base/callback.h"
 #include "base/callback_list.h"
 #include "content/common/content_export.h"
+#include "services/network/public/cpp/network_connection_tracker.h"
 
 namespace network {
-class NetworkConnectionTracker;
 class NetworkService;
 namespace mojom {
 class NetworkService;
@@ -72,6 +72,10 @@
 CONTENT_EXPORT void GetNetworkConnectionTrackerFromUIThread(
     base::OnceCallback<void(network::NetworkConnectionTracker*)> callback);
 
+// Helper method to create a NetworkConnectionTrackerAsyncGetter.
+CONTENT_EXPORT network::NetworkConnectionTrackerAsyncGetter
+CreateNetworkConnectionTrackerAsyncGetter();
+
 // Sets the NetworkConnectionTracker instance to use. For testing only.
 // Must be called on the UI thread. Must be called before the first call to
 // GetNetworkConnectionTracker.
diff --git a/content/public/test/test_launcher.cc b/content/public/test/test_launcher.cc
index d7d72a1..408ccb2c 100644
--- a/content/public/test/test_launcher.cc
+++ b/content/public/test/test_launcher.cc
@@ -662,7 +662,7 @@
   base::MessageLoopForIO message_loop;
 #if defined(OS_POSIX)
   base::FileDescriptorWatcher file_descriptor_watcher(
-      message_loop->task_runner());
+      message_loop.task_runner());
 #endif
 
   launcher_delegate->PreSharding();
diff --git a/content/renderer/gpu/layer_tree_view.cc b/content/renderer/gpu/layer_tree_view.cc
index ca1cc94..8064128 100644
--- a/content/renderer/gpu/layer_tree_view.cc
+++ b/content/renderer/gpu/layer_tree_view.cc
@@ -270,11 +270,9 @@
 void LayerTreeView::SetViewportSizeAndScale(
     const gfx::Size& device_viewport_size,
     float device_scale_factor,
-    const viz::LocalSurfaceId& local_surface_id,
-    base::TimeTicks allocation_time) {
-  layer_tree_host_->SetViewportSizeAndScale(device_viewport_size,
-                                            device_scale_factor,
-                                            local_surface_id, allocation_time);
+    const viz::LocalSurfaceIdAllocation& local_surface_id_allocation) {
+  layer_tree_host_->SetViewportSizeAndScale(
+      device_viewport_size, device_scale_factor, local_surface_id_allocation);
 }
 
 void LayerTreeView::RequestNewLocalSurfaceId() {
diff --git a/content/renderer/gpu/layer_tree_view.h b/content/renderer/gpu/layer_tree_view.h
index 97f925a..3991d8a 100644
--- a/content/renderer/gpu/layer_tree_view.h
+++ b/content/renderer/gpu/layer_tree_view.h
@@ -110,10 +110,10 @@
   void SetExternalPageScaleFactor(float page_scale_factor);
   void ClearCachesOnNextCommit();
   void SetContentSourceId(uint32_t source_id);
-  void SetViewportSizeAndScale(const gfx::Size& device_viewport_size,
-                               float device_scale_factor,
-                               const viz::LocalSurfaceId& local_surface_id,
-                               base::TimeTicks allocation_time);
+  void SetViewportSizeAndScale(
+      const gfx::Size& device_viewport_size,
+      float device_scale_factor,
+      const viz::LocalSurfaceIdAllocation& local_surface_id_allocation);
   void RequestNewLocalSurfaceId();
   void SetViewportVisibleRect(const gfx::Rect& visible_rect);
   void SetURLForUkm(const GURL& url);
diff --git a/content/renderer/indexed_db/indexed_db_callbacks_impl.cc b/content/renderer/indexed_db/indexed_db_callbacks_impl.cc
index 792237fa..9bc5671 100644
--- a/content/renderer/indexed_db/indexed_db_callbacks_impl.cc
+++ b/content/renderer/indexed_db/indexed_db_callbacks_impl.cc
@@ -109,8 +109,12 @@
     }
   }
 
-  return WebIDBValue(WebData(&*value->bits.begin(), value->bits.size()),
-                     std::move(local_blob_info));
+  // TODO(crbug.com/902498): Use mojom traits to map directly to WebData.
+  WebData web_data(reinterpret_cast<const char*>(value->bits.data()),
+                   value->bits.size());
+  // Release value->bits std::vector.
+  value->bits.clear();
+  return WebIDBValue(std::move(web_data), std::move(local_blob_info));
 }
 
 IndexedDBCallbacksImpl::IndexedDBCallbacksImpl(
diff --git a/content/renderer/indexed_db/webidbdatabase_impl.cc b/content/renderer/indexed_db/webidbdatabase_impl.cc
index ae54492..ab5ae111 100644
--- a/content/renderer/indexed_db/webidbdatabase_impl.cc
+++ b/content/renderer/indexed_db/webidbdatabase_impl.cc
@@ -188,13 +188,17 @@
       transaction_id, nullptr);
 
   auto mojo_value = blink::mojom::IDBValue::New();
-  DCHECK(mojo_value->bits.empty());
-  mojo_value->bits.reserve(value.size());
+
+  // mojo_value->bits initialization.
   value.ForEachSegment([&mojo_value](const char* segment, size_t segment_size,
                                      size_t segment_offset) {
-    mojo_value->bits.append(segment, segment_size);
+    const auto& segment_span = base::make_span(segment, segment + segment_size);
+    mojo_value->bits.insert(mojo_value->bits.end(), segment_span.begin(),
+                            segment_span.end());
     return true;
   });
+
+  // mojo_value->blob_or_file_info initialization.
   mojo_value->blob_or_file_info.reserve(web_blob_info.size());
   for (const WebBlobInfo& info : web_blob_info) {
     auto blob_info = blink::mojom::IDBBlobInfo::New();
diff --git a/content/renderer/media/media_factory.cc b/content/renderer/media/media_factory.cc
index bd2b2cb9..2638a91 100644
--- a/content/renderer/media/media_factory.cc
+++ b/content/renderer/media/media_factory.cc
@@ -230,6 +230,10 @@
             ? render_thread->compositor_task_runner()
             : render_frame_->GetTaskRunner(
                   blink::TaskType::kInternalMediaRealTime);
+
+    // TODO(https://crbug/901513): Remove once kOnDemand is removed.
+    render_thread->SetVideoFrameCompositorTaskRunner(
+        *video_frame_compositor_task_runner);
   }
 
   std::unique_ptr<blink::WebVideoFrameSubmitter> submitter;
diff --git a/content/renderer/mus/renderer_window_tree_client.cc b/content/renderer/mus/renderer_window_tree_client.cc
index 32a371b..42515d8 100644
--- a/content/renderer/mus/renderer_window_tree_client.cc
+++ b/content/renderer/mus/renderer_window_tree_client.cc
@@ -188,6 +188,8 @@
   pending_frames_.erase(frame_routing_id);
 }
 
+void RendererWindowTreeClient::OnClientId(uint32_t client_id) {}
+
 void RendererWindowTreeClient::OnEmbed(
     ws::mojom::WindowDataPtr root,
     ws::mojom::WindowTreePtr tree,
diff --git a/content/renderer/mus/renderer_window_tree_client.h b/content/renderer/mus/renderer_window_tree_client.h
index c42037d..d6758e1a 100644
--- a/content/renderer/mus/renderer_window_tree_client.h
+++ b/content/renderer/mus/renderer_window_tree_client.h
@@ -110,6 +110,7 @@
   // these will remain unimplemented in the long-term. Some of the
   // implementations would require some amount of refactoring out of
   // RenderWidget and related classes (e.g. resize, input, ime etc.).
+  void OnClientId(uint32_t client_id) override;
   void OnEmbed(
       ws::mojom::WindowDataPtr root,
       ws::mojom::WindowTreePtr tree,
diff --git a/content/renderer/pepper/pepper_video_decoder_host.cc b/content/renderer/pepper/pepper_video_decoder_host.cc
index ea5c91f2..fa05ef9 100644
--- a/content/renderer/pepper/pepper_video_decoder_host.cc
+++ b/content/renderer/pepper/pepper_video_decoder_host.cc
@@ -19,6 +19,7 @@
 #include "content/renderer/pepper/video_decoder_shim.h"
 #include "gpu/ipc/client/command_buffer_proxy_impl.h"
 #include "media/base/limits.h"
+#include "media/base/media_util.h"
 #include "media/gpu/ipc/client/gpu_video_decode_accelerator_host.h"
 #include "media/video/video_decode_accelerator.h"
 #include "ppapi/c/pp_completion_callback.h"
@@ -379,6 +380,7 @@
     const gfx::Size& dimensions,
     uint32_t texture_target) {
   DCHECK_EQ(1u, textures_per_buffer);
+  coded_size_ = dimensions;
   pending_texture_requests_++;
   host()->SendUnsolicitedReply(
       pp_resource(), PpapiPluginMsg_VideoDecoder_RequestTextures(
@@ -394,9 +396,14 @@
   // Pepper client might not able to handle it. Therefore we just catch it here.
   // https://crbug.com/755887
   CHECK(it->second == PictureBufferState::ASSIGNED);
-
   it->second = PictureBufferState::IN_USE;
 
+  if (software_fallback_used_) {
+    media::ReportPepperVideoDecoderOutputPictureCountSW(coded_size_.height());
+  } else {
+    media::ReportPepperVideoDecoderOutputPictureCountHW(coded_size_.height());
+  }
+
   // Don't bother validating the visible rect, since the plugin process is less
   // trusted than the gpu process.
   PP_Rect visible_rect = PP_FromGfxRect(picture.visible_rect());
diff --git a/content/renderer/pepper/pepper_video_decoder_host.h b/content/renderer/pepper/pepper_video_decoder_host.h
index 2983f48..839bb40 100644
--- a/content/renderer/pepper/pepper_video_decoder_host.h
+++ b/content/renderer/pepper/pepper_video_decoder_host.h
@@ -125,6 +125,9 @@
   bool software_fallback_allowed_ = false;
   bool software_fallback_used_ = false;
 
+  // Used for UMA stats; not frame-accurate.
+  gfx::Size coded_size_;
+
   int pending_texture_requests_ = 0;
 
   // Set after software decoder fallback to dismiss all outstanding texture
diff --git a/content/renderer/pepper/ppb_video_decoder_impl.cc b/content/renderer/pepper/ppb_video_decoder_impl.cc
index e1d813c..fd2f082 100644
--- a/content/renderer/pepper/ppb_video_decoder_impl.cc
+++ b/content/renderer/pepper/ppb_video_decoder_impl.cc
@@ -15,6 +15,7 @@
 #include "content/renderer/pepper/ppb_graphics_3d_impl.h"
 #include "content/renderer/render_thread_impl.h"
 #include "gpu/ipc/client/command_buffer_proxy_impl.h"
+#include "media/base/media_util.h"
 #include "media/gpu/ipc/client/gpu_video_decode_accelerator_host.h"
 #include "media/video/picture.h"
 #include "media/video/video_decode_accelerator.h"
@@ -249,6 +250,7 @@
   if (!GetPPP())
     return;
 
+  coded_size_ = dimensions;
   PP_Size out_dim = PP_MakeSize(dimensions.width(), dimensions.height());
   GetPPP()->ProvidePictureBuffers(pp_instance(), pp_resource(),
                                   requested_num_of_buffers, &out_dim,
@@ -262,6 +264,8 @@
   if (!GetPPP())
     return;
 
+  media::ReportPepperVideoDecoderOutputPictureCountHW(coded_size_.height());
+
   PP_Picture_Dev output;
   output.picture_buffer_id = picture.picture_buffer_id();
   output.bitstream_buffer_id = picture.bitstream_buffer_id();
diff --git a/content/renderer/pepper/ppb_video_decoder_impl.h b/content/renderer/pepper/ppb_video_decoder_impl.h
index 28e9709..213f1ef 100644
--- a/content/renderer/pepper/ppb_video_decoder_impl.h
+++ b/content/renderer/pepper/ppb_video_decoder_impl.h
@@ -72,6 +72,9 @@
   // Holds a GpuVideoDecodeAcceleratorHost.
   std::unique_ptr<media::VideoDecodeAccelerator> decoder_;
 
+  // Used for UMA stats; not frame-accurate.
+  gfx::Size coded_size_;
+
   // The interface to use when making calls on the plugin. For the most part,
   // methods should not use this directly but should call GetPPP() instead.
   const PPP_VideoDecoder_Dev* ppp_videodecoder_;
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 5935f8a..204de65 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1001,6 +1001,14 @@
 
 RenderThreadImpl::~RenderThreadImpl() {
   g_main_task_runner.Get() = nullptr;
+
+  // Need to make sure this reference is removed on the correct task runner;
+  if (video_frame_compositor_task_runner_ &&
+      video_frame_compositor_context_provider_) {
+    video_frame_compositor_context_provider_->AddRef();
+    video_frame_compositor_task_runner_->ReleaseSoon(
+        FROM_HERE, std::move(video_frame_compositor_context_provider_).get());
+  }
 }
 
 void RenderThreadImpl::Shutdown() {
@@ -1367,12 +1375,21 @@
 scoped_refptr<viz::ContextProvider>
 RenderThreadImpl::GetVideoFrameCompositorContextProvider(
     scoped_refptr<viz::ContextProvider> unwanted_context_provider) {
+  DCHECK(video_frame_compositor_task_runner_);
   if (video_frame_compositor_context_provider_ &&
       video_frame_compositor_context_provider_ != unwanted_context_provider) {
     return video_frame_compositor_context_provider_;
   }
 
-  video_frame_compositor_context_provider_ = nullptr;
+  // Need to make sure these references are removed on the correct task runner;
+  if (video_frame_compositor_context_provider_) {
+    video_frame_compositor_context_provider_->AddRef();
+    viz::ContextProvider* context_provider_ptr =
+        video_frame_compositor_context_provider_.get();
+    video_frame_compositor_context_provider_ = nullptr;
+    video_frame_compositor_task_runner_->ReleaseSoon(FROM_HERE,
+                                                     context_provider_ptr);
+  }
 
   scoped_refptr<gpu::GpuChannelHost> gpu_channel_host =
       EstablishGpuChannelSync();
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h
index e366aec..3f46482 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -504,6 +504,14 @@
   scoped_refptr<base::SingleThreadTaskRunner>
   CreateVideoFrameCompositorTaskRunner();
 
+  // In the case of kOnDemand, we wont be using the task_runner created in
+  // CreateVideoFrameCompositorTaskRunner.
+  // TODO(https://crbug/901513): Remove once kOnDemand is removed.
+  void SetVideoFrameCompositorTaskRunner(
+      scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
+    video_frame_compositor_task_runner_ = task_runner;
+  }
+
  private:
   void OnProcessFinalRelease() override;
   // IPC::Listener
diff --git a/content/renderer/render_view_browsertest.cc b/content/renderer/render_view_browsertest.cc
index 2786bacf..44c851d 100644
--- a/content/renderer/render_view_browsertest.cc
+++ b/content/renderer/render_view_browsertest.cc
@@ -484,6 +484,7 @@
         view()->max_size_for_auto_resize();
     visual_properties.local_surface_id = base::Optional<viz::LocalSurfaceId>(
         viz::LocalSurfaceId(1, 1, base::UnguessableToken::Create()));
+    visual_properties.local_surface_id_allocation_time = base::TimeTicks::Now();
     view()->OnSynchronizeVisualProperties(visual_properties);
     ASSERT_EQ(dsf, view()->GetWebScreenInfo().device_scale_factor);
     ASSERT_EQ(dsf, view()->GetOriginalScreenInfo().device_scale_factor);
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 9ef9715..65cfba5 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -563,9 +563,9 @@
   popup_view_origin_for_emulation_ = emulator->applied_widget_rect().origin();
   popup_screen_origin_for_emulation_ =
       emulator->original_screen_rect().origin();
-  UpdateSurfaceAndScreenInfo(
-      local_surface_id_from_parent_, allocation_time_from_parent_,
-      compositor_viewport_pixel_size_, emulator->original_screen_info());
+  UpdateSurfaceAndScreenInfo(local_surface_id_allocation_from_parent_,
+                             compositor_viewport_pixel_size_,
+                             emulator->original_screen_info());
 }
 
 gfx::Rect RenderWidget::AdjustValidationMessageAnchor(const gfx::Rect& anchor) {
@@ -779,7 +779,10 @@
     visual_properties.new_size = size_;
     visual_properties.compositor_viewport_pixel_size =
         compositor_viewport_pixel_size_;
-    visual_properties.local_surface_id = local_surface_id_from_parent_;
+    visual_properties.local_surface_id =
+        local_surface_id_allocation_from_parent_.local_surface_id();
+    visual_properties.local_surface_id_allocation_time =
+        local_surface_id_allocation_from_parent_.allocation_time();
     visual_properties.visible_viewport_size = visible_viewport_size_;
     visual_properties.is_fullscreen_granted = is_fullscreen_granted_;
     visual_properties.display_mode = display_mode_;
@@ -1349,8 +1352,9 @@
                                    params.screen_info.device_scale_factor)
           : params.compositor_viewport_pixel_size;
   UpdateSurfaceAndScreenInfo(
-      params.local_surface_id.value_or(viz::LocalSurfaceId()),
-      params.local_surface_id_allocation_time.value_or(base::TimeTicks()),
+      viz::LocalSurfaceIdAllocation(
+          params.local_surface_id.value_or(viz::LocalSurfaceId()),
+          params.local_surface_id_allocation_time.value_or(base::TimeTicks())),
       new_compositor_viewport_pixel_size, params.screen_info);
   UpdateCaptureSequenceNumber(params.capture_sequence_number);
   if (layer_tree_view_) {
@@ -1539,8 +1543,7 @@
                                 screen_info_.device_scale_factor),
       compositor_deps_->CreateUkmRecorderFactory());
 
-  UpdateSurfaceAndScreenInfo(local_surface_id_from_parent_,
-                             allocation_time_from_parent_,
+  UpdateSurfaceAndScreenInfo(local_surface_id_allocation_from_parent_,
                              compositor_viewport_pixel_size_, screen_info_);
   layer_tree_view_->SetRasterColorSpace(
       screen_info_.color_space.GetRasterColorSpace());
@@ -1890,8 +1893,7 @@
 }
 
 void RenderWidget::UpdateSurfaceAndScreenInfo(
-    const viz::LocalSurfaceId& new_local_surface_id,
-    base::TimeTicks new_allocation_time_,
+    const viz::LocalSurfaceIdAllocation& new_local_surface_id_allocation,
     const gfx::Size& new_compositor_viewport_pixel_size,
     const ScreenInfo& new_screen_info) {
   bool orientation_changed =
@@ -1901,8 +1903,7 @@
       screen_info_.device_scale_factor != new_screen_info.device_scale_factor;
   ScreenInfo previous_original_screen_info = GetOriginalScreenInfo();
 
-  local_surface_id_from_parent_ = new_local_surface_id;
-  allocation_time_from_parent_ = new_allocation_time_;
+  local_surface_id_allocation_from_parent_ = new_local_surface_id_allocation;
   compositor_viewport_pixel_size_ = new_compositor_viewport_pixel_size;
   screen_info_ = new_screen_info;
 
@@ -1913,7 +1914,7 @@
     layer_tree_view_->SetViewportSizeAndScale(
         compositor_viewport_pixel_size_,
         GetOriginalScreenInfo().device_scale_factor,
-        local_surface_id_from_parent_, allocation_time_from_parent_);
+        local_surface_id_allocation_from_parent_);
   }
 
   if (orientation_changed)
@@ -1942,7 +1943,10 @@
   visual_properties.visible_viewport_size = new_window_rect.size();
   visual_properties.is_fullscreen_granted = is_fullscreen_granted_;
   visual_properties.display_mode = display_mode_;
-  visual_properties.local_surface_id = local_surface_id_from_parent_;
+  visual_properties.local_surface_id =
+      local_surface_id_allocation_from_parent_.local_surface_id();
+  visual_properties.local_surface_id_allocation_time =
+      local_surface_id_allocation_from_parent_.allocation_time();
   visual_properties.page_scale_factor = page_scale_factor_from_mainframe_;
   // We are resizing the window from the renderer, so allocate a new
   // viz::LocalSurfaceId to avoid surface invariants violations in tests.
@@ -2352,9 +2356,9 @@
       layer_tree_view_->RequestNewLocalSurfaceId();
     gfx::Size new_compositor_viewport_pixel_size =
         gfx::ScaleToCeiledSize(size_, GetWebScreenInfo().device_scale_factor);
-    UpdateSurfaceAndScreenInfo(
-        local_surface_id_from_parent_, allocation_time_from_parent_,
-        new_compositor_viewport_pixel_size, screen_info_);
+    UpdateSurfaceAndScreenInfo(local_surface_id_allocation_from_parent_,
+                               new_compositor_viewport_pixel_size,
+                               screen_info_);
   }
 }
 
@@ -3137,7 +3141,10 @@
   visual_properties.top_controls_height = 0.f;
   visual_properties.is_fullscreen_granted = is_fullscreen_granted_;
   visual_properties.display_mode = display_mode_;
-  visual_properties.local_surface_id = local_surface_id_from_parent_;
+  visual_properties.local_surface_id =
+      local_surface_id_allocation_from_parent_.local_surface_id();
+  visual_properties.local_surface_id_allocation_time =
+      local_surface_id_allocation_from_parent_.allocation_time();
   visual_properties.page_scale_factor = page_scale_factor_from_mainframe_;
   // We are changing the device scale factor from the renderer, so allocate a
   // new viz::LocalSurfaceId to avoid surface invariants violations in tests.
@@ -3160,7 +3167,10 @@
   visual_properties.top_controls_height = 0.f;
   visual_properties.is_fullscreen_granted = is_fullscreen_granted_;
   visual_properties.display_mode = display_mode_;
-  visual_properties.local_surface_id = local_surface_id_from_parent_;
+  visual_properties.local_surface_id =
+      local_surface_id_allocation_from_parent_.local_surface_id();
+  visual_properties.local_surface_id_allocation_time =
+      local_surface_id_allocation_from_parent_.allocation_time();
   visual_properties.page_scale_factor = page_scale_factor_from_mainframe_;
   // We are changing the device color space from the renderer, so allocate a
   // new viz::LocalSurfaceId to avoid surface invariants violations in tests.
@@ -3182,6 +3192,7 @@
   visual_properties.max_size_for_auto_resize = max_size;
   visual_properties.local_surface_id = base::Optional<viz::LocalSurfaceId>(
       viz::LocalSurfaceId(1, 1, base::UnguessableToken::Create()));
+  visual_properties.local_surface_id_allocation_time = base::TimeTicks::Now();
   visual_properties.page_scale_factor = page_scale_factor_from_mainframe_;
   OnSynchronizeVisualProperties(visual_properties);
 }
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h
index ae6a5c342..1e586ad3 100644
--- a/content/renderer/render_widget.h
+++ b/content/renderer/render_widget.h
@@ -688,8 +688,7 @@
   void EmulatedToScreenRectIfNeeded(blink::WebRect* window_rect) const;
 
   void UpdateSurfaceAndScreenInfo(
-      const viz::LocalSurfaceId& new_local_surface_id,
-      base::TimeTicks new_allocation_time_,
+      const viz::LocalSurfaceIdAllocation& new_local_surface_id_allocation,
       const gfx::Size& new_compositor_viewport_pixel_size,
       const ScreenInfo& new_screen_info);
 
@@ -902,8 +901,7 @@
   // Wraps the |webwidget_| as a MouseLockDispatcher::LockTarget interface.
   std::unique_ptr<MouseLockDispatcher::LockTarget> webwidget_mouse_lock_target_;
 
-  viz::LocalSurfaceId local_surface_id_from_parent_;
-  base::TimeTicks allocation_time_from_parent_;
+  viz::LocalSurfaceIdAllocation local_surface_id_allocation_from_parent_;
 
   // Indicates whether this widget has focus.
   bool has_focus_;
diff --git a/content/renderer/render_widget_browsertest.cc b/content/renderer/render_widget_browsertest.cc
index 6a551163..5461d7a 100644
--- a/content/renderer/render_widget_browsertest.cc
+++ b/content/renderer/render_widget_browsertest.cc
@@ -72,6 +72,8 @@
   gfx::Size size(100, 100);
   visual_properties.local_surface_id =
       local_surface_id_allocator.GetCurrentLocalSurfaceId();
+  visual_properties.local_surface_id_allocation_time =
+      local_surface_id_allocator.allocation_time();
   visual_properties.new_size = size;
   visual_properties.compositor_viewport_pixel_size = size;
   OnSynchronizeVisualProperties(visual_properties);
@@ -107,6 +109,8 @@
     initial_visual_properties->compositor_viewport_pixel_size = initial_size_;
     initial_visual_properties->local_surface_id =
         local_surface_id_allocator_.GetCurrentLocalSurfaceId();
+    initial_visual_properties->local_surface_id_allocation_time =
+        local_surface_id_allocator_.allocation_time();
     return initial_visual_properties;
   }
 
diff --git a/content/renderer/render_widget_unittest.cc b/content/renderer/render_widget_unittest.cc
index 687d3df..065ad56 100644
--- a/content/renderer/render_widget_unittest.cc
+++ b/content/renderer/render_widget_unittest.cc
@@ -187,8 +187,9 @@
     return mock_input_handler_host_.get();
   }
 
-  const viz::LocalSurfaceId& local_surface_id_from_parent() const {
-    return local_surface_id_from_parent_;
+  const viz::LocalSurfaceIdAllocation& local_surface_id_allocation_from_parent()
+      const {
+    return local_surface_id_allocation_from_parent_;
   }
 
  protected:
@@ -371,9 +372,11 @@
   visual_properties.min_size_for_auto_resize = gfx::Size(100, 100);
   visual_properties.max_size_for_auto_resize = gfx::Size(200, 200);
   visual_properties.local_surface_id = allocator.GetCurrentLocalSurfaceId();
+  visual_properties.local_surface_id_allocation_time =
+      allocator.allocation_time();
   widget()->SynchronizeVisualProperties(visual_properties);
-  EXPECT_EQ(allocator.GetCurrentLocalSurfaceId(),
-            widget()->local_surface_id_from_parent());
+  EXPECT_EQ(allocator.GetCurrentLocalSurfaceIdAllocation(),
+            widget()->local_surface_id_allocation_from_parent());
   EXPECT_FALSE(widget()
                    ->layer_tree_view()
                    ->layer_tree_host()
@@ -381,8 +384,8 @@
 
   constexpr gfx::Size size(200, 200);
   widget()->DidAutoResize(size);
-  EXPECT_EQ(allocator.GetCurrentLocalSurfaceId(),
-            widget()->local_surface_id_from_parent());
+  EXPECT_EQ(allocator.GetCurrentLocalSurfaceIdAllocation(),
+            widget()->local_surface_id_allocation_from_parent());
   EXPECT_TRUE(widget()
                   ->layer_tree_view()
                   ->layer_tree_host()
diff --git a/content/renderer/service_worker/service_worker_context_client.cc b/content/renderer/service_worker/service_worker_context_client.cc
index c62e47a..35cefd3d 100644
--- a/content/renderer/service_worker/service_worker_context_client.cc
+++ b/content/renderer/service_worker/service_worker_context_client.cc
@@ -334,16 +334,15 @@
 base::OnceCallback<void(int /* event_id */)> CreateAbortCallback(MapType* map,
                                                                  Args... args) {
   return base::BindOnce(
-      [](MapType* map, Args... args, base::TimeTicks dispatched_time,
-         int event_id) {
+      [](MapType* map, Args... args, int event_id) {
         auto iter = map->find(event_id);
         DCHECK(iter != map->end());
         std::move(iter->second)
             .Run(blink::mojom::ServiceWorkerEventStatus::ABORTED,
-                 std::forward<Args>(args)..., dispatched_time);
+                 std::forward<Args>(args)...);
         map->erase(iter);
       },
-      map, std::forward<Args>(args)..., base::TimeTicks::Now());
+      map, std::forward<Args>(args)...);
 }
 
 }  // namespace
@@ -845,8 +844,7 @@
 
 void ServiceWorkerContextClient::DidHandleActivateEvent(
     int request_id,
-    blink::mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
+    blink::mojom::ServiceWorkerEventStatus status) {
   TRACE_EVENT_WITH_FLOW1("ServiceWorker",
                          "ServiceWorkerContextClient::DidHandleActivateEvent",
                          TRACE_ID_WITH_SCOPE(kServiceWorkerContextClientScope,
@@ -854,14 +852,12 @@
                          TRACE_EVENT_FLAG_FLOW_IN, "status",
                          ServiceWorkerUtils::MojoEnumToString(status));
   RunEventCallback(&context_->activate_event_callbacks,
-                   context_->timeout_timer.get(), request_id, status,
-                   event_dispatch_time);
+                   context_->timeout_timer.get(), request_id, status);
 }
 
 void ServiceWorkerContextClient::DidHandleBackgroundFetchAbortEvent(
     int request_id,
-    blink::mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
+    blink::mojom::ServiceWorkerEventStatus status) {
   TRACE_EVENT_WITH_FLOW1(
       "ServiceWorker",
       "ServiceWorkerContextClient::DidHandleBackgroundFetchAbortEvent",
@@ -870,14 +866,12 @@
       TRACE_EVENT_FLAG_FLOW_IN, "status",
       ServiceWorkerUtils::MojoEnumToString(status));
   RunEventCallback(&context_->background_fetch_abort_event_callbacks,
-                   context_->timeout_timer.get(), request_id, status,
-                   event_dispatch_time);
+                   context_->timeout_timer.get(), request_id, status);
 }
 
 void ServiceWorkerContextClient::DidHandleBackgroundFetchClickEvent(
     int request_id,
-    blink::mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
+    blink::mojom::ServiceWorkerEventStatus status) {
   TRACE_EVENT_WITH_FLOW1(
       "ServiceWorker",
       "ServiceWorkerContextClient::DidHandleBackgroundFetchClickEvent",
@@ -886,14 +880,12 @@
       TRACE_EVENT_FLAG_FLOW_IN, "status",
       ServiceWorkerUtils::MojoEnumToString(status));
   RunEventCallback(&context_->background_fetch_click_event_callbacks,
-                   context_->timeout_timer.get(), request_id, status,
-                   event_dispatch_time);
+                   context_->timeout_timer.get(), request_id, status);
 }
 
 void ServiceWorkerContextClient::DidHandleBackgroundFetchFailEvent(
     int request_id,
-    blink::mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
+    blink::mojom::ServiceWorkerEventStatus status) {
   TRACE_EVENT_WITH_FLOW1(
       "ServiceWorker",
       "ServiceWorkerContextClient::DidHandleBackgroundFetchFailEvent",
@@ -902,14 +894,12 @@
       TRACE_EVENT_FLAG_FLOW_IN, "status",
       ServiceWorkerUtils::MojoEnumToString(status));
   RunEventCallback(&context_->background_fetch_fail_event_callbacks,
-                   context_->timeout_timer.get(), request_id, status,
-                   event_dispatch_time);
+                   context_->timeout_timer.get(), request_id, status);
 }
 
 void ServiceWorkerContextClient::DidHandleBackgroundFetchSuccessEvent(
     int request_id,
-    blink::mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
+    blink::mojom::ServiceWorkerEventStatus status) {
   TRACE_EVENT_WITH_FLOW1(
       "ServiceWorker",
       "ServiceWorkerContextClient::DidHandleBackgroundFetchSuccessEvent",
@@ -918,14 +908,12 @@
       TRACE_EVENT_FLAG_FLOW_IN, "status",
       ServiceWorkerUtils::MojoEnumToString(status));
   RunEventCallback(&context_->background_fetched_event_callbacks,
-                   context_->timeout_timer.get(), request_id, status,
-                   event_dispatch_time);
+                   context_->timeout_timer.get(), request_id, status);
 }
 
 void ServiceWorkerContextClient::DidHandleCookieChangeEvent(
     int request_id,
-    blink::mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
+    blink::mojom::ServiceWorkerEventStatus status) {
   TRACE_EVENT_WITH_FLOW1(
       "ServiceWorker", "ServiceWorkerContextClient::DidHandleCookieChangeEvent",
       TRACE_ID_WITH_SCOPE(kServiceWorkerContextClientScope,
@@ -933,14 +921,12 @@
       TRACE_EVENT_FLAG_FLOW_IN, "status",
       ServiceWorkerUtils::MojoEnumToString(status));
   RunEventCallback(&context_->cookie_change_event_callbacks,
-                   context_->timeout_timer.get(), request_id, status,
-                   event_dispatch_time);
+                   context_->timeout_timer.get(), request_id, status);
 }
 
 void ServiceWorkerContextClient::DidHandleExtendableMessageEvent(
     int request_id,
-    blink::mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
+    blink::mojom::ServiceWorkerEventStatus status) {
   TRACE_EVENT_WITH_FLOW1(
       "ServiceWorker",
       "ServiceWorkerContextClient::DidHandleExtendableMessageEvent",
@@ -949,14 +935,12 @@
       TRACE_EVENT_FLAG_FLOW_IN, "status",
       ServiceWorkerUtils::MojoEnumToString(status));
   RunEventCallback(&context_->message_event_callbacks,
-                   context_->timeout_timer.get(), request_id, status,
-                   event_dispatch_time);
+                   context_->timeout_timer.get(), request_id, status);
 }
 
 void ServiceWorkerContextClient::DidHandleInstallEvent(
     int event_id,
-    blink::mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
+    blink::mojom::ServiceWorkerEventStatus status) {
   TRACE_EVENT_WITH_FLOW1("ServiceWorker",
                          "ServiceWorkerContextClient::DidHandleInstallEvent",
                          TRACE_ID_WITH_SCOPE(kServiceWorkerContextClientScope,
@@ -965,7 +949,7 @@
                          ServiceWorkerUtils::MojoEnumToString(status));
   RunEventCallback(&context_->install_event_callbacks,
                    context_->timeout_timer.get(), event_id, status,
-                   proxy_->HasFetchEventHandler(), event_dispatch_time);
+                   proxy_->HasFetchEventHandler());
 }
 
 void ServiceWorkerContextClient::RespondToFetchEventWithNoResponse(
@@ -1054,8 +1038,7 @@
 
 void ServiceWorkerContextClient::DidHandleFetchEvent(
     int event_id,
-    blink::mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
+    blink::mojom::ServiceWorkerEventStatus status) {
   // This TRACE_EVENT is used for perf benchmark to confirm if all of fetch
   // events have completed. (crbug.com/736697)
   TRACE_EVENT_WITH_FLOW1("ServiceWorker",
@@ -1065,8 +1048,7 @@
                          TRACE_EVENT_FLAG_FLOW_IN, "status",
                          ServiceWorkerUtils::MojoEnumToString(status));
   if (!RunEventCallback(&context_->fetch_event_callbacks,
-                        context_->timeout_timer.get(), event_id, status,
-                        event_dispatch_time)) {
+                        context_->timeout_timer.get(), event_id, status)) {
     // The event may have been aborted. Its response callback also needs to be
     // deleted.
     context_->fetch_response_callbacks.erase(event_id);
@@ -1079,8 +1061,7 @@
 
 void ServiceWorkerContextClient::DidHandleNotificationClickEvent(
     int request_id,
-    blink::mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
+    blink::mojom::ServiceWorkerEventStatus status) {
   TRACE_EVENT_WITH_FLOW1(
       "ServiceWorker",
       "ServiceWorkerContextClient::DidHandleNotificationClickEvent",
@@ -1089,14 +1070,12 @@
       TRACE_EVENT_FLAG_FLOW_IN, "status",
       ServiceWorkerUtils::MojoEnumToString(status));
   RunEventCallback(&context_->notification_click_event_callbacks,
-                   context_->timeout_timer.get(), request_id, status,
-                   event_dispatch_time);
+                   context_->timeout_timer.get(), request_id, status);
 }
 
 void ServiceWorkerContextClient::DidHandleNotificationCloseEvent(
     int request_id,
-    blink::mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
+    blink::mojom::ServiceWorkerEventStatus status) {
   TRACE_EVENT_WITH_FLOW1(
       "ServiceWorker",
       "ServiceWorkerContextClient::DidHandleNotificationCloseEvent",
@@ -1105,14 +1084,12 @@
       TRACE_EVENT_FLAG_FLOW_IN, "status",
       ServiceWorkerUtils::MojoEnumToString(status));
   RunEventCallback(&context_->notification_close_event_callbacks,
-                   context_->timeout_timer.get(), request_id, status,
-                   event_dispatch_time);
+                   context_->timeout_timer.get(), request_id, status);
 }
 
 void ServiceWorkerContextClient::DidHandlePushEvent(
     int request_id,
-    blink::mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
+    blink::mojom::ServiceWorkerEventStatus status) {
   TRACE_EVENT_WITH_FLOW1("ServiceWorker",
                          "ServiceWorkerContextClient::DidHandlePushEvent",
                          TRACE_ID_WITH_SCOPE(kServiceWorkerContextClientScope,
@@ -1120,14 +1097,12 @@
                          TRACE_EVENT_FLAG_FLOW_IN, "status",
                          ServiceWorkerUtils::MojoEnumToString(status));
   RunEventCallback(&context_->push_event_callbacks,
-                   context_->timeout_timer.get(), request_id, status,
-                   event_dispatch_time);
+                   context_->timeout_timer.get(), request_id, status);
 }
 
 void ServiceWorkerContextClient::DidHandleSyncEvent(
     int request_id,
-    blink::mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
+    blink::mojom::ServiceWorkerEventStatus status) {
   TRACE_EVENT_WITH_FLOW1("ServiceWorker",
                          "ServiceWorkerContextClient::DidHandleSyncEvent",
                          TRACE_ID_WITH_SCOPE(kServiceWorkerContextClientScope,
@@ -1135,14 +1110,12 @@
                          TRACE_EVENT_FLAG_FLOW_IN, "status",
                          ServiceWorkerUtils::MojoEnumToString(status));
   RunEventCallback(&context_->sync_event_callbacks,
-                   context_->timeout_timer.get(), request_id, status,
-                   event_dispatch_time);
+                   context_->timeout_timer.get(), request_id, status);
 }
 
 void ServiceWorkerContextClient::RespondToAbortPaymentEvent(
     int event_id,
-    bool payment_aborted,
-    base::TimeTicks event_dispatch_time) {
+    bool payment_aborted) {
   TRACE_EVENT_WITH_FLOW0(
       "ServiceWorker", "ServiceWorkerContextClient::RespondToAbortPaymentEvent",
       TRACE_ID_WITH_SCOPE(kServiceWorkerContextClientScope,
@@ -1151,15 +1124,13 @@
   DCHECK(base::ContainsKey(context_->abort_payment_result_callbacks, event_id));
   const payments::mojom::PaymentHandlerResponseCallbackPtr& result_callback =
       context_->abort_payment_result_callbacks[event_id];
-  result_callback->OnResponseForAbortPayment(payment_aborted,
-                                             event_dispatch_time);
+  result_callback->OnResponseForAbortPayment(payment_aborted);
   context_->abort_payment_result_callbacks.erase(event_id);
 }
 
 void ServiceWorkerContextClient::DidHandleAbortPaymentEvent(
     int event_id,
-    blink::mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
+    blink::mojom::ServiceWorkerEventStatus status) {
   TRACE_EVENT_WITH_FLOW1(
       "ServiceWorker", "ServiceWorkerContextClient::DidHandleAbortPaymentEvent",
       TRACE_ID_WITH_SCOPE(kServiceWorkerContextClientScope,
@@ -1167,16 +1138,14 @@
       TRACE_EVENT_FLAG_FLOW_IN, "status",
       ServiceWorkerUtils::MojoEnumToString(status));
   if (RunEventCallback(&context_->abort_payment_event_callbacks,
-                       context_->timeout_timer.get(), event_id, status,
-                       event_dispatch_time)) {
+                       context_->timeout_timer.get(), event_id, status)) {
     context_->abort_payment_result_callbacks.erase(event_id);
   }
 }
 
 void ServiceWorkerContextClient::RespondToCanMakePaymentEvent(
     int event_id,
-    bool can_make_payment,
-    base::TimeTicks event_dispatch_time) {
+    bool can_make_payment) {
   TRACE_EVENT_WITH_FLOW0(
       "ServiceWorker",
       "ServiceWorkerContextClient::RespondToCanMakePaymentEvent",
@@ -1187,15 +1156,13 @@
       base::ContainsKey(context_->can_make_payment_result_callbacks, event_id));
   const payments::mojom::PaymentHandlerResponseCallbackPtr& result_callback =
       context_->can_make_payment_result_callbacks[event_id];
-  result_callback->OnResponseForCanMakePayment(can_make_payment,
-                                               event_dispatch_time);
+  result_callback->OnResponseForCanMakePayment(can_make_payment);
   context_->can_make_payment_result_callbacks.erase(event_id);
 }
 
 void ServiceWorkerContextClient::DidHandleCanMakePaymentEvent(
     int event_id,
-    blink::mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
+    blink::mojom::ServiceWorkerEventStatus status) {
   TRACE_EVENT_WITH_FLOW1(
       "ServiceWorker",
       "ServiceWorkerContextClient::DidHandleCanMakePaymentEvent",
@@ -1204,16 +1171,14 @@
       TRACE_EVENT_FLAG_FLOW_IN, "status",
       ServiceWorkerUtils::MojoEnumToString(status));
   if (RunEventCallback(&context_->can_make_payment_event_callbacks,
-                       context_->timeout_timer.get(), event_id, status,
-                       event_dispatch_time)) {
+                       context_->timeout_timer.get(), event_id, status)) {
     context_->can_make_payment_result_callbacks.erase(event_id);
   }
 }
 
 void ServiceWorkerContextClient::RespondToPaymentRequestEvent(
     int payment_request_id,
-    const blink::WebPaymentHandlerResponse& web_response,
-    base::TimeTicks event_dispatch_time) {
+    const blink::WebPaymentHandlerResponse& web_response) {
   TRACE_EVENT_WITH_FLOW0(
       "ServiceWorker",
       "ServiceWorkerContextClient::RespondToPaymentRequestEvent",
@@ -1228,15 +1193,13 @@
       payments::mojom::PaymentHandlerResponse::New();
   response->method_name = web_response.method_name.Utf8();
   response->stringified_details = web_response.stringified_details.Utf8();
-  response_callback->OnResponseForPaymentRequest(std::move(response),
-                                                 event_dispatch_time);
+  response_callback->OnResponseForPaymentRequest(std::move(response));
   context_->payment_response_callbacks.erase(payment_request_id);
 }
 
 void ServiceWorkerContextClient::DidHandlePaymentRequestEvent(
     int payment_request_id,
-    blink::mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
+    blink::mojom::ServiceWorkerEventStatus status) {
   TRACE_EVENT_WITH_FLOW1(
       "ServiceWorker",
       "ServiceWorkerContextClient::DidHandlePaymentRequestEvent",
@@ -1246,7 +1209,7 @@
       ServiceWorkerUtils::MojoEnumToString(status));
   if (RunEventCallback(&context_->payment_request_event_callbacks,
                        context_->timeout_timer.get(), payment_request_id,
-                       status, event_dispatch_time)) {
+                       status)) {
     context_->payment_response_callbacks.erase(payment_request_id);
   }
 }
diff --git a/content/renderer/service_worker/service_worker_context_client.h b/content/renderer/service_worker/service_worker_context_client.h
index 48d14b91..b4837f9 100644
--- a/content/renderer/service_worker/service_worker_context_client.h
+++ b/content/renderer/service_worker/service_worker_context_client.h
@@ -124,35 +124,30 @@
                             const blink::WebString& message,
                             int line_number,
                             const blink::WebString& source_url) override;
-  void DidHandleActivateEvent(int request_id,
-                              blink::mojom::ServiceWorkerEventStatus status,
-                              base::TimeTicks event_dispatch_time) override;
+  void DidHandleActivateEvent(
+      int request_id,
+      blink::mojom::ServiceWorkerEventStatus status) override;
   void DidHandleBackgroundFetchAbortEvent(
       int request_id,
-      blink::mojom::ServiceWorkerEventStatus status,
-      base::TimeTicks event_dispatch_time) override;
+      blink::mojom::ServiceWorkerEventStatus status) override;
   void DidHandleBackgroundFetchClickEvent(
       int request_id,
-      blink::mojom::ServiceWorkerEventStatus status,
-      base::TimeTicks event_dispatch_time) override;
+      blink::mojom::ServiceWorkerEventStatus status) override;
   void DidHandleBackgroundFetchFailEvent(
       int request_id,
-      blink::mojom::ServiceWorkerEventStatus status,
-      base::TimeTicks event_dispatch_time) override;
+      blink::mojom::ServiceWorkerEventStatus status) override;
   void DidHandleBackgroundFetchSuccessEvent(
       int request_id,
-      blink::mojom::ServiceWorkerEventStatus status,
-      base::TimeTicks event_dispatch_time) override;
-  void DidHandleCookieChangeEvent(int request_id,
-                                  blink::mojom::ServiceWorkerEventStatus status,
-                                  base::TimeTicks event_dispatch_time) override;
+      blink::mojom::ServiceWorkerEventStatus status) override;
+  void DidHandleCookieChangeEvent(
+      int request_id,
+      blink::mojom::ServiceWorkerEventStatus status) override;
   void DidHandleExtendableMessageEvent(
       int request_id,
-      blink::mojom::ServiceWorkerEventStatus status,
-      base::TimeTicks event_dispatch_time) override;
-  void DidHandleInstallEvent(int event_id,
-                             blink::mojom::ServiceWorkerEventStatus status,
-                             base::TimeTicks event_dispatch_time) override;
+      blink::mojom::ServiceWorkerEventStatus status) override;
+  void DidHandleInstallEvent(
+      int event_id,
+      blink::mojom::ServiceWorkerEventStatus status) override;
   void RespondToFetchEventWithNoResponse(
       int fetch_event_id,
       base::TimeTicks event_dispatch_time,
@@ -167,45 +162,36 @@
       blink::WebServiceWorkerStreamHandle* web_body_as_stream,
       base::TimeTicks event_dispatch_time,
       base::TimeTicks respond_with_settled_time) override;
-  void DidHandleFetchEvent(int fetch_event_id,
-                           blink::mojom::ServiceWorkerEventStatus status,
-                           base::TimeTicks event_dispatch_time) override;
+  void DidHandleFetchEvent(
+      int fetch_event_id,
+      blink::mojom::ServiceWorkerEventStatus status) override;
   void DidHandleNotificationClickEvent(
       int request_id,
-      blink::mojom::ServiceWorkerEventStatus status,
-      base::TimeTicks event_dispatch_time) override;
+      blink::mojom::ServiceWorkerEventStatus status) override;
   void DidHandleNotificationCloseEvent(
       int request_id,
-      blink::mojom::ServiceWorkerEventStatus status,
-      base::TimeTicks event_dispatch_time) override;
-  void DidHandlePushEvent(int request_id,
-                          blink::mojom::ServiceWorkerEventStatus status,
-                          base::TimeTicks event_dispatch_time) override;
-  void DidHandleSyncEvent(int request_id,
-                          blink::mojom::ServiceWorkerEventStatus status,
-                          base::TimeTicks event_dispatch_time) override;
-  void RespondToAbortPaymentEvent(int event_id,
-                                  bool payment_aborted,
-                                  base::TimeTicks event_dispatch_time) override;
-  void DidHandleAbortPaymentEvent(int event_id,
-                                  blink::mojom::ServiceWorkerEventStatus status,
-                                  base::TimeTicks event_dispatch_time) override;
-  void RespondToCanMakePaymentEvent(
+      blink::mojom::ServiceWorkerEventStatus status) override;
+  void DidHandlePushEvent(
+      int request_id,
+      blink::mojom::ServiceWorkerEventStatus status) override;
+  void DidHandleSyncEvent(
+      int request_id,
+      blink::mojom::ServiceWorkerEventStatus status) override;
+  void RespondToAbortPaymentEvent(int event_id, bool payment_aborted) override;
+  void DidHandleAbortPaymentEvent(
       int event_id,
-      bool can_make_payment,
-      base::TimeTicks event_dispatch_time) override;
+      blink::mojom::ServiceWorkerEventStatus status) override;
+  void RespondToCanMakePaymentEvent(int event_id,
+                                    bool can_make_payment) override;
   void DidHandleCanMakePaymentEvent(
       int event_id,
-      blink::mojom::ServiceWorkerEventStatus status,
-      base::TimeTicks event_dispatch_time) override;
+      blink::mojom::ServiceWorkerEventStatus status) override;
   void RespondToPaymentRequestEvent(
       int payment_request_id,
-      const blink::WebPaymentHandlerResponse& response,
-      base::TimeTicks event_dispatch_time) override;
+      const blink::WebPaymentHandlerResponse& response) override;
   void DidHandlePaymentRequestEvent(
       int payment_request_id,
-      blink::mojom::ServiceWorkerEventStatus status,
-      base::TimeTicks event_dispatch_time) override;
+      blink::mojom::ServiceWorkerEventStatus status) override;
   std::unique_ptr<blink::WebServiceWorkerNetworkProvider>
   CreateServiceWorkerNetworkProvider() override;
   std::unique_ptr<blink::WebWorkerFetchContext> CreateServiceWorkerFetchContext(
diff --git a/content/renderer/service_worker/service_worker_context_client_unittest.cc b/content/renderer/service_worker/service_worker_context_client_unittest.cc
index 888dedb6..f8acc4a 100644
--- a/content/renderer/service_worker/service_worker_context_client_unittest.cc
+++ b/content/renderer/service_worker/service_worker_context_client_unittest.cc
@@ -346,8 +346,7 @@
   params->request = *request;
   pipes.service_worker->DispatchFetchEvent(
       std::move(params), std::move(fetch_callback_ptr),
-      base::BindOnce(
-          [](blink::mojom::ServiceWorkerEventStatus, base::TimeTicks) {}));
+      base::BindOnce([](blink::mojom::ServiceWorkerEventStatus) {}));
   task_runner()->RunUntilIdle();
 
   ASSERT_EQ(1u, mock_proxy.fetch_events().size());
@@ -386,8 +385,7 @@
   params->request = *request;
   pipes.service_worker->DispatchFetchEvent(
       std::move(params), std::move(fetch_callback_ptr),
-      base::BindOnce(
-          [](blink::mojom::ServiceWorkerEventStatus, base::TimeTicks) {}));
+      base::BindOnce([](blink::mojom::ServiceWorkerEventStatus) {}));
   task_runner()->RunUntilIdle();
 
   ASSERT_EQ(1u, mock_proxy.fetch_events().size());
@@ -433,8 +431,7 @@
   params->request = *request;
   context_client->DispatchOrQueueFetchEvent(
       std::move(params), std::move(fetch_callback_ptr),
-      base::BindOnce(
-          [](blink::mojom::ServiceWorkerEventStatus, base::TimeTicks) {}));
+      base::BindOnce([](blink::mojom::ServiceWorkerEventStatus) {}));
   task_runner()->RunUntilIdle();
 
   EXPECT_FALSE(context_client->RequestedTermination());
@@ -481,8 +478,7 @@
     params->request = *request;
     pipes.controller->DispatchFetchEvent(
         std::move(params), std::move(fetch_callback_ptr),
-        base::BindOnce(
-            [](blink::mojom::ServiceWorkerEventStatus, base::TimeTicks) {}));
+        base::BindOnce([](blink::mojom::ServiceWorkerEventStatus) {}));
     task_runner()->RunUntilIdle();
   }
   EXPECT_TRUE(mock_proxy.fetch_events().empty());
@@ -532,8 +528,7 @@
     params->request = *request;
     pipes.controller->DispatchFetchEvent(
         std::move(params), std::move(fetch_callback_ptr),
-        base::BindOnce(
-            [](blink::mojom::ServiceWorkerEventStatus, base::TimeTicks) {}));
+        base::BindOnce([](blink::mojom::ServiceWorkerEventStatus) {}));
     task_runner()->RunUntilIdle();
   }
   EXPECT_TRUE(mock_proxy.fetch_events().empty());
@@ -549,8 +544,7 @@
     params->request = *request;
     pipes.service_worker->DispatchFetchEvent(
         std::move(params), std::move(fetch_callback_ptr),
-        base::BindOnce(
-            [](blink::mojom::ServiceWorkerEventStatus, base::TimeTicks) {}));
+        base::BindOnce([](blink::mojom::ServiceWorkerEventStatus) {}));
     task_runner()->RunUntilIdle();
   }
   EXPECT_FALSE(context_client->RequestedTermination());
diff --git a/content/renderer/service_worker/service_worker_provider_context_unittest.cc b/content/renderer/service_worker/service_worker_provider_context_unittest.cc
index f020e542..d729bab 100644
--- a/content/renderer/service_worker/service_worker_provider_context_unittest.cc
+++ b/content/renderer/service_worker/service_worker_provider_context_unittest.cc
@@ -185,8 +185,7 @@
       DispatchFetchEventCallback callback) override {
     fetch_event_count_++;
     fetch_event_request_ = params->request;
-    std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-                            base::TimeTicks());
+    std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
     if (fetch_event_callback_)
       std::move(fetch_event_callback_).Run();
   }
diff --git a/content/renderer/service_worker/service_worker_subresource_loader.cc b/content/renderer/service_worker/service_worker_subresource_loader.cc
index 17b6000c..12e40f4 100644
--- a/content/renderer/service_worker/service_worker_subresource_loader.cc
+++ b/content/renderer/service_worker/service_worker_subresource_loader.cc
@@ -273,13 +273,11 @@
   controller->DispatchFetchEvent(
       std::move(params), std::move(response_callback_ptr),
       base::BindOnce(&ServiceWorkerSubresourceLoader::OnFetchEventFinished,
-                     weak_factory_.GetWeakPtr(), base::TimeTicks::Now()));
+                     weak_factory_.GetWeakPtr()));
 }
 
 void ServiceWorkerSubresourceLoader::OnFetchEventFinished(
-    base::TimeTicks request_dispatch_time,
-    blink::mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks actual_dispatch_time) {
+    blink::mojom::ServiceWorkerEventStatus status) {
   TRACE_EVENT_WITH_FLOW1("ServiceWorker",
                          "ServiceWorkerSubresourceLoader::OnFetchEventFinished",
                          this, TRACE_EVENT_FLAG_FLOW_IN, "status",
diff --git a/content/renderer/service_worker/service_worker_subresource_loader.h b/content/renderer/service_worker/service_worker_subresource_loader.h
index 1ccb575..8921471 100644
--- a/content/renderer/service_worker/service_worker_subresource_loader.h
+++ b/content/renderer/service_worker/service_worker_subresource_loader.h
@@ -66,9 +66,7 @@
 
   void StartRequest(const network::ResourceRequest& resource_request);
   void DispatchFetchEvent();
-  void OnFetchEventFinished(base::TimeTicks request_dispatch_time,
-                            blink::mojom::ServiceWorkerEventStatus status,
-                            base::TimeTicks dispatch_event_time);
+  void OnFetchEventFinished(blink::mojom::ServiceWorkerEventStatus status);
   // Called when this loader no longer needs to restart dispatching the fetch
   // event on failure. Null |status| means the event dispatch was not attempted.
   void SettleFetchEventDispatch(
diff --git a/content/renderer/service_worker/service_worker_subresource_loader_unittest.cc b/content/renderer/service_worker/service_worker_subresource_loader_unittest.cc
index 9061a4fb..a824580 100644
--- a/content/renderer/service_worker/service_worker_subresource_loader_unittest.cc
+++ b/content/renderer/service_worker/service_worker_subresource_loader_unittest.cc
@@ -259,27 +259,24 @@
         response_callback->OnResponse(OkResponse(nullptr /* blob_body */),
                                       std::move(timing));
         std::move(callback).Run(
-            blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-            base::TimeTicks());
+            blink::mojom::ServiceWorkerEventStatus::COMPLETED);
         break;
       case ResponseMode::kAbort:
-        std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::ABORTED,
-                                base::TimeTicks());
+        std::move(callback).Run(
+            blink::mojom::ServiceWorkerEventStatus::ABORTED);
         break;
       case ResponseMode::kStream:
         response_callback->OnResponseStream(OkResponse(nullptr /* blob_body */),
                                             std::move(stream_handle_),
                                             std::move(timing));
         std::move(callback).Run(
-            blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-            base::TimeTicks());
+            blink::mojom::ServiceWorkerEventStatus::COMPLETED);
         break;
       case ResponseMode::kBlob:
         response_callback->OnResponse(OkResponse(std::move(blob_body_)),
                                       std::move(timing));
         std::move(callback).Run(
-            blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-            base::TimeTicks());
+            blink::mojom::ServiceWorkerEventStatus::COMPLETED);
         break;
 
       case ResponseMode::kBlobRange: {
@@ -312,29 +309,25 @@
                                                 blob_range_body_.size()));
         response_callback->OnResponse(std::move(response), std::move(timing));
         std::move(callback).Run(
-            blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-            base::TimeTicks::Now());
+            blink::mojom::ServiceWorkerEventStatus::COMPLETED);
         break;
       }
 
       case ResponseMode::kFallbackResponse:
         response_callback->OnFallback(std::move(timing));
         std::move(callback).Run(
-            blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-            base::TimeTicks::Now());
+            blink::mojom::ServiceWorkerEventStatus::COMPLETED);
         break;
       case ResponseMode::kErrorResponse:
         response_callback->OnResponse(ErrorResponse(), std::move(timing));
         std::move(callback).Run(
-            blink::mojom::ServiceWorkerEventStatus::REJECTED,
-            base::TimeTicks::Now());
+            blink::mojom::ServiceWorkerEventStatus::REJECTED);
         break;
       case ResponseMode::kRedirectResponse: {
         response_callback->OnResponse(
             RedirectResponse(redirect_location_header_), std::move(timing));
         std::move(callback).Run(
-            blink::mojom::ServiceWorkerEventStatus::COMPLETED,
-            base::TimeTicks());
+            blink::mojom::ServiceWorkerEventStatus::COMPLETED);
         break;
       }
     }
diff --git a/content/shell/browser/layout_test/blink_test_controller.cc b/content/shell/browser/layout_test/blink_test_controller.cc
index 1388ac8..f7a9c24 100644
--- a/content/shell/browser/layout_test/blink_test_controller.cc
+++ b/content/shell/browser/layout_test/blink_test_controller.cc
@@ -536,8 +536,8 @@
   main_frame_dump_ = nullptr;
   waiting_for_pixel_results_ = false;
   waiting_for_main_frame_dump_ = false;
-  composite_all_frames_node_storage_.clear();
   composite_all_frames_node_queue_ = std::queue<Node*>();
+  composite_all_frames_node_storage_.clear();
   weak_factory_.InvalidateWeakPtrs();
 
 #if defined(OS_ANDROID)
@@ -657,11 +657,20 @@
 
 void BlinkTestController::CompositeAllFramesThen(
     base::OnceCallback<void()> callback) {
-  // Start with fresh storage and queue.
-  DCHECK(composite_all_frames_node_storage_.empty())
-      << "Attempted to composite twice in one test";
-  DCHECK(composite_all_frames_node_queue_.empty())
-      << "Attempted to composite twice in one test";
+  // Only allow a single call to CompositeAllFramesThen(), without a call to
+  // ResetAfterLayoutTest() in between. More than once risks overlapping calls,
+  // due to the asynchronous nature of CompositeNodeQueueThen(), which can lead
+  // to use-after-free, e.g.
+  // https://clusterfuzz.com/v2/testcase-detail/4929420383748096
+  if (!composite_all_frames_node_storage_.empty() ||
+      !composite_all_frames_node_queue_.empty()) {
+    // Using NOTREACHED + return here because we want to disallow the second
+    // call if this happens in release builds, while still catching this
+    // condition in debug builds.
+    NOTREACHED();
+    return;
+  }
+  // Build the frame storage and depth first queue.
   Node* root = BuildFrameTree(main_window_->web_contents()->GetAllFrames());
   BuildDepthFirstQueue(root);
   // Now asynchronously run through the node queue.
diff --git a/content/shell/browser/layout_test/blink_test_controller.h b/content/shell/browser/layout_test/blink_test_controller.h
index e8c376b..578bac2 100644
--- a/content/shell/browser/layout_test/blink_test_controller.h
+++ b/content/shell/browser/layout_test/blink_test_controller.h
@@ -260,10 +260,13 @@
   // Each call to CompositeWithRaster() is an asynchronous Mojo call, to avoid
   // reentrancy problems.
   void CompositeAllFramesThen(base::OnceCallback<void()> callback);
+
+ private:
   Node* BuildFrameTree(const std::vector<RenderFrameHost*>& frames);
   void CompositeNodeQueueThen(base::OnceCallback<void()> callback);
   void BuildDepthFirstQueue(Node* node);
 
+ public:
   std::unique_ptr<BlinkTestResultPrinter> printer_;
 
   base::FilePath current_working_directory_;
diff --git a/content/test/data/indexeddb/crbug899446.html b/content/test/data/indexeddb/crbug899446.html
new file mode 100644
index 0000000..a155da0
--- /dev/null
+++ b/content/test/data/indexeddb/crbug899446.html
@@ -0,0 +1,31 @@
+<html>
+  <head>
+    <title>IndexedDB crbug899446</title>
+    <script type="text/javascript" src="common.js"></script>
+    <script type="text/javascript" src="crbug899446.js"></script>
+    <script>
+      async function test() {
+        const db = await Database.open('crbug899446');
+        if (!db) {
+          fail("db failed to open");
+          return;
+        }
+
+        try {
+          if (!await db.read()) {
+            fail("db.read() failed");
+            return;
+          }
+        } catch (e) {
+          fail(e);
+          return;
+        }
+
+        done();
+      }
+    </script>
+  </head>
+  <body onLoad="test()">
+    <div id="status">Starting...</div>
+  </body>
+</html>
diff --git a/content/test/data/indexeddb/crbug899446.js b/content/test/data/indexeddb/crbug899446.js
new file mode 100644
index 0000000..0e4810b
--- /dev/null
+++ b/content/test/data/indexeddb/crbug899446.js
@@ -0,0 +1,171 @@
+// Copyright (c) 2018 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.
+
+class DatabaseUtils {
+  /** Wrap an IndexedDB request into a Promise.
+   *
+   * This should not be used for open().
+   *
+   * @param {IDBRequest} request the request to be wrapped
+   * @returns {Promise<Object>} promise that resolves with the request's result,
+   *     or rejects with an error
+   */
+  static async promiseForRequest(request) {
+    return new Promise((resolve, reject) => {
+      request.onsuccess = event => { resolve(event.target.result); };
+      request.onerror = event => { reject(event.target.error); };
+      request.onblocked = event => {
+        reject(event.target.error ||
+                (new Error("blocked by other database connections")));
+      };
+      request.onupgradeneeded = event => {
+        reject(event.target.error ||
+                (new Error("unexpected upgradeneeded event")));
+      };
+    });
+  }
+
+  /** Wrap an IndexedDB database open request into a Promise.
+   *
+   * This is intended to be used by open().
+   *
+   * @param {IDBOpenDBRequest} request the request to be wrapped
+   * @returns {Promise<{database: idbDatabase, transaction: IDBTransaction?}>}
+   *     promise that resolves with an object whose "database" property is the
+   *     newly opened database; if an upgradeneeded event is received, the
+   *     "transaction" property holds the upgrade transaction
+   */
+  static async promiseForOpenRequest(request) {
+    return new Promise((resolve, reject) => {
+      request.onsuccess = event => {
+        resolve({ database: event.target.result, transaction: null });
+      };
+      request.onerror = event => { reject(event.target.error); };
+      request.onblocked = event => {
+        reject(event.target.error ||
+                (new Error("blocked by other database connections")));
+      };
+      request.onupgradeneeded = event => {
+        resolve({
+          database: event.target.result,
+          transaction: event.target.transaction
+        });
+      };
+    });
+  }
+
+  /** Wrap an IndexedDB transaction into a Promise.
+   *
+   * @param {IDBTransaction} transaction the transaction to be wrapped
+   * @returns {Promise<Object>} promise that resolves with undefined when the
+   *     transaction is completed, or rejects with an error if the transaction
+   *     is aborted or errors out
+   */
+  static async promiseForTransaction(transaction) {
+    return new Promise((resolve, reject) => {
+      transaction.oncomplete = () => { resolve(); };
+      transaction.onabort = event => { reject(event.target.error); };
+      transaction.onerror = event => { reject(event.target.error); };
+    });
+  }
+}
+
+class Database {
+  /** Open a database.
+   *
+   * @param {string} dbName the name of the database to be opened
+   * @return {Promise<Database>} promise that resolves with a new Database
+   *     instance for the open database
+   */
+  static async open(dbName) {
+    const request = indexedDB.open(dbName, 1);
+    const result = await DatabaseUtils.promiseForOpenRequest(request);
+
+    if (result.transaction !== null) {
+      fail("expected db to exist");
+      return;
+    }
+
+    return new Database(dbName, result.database);
+  }
+
+  /** Do not instantiate directly. Use Database.open() instead.
+   *
+   * @param {string} dbName the database's name
+   * @param {IDBDatabase} idbDatabase the IndexedDB instance wrapped by this
+   */
+  constructor(dbName, idbDatabase) {
+    this._dbName = dbName;
+    this._idbDatabase = idbDatabase;
+  }
+
+  /** Closes the underlying database. All future operations will fail. */
+  close() {
+    this._idbDatabase.close();
+  }
+
+  /** Reads from a store by iterating a cursor.
+   *
+   * @param {string} storeName the name of the store being read
+   * @param {{index?: string, range?: IDBKeyRange}} query narrows down the data
+   *     being read
+   * @param {function(IDBCursor): boolean} cursorCallback called for each cursor
+   *     yielded by the iteration; must return a truthy value to continue
+   *     iteration, or a falsey value to stop iterating
+   */
+  async iterateCursor(storeName, query, cursorCallback) {
+    const transaction = this._idbDatabase.transaction([storeName], 'readonly');
+    const transactionPromise = DatabaseUtils.promiseForTransaction(transaction);
+
+    const objectStore = transaction.objectStore(storeName);
+    const dataSource = ('index' in query) ? objectStore.index(query.index)
+                                          : objectStore;
+    const request = ('range' in query) ? dataSource.openCursor(query.range)
+                                        : dataSource.openCursor();
+    while (true) {
+      const cursor = await DatabaseUtils.promiseForRequest(request);
+      if (!cursor)
+        break;  // The iteration completed.
+
+      const willContinue = cursorCallback(cursor);
+      if (!willContinue)
+        break;
+      cursor.continue();
+    }
+
+    await transactionPromise;
+    return true;
+  }
+
+  async read() {
+    const status = document.getElementById('status');
+    status.textContent = 'Started reading items';
+
+    let i = 0;
+    const result = await this.iterateCursor('store', {}, cursor => {
+      i += 1;
+      if (cursor.primaryKey !== i) {
+        status.textContent =
+            `Incorrect primaryKey - wanted ${i} got ${cursor.primaryKey}`;
+        return false;
+      }
+      if (cursor.key !== i) {
+        status.textContent = `Incorrect key - wanted ${i} got ${cursor.key}`;
+        return false;
+      }
+      if (cursor.value.id !== i) {
+        status.textContent =
+            `Incorrect value.id - wanted ${i} got ${cursor.key}`;
+        return false;
+      }
+      return true;
+    });
+    if (!result) {
+      status.textContent = `Failed to read items`;
+      return false;
+    }
+    status.textContent = `Done reading ${i} items`;
+    return true;
+  }
+};
diff --git a/content/test/data/indexeddb/crbug899446/file__0.indexeddb.leveldb/000003.log b/content/test/data/indexeddb/crbug899446/file__0.indexeddb.leveldb/000003.log
new file mode 100644
index 0000000..51c20f2
--- /dev/null
+++ b/content/test/data/indexeddb/crbug899446/file__0.indexeddb.leveldb/000003.log
Binary files differ
diff --git a/content/test/data/indexeddb/crbug899446/file__0.indexeddb.leveldb/CURRENT b/content/test/data/indexeddb/crbug899446/file__0.indexeddb.leveldb/CURRENT
new file mode 100644
index 0000000..7ed683d
--- /dev/null
+++ b/content/test/data/indexeddb/crbug899446/file__0.indexeddb.leveldb/CURRENT
@@ -0,0 +1 @@
+MANIFEST-000001
diff --git a/content/test/data/indexeddb/crbug899446/file__0.indexeddb.leveldb/LOCK b/content/test/data/indexeddb/crbug899446/file__0.indexeddb.leveldb/LOCK
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/content/test/data/indexeddb/crbug899446/file__0.indexeddb.leveldb/LOCK
diff --git a/content/test/data/indexeddb/crbug899446/file__0.indexeddb.leveldb/LOG b/content/test/data/indexeddb/crbug899446/file__0.indexeddb.leveldb/LOG
new file mode 100644
index 0000000..8cc446a
--- /dev/null
+++ b/content/test/data/indexeddb/crbug899446/file__0.indexeddb.leveldb/LOG
@@ -0,0 +1 @@
+2018/11/05-18:36:30.850 27021 Reusing MANIFEST /usr/local/google/home/cmp/co/chromium-latest-linux/user-data-dir/Default/IndexedDB/file__0.indexeddb.leveldb/MANIFEST-000001
diff --git a/content/test/data/indexeddb/crbug899446/file__0.indexeddb.leveldb/MANIFEST-000001 b/content/test/data/indexeddb/crbug899446/file__0.indexeddb.leveldb/MANIFEST-000001
new file mode 100644
index 0000000..3ccb46a
--- /dev/null
+++ b/content/test/data/indexeddb/crbug899446/file__0.indexeddb.leveldb/MANIFEST-000001
Binary files differ
diff --git a/content/test/data/indexeddb/crbug899446_noai.html b/content/test/data/indexeddb/crbug899446_noai.html
new file mode 100644
index 0000000..195b8ebf
--- /dev/null
+++ b/content/test/data/indexeddb/crbug899446_noai.html
@@ -0,0 +1,31 @@
+<html>
+  <head>
+    <title>IndexedDB crbug899446 no autoincrement</title>
+    <script type="text/javascript" src="common.js"></script>
+    <script type="text/javascript" src="crbug899446.js"></script>
+    <script>
+      async function test() {
+        const db = await Database.open('crbug899446');
+        if (!db) {
+          fail("db failed to open");
+          return;
+        }
+
+        try {
+          if (!await db.read()) {
+            fail("db.read() failed");
+            return;
+          }
+        } catch (e) {
+          fail(e);
+          return;
+        }
+
+        done();
+      }
+    </script>
+  </head>
+  <body onLoad="test()">
+    <div id="status">Starting...</div>
+  </body>
+</html>
diff --git a/content/test/data/indexeddb/crbug899446_noai/file__0.indexeddb.leveldb/000003.log b/content/test/data/indexeddb/crbug899446_noai/file__0.indexeddb.leveldb/000003.log
new file mode 100644
index 0000000..8d4a7f40
--- /dev/null
+++ b/content/test/data/indexeddb/crbug899446_noai/file__0.indexeddb.leveldb/000003.log
Binary files differ
diff --git a/content/test/data/indexeddb/crbug899446_noai/file__0.indexeddb.leveldb/CURRENT b/content/test/data/indexeddb/crbug899446_noai/file__0.indexeddb.leveldb/CURRENT
new file mode 100644
index 0000000..7ed683d
--- /dev/null
+++ b/content/test/data/indexeddb/crbug899446_noai/file__0.indexeddb.leveldb/CURRENT
@@ -0,0 +1 @@
+MANIFEST-000001
diff --git a/content/test/data/indexeddb/crbug899446_noai/file__0.indexeddb.leveldb/LOCK b/content/test/data/indexeddb/crbug899446_noai/file__0.indexeddb.leveldb/LOCK
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/content/test/data/indexeddb/crbug899446_noai/file__0.indexeddb.leveldb/LOCK
diff --git a/content/test/data/indexeddb/crbug899446_noai/file__0.indexeddb.leveldb/LOG b/content/test/data/indexeddb/crbug899446_noai/file__0.indexeddb.leveldb/LOG
new file mode 100644
index 0000000..e4df766
--- /dev/null
+++ b/content/test/data/indexeddb/crbug899446_noai/file__0.indexeddb.leveldb/LOG
@@ -0,0 +1 @@
+2018/11/05-18:38:00.286 28064 Reusing MANIFEST /usr/local/google/home/cmp/co/chromium-latest-linux/user-data-dir/Default/IndexedDB/file__0.indexeddb.leveldb/MANIFEST-000001
diff --git a/content/test/data/indexeddb/crbug899446_noai/file__0.indexeddb.leveldb/MANIFEST-000001 b/content/test/data/indexeddb/crbug899446_noai/file__0.indexeddb.leveldb/MANIFEST-000001
new file mode 100644
index 0000000..3ccb46a
--- /dev/null
+++ b/content/test/data/indexeddb/crbug899446_noai/file__0.indexeddb.leveldb/MANIFEST-000001
Binary files differ
diff --git a/content/test/gpu/gpu_tests/webgl_conformance_expectations.py b/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
index 17b4c26a..bb5bd2f 100644
--- a/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
+++ b/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
@@ -686,11 +686,6 @@
         'stencil-renderbuffer-initialization.html',
         ['linux', 'passthrough', 'amd'], bug=794339)
 
-    # Intel
-    # Fixed on Mesa 12.0
-    self.Fail('conformance/rendering/clipping-wide-points.html',
-        ['linux', 'intel'], bug=642822)
-
     # Linux passthrough Intel
     self.Fail('conformance/renderbuffers/' +
         'depth-renderbuffer-initialization.html',
diff --git a/content/test/gpu/gpu_tests/webgl_conformance_integration_test.py b/content/test/gpu/gpu_tests/webgl_conformance_integration_test.py
index 41c88fe8..fb04a11d0 100644
--- a/content/test/gpu/gpu_tests/webgl_conformance_integration_test.py
+++ b/content/test/gpu/gpu_tests/webgl_conformance_integration_test.py
@@ -72,6 +72,7 @@
 
   _webgl_version = None
   _is_asan = False
+  _crash_count = 0
 
   @classmethod
   def Name(cls):
@@ -189,13 +190,19 @@
     getattr(self, test_name)(test_path, *args[1:])
 
   def _NavigateTo(self, test_path, harness_script):
+    self._crash_count = self.browser.GetSystemInfo().gpu \
+        .aux_attributes['process_crash_count']
     url = self.UrlOfStaticFilePath(test_path)
     self.tab.Navigate(url, script_to_evaluate_on_commit=harness_script)
 
   def _CheckTestCompletion(self):
     self.tab.action_runner.WaitForJavaScriptCondition(
         'webglTestHarness._finished', timeout=self._GetTestTimeout())
-    if not self._DidWebGLTestSucceed(self.tab):
+    if self._crash_count != self.browser.GetSystemInfo().gpu \
+        .aux_attributes['process_crash_count']:
+      self.fail('GPU process crashed during test.\n' +
+                self._WebGLTestMessages(self.tab))
+    elif not self._DidWebGLTestSucceed(self.tab):
       self.fail(self._WebGLTestMessages(self.tab))
 
   def _RunConformanceTest(self, test_path, *args):
diff --git a/device/bluetooth/bluetooth_adapter.h b/device/bluetooth/bluetooth_adapter.h
index 5129c45f..a67ca355 100644
--- a/device/bluetooth/bluetooth_adapter.h
+++ b/device/bluetooth/bluetooth_adapter.h
@@ -138,6 +138,19 @@
     virtual void DeviceMTUChanged(BluetoothAdapter* adapter,
                                   BluetoothDevice* device,
                                   uint16_t mtu) {}
+
+    // This function is implemented for ChromeOS only.
+    // Called when advertisement is received from |device|. |eir| is the
+    // extended inquiry response specified in Bluetooth Core Spec, Vol 3,
+    // Part C, Section 11.
+    //
+    // Override this function to observe LE advertisements. Whenever |rssi| of
+    // |device| changes, this function is called with the latest |eir| from
+    // |device|. This function is never called on classic |device|.
+    virtual void DeviceAdvertisementReceived(BluetoothAdapter* adapter,
+                                             BluetoothDevice* device,
+                                             int16_t rssi,
+                                             const std::vector<uint8_t>& eir) {}
 #endif
 
     // Called when the device |device| is removed from the adapter |adapter|,
diff --git a/device/bluetooth/bluez/bluetooth_adapter_bluez.cc b/device/bluetooth/bluez/bluetooth_adapter_bluez.cc
index 3a67b33..81427385 100644
--- a/device/bluetooth/bluez/bluetooth_adapter_bluez.cc
+++ b/device/bluetooth/bluez/bluetooth_adapter_bluez.cc
@@ -683,6 +683,13 @@
   if (property_name == properties->mtu.name())
     NotifyDeviceMTUChanged(device_bluez, properties->mtu.value());
 
+  // We use the RSSI as a proxy for receiving an advertisement because it's
+  // usually updated whenever an advertisement is received.
+  if (property_name == properties->rssi.name() && properties->rssi.is_valid() &&
+      properties->eir.is_valid())
+    NotifyDeviceAdvertisementReceived(device_bluez, properties->rssi.value(),
+                                      properties->eir.value());
+
   if (property_name == properties->services_resolved.name() &&
       properties->services_resolved.value()) {
     device_bluez->UpdateGattServices(object_path);
@@ -1135,6 +1142,16 @@
     observer.DeviceMTUChanged(this, device, mtu);
 }
 
+void BluetoothAdapterBlueZ::NotifyDeviceAdvertisementReceived(
+    BluetoothDeviceBlueZ* device,
+    int16_t rssi,
+    const std::vector<uint8_t>& eir) {
+  DCHECK(device->adapter_ == this);
+
+  for (auto& observer : observers_)
+    observer.DeviceAdvertisementReceived(this, device, rssi, eir);
+}
+
 void BluetoothAdapterBlueZ::UseProfile(
     const BluetoothUUID& uuid,
     const dbus::ObjectPath& device_path,
diff --git a/device/bluetooth/bluez/bluetooth_adapter_bluez.h b/device/bluetooth/bluez/bluetooth_adapter_bluez.h
index 093ed78..7c1cc85 100644
--- a/device/bluetooth/bluez/bluetooth_adapter_bluez.h
+++ b/device/bluetooth/bluez/bluetooth_adapter_bluez.h
@@ -167,6 +167,11 @@
   // Announce to observers MTU change in ATT communication to |device|.
   void NotifyDeviceMTUChanged(BluetoothDeviceBlueZ* device, uint16_t mtu);
 
+  // Announce to observers advertisement received from |device|.
+  void NotifyDeviceAdvertisementReceived(BluetoothDeviceBlueZ* device,
+                                         int16_t rssi,
+                                         const std::vector<uint8_t>& eir);
+
   // Returns the object path of the adapter.
   const dbus::ObjectPath& object_path() const { return object_path_; }
 
diff --git a/device/bluetooth/bluez/bluetooth_bluez_unittest.cc b/device/bluetooth/bluez/bluetooth_bluez_unittest.cc
index af299d8..1c20fe8 100644
--- a/device/bluetooth/bluez/bluetooth_bluez_unittest.cc
+++ b/device/bluetooth/bluez/bluetooth_bluez_unittest.cc
@@ -2399,6 +2399,45 @@
   EXPECT_EQ(2, observer.device_mtu_changed_count());
   EXPECT_EQ(128, observer.last_mtu_value());
 }
+
+TEST_F(BluetoothBlueZTest, DeviceAdvertisementReceived) {
+  // Simulate reception of advertisement from a device.
+  GetAdapter();
+
+  fake_bluetooth_device_client_->CreateDevice(
+      dbus::ObjectPath(bluez::FakeBluetoothAdapterClient::kAdapterPath),
+      dbus::ObjectPath(bluez::FakeBluetoothDeviceClient::kLowEnergyPath));
+  BluetoothDevice* device =
+      adapter_->GetDevice(bluez::FakeBluetoothDeviceClient::kLowEnergyAddress);
+  ASSERT_TRUE(device);
+
+  // Install an observer; expect DeviceAdvertisementReceived method to be called
+  // with the EIR and RSSI.
+  TestBluetoothAdapterObserver observer(adapter_);
+
+  bluez::FakeBluetoothDeviceClient::Properties* properties =
+      fake_bluetooth_device_client_->GetProperties(
+          dbus::ObjectPath(bluez::FakeBluetoothDeviceClient::kLowEnergyPath));
+  ASSERT_EQ(0, observer.device_advertisement_received_count());
+
+  std::vector<uint8_t> eir = {0x01, 0x02, 0x03};
+  properties->eir.ReplaceValue(eir);
+  properties->rssi.ReplaceValue(-73);
+
+  properties->rssi.set_valid(true);
+  properties->NotifyPropertyChanged(properties->rssi.name());
+  EXPECT_EQ(0, observer.device_advertisement_received_count());  // EIR invalid
+
+  properties->eir.set_valid(true);
+  properties->rssi.set_valid(false);
+  properties->NotifyPropertyChanged(properties->rssi.name());
+  EXPECT_EQ(0, observer.device_advertisement_received_count());  // RSSI invalid
+
+  properties->rssi.set_valid(true);
+  properties->NotifyPropertyChanged(properties->rssi.name());
+  EXPECT_EQ(1, observer.device_advertisement_received_count());
+  EXPECT_EQ(eir, observer.device_eir());
+}
 #endif
 
 TEST_F(BluetoothBlueZTest, DeviceUuidsChanged) {
diff --git a/device/bluetooth/dbus/bluetooth_device_client.cc b/device/bluetooth/dbus/bluetooth_device_client.cc
index 11ceed8b..939f9f8 100644
--- a/device/bluetooth/dbus/bluetooth_device_client.cc
+++ b/device/bluetooth/dbus/bluetooth_device_client.cc
@@ -209,6 +209,7 @@
   RegisterProperty(bluetooth_device::kAdvertisingDataFlagsProperty,
                    &advertising_data_flags);
   RegisterProperty(bluetooth_device::kMTUProperty, &mtu);
+  RegisterProperty(bluetooth_device::kEIRProperty, &eir);
 }
 
 BluetoothDeviceClient::Properties::~Properties() = default;
diff --git a/device/bluetooth/dbus/bluetooth_device_client.h b/device/bluetooth/dbus/bluetooth_device_client.h
index a59f424..83f6e7f9 100644
--- a/device/bluetooth/dbus/bluetooth_device_client.h
+++ b/device/bluetooth/dbus/bluetooth_device_client.h
@@ -126,6 +126,9 @@
     // The MTU used in ATT communication with the remote device. Read-only.
     dbus::Property<uint16_t> mtu;
 
+    // The EIR advertised by the remote device. Read-only.
+    dbus::Property<std::vector<uint8_t>> eir;
+
     Properties(dbus::ObjectProxy* object_proxy,
                const std::string& interface_name,
                const PropertyChangedCallback& callback);
diff --git a/device/bluetooth/test/test_bluetooth_adapter_observer.cc b/device/bluetooth/test/test_bluetooth_adapter_observer.cc
index b337ed1..d44a7eb 100644
--- a/device/bluetooth/test/test_bluetooth_adapter_observer.cc
+++ b/device/bluetooth/test/test_bluetooth_adapter_observer.cc
@@ -42,6 +42,8 @@
   device_new_paired_status_ = false;
   device_mtu_changed_count_ = 0;
   device_mtu_ = 0;
+  device_advertisement_received_count_ = 0;
+  device_eir_.clear();
 #endif
   device_removed_count_ = 0;
   last_device_ = NULL;
@@ -158,6 +160,18 @@
 
   QuitMessageLoop();
 }
+
+void TestBluetoothAdapterObserver::DeviceAdvertisementReceived(
+    device::BluetoothAdapter* adapter,
+    device::BluetoothDevice* device,
+    int16_t rssi,
+    const std::vector<uint8_t>& eir) {
+  ++device_advertisement_received_count_;
+  last_device_ = device;
+  device_eir_ = eir;
+
+  QuitMessageLoop();
+}
 #endif
 
 void TestBluetoothAdapterObserver::DeviceRemoved(BluetoothAdapter* adapter,
diff --git a/device/bluetooth/test/test_bluetooth_adapter_observer.h b/device/bluetooth/test/test_bluetooth_adapter_observer.h
index 7edb671..bc325885 100644
--- a/device/bluetooth/test/test_bluetooth_adapter_observer.h
+++ b/device/bluetooth/test/test_bluetooth_adapter_observer.h
@@ -45,6 +45,10 @@
   void DeviceMTUChanged(device::BluetoothAdapter* adapter,
                         device::BluetoothDevice* device,
                         uint16_t mtu) override;
+  void DeviceAdvertisementReceived(device::BluetoothAdapter* adapter,
+                                   device::BluetoothDevice* device,
+                                   int16_t rssi,
+                                   const std::vector<uint8_t>& eir) override;
 #endif
   void DeviceRemoved(BluetoothAdapter* adapter,
                      BluetoothDevice* device) override;
@@ -102,6 +106,10 @@
   bool device_new_paired_status() const { return device_new_paired_status_; }
   int device_mtu_changed_count() const { return device_mtu_changed_count_; }
   uint16_t last_mtu_value() const { return device_mtu_; }
+  int device_advertisement_received_count() const {
+    return device_advertisement_received_count_;
+  }
+  const std::vector<uint8_t>& device_eir() const { return device_eir_; }
 #endif
   int device_removed_count() const { return device_removed_count_; }
   BluetoothDevice* last_device() const { return last_device_; }
@@ -187,6 +195,8 @@
   bool device_new_paired_status_;
   int device_mtu_changed_count_;
   uint16_t device_mtu_;
+  int device_advertisement_received_count_;
+  std::vector<uint8_t> device_eir_;
 #endif
   int device_removed_count_;
   BluetoothDevice* last_device_;
diff --git a/docs/servicification.md b/docs/servicification.md
index 90d4ea2..661e30e 100644
--- a/docs/servicification.md
+++ b/docs/servicification.md
@@ -21,33 +21,34 @@
 ## Questions to Answer When Getting Started
 
 For the basic nuts and bolts of how to create a new service, see [the
-documentation on adding a new service](/services#Adding-a-new-service). This 
-section gives questions that you should answer in order to shape the design of 
-your service, as well as hints as to which answers make sense given your 
+documentation on adding a new service](/services#Adding-a-new-service). This
+section gives questions that you should answer in order to shape the design of
+your service, as well as hints as to which answers make sense given your
 situation.
 
 ### Is your service global or per-BrowserContext?
 The Service Manager can either:
 
-- create one service instance per user ID or
+- create one service instance per instance group or
 - field all connection requests for a given service via the same instance
 
 Which of these policies the Service Manager employs is determined by the
 contents of your service manifest: the former is the default, while the latter
 is selected by informing the Service Manager that your service has the
-"instance_sharing" option value set to "shared_instance_across_users"
+"instance_sharing" option value set to "shared_across_instance_groups"
 ([example](https://cs.chromium.org/chromium/src/services/device/manifest.json)).
 
 Service manifests are described in more detail in this
 [document](https://chromium.googlesource.com/chromium/src/+/master/services/service_manager/service_manifests.md).
 
-In practice, there is one user ID per-BrowserContext, so the question becomes:
-Is your Service a global or keyed by BrowserContext?  In considering this
-question, there is one obvious hint: If you are converting per-Profile classes
-(e.g., KeyedServices), then your service is almost certainly going to be
-per-user. More generally, if you envision needing to use *any* state related to
-the user (e.g., you need to store files in the user's home directory), then your
-service should be per-user.
+In practice, there is one instance group per-BrowserContext, so the question
+becomes: Is your Service a global or keyed by BrowserContext?  In considering
+this question, there is one obvious hint: If you are converting per-Profile
+classes (e.g., KeyedServices), then your service is almost certainly going to
+want an instance per BrowserContext. More generally, if you envision needing to
+use *any* state related to the profile (e.g., you need to store files in the
+user's home directory), then your service should have an instance
+per-BrowserContext.
 
 Conversely, your service could be a good fit for being global if it is a utility
 that is unconcerned with the identity of the requesting client (e.g., the [data
@@ -63,16 +64,16 @@
 
 You then have a question: Where should it be embedded? The answer to this
 question hinges on the nature and location of the code that you are converting:
- 
+
 - //content is the obvious choice if you are converting existing //content code
   (e.g., the Device Service). Global services
-  are embedded by [content::ServiceManagerContext](https://cs.chromium.org/chromium/src/content/browser/service_manager/service_manager_context.cc?type=cs&q=CreateDeviceService), 
-  while per-user services are naturally embedded by [content::BrowserContext](https://cs.chromium.org/chromium/src/content/browser/browser_context.cc?type=cs&q=CreateFileService).
+  are embedded by [content::ServiceManagerContext](https://cs.chromium.org/chromium/src/content/browser/service_manager/service_manager_context.cc?type=cs&q=CreateDeviceService),
+  while per-BrowserContext services are naturally embedded by [content::BrowserContext](https://cs.chromium.org/chromium/src/content/browser/browser_context.cc?type=cs&q=CreateFileService).
 
 - If your service is converting existing //chrome code, then you will need
   to embed your service in //chrome rather than //content. Global services
-  are embedded by [ChromeContentBrowserClient](https://cs.chromium.org/chromium/src/chrome/browser/chrome_content_browser_client.cc?type=cs&q=CreateMediaService), 
-  while per-user services are embedded by [ProfileImpl](https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_impl.cc?type=cs&q=CreateIdentityService).
+  are embedded by [ChromeContentBrowserClient](https://cs.chromium.org/chromium/src/chrome/browser/chrome_content_browser_client.cc?type=cs&q=CreateMediaService),
+  while per-Profile services are embedded by [ProfileImpl](https://cs.chromium.org/chromium/src/chrome/browser/profiles/profile_impl.cc?type=cs&q=CreateIdentityService).
 
 - If you are looking to convert all or part of a component (i.e., a feature in
   //components) into a service, the question arises of whether your new service
@@ -125,7 +126,7 @@
 
 These all have tradeoffs:
 
-- The first lets you incrementally validate your API and implementation, but 
+- The first lets you incrementally validate your API and implementation, but
   leaves the service depending on external code for a long period of time.
 - The second can create a self-contained service more quickly, but leaves
   all the existing clients in place as potential cleanup work.
@@ -141,7 +142,7 @@
 ## Platform-Specific Issues
 
 ### Android
-As you servicify code running on Android, you might find that you need to port 
+As you servicify code running on Android, you might find that you need to port
 interfaces that are served in Java. Here is an [example CL](https://codereview.chromium.org/2643713002) that gives a basic
 pattern to follow in doing this.
 
@@ -206,14 +207,14 @@
 public headers (e.g., defining POD structs that are used both by the client and
 by the feature implementation). These dependencies pose a challenge:
 
-- Services should not depend on Blink, as this is a dependency inversion (Blink 
+- Services should not depend on Blink, as this is a dependency inversion (Blink
 is a client of services).
 - However, Blink is very careful about accepting dependencies from Chromium.
 
 To meet this challenge, you have two options:
 
 1. Move the code in question from C++ to mojom (e.g., if it is simple structs).
-2. Move the code into the service's C++ client library, being very explicit 
+2. Move the code into the service's C++ client library, being very explicit
    about its usage by Blink. See [this CL](https://codereview.chromium.org/2415083002) for a basic pattern to follow.
 
 #### Frame-Scoped Connections
@@ -286,10 +287,10 @@
 - In general, as Chromium is moving away from graceful shutdown, the first
   question to analyze is: Do the singletons actually need to be shut down at
   all?
-- If you need to preserve shutdown of the singleton, the naive approach is to 
+- If you need to preserve shutdown of the singleton, the naive approach is to
   move the shutdown of the singleton to the destructor of your service
-- However, you should carefully examine when your service is destroyed compared 
-  to when the previous code was executing, and ensure that any differences 
+- However, you should carefully examine when your service is destroyed compared
+  to when the previous code was executing, and ensure that any differences
   introduced do not impact correctness.
 
 See [this thread](https://groups.google.com/a/chromium.org/forum/#!topic/services-dev/Y9FKZf9n1ls) for more discussion of this issue.
@@ -311,7 +312,7 @@
 - To test service impl behavior, create [service tests](https://codereview.chromium.org/2774783003).
 - To preserve tests of end-to-end behavior (e.g., that when Blink makes a
   request via a Web API in JS, the relevant feature impl receives a connection
-  request), we are planning on introducing the ability to register mock 
+  request), we are planning on introducing the ability to register mock
   implementations with the Service Manager.
 
 To emphasize one very important point: it is in general necessary to leave
diff --git a/extensions/browser/api/declarative_net_request/utils.cc b/extensions/browser/api/declarative_net_request/utils.cc
index dd46806..78f895f 100644
--- a/extensions/browser/api/declarative_net_request/utils.cc
+++ b/extensions/browser/api/declarative_net_request/utils.cc
@@ -354,7 +354,7 @@
   if (identity) {
     data_decoder::SafeJsonParser::ParseBatch(connector, json_contents,
                                              success_callback, error_callback,
-                                             identity->instance());
+                                             identity->instance_id());
   } else {
     data_decoder::SafeJsonParser::Parse(connector, json_contents,
                                         success_callback, error_callback);
diff --git a/extensions/browser/content_hash_fetcher_unittest.cc b/extensions/browser/content_hash_fetcher_unittest.cc
index c5fb75f..4497c85 100644
--- a/extensions/browser/content_hash_fetcher_unittest.cc
+++ b/extensions/browser/content_hash_fetcher_unittest.cc
@@ -62,7 +62,7 @@
   }
 
  private:
-  void CreatedCallback(const scoped_refptr<ContentHash>& content_hash,
+  void CreatedCallback(scoped_refptr<ContentHash> content_hash,
                        bool was_cancelled) {
     if (!reply_task_runner_->RunsTasksInCurrentSequence()) {
       reply_task_runner_->PostTask(
diff --git a/extensions/browser/content_verifier.cc b/extensions/browser/content_verifier.cc
index 12df35e51..6d87b26 100644
--- a/extensions/browser/content_verifier.cc
+++ b/extensions/browser/content_verifier.cc
@@ -114,11 +114,34 @@
 
 }  // namespace
 
+struct ContentVerifier::CacheKey {
+  CacheKey(const ExtensionId& extension_id,
+           const base::Version& version,
+           bool needs_force_missing_computed_hashes_creation)
+      : extension_id(extension_id),
+        version(version),
+        needs_force_missing_computed_hashes_creation(
+            needs_force_missing_computed_hashes_creation) {}
+
+  bool operator<(const CacheKey& other) const {
+    return std::tie(extension_id, version,
+                    needs_force_missing_computed_hashes_creation) <
+           std::tie(other.extension_id, other.version,
+                    other.needs_force_missing_computed_hashes_creation);
+  }
+
+  ExtensionId extension_id;
+  base::Version version;
+  // TODO(lazyboy): This shouldn't be necessary as key. For the common
+  // case, we'd only want to cache successful ContentHash instances regardless
+  // of whether force creation was requested.
+  bool needs_force_missing_computed_hashes_creation = false;
+};
+
 // A class to retrieve ContentHash for ContentVerifier.
 //
 // All public calls originate and terminate on IO, making it suitable for
 // ContentVerifier to cache ContentHash instances easily.
-// TODO(lazyboy): Implement caching.
 //
 // This class makes sure we do not have more than one ContentHash request in
 // flight for a particular version of an extension. If a call to retrieve an
@@ -245,7 +268,7 @@
   using IsCancelledCallback = base::RepeatingCallback<bool(void)>;
 
   static void ForwardToIO(ContentHash::CreatedCallback callback,
-                          const scoped_refptr<ContentHash>& content_hash,
+                          scoped_refptr<ContentHash> content_hash,
                           bool was_cancelled) {
     // If the request was cancelled, then we don't have a corresponding entry
     // for the request in |callback_infos_| anymore.
@@ -278,7 +301,7 @@
 
   void DidReadHash(const CallbackKey& key,
                    const scoped_refptr<IsCancelledChecker>& checker,
-                   const scoped_refptr<ContentHash>& content_hash,
+                   scoped_refptr<ContentHash> content_hash,
                    bool was_cancelled) {
     DCHECK(checker);
     if (was_cancelled ||
@@ -318,7 +341,7 @@
 
   void CompleteDidReadHash(const CallbackKey& key,
                            const scoped_refptr<IsCancelledChecker>& checker,
-                           const scoped_refptr<ContentHash>& content_hash,
+                           scoped_refptr<ContentHash> content_hash,
                            bool was_cancelled) {
     DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
     DCHECK(checker);
@@ -456,6 +479,17 @@
     return;
   }
 
+  CacheKey cache_key(extension_id, extension_version,
+                     force_missing_computed_hashes_creation);
+  auto cache_iter = cache_.find(cache_key);
+  if (cache_iter != cache_.end()) {
+    // Currently, we expect |callback| to be called asynchronously.
+    base::PostTaskWithTraits(
+        FROM_HERE, {content::BrowserThread::IO},
+        base::BindOnce(std::move(callback), cache_iter->second));
+    return;
+  }
+
   ContentHash::ExtensionKey extension_key(extension_id, extension_root,
                                           extension_version,
                                           delegate_->GetPublicKey());
@@ -465,7 +499,9 @@
   // non-nullptr instance of HashHelper.
   GetOrCreateHashHelper()->GetContentHash(
       extension_key, std::move(fetch_params),
-      force_missing_computed_hashes_creation, std::move(callback));
+      force_missing_computed_hashes_creation,
+      base::BindOnce(&ContentVerifier::DidGetContentHash, this, cache_key,
+                     std::move(callback)));
 }
 
 void ContentVerifier::VerifyFailed(const ExtensionId& extension_id,
@@ -555,6 +591,11 @@
   if (shutdown_on_io_)
     return;
   io_data_->RemoveData(extension_id);
+
+  // Remove all possible cache entries for this extension version.
+  cache_.erase(CacheKey(extension_id, extension_version, true));
+  cache_.erase(CacheKey(extension_id, extension_version, false));
+
   HashHelper* hash_helper = GetOrCreateHashHelper();
   if (hash_helper)
     hash_helper->Cancel(extension_id, extension_version);
@@ -600,6 +641,14 @@
       delegate_->GetSignatureFetchUrl(extension_id, extension_version));
 }
 
+void ContentVerifier::DidGetContentHash(
+    const CacheKey& cache_key,
+    ContentHashCallback original_callback,
+    scoped_refptr<const ContentHash> content_hash) {
+  cache_[cache_key] = content_hash;
+  std::move(original_callback).Run(content_hash);
+}
+
 void ContentVerifier::BindURLLoaderFactoryRequestOnUIThread(
     network::mojom::URLLoaderFactoryRequest url_loader_factory_request) {
   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
diff --git a/extensions/browser/content_verifier.h b/extensions/browser/content_verifier.h
index fd1f40ff..24410bd 100644
--- a/extensions/browser/content_verifier.h
+++ b/extensions/browser/content_verifier.h
@@ -77,7 +77,7 @@
                            UnloadedExtensionReason reason) override;
 
   using ContentHashCallback =
-      base::OnceCallback<void(const scoped_refptr<const ContentHash>&)>;
+      base::OnceCallback<void(scoped_refptr<const ContentHash>)>;
 
   // Retrieves ContentHash for an extension through |callback|.
   // Must be called on IO thread.
@@ -110,6 +110,7 @@
 
   void ShutdownOnIO();
 
+  struct CacheKey;
   class HashHelper;
 
   void OnFetchComplete(const scoped_refptr<const ContentHash>& content_hash);
@@ -117,6 +118,10 @@
       const ExtensionId& extension_id,
       const base::Version& extension_version);
 
+  void DidGetContentHash(const CacheKey& cache_key,
+                         ContentHashCallback orig_callback,
+                         scoped_refptr<const ContentHash> content_hash);
+
   // Binds an URLLoaderFactoryRequest on the UI thread.
   void BindURLLoaderFactoryRequestOnUIThread(
       network::mojom::URLLoaderFactoryRequest url_loader_factory_request);
@@ -162,6 +167,8 @@
   std::unique_ptr<HashHelper, content::BrowserThread::DeleteOnIOThread>
       hash_helper_;
 
+  std::map<CacheKey, scoped_refptr<const ContentHash>> cache_;
+
   std::unique_ptr<ContentVerifierDelegate> delegate_;
 
   // For observing the ExtensionRegistry.
diff --git a/extensions/browser/content_verifier/content_hash.h b/extensions/browser/content_verifier/content_hash.h
index 26f4a64..2cc33b70 100644
--- a/extensions/browser/content_verifier/content_hash.h
+++ b/extensions/browser/content_verifier/content_hash.h
@@ -88,7 +88,7 @@
   //   - |was_cancelled| Indicates whether or not the request was cancelled
   //     through |is_cancelled|, while it was being processed.
   using CreatedCallback =
-      base::OnceCallback<void(const scoped_refptr<ContentHash>& hash,
+      base::OnceCallback<void(scoped_refptr<ContentHash> hash,
                               bool was_cancelled)>;
   static void Create(const ExtensionKey& key,
                      FetchParams fetch_params,
diff --git a/extensions/browser/content_verify_job.cc b/extensions/browser/content_verify_job.cc
index e80f6f6..f24d5fc 100644
--- a/extensions/browser/content_verify_job.cc
+++ b/extensions/browser/content_verify_job.cc
@@ -75,7 +75,7 @@
 }
 
 void ContentVerifyJob::DidGetContentHashOnIO(
-    const scoped_refptr<const ContentHash>& content_hash) {
+    scoped_refptr<const ContentHash> content_hash) {
   DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
   base::AutoLock auto_lock(lock_);
   if (g_content_verify_job_test_observer)
diff --git a/extensions/browser/content_verify_job.h b/extensions/browser/content_verify_job.h
index 9a1be99..b91e5e2f 100644
--- a/extensions/browser/content_verify_job.h
+++ b/extensions/browser/content_verify_job.h
@@ -101,7 +101,7 @@
   virtual ~ContentVerifyJob();
   friend class base::RefCountedThreadSafe<ContentVerifyJob>;
 
-  void DidGetContentHashOnIO(const scoped_refptr<const ContentHash>& hash);
+  void DidGetContentHashOnIO(scoped_refptr<const ContentHash> hash);
 
   // Same as BytesRead, but is run without acquiring lock.
   void BytesReadImpl(int count, const char* data);
diff --git a/gpu/command_buffer/client/shared_image_interface.h b/gpu/command_buffer/client/shared_image_interface.h
index df5d499..32d45a9 100644
--- a/gpu/command_buffer/client/shared_image_interface.h
+++ b/gpu/command_buffer/client/shared_image_interface.h
@@ -11,11 +11,13 @@
 #include "gpu/command_buffer/common/sync_token.h"
 
 namespace gfx {
-class Size;
 class ColorSpace;
+class GpuMemoryBuffer;
+class Size;
 }  // namespace gfx
 
 namespace gpu {
+class GpuMemoryBufferManager;
 
 // An interface to create shared images that can be imported into other APIs.
 // This interface is thread-safe and (essentially) stateless. It is asynchronous
@@ -30,8 +32,9 @@
   // |usage| is a combination of |SharedImageUsage| bits that describes which
   // API(s) the image will be used with.
   // Returns a mailbox that can be imported into said APIs using their
-  // corresponding mailbox functions (e.g.
-  // RasterInterface::CreateAndConsumeTexture or
+  // corresponding shared image functions (e.g.
+  // GLES2Interface::CreateAndTexStorage2DSharedImageCHROMIUM) or (deprecated)
+  // mailbox functions (e.g.  RasterInterface::CreateAndConsumeTexture or
   // GLES2Interface::CreateAndConsumeTextureCHROMIUM).
   // The |SharedImageInterface| keeps ownership of the image until
   // |DestroySharedImage| is called or the interface itself is destroyed (e.g.
@@ -41,6 +44,31 @@
                                     const gfx::ColorSpace& color_space,
                                     uint32_t usage) = 0;
 
+  // Creates a shared image out of a GpuMemoryBuffer, using |color_space|.
+  // |usage| is a combination of |SharedImageUsage| bits that describes which
+  // API(s) the image will be used with. Format and size are derived from the
+  // GpuMemoryBuffer. |gpu_memory_buffer_manager| is the manager that created
+  // |gpu_memory_buffer|. If valid, |color_space| will be applied to the shared
+  // image (possibly overwriting the one set on the GpuMemoryBuffer).
+  // Returns a mailbox that can be imported into said APIs using their
+  // corresponding shared image functions (e.g.
+  // GLES2Interface::CreateAndTexStorage2DSharedImageCHROMIUM) or (deprecated)
+  // mailbox functions (e.g.  RasterInterface::CreateAndConsumeTexture or
+  // GLES2Interface::CreateAndConsumeTextureCHROMIUM).
+  // The |SharedImageInterface| keeps ownership of the image until
+  // |DestroySharedImage| is called or the interface itself is destroyed (e.g.
+  // the GPU channel is lost).
+  virtual Mailbox CreateSharedImage(
+      gfx::GpuMemoryBuffer* gpu_memory_buffer,
+      GpuMemoryBufferManager* gpu_memory_buffer_manager,
+      const gfx::ColorSpace& color_space,
+      uint32_t usage) = 0;
+
+  // Updates a shared image after its GpuMemoryBuffer (if any) was modified on
+  // the CPU or through external devices, after |sync_token| has been released.
+  virtual void UpdateSharedImage(const SyncToken& sync_token,
+                                 const Mailbox& mailbox) = 0;
+
   // Destroys the shared image, unregistering its mailbox, after |sync_token|
   // has been released. After this call, the mailbox can't be used to reference
   // the image any more, however if the image was imported into other APIs,
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_textures.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_textures.cc
index 0ad8c37..68d8de47 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_textures.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough_unittest_textures.cc
@@ -56,6 +56,8 @@
 
   void SetCleared() override {}
 
+  void Update() override {}
+
   bool ProduceLegacyMailbox(MailboxManager* mailbox_manager) override {
     return false;
   }
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
index cd00612..ac34e411 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_textures.cc
@@ -3225,6 +3225,8 @@
 
   void SetCleared() override {}
 
+  void Update() override {}
+
   bool ProduceLegacyMailbox(MailboxManager* mailbox_manager) override {
     return false;
   }
diff --git a/gpu/command_buffer/service/shared_image_backing.h b/gpu/command_buffer/service/shared_image_backing.h
index de8548b..779465f 100644
--- a/gpu/command_buffer/service/shared_image_backing.h
+++ b/gpu/command_buffer/service/shared_image_backing.h
@@ -63,6 +63,8 @@
   // unintiailized pixels.
   virtual void SetCleared() = 0;
 
+  virtual void Update() = 0;
+
   // Destroys the underlying backing. Must be called before destruction.
   virtual void Destroy() = 0;
 
diff --git a/gpu/command_buffer/service/shared_image_backing_factory.h b/gpu/command_buffer/service/shared_image_backing_factory.h
index a2ddef5..f1ae9af 100644
--- a/gpu/command_buffer/service/shared_image_backing_factory.h
+++ b/gpu/command_buffer/service/shared_image_backing_factory.h
@@ -8,6 +8,9 @@
 #include <memory>
 
 #include "components/viz/common/resources/resource_format.h"
+#include "gpu/ipc/common/surface_handle.h"
+#include "ui/gfx/buffer_types.h"
+#include "ui/gfx/gpu_memory_buffer.h"
 
 namespace gfx {
 class Size;
@@ -27,6 +30,15 @@
       const gfx::Size& size,
       const gfx::ColorSpace& color_space,
       uint32_t usage) = 0;
+  virtual std::unique_ptr<SharedImageBacking> CreateSharedImage(
+      const Mailbox& mailbox,
+      int client_id,
+      gfx::GpuMemoryBufferHandle handle,
+      gfx::BufferFormat format,
+      SurfaceHandle surface_handle,
+      const gfx::Size& size,
+      const gfx::ColorSpace& color_space,
+      uint32_t usage) = 0;
 };
 
 }  // namespace gpu
diff --git a/gpu/command_buffer/service/shared_image_backing_factory_ahardwarebuffer.cc b/gpu/command_buffer/service/shared_image_backing_factory_ahardwarebuffer.cc
index d4118e0..2d62405f 100644
--- a/gpu/command_buffer/service/shared_image_backing_factory_ahardwarebuffer.cc
+++ b/gpu/command_buffer/service/shared_image_backing_factory_ahardwarebuffer.cc
@@ -87,6 +87,8 @@
     is_cleared_ = true;
   }
 
+  void Update() override {}
+
   bool ProduceLegacyMailbox(MailboxManager* mailbox_manager) override {
     DCHECK(hardware_buffer_handle_.is_valid());
     if (!GenGLTexture())
@@ -363,4 +365,18 @@
 SharedImageBackingFactoryAHardwareBuffer::FormatInfo::FormatInfo() = default;
 SharedImageBackingFactoryAHardwareBuffer::FormatInfo::~FormatInfo() = default;
 
+std::unique_ptr<SharedImageBacking>
+SharedImageBackingFactoryAHardwareBuffer::CreateSharedImage(
+    const Mailbox& mailbox,
+    int client_id,
+    gfx::GpuMemoryBufferHandle handle,
+    gfx::BufferFormat buffer_format,
+    SurfaceHandle surface_handle,
+    const gfx::Size& size,
+    const gfx::ColorSpace& color_space,
+    uint32_t usage) {
+  NOTIMPLEMENTED();
+  return nullptr;
+}
+
 }  // namespace gpu
diff --git a/gpu/command_buffer/service/shared_image_backing_factory_ahardwarebuffer.h b/gpu/command_buffer/service/shared_image_backing_factory_ahardwarebuffer.h
index b0bb73a9..34b1327c 100644
--- a/gpu/command_buffer/service/shared_image_backing_factory_ahardwarebuffer.h
+++ b/gpu/command_buffer/service/shared_image_backing_factory_ahardwarebuffer.h
@@ -39,6 +39,15 @@
       const gfx::Size& size,
       const gfx::ColorSpace& color_space,
       uint32_t usage) override;
+  std::unique_ptr<SharedImageBacking> CreateSharedImage(
+      const Mailbox& mailbox,
+      int client_id,
+      gfx::GpuMemoryBufferHandle handle,
+      gfx::BufferFormat format,
+      SurfaceHandle surface_handle,
+      const gfx::Size& size,
+      const gfx::ColorSpace& color_space,
+      uint32_t usage) override;
 
  private:
   struct FormatInfo {
diff --git a/gpu/command_buffer/service/shared_image_backing_factory_gl_texture.cc b/gpu/command_buffer/service/shared_image_backing_factory_gl_texture.cc
index 4b5f5fd..6ea999b7 100644
--- a/gpu/command_buffer/service/shared_image_backing_factory_gl_texture.cc
+++ b/gpu/command_buffer/service/shared_image_backing_factory_gl_texture.cc
@@ -25,10 +25,66 @@
 #include "ui/gfx/geometry/size.h"
 #include "ui/gl/gl_bindings.h"
 #include "ui/gl/gl_gl_api_implementation.h"
+#include "ui/gl/gl_image_shared_memory.h"
 #include "ui/gl/gl_version_info.h"
 #include "ui/gl/trace_util.h"
 
 namespace gpu {
+
+namespace {
+
+class ScopedRestoreTexture {
+ public:
+  ScopedRestoreTexture(gl::GLApi* api, GLenum target)
+      : api_(api), target_(target) {
+    GLenum get_target = GL_TEXTURE_BINDING_2D;
+    switch (target) {
+      case GL_TEXTURE_2D:
+        get_target = GL_TEXTURE_BINDING_2D;
+        break;
+      case GL_TEXTURE_RECTANGLE_ARB:
+        get_target = GL_TEXTURE_BINDING_RECTANGLE_ARB;
+        break;
+      case GL_TEXTURE_EXTERNAL_OES:
+        get_target = GL_TEXTURE_BINDING_EXTERNAL_OES;
+        break;
+      default:
+        NOTREACHED();
+        break;
+    }
+    GLint old_texture_binding = 0;
+    api->glGetIntegervFn(get_target, &old_texture_binding);
+    old_binding_ = old_texture_binding;
+  }
+
+  ~ScopedRestoreTexture() { api_->glBindTextureFn(target_, old_binding_); }
+
+ private:
+  gl::GLApi* api_;
+  GLenum target_;
+  GLuint old_binding_ = 0;
+  DISALLOW_COPY_AND_ASSIGN(ScopedRestoreTexture);
+};
+
+GLuint MakeTextureAndSetParameters(gl::GLApi* api,
+                                   GLenum target,
+                                   bool framebuffer_attachment_angle) {
+  GLuint service_id = 0;
+  api->glGenTexturesFn(1, &service_id);
+  api->glBindTextureFn(target, service_id);
+  api->glTexParameteriFn(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+  api->glTexParameteriFn(target, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+  api->glTexParameteriFn(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
+  api->glTexParameteriFn(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+  if (framebuffer_attachment_angle) {
+    api->glTexParameteriFn(target, GL_TEXTURE_USAGE_ANGLE,
+                           GL_FRAMEBUFFER_ATTACHMENT_ANGLE);
+  }
+  return service_id;
+}
+
+}  // anonymous namespace
+
 // Representation of a SharedImageBackingGLTexture as a GL Texture.
 class SharedImageRepresentationGLTextureImpl
     : public SharedImageRepresentationGLTexture {
@@ -172,6 +228,24 @@
     texture_->SetLevelCleared(texture_->target(), 0, true);
   }
 
+  void Update() override {
+    GLenum target = texture_->target();
+    gl::GLApi* api = gl::g_current_gl_context;
+    ScopedRestoreTexture scoped_restore(api, target);
+    api->glBindTextureFn(target, texture_->service_id());
+
+    gles2::Texture::ImageState old_state = gles2::Texture::UNBOUND;
+    gl::GLImage* image = texture_->GetLevelImage(target, 0, &old_state);
+    if (!image)
+      return;
+    image->ReleaseTexImage(target);
+    gles2::Texture::ImageState new_state = gles2::Texture::UNBOUND;
+    if (image->BindTexImage(target))
+      new_state = gles2::Texture::BOUND;
+    if (old_state != new_state)
+      texture_->SetLevelImage(target, 0, image, new_state);
+  }
+
   bool ProduceLegacyMailbox(MailboxManager* mailbox_manager) override {
     DCHECK(texture_);
     mailbox_manager->ProduceTexture(mailbox(), texture_);
@@ -258,6 +332,20 @@
   bool IsCleared() const override { return is_cleared_; }
   void SetCleared() override { is_cleared_ = true; }
 
+  void Update() override {
+    GLenum target = texture_passthrough_->target();
+    gl::GLApi* api = gl::g_current_gl_context;
+    ScopedRestoreTexture scoped_restore(api, target);
+    api->glBindTextureFn(target, texture_passthrough_->service_id());
+
+    gl::GLImage* image = texture_passthrough_->GetLevelImage(target, 0);
+    if (!image)
+      return;
+    image->ReleaseTexImage(target);
+    if (!image->BindTexImage(target))
+      image->CopyTexImage(target);
+  }
+
   bool ProduceLegacyMailbox(MailboxManager* mailbox_manager) override {
     DCHECK(texture_passthrough_);
     mailbox_manager->ProduceTexture(mailbox(), texture_passthrough_.get());
@@ -314,6 +402,8 @@
       new gles2::FeatureInfo(workarounds, gpu_feature_info);
   feature_info->Initialize(ContextType::CONTEXT_TYPE_OPENGLES2,
                            use_passthrough_, gles2::DisallowedFeatures());
+  gpu_memory_buffer_formats_ =
+      feature_info->feature_flags().gpu_memory_buffer_formats;
   texture_usage_angle_ = feature_info->feature_flags().angle_texture_usage;
   es3_capable_ = feature_info->IsES3Capable();
   bool enable_texture_storage =
@@ -421,60 +511,30 @@
 
   GLenum target = use_buffer ? format_info.target_for_scanout : GL_TEXTURE_2D;
 
-  GLenum get_target = GL_TEXTURE_BINDING_2D;
-  switch (target) {
-    case GL_TEXTURE_2D:
-      get_target = GL_TEXTURE_BINDING_2D;
-      break;
-    case GL_TEXTURE_RECTANGLE_ARB:
-      get_target = GL_TEXTURE_BINDING_RECTANGLE_ARB;
-      break;
-    case GL_TEXTURE_EXTERNAL_OES:
-      get_target = GL_TEXTURE_BINDING_EXTERNAL_OES;
-      break;
-    default:
-      NOTREACHED();
-      break;
-  }
-
   gl::GLApi* api = gl::g_current_gl_context;
-  GLuint service_id = 0;
-  api->glGenTexturesFn(1, &service_id);
-  GLint old_texture_binding = 0;
-  api->glGetIntegervFn(get_target, &old_texture_binding);
-  api->glBindTextureFn(target, service_id);
-  api->glTexParameteriFn(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-  api->glTexParameteriFn(target, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-  api->glTexParameteriFn(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-  api->glTexParameteriFn(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+  ScopedRestoreTexture scoped_restore(api, target);
 
   const bool for_framebuffer_attachment =
       (usage & (SHARED_IMAGE_USAGE_RASTER |
                 SHARED_IMAGE_USAGE_GLES2_FRAMEBUFFER_HINT)) != 0;
-  if (for_framebuffer_attachment && texture_usage_angle_) {
-    api->glTexParameteriFn(target, GL_TEXTURE_USAGE_ANGLE,
-                           GL_FRAMEBUFFER_ATTACHMENT_ANGLE);
-  }
+  GLuint service_id = MakeTextureAndSetParameters(
+      api, target, for_framebuffer_attachment && texture_usage_angle_);
 
-  gfx::Rect cleared_rect;
   scoped_refptr<gl::GLImage> image;
   // TODO(piman): We pretend the texture was created in an ES2 context, so that
   // it can be used in other ES2 contexts, and so we have to pass gl_format as
   // the internal format in the LevelInfo. https://crbug.com/628064
   GLuint level_info_internal_format = format_info.gl_format;
+  bool is_cleared = false;
   if (use_buffer) {
-    bool is_cleared = false;
     image = image_factory_->CreateAnonymousImage(
         size, format_info.buffer_format, gfx::BufferUsage::SCANOUT,
         &is_cleared);
     if (!image || !image->BindTexImage(target)) {
       LOG(ERROR) << "CreateSharedImage: Failed to create image";
-      api->glBindTextureFn(target, old_texture_binding);
       api->glDeleteTexturesFn(1, &service_id);
       return nullptr;
     }
-    if (is_cleared)
-      cleared_rect = gfx::Rect(size);
     level_info_internal_format = image->GetInternalFormat();
     if (color_space.IsValid())
       image->SetColorSpace(color_space);
@@ -500,13 +560,127 @@
       api->glBindBufferFn(GL_PIXEL_UNPACK_BUFFER, bound_pixel_unpack_buffer);
   }
 
+  return MakeBacking(mailbox, target, service_id, image, gles2::Texture::BOUND,
+                     level_info_internal_format, format_info.gl_format,
+                     format_info.gl_type, format_info.swizzle, is_cleared,
+                     format, size, color_space, usage);
+}
+
+std::unique_ptr<SharedImageBacking>
+SharedImageBackingFactoryGLTexture::CreateSharedImage(
+    const Mailbox& mailbox,
+    int client_id,
+    gfx::GpuMemoryBufferHandle handle,
+    gfx::BufferFormat buffer_format,
+    SurfaceHandle surface_handle,
+    const gfx::Size& size,
+    const gfx::ColorSpace& color_space,
+    uint32_t usage) {
+  if (!gpu_memory_buffer_formats_.Has(buffer_format)) {
+    LOG(ERROR) << "CreateSharedImage: unsupported buffer format";
+    return nullptr;
+  }
+
+  if (!gpu::IsImageSizeValidForGpuMemoryBufferFormat(size, buffer_format)) {
+    LOG(ERROR) << "Invalid image size for format.";
+    return nullptr;
+  }
+
+  GLenum target = handle.type == gfx::SHARED_MEMORY_BUFFER
+                      ? GL_TEXTURE_2D
+                      : gpu::GetPlatformSpecificTextureTarget();
+  scoped_refptr<gl::GLImage> image = MakeGLImage(
+      client_id, std::move(handle), buffer_format, surface_handle, size);
+  if (!image) {
+    LOG(ERROR) << "Failed to create image.";
+    return nullptr;
+  }
+  if (color_space.IsValid())
+    image->SetColorSpace(color_space);
+
+  viz::ResourceFormat format = viz::GetResourceFormat(buffer_format);
+
+  gl::GLApi* api = gl::g_current_gl_context;
+  ScopedRestoreTexture scoped_restore(api, target);
+
+  const bool for_framebuffer_attachment =
+      (usage & (SHARED_IMAGE_USAGE_RASTER |
+                SHARED_IMAGE_USAGE_GLES2_FRAMEBUFFER_HINT)) != 0;
+  GLuint service_id = MakeTextureAndSetParameters(
+      api, target, for_framebuffer_attachment && texture_usage_angle_);
+
+  // TODO(piman): RGB emulation
+  gles2::Texture::ImageState image_state = gles2::Texture::UNBOUND;
+  if (image->BindTexImage(target)) {
+    image_state = gles2::Texture::BOUND;
+  } else if (use_passthrough_) {
+    image->CopyTexImage(target);
+    image_state = gles2::Texture::COPIED;
+  }
+
+  // TODO(piman): this is consistent with
+  // GLES2DecoderImpl::BindTexImage2DCHROMIUMImpl or
+  // RasterDecoderImpl::DoBindTexImage2DCHROMIUM but seems wrong:
+  //
+  // - internalformat might be sized, which is wrong for format
+  // - gl_type shouldn't be GL_UNSIGNED_BYTE for RGBA4444 for example.
+  GLuint internal_format = image->GetInternalFormat();
+  GLenum gl_format = internal_format;
+  GLenum gl_type = GL_UNSIGNED_BYTE;
+
+  return MakeBacking(mailbox, target, service_id, image, image_state,
+                     internal_format, gl_format, gl_type, nullptr, true, format,
+                     size, color_space, usage);
+}
+
+scoped_refptr<gl::GLImage> SharedImageBackingFactoryGLTexture::MakeGLImage(
+    int client_id,
+    gfx::GpuMemoryBufferHandle handle,
+    gfx::BufferFormat format,
+    SurfaceHandle surface_handle,
+    const gfx::Size& size) {
+  if (!image_factory_)
+    return nullptr;
+  switch (handle.type) {
+    case gfx::SHARED_MEMORY_BUFFER: {
+      if (!base::IsValueInRangeForNumericType<size_t>(handle.stride))
+        return nullptr;
+      auto image = base::MakeRefCounted<gl::GLImageSharedMemory>(size);
+      if (!image->Initialize(handle.region, handle.id, format, handle.offset,
+                             handle.stride)) {
+        return nullptr;
+      }
+
+      return image;
+    }
+    default:
+      return image_factory_->CreateImageForGpuMemoryBuffer(
+          std::move(handle), size, format, client_id, surface_handle);
+  }
+}
+
+std::unique_ptr<SharedImageBacking>
+SharedImageBackingFactoryGLTexture::MakeBacking(
+    const Mailbox& mailbox,
+    GLenum target,
+    GLuint service_id,
+    scoped_refptr<gl::GLImage> image,
+    gles2::Texture::ImageState image_state,
+    GLuint level_info_internal_format,
+    GLuint gl_format,
+    GLuint gl_type,
+    const gles2::Texture::CompatibilitySwizzle* swizzle,
+    bool is_cleared,
+    viz::ResourceFormat format,
+    const gfx::Size& size,
+    const gfx::ColorSpace& color_space,
+    uint32_t usage) {
   // Calculate |driver_internal_format| here rather than caching on
   // format_info, as we need to use the |level_info_internal_format| which may
   // depend on the generated |image|.
   GLenum driver_internal_format =
       gl::GetInternalFormat(gl::GLContext::GetCurrent()->GetVersionInfo(),
                             level_info_internal_format);
-  std::unique_ptr<SharedImageBacking> backing;
   if (use_passthrough_) {
     scoped_refptr<gles2::TexturePassthrough> passthrough_texture =
         base::MakeRefCounted<gles2::TexturePassthrough>(service_id, target);
@@ -515,11 +689,12 @@
 
     // Get the texture size from ANGLE and set it on the passthrough texture.
     GLint texture_memory_size = 0;
+    gl::GLApi* api = gl::g_current_gl_context;
     api->glGetTexParameterivFn(target, GL_MEMORY_SIZE_ANGLE,
                                &texture_memory_size);
     passthrough_texture->SetEstimatedSize(texture_memory_size);
 
-    backing = std::make_unique<SharedImageBackingPassthroughGLTexture>(
+    return std::make_unique<SharedImageBackingPassthroughGLTexture>(
         mailbox, format, size, color_space, usage,
         std::move(passthrough_texture), level_info_internal_format,
         driver_internal_format);
@@ -532,20 +707,18 @@
     texture->sampler_state_.wrap_s = GL_CLAMP_TO_EDGE;
     texture->sampler_state_.wrap_t = GL_CLAMP_TO_EDGE;
     texture->SetLevelInfo(target, 0, level_info_internal_format, size.width(),
-                          size.height(), 1, 0, format_info.gl_format,
-                          format_info.gl_type, cleared_rect);
-    if (format_info.swizzle)
-      texture->SetCompatibilitySwizzle(format_info.swizzle);
+                          size.height(), 1, 0, gl_format, gl_type,
+                          is_cleared ? gfx::Rect(size) : gfx::Rect());
+    if (swizzle)
+      texture->SetCompatibilitySwizzle(swizzle);
     if (image)
-      texture->SetLevelImage(target, 0, image.get(), gles2::Texture::BOUND);
+      texture->SetLevelImage(target, 0, image.get(), image_state);
     texture->SetImmutable(true);
-    backing = std::make_unique<SharedImageBackingGLTexture>(
+
+    return std::make_unique<SharedImageBackingGLTexture>(
         mailbox, format, size, color_space, usage, texture,
         level_info_internal_format, driver_internal_format);
   }
-
-  api->glBindTextureFn(target, old_texture_binding);
-  return backing;
 }
 
 SharedImageBackingFactoryGLTexture::FormatInfo::FormatInfo() = default;
diff --git a/gpu/command_buffer/service/shared_image_backing_factory_gl_texture.h b/gpu/command_buffer/service/shared_image_backing_factory_gl_texture.h
index c12f071..d41fbfa 100644
--- a/gpu/command_buffer/service/shared_image_backing_factory_gl_texture.h
+++ b/gpu/command_buffer/service/shared_image_backing_factory_gl_texture.h
@@ -48,8 +48,37 @@
       const gfx::Size& size,
       const gfx::ColorSpace& color_space,
       uint32_t usage) override;
+  std::unique_ptr<SharedImageBacking> CreateSharedImage(
+      const Mailbox& mailbox,
+      int client_id,
+      gfx::GpuMemoryBufferHandle handle,
+      gfx::BufferFormat format,
+      SurfaceHandle surface_handle,
+      const gfx::Size& size,
+      const gfx::ColorSpace& color_space,
+      uint32_t usage) override;
 
  private:
+  scoped_refptr<gl::GLImage> MakeGLImage(int client_id,
+                                         gfx::GpuMemoryBufferHandle handle,
+                                         gfx::BufferFormat format,
+                                         SurfaceHandle surface_handle,
+                                         const gfx::Size& size);
+  std::unique_ptr<SharedImageBacking> MakeBacking(
+      const Mailbox& mailbox,
+      GLenum target,
+      GLuint service_id,
+      scoped_refptr<gl::GLImage> image,
+      gles2::Texture::ImageState image_state,
+      GLuint internal_format,
+      GLuint gl_format,
+      GLuint gl_type,
+      const gles2::Texture::CompatibilitySwizzle* swizzle,
+      bool is_cleared,
+      viz::ResourceFormat format,
+      const gfx::Size& size,
+      const gfx::ColorSpace& color_space,
+      uint32_t usage);
   struct FormatInfo {
     FormatInfo();
     ~FormatInfo();
@@ -89,6 +118,7 @@
   ImageFactory* image_factory_ = nullptr;
 
   FormatInfo format_info_[viz::RESOURCE_FORMAT_MAX + 1];
+  GpuMemoryBufferFormatSet gpu_memory_buffer_formats_;
   int32_t max_texture_size_ = 0;
   bool texture_usage_angle_ = false;
   bool es3_capable_ = false;
diff --git a/gpu/command_buffer/service/shared_image_backing_factory_gl_texture_unittest.cc b/gpu/command_buffer/service/shared_image_backing_factory_gl_texture_unittest.cc
index 603e85f..4e47570 100644
--- a/gpu/command_buffer/service/shared_image_backing_factory_gl_texture_unittest.cc
+++ b/gpu/command_buffer/service/shared_image_backing_factory_gl_texture_unittest.cc
@@ -22,19 +22,23 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/skia/include/core/SkSurface.h"
 #include "third_party/skia/include/gpu/GrBackendSurface.h"
+#include "ui/gfx/buffer_format_util.h"
 #include "ui/gfx/color_space.h"
 #include "ui/gl/gl_bindings.h"
 #include "ui/gl/gl_context.h"
+#include "ui/gl/gl_image_shared_memory.h"
+#include "ui/gl/gl_image_stub.h"
 #include "ui/gl/gl_surface.h"
 #include "ui/gl/init/gl_factory.h"
 
 namespace gpu {
 namespace {
 
-class SharedImageBackingFactoryGLTextureTest
+class SharedImageBackingFactoryGLTextureTestBase
     : public testing::TestWithParam<bool> {
  public:
-  void SetUp() override {
+  void SetUpBase(const GpuDriverBugWorkarounds& workarounds,
+                 ImageFactory* factory) {
     surface_ = gl::init::CreateOffscreenGLSurface(gfx::Size());
     ASSERT_TRUE(surface_);
     context_ = gl::init::CreateGLContext(nullptr, surface_.get(),
@@ -45,10 +49,8 @@
 
     GpuPreferences preferences;
     preferences.use_passthrough_cmd_decoder = use_passthrough();
-    GpuDriverBugWorkarounds workarounds;
-    workarounds.max_texture_size = INT_MAX - 1;
     backing_factory_ = std::make_unique<SharedImageBackingFactoryGLTexture>(
-        preferences, workarounds, GpuFeatureInfo(), &image_factory_);
+        preferences, workarounds, GpuFeatureInfo(), factory);
 
     scoped_refptr<gl::GLShareGroup> share_group = new gl::GLShareGroup();
     context_state_ = new raster::RasterDecoderContextState(
@@ -72,7 +74,6 @@
   scoped_refptr<gl::GLSurface> surface_;
   scoped_refptr<gl::GLContext> context_;
   scoped_refptr<raster::RasterDecoderContextState> context_state_;
-  TextureImageFactory image_factory_;
   std::unique_ptr<SharedImageBackingFactoryGLTexture> backing_factory_;
   gles2::MailboxManagerImpl mailbox_manager_;
   SharedImageManager shared_image_manager_;
@@ -81,6 +82,19 @@
       shared_image_representation_factory_;
 };
 
+class SharedImageBackingFactoryGLTextureTest
+    : public SharedImageBackingFactoryGLTextureTestBase {
+ public:
+  void SetUp() override {
+    GpuDriverBugWorkarounds workarounds;
+    workarounds.max_texture_size = INT_MAX - 1;
+    SetUpBase(workarounds, &image_factory_);
+  }
+
+ protected:
+  TextureImageFactory image_factory_;
+};
+
 TEST_P(SharedImageBackingFactoryGLTextureTest, Basic) {
   auto mailbox = Mailbox::Generate();
   auto format = viz::ResourceFormat::RGBA_8888;
@@ -330,9 +344,160 @@
   shared_image.reset();
 }
 
+class StubImage : public gl::GLImageStub {
+ public:
+  StubImage(const gfx::Size& size, gfx::BufferFormat format)
+      : size_(size), format_(format) {}
+
+  gfx::Size GetSize() override { return size_; }
+  unsigned GetInternalFormat() override {
+    return InternalFormatForGpuMemoryBufferFormat(format_);
+  }
+
+  bool BindTexImage(unsigned target) override {
+    if (!bound_) {
+      bound_ = true;
+      ++update_counter_;
+    }
+    return true;
+  };
+
+  void ReleaseTexImage(unsigned target) override { bound_ = false; }
+
+  bool bound() const { return bound_; }
+  int update_counter() const { return update_counter_; }
+
+ private:
+  ~StubImage() override = default;
+
+  gfx::Size size_;
+  gfx::BufferFormat format_;
+  bool bound_ = false;
+  int update_counter_ = 0;
+};
+
+class SharedImageBackingFactoryGLTextureWithGMBTest
+    : public SharedImageBackingFactoryGLTextureTestBase,
+      public gpu::ImageFactory {
+ public:
+  void SetUp() override { SetUpBase(GpuDriverBugWorkarounds(), this); }
+
+  scoped_refptr<gl::GLImage> GetImageFromMailbox(Mailbox mailbox) {
+    if (!use_passthrough()) {
+      auto representation =
+          shared_image_representation_factory_->ProduceGLTexture(mailbox);
+      DCHECK(representation);
+      return representation->GetTexture()->GetLevelImage(GL_TEXTURE_2D, 0);
+    } else {
+      auto representation =
+          shared_image_representation_factory_->ProduceGLTexturePassthrough(
+              mailbox);
+      DCHECK(representation);
+      return representation->GetTexturePassthrough()->GetLevelImage(
+          GL_TEXTURE_2D, 0);
+    }
+  }
+
+ protected:
+  // gpu::ImageFactory implementation.
+  scoped_refptr<gl::GLImage> CreateImageForGpuMemoryBuffer(
+      gfx::GpuMemoryBufferHandle handle,
+      const gfx::Size& size,
+      gfx::BufferFormat format,
+      int client_id,
+      gpu::SurfaceHandle surface_handle) override {
+    // pretend to handle NATIVE_PIXMAP types.
+    if (handle.type != gfx::NATIVE_PIXMAP)
+      return nullptr;
+    if (client_id != kClientId)
+      return nullptr;
+    return base::MakeRefCounted<StubImage>(size, format);
+  }
+
+  static constexpr int kClientId = 3;
+};
+
+TEST_P(SharedImageBackingFactoryGLTextureWithGMBTest,
+       GpuMemoryBufferImportEmpty) {
+  auto mailbox = Mailbox::Generate();
+  gfx::Size size(256, 256);
+  gfx::BufferFormat format = gfx::BufferFormat::RGBA_8888;
+  auto color_space = gfx::ColorSpace::CreateSRGB();
+  uint32_t usage = SHARED_IMAGE_USAGE_GLES2;
+
+  gfx::GpuMemoryBufferHandle handle;
+  auto backing = backing_factory_->CreateSharedImage(
+      mailbox, kClientId, std::move(handle), format, kNullSurfaceHandle, size,
+      color_space, usage);
+  EXPECT_FALSE(backing);
+}
+
+TEST_P(SharedImageBackingFactoryGLTextureWithGMBTest,
+       GpuMemoryBufferImportNative) {
+  auto mailbox = Mailbox::Generate();
+  gfx::Size size(256, 256);
+  gfx::BufferFormat format = gfx::BufferFormat::RGBA_8888;
+  auto color_space = gfx::ColorSpace::CreateSRGB();
+  uint32_t usage = SHARED_IMAGE_USAGE_GLES2;
+
+  gfx::GpuMemoryBufferHandle handle;
+  handle.type = gfx::NATIVE_PIXMAP;
+  auto backing = backing_factory_->CreateSharedImage(
+      mailbox, kClientId, std::move(handle), format, kNullSurfaceHandle, size,
+      color_space, usage);
+  ASSERT_TRUE(backing);
+
+  std::unique_ptr<SharedImageRepresentationFactoryRef> ref =
+      shared_image_manager_.Register(std::move(backing),
+                                     memory_type_tracker_.get());
+  scoped_refptr<gl::GLImage> image = GetImageFromMailbox(mailbox);
+  ASSERT_EQ(image->GetType(), gl::GLImage::Type::NONE);
+  auto* stub_image = static_cast<StubImage*>(image.get());
+  EXPECT_TRUE(stub_image->bound());
+  int update_counter = stub_image->update_counter();
+  ref->Update();
+  EXPECT_TRUE(stub_image->bound());
+  EXPECT_GT(stub_image->update_counter(), update_counter);
+}
+
+TEST_P(SharedImageBackingFactoryGLTextureWithGMBTest,
+       GpuMemoryBufferImportSharedMemory) {
+  auto mailbox = Mailbox::Generate();
+  gfx::Size size(256, 256);
+  gfx::BufferFormat format = gfx::BufferFormat::RGBA_8888;
+  auto color_space = gfx::ColorSpace::CreateSRGB();
+  uint32_t usage = SHARED_IMAGE_USAGE_GLES2;
+
+  size_t shm_size = 0u;
+  ASSERT_TRUE(gfx::BufferSizeForBufferFormatChecked(size, format, &shm_size));
+  gfx::GpuMemoryBufferHandle handle;
+  handle.type = gfx::SHARED_MEMORY_BUFFER;
+  handle.region = base::UnsafeSharedMemoryRegion::Create(shm_size);
+  ASSERT_TRUE(handle.region.IsValid());
+  handle.offset = 0;
+  handle.stride = static_cast<int32_t>(
+      gfx::RowSizeForBufferFormat(size.width(), format, 0));
+
+  auto backing = backing_factory_->CreateSharedImage(
+      mailbox, kClientId, std::move(handle), format, kNullSurfaceHandle, size,
+      color_space, usage);
+  ASSERT_TRUE(backing);
+  std::unique_ptr<SharedImageRepresentationFactoryRef> ref =
+      shared_image_manager_.Register(std::move(backing),
+                                     memory_type_tracker_.get());
+  scoped_refptr<gl::GLImage> image = GetImageFromMailbox(mailbox);
+  ASSERT_EQ(image->GetType(), gl::GLImage::Type::MEMORY);
+  auto* shm_image = static_cast<gl::GLImageSharedMemory*>(image.get());
+  EXPECT_EQ(size, shm_image->GetSize());
+  EXPECT_EQ(format, shm_image->format());
+}
+
 INSTANTIATE_TEST_CASE_P(Service,
                         SharedImageBackingFactoryGLTextureTest,
                         ::testing::Bool());
+INSTANTIATE_TEST_CASE_P(Service,
+                        SharedImageBackingFactoryGLTextureWithGMBTest,
+                        ::testing::Bool());
 
 }  // anonymous namespace
 }  // namespace gpu
diff --git a/gpu/command_buffer/service/shared_image_factory.cc b/gpu/command_buffer/service/shared_image_factory.cc
index b5f9b6dd..55eefb67 100644
--- a/gpu/command_buffer/service/shared_image_factory.cc
+++ b/gpu/command_buffer/service/shared_image_factory.cc
@@ -74,12 +74,6 @@
                                            const gfx::Size& size,
                                            const gfx::ColorSpace& color_space,
                                            uint32_t usage) {
-  if (shared_image_manager_->IsSharedImage(mailbox)) {
-    LOG(ERROR) << "CreateSharedImage: mailbox is already associated with a "
-                  "SharedImage";
-    return false;
-  }
-
   std::unique_ptr<SharedImageBacking> backing;
   bool using_wrapped_sk_image = wrapped_sk_image_factory_ &&
                                 (usage & SHARED_IMAGE_USAGE_OOP_RASTERIZATION);
@@ -91,31 +85,40 @@
                                                   color_space, usage);
   }
 
-  if (!backing) {
-    LOG(ERROR) << "CreateSharedImage: could not create backing.";
+  return RegisterBacking(std::move(backing), !using_wrapped_sk_image);
+}
+
+bool SharedImageFactory::CreateSharedImage(const Mailbox& mailbox,
+                                           int client_id,
+                                           gfx::GpuMemoryBufferHandle handle,
+                                           gfx::BufferFormat format,
+                                           SurfaceHandle surface_handle,
+                                           const gfx::Size& size,
+                                           const gfx::ColorSpace& color_space,
+                                           uint32_t usage) {
+  // TODO(piman): depending on handle.type, choose platform-specific backing
+  // factory, e.g. SharedImageBackingFactoryAHardwareBuffer.
+  std::unique_ptr<SharedImageBacking> backing =
+      backing_factory_->CreateSharedImage(mailbox, client_id, std::move(handle),
+                                          format, surface_handle, size,
+                                          color_space, usage);
+  return RegisterBacking(std::move(backing), true);
+}
+
+bool SharedImageFactory::UpdateSharedImage(const Mailbox& mailbox) {
+  auto it = shared_images_.find(mailbox);
+  if (it == shared_images_.end()) {
+    LOG(ERROR) << "UpdateSharedImage: Could not find shared image mailbox";
     return false;
   }
-
-  std::unique_ptr<SharedImageRepresentationFactoryRef> shared_image =
-      shared_image_manager_->Register(std::move(backing),
-                                      memory_tracker_.get());
-
-  // TODO(ericrk): Remove this once no legacy cases remain.
-  if (!using_wrapped_sk_image &&
-      !shared_image->ProduceLegacyMailbox(mailbox_manager_)) {
-    LOG(ERROR) << "CreateSharedImage: could not convert shared_image to legacy "
-                  "mailbox.";
-    return false;
-  }
-
-  shared_images_.emplace(std::move(shared_image));
+  (*it)->Update();
   return true;
 }
 
 bool SharedImageFactory::DestroySharedImage(const Mailbox& mailbox) {
   auto it = shared_images_.find(mailbox);
   if (it == shared_images_.end()) {
-    LOG(ERROR) << "Could not find shared image mailbox";
+    LOG(ERROR) << "DestroySharedImage: Could not find shared image mailbox";
     return false;
   }
   shared_images_.erase(it);
@@ -144,6 +147,37 @@
   return true;
 }
 
+bool SharedImageFactory::RegisterBacking(
+    std::unique_ptr<SharedImageBacking> backing,
+    bool legacy_mailbox) {
+  if (!backing) {
+    LOG(ERROR) << "CreateSharedImage: could not create backing.";
+    return false;
+  }
+
+  Mailbox mailbox = backing->mailbox();
+  if (shared_image_manager_->IsSharedImage(mailbox)) {
+    LOG(ERROR) << "CreateSharedImage: mailbox is already associated with a "
+                  "SharedImage";
+    backing->Destroy();
+    return false;
+  }
+
+  std::unique_ptr<SharedImageRepresentationFactoryRef> shared_image =
+      shared_image_manager_->Register(std::move(backing),
+                                      memory_tracker_.get());
+
+  // TODO(ericrk): Remove this once no legacy cases remain.
+  if (legacy_mailbox && !shared_image->ProduceLegacyMailbox(mailbox_manager_)) {
+    LOG(ERROR) << "CreateSharedImage: could not convert shared_image to legacy "
+                  "mailbox.";
+    return false;
+  }
+
+  shared_images_.emplace(std::move(shared_image));
+  return true;
+}
+
 SharedImageRepresentationFactory::SharedImageRepresentationFactory(
     SharedImageManager* manager,
     MemoryTracker* tracker)
diff --git a/gpu/command_buffer/service/shared_image_factory.h b/gpu/command_buffer/service/shared_image_factory.h
index b87393d..78c7933 100644
--- a/gpu/command_buffer/service/shared_image_factory.h
+++ b/gpu/command_buffer/service/shared_image_factory.h
@@ -14,7 +14,9 @@
 #include "gpu/command_buffer/service/shared_image_manager.h"
 #include "gpu/command_buffer/service/texture_manager.h"
 #include "gpu/gpu_gles2_export.h"
+#include "gpu/ipc/common/surface_handle.h"
 #include "ui/gfx/buffer_types.h"
+#include "ui/gfx/gpu_memory_buffer.h"
 #include "ui/gl/gl_bindings.h"
 
 namespace gpu {
@@ -50,6 +52,15 @@
                          const gfx::Size& size,
                          const gfx::ColorSpace& color_space,
                          uint32_t usage);
+  bool CreateSharedImage(const Mailbox& mailbox,
+                         int client_id,
+                         gfx::GpuMemoryBufferHandle handle,
+                         gfx::BufferFormat format,
+                         SurfaceHandle surface_handle,
+                         const gfx::Size& size,
+                         const gfx::ColorSpace& color_space,
+                         uint32_t usage);
+  bool UpdateSharedImage(const Mailbox& mailbox);
   bool DestroySharedImage(const Mailbox& mailbox);
   bool HasImages() const { return !shared_images_.empty(); }
   void DestroyAllSharedImages(bool have_context);
@@ -59,6 +70,8 @@
                     uint64_t client_tracing_id);
 
  private:
+  bool RegisterBacking(std::unique_ptr<SharedImageBacking> backing,
+                       bool legacy_mailbox);
   MailboxManager* mailbox_manager_;
   SharedImageManager* shared_image_manager_;
   std::unique_ptr<MemoryTypeTracker> memory_tracker_;
diff --git a/gpu/command_buffer/service/shared_image_manager_unittest.cc b/gpu/command_buffer/service/shared_image_manager_unittest.cc
index 7c16b49..277b048c 100644
--- a/gpu/command_buffer/service/shared_image_manager_unittest.cc
+++ b/gpu/command_buffer/service/shared_image_manager_unittest.cc
@@ -58,6 +58,7 @@
 
   MOCK_CONST_METHOD0(IsCleared, bool());
   MOCK_METHOD0(SetCleared, void());
+  MOCK_METHOD0(Update, void());
   MOCK_METHOD0(Destroy, void());
   MOCK_METHOD1(ProduceLegacyMailbox, bool(MailboxManager*));
 
diff --git a/gpu/command_buffer/service/shared_image_representation.h b/gpu/command_buffer/service/shared_image_representation.h
index 8fa0195..561b505 100644
--- a/gpu/command_buffer/service/shared_image_representation.h
+++ b/gpu/command_buffer/service/shared_image_representation.h
@@ -60,6 +60,7 @@
       : SharedImageRepresentation(manager, backing, tracker) {}
 
   const Mailbox& mailbox() const { return backing()->mailbox(); }
+  void Update() { backing()->Update(); }
   bool ProduceLegacyMailbox(MailboxManager* mailbox_manager) {
     return backing()->ProduceLegacyMailbox(mailbox_manager);
   }
diff --git a/gpu/command_buffer/service/wrapped_sk_image.cc b/gpu/command_buffer/service/wrapped_sk_image.cc
index 312772c..356fdfe1d 100644
--- a/gpu/command_buffer/service/wrapped_sk_image.cc
+++ b/gpu/command_buffer/service/wrapped_sk_image.cc
@@ -50,6 +50,8 @@
 
   void SetCleared() override { cleared_ = true; }
 
+  void Update() override {}
+
   void OnMemoryDump(const std::string& dump_name,
                     base::trace_event::MemoryAllocatorDump* dump,
                     base::trace_event::ProcessMemoryDump* pmd,
@@ -233,6 +235,19 @@
   return texture;
 }
 
+std::unique_ptr<SharedImageBacking> WrappedSkImageFactory::CreateSharedImage(
+    const Mailbox& mailbox,
+    int client_id,
+    gfx::GpuMemoryBufferHandle handle,
+    gfx::BufferFormat buffer_format,
+    SurfaceHandle surface_handle,
+    const gfx::Size& size,
+    const gfx::ColorSpace& color_space,
+    uint32_t usage) {
+  NOTREACHED();
+  return nullptr;
+}
+
 std::unique_ptr<SharedImageRepresentationSkia> WrappedSkImage::ProduceSkia(
     SharedImageManager* manager,
     MemoryTypeTracker* tracker) {
diff --git a/gpu/command_buffer/service/wrapped_sk_image.h b/gpu/command_buffer/service/wrapped_sk_image.h
index 3fbef002..02458e5 100644
--- a/gpu/command_buffer/service/wrapped_sk_image.h
+++ b/gpu/command_buffer/service/wrapped_sk_image.h
@@ -33,6 +33,15 @@
       const gfx::Size& size,
       const gfx::ColorSpace& color_space,
       uint32_t usage) override;
+  std::unique_ptr<SharedImageBacking> CreateSharedImage(
+      const Mailbox& mailbox,
+      int client_id,
+      gfx::GpuMemoryBufferHandle handle,
+      gfx::BufferFormat format,
+      SurfaceHandle surface_handle,
+      const gfx::Size& size,
+      const gfx::ColorSpace& color_space,
+      uint32_t usage) override;
 
  private:
   RasterDecoderContextState* const context_state_;
diff --git a/gpu/ipc/client/shared_image_interface_proxy.cc b/gpu/ipc/client/shared_image_interface_proxy.cc
index 311d0e4e..7dccdbf 100644
--- a/gpu/ipc/client/shared_image_interface_proxy.cc
+++ b/gpu/ipc/client/shared_image_interface_proxy.cc
@@ -4,6 +4,8 @@
 
 #include "gpu/ipc/client/shared_image_interface_proxy.h"
 
+#include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
+#include "gpu/command_buffer/common/gpu_memory_buffer_support.h"
 #include "gpu/ipc/client/gpu_channel_host.h"
 #include "gpu/ipc/common/command_buffer_id.h"
 #include "gpu/ipc/common/gpu_messages.h"
@@ -32,25 +34,102 @@
     params.release_id = ++next_release_id_;
     // Note: we enqueue the IPC under the lock to guarantee monotonicity of the
     // release ids as seen by the service.
-    host_->EnqueueDeferredMessage(
+    last_flush_id_ = host_->EnqueueDeferredMessage(
         GpuChannelMsg_CreateSharedImage(route_id_, params));
   }
   return params.mailbox;
 }
 
+Mailbox SharedImageInterfaceProxy::CreateSharedImage(
+    gfx::GpuMemoryBuffer* gpu_memory_buffer,
+    GpuMemoryBufferManager* gpu_memory_buffer_manager,
+    const gfx::ColorSpace& color_space,
+    uint32_t usage) {
+  DCHECK(gpu_memory_buffer_manager);
+  GpuChannelMsg_CreateGMBSharedImage_Params params;
+  params.mailbox = Mailbox::Generate();
+  params.handle = gpu_memory_buffer->CloneHandle();
+  params.size = gpu_memory_buffer->GetSize();
+  params.format = gpu_memory_buffer->GetFormat();
+  params.color_space = color_space;
+  params.usage = usage;
+
+  // TODO(piman): DCHECK GMB format support.
+  DCHECK(gpu::IsImageSizeValidForGpuMemoryBufferFormat(params.size,
+                                                       params.format));
+
+  bool requires_sync_token = params.handle.type == gfx::IO_SURFACE_BUFFER;
+  {
+    base::AutoLock lock(lock_);
+    params.release_id = ++next_release_id_;
+    // Note: we send the IPC under the lock, after flushing previous work (if
+    // any) to guarantee monotonicity of the release ids as seen by the service.
+    // Although we don't strictly need to for correctness, we also flush
+    // DestroySharedImage messages, so that we get a chance to delete resources
+    // before creating new ones.
+    // TODO(piman): support messages with handles in EnqueueDeferredMessage.
+    host_->EnsureFlush(last_flush_id_);
+    host_->Send(
+        new GpuChannelMsg_CreateGMBSharedImage(route_id_, std::move(params)));
+  }
+  if (requires_sync_token) {
+    gpu::SyncToken sync_token = GenUnverifiedSyncToken();
+
+    // Force a synchronous IPC to validate sync token.
+    host_->VerifyFlush(UINT32_MAX);
+    sync_token.SetVerifyFlush();
+
+    gpu_memory_buffer_manager->SetDestructionSyncToken(gpu_memory_buffer,
+                                                       sync_token);
+  }
+  return params.mailbox;
+}
+
+void SharedImageInterfaceProxy::UpdateSharedImage(const SyncToken& sync_token,
+                                                  const Mailbox& mailbox) {
+  std::vector<SyncToken> dependencies;
+  if (sync_token.HasData()) {
+    dependencies.push_back(sync_token);
+    SyncToken& new_token = dependencies.back();
+    if (!new_token.verified_flush()) {
+      // Only allow unverified sync tokens for the same channel.
+      DCHECK_EQ(sync_token.namespace_id(), gpu::CommandBufferNamespace::GPU_IO);
+      int sync_token_channel_id =
+          ChannelIdFromCommandBufferId(sync_token.command_buffer_id());
+      DCHECK_EQ(sync_token_channel_id, host_->channel_id());
+      new_token.SetVerifyFlush();
+    }
+  }
+  {
+    base::AutoLock lock(lock_);
+    last_flush_id_ = host_->EnqueueDeferredMessage(
+        GpuChannelMsg_UpdateSharedImage(route_id_, mailbox, ++next_release_id_),
+        std::move(dependencies));
+  }
+}
+
 void SharedImageInterfaceProxy::DestroySharedImage(const SyncToken& sync_token,
                                                    const Mailbox& mailbox) {
-  SyncToken new_token = sync_token;
-  if (!new_token.verified_flush()) {
-    // Only allow unverified sync tokens for the same channel.
-    DCHECK_EQ(sync_token.namespace_id(), gpu::CommandBufferNamespace::GPU_IO);
-    int sync_token_channel_id =
-        ChannelIdFromCommandBufferId(sync_token.command_buffer_id());
-    DCHECK_EQ(sync_token_channel_id, host_->channel_id());
-    new_token.SetVerifyFlush();
+  std::vector<SyncToken> dependencies;
+  if (sync_token.HasData()) {
+    dependencies.push_back(sync_token);
+    SyncToken& new_token = dependencies.back();
+    if (!new_token.verified_flush()) {
+      // Only allow unverified sync tokens for the same channel.
+      DCHECK_EQ(sync_token.namespace_id(), gpu::CommandBufferNamespace::GPU_IO);
+      int sync_token_channel_id =
+          ChannelIdFromCommandBufferId(sync_token.command_buffer_id());
+      DCHECK_EQ(sync_token_channel_id, host_->channel_id());
+      new_token.SetVerifyFlush();
+    }
   }
-  host_->EnqueueDeferredMessage(
-      GpuChannelMsg_DestroySharedImage(route_id_, mailbox), {new_token});
+  uint32_t flush_id = host_->EnqueueDeferredMessage(
+      GpuChannelMsg_DestroySharedImage(route_id_, mailbox),
+      std::move(dependencies));
+  {
+    base::AutoLock lock(lock_);
+    last_flush_id_ = flush_id;
+  }
 }
 
 SyncToken SharedImageInterfaceProxy::GenUnverifiedSyncToken() {
diff --git a/gpu/ipc/client/shared_image_interface_proxy.h b/gpu/ipc/client/shared_image_interface_proxy.h
index bf33da1..1a833f0 100644
--- a/gpu/ipc/client/shared_image_interface_proxy.h
+++ b/gpu/ipc/client/shared_image_interface_proxy.h
@@ -6,6 +6,7 @@
 #define GPU_IPC_CLIENT_SHARED_IMAGE_INTERFACE_PROXY_H_
 
 #include "base/synchronization/lock.h"
+#include "base/thread_annotations.h"
 #include "gpu/command_buffer/client/shared_image_interface.h"
 
 namespace gpu {
@@ -21,6 +22,13 @@
                             const gfx::Size& size,
                             const gfx::ColorSpace& color_space,
                             uint32_t usage) override;
+  Mailbox CreateSharedImage(gfx::GpuMemoryBuffer* gpu_memory_buffer,
+                            GpuMemoryBufferManager* gpu_memory_buffer_manager,
+                            const gfx::ColorSpace& color_space,
+                            uint32_t usage) override;
+  void UpdateSharedImage(const SyncToken& sync_token,
+                         const Mailbox& mailbox) override;
+
   void DestroySharedImage(const SyncToken& sync_token,
                           const Mailbox& mailbox) override;
   SyncToken GenUnverifiedSyncToken() override;
@@ -28,9 +36,9 @@
  private:
   GpuChannelHost* const host_;
   const int32_t route_id_;
-  // Protects next_release_id_.
   base::Lock lock_;
-  uint32_t next_release_id_ = 0;
+  uint32_t next_release_id_ GUARDED_BY(lock_) = 0;
+  uint32_t last_flush_id_ GUARDED_BY(lock_) = 0;
 };
 
 }  // namespace gpu
diff --git a/gpu/ipc/common/gpu_messages.h b/gpu/ipc/common/gpu_messages.h
index eb8a0ce0..fa20b5ab 100644
--- a/gpu/ipc/common/gpu_messages.h
+++ b/gpu/ipc/common/gpu_messages.h
@@ -83,6 +83,16 @@
   IPC_STRUCT_MEMBER(uint32_t, release_id)
 IPC_STRUCT_END()
 
+IPC_STRUCT_BEGIN(GpuChannelMsg_CreateGMBSharedImage_Params)
+  IPC_STRUCT_MEMBER(gpu::Mailbox, mailbox)
+  IPC_STRUCT_MEMBER(gfx::GpuMemoryBufferHandle, handle)
+  IPC_STRUCT_MEMBER(gfx::Size, size)
+  IPC_STRUCT_MEMBER(gfx::BufferFormat, format)
+  IPC_STRUCT_MEMBER(gfx::ColorSpace, color_space)
+  IPC_STRUCT_MEMBER(uint32_t, usage)
+  IPC_STRUCT_MEMBER(uint32_t, release_id)
+IPC_STRUCT_END()
+
 IPC_STRUCT_BEGIN(GpuChannelMsg_ScheduleImageDecode_Params)
   IPC_STRUCT_MEMBER(std::vector<uint8_t>, encoded_data)
   IPC_STRUCT_MEMBER(gfx::Size, output_size)
@@ -126,6 +136,11 @@
 
 IPC_MESSAGE_ROUTED1(GpuChannelMsg_CreateSharedImage,
                     GpuChannelMsg_CreateSharedImage_Params /* params */)
+IPC_MESSAGE_ROUTED1(GpuChannelMsg_CreateGMBSharedImage,
+                    GpuChannelMsg_CreateGMBSharedImage_Params /* params */)
+IPC_MESSAGE_ROUTED2(GpuChannelMsg_UpdateSharedImage,
+                    gpu::Mailbox /* id */,
+                    uint32_t /* release_id */)
 IPC_MESSAGE_ROUTED1(GpuChannelMsg_DestroySharedImage, gpu::Mailbox /* id */)
 
 // Schedules a hardware-accelerated image decode in the GPU process. Renderers
diff --git a/gpu/ipc/in_process_command_buffer.cc b/gpu/ipc/in_process_command_buffer.cc
index 9237e825..7b6d6a002 100644
--- a/gpu/ipc/in_process_command_buffer.cc
+++ b/gpu/ipc/in_process_command_buffer.cc
@@ -145,6 +145,55 @@
     return mailbox;
   }
 
+  Mailbox CreateSharedImage(gfx::GpuMemoryBuffer* gpu_memory_buffer,
+                            GpuMemoryBufferManager* gpu_memory_buffer_manager,
+                            const gfx::ColorSpace& color_space,
+                            uint32_t usage) override {
+    DCHECK(gpu_memory_buffer_manager);
+
+    // TODO(piman): DCHECK GMB format support.
+    DCHECK(gpu::IsImageSizeValidForGpuMemoryBufferFormat(
+        gpu_memory_buffer->GetSize(), gpu_memory_buffer->GetFormat()));
+
+    auto mailbox = Mailbox::Generate();
+    gfx::GpuMemoryBufferHandle handle = gpu_memory_buffer->CloneHandle();
+    bool requires_sync_token = handle.type == gfx::IO_SURFACE_BUFFER;
+    SyncToken sync_token;
+    {
+      base::AutoLock lock(lock_);
+      sync_token = MakeSyncToken(next_fence_sync_release_++);
+      // Note: we enqueue the task under the lock to guarantee monotonicity of
+      // the release ids as seen by the service. Unretained is safe because
+      // InProcessCommandBuffer synchronizes with the GPU thread at destruction
+      // time, cancelling tasks, before |this| is destroyed.
+      parent_->ScheduleGpuTask(base::BindOnce(
+          &InProcessCommandBuffer::CreateGMBSharedImageOnGpuThread,
+          parent_->gpu_thread_weak_ptr_factory_.GetWeakPtr(), mailbox,
+          std::move(handle), gpu_memory_buffer->GetFormat(),
+          gpu_memory_buffer->GetSize(), color_space, usage, sync_token));
+    }
+    if (requires_sync_token) {
+      sync_token.SetVerifyFlush();
+      gpu_memory_buffer_manager->SetDestructionSyncToken(gpu_memory_buffer,
+                                                         sync_token);
+    }
+    return mailbox;
+  }
+
+  void UpdateSharedImage(const SyncToken& sync_token,
+                         const Mailbox& mailbox) override {
+    base::AutoLock lock(lock_);
+    // Note: we enqueue the task under the lock to guarantee monotonicity of
+    // the release ids as seen by the service. Unretained is safe because
+    // InProcessCommandBuffer synchronizes with the GPU thread at destruction
+    // time, cancelling tasks, before |this| is destroyed.
+    parent_->ScheduleGpuTask(
+        base::BindOnce(&InProcessCommandBuffer::UpdateSharedImageOnGpuThread,
+                       parent_->gpu_thread_weak_ptr_factory_.GetWeakPtr(),
+                       mailbox, MakeSyncToken(next_fence_sync_release_++)),
+        {sync_token});
+  }
+
   void DestroySharedImage(const SyncToken& sync_token,
                           const Mailbox& mailbox) override {
     // Use sync token dependency to ensure that the destroy task does not run
@@ -1241,6 +1290,17 @@
       base::BindOnce(std::move(callback), std::move(gpu_fence)));
 }
 
+void InProcessCommandBuffer::LazyCreateSharedImageFactory() {
+  if (shared_image_factory_)
+    return;
+
+  shared_image_factory_ = std::make_unique<SharedImageFactory>(
+      GetGpuPreferences(), context_group_->feature_info()->workarounds(),
+      GetGpuFeatureInfo(), context_state_.get(),
+      context_group_->mailbox_manager(), task_executor_->shared_image_manager(),
+      image_factory_, nullptr);
+}
+
 void InProcessCommandBuffer::CreateSharedImageOnGpuThread(
     const Mailbox& mailbox,
     viz::ResourceFormat format,
@@ -1251,13 +1311,7 @@
   DCHECK_CALLED_ON_VALID_SEQUENCE(gpu_sequence_checker_);
   if (!MakeCurrent())
     return;
-  if (!shared_image_factory_) {
-    shared_image_factory_ = std::make_unique<SharedImageFactory>(
-        GetGpuPreferences(), context_group_->feature_info()->workarounds(),
-        GetGpuFeatureInfo(), context_state_.get(),
-        context_group_->mailbox_manager(),
-        task_executor_->shared_image_manager(), image_factory_, nullptr);
-  }
+  LazyCreateSharedImageFactory();
   if (!shared_image_factory_->CreateSharedImage(mailbox, format, size,
                                                 color_space, usage)) {
     // Signal errors by losing the command buffer.
@@ -1268,6 +1322,47 @@
   shared_image_client_state_->ReleaseFenceSync(sync_token.release_count());
 }
 
+void InProcessCommandBuffer::CreateGMBSharedImageOnGpuThread(
+    const Mailbox& mailbox,
+    gfx::GpuMemoryBufferHandle handle,
+    gfx::BufferFormat format,
+    const gfx::Size& size,
+    const gfx::ColorSpace& color_space,
+    uint32_t usage,
+    const SyncToken& sync_token) {
+  DCHECK_CALLED_ON_VALID_SEQUENCE(gpu_sequence_checker_);
+  if (!MakeCurrent())
+    return;
+  LazyCreateSharedImageFactory();
+  // TODO(piman): add support for SurfaceHandle (for backbuffers for ozone/drm).
+  SurfaceHandle surface_handle = kNullSurfaceHandle;
+  if (!shared_image_factory_->CreateSharedImage(
+          mailbox, kInProcessCommandBufferClientId, std::move(handle), format,
+          surface_handle, size, color_space, usage)) {
+    // Signal errors by losing the command buffer.
+    command_buffer_->SetParseError(error::kLostContext);
+    return;
+  }
+  context_group_->mailbox_manager()->PushTextureUpdates(sync_token);
+  shared_image_client_state_->ReleaseFenceSync(sync_token.release_count());
+}
+
+void InProcessCommandBuffer::UpdateSharedImageOnGpuThread(
+    const Mailbox& mailbox,
+    const SyncToken& sync_token) {
+  DCHECK_CALLED_ON_VALID_SEQUENCE(gpu_sequence_checker_);
+  if (!MakeCurrent())
+    return;
+  if (!shared_image_factory_ ||
+      !shared_image_factory_->UpdateSharedImage(mailbox)) {
+    // Signal errors by losing the command buffer.
+    command_buffer_->SetParseError(error::kLostContext);
+    return;
+  }
+  context_group_->mailbox_manager()->PushTextureUpdates(sync_token);
+  shared_image_client_state_->ReleaseFenceSync(sync_token.release_count());
+}
+
 void InProcessCommandBuffer::DestroySharedImageOnGpuThread(
     const Mailbox& mailbox) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(gpu_sequence_checker_);
diff --git a/gpu/ipc/in_process_command_buffer.h b/gpu/ipc/in_process_command_buffer.h
index fa3e995b..038ddf3 100644
--- a/gpu/ipc/in_process_command_buffer.h
+++ b/gpu/ipc/in_process_command_buffer.h
@@ -268,12 +268,22 @@
   void GetGpuFenceOnGpuThread(
       uint32_t gpu_fence_id,
       base::OnceCallback<void(std::unique_ptr<gfx::GpuFence>)> callback);
+  void LazyCreateSharedImageFactory();
   void CreateSharedImageOnGpuThread(const Mailbox& mailbox,
                                     viz::ResourceFormat format,
                                     const gfx::Size& size,
                                     const gfx::ColorSpace& color_space,
                                     uint32_t usage,
                                     const SyncToken& sync_token);
+  void CreateGMBSharedImageOnGpuThread(const Mailbox& mailbox,
+                                       gfx::GpuMemoryBufferHandle handle,
+                                       gfx::BufferFormat format,
+                                       const gfx::Size& size,
+                                       const gfx::ColorSpace& color_space,
+                                       uint32_t usage,
+                                       const SyncToken& sync_token);
+  void UpdateSharedImageOnGpuThread(const Mailbox& mailbox,
+                                    const SyncToken& sync_token);
   void DestroySharedImageOnGpuThread(const Mailbox& mailbox);
 
   // Callbacks on the gpu thread.
diff --git a/gpu/ipc/service/shared_image_stub.cc b/gpu/ipc/service/shared_image_stub.cc
index e6e4a760..8bfca216a 100644
--- a/gpu/ipc/service/shared_image_stub.cc
+++ b/gpu/ipc/service/shared_image_stub.cc
@@ -12,7 +12,6 @@
 #include "gpu/command_buffer/service/scheduler.h"
 #include "gpu/command_buffer/service/shared_image_factory.h"
 #include "gpu/ipc/common/command_buffer_id.h"
-#include "gpu/ipc/common/gpu_messages.h"
 #include "gpu/ipc/service/gpu_channel.h"
 #include "gpu/ipc/service/gpu_channel_manager.h"
 #include "gpu/ipc/service/gpu_memory_buffer_factory.h"
@@ -48,6 +47,9 @@
   bool handled = true;
   IPC_BEGIN_MESSAGE_MAP(SharedImageStub, msg)
     IPC_MESSAGE_HANDLER(GpuChannelMsg_CreateSharedImage, OnCreateSharedImage)
+    IPC_MESSAGE_HANDLER(GpuChannelMsg_CreateGMBSharedImage,
+                        OnCreateGMBSharedImage)
+    IPC_MESSAGE_HANDLER(GpuChannelMsg_UpdateSharedImage, OnUpdateSharedImage)
     IPC_MESSAGE_HANDLER(GpuChannelMsg_DestroySharedImage, OnDestroySharedImage)
     IPC_MESSAGE_UNHANDLED(handled = false)
   IPC_END_MESSAGE_MAP()
@@ -78,6 +80,56 @@
   sync_point_client_state_->ReleaseFenceSync(params.release_id);
 }
 
+void SharedImageStub::OnCreateGMBSharedImage(
+    GpuChannelMsg_CreateGMBSharedImage_Params params) {
+  TRACE_EVENT2("gpu", "SharedImageStub::OnCreateSharedImage", "width",
+               params.size.width(), "height", params.size.height());
+  if (!MakeContextCurrentAndCreateFactory()) {
+    OnError();
+    return;
+  }
+
+  // TODO(piman): add support for SurfaceHandle (for backbuffers for ozone/drm).
+  SurfaceHandle surface_handle = kNullSurfaceHandle;
+  if (!factory_->CreateSharedImage(params.mailbox, channel_->client_id(),
+                                   std::move(params.handle), params.format,
+                                   surface_handle, params.size,
+                                   params.color_space, params.usage)) {
+    LOG(ERROR) << "SharedImageStub: Unable to create shared image";
+    OnError();
+    return;
+  }
+
+  SyncToken sync_token(sync_point_client_state_->namespace_id(),
+                       sync_point_client_state_->command_buffer_id(),
+                       params.release_id);
+  auto* mailbox_manager = channel_->gpu_channel_manager()->mailbox_manager();
+  mailbox_manager->PushTextureUpdates(sync_token);
+  sync_point_client_state_->ReleaseFenceSync(params.release_id);
+}
+
+void SharedImageStub::OnUpdateSharedImage(const Mailbox& mailbox,
+                                          uint32_t release_id) {
+  TRACE_EVENT0("gpu", "SharedImageStub::OnDestroySharedImage");
+  if (!MakeContextCurrentAndCreateFactory()) {
+    OnError();
+    return;
+  }
+
+  if (!factory_->UpdateSharedImage(mailbox)) {
+    LOG(ERROR) << "SharedImageStub: Unable to destroy shared image";
+    OnError();
+    return;
+  }
+
+  SyncToken sync_token(sync_point_client_state_->namespace_id(),
+                       sync_point_client_state_->command_buffer_id(),
+                       release_id);
+  auto* mailbox_manager = channel_->gpu_channel_manager()->mailbox_manager();
+  mailbox_manager->PushTextureUpdates(sync_token);
+  sync_point_client_state_->ReleaseFenceSync(release_id);
+}
+
 void SharedImageStub::OnDestroySharedImage(const Mailbox& mailbox) {
   TRACE_EVENT0("gpu", "SharedImageStub::OnDestroySharedImage");
   if (!MakeContextCurrentAndCreateFactory()) {
diff --git a/gpu/ipc/service/shared_image_stub.h b/gpu/ipc/service/shared_image_stub.h
index 4f74d8b..d7fe539 100644
--- a/gpu/ipc/service/shared_image_stub.h
+++ b/gpu/ipc/service/shared_image_stub.h
@@ -9,10 +9,9 @@
 #include "components/viz/common/resources/resource_format.h"
 #include "gpu/command_buffer/service/memory_tracking.h"
 #include "gpu/command_buffer/service/sync_point_manager.h"
+#include "gpu/ipc/common/gpu_messages.h"
 #include "ipc/ipc_listener.h"
 
-struct GpuChannelMsg_CreateSharedImage_Params;
-
 namespace gpu {
 struct Mailbox;
 class GpuChannel;
@@ -48,6 +47,8 @@
  private:
   void OnCreateSharedImage(
       const GpuChannelMsg_CreateSharedImage_Params& params);
+  void OnCreateGMBSharedImage(GpuChannelMsg_CreateGMBSharedImage_Params params);
+  void OnUpdateSharedImage(const Mailbox& mailbox, uint32_t release_id);
   void OnDestroySharedImage(const Mailbox& mailbox);
   bool MakeContextCurrentAndCreateFactory();
   void OnError();
diff --git a/headless/lib/browser/headless_browser_impl_aura.cc b/headless/lib/browser/headless_browser_impl_aura.cc
index 4cdcf671..3a1878b 100644
--- a/headless/lib/browser/headless_browser_impl_aura.cc
+++ b/headless/lib/browser/headless_browser_impl_aura.cc
@@ -63,7 +63,7 @@
       0, 0, std::max(old_host_bounds.width(), bounds.x() + bounds.width()),
       std::max(old_host_bounds.height(), bounds.y() + bounds.height()));
   web_contents->window_tree_host()->SetBoundsInPixels(
-      new_host_bounds, viz::LocalSurfaceId(), base::TimeTicks());
+      new_host_bounds, viz::LocalSurfaceIdAllocation());
   web_contents->window_tree_host()->window()->SetBounds(new_host_bounds);
 
   gfx::NativeView native_view = web_contents->web_contents()->GetNativeView();
diff --git a/headless/lib/browser/headless_window_tree_host.cc b/headless/lib/browser/headless_window_tree_host.cc
index 4a056a5..600716e7 100644
--- a/headless/lib/browser/headless_window_tree_host.cc
+++ b/headless/lib/browser/headless_window_tree_host.cc
@@ -57,15 +57,14 @@
 
 void HeadlessWindowTreeHost::SetBoundsInPixels(
     const gfx::Rect& bounds,
-    const viz::LocalSurfaceId& local_surface_id,
-    base::TimeTicks allocation_time) {
+    const viz::LocalSurfaceIdAllocation& local_surface_id_allocation) {
   bool origin_changed = bounds_.origin() != bounds.origin();
   bool size_changed = bounds_.size() != bounds.size();
   bounds_ = bounds;
   if (origin_changed)
     OnHostMovedInPixels(bounds.origin());
   if (size_changed)
-    OnHostResizedInPixels(bounds.size(), local_surface_id, allocation_time);
+    OnHostResizedInPixels(bounds.size(), local_surface_id_allocation);
 }
 
 void HeadlessWindowTreeHost::ShowImpl() {}
diff --git a/headless/lib/browser/headless_window_tree_host.h b/headless/lib/browser/headless_window_tree_host.h
index 77ea6ba5..1a11047b 100644
--- a/headless/lib/browser/headless_window_tree_host.h
+++ b/headless/lib/browser/headless_window_tree_host.h
@@ -47,8 +47,8 @@
   void HideImpl() override;
   gfx::Rect GetBoundsInPixels() const override;
   void SetBoundsInPixels(const gfx::Rect& bounds,
-                         const viz::LocalSurfaceId& local_surface_id,
-                         base::TimeTicks allocation_time) override;
+                         const viz::LocalSurfaceIdAllocation&
+                             local_surface_id_allocation) override;
   gfx::Point GetLocationOnScreenInPixels() const override;
   void SetCapture() override;
   void ReleaseCapture() override;
diff --git a/infra/config/global/cr-buildbucket.cfg b/infra/config/global/cr-buildbucket.cfg
index 9c18bcd..340cdac 100644
--- a/infra/config/global/cr-buildbucket.cfg
+++ b/infra/config/global/cr-buildbucket.cfg
@@ -3033,16 +3033,11 @@
       mixins: "goma-j150"
       name: "linux_chromium_chromeos_asan_rel_ng"
     }
-    builders { mixins: "linux-try" name: "linux_chromium_chromeos_compile_dbg_ng" }
-    builders { mixins: "linux-try" name: "linux_chromium_chromeos_compile_rel_ng" }
-    builders { mixins: "linux-try" name: "linux_chromium_chromeos_dbg_ng" }
     builders {
       mixins: "linux-try"
       mixins: "goma-j150"
       name: "linux_chromium_chromeos_msan_rel_ng"
     }
-    builders { mixins: "linux-try" name: "linux_chromium_chromeos_ozone_rel_ng" }
-    builders { mixins: "linux-try" name: "linux_chromium_chromeos_rel_ng" }
     builders {
       name: "linux_chromium_clobber_deterministic",
       mixins: "linux-try"
@@ -3183,7 +3178,6 @@
       name: "win_chromium_dbg_ng"
       execution_timeout_secs: 14400 # 4h
     }
-    builders { mixins: "win-try" name: "win_chromium_syzyasan_rel" }
     builders { mixins: "win-try" name: "win_chromium_x64_rel_ng" }
     builders { mixins: "win-try" name: "win_mojo" }
     builders { mixins: "win-optional-gpu-try" name: "win_optional_gpu_tests_rel" }
diff --git a/infra/config/global/luci-milo.cfg b/infra/config/global/luci-milo.cfg
index ee8ad1c54..5e6a735 100644
--- a/infra/config/global/luci-milo.cfg
+++ b/infra/config/global/luci-milo.cfg
@@ -4855,24 +4855,9 @@
     name: "buildbucket/luci.chromium.try/linux_chromium_chromeos_asan_rel_ng"
   }
   builders {
-    name: "buildbucket/luci.chromium.try/linux_chromium_chromeos_compile_dbg_ng"
-  }
-  builders {
-    name: "buildbucket/luci.chromium.try/linux_chromium_chromeos_compile_rel_ng"
-  }
-  builders {
-    name: "buildbucket/luci.chromium.try/linux_chromium_chromeos_dbg_ng"
-  }
-  builders {
     name: "buildbucket/luci.chromium.try/linux_chromium_chromeos_msan_rel_ng"
   }
   builders {
-    name: "buildbucket/luci.chromium.try/linux_chromium_chromeos_ozone_rel_ng"
-  }
-  builders {
-    name: "buildbucket/luci.chromium.try/linux_chromium_chromeos_rel_ng"
-  }
-  builders {
     name: "buildbucket/luci.chromium.try/linux_chromium_clobber_deterministic"
   }
   builders {
@@ -5053,9 +5038,6 @@
     name: "buildbucket/luci.chromium.try/win_chromium_dbg_ng"
   }
   builders {
-    name: "buildbucket/luci.chromium.try/win_chromium_syzyasan_rel"
-  }
-  builders {
     name: "buildbucket/luci.chromium.try/win_chromium_x64_rel_ng"
   }
   builders {
diff --git a/ios/chrome/browser/metrics/ios_chrome_metrics_service_client.mm b/ios/chrome/browser/metrics/ios_chrome_metrics_service_client.mm
index 94d4a1c..438e1a06e 100644
--- a/ios/chrome/browser/metrics/ios_chrome_metrics_service_client.mm
+++ b/ios/chrome/browser/metrics/ios_chrome_metrics_service_client.mm
@@ -67,6 +67,16 @@
 #error "This file requires ARC support."
 #endif
 
+namespace {
+
+void GetNetworkConnectionTrackerAsync(
+    base::OnceCallback<void(network::NetworkConnectionTracker*)> callback) {
+  std::move(callback).Run(
+      GetApplicationContext()->GetNetworkConnectionTracker());
+}
+
+}  // namespace
+
 IOSChromeMetricsServiceClient::IOSChromeMetricsServiceClient(
     metrics::MetricsStateManager* state_manager)
     : metrics_state_manager_(state_manager),
@@ -196,7 +206,8 @@
 
   // Register metrics providers.
   metrics_service_->RegisterMetricsProvider(
-      std::make_unique<metrics::NetworkMetricsProvider>());
+      std::make_unique<metrics::NetworkMetricsProvider>(
+          base::BindRepeating(&GetNetworkConnectionTrackerAsync)));
 
   // Currently, we configure OmniboxMetricsProvider to not log events to UMA
   // if there is a single incognito session visible. In the future, it may
diff --git a/ios/chrome/browser/ui/autofill/chrome_autofill_client_ios.h b/ios/chrome/browser/ui/autofill/chrome_autofill_client_ios.h
index 62cb915..5a25494 100644
--- a/ios/chrome/browser/ui/autofill/chrome_autofill_client_ios.h
+++ b/ios/chrome/browser/ui/autofill/chrome_autofill_client_ios.h
@@ -73,8 +73,9 @@
       const CreditCard& card,
       std::unique_ptr<base::DictionaryValue> legal_message,
       bool should_request_name_from_user,
+      bool should_request_expiration_date_from_user,
       bool show_prompt,
-      base::OnceCallback<void(const base::string16&)> callback) override;
+      UserAcceptedUploadCallback callback) override;
   void ConfirmCreditCardFillAssist(const CreditCard& card,
                                    const base::Closure& callback) override;
   void LoadRiskData(
diff --git a/ios/chrome/browser/ui/autofill/chrome_autofill_client_ios.mm b/ios/chrome/browser/ui/autofill/chrome_autofill_client_ios.mm
index a837ae7..342173c 100644
--- a/ios/chrome/browser/ui/autofill/chrome_autofill_client_ios.mm
+++ b/ios/chrome/browser/ui/autofill/chrome_autofill_client_ios.mm
@@ -175,8 +175,7 @@
       std::make_unique<AutofillSaveCardInfoBarDelegateMobile>(
           false, card, std::unique_ptr<base::DictionaryValue>(nullptr),
           GetStrikeDatabase(),
-          /*upload_save_card_callback=*/
-          base::OnceCallback<void(const base::string16&)>(),
+          /*upload_save_card_callback=*/UserAcceptedUploadCallback(),
           /*local_save_card_callback=*/std::move(callback), GetPrefs())));
 }
 
@@ -196,8 +195,9 @@
     const CreditCard& card,
     std::unique_ptr<base::DictionaryValue> legal_message,
     bool should_request_name_from_user,
+    bool should_request_expiration_date_from_user,
     bool show_prompt,
-    base::OnceCallback<void(const base::string16&)> callback) {
+    UserAcceptedUploadCallback callback) {
   DCHECK(show_prompt);
   auto save_card_info_bar_delegate_mobile =
       std::make_unique<AutofillSaveCardInfoBarDelegateMobile>(
diff --git a/ios/web_view/BUILD.gn b/ios/web_view/BUILD.gn
index 5662bca..c745a65 100644
--- a/ios/web_view/BUILD.gn
+++ b/ios/web_view/BUILD.gn
@@ -65,6 +65,7 @@
   "public/cwv_user_script.h",
   "public/cwv_web_view.h",
   "public/cwv_web_view_configuration.h",
+  "public/cwv_download_task.h",
 ]
 if (ios_web_view_enable_sync) {
   ios_web_view_public_headers += [
@@ -215,6 +216,10 @@
   "internal/web_view_web_state_policy_decider.mm",
   "internal/webdata_services/web_view_web_data_service_wrapper_factory.cc",
   "internal/webdata_services/web_view_web_data_service_wrapper_factory.h",
+  "internal/web_view_download_manager.h",
+  "internal/web_view_download_manager.mm",
+  "internal/cwv_download_task_internal.h",
+  "internal/cwv_download_task.mm",
 ]
 ios_web_view_sources += ios_web_view_public_headers
 if (ios_web_view_enable_sync) {
@@ -382,6 +387,7 @@
     "internal/autofill/cwv_autofill_suggestion_unittest.mm",
     "internal/autofill/cwv_credit_card_unittest.mm",
     "internal/autofill/cwv_credit_card_verifier_unittest.mm",
+    "internal/cwv_download_task_unittest.mm",
     "internal/cwv_favicon_unittest.mm",
     "internal/cwv_html_element_unittest.mm",
     "internal/cwv_preferences_unittest.mm",
diff --git a/ios/web_view/internal/autofill/web_view_autofill_client_ios.h b/ios/web_view/internal/autofill/web_view_autofill_client_ios.h
index 21c3ed9..5c1ba39 100644
--- a/ios/web_view/internal/autofill/web_view_autofill_client_ios.h
+++ b/ios/web_view/internal/autofill/web_view_autofill_client_ios.h
@@ -67,8 +67,9 @@
       const CreditCard& card,
       std::unique_ptr<base::DictionaryValue> legal_message,
       bool should_request_name_from_user,
+      bool should_request_expiration_date_from_user,
       bool show_prompt,
-      base::OnceCallback<void(const base::string16&)> callback) override;
+      UserAcceptedUploadCallback callback) override;
   void ConfirmCreditCardFillAssist(const CreditCard& card,
                                    const base::Closure& callback) override;
   void LoadRiskData(
diff --git a/ios/web_view/internal/autofill/web_view_autofill_client_ios.mm b/ios/web_view/internal/autofill/web_view_autofill_client_ios.mm
index ef11a0c..6b191f50 100644
--- a/ios/web_view/internal/autofill/web_view_autofill_client_ios.mm
+++ b/ios/web_view/internal/autofill/web_view_autofill_client_ios.mm
@@ -129,8 +129,9 @@
     const CreditCard& card,
     std::unique_ptr<base::DictionaryValue> legal_message,
     bool should_request_name_from_user,
+    bool should_request_expiration_date_from_user,
     bool show_prompt,
-    base::OnceCallback<void(const base::string16&)> callback) {
+    UserAcceptedUploadCallback callback) {
   DCHECK(show_prompt);
 }
 
diff --git a/ios/web_view/internal/cwv_download_task.mm b/ios/web_view/internal/cwv_download_task.mm
new file mode 100644
index 0000000..6b10268
--- /dev/null
+++ b/ios/web_view/internal/cwv_download_task.mm
@@ -0,0 +1,169 @@
+// Copyright 2018 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.
+
+#import "ios/web_view/internal/cwv_download_task_internal.h"
+
+#include "base/sequenced_task_runner.h"
+#include "base/strings/sys_string_conversions.h"
+#include "base/task/post_task.h"
+#include "base/task/task_traits.h"
+#import "ios/web/public/download/download_task.h"
+#include "ios/web/public/download/download_task_observer.h"
+#include "ios/web_view/internal/cwv_web_view_internal.h"
+#include "net/base/mac/url_conversions.h"
+#include "net/base/net_errors.h"
+#include "net/url_request/url_fetcher_response_writer.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+int64_t const CWVDownloadSizeUnknown = -1;
+
+NSErrorDomain const CWVDownloadErrorDomain =
+    @"org.chromium.chromewebview.DownloadErrorDomain";
+
+NSInteger const CWVDownloadErrorUnknown = -100;
+
+@interface CWVDownloadTask ()
+
+// Called when the download task has started, downloaded a chunk of data or
+// the download has been completed.
+- (void)downloadWasUpdated;
+
+@end
+
+namespace {
+// Bridges C++ observer method calls to Objective-C.
+class DownloadTaskObserverBridge : public web::DownloadTaskObserver {
+ public:
+  explicit DownloadTaskObserverBridge(CWVDownloadTask* task) : task_(task) {}
+
+  void OnDownloadUpdated(web::DownloadTask* task) override {
+    [task_ downloadWasUpdated];
+  }
+
+ private:
+  __weak CWVDownloadTask* task_ = nil;
+};
+}  // namespace
+
+@implementation CWVDownloadTask {
+  std::unique_ptr<DownloadTaskObserverBridge> _observerBridge;
+  std::unique_ptr<web::DownloadTask> _internalTask;
+}
+
+@synthesize delegate = _delegate;
+
+- (NSString*)suggestedFileName {
+  return base::SysUTF16ToNSString(_internalTask->GetSuggestedFilename());
+}
+
+- (NSString*)MIMEType {
+  return base::SysUTF8ToNSString(_internalTask->GetMimeType());
+}
+
+- (NSURL*)originalURL {
+  return net::NSURLWithGURL(_internalTask->GetOriginalUrl());
+}
+
+- (int64_t)totalBytes {
+  return _internalTask->GetTotalBytes();
+}
+
+- (int64_t)receivedBytes {
+  return _internalTask->GetReceivedBytes();
+}
+
+- (double)progress {
+  int percent = _internalTask->GetPercentComplete();
+  // percent == -1 means unknown.
+  return percent == -1 ? NAN : percent / 100.0;
+}
+
+- (instancetype)initWithInternalTask:
+    (std::unique_ptr<web::DownloadTask>)internalTask {
+  self = [super init];
+  if (self) {
+    _observerBridge = std::make_unique<DownloadTaskObserverBridge>(self);
+    _internalTask = std::move(internalTask);
+    _internalTask->AddObserver(_observerBridge.get());
+  }
+  return self;
+}
+
+- (void)dealloc {
+  _internalTask->RemoveObserver(_observerBridge.get());
+}
+
+- (void)startDownloadToLocalFileAtPath:(NSString*)path {
+  scoped_refptr<base::SequencedTaskRunner> taskRunner =
+      base::CreateSequencedTaskRunnerWithTraits(
+          {base::MayBlock(), base::TaskPriority::BEST_EFFORT});
+  __block auto writer = std::make_unique<net::URLFetcherFileWriter>(
+      taskRunner, base::FilePath(base::SysNSStringToUTF8(path)));
+
+  __weak CWVDownloadTask* weakSelf = self;
+  int errorCode = writer->Initialize(base::BindOnce(^(int blockErrorCode) {
+    [weakSelf startTaskWithWriter:std::move(writer) errorCode:blockErrorCode];
+  }));
+  // When |errorCode| is net::ERR_IO_PENDING, the callback above will be run
+  // later with the result.
+  if (errorCode != net::ERR_IO_PENDING) {
+    [self startTaskWithWriter:std::move(writer) errorCode:errorCode];
+  }
+}
+
+- (void)cancel {
+  _internalTask->Cancel();
+}
+
+#pragma mark - Private
+
+- (void)startTaskWithWriter:(std::unique_ptr<net::URLFetcherFileWriter>)writer
+                  errorCode:(int)errorCode {
+  if (errorCode == net::OK) {
+    _internalTask->Start(std::move(writer));
+  } else {
+    [self notifyFinishWithErrorCode:errorCode];
+  }
+}
+
+- (void)downloadWasUpdated {
+  if (_internalTask->IsDone()) {
+    int errorCode = _internalTask->GetErrorCode();
+    if (errorCode == net::OK) {
+      // The writer deletes the file on its destructor by default. This prevents
+      // the deletion.
+      _internalTask->GetResponseWriter()->AsFileWriter()->DisownFile();
+    }
+    [self notifyFinishWithErrorCode:errorCode];
+  } else {
+    if ([_delegate
+            respondsToSelector:@selector(downloadTaskProgressDidChange:)]) {
+      [_delegate downloadTaskProgressDidChange:self];
+    }
+  }
+}
+
+- (void)notifyFinishWithErrorCode:(int)errorCode {
+  NSError* error = nil;
+  if (errorCode != net::OK) {
+    NSString* errorDescription =
+        base::SysUTF8ToNSString(net::ErrorToShortString(errorCode));
+    // Always use CWVDownloadErrorUnknown so far because a detailed error code
+    // is likely not very useful. Text representation of the error is still
+    // available via error.localizedDescription.
+    error = [NSError
+        errorWithDomain:CWVDownloadErrorDomain
+                   code:CWVDownloadErrorUnknown
+               userInfo:@{NSLocalizedDescriptionKey : errorDescription}];
+  }
+  if ([_delegate
+          respondsToSelector:@selector(downloadTask:didFinishWithError:)]) {
+    [_delegate downloadTask:self didFinishWithError:error];
+  }
+}
+
+@end
diff --git a/ios/web_view/internal/cwv_download_task_internal.h b/ios/web_view/internal/cwv_download_task_internal.h
new file mode 100644
index 0000000..b2e409f
--- /dev/null
+++ b/ios/web_view/internal/cwv_download_task_internal.h
@@ -0,0 +1,27 @@
+// Copyright 2018 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.
+
+#ifndef IOS_WEB_VIEW_INTERNAL_CWV_DOWNLOAD_TASK_INTERNAL_H_
+#define IOS_WEB_VIEW_INTERNAL_CWV_DOWNLOAD_TASK_INTERNAL_H_
+
+#include <memory>
+
+#import "ios/web_view/public/cwv_download_task.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+namespace web {
+class DownloadTask;
+}
+
+@interface CWVDownloadTask ()
+
+- (instancetype)initWithInternalTask:
+    (std::unique_ptr<web::DownloadTask>)internalTask;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif  // IOS_WEB_VIEW_INTERNAL_CWV_DOWNLOAD_TASK_INTERNAL_H_
diff --git a/ios/web_view/internal/cwv_download_task_unittest.mm b/ios/web_view/internal/cwv_download_task_unittest.mm
new file mode 100644
index 0000000..8401e6fc
--- /dev/null
+++ b/ios/web_view/internal/cwv_download_task_unittest.mm
@@ -0,0 +1,168 @@
+// Copyright 2018 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.
+
+#import "ios/web_view/internal/cwv_download_task_internal.h"
+
+#import <Foundation/Foundation.h>
+
+#include "base/files/file_path.h"
+#include "base/strings/sys_string_conversions.h"
+#include "base/strings/utf_string_conversions.h"
+#import "base/test/ios/wait_util.h"
+#include "base/test/scoped_task_environment.h"
+#import "ios/web/public/test/fakes/fake_download_task.h"
+#include "net/base/net_errors.h"
+#include "net/url_request/url_fetcher_response_writer.h"
+#include "testing/gtest/include/gtest/gtest.h"
+#import "testing/gtest_mac.h"
+#include "testing/platform_test.h"
+#import "third_party/ocmock/OCMock/OCMock.h"
+#import "third_party/ocmock/gtest_support.h"
+
+using base::test::ios::WaitUntilConditionOrTimeout;
+using base::test::ios::kWaitForFileOperationTimeout;
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+namespace ios_web_view {
+
+class CWVDownloadTaskTest : public PlatformTest {
+ public:
+  CWVDownloadTaskTest()
+      : valid_local_file_path_(testing::TempDir() + "/foo.txt") {
+    auto task_ptr = std::make_unique<web::FakeDownloadTask>(
+        GURL("http://example.com/foo.txt"), "text/plain");
+    fake_internal_task_ = task_ptr.get();
+    cwv_task_ =
+        [[CWVDownloadTask alloc] initWithInternalTask:std::move(task_ptr)];
+    mock_delegate_ = OCMProtocolMock(@protocol(CWVDownloadTaskDelegate));
+    cwv_task_.delegate = mock_delegate_;
+  }
+
+ protected:
+  std::string valid_local_file_path_;
+  base::test::ScopedTaskEnvironment scoped_task_environment_;
+  web::FakeDownloadTask* fake_internal_task_ = nullptr;
+  id<CWVDownloadTaskDelegate> mock_delegate_ = nil;
+  CWVDownloadTask* cwv_task_ = nil;
+
+  // Waits until fake_internal_task_->Start() is called.
+  bool WaitUntilTaskStarts() WARN_UNUSED_RESULT {
+    return WaitUntilConditionOrTimeout(kWaitForFileOperationTimeout, ^{
+      scoped_task_environment_.RunUntilIdle();
+      return fake_internal_task_->GetState() ==
+             web::DownloadTask::State::kInProgress;
+    });
+  }
+
+  // Finishes the response writer and waits for its completion.
+  bool FinishResponseWriter() WARN_UNUSED_RESULT {
+    __block int error_code = net::ERR_IO_PENDING;
+    error_code = fake_internal_task_->GetResponseWriter()->Finish(
+        net::OK, base::BindOnce(^(int block_error_code) {
+          error_code = block_error_code;
+        }));
+    return WaitUntilConditionOrTimeout(kWaitForFileOperationTimeout, ^{
+      scoped_task_environment_.RunUntilIdle();
+      return error_code == net::OK;
+    });
+  }
+};
+
+// Tests a flow where the download starts and finishes successfully.
+TEST_F(CWVDownloadTaskTest, SuccessfulFlow) {
+  OCMExpect([mock_delegate_ downloadTaskProgressDidChange:cwv_task_]);
+  [cwv_task_ startDownloadToLocalFileAtPath:base::SysUTF8ToNSString(
+                                                valid_local_file_path_)];
+  ASSERT_TRUE(WaitUntilTaskStarts());
+  EXPECT_OCMOCK_VERIFY((id)mock_delegate_);
+
+  EXPECT_EQ(
+      base::FilePath(valid_local_file_path_),
+      fake_internal_task_->GetResponseWriter()->AsFileWriter()->file_path());
+
+  OCMExpect([mock_delegate_ downloadTaskProgressDidChange:cwv_task_]);
+  fake_internal_task_->SetPercentComplete(50);
+  EXPECT_OCMOCK_VERIFY((id)mock_delegate_);
+
+  OCMExpect([mock_delegate_ downloadTask:cwv_task_ didFinishWithError:nil]);
+  ASSERT_TRUE(FinishResponseWriter());
+  fake_internal_task_->SetDone(true);
+  EXPECT_OCMOCK_VERIFY((id)mock_delegate_);
+}
+
+// Tests a flow where the download finishes with an error.
+TEST_F(CWVDownloadTaskTest, FailedFlow) {
+  [cwv_task_ startDownloadToLocalFileAtPath:base::SysUTF8ToNSString(
+                                                valid_local_file_path_)];
+  ASSERT_TRUE(WaitUntilTaskStarts());
+
+  OCMExpect([mock_delegate_ downloadTask:cwv_task_
+                      didFinishWithError:[OCMArg isNotNil]]);
+  ASSERT_TRUE(FinishResponseWriter());
+  fake_internal_task_->SetErrorCode(net::ERR_FAILED);
+  fake_internal_task_->SetDone(true);
+  EXPECT_OCMOCK_VERIFY((id)mock_delegate_);
+}
+
+// Tests a flow where the download is cancelled.
+TEST_F(CWVDownloadTaskTest, CancelledFlow) {
+  [cwv_task_ startDownloadToLocalFileAtPath:base::SysUTF8ToNSString(
+                                                valid_local_file_path_)];
+  ASSERT_TRUE(WaitUntilTaskStarts());
+
+  ASSERT_TRUE(FinishResponseWriter());
+  [cwv_task_ cancel];
+  EXPECT_EQ(web::DownloadTask::State::kCancelled,
+            fake_internal_task_->GetState());
+}
+
+// Tests a case when it fails to write to the specified local file path.
+TEST_F(CWVDownloadTaskTest, WriteFailure) {
+  __block bool did_finish_called = false;
+  OCMStub([mock_delegate_ downloadTask:cwv_task_
+                    didFinishWithError:[OCMArg isNotNil]])
+      .andDo(^(NSInvocation*) {
+        did_finish_called = true;
+      });
+
+  NSString* path =
+      base::SysUTF8ToNSString(testing::TempDir() + "/non_existent_dir/foo.txt");
+  [cwv_task_ startDownloadToLocalFileAtPath:path];
+
+  EXPECT_TRUE(WaitUntilConditionOrTimeout(kWaitForFileOperationTimeout, ^{
+    scoped_task_environment_.RunUntilIdle();
+    return did_finish_called;
+  }));
+}
+
+// Tests properties of CWVDownloadTask.
+TEST_F(CWVDownloadTaskTest, Properties) {
+  // Specified in the constructor.
+  EXPECT_NSEQ([NSURL URLWithString:@"http://example.com/foo.txt"],
+              cwv_task_.originalURL);
+  EXPECT_NSEQ(@"text/plain", cwv_task_.MIMEType);
+
+  fake_internal_task_->SetSuggestedFilename(base::UTF8ToUTF16("foo.txt"));
+  EXPECT_NSEQ(@"foo.txt", cwv_task_.suggestedFileName);
+
+  fake_internal_task_->SetTotalBytes(1024);
+  EXPECT_EQ(1024, cwv_task_.totalBytes);
+
+  fake_internal_task_->SetTotalBytes(-1);  // Unknown
+  EXPECT_EQ(CWVDownloadSizeUnknown, cwv_task_.totalBytes);
+
+  fake_internal_task_->SetReceivedBytes(512);
+  EXPECT_EQ(512, cwv_task_.receivedBytes);
+
+  fake_internal_task_->SetPercentComplete(50);
+  EXPECT_FLOAT_EQ(0.5, cwv_task_.progress);
+
+  fake_internal_task_->SetPercentComplete(-1);  // Unknown
+  EXPECT_TRUE(isnan(cwv_task_.progress));
+}
+
+}  // namespace ios_web_view
diff --git a/ios/web_view/internal/web_view_browser_state.h b/ios/web_view/internal/web_view_browser_state.h
index f5c0671..7d9a7a3 100644
--- a/ios/web_view/internal/web_view_browser_state.h
+++ b/ios/web_view/internal/web_view_browser_state.h
@@ -20,6 +20,7 @@
 namespace ios_web_view {
 
 class WebViewURLRequestContextGetter;
+class WebViewDownloadManager;
 
 // WebView implementation of BrowserState. Can only be used only on the UI
 // thread.
@@ -65,6 +66,9 @@
   // The recording browser state associated with this browser state.
   WebViewBrowserState* recording_browser_state_;
 
+  // Handles browser downloads.
+  std::unique_ptr<WebViewDownloadManager> download_manager_;
+
   DISALLOW_COPY_AND_ASSIGN(WebViewBrowserState);
 };
 
diff --git a/ios/web_view/internal/web_view_browser_state.mm b/ios/web_view/internal/web_view_browser_state.mm
index f8d6be1..eb6a111 100644
--- a/ios/web_view/internal/web_view_browser_state.mm
+++ b/ios/web_view/internal/web_view_browser_state.mm
@@ -52,6 +52,7 @@
 #import "ios/web_view/internal/sync/web_view_profile_sync_service_factory.h"
 #include "ios/web_view/internal/translate/web_view_translate_accept_languages_factory.h"
 #include "ios/web_view/internal/translate/web_view_translate_ranker_factory.h"
+#include "ios/web_view/internal/web_view_download_manager.h"
 #include "ios/web_view/internal/web_view_url_request_context_getter.h"
 #include "ios/web_view/internal/webdata_services/web_view_web_data_service_wrapper_factory.h"
 #include "ui/base/l10n/l10n_util_mac.h"
@@ -69,7 +70,9 @@
 WebViewBrowserState::WebViewBrowserState(
     bool off_the_record,
     WebViewBrowserState* recording_browser_state /* = nullptr */)
-    : web::BrowserState(), off_the_record_(off_the_record) {
+    : web::BrowserState(),
+      off_the_record_(off_the_record),
+      download_manager_(std::make_unique<WebViewDownloadManager>(this)) {
   // A recording browser state must not be associated with another recording
   // browser state. An off the record browser state must be associated with
   // a recording browser state.
diff --git a/ios/web_view/internal/web_view_download_manager.h b/ios/web_view/internal/web_view_download_manager.h
new file mode 100644
index 0000000..dde9a09
--- /dev/null
+++ b/ios/web_view/internal/web_view_download_manager.h
@@ -0,0 +1,38 @@
+// Copyright 2018 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.
+
+#ifndef IOS_WEB_VIEW_INTERNAL_WEB_VIEW_DOWNLOAD_MANAGER_H_
+#define IOS_WEB_VIEW_INTERNAL_WEB_VIEW_DOWNLOAD_MANAGER_H_
+
+#include <memory>
+
+#include "ios/web/public/download/download_controller_delegate.h"
+
+namespace web {
+class BrowserState;
+class DownloadTask;
+class WebState;
+}  // namespace web
+
+namespace ios_web_view {
+
+// A class to handle browser downloads in //ios/web_view.
+class WebViewDownloadManager : public web::DownloadControllerDelegate {
+ public:
+  explicit WebViewDownloadManager(web::BrowserState* browser_state);
+  ~WebViewDownloadManager() override;
+  void OnDownloadCreated(web::DownloadController* download_controller,
+                         web::WebState* web_state,
+                         std::unique_ptr<web::DownloadTask> task) override;
+  void OnDownloadControllerDestroyed(
+      web::DownloadController* download_controller) override;
+
+ private:
+  web::BrowserState* browser_state_ = nullptr;
+  web::DownloadController* download_controller_ = nullptr;
+};
+
+}  // namespace ios_web_view
+
+#endif  // IOS_WEB_VIEW_INTERNAL_WEB_VIEW_DOWNLOAD_MANAGER_H_
diff --git a/ios/web_view/internal/web_view_download_manager.mm b/ios/web_view/internal/web_view_download_manager.mm
new file mode 100644
index 0000000..02b8341
--- /dev/null
+++ b/ios/web_view/internal/web_view_download_manager.mm
@@ -0,0 +1,52 @@
+// Copyright 2018 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 "ios/web_view/internal/web_view_download_manager.h"
+
+#include "ios/web/public/download/download_controller.h"
+#import "ios/web/public/download/download_task.h"
+#import "ios/web_view/internal/cwv_download_task_internal.h"
+#import "ios/web_view/internal/cwv_web_view_internal.h"
+#import "ios/web_view/public/cwv_navigation_delegate.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+namespace ios_web_view {
+
+WebViewDownloadManager::WebViewDownloadManager(web::BrowserState* browser_state)
+    : browser_state_(browser_state),
+      download_controller_(
+          web::DownloadController::FromBrowserState(browser_state_)) {
+  download_controller_->SetDelegate(this);
+}
+
+WebViewDownloadManager::~WebViewDownloadManager() {
+  if (download_controller_) {
+    download_controller_->SetDelegate(nullptr);
+  }
+}
+
+void WebViewDownloadManager::OnDownloadCreated(
+    web::DownloadController*,
+    web::WebState* web_state,
+    std::unique_ptr<web::DownloadTask> task) {
+  CWVWebView* web_view = [CWVWebView webViewForWebState:web_state];
+  if ([web_view.navigationDelegate
+          respondsToSelector:@selector(webView:didRequestDownloadWithTask:)]) {
+    CWVDownloadTask* cwv_task =
+        [[CWVDownloadTask alloc] initWithInternalTask:std::move(task)];
+    [web_view.navigationDelegate webView:web_view
+              didRequestDownloadWithTask:cwv_task];
+  }
+}
+
+void WebViewDownloadManager::OnDownloadControllerDestroyed(
+    web::DownloadController*) {
+  download_controller_->SetDelegate(nullptr);
+  download_controller_ = nullptr;
+}
+
+}  // namespace ios_web_view
diff --git a/ios/web_view/public/cwv_download_task.h b/ios/web_view/public/cwv_download_task.h
new file mode 100644
index 0000000..f851ff9
--- /dev/null
+++ b/ios/web_view/public/cwv_download_task.h
@@ -0,0 +1,84 @@
+// Copyright 2018 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.
+
+#ifndef IOS_WEB_VIEW_PUBLIC_CWV_DOWNLOAD_TASK_H_
+#define IOS_WEB_VIEW_PUBLIC_CWV_DOWNLOAD_TASK_H_
+
+#import <Foundation/Foundation.h>
+
+#import "cwv_export.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@protocol CWVDownloadTaskDelegate;
+
+// Indicates that a file size is unknown.
+FOUNDATION_EXPORT CWV_EXPORT int64_t const CWVDownloadSizeUnknown;
+
+// The error domain for download errors.
+FOUNDATION_EXPORT CWV_EXPORT NSErrorDomain const CWVDownloadErrorDomain;
+
+// An error code for CWVDownloadErrorDomain which doesn't indicate the cause.
+FOUNDATION_EXPORT CWV_EXPORT NSInteger const CWVDownloadErrorUnknown;
+
+// Represents a single browser download task.
+CWV_EXPORT
+@interface CWVDownloadTask : NSObject
+
+// Suggested name for the downloaded file including an extension.
+@property(nonatomic, readonly) NSString* suggestedFileName;
+
+// Effective MIME type of downloaded content.
+@property(nonatomic, readonly) NSString* MIMEType;
+
+// The URL that the download request originally attempted to fetch. This may
+// differ from the final download URL if there were redirects.
+@property(nonatomic, readonly) NSURL* originalURL;
+
+// Total number of expected bytes (a best-guess upper-bound). Returns
+// CWVDownloadSizeUnknown if the total size is unknown.
+@property(nonatomic, readonly) int64_t totalBytes;
+
+// Total number of bytes that have been received.
+@property(nonatomic, readonly) int64_t receivedBytes;
+
+// Rough progress of download, between 0.0 and 1.0.
+// It is NAN when the progress is unknown.
+@property(nonatomic, readonly) double progress;
+
+@property(nonatomic, weak, nullable) id<CWVDownloadTaskDelegate> delegate;
+
+- (instancetype)init NS_UNAVAILABLE;
+
+// Starts to download the file to a local file at |path|.
+//
+// This can be only called once. The local file is not deleted automatically. It
+// is the caller's responsibility to delete it when it is unnecessary.
+- (void)startDownloadToLocalFileAtPath:(NSString*)path;
+
+// Cancels the download. Once cancelled, it cannot be restarted.
+- (void)cancel;
+
+@end
+
+// Delegate to observe updates to CWVDownloadTask.
+@protocol CWVDownloadTaskDelegate<NSObject>
+@optional
+
+// Called when the download has finished. |error| is nil when it has completed
+// successfully. |error| represents the error when the download has failed
+// e.g., due to network errors. |error| contains a description which describes
+// the type of an error.
+- (void)downloadTask:(CWVDownloadTask*)downloadTask
+    didFinishWithError:(nullable NSError*)error;
+
+// Called when the progress of the download has changed. Refer to task.progress
+// to check the progress.
+- (void)downloadTaskProgressDidChange:(CWVDownloadTask*)downloadTask;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif  // IOS_WEB_VIEW_PUBLIC_CWV_DOWNLOAD_TASK_H_
diff --git a/ios/web_view/public/cwv_navigation_delegate.h b/ios/web_view/public/cwv_navigation_delegate.h
index 3a37520..0cc9a5061 100644
--- a/ios/web_view/public/cwv_navigation_delegate.h
+++ b/ios/web_view/public/cwv_navigation_delegate.h
@@ -10,6 +10,7 @@
 #import "cwv_navigation_type.h"
 
 @protocol CRIWVTranslateDelegate;
+@class CWVDownloadTask;
 @class CWVSSLStatus;
 @class CWVWebView;
 
@@ -72,6 +73,20 @@
                   decisionHandler:
                       (void (^)(CWVSSLErrorDecision))decisionHandler;
 
+// Called when the web view requests to start downloading a file.
+//
+// The delegate can either:
+//   - call [task startDownloadToLocalFileWithPath:] to start download
+//   immediately. - call [task startDownloadToLocalFileWithPath:] later. - do
+//   nothing in the method, to ignore the request.
+// It does nothing when the method is not implemented.
+//
+// The delegate must retain a strong reference to |task| until it completes
+// downloading or is cancelled. Otherwise it is deallocated immediately after
+// exiting this method.
+- (void)webView:(CWVWebView*)webView
+    didRequestDownloadWithTask:(CWVDownloadTask*)task;
+
 // Notifies the delegate that web view process was terminated
 // (usually by crashing, though possibly by other means).
 - (void)webViewWebContentProcessDidTerminate:(CWVWebView*)webView;
diff --git a/ios/web_view/shell/shell_view_controller.m b/ios/web_view/shell/shell_view_controller.m
index 4eda013..606b319 100644
--- a/ios/web_view/shell/shell_view_controller.m
+++ b/ios/web_view/shell/shell_view_controller.m
@@ -20,7 +20,8 @@
 NSString* const kWebViewShellJavaScriptDialogTextFieldAccessibiltyIdentifier =
     @"WebViewShellJavaScriptDialogTextFieldAccessibiltyIdentifier";
 
-@interface ShellViewController ()<CWVNavigationDelegate,
+@interface ShellViewController ()<CWVDownloadTaskDelegate,
+                                  CWVNavigationDelegate,
                                   CWVUIDelegate,
                                   CWVScriptCommandHandler,
                                   UITextFieldDelegate>
@@ -38,6 +39,13 @@
 @property(nonatomic, strong) ShellAutofillDelegate* autofillDelegate;
 // Handles the translation of the content displayed in |webView|.
 @property(nonatomic, strong) ShellTranslationDelegate* translationDelegate;
+// The on-going download task if any.
+@property(nonatomic, strong, nullable) CWVDownloadTask* downloadTask;
+// The path to a local file which the download task is writing to.
+@property(nonatomic, strong, nullable) NSString* downloadFilePath;
+// A controller to show a "Share" menu for the downloaded file.
+@property(nonatomic, strong, nullable)
+    UIDocumentInteractionController* documentInteractionController;
 
 - (void)back;
 - (void)forward;
@@ -58,6 +66,9 @@
 @synthesize toolbar = _toolbar;
 @synthesize webView = _webView;
 @synthesize translationDelegate = _translationDelegate;
+@synthesize downloadTask = _downloadTask;
+@synthesize downloadFilePath = _downloadFilePath;
+@synthesize documentInteractionController = _documentInteractionController;
 
 - (void)viewDidLoad {
   [super viewDidLoad];
@@ -518,6 +529,18 @@
   decisionHandler(CWVSSLErrorDecisionDoNothing);
 }
 
+- (void)webView:(CWVWebView*)webView
+    didRequestDownloadWithTask:(CWVDownloadTask*)task {
+  NSLog(@"%@", NSStringFromSelector(_cmd));
+  self.downloadTask = task;
+  NSString* documentDirectoryPath = NSSearchPathForDirectoriesInDomains(
+      NSDocumentDirectory, NSUserDomainMask, YES)[0];
+  self.downloadFilePath = [documentDirectoryPath
+      stringByAppendingPathComponent:task.suggestedFileName];
+  task.delegate = self;
+  [task startDownloadToLocalFileAtPath:self.downloadFilePath];
+}
+
 #pragma mark CWVScriptCommandHandler
 
 - (BOOL)webView:(CWVWebView*)webView
@@ -527,4 +550,25 @@
   return YES;
 }
 
+#pragma mark CWVDownloadTaskDelegate
+
+- (void)downloadTask:(CWVDownloadTask*)downloadTask
+    didFinishWithError:(nullable NSError*)error {
+  NSLog(@"%@", NSStringFromSelector(_cmd));
+  if (!error) {
+    NSURL* url = [NSURL fileURLWithPath:self.downloadFilePath];
+    self.documentInteractionController =
+        [UIDocumentInteractionController interactionControllerWithURL:url];
+    [self.documentInteractionController presentOptionsMenuFromRect:CGRectZero
+                                                            inView:self.view
+                                                          animated:YES];
+  }
+  self.downloadTask = nil;
+  self.downloadFilePath = nil;
+}
+
+- (void)downloadTaskProgressDidChange:(CWVDownloadTask*)downloadTask {
+  NSLog(@"%@", NSStringFromSelector(_cmd));
+}
+
 @end
diff --git a/ios/web_view/tools/build.py b/ios/web_view/tools/build.py
index 269d927..40fb124 100755
--- a/ios/web_view/tools/build.py
+++ b/ios/web_view/tools/build.py
@@ -233,6 +233,8 @@
   else:
     extra_gn_options += 'ios_web_view_enable_autofill=false '
   extra_gn_options += 'ios_web_view_output_name="%s" ' % output_name
+  # This is needed until all clients drop iOS 10 support.
+  extra_gn_options += 'ios_deployment_target="10.0" '
   # This prevents Breakpad from being included in the final binary to avoid
   # duplicate symbols with the client app.
   extra_gn_options += 'use_crash_key_stubs=true '
diff --git a/media/base/media_util.cc b/media/base/media_util.cc
index 2d2003c..501574d 100644
--- a/media/base/media_util.cc
+++ b/media/base/media_util.cc
@@ -4,10 +4,40 @@
 
 #include "media/base/media_util.h"
 
+#include "base/metrics/histogram_macros.h"
 #include "media/base/encryption_pattern.h"
 
 namespace media {
 
+namespace {
+
+// Reported to UMA server. Do not renumber or reuse values.
+enum class MediaVideoHeight {
+  k360_OrLower,
+  k480,
+  k720,
+  k1080,
+  k1440,
+  k2160_OrHigher,
+  kMaxValue = k2160_OrHigher,
+};
+
+MediaVideoHeight GetMediaVideoHeight(int height) {
+  if (height <= 400)
+    return MediaVideoHeight::k360_OrLower;
+  if (height <= 600)
+    return MediaVideoHeight::k480;
+  if (height <= 900)
+    return MediaVideoHeight::k720;
+  if (height <= 1260)
+    return MediaVideoHeight::k1080;
+  if (height <= 1800)
+    return MediaVideoHeight::k1440;
+  return MediaVideoHeight::k2160_OrHigher;
+}
+
+}  // namespace
+
 std::vector<uint8_t> EmptyExtraData() {
   return std::vector<uint8_t>();
 }
@@ -21,4 +51,14 @@
                           EncryptionPattern());
 }
 
+void ReportPepperVideoDecoderOutputPictureCountHW(int height) {
+  UMA_HISTOGRAM_ENUMERATION("Media.PepperVideoDecoderOutputPictureCount.HW",
+                            GetMediaVideoHeight(height));
+}
+
+void ReportPepperVideoDecoderOutputPictureCountSW(int height) {
+  UMA_HISTOGRAM_ENUMERATION("Media.PepperVideoDecoderOutputPictureCount.SW",
+                            GetMediaVideoHeight(height));
+}
+
 }  // namespace media
diff --git a/media/base/media_util.h b/media/base/media_util.h
index 89ee5493..d5f2600 100644
--- a/media/base/media_util.h
+++ b/media/base/media_util.h
@@ -24,6 +24,11 @@
 MEDIA_EXPORT EncryptionScheme Unencrypted();
 MEDIA_EXPORT EncryptionScheme AesCtrEncryptionScheme();
 
+// Helpers for PPAPI UMAs. There wasn't an obvious place to put them in
+// //content/renderer/pepper.
+MEDIA_EXPORT void ReportPepperVideoDecoderOutputPictureCountHW(int height);
+MEDIA_EXPORT void ReportPepperVideoDecoderOutputPictureCountSW(int height);
+
 class MEDIA_EXPORT NullMediaLog : public media::MediaLog {
  public:
   NullMediaLog() = default;
diff --git a/mojo/public/cpp/bindings/README.md b/mojo/public/cpp/bindings/README.md
index 1bd2fad3..9bf54a0 100644
--- a/mojo/public/cpp/bindings/README.md
+++ b/mojo/public/cpp/bindings/README.md
@@ -1332,6 +1332,35 @@
 type mapping can serve to enable custom validation logic in addition to making
 callsites and interface implemention more convenient.
 
+When the struct fields have non-primitive types, e.g. string or array,
+returning a read-only view of the data in the accessor is recommended to
+avoid copying. It is safe because the input object is guaranteed to
+outlive the usage of the result returned by the accessor method.
+
+The following example uses `StringPiece` to return a view of the GURL's
+data (`//url/mojom/url_gurl_mojom_traits.h`):
+
+``` cpp
+#include "base/strings/string_piece.h"
+#include "url/gurl.h"
+#include "url/mojom/url.mojom.h"
+#include "url/url_constants.h"
+
+namespace mojo {
+
+template <>
+struct StructTraits<url::mojom::UrlDataView, GURL> {
+  static base::StringPiece url(const GURL& r) {
+    if (r.possibly_invalid_spec().length() > url::kMaxURLChars ||
+        !r.is_valid()) {
+      return base::StringPiece();
+    }
+    return base::StringPiece(r.possibly_invalid_spec().c_str(),
+                             r.possibly_invalid_spec().length());
+  }
+}  // namespace mojo
+```
+
 ### Enabling a New Type Mapping
 
 We've defined the `StructTraits` necessary, but we still need to teach the
diff --git a/net/BUILD.gn b/net/BUILD.gn
index 9b0563bb..bf33ad65 100644
--- a/net/BUILD.gn
+++ b/net/BUILD.gn
@@ -2765,6 +2765,8 @@
 
   if (enable_reporting) {
     sources += [
+      "network_error_logging/network_error_logging_test_util.cc",
+      "network_error_logging/network_error_logging_test_util.h",
       "reporting/reporting_test_util.cc",
       "reporting/reporting_test_util.h",
     ]
@@ -5059,6 +5061,10 @@
     "third_party/quic/core/quic_framer_test.cc",
     "third_party/quic/core/quic_ietf_framer_test.cc",
     "third_party/quic/core/tls_handshaker_test.cc",
+    "third_party/quic/test_tools/quic_test_utils_test.cc",
+    "third_party/quic/test_tools/simple_session_notifier_test.cc",
+    "third_party/quic/test_tools/simulator/quic_endpoint_test.cc",
+    "third_party/quic/test_tools/simulator/simulator_test.cc",
 
     #    "third_party/quic/core/quic_multipath_received_packet_manager_test.cc",
     #    "third_party/quic/core/quic_multipath_transmissions_map_test.cc",
diff --git a/net/android/java/src/org/chromium/net/AndroidNetworkLibrary.java b/net/android/java/src/org/chromium/net/AndroidNetworkLibrary.java
index ce9dfc9f..34f4fc1 100644
--- a/net/android/java/src/org/chromium/net/AndroidNetworkLibrary.java
+++ b/net/android/java/src/org/chromium/net/AndroidNetworkLibrary.java
@@ -29,6 +29,7 @@
 import org.chromium.base.annotations.CalledByNativeUnchecked;
 import org.chromium.base.annotations.MainDex;
 import org.chromium.base.compat.ApiHelperForM;
+import org.chromium.base.metrics.RecordHistogram;
 
 import java.io.FileDescriptor;
 import java.io.IOException;
@@ -43,11 +44,15 @@
 import java.net.SocketException;
 import java.net.SocketImpl;
 import java.net.URLConnection;
+import java.net.UnknownHostException;
 import java.security.KeyStoreException;
 import java.security.NoSuchAlgorithmException;
 import java.security.cert.CertificateException;
 import java.util.Enumeration;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Locale;
+import java.util.Set;
 
 /**
  * This class implements net utilities required by the net component.
@@ -58,6 +63,47 @@
 
     // Cached Method for LinkProperties.isPrivateDnsActive().
     private static Method sIsPrivateDnsActiveMethod;
+    // Cached Method for LinkProperties.getPrivateDnsServerName().
+    private static Method sGetPrivateDnsServerNameMethod;
+
+    // Set of public DNS servers supporting DNS-over-HTTPS.
+    private static final Set<InetAddress> sAutoDohServers = new HashSet<>();
+    // Set of public DNS-over-TLS servers supporting DNS-over-HTTPS.
+    private static final Set<String> sAutoDohDotServers = new HashSet<>();
+
+    static {
+        try {
+            // Populate set of public DNS servers supporting DNS-over-HTTPS.
+
+            // Google Public DNS
+            sAutoDohServers.add(InetAddress.getByName("8.8.8.8"));
+            sAutoDohServers.add(InetAddress.getByName("8.8.4.4"));
+            sAutoDohServers.add(InetAddress.getByName("2001:4860:4860::8888"));
+            sAutoDohServers.add(InetAddress.getByName("2001:4860:4860::8844"));
+            // Cloudflare DNS
+            sAutoDohServers.add(InetAddress.getByName("1.1.1.1"));
+            sAutoDohServers.add(InetAddress.getByName("1.0.0.1"));
+            sAutoDohServers.add(InetAddress.getByName("2606:4700:4700::1111"));
+            sAutoDohServers.add(InetAddress.getByName("2606:4700:4700::1001"));
+            // Quad9 DNS
+            sAutoDohServers.add(InetAddress.getByName("9.9.9.9"));
+            sAutoDohServers.add(InetAddress.getByName("149.112.112.112"));
+            sAutoDohServers.add(InetAddress.getByName("2620:fe::fe"));
+            sAutoDohServers.add(InetAddress.getByName("2620:fe::9"));
+        } catch (UnknownHostException e) {
+            throw new RuntimeException("Failed to parse IP addresses", e);
+        }
+
+        // Populate set of public DNS-over-TLS servers supporting DNS-over-HTTPS.
+
+        // Google Public DNS
+        sAutoDohDotServers.add("dns.google");
+        // Cloudflare DNS
+        sAutoDohDotServers.add("1dot1dot1dot1.cloudflare-dns.com");
+        sAutoDohDotServers.add("cloudflare-dns.com");
+        // Quad9 DNS
+        sAutoDohDotServers.add("dns.quad9.net");
+    }
 
     /**
      * @return the mime type (if any) that is associated with the file
@@ -308,6 +354,27 @@
     }
 
     /**
+     * @returns result of linkProperties.getPrivateDnsServerName().
+     */
+    private static String getPrivateDnsServerName(LinkProperties linkProperties) {
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P && linkProperties != null) {
+            // TODO(pauljensen): When Android P SDK is available, remove reflection.
+            try {
+                // This could be racy if called on multiple threads, but races will
+                // end in the same result so it's not a problem.
+                if (sGetPrivateDnsServerNameMethod == null) {
+                    sGetPrivateDnsServerNameMethod =
+                            linkProperties.getClass().getMethod("getPrivateDnsServerName");
+                }
+                return (String) sGetPrivateDnsServerNameMethod.invoke(linkProperties);
+            } catch (Exception e) {
+                Log.e(TAG, "Can not call LinkProperties.getPrivateDnsServerName():", e);
+            }
+        }
+        return null;
+    }
+
+    /**
      * Returns list of IP addresses of DNS servers.
      * If private DNS is active, then returns a 1x1 array.
      */
@@ -328,10 +395,28 @@
         if (linkProperties == null) {
             return new byte[0][0];
         }
+        List<InetAddress> dnsServersList = linkProperties.getDnsServers();
+        // Determine if any DNS servers could be auto-upgraded to DNS-over-HTTPS.
+        boolean autoDoh = false;
+        for (InetAddress dnsServer : dnsServersList) {
+            if (sAutoDohServers.contains(dnsServer)) {
+                autoDoh = true;
+                break;
+            }
+        }
         if (isPrivateDnsActive(linkProperties)) {
+            String privateDnsServerName = getPrivateDnsServerName(linkProperties);
+            // If user explicitly selected a DNS-over-TLS server...
+            if (privateDnsServerName != null) {
+                // ...their DNS-over-HTTPS support depends on the DNS-over-TLS server name.
+                autoDoh = sAutoDohDotServers.contains(privateDnsServerName.toLowerCase(Locale.US));
+            }
+            RecordHistogram.recordBooleanHistogram(
+                    "Net.DNS.Android.DotExplicit", privateDnsServerName != null);
+            RecordHistogram.recordBooleanHistogram("Net.DNS.Android.AutoDohPrivate", autoDoh);
             return new byte[1][1];
         }
-        List<InetAddress> dnsServersList = linkProperties.getDnsServers();
+        RecordHistogram.recordBooleanHistogram("Net.DNS.Android.AutoDohPublic", autoDoh);
         byte[][] dnsServers = new byte[dnsServersList.size()][];
         for (int i = 0; i < dnsServersList.size(); i++) {
             dnsServers[i] = dnsServersList.get(i).getAddress();
diff --git a/net/dns/host_resolver_impl.cc b/net/dns/host_resolver_impl.cc
index cdec85e2..a701c0b 100644
--- a/net/dns/host_resolver_impl.cc
+++ b/net/dns/host_resolver_impl.cc
@@ -38,6 +38,7 @@
 #include "base/metrics/field_trial_params.h"
 #include "base/metrics/histogram_functions.h"
 #include "base/metrics/histogram_macros.h"
+#include "base/no_destructor.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
@@ -87,6 +88,7 @@
 #endif
 
 #if defined(OS_ANDROID)
+#include "base/android/build_info.h"
 #include "net/android/network_library.h"
 #endif
 
@@ -263,18 +265,6 @@
     UMA_HISTOGRAM_LONG_TIMES_100(basename, time);                  \
   } while (0)
 
-// Record time from Request creation until a valid DNS response.
-void RecordTotalTime(bool speculative,
-                     bool from_cache,
-                     base::TimeDelta duration) {
-  if (!speculative) {
-    UMA_HISTOGRAM_LONG_TIMES_100("Net.DNS.TotalTime", duration);
-
-    if (!from_cache)
-      UMA_HISTOGRAM_LONG_TIMES_100("Net.DNS.TotalTimeNotCached", duration);
-  }
-}
-
 void RecordTTL(base::TimeDelta ttl) {
   UMA_HISTOGRAM_CUSTOM_TIMES("AsyncDNS.TTL", ttl,
                              base::TimeDelta::FromSeconds(1),
@@ -583,6 +573,22 @@
   stale_info->stale_hits = 0;
 }
 
+// Is |dns_server| within the list of known DNS servers that also support
+// DNS-over-HTTPS?
+bool DnsServerSupportsDoh(const IPAddress& dns_server) {
+  const static base::NoDestructor<std::unordered_set<std::string>>
+      upgradable_servers({
+          // Google Public DNS
+          "8.8.8.8", "8.8.4.4", "2001:4860:4860::8888", "2001:4860:4860::8844",
+          // Cloudflare DNS
+          "1.1.1.1", "1.0.0.1", "2606:4700:4700::1111", "2606:4700:4700::1001",
+          // Quad9 DNS
+          "9.9.9.9", "149.112.112.112", "2620:fe::fe", "2620:fe::9",
+      });
+  return upgradable_servers->find(dns_server.ToString()) !=
+         upgradable_servers->end();
+}
+
 }  // namespace
 
 //-----------------------------------------------------------------------------
@@ -2049,9 +2055,9 @@
       LogFinishRequest(req->source_net_log(), entry.error());
       if (did_complete) {
         // Record effective total time from creation to completion.
-        RecordTotalTime(req->parameters().is_speculative,
-                        false /* from_cache */,
-                        tick_clock_->NowTicks() - req->request_time());
+        resolver_->RecordTotalTime(
+            req->parameters().is_speculative, false /* from_cache */,
+            tick_clock_->NowTicks() - req->request_time());
       }
       if (entry.error() == OK && !req->parameters().is_speculative) {
         req->set_address_results(EnsurePortOnAddressList(
@@ -2209,6 +2215,7 @@
     received_dns_config_ = dns_config.IsValid();
     // Conservatively assume local IPv6 is needed when DnsConfig is not valid.
     use_local_ipv6_ = !dns_config.IsValid() || dns_config.use_local_ipv6;
+    UpdateModeForHistogram(dns_config);
   }
 
   allow_fallback_to_proctask_ = !ConfigureAsyncDnsNoFallbackFieldTrial();
@@ -2730,6 +2737,39 @@
     cache_->Set(key, entry, tick_clock_->NowTicks(), ttl);
 }
 
+// Record time from Request creation until a valid DNS response.
+void HostResolverImpl::RecordTotalTime(bool speculative,
+                                       bool from_cache,
+                                       base::TimeDelta duration) const {
+  if (!speculative) {
+    UMA_HISTOGRAM_LONG_TIMES_100("Net.DNS.TotalTime", duration);
+
+    switch (mode_for_histogram_) {
+      case MODE_FOR_HISTOGRAM_SYSTEM:
+        UMA_HISTOGRAM_MEDIUM_TIMES("Net.DNS.TotalTimeTyped.System", duration);
+        break;
+      case MODE_FOR_HISTOGRAM_SYSTEM_SUPPORTS_DOH:
+        UMA_HISTOGRAM_MEDIUM_TIMES("Net.DNS.TotalTimeTyped.SystemSupportsDoh",
+                                   duration);
+        break;
+      case MODE_FOR_HISTOGRAM_SYSTEM_PRIVATE_DNS:
+        UMA_HISTOGRAM_MEDIUM_TIMES("Net.DNS.TotalTimeTyped.SystemPrivate",
+                                   duration);
+        break;
+      case MODE_FOR_HISTOGRAM_ASYNC_DNS:
+        UMA_HISTOGRAM_MEDIUM_TIMES("Net.DNS.TotalTimeTyped.Async", duration);
+        break;
+      case MODE_FOR_HISTOGRAM_ASYNC_DNS_PRIVATE_SUPPORTS_DOH:
+        UMA_HISTOGRAM_MEDIUM_TIMES(
+            "Net.DNS.TotalTimeTyped.AsyncPrivateSupportsDoh", duration);
+        break;
+    }
+
+    if (!from_cache)
+      UMA_HISTOGRAM_LONG_TIMES_100("Net.DNS.TotalTimeNotCached", duration);
+  }
+}
+
 std::unique_ptr<HostResolverImpl::Job> HostResolverImpl::RemoveJob(Job* job) {
   DCHECK(job);
   std::unique_ptr<Job> retval;
@@ -3007,6 +3047,8 @@
     if (self.get())
       TryServingAllJobsFromHosts();
   }
+
+  UpdateModeForHistogram(dns_config);
 }
 
 bool HostResolverImpl::HaveDnsConfig() const {
@@ -3064,6 +3106,37 @@
 #endif
 }
 
+void HostResolverImpl::UpdateModeForHistogram(const DnsConfig& dns_config) {
+  // Resolving with Async DNS resolver?
+  if (HaveDnsConfig()) {
+    mode_for_histogram_ = MODE_FOR_HISTOGRAM_ASYNC_DNS;
+    for (const auto& dns_server : dns_client_->GetConfig()->nameservers) {
+      if (DnsServerSupportsDoh(dns_server.address())) {
+        mode_for_histogram_ = MODE_FOR_HISTOGRAM_ASYNC_DNS_PRIVATE_SUPPORTS_DOH;
+        break;
+      }
+    }
+  } else {
+    mode_for_histogram_ = MODE_FOR_HISTOGRAM_SYSTEM;
+    for (const auto& dns_server : dns_config.nameservers) {
+      if (DnsServerSupportsDoh(dns_server.address())) {
+        mode_for_histogram_ = MODE_FOR_HISTOGRAM_SYSTEM_SUPPORTS_DOH;
+        break;
+      }
+    }
+#if defined(OS_ANDROID)
+    if (base::android::BuildInfo::GetInstance()->sdk_int() >=
+        base::android::SDK_VERSION_P) {
+      std::vector<IPEndPoint> dns_servers;
+      if (net::android::GetDnsServers(&dns_servers) ==
+          internal::CONFIG_PARSE_POSIX_PRIVATE_DNS_ACTIVE) {
+        mode_for_histogram_ = MODE_FOR_HISTOGRAM_SYSTEM_PRIVATE_DNS;
+      }
+    }
+#endif  // defined(OS_ANDROID)
+  }
+}
+
 HostResolverImpl::RequestImpl::~RequestImpl() {
   if (job_)
     job_->CancelRequest(this);
diff --git a/net/dns/host_resolver_impl.h b/net/dns/host_resolver_impl.h
index 6c0c9a5..c527504 100644
--- a/net/dns/host_resolver_impl.h
+++ b/net/dns/host_resolver_impl.h
@@ -205,6 +205,7 @@
 
  private:
   friend class HostResolverImplTest;
+  FRIEND_TEST_ALL_PREFIXES(HostResolverImplDnsTest, ModeForHistogram);
   class Job;
   class ProcTask;
   class LoopbackProbeJob;
@@ -214,6 +215,22 @@
   using Key = HostCache::Key;
   using JobMap = std::map<Key, std::unique_ptr<Job>>;
 
+  // Current resolver mode, useful for breaking down histograms.
+  enum ModeForHistogram {
+    // Using the system (i.e. O/S's) resolver.
+    MODE_FOR_HISTOGRAM_SYSTEM,
+    // Using the system resolver, which is in turn using private DNS.
+    MODE_FOR_HISTOGRAM_SYSTEM_PRIVATE_DNS,
+    // Using the system resolver, which is using DNS servers which offer
+    // DNS-over-HTTPS service.
+    MODE_FOR_HISTOGRAM_SYSTEM_SUPPORTS_DOH,
+    // Using Chromium DNS resolver.
+    MODE_FOR_HISTOGRAM_ASYNC_DNS,
+    // Using Chromium DNS resolver which is using DNS servers which offer
+    // DNS-over-HTTPS service.
+    MODE_FOR_HISTOGRAM_ASYNC_DNS_PRIVATE_SUPPORTS_DOH,
+  };
+
   // Number of consecutive failures of DnsTask (with successful fallback to
   // ProcTask) before the DnsClient is disabled until the next DNS change.
   static const unsigned kMaximumDnsFailures;
@@ -318,6 +335,11 @@
                    const HostCache::Entry& entry,
                    base::TimeDelta ttl);
 
+  // Record time from Request creation until a valid DNS response.
+  void RecordTotalTime(bool speculative,
+                       bool from_cache,
+                       base::TimeDelta duration) const;
+
   // Removes |job| from |jobs_| and return, only if it exists.
   std::unique_ptr<Job> RemoveJob(Job* job);
 
@@ -368,6 +390,9 @@
     return dispatcher_->num_running_jobs();
   }
 
+  // Update |mode_for_histogram_|. Called when DNS config changes.
+  void UpdateModeForHistogram(const DnsConfig& dns_config);
+
   // Cache of host resolution results.
   std::unique_ptr<HostCache> cache_;
 
@@ -436,6 +461,9 @@
   // TaskScheduler task runner, but can be overridden for tests.
   scoped_refptr<base::TaskRunner> proc_task_runner_;
 
+  // Current resolver mode, useful for breaking down histogram data.
+  ModeForHistogram mode_for_histogram_;
+
   URLRequestContext* url_request_context_;
 
   // Shared tick clock, overridden for testing.
diff --git a/net/dns/host_resolver_impl_unittest.cc b/net/dns/host_resolver_impl_unittest.cc
index 61e8254..82f17cf 100644
--- a/net/dns/host_resolver_impl_unittest.cc
+++ b/net/dns/host_resolver_impl_unittest.cc
@@ -6179,4 +6179,50 @@
   EXPECT_THAT(response.result_error(), IsOk());
 }
 
+// Test HostResolverImpl::UpdateModeForHistogram.
+TEST_F(HostResolverImplDnsTest, ModeForHistogram) {
+  // Test Async resolver is detected.
+  ChangeDnsConfig(CreateValidDnsConfig());
+  EXPECT_EQ(resolver_->mode_for_histogram_,
+            HostResolverImpl::MODE_FOR_HISTOGRAM_ASYNC_DNS);
+
+  // Test upgradability is detected for async DNS.
+  const static std::vector<const char*> upgradable_servers(
+      {// Google Public DNS
+       "8.8.8.8", "8.8.4.4", "2001:4860:4860::8888", "2001:4860:4860::8844",
+       // Cloudflare DNS
+       "1.1.1.1", "1.0.0.1", "2606:4700:4700::1111", "2606:4700:4700::1001",
+       // Quad9 DNS
+       "9.9.9.9", "149.112.112.112", "2620:fe::fe", "2620:fe::9"});
+  for (const char* upgradable_server : upgradable_servers) {
+    IPAddress ip_address;
+    ASSERT_TRUE(ip_address.AssignFromIPLiteral(upgradable_server));
+    DnsConfig dns_config;
+    dns_config.nameservers.push_back(
+        IPEndPoint(ip_address, dns_protocol::kDefaultPort));
+    ChangeDnsConfig(dns_config);
+    EXPECT_EQ(
+        resolver_->mode_for_histogram_,
+        HostResolverImpl::MODE_FOR_HISTOGRAM_ASYNC_DNS_PRIVATE_SUPPORTS_DOH);
+  }
+
+  // Test system resolver is detected.
+  resolver_->SetDnsClient(nullptr);
+  ChangeDnsConfig(CreateValidDnsConfig());
+  EXPECT_EQ(resolver_->mode_for_histogram_,
+            HostResolverImpl::MODE_FOR_HISTOGRAM_SYSTEM);
+
+  // Test upgradability is detected for system resolver.
+  for (const char* upgradable_server : upgradable_servers) {
+    IPAddress ip_address;
+    ASSERT_TRUE(ip_address.AssignFromIPLiteral(upgradable_server));
+    DnsConfig dns_config;
+    dns_config.nameservers.push_back(
+        IPEndPoint(ip_address, dns_protocol::kDefaultPort));
+    ChangeDnsConfig(dns_config);
+    EXPECT_EQ(resolver_->mode_for_histogram_,
+              HostResolverImpl::MODE_FOR_HISTOGRAM_SYSTEM_SUPPORTS_DOH);
+  }
+}
+
 }  // namespace net
diff --git a/net/http/http_network_session.cc b/net/http/http_network_session.cc
index 35bb48fa..584d866 100644
--- a/net/http/http_network_session.cc
+++ b/net/http/http_network_session.cc
@@ -166,10 +166,14 @@
       net_log(nullptr),
       socket_performance_watcher_factory(nullptr),
       network_quality_estimator(nullptr),
+#if BUILDFLAG(ENABLE_REPORTING)
+      network_error_logging_service(nullptr),
+#endif
       quic_clock(nullptr),
       quic_random(nullptr),
       quic_crypto_client_stream_factory(
-          QuicCryptoClientStreamFactory::GetDefaultFactory()) {}
+          QuicCryptoClientStreamFactory::GetDefaultFactory()) {
+}
 
 HttpNetworkSession::Context::Context(const Context& other) = default;
 
@@ -182,6 +186,9 @@
       http_server_properties_(context.http_server_properties),
       cert_verifier_(context.cert_verifier),
       http_auth_handler_factory_(context.http_auth_handler_factory),
+#if BUILDFLAG(ENABLE_REPORTING)
+      network_error_logging_service_(context.network_error_logging_service),
+#endif
       proxy_resolution_service_(context.proxy_resolution_service),
       ssl_config_service_(context.ssl_config_service),
       websocket_endpoint_lock_manager_(
diff --git a/net/http/http_network_session.h b/net/http/http_network_session.h
index 6dc37fd..9df3c255e 100644
--- a/net/http/http_network_session.h
+++ b/net/http/http_network_session.h
@@ -22,12 +22,14 @@
 #include "base/memory/weak_ptr.h"
 #include "base/optional.h"
 #include "base/threading/thread_checker.h"
+#include "build/buildflag.h"
 #include "net/base/host_mapping_rules.h"
 #include "net/base/host_port_pair.h"
 #include "net/base/net_export.h"
 #include "net/dns/host_resolver.h"
 #include "net/http/http_auth_cache.h"
 #include "net/http/http_stream_factory.h"
+#include "net/net_buildflags.h"
 #include "net/quic/quic_stream_factory.h"
 #include "net/socket/next_proto.h"
 #include "net/spdy/spdy_session_pool.h"
@@ -56,6 +58,9 @@
 class HttpResponseBodyDrainer;
 class HttpServerProperties;
 class NetLog;
+#if BUILDFLAG(ENABLE_REPORTING)
+class NetworkErrorLoggingService;
+#endif
 class NetworkQualityEstimator;
 class ProxyResolutionService;
 }  // namespace net
@@ -258,6 +263,9 @@
     NetLog* net_log;
     SocketPerformanceWatcherFactory* socket_performance_watcher_factory;
     NetworkQualityEstimator* network_quality_estimator;
+#if BUILDFLAG(ENABLE_REPORTING)
+    NetworkErrorLoggingService* network_error_logging_service;
+#endif
 
     // Source of time for QUIC connections.
     quic::QuicClock* quic_clock;
@@ -320,6 +328,11 @@
   NetLog* net_log() {
     return net_log_;
   }
+#if BUILDFLAG(ENABLE_REPORTING)
+  NetworkErrorLoggingService* network_error_logging_service() const {
+    return network_error_logging_service_;
+  }
+#endif
 
   // Creates a Value summary of the state of the socket pools.
   std::unique_ptr<base::Value> SocketPoolInfoToValue() const;
@@ -377,6 +390,9 @@
   CertVerifier* const cert_verifier_;
   HttpAuthHandlerFactory* const http_auth_handler_factory_;
 
+#if BUILDFLAG(ENABLE_REPORTING)
+  NetworkErrorLoggingService* const network_error_logging_service_;
+#endif
   ProxyResolutionService* const proxy_resolution_service_;
   SSLConfigService* const ssl_config_service_;
 
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index 12b8b561..1870732 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -70,6 +70,10 @@
 #include "url/gurl.h"
 #include "url/url_canon.h"
 
+#if BUILDFLAG(ENABLE_REPORTING)
+#include "net/network_error_logging/network_error_logging_service.h"
+#endif
+
 namespace {
 
 // Max number of |retry_attempts| (excluding the initial request) after which
@@ -1190,6 +1194,10 @@
   if (rv != OK)
     return rv;
 
+#if BUILDFLAG(ENABLE_REPORTING)
+  ProcessNetworkErrorLoggingHeader();
+#endif
+
   headers_valid_ = true;
 
   // We have reached the end of Start state machine, set the RequestInfo to
@@ -1296,6 +1304,43 @@
   return OK;
 }
 
+#if BUILDFLAG(ENABLE_REPORTING)
+void HttpNetworkTransaction::ProcessNetworkErrorLoggingHeader() {
+  std::string value;
+  if (!response_.headers->GetNormalizedHeader(
+          NetworkErrorLoggingService::kHeaderName, &value)) {
+    return;
+  }
+
+  NetworkErrorLoggingService* service =
+      session_->network_error_logging_service();
+  if (!service) {
+    NetworkErrorLoggingService::
+        RecordHeaderDiscardedForNoNetworkErrorLoggingService();
+    return;
+  }
+
+  // Only accept NEL headers on HTTPS connections that have no certificate
+  // errors.
+  if (!response_.ssl_info.is_valid()) {
+    NetworkErrorLoggingService::RecordHeaderDiscardedForInvalidSSLInfo();
+    return;
+  }
+  if (IsCertStatusError(response_.ssl_info.cert_status)) {
+    NetworkErrorLoggingService::RecordHeaderDiscardedForCertStatusError();
+    return;
+  }
+
+  if (remote_endpoint_.address().empty()) {
+    NetworkErrorLoggingService::RecordHeaderDiscardedForMissingRemoteEndpoint();
+    return;
+  }
+
+  service->OnHeader(url::Origin::Create(url_), remote_endpoint_.address(),
+                    value);
+}
+#endif
+
 int HttpNetworkTransaction::HandleCertificateRequest(int error) {
   // There are two paths through which the server can request a certificate
   // from us.  The first is during the initial handshake, the second is
diff --git a/net/http/http_network_transaction.h b/net/http/http_network_transaction.h
index e0105d06..163ad12 100644
--- a/net/http/http_network_transaction.h
+++ b/net/http/http_network_transaction.h
@@ -14,6 +14,7 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/time/time.h"
+#include "build/buildflag.h"
 #include "crypto/ec_private_key.h"
 #include "net/base/completion_once_callback.h"
 #include "net/base/completion_repeating_callback.h"
@@ -27,6 +28,7 @@
 #include "net/http/http_stream_request.h"
 #include "net/http/http_transaction.h"
 #include "net/log/net_log_with_source.h"
+#include "net/net_buildflags.h"
 #include "net/proxy_resolution/proxy_resolution_service.h"
 #include "net/socket/connection_attempts.h"
 #include "net/ssl/channel_id_service.h"
@@ -202,6 +204,13 @@
 
   int BuildRequestHeaders(bool using_http_proxy_without_tunnel);
 
+#if BUILDFLAG(ENABLE_REPORTING)
+  // Processes the NEL header, if one exists. This header configures whether
+  // network errors will be reported to a specified group of endpoints using the
+  // Reporting API.
+  void ProcessNetworkErrorLoggingHeader();
+#endif
+
   // Writes a log message to help debugging in the field when we block a proxy
   // response to a CONNECT request.
   void LogBlockedTunnelResponse(int response_code) const;
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc
index 4d3cb523..1182d0f 100644
--- a/net/http/http_network_transaction_unittest.cc
+++ b/net/http/http_network_transaction_unittest.cc
@@ -26,6 +26,7 @@
 #include "base/strings/string_piece.h"
 #include "base/strings/string_util.h"
 #include "base/strings/utf_string_conversions.h"
+#include "base/test/metrics/histogram_tester.h"
 #include "base/test/test_file_util.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "net/base/auth.h"
@@ -107,6 +108,11 @@
 #include "net/ntlm/ntlm_test_data.h"
 #endif
 
+#if BUILDFLAG(ENABLE_REPORTING)
+#include "net/network_error_logging/network_error_logging_service.h"
+#include "net/network_error_logging/network_error_logging_test_util.h"
+#endif  // BUILDFLAG(ENABLE_REPORTING)
+
 using net::test::IsError;
 using net::test::IsOk;
 
@@ -17311,4 +17317,121 @@
   EXPECT_THAT(callback.WaitForResult(), IsError(ERR_NO_SUPPORTED_PROXIES));
 }
 
+//-----------------------------------------------------------------------------
+// Network Error Logging tests
+
+#if BUILDFLAG(ENABLE_REPORTING)
+class HttpNetworkTransactionNetworkErrorLoggingTest
+    : public HttpNetworkTransactionTest {
+ protected:
+  void SetUp() override {
+    auto network_error_logging_service =
+        std::make_unique<TestNetworkErrorLoggingService>();
+    test_network_error_logging_service_ = network_error_logging_service.get();
+    session_deps_.network_error_logging_service =
+        std::move(network_error_logging_service);
+  }
+
+  TestNetworkErrorLoggingService* network_error_logging_service() const {
+    return test_network_error_logging_service_;
+  }
+
+  void clear_network_error_logging_service() {
+    session_deps_.network_error_logging_service.reset();
+    test_network_error_logging_service_ = nullptr;
+  }
+
+  // Makes an HTTPS request that should install a valid NEL policy.
+  void RequestPolicy() {
+    MockRead data_reads[] = {
+        MockRead("HTTP/1.0 200 OK\r\n"),
+        MockRead("NEL: {\"report_to\": \"nel\", \"max_age\": 86400}\r\n"),
+        MockRead("\r\n"),
+        MockRead("hello world"),
+        MockRead(SYNCHRONOUS, OK),
+    };
+    MockWrite data_writes[] = {
+        MockWrite("GET / HTTP/1.1\r\n"
+                  "Host: www.example.org\r\n"
+                  "Connection: keep-alive\r\n\r\n"),
+    };
+
+    HttpRequestInfo request;
+    request.method = "GET";
+    request.url = GURL(url_);
+    request.traffic_annotation =
+        net::MutableNetworkTrafficAnnotationTag(TRAFFIC_ANNOTATION_FOR_TESTS);
+
+    SSLSocketDataProvider ssl(ASYNC, OK);
+    if (request.url.SchemeIsCryptographic()) {
+      ssl.ssl_info.cert =
+          ImportCertFromFile(GetTestCertsDirectory(), "wildcard.pem");
+      ASSERT_TRUE(ssl.ssl_info.cert);
+      ssl.ssl_info.cert_status = cert_status_;
+      session_deps_.socket_factory->AddSSLSocketDataProvider(&ssl);
+    }
+
+    StaticSocketDataProvider reads(data_reads, data_writes);
+    session_deps_.socket_factory->AddSocketDataProvider(&reads);
+
+    TestCompletionCallback callback;
+    auto session = CreateSession(&session_deps_);
+    HttpNetworkTransaction trans(DEFAULT_PRIORITY, session.get());
+    int rv = trans.Start(&request, callback.callback(), NetLogWithSource());
+    EXPECT_THAT(rv, IsError(ERR_IO_PENDING));
+    EXPECT_THAT(callback.WaitForResult(), IsOk());
+  }
+
+ protected:
+  std::string url_ = "https://www.example.org/";
+  CertStatus cert_status_ = 0;
+
+ private:
+  TestNetworkErrorLoggingService* test_network_error_logging_service_;
+};
+
+TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest,
+       DontProcessNelHeaderNoService) {
+  base::HistogramTester histograms;
+  clear_network_error_logging_service();
+  RequestPolicy();
+  histograms.ExpectBucketCount(
+      NetworkErrorLoggingService::kHeaderOutcomeHistogram,
+      NetworkErrorLoggingService::HeaderOutcome::
+          DISCARDED_NO_NETWORK_ERROR_LOGGING_SERVICE,
+      1);
+}
+
+TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest,
+       DontProcessNelHeaderHttp) {
+  base::HistogramTester histograms;
+  url_ = "http://www.example.org/";
+  RequestPolicy();
+  histograms.ExpectBucketCount(
+      NetworkErrorLoggingService::kHeaderOutcomeHistogram,
+      NetworkErrorLoggingService::HeaderOutcome::DISCARDED_INVALID_SSL_INFO, 1);
+}
+
+TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest, ProcessNelHeaderHttps) {
+  RequestPolicy();
+  ASSERT_EQ(1u, network_error_logging_service()->headers().size());
+  const auto& header = network_error_logging_service()->headers()[0];
+  EXPECT_EQ(url::Origin::Create(GURL("https://www.example.org/")),
+            header.origin);
+  EXPECT_EQ(IPAddress::IPv4Localhost(), header.received_ip_address);
+  EXPECT_EQ("{\"report_to\": \"nel\", \"max_age\": 86400}", header.value);
+}
+
+TEST_F(HttpNetworkTransactionNetworkErrorLoggingTest,
+       DontProcessNelHeaderInvalidHttps) {
+  base::HistogramTester histograms;
+  cert_status_ = CERT_STATUS_COMMON_NAME_INVALID;
+  RequestPolicy();
+  histograms.ExpectBucketCount(
+      NetworkErrorLoggingService::kHeaderOutcomeHistogram,
+      NetworkErrorLoggingService::HeaderOutcome::DISCARDED_CERT_STATUS_ERROR,
+      1);
+}
+#endif  // BUILDFLAG(ENABLE_REPORTING)
+
 }  // namespace net
diff --git a/net/network_error_logging/network_error_logging_service.cc b/net/network_error_logging/network_error_logging_service.cc
index 2981e70..63a02cdf 100644
--- a/net/network_error_logging/network_error_logging_service.cc
+++ b/net/network_error_logging/network_error_logging_service.cc
@@ -130,33 +130,10 @@
   return request.status_code >= 400 && request.status_code < 600;
 }
 
-enum class HeaderOutcome {
-  DISCARDED_NO_NETWORK_ERROR_LOGGING_SERVICE = 0,
-  DISCARDED_INVALID_SSL_INFO = 1,
-  DISCARDED_CERT_STATUS_ERROR = 2,
-
-  DISCARDED_INSECURE_ORIGIN = 3,
-
-  DISCARDED_JSON_TOO_BIG = 4,
-  DISCARDED_JSON_INVALID = 5,
-  DISCARDED_NOT_DICTIONARY = 6,
-  DISCARDED_TTL_MISSING = 7,
-  DISCARDED_TTL_NOT_INTEGER = 8,
-  DISCARDED_TTL_NEGATIVE = 9,
-  DISCARDED_REPORT_TO_MISSING = 10,
-  DISCARDED_REPORT_TO_NOT_STRING = 11,
-
-  REMOVED = 12,
-  SET = 13,
-
-  DISCARDED_MISSING_REMOTE_ENDPOINT = 14,
-
-  MAX
-};
-
-void RecordHeaderOutcome(HeaderOutcome outcome) {
-  UMA_HISTOGRAM_ENUMERATION("Net.NetworkErrorLogging.HeaderOutcome", outcome,
-                            HeaderOutcome::MAX);
+void RecordHeaderOutcome(NetworkErrorLoggingService::HeaderOutcome outcome) {
+  UMA_HISTOGRAM_ENUMERATION(NetworkErrorLoggingService::kHeaderOutcomeHistogram,
+                            outcome,
+                            NetworkErrorLoggingService::HeaderOutcome::MAX);
 }
 
 enum class RequestOutcome {
@@ -220,6 +197,7 @@
     if (policy.expires.is_null())
       return;
 
+    DVLOG(1) << "Received NEL policy for " << origin;
     auto inserted = policies_.insert(std::make_pair(origin, policy));
     DCHECK(inserted.second);
     MaybeAddWildcardPolicy(origin, &inserted.first->second);
@@ -578,6 +556,10 @@
 
 const char NetworkErrorLoggingService::kReportType[] = "network-error";
 
+// static
+const char NetworkErrorLoggingService::kHeaderOutcomeHistogram[] =
+    "Net.NetworkErrorLogging.HeaderOutcome";
+
 // Allow NEL reports on regular requests, plus NEL reports on Reporting uploads
 // containing only regular requests, but do not allow NEL reports on Reporting
 // uploads containing Reporting uploads.
diff --git a/net/network_error_logging/network_error_logging_service.h b/net/network_error_logging/network_error_logging_service.h
index 058c0ad2..87456134 100644
--- a/net/network_error_logging/network_error_logging_service.h
+++ b/net/network_error_logging/network_error_logging_service.h
@@ -89,6 +89,35 @@
   static const char kPhaseKey[];
   static const char kTypeKey[];
 
+  // Histograms.  These are mainly used in test cases to verify that interesting
+  // events occurred.
+
+  static const char kHeaderOutcomeHistogram[];
+
+  enum class HeaderOutcome {
+    DISCARDED_NO_NETWORK_ERROR_LOGGING_SERVICE = 0,
+    DISCARDED_INVALID_SSL_INFO = 1,
+    DISCARDED_CERT_STATUS_ERROR = 2,
+
+    DISCARDED_INSECURE_ORIGIN = 3,
+
+    DISCARDED_JSON_TOO_BIG = 4,
+    DISCARDED_JSON_INVALID = 5,
+    DISCARDED_NOT_DICTIONARY = 6,
+    DISCARDED_TTL_MISSING = 7,
+    DISCARDED_TTL_NOT_INTEGER = 8,
+    DISCARDED_TTL_NEGATIVE = 9,
+    DISCARDED_REPORT_TO_MISSING = 10,
+    DISCARDED_REPORT_TO_NOT_STRING = 11,
+
+    REMOVED = 12,
+    SET = 13,
+
+    DISCARDED_MISSING_REMOTE_ENDPOINT = 14,
+
+    MAX
+  };
+
   static void RecordHeaderDiscardedForNoNetworkErrorLoggingService();
   static void RecordHeaderDiscardedForInvalidSSLInfo();
   static void RecordHeaderDiscardedForCertStatusError();
diff --git a/net/network_error_logging/network_error_logging_test_util.cc b/net/network_error_logging/network_error_logging_test_util.cc
new file mode 100644
index 0000000..6a30432
--- /dev/null
+++ b/net/network_error_logging/network_error_logging_test_util.cc
@@ -0,0 +1,43 @@
+// Copyright 2018 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 "net/network_error_logging/network_error_logging_test_util.h"
+
+#include <algorithm>
+
+namespace net {
+
+TestNetworkErrorLoggingService::TestNetworkErrorLoggingService() = default;
+TestNetworkErrorLoggingService::~TestNetworkErrorLoggingService() = default;
+
+void TestNetworkErrorLoggingService::OnHeader(
+    const url::Origin& origin,
+    const IPAddress& received_ip_address,
+    const std::string& value) {
+  VLOG(1) << "Received NEL policy for " << origin;
+  Header header;
+  header.origin = origin;
+  header.received_ip_address = received_ip_address;
+  header.value = value;
+  headers_.push_back(header);
+}
+
+void TestNetworkErrorLoggingService::OnRequest(RequestDetails details) {
+  errors_.push_back(std::move(details));
+}
+
+void TestNetworkErrorLoggingService::RemoveBrowsingData(
+    const base::RepeatingCallback<bool(const GURL&)>& origin_filter) {}
+
+void TestNetworkErrorLoggingService::RemoveAllBrowsingData() {}
+
+bool TestNetworkErrorLoggingService::Header::MatchesAddressList(
+    const AddressList& address_list) const {
+  return std::any_of(address_list.begin(), address_list.end(),
+                     [this](const IPEndPoint& endpoint) {
+                       return endpoint.address() == received_ip_address;
+                     });
+}
+
+}  // namespace net
diff --git a/net/network_error_logging/network_error_logging_test_util.h b/net/network_error_logging/network_error_logging_test_util.h
new file mode 100644
index 0000000..9f46d13
--- /dev/null
+++ b/net/network_error_logging/network_error_logging_test_util.h
@@ -0,0 +1,62 @@
+// Copyright 2018 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.
+
+#ifndef NET_NETWORK_ERROR_LOGGING_NETWORK_ERROR_LOGGING_TEST_UTIL_H_
+#define NET_NETWORK_ERROR_LOGGING_NETWORK_ERROR_LOGGING_TEST_UTIL_H_
+
+#include <string>
+#include <vector>
+
+#include "base/callback.h"
+#include "base/macros.h"
+#include "net/base/address_list.h"
+#include "net/base/ip_address.h"
+#include "net/network_error_logging/network_error_logging_service.h"
+#include "url/gurl.h"
+#include "url/origin.h"
+
+namespace net {
+
+// A NetworkErrorLoggingService implementation that stashes all NEL headers and
+// reports so that they can be easily verified in unit tests.
+class TestNetworkErrorLoggingService : public NetworkErrorLoggingService {
+ public:
+  struct Header {
+    Header() = default;
+    ~Header() = default;
+
+    // Returns whether the |received_ip_address| field matches any of the
+    // addresses in |address_list|.
+    bool MatchesAddressList(const AddressList& address_list) const;
+
+    url::Origin origin;
+    IPAddress received_ip_address;
+    std::string value;
+  };
+
+  TestNetworkErrorLoggingService();
+  ~TestNetworkErrorLoggingService() override;
+
+  const std::vector<Header>& headers() { return headers_; }
+  const std::vector<RequestDetails>& errors() { return errors_; }
+
+  // NetworkErrorLoggingService implementation
+  void OnHeader(const url::Origin& origin,
+                const IPAddress& received_ip_address,
+                const std::string& value) override;
+  void OnRequest(RequestDetails details) override;
+  void RemoveBrowsingData(
+      const base::RepeatingCallback<bool(const GURL&)>& origin_filter) override;
+  void RemoveAllBrowsingData() override;
+
+ private:
+  std::vector<Header> headers_;
+  std::vector<RequestDetails> errors_;
+
+  DISALLOW_COPY_AND_ASSIGN(TestNetworkErrorLoggingService);
+};
+
+}  // namespace net
+
+#endif  // NET_NETWORK_ERROR_LOGGING_NETWORK_ERROR_LOGGING_TEST_UTIL_H_
diff --git a/net/nqe/network_qualities_prefs_manager.cc b/net/nqe/network_qualities_prefs_manager.cc
index e207730..f96cb51 100644
--- a/net/nqe/network_qualities_prefs_manager.cc
+++ b/net/nqe/network_qualities_prefs_manager.cc
@@ -8,6 +8,7 @@
 #include <utility>
 
 #include "base/bind.h"
+#include "base/metrics/histogram_macros_local.h"
 #include "base/optional.h"
 #include "base/rand_util.h"
 #include "base/sequenced_task_runner.h"
@@ -74,6 +75,9 @@
 NetworkQualitiesPrefsManager::~NetworkQualitiesPrefsManager() {
   if (!network_task_runner_)
     return;
+  if (pref_task_runner_->RunsTasksInCurrentSequence()) {
+    ShutdownOnPrefSequence();
+  }
   DCHECK(network_task_runner_->RunsTasksInCurrentSequence());
   if (network_quality_estimator_)
     network_quality_estimator_->RemoveNetworkQualitiesCacheObserver(this);
@@ -113,6 +117,8 @@
 
 void NetworkQualitiesPrefsManager::ClearPrefs() {
   DCHECK(pref_task_runner_->RunsTasksInCurrentSequence());
+
+  LOCAL_HISTOGRAM_COUNTS_100("NQE.PrefsSizeOnClearing", prefs_->size());
   prefs_->Clear();
   DCHECK_EQ(0u, prefs_->size());
   pref_delegate_->SetDictionaryValue(*prefs_);
diff --git a/net/nqe/network_qualities_prefs_manager.h b/net/nqe/network_qualities_prefs_manager.h
index 549d9b5..8e5520cb 100644
--- a/net/nqe/network_qualities_prefs_manager.h
+++ b/net/nqe/network_qualities_prefs_manager.h
@@ -42,8 +42,8 @@
 // propagates network quality pref changes from the network thread to the
 // provided pref delegate on the pref thread.
 //
-// ShutdownOnPrefSequence must be called from the pref thread before
-// destruction.
+// If |this| is used on multiple threads, ShutdownOnPrefSequence must be called
+// from the pref thread before destruction.
 class NET_EXPORT NetworkQualitiesPrefsManager
     : public nqe::internal::NetworkQualityStore::NetworkQualitiesCacheObserver {
  public:
diff --git a/net/quic/quic_chromium_client_session_test.cc b/net/quic/quic_chromium_client_session_test.cc
index 38b21c4..983763b 100644
--- a/net/quic/quic_chromium_client_session_test.cc
+++ b/net/quic/quic_chromium_client_session_test.cc
@@ -1527,8 +1527,7 @@
       QuicChromiumClientSessionPeer::CreateOutgoingStream(session_.get()));
 
   quic::QuicAlarm* alarm =
-      quic::test::QuicConnectionPeer::GetRetransmittableOnWireAlarm(
-          session_->connection());
+      quic::test::QuicConnectionPeer::GetPingAlarm(session_->connection());
   EXPECT_FALSE(alarm->IsSet());
 
   // Send PING, which will be ACKed by the server. After the ACK, there will be
diff --git a/net/quic/quic_flags_list.h b/net/quic/quic_flags_list.h
index d3bc4dca..5a80bb1 100644
--- a/net/quic/quic_flags_list.h
+++ b/net/quic/quic_flags_list.h
@@ -84,7 +84,7 @@
 QUIC_FLAG(bool, FLAGS_quic_reloadable_flag_quic_bbr_less_probe_rtt, false)
 
 // If true, enable QUIC v99.
-QUIC_FLAG(bool, FLAGS_quic_enable_version_99, false)
+QUIC_FLAG(bool, FLAGS_quic_reloadable_flag_quic_enable_version_99, false)
 
 // When true, set the initial congestion control window from connection options
 // in QuicSentPacketManager rather than TcpCubicSenderBytes.
@@ -305,3 +305,6 @@
 QUIC_FLAG(bool,
           FLAGS_quic_reloadable_flag_quic_enable_server_epid_in_public_reset,
           false)
+
+// If true, public reset packets sent from GFE will include a kEPID tag.
+QUIC_FLAG(bool, FLAGS_quic_reloadable_flag_quic_fix_spurious_ack_alarm, false)
diff --git a/net/spdy/spdy_test_util_common.cc b/net/spdy/spdy_test_util_common.cc
index d3e7e6e..c4bf65f5e 100644
--- a/net/spdy/spdy_test_util_common.cc
+++ b/net/spdy/spdy_test_util_common.cc
@@ -411,6 +411,10 @@
       session_deps->http_auth_handler_factory.get();
   context.http_server_properties = session_deps->http_server_properties.get();
   context.net_log = session_deps->net_log;
+#if BUILDFLAG(ENABLE_REPORTING)
+  context.network_error_logging_service =
+      session_deps->network_error_logging_service.get();
+#endif
   return context;
 }
 
diff --git a/net/spdy/spdy_test_util_common.h b/net/spdy/spdy_test_util_common.h
index 76641b0..be559cd 100644
--- a/net/spdy/spdy_test_util_common.h
+++ b/net/spdy/spdy_test_util_common.h
@@ -39,6 +39,10 @@
 #include "net/url_request/url_request_context_storage.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
+#if BUILDFLAG(ENABLE_REPORTING)
+#include "net/network_error_logging/network_error_logging_service.h"
+#endif
+
 class GURL;
 
 namespace net {
@@ -203,6 +207,9 @@
   std::unique_ptr<MockClientSocketFactory> socket_factory;
   std::unique_ptr<HttpAuthHandlerFactory> http_auth_handler_factory;
   std::unique_ptr<HttpServerPropertiesImpl> http_server_properties;
+#if BUILDFLAG(ENABLE_REPORTING)
+  std::unique_ptr<NetworkErrorLoggingService> network_error_logging_service;
+#endif
   bool enable_ip_pooling;
   bool enable_ping;
   bool enable_user_alternate_protocol_ports;
diff --git a/net/third_party/quic/core/http/end_to_end_test.cc b/net/third_party/quic/core/http/end_to_end_test.cc
index 4f4daaa8..81498c4 100644
--- a/net/third_party/quic/core/http/end_to_end_test.cc
+++ b/net/third_party/quic/core/http/end_to_end_test.cc
@@ -126,7 +126,7 @@
                                       bool test_stateless_rejects) {
   // Version 99 is default disabled, but should be exercised in EndToEnd tests
   QuicFlagSaver flags;
-  FLAGS_quic_enable_version_99 = true;
+  SetQuicReloadableFlag(quic_enable_version_99, true);
   // Divide the versions into buckets in which the intra-frame format
   // is compatible. When clients encounter QUIC version negotiation
   // they simply retransmit all packets using the new version's
@@ -278,7 +278,7 @@
         stream_factory_(nullptr),
         support_server_push_(false) {
     // Version 99 is default disabled, but should be exercised in EndToEnd tests
-    FLAGS_quic_enable_version_99 = true;
+    SetQuicReloadableFlag(quic_enable_version_99, true);
     FLAGS_quic_supports_tls_handshake = true;
     SetQuicRestartFlag(quic_no_server_conn_ver_negotiation2, true);
     SetQuicReloadableFlag(quic_no_client_conn_ver_negotiation, true);
diff --git a/net/third_party/quic/core/http/http_encoder.cc b/net/third_party/quic/core/http/http_encoder.cc
index e375d00..f8c4211 100644
--- a/net/third_party/quic/core/http/http_encoder.cc
+++ b/net/third_party/quic/core/http/http_encoder.cc
@@ -59,15 +59,16 @@
 HttpEncoder::~HttpEncoder() {}
 
 QuicByteCount HttpEncoder::SerializeDataFrameHeader(
-    const DataFrame& data,
+    QuicByteCount length,
     std::unique_ptr<char[]>* output) {
+  DCHECK_NE(0u, length);
   QuicByteCount header_length =
-      QuicDataWriter::GetVarInt62Len(data.data.length()) + kFrameTypeLength;
+      QuicDataWriter::GetVarInt62Len(length) + kFrameTypeLength;
 
   output->reset(new char[header_length]);
   QuicDataWriter writer(header_length, output->get(), NETWORK_BYTE_ORDER);
 
-  if (WriteFrameHeader(data.data.length(), HttpFrameType::DATA, &writer)) {
+  if (WriteFrameHeader(length, HttpFrameType::DATA, &writer)) {
     return header_length;
   }
   return 0;
diff --git a/net/third_party/quic/core/http/http_encoder.h b/net/third_party/quic/core/http/http_encoder.h
index 71a3b1158..a92316c9 100644
--- a/net/third_party/quic/core/http/http_encoder.h
+++ b/net/third_party/quic/core/http/http_encoder.h
@@ -26,7 +26,7 @@
 
   // Serializes the header of a DATA frame into a new buffer stored in |output|.
   // Returns the length of the buffer on success, or 0 otherwise.
-  QuicByteCount SerializeDataFrameHeader(const DataFrame& data,
+  QuicByteCount SerializeDataFrameHeader(QuicByteCount length,
                                          std::unique_ptr<char[]>* output);
 
   // Serializes the header of a HEADERS frame into a new buffer stored in
diff --git a/net/third_party/quic/core/http/http_encoder_test.cc b/net/third_party/quic/core/http/http_encoder_test.cc
index af4da2f..a3b2cc0 100644
--- a/net/third_party/quic/core/http/http_encoder_test.cc
+++ b/net/third_party/quic/core/http/http_encoder_test.cc
@@ -21,7 +21,8 @@
   DataFrame data;
   data.data = "Data!";
   std::unique_ptr<char[]> buffer;
-  uint64_t length = encoder_.SerializeDataFrameHeader(data, &buffer);
+  uint64_t length =
+      encoder_.SerializeDataFrameHeader(data.data.length(), &buffer);
   char output[] = {// length
                    0x05,
                    // type (DATA)
diff --git a/net/third_party/quic/core/http/quic_server_session_base_test.cc b/net/third_party/quic/core/http/quic_server_session_base_test.cc
index f86e4ad..93997603 100644
--- a/net/third_party/quic/core/http/quic_server_session_base_test.cc
+++ b/net/third_party/quic/core/http/quic_server_session_base_test.cc
@@ -602,11 +602,10 @@
   SetQuicReloadableFlag(quic_use_cheap_stateless_rejects, true);
 
   const QuicClock* clock = helper_.GetClock();
-  ParsedQuicVersion version = AllSupportedVersions().front();
   CryptoHandshakeMessage chlo = crypto_test_utils::GenerateDefaultInchoateCHLO(
-      clock, version.transport_version, &crypto_config_);
+      clock, GetParam().transport_version, &crypto_config_);
   chlo.SetVector(kCOPT, QuicTagVector{kSREJ});
-  std::vector<ParsedQuicVersion> packet_version_list = {version};
+  std::vector<ParsedQuicVersion> packet_version_list = {GetParam()};
   std::unique_ptr<QuicEncryptedPacket> packet(ConstructEncryptedPacket(
       1, 0, true, false, 1, QuicString(chlo.GetSerialized().AsStringPiece()),
       PACKET_8BYTE_CONNECTION_ID, PACKET_0BYTE_CONNECTION_ID,
diff --git a/net/third_party/quic/core/http/quic_spdy_client_stream.cc b/net/third_party/quic/core/http/quic_spdy_client_stream.cc
index e2edf1d..07fc556 100644
--- a/net/third_party/quic/core/http/quic_spdy_client_stream.cc
+++ b/net/third_party/quic/core/http/quic_spdy_client_stream.cc
@@ -140,7 +140,7 @@
   bytes_sent += header_bytes_written_;
 
   if (!body.empty()) {
-    WriteOrBufferData(body, fin, nullptr);
+    WriteOrBufferBody(body, fin, nullptr);
   }
 
   return bytes_sent;
diff --git a/net/third_party/quic/core/http/quic_spdy_stream.cc b/net/third_party/quic/core/http/quic_spdy_stream.cc
index eca8123..b92269d5 100644
--- a/net/third_party/quic/core/http/quic_spdy_stream.cc
+++ b/net/third_party/quic/core/http/quic_spdy_stream.cc
@@ -60,7 +60,7 @@
 }
 
 void QuicSpdyStream::WriteOrBufferBody(
-    const QuicString& data,
+    QuicStringPiece data,
     bool fin,
     QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener) {
   WriteOrBufferData(data, fin, std::move(ack_listener));
@@ -100,6 +100,17 @@
   return bytes_written;
 }
 
+QuicConsumedData QuicSpdyStream::WritevBody(const struct iovec* iov,
+                                            int count,
+                                            bool fin) {
+  return WritevData(iov, count, fin);
+}
+
+QuicConsumedData QuicSpdyStream::WriteBodySlices(QuicMemSliceSpan slices,
+                                                 bool fin) {
+  return WriteMemSlices(slices, fin);
+}
+
 size_t QuicSpdyStream::Readv(const struct iovec* iov, size_t iov_len) {
   DCHECK(FinishedReadingHeaders());
   return sequencer()->Readv(iov, iov_len);
diff --git a/net/third_party/quic/core/http/quic_spdy_stream.h b/net/third_party/quic/core/http/quic_spdy_stream.h
index 3bf065f..4834a0d 100644
--- a/net/third_party/quic/core/http/quic_spdy_stream.h
+++ b/net/third_party/quic/core/http/quic_spdy_stream.h
@@ -105,7 +105,7 @@
 
   // Sends |data| to the peer, or buffers if it can't be sent immediately.
   void WriteOrBufferBody(
-      const QuicString& data,
+      QuicStringPiece data,
       bool fin,
       QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener);
 
@@ -115,6 +115,16 @@
       spdy::SpdyHeaderBlock trailer_block,
       QuicReferenceCountedPointer<QuicAckListenerInterface> ack_listener);
 
+  // Does the same thing as WriteOrBufferBody except this method takes iovec
+  // as the data input. Right now it only calls WritevData.
+  // TODO(renjietang): Write data frame header before writing body.
+  QuicConsumedData WritevBody(const struct iovec* iov, int count, bool fin);
+
+  // Does the same thing as WriteOrBufferBody except this method takes
+  // memslicespan as the data input. Right now it only calls WriteMemSlices.
+  // TODO(renjietang): Write data frame header before writing body.
+  QuicConsumedData WriteBodySlices(QuicMemSliceSpan slices, bool fin);
+
   // Marks the trailers as consumed. This applies to the case where this object
   // receives headers and trailers as QuicHeaderLists via calls to
   // OnStreamHeaderList().
diff --git a/net/third_party/quic/core/http/quic_spdy_stream_test.cc b/net/third_party/quic/core/http/quic_spdy_stream_test.cc
index f43743d0..add92f4 100644
--- a/net/third_party/quic/core/http/quic_spdy_stream_test.cc
+++ b/net/third_party/quic/core/http/quic_spdy_stream_test.cc
@@ -445,7 +445,7 @@
   EXPECT_CALL(*connection_, SendControlFrame(_));
   EXPECT_CALL(*session_, WritevData(_, _, _, _, _))
       .WillOnce(Return(QuicConsumedData(kWindow, true)));
-  stream_->WriteOrBufferData(body, false, nullptr);
+  stream_->WriteOrBufferBody(body, false, nullptr);
 
   // Should have sent as much as possible, resulting in no send window left.
   EXPECT_EQ(0u,
@@ -667,7 +667,7 @@
   EXPECT_CALL(*session_, WritevData(_, _, _, _, _))
       .WillOnce(Return(QuicConsumedData(0, fin)));
 
-  stream_->WriteOrBufferData(body, fin, nullptr);
+  stream_->WriteOrBufferBody(body, fin, nullptr);
 }
 
 TEST_P(QuicSpdyStreamTest, ReceivingTrailersViaHeaderList) {
@@ -890,7 +890,7 @@
 
   // Write non-zero body data to force a non-zero final offset.
   const int kBodySize = 1 * 1024;  // 1 MB
-  stream_->WriteOrBufferData(QuicString(kBodySize, 'x'), false, nullptr);
+  stream_->WriteOrBufferBody(QuicString(kBodySize, 'x'), false, nullptr);
 
   // The final offset field in the trailing headers is populated with the
   // number of body bytes written (including queued bytes).
@@ -918,7 +918,7 @@
 
   // Write non-zero body data.
   const int kBodySize = 1 * 1024;  // 1 MB
-  stream_->WriteOrBufferData(QuicString(kBodySize, 'x'), false, nullptr);
+  stream_->WriteOrBufferBody(QuicString(kBodySize, 'x'), false, nullptr);
   EXPECT_EQ(0u, stream_->BufferedDataBytes());
 
   // Headers and body have been fully written, there is no queued data. Writing
@@ -944,7 +944,7 @@
   const int kBodySize = 1 * 1024;  // 1 KB
   EXPECT_CALL(*session_, WritevData(_, _, _, _, _))
       .WillOnce(Return(QuicConsumedData(kBodySize - 1, false)));
-  stream_->WriteOrBufferData(QuicString(kBodySize, 'x'), false, nullptr);
+  stream_->WriteOrBufferBody(QuicString(kBodySize, 'x'), false, nullptr);
   EXPECT_EQ(1u, stream_->BufferedDataBytes());
 
   // Writing trailers will send a FIN, but not close the write side of the
@@ -999,11 +999,11 @@
 
   session_->headers_stream()->WriteOrBufferData("Header1", false,
                                                 ack_listener1);
-  stream_->WriteOrBufferData("Test1", true, nullptr);
+  stream_->WriteOrBufferBody("Test1", true, nullptr);
 
   session_->headers_stream()->WriteOrBufferData("Header2", false,
                                                 ack_listener2);
-  stream2_->WriteOrBufferData("Test2", false, nullptr);
+  stream2_->WriteOrBufferBody("Test2", false, nullptr);
 
   QuicStreamFrame frame1(
       QuicUtils::GetHeadersStreamId(connection_->transport_version()), false, 0,
@@ -1038,7 +1038,7 @@
       .WillRepeatedly(Invoke(MockQuicSession::ConsumeData));
   QuicStreamPeer::CloseReadSide(stream_);
   // This write causes stream to be closed.
-  stream_->WriteOrBufferData("Test1", true, nullptr);
+  stream_->WriteOrBufferBody("Test1", true, nullptr);
   // stream_ has unacked data and should become zombie.
   EXPECT_TRUE(QuicContainsKey(QuicSessionPeer::zombie_streams(session_.get()),
                               stream_->id()));
@@ -1056,7 +1056,7 @@
 
   EXPECT_CALL(*session_, WritevData(_, _, _, _, _))
       .WillOnce(Return(QuicConsumedData(4, true)));
-  stream_->WriteOrBufferData("data", true, nullptr);
+  stream_->WriteOrBufferBody("data", true, nullptr);
   stream_->OnPriorityFrame(kV3HighestPriority);
   EXPECT_EQ(kV3HighestPriority, stream_->priority());
 }
diff --git a/net/third_party/quic/core/quic_connection.cc b/net/third_party/quic/core/quic_connection.cc
index 16f04802..f82c107 100644
--- a/net/third_party/quic/core/quic_connection.cc
+++ b/net/third_party/quic/core/quic_connection.cc
@@ -297,9 +297,6 @@
       mtu_discovery_alarm_(alarm_factory_->CreateAlarm(
           arena_.New<MtuDiscoveryAlarmDelegate>(this),
           &arena_)),
-      retransmittable_on_wire_alarm_(alarm_factory_->CreateAlarm(
-          arena_.New<RetransmittableOnWireAlarmDelegate>(this),
-          &arena_)),
       path_degrading_alarm_(alarm_factory_->CreateAlarm(
           arena_.New<PathDegradingAlarmDelegate>(this),
           &arena_)),
@@ -1452,7 +1449,7 @@
           num_retransmittable_packets_received_since_last_ack_sent_ >=
               kMaxRetransmittablePacketsBeforeAck) {
         ack_queued_ = true;
-      } else if (!ack_alarm_->IsSet()) {
+      } else if (ShouldSetAckAlarm()) {
         // Wait for the minimum of the ack decimation delay or the delayed ack
         // time before sending an ack.
         QuicTime::Delta ack_delay =
@@ -1475,7 +1472,7 @@
       if (num_retransmittable_packets_received_since_last_ack_sent_ >=
           kDefaultRetransmittablePacketsBeforeAck) {
         ack_queued_ = true;
-      } else if (!ack_alarm_->IsSet()) {
+      } else if (ShouldSetAckAlarm()) {
         const QuicTime approximate_now = clock_->ApproximateNow();
         if (fast_ack_after_quiescence_ &&
             (approximate_now - time_of_previous_received_packet_) >
@@ -1500,7 +1497,7 @@
         QuicTime ack_time =
             clock_->ApproximateNow() +
             0.125 * sent_packet_manager_.GetRttStats()->min_rtt();
-        if (!ack_alarm_->IsSet() || ack_alarm_->deadline() > ack_time) {
+        if (ShouldSetAckAlarm() || ack_alarm_->deadline() > ack_time) {
           ack_alarm_->Update(ack_time, QuicTime::Delta::Zero());
         }
       } else {
@@ -2242,9 +2239,6 @@
                                  packet->transmission_type, packet_send_time);
   }
   if (IsRetransmittable(*packet) == HAS_RETRANSMITTABLE_DATA) {
-    // A retransmittable packet has been put on the wire, so no need for the
-    // |retransmittable_on_wire_alarm_| to possibly send a PING.
-    retransmittable_on_wire_alarm_->Cancel();
     if (!is_path_degrading_ && !path_degrading_alarm_->IsSet()) {
       // This is the first retransmittable packet on the working path.
       // Start the path degrading alarm to detect new path degrading.
@@ -2274,7 +2268,7 @@
       }
     }
   }
-  SetPingAlarm();
+
   MaybeSetMtuAlarm(packet_number);
   QUIC_DVLOG(1) << ENDPOINT << "time we began writing last sent packet: "
                 << packet_send_time.ToDebuggingValue();
@@ -2286,6 +2280,7 @@
   if (reset_retransmission_alarm || !retransmission_alarm_->IsSet()) {
     SetRetransmissionAlarm();
   }
+  SetPingAlarm();
 
   // The packet number length must be updated after OnPacketSent, because it
   // may change the packet number length in packet.
@@ -2711,7 +2706,6 @@
   send_alarm_->Cancel();
   timeout_alarm_->Cancel();
   mtu_discovery_alarm_->Cancel();
-  retransmittable_on_wire_alarm_->Cancel();
   path_degrading_alarm_->Cancel();
 }
 
@@ -2840,8 +2834,24 @@
     // Don't send a ping unless there are open streams.
     return;
   }
-  ping_alarm_->Update(clock_->ApproximateNow() + ping_timeout_,
-                      QuicTime::Delta::FromSeconds(1));
+  if (retransmittable_on_wire_timeout_.IsInfinite() ||
+      sent_packet_manager_.HasInFlightPackets()) {
+    // Extend the ping alarm.
+    ping_alarm_->Update(clock_->ApproximateNow() + ping_timeout_,
+                        QuicTime::Delta::FromSeconds(1));
+    return;
+  }
+  DCHECK_LT(retransmittable_on_wire_timeout_, ping_timeout_);
+  // If it's already set to an earlier time, then don't update it.
+  if (ping_alarm_->IsSet() &&
+      ping_alarm_->deadline() <
+          clock_->ApproximateNow() + retransmittable_on_wire_timeout_) {
+    return;
+  }
+  // Use a shorter timeout if there are open streams, but nothing on the wire.
+  ping_alarm_->Update(
+      clock_->ApproximateNow() + retransmittable_on_wire_timeout_,
+      QuicTime::Delta::FromMilliseconds(1));
 }
 
 void QuicConnection::SetRetransmissionAlarm() {
@@ -3395,11 +3405,6 @@
     has_unacked_packets = sent_packet_manager_.HasInFlightPackets();
   }
   if (!has_unacked_packets) {
-    // There are no retransmittable packets on the wire, so it may be
-    // necessary to send a PING to keep a retransmittable packet on the wire.
-    if (!retransmittable_on_wire_alarm_->IsSet()) {
-      SetRetransmittableOnWireAlarm();
-    }
     // There are no retransmittable packets on the wire, so it's impossible to
     // say if the connection has degraded.
     path_degrading_alarm_->Cancel();
@@ -3434,25 +3439,6 @@
   return sent_packet_manager_.session_decides_what_to_write();
 }
 
-void QuicConnection::SetRetransmittableOnWireAlarm() {
-  // TODO(ianswett): Merge the RetransmittableOnWireAlarm and PingAlarm.
-  if (perspective_ == Perspective::IS_SERVER) {
-    // Only clients send pings.
-    return;
-  }
-  if (retransmittable_on_wire_timeout_.IsInfinite()) {
-    return;
-  }
-  if (!visitor_->HasOpenDynamicStreams()) {
-    retransmittable_on_wire_alarm_->Cancel();
-    // Don't send a ping unless there are open streams.
-    return;
-  }
-  retransmittable_on_wire_alarm_->Update(
-      clock_->ApproximateNow() + retransmittable_on_wire_timeout_,
-      QuicTime::Delta::Zero());
-}
-
 void QuicConnection::UpdateReleaseTimeIntoFuture() {
   DCHECK(supports_release_time_);
 
@@ -3486,5 +3472,22 @@
   return packet_generator_.GetLargestMessagePayload();
 }
 
+bool QuicConnection::ShouldSetAckAlarm() const {
+  DCHECK(ack_frame_updated());
+  if (ack_alarm_->IsSet()) {
+    // ACK alarm has been set.
+    return false;
+  }
+  if (GetQuicReloadableFlag(quic_fix_spurious_ack_alarm) &&
+      packet_generator_.should_send_ack()) {
+    // If the generator is already configured to send an ACK, then there is no
+    // need to schedule the ACK alarm. The updated ACK information will be sent
+    // when the generator flushes.
+    QUIC_FLAG_COUNT(quic_reloadable_flag_quic_fix_spurious_ack_alarm);
+    return false;
+  }
+  return true;
+}
+
 #undef ENDPOINT  // undef for jumbo builds
 }  // namespace quic
diff --git a/net/third_party/quic/core/quic_connection.h b/net/third_party/quic/core/quic_connection.h
index bcf25c7..afbbd82 100644
--- a/net/third_party/quic/core/quic_connection.h
+++ b/net/third_party/quic/core/quic_connection.h
@@ -539,10 +539,11 @@
   }
   const QuicTime::Delta ping_timeout() { return ping_timeout_; }
   // Used in Chromium, but not internally.
-  // Must only be called before retransmittable_on_wire_alarm_ is set.
+  // Sets a timeout for the ping alarm when there is no retransmittable data
+  // in flight, allowing for a more aggressive ping alarm in that case.
   void set_retransmittable_on_wire_timeout(
       QuicTime::Delta retransmittable_on_wire_timeout) {
-    DCHECK(!retransmittable_on_wire_alarm_->IsSet());
+    DCHECK(!ping_alarm_->IsSet());
     retransmittable_on_wire_timeout_ = retransmittable_on_wire_timeout;
   }
   const QuicTime::Delta retransmittable_on_wire_timeout() {
@@ -1041,6 +1042,10 @@
                                   const QuicSocketAddress& peer_address,
                                   bool is_response);
 
+  // Returns true if ack alarm is not set and there is no pending ack in the
+  // generator.
+  bool ShouldSetAckAlarm() const;
+
   QuicFramer framer_;
 
   // Contents received in the current packet, especially used to identify
@@ -1205,9 +1210,6 @@
   QuicArenaScopedPtr<QuicAlarm> ping_alarm_;
   // An alarm that fires when an MTU probe should be sent.
   QuicArenaScopedPtr<QuicAlarm> mtu_discovery_alarm_;
-  // An alarm that fires when there have been no retransmittable packets on the
-  // wire for some period.
-  QuicArenaScopedPtr<QuicAlarm> retransmittable_on_wire_alarm_;
   // An alarm that fires when this connection is considered degrading.
   QuicArenaScopedPtr<QuicAlarm> path_degrading_alarm_;
   // An alarm that fires to process undecryptable packets when new decyrption
diff --git a/net/third_party/quic/core/quic_connection_test.cc b/net/third_party/quic/core/quic_connection_test.cc
index aa44dfc9..be4bbe8e 100644
--- a/net/third_party/quic/core/quic_connection_test.cc
+++ b/net/third_party/quic/core/quic_connection_test.cc
@@ -688,11 +688,6 @@
         QuicConnectionPeer::GetMtuDiscoveryAlarm(this));
   }
 
-  TestAlarmFactory::TestAlarm* GetRetransmittableOnWireAlarm() {
-    return reinterpret_cast<TestAlarmFactory::TestAlarm*>(
-        QuicConnectionPeer::GetRetransmittableOnWireAlarm(this));
-  }
-
   TestAlarmFactory::TestAlarm* GetPathDegradingAlarm() {
     return reinterpret_cast<TestAlarmFactory::TestAlarm*>(
         QuicConnectionPeer::GetPathDegradingAlarm(this));
@@ -3760,7 +3755,6 @@
   EXPECT_FALSE(connection_.GetRetransmissionAlarm()->IsSet());
   EXPECT_FALSE(connection_.GetSendAlarm()->IsSet());
   EXPECT_FALSE(connection_.GetMtuDiscoveryAlarm()->IsSet());
-  EXPECT_FALSE(connection_.GetRetransmittableOnWireAlarm()->IsSet());
 }
 
 TEST_P(QuicConnectionTest, IdleTimeoutAfterFirstSentPacket) {
@@ -3812,7 +3806,6 @@
   EXPECT_FALSE(connection_.GetRetransmissionAlarm()->IsSet());
   EXPECT_FALSE(connection_.GetSendAlarm()->IsSet());
   EXPECT_FALSE(connection_.GetMtuDiscoveryAlarm()->IsSet());
-  EXPECT_FALSE(connection_.GetRetransmittableOnWireAlarm()->IsSet());
 }
 
 TEST_P(QuicConnectionTest, IdleTimeoutAfterSendTwoPackets) {
@@ -3873,7 +3866,6 @@
   EXPECT_FALSE(connection_.GetRetransmissionAlarm()->IsSet());
   EXPECT_FALSE(connection_.GetSendAlarm()->IsSet());
   EXPECT_FALSE(connection_.GetMtuDiscoveryAlarm()->IsSet());
-  EXPECT_FALSE(connection_.GetRetransmittableOnWireAlarm()->IsSet());
 }
 
 TEST_P(QuicConnectionTest, HandshakeTimeout) {
@@ -6066,7 +6058,7 @@
 
 TEST_P(QuicConnectionTest, ServerSendsVersionNegotiationPacket) {
   // Turn off QUIC_VERSION_99.
-  SetQuicFlag(&FLAGS_quic_enable_version_99, false);
+  SetQuicReloadableFlag(quic_enable_version_99, false);
   connection_.SetSupportedVersions(CurrentSupportedVersions());
   set_perspective(Perspective::IS_SERVER);
   if (GetParam().version.transport_version > QUIC_VERSION_43) {
@@ -6112,7 +6104,7 @@
 
 TEST_P(QuicConnectionTest, ServerSendsVersionNegotiationPacketSocketBlocked) {
   // Turn off QUIC_VERSION_99.
-  SetQuicFlag(&FLAGS_quic_enable_version_99, false);
+  SetQuicReloadableFlag(quic_enable_version_99, false);
   connection_.SetSupportedVersions(CurrentSupportedVersions());
   set_perspective(Perspective::IS_SERVER);
   if (GetParam().version.transport_version > QUIC_VERSION_43) {
@@ -6165,7 +6157,7 @@
 TEST_P(QuicConnectionTest,
        ServerSendsVersionNegotiationPacketSocketBlockedDataBuffered) {
   // Turn off QUIC_VERSION_99.
-  SetQuicFlag(&FLAGS_quic_enable_version_99, false);
+  SetQuicReloadableFlag(quic_enable_version_99, false);
   connection_.SetSupportedVersions(CurrentSupportedVersions());
   set_perspective(Perspective::IS_SERVER);
   if (GetParam().version.transport_version > QUIC_VERSION_43) {
@@ -6693,7 +6685,7 @@
   EXPECT_TRUE(connection_.IsPathDegrading());
 }
 
-TEST_P(QuicConnectionTest, RetransmittableOnWireSetsPathDegradingAlarm) {
+TEST_P(QuicConnectionTest, RetransmittableOnWireSetsPingAlarm) {
   const QuicTime::Delta retransmittable_on_wire_timeout =
       QuicTime::Delta::FromMilliseconds(50);
   connection_.set_retransmittable_on_wire_timeout(
@@ -6704,7 +6696,7 @@
 
   EXPECT_FALSE(connection_.GetPathDegradingAlarm()->IsSet());
   EXPECT_FALSE(connection_.IsPathDegrading());
-  EXPECT_FALSE(connection_.GetRetransmittableOnWireAlarm()->IsSet());
+  EXPECT_FALSE(connection_.GetPingAlarm()->IsSet());
 
   const char data[] = "data";
   size_t data_size = strlen(data);
@@ -6721,7 +6713,13 @@
                               ->GetPathDegradingDelay();
   EXPECT_EQ(clock_.ApproximateNow() + delay,
             connection_.GetPathDegradingAlarm()->deadline());
-  EXPECT_FALSE(connection_.GetRetransmittableOnWireAlarm()->IsSet());
+  ASSERT_TRUE(connection_.sent_packet_manager().HasInFlightPackets());
+  // The ping alarm is set for the ping timeout, not the shorter
+  // retransmittable_on_wire_timeout.
+  EXPECT_TRUE(connection_.GetPingAlarm()->IsSet());
+  QuicTime::Delta ping_delay = QuicTime::Delta::FromSeconds(kPingTimeoutSecs);
+  EXPECT_EQ((clock_.ApproximateNow() + ping_delay),
+            connection_.GetPingAlarm()->deadline());
 
   // Now receive an ACK of the packet.
   clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5));
@@ -6730,19 +6728,19 @@
   QuicAckFrame frame = InitAckFrame({{1, 2}});
   ProcessAckPacket(&frame);
   // No more retransmittable packets on the wire, so the path degrading alarm
-  // should be cancelled, and the retransmittable-on-wire alarm should be set
-  // since a PING might be needed.
+  // should be cancelled, and the ping alarm should be set to the
+  // retransmittable_on_wire_timeout.
   EXPECT_FALSE(connection_.GetPathDegradingAlarm()->IsSet());
-  EXPECT_TRUE(connection_.GetRetransmittableOnWireAlarm()->IsSet());
+  EXPECT_TRUE(connection_.GetPingAlarm()->IsSet());
   EXPECT_EQ(clock_.ApproximateNow() + retransmittable_on_wire_timeout,
-            connection_.GetRetransmittableOnWireAlarm()->deadline());
+            connection_.GetPingAlarm()->deadline());
 
-  // Simulate firing the retransmittable-on-wire alarm and sending a PING.
+  // Simulate firing the ping alarm and sending a PING.
   clock_.AdvanceTime(retransmittable_on_wire_timeout);
   EXPECT_CALL(visitor_, SendPing()).WillOnce(Invoke([this]() {
     connection_.SendControlFrame(QuicFrame(QuicPingFrame(1)));
   }));
-  connection_.GetRetransmittableOnWireAlarm()->Fire();
+  connection_.GetPingAlarm()->Fire();
 
   // Now there's a retransmittable packet (PING) on the wire, so the path
   // degrading alarm should be set.
@@ -7220,17 +7218,23 @@
 
   // Advance 5ms, send a retransmittable packet to the peer.
   clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5));
-  EXPECT_FALSE(connection_.GetRetransmittableOnWireAlarm()->IsSet());
+  EXPECT_FALSE(connection_.GetPingAlarm()->IsSet());
   connection_.SendStreamDataWithString(1, data, offset, NO_FIN);
   offset += data_size;
-  EXPECT_FALSE(connection_.GetRetransmittableOnWireAlarm()->IsSet());
+  EXPECT_TRUE(connection_.sent_packet_manager().HasInFlightPackets());
+  // The ping alarm is set for the ping timeout, not the shorter
+  // retransmittable_on_wire_timeout.
+  EXPECT_TRUE(connection_.GetPingAlarm()->IsSet());
+  QuicTime::Delta ping_delay = QuicTime::Delta::FromSeconds(kPingTimeoutSecs);
+  EXPECT_EQ((clock_.ApproximateNow() + ping_delay),
+            connection_.GetPingAlarm()->deadline());
 
   // Advance 5ms, send a second retransmittable packet to the peer.
   clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5));
-  EXPECT_FALSE(connection_.GetRetransmittableOnWireAlarm()->IsSet());
+  EXPECT_TRUE(connection_.GetPingAlarm()->IsSet());
   connection_.SendStreamDataWithString(1, data, offset, NO_FIN);
   offset += data_size;
-  EXPECT_FALSE(connection_.GetRetransmittableOnWireAlarm()->IsSet());
+  EXPECT_TRUE(connection_.GetPingAlarm()->IsSet());
 
   // Now receive an ACK of the first packet. This should not set the
   // retransmittable-on-wire alarm since packet 2 is still on the wire.
@@ -7239,7 +7243,15 @@
   EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _, _));
   QuicAckFrame frame = InitAckFrame({{1, 2}});
   ProcessAckPacket(&frame);
-  EXPECT_FALSE(connection_.GetRetransmittableOnWireAlarm()->IsSet());
+  EXPECT_TRUE(connection_.sent_packet_manager().HasInFlightPackets());
+  // The ping alarm is set for the ping timeout, not the shorter
+  // retransmittable_on_wire_timeout.
+  EXPECT_TRUE(connection_.GetPingAlarm()->IsSet());
+  // The ping alarm has a 1 second granularity, and the clock has been advanced
+  // 10ms since it was originally set.
+  EXPECT_EQ((clock_.ApproximateNow() + ping_delay -
+             QuicTime::Delta::FromMilliseconds(10)),
+            connection_.GetPingAlarm()->deadline());
 
   // Now receive an ACK of the second packet. This should set the
   // retransmittable-on-wire alarm now that no retransmittable packets are on
@@ -7248,26 +7260,31 @@
   EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _, _));
   frame = InitAckFrame({{2, 3}});
   ProcessAckPacket(&frame);
-  EXPECT_TRUE(connection_.GetRetransmittableOnWireAlarm()->IsSet());
+  EXPECT_TRUE(connection_.GetPingAlarm()->IsSet());
   EXPECT_EQ(clock_.ApproximateNow() + retransmittable_on_wire_timeout,
-            connection_.GetRetransmittableOnWireAlarm()->deadline());
+            connection_.GetPingAlarm()->deadline());
 
   // Now receive a duplicate ACK of the second packet. This should not update
-  // the retransmittable-on-wire alarm.
-  QuicTime prev_deadline =
-      connection_.GetRetransmittableOnWireAlarm()->deadline();
+  // the ping alarm.
+  QuicTime prev_deadline = connection_.GetPingAlarm()->deadline();
   clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5));
   frame = InitAckFrame({{2, 3}});
   ProcessAckPacket(&frame);
-  EXPECT_TRUE(connection_.GetRetransmittableOnWireAlarm()->IsSet());
-  EXPECT_EQ(prev_deadline,
-            connection_.GetRetransmittableOnWireAlarm()->deadline());
+  EXPECT_TRUE(connection_.GetPingAlarm()->IsSet());
+  EXPECT_EQ(prev_deadline, connection_.GetPingAlarm()->deadline());
+
+  // Now receive a non-ACK packet.  This should not update the ping alarm.
+  prev_deadline = connection_.GetPingAlarm()->deadline();
+  clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5));
+  ProcessPacket(4);
+  EXPECT_TRUE(connection_.GetPingAlarm()->IsSet());
+  EXPECT_EQ(prev_deadline, connection_.GetPingAlarm()->deadline());
 
   // Simulate the alarm firing and check that a PING is sent.
   EXPECT_CALL(visitor_, SendPing()).WillOnce(Invoke([this]() {
     connection_.SendControlFrame(QuicFrame(QuicPingFrame(1)));
   }));
-  connection_.GetRetransmittableOnWireAlarm()->Fire();
+  connection_.GetPingAlarm()->Fire();
   if (GetParam().no_stop_waiting) {
     EXPECT_EQ(2u, writer_->frame_count());
   } else {
@@ -7291,10 +7308,16 @@
 
   // Advance 5ms, send a retransmittable packet to the peer.
   clock_.AdvanceTime(QuicTime::Delta::FromMilliseconds(5));
-  EXPECT_FALSE(connection_.GetRetransmittableOnWireAlarm()->IsSet());
+  EXPECT_FALSE(connection_.GetPingAlarm()->IsSet());
   connection_.SendStreamDataWithString(1, data, offset, NO_FIN);
   offset += data_size;
-  EXPECT_FALSE(connection_.GetRetransmittableOnWireAlarm()->IsSet());
+  EXPECT_TRUE(connection_.sent_packet_manager().HasInFlightPackets());
+  // The ping alarm is set for the ping timeout, not the shorter
+  // retransmittable_on_wire_timeout.
+  EXPECT_TRUE(connection_.GetPingAlarm()->IsSet());
+  QuicTime::Delta ping_delay = QuicTime::Delta::FromSeconds(kPingTimeoutSecs);
+  EXPECT_EQ((clock_.ApproximateNow() + ping_delay),
+            connection_.GetPingAlarm()->deadline());
 
   // Now receive an ACK of the first packet. This should set the
   // retransmittable-on-wire alarm now that no retransmittable packets are on
@@ -7304,16 +7327,16 @@
   EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _, _));
   QuicAckFrame frame = InitAckFrame({{1, 2}});
   ProcessAckPacket(&frame);
-  EXPECT_TRUE(connection_.GetRetransmittableOnWireAlarm()->IsSet());
+  EXPECT_TRUE(connection_.GetPingAlarm()->IsSet());
   EXPECT_EQ(clock_.ApproximateNow() + retransmittable_on_wire_timeout,
-            connection_.GetRetransmittableOnWireAlarm()->deadline());
+            connection_.GetPingAlarm()->deadline());
 
   // Before the alarm fires, send another retransmittable packet. This should
   // cancel the retransmittable-on-wire alarm since now there's a
   // retransmittable packet on the wire.
   connection_.SendStreamDataWithString(1, data, offset, NO_FIN);
   offset += data_size;
-  EXPECT_FALSE(connection_.GetRetransmittableOnWireAlarm()->IsSet());
+  EXPECT_TRUE(connection_.GetPingAlarm()->IsSet());
 
   // Now receive an ACK of the second packet. This should set the
   // retransmittable-on-wire alarm now that no retransmittable packets are on
@@ -7322,16 +7345,16 @@
   EXPECT_CALL(*send_algorithm_, OnCongestionEvent(true, _, _, _, _));
   frame = InitAckFrame({{2, 3}});
   ProcessAckPacket(&frame);
-  EXPECT_TRUE(connection_.GetRetransmittableOnWireAlarm()->IsSet());
+  EXPECT_TRUE(connection_.GetPingAlarm()->IsSet());
   EXPECT_EQ(clock_.ApproximateNow() + retransmittable_on_wire_timeout,
-            connection_.GetRetransmittableOnWireAlarm()->deadline());
+            connection_.GetPingAlarm()->deadline());
 
   // Simulate the alarm firing and check that a PING is sent.
   writer_->Reset();
   EXPECT_CALL(visitor_, SendPing()).WillOnce(Invoke([this]() {
     connection_.SendControlFrame(QuicFrame(QuicPingFrame(1)));
   }));
-  connection_.GetRetransmittableOnWireAlarm()->Fire();
+  connection_.GetPingAlarm()->Fire();
   if (GetParam().no_stop_waiting) {
     EXPECT_EQ(2u, writer_->frame_count());
   } else {
@@ -7484,6 +7507,29 @@
                       &(writer_->path_response_frames().front().data_buffer),
                       sizeof(challenge_data)));
 }
+
+// Regression test for b/110259444
+TEST_P(QuicConnectionTest, DoNotScheduleSpuriousAckAlarm) {
+  SetQuicReloadableFlag(quic_fix_spurious_ack_alarm, true);
+  EXPECT_CALL(visitor_, OnSuccessfulVersionNegotiation(_));
+  EXPECT_CALL(visitor_, OnWriteBlocked()).Times(AtLeast(1));
+  writer_->SetWriteBlocked();
+
+  ProcessPacket(1);
+  QuicAlarm* ack_alarm = QuicConnectionPeer::GetAckAlarm(&connection_);
+  // Verify ack alarm is set.
+  EXPECT_TRUE(ack_alarm->IsSet());
+  // Fire the ack alarm, verify no packet is sent because the writer is blocked.
+  EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(0);
+  connection_.GetAckAlarm()->Fire();
+
+  writer_->SetWritable();
+  EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(1);
+  ProcessPacket(2);
+  // Verify ack alarm is not set.
+  EXPECT_FALSE(ack_alarm->IsSet());
+}
+
 }  // namespace
 }  // namespace test
 }  // namespace quic
diff --git a/net/third_party/quic/core/quic_constants.h b/net/third_party/quic/core/quic_constants.h
index 7073feb..539fd06 100644
--- a/net/third_party/quic/core/quic_constants.h
+++ b/net/third_party/quic/core/quic_constants.h
@@ -81,15 +81,9 @@
 const size_t kPublicFlagsSize = 1;
 // Number of bytes reserved for version number in the packet header.
 const size_t kQuicVersionSize = 4;
-// Number of bytes reserved for path id in the packet header.
-const size_t kQuicPathIdSize = 1;
-// Number of bytes reserved for private flags in the packet header.
-const size_t kPrivateFlagsSize = 1;
 
 // Signifies that the QuicPacket will contain version of the protocol.
 const bool kIncludeVersion = true;
-// Signifies that the QuicPacket will contain path id.
-const bool kIncludePathId = true;
 // Signifies that the QuicPacket will include a diversification nonce.
 const bool kIncludeDiversificationNonce = true;
 
diff --git a/net/third_party/quic/core/quic_control_frame_manager.cc b/net/third_party/quic/core/quic_control_frame_manager.cc
index f9ac03c5..accaa6f6 100644
--- a/net/third_party/quic/core/quic_control_frame_manager.cc
+++ b/net/third_party/quic/core/quic_control_frame_manager.cc
@@ -28,18 +28,22 @@
   }
 }
 
+void QuicControlFrameManager::WriteOrBufferQuicFrame(QuicFrame frame) {
+  const bool had_buffered_frames = HasBufferedFrames();
+  control_frames_.emplace_back(frame);
+  if (had_buffered_frames) {
+    return;
+  }
+  WriteBufferedFrames();
+}
+
 void QuicControlFrameManager::WriteOrBufferRstStream(
     QuicStreamId id,
     QuicRstStreamErrorCode error,
     QuicStreamOffset bytes_written) {
   QUIC_DVLOG(1) << "Writing RST_STREAM_FRAME";
-  const bool had_buffered_frames = HasBufferedFrames();
-  control_frames_.emplace_back((QuicFrame(new QuicRstStreamFrame(
+  WriteOrBufferQuicFrame((QuicFrame(new QuicRstStreamFrame(
       ++last_control_frame_id_, id, error, bytes_written))));
-  if (had_buffered_frames) {
-    return;
-  }
-  WriteBufferedFrames();
 }
 
 void QuicControlFrameManager::WriteOrBufferGoAway(
@@ -47,37 +51,22 @@
     QuicStreamId last_good_stream_id,
     const QuicString& reason) {
   QUIC_DVLOG(1) << "Writing GOAWAY_FRAME";
-  const bool had_buffered_frames = HasBufferedFrames();
-  control_frames_.emplace_back(QuicFrame(new QuicGoAwayFrame(
+  WriteOrBufferQuicFrame(QuicFrame(new QuicGoAwayFrame(
       ++last_control_frame_id_, error, last_good_stream_id, reason)));
-  if (had_buffered_frames) {
-    return;
-  }
-  WriteBufferedFrames();
 }
 
 void QuicControlFrameManager::WriteOrBufferWindowUpdate(
     QuicStreamId id,
     QuicStreamOffset byte_offset) {
   QUIC_DVLOG(1) << "Writing WINDOW_UPDATE_FRAME";
-  const bool had_buffered_frames = HasBufferedFrames();
-  control_frames_.emplace_back(QuicFrame(
+  WriteOrBufferQuicFrame(QuicFrame(
       new QuicWindowUpdateFrame(++last_control_frame_id_, id, byte_offset)));
-  if (had_buffered_frames) {
-    return;
-  }
-  WriteBufferedFrames();
 }
 
 void QuicControlFrameManager::WriteOrBufferBlocked(QuicStreamId id) {
   QUIC_DVLOG(1) << "Writing BLOCKED_FRAME";
-  const bool had_buffered_frames = HasBufferedFrames();
-  control_frames_.emplace_back(
+  WriteOrBufferQuicFrame(
       QuicFrame(new QuicBlockedFrame(++last_control_frame_id_, id)));
-  if (had_buffered_frames) {
-    return;
-  }
-  WriteBufferedFrames();
 }
 
 void QuicControlFrameManager::WritePing() {
diff --git a/net/third_party/quic/core/quic_control_frame_manager.h b/net/third_party/quic/core/quic_control_frame_manager.h
index e15383d4..15aefa2 100644
--- a/net/third_party/quic/core/quic_control_frame_manager.h
+++ b/net/third_party/quic/core/quic_control_frame_manager.h
@@ -113,6 +113,11 @@
   // time.
   bool HasBufferedFrames() const;
 
+  // Writes or buffers a control frame.  Frame is buffered if there already
+  // are frames waiting to be sent. If no others waiting, will try to send the
+  // frame.
+  void WriteOrBufferQuicFrame(QuicFrame frame);
+
   QuicDeque<QuicFrame> control_frames_;
 
   // Id of latest saved control frame. 0 if no control frame has been saved.
diff --git a/net/third_party/quic/core/quic_dispatcher_test.cc b/net/third_party/quic/core/quic_dispatcher_test.cc
index b82be1b1..cb969816 100644
--- a/net/third_party/quic/core/quic_dispatcher_test.cc
+++ b/net/third_party/quic/core/quic_dispatcher_test.cc
@@ -631,7 +631,7 @@
   SetQuicReloadableFlag(quic_enable_version_44, true);
   SetQuicReloadableFlag(quic_enable_version_45, true);
   SetQuicReloadableFlag(quic_enable_version_46, true);
-  SetQuicFlag(&FLAGS_quic_enable_version_99, true);
+  SetQuicReloadableFlag(quic_enable_version_99, true);
   QuicSocketAddress client_address(QuicIpAddress::Loopback4(), 1);
   server_address_ = QuicSocketAddress(QuicIpAddress::Any4(), 5);
   QuicConnectionId connection_id = 1;
@@ -1831,6 +1831,9 @@
 
 // Regression test for b/117874922.
 TEST_P(BufferedPacketStoreTest, ProcessBufferedChloWithDifferentVersion) {
+  // Turn off version 99, such that the preferred version is not supported by
+  // the server.
+  SetQuicReloadableFlag(quic_enable_version_99, false);
   QuicConnectionId last_connection_id = kMaxNumSessionsToCreate + 5;
   ParsedQuicVersionVector supported_versions = CurrentSupportedVersions();
   for (QuicConnectionId conn_id = 1; conn_id <= last_connection_id; ++conn_id) {
@@ -1962,13 +1965,13 @@
  protected:
   const QuicSocketAddress client_addr_;
   const QuicSocketAddress client_addr_2_;
+  CryptoHandshakeMessage chlo_;
 
  private:
   QuicCryptoServerConfigPeer crypto_config_peer_;
   QuicSocketAddress server_addr_;
   QuicReferenceCountedPointer<QuicSignedServerConfig> signed_config_;
   const QuicClock* clock_;
-  CryptoHandshakeMessage chlo_;
   CryptoHandshakeMessage full_chlo_;    // CHLO for client_addr_
   CryptoHandshakeMessage full_chlo_2_;  // CHLO for client_addr_2_
 
@@ -2485,18 +2488,19 @@
   // because of QUIC_INVALID_STREAM_DATA.
 
   SetQuicReloadableFlag(quic_disable_version_35, false);
-
+  ParsedQuicVersion chlo_version(PROTOCOL_QUIC_CRYPTO, QUIC_VERSION_39);
+  chlo_.SetVersion(kVER, chlo_version);
   // Send a CHLO with v39. Dispatcher framer's version is set to v39.
-  ProcessPacket(client_addr_, 1, true,
-                ParsedQuicVersion(PROTOCOL_QUIC_CRYPTO, QUIC_VERSION_39),
-                SerializeCHLO(), PACKET_8BYTE_CONNECTION_ID,
-                PACKET_4BYTE_PACKET_NUMBER, 1);
+  ProcessPacket(client_addr_, 1, true, chlo_version, SerializeCHLO(),
+                PACKET_8BYTE_CONNECTION_ID, PACKET_4BYTE_PACKET_NUMBER, 1);
 
   // Send another CHLO with v35. Dispatcher framer's version is set to v35.
-  ProcessPacket(client_addr_, 2, true,
-                ParsedQuicVersion(PROTOCOL_QUIC_CRYPTO, QUIC_VERSION_35),
-                SerializeCHLO(), PACKET_8BYTE_CONNECTION_ID,
-                PACKET_4BYTE_PACKET_NUMBER, 1);
+  chlo_version.transport_version = QUIC_VERSION_35;
+  chlo_.SetVersion(kVER, chlo_version);
+  // Invalidate the cached serialized form.
+  chlo_.MarkDirty();
+  ProcessPacket(client_addr_, 2, true, chlo_version, SerializeCHLO(),
+                PACKET_8BYTE_CONNECTION_ID, PACKET_4BYTE_PACKET_NUMBER, 1);
   ASSERT_EQ(GetFakeProofSource()->NumPendingCallbacks(), 2);
 
   // Complete the ProofSource::GetProof call for v39. This would cause the
@@ -2510,17 +2514,19 @@
   SetQuicReloadableFlag(quic_fix_last_packet_is_ietf_quic, true);
 
   // Process a packet of v44.
-  ProcessPacket(client_addr_, 1, true,
-                ParsedQuicVersion(PROTOCOL_QUIC_CRYPTO, QUIC_VERSION_44),
-                SerializeCHLO(), PACKET_8BYTE_CONNECTION_ID,
-                PACKET_4BYTE_PACKET_NUMBER, 1);
+  ParsedQuicVersion chlo_version(PROTOCOL_QUIC_CRYPTO, QUIC_VERSION_44);
+  chlo_.SetVersion(kVER, chlo_version);
+  ProcessPacket(client_addr_, 1, true, chlo_version, SerializeCHLO(),
+                PACKET_8BYTE_CONNECTION_ID, PACKET_4BYTE_PACKET_NUMBER, 1);
   EXPECT_NE(GOOGLE_QUIC_PACKET, dispatcher_->GetLastPacketFormat());
 
   // Process another packet of v43.
-  ProcessPacket(client_addr_, 2, true,
-                ParsedQuicVersion(PROTOCOL_QUIC_CRYPTO, QUIC_VERSION_43),
-                SerializeCHLO(), PACKET_8BYTE_CONNECTION_ID,
-                PACKET_4BYTE_PACKET_NUMBER, 1);
+  chlo_version.transport_version = QUIC_VERSION_43;
+  chlo_.SetVersion(kVER, chlo_version);
+  // Invalidate the cached serialized form.
+  chlo_.MarkDirty();
+  ProcessPacket(client_addr_, 2, true, chlo_version, SerializeCHLO(),
+                PACKET_8BYTE_CONNECTION_ID, PACKET_4BYTE_PACKET_NUMBER, 1);
   EXPECT_EQ(GOOGLE_QUIC_PACKET, dispatcher_->GetLastPacketFormat());
   ASSERT_EQ(GetFakeProofSource()->NumPendingCallbacks(), 2);
 
diff --git a/net/third_party/quic/core/quic_packet_generator.h b/net/third_party/quic/core/quic_packet_generator.h
index 839ef6a..a416f178 100644
--- a/net/third_party/quic/core/quic_packet_generator.h
+++ b/net/third_party/quic/core/quic_packet_generator.h
@@ -219,6 +219,8 @@
     packet_creator_.set_debug_delegate(debug_delegate);
   }
 
+  bool should_send_ack() const { return should_send_ack_; }
+
  private:
   friend class test::QuicPacketGeneratorPeer;
 
diff --git a/net/third_party/quic/core/quic_session.cc b/net/third_party/quic/core/quic_session.cc
index ed2d5d0..e17271d7 100644
--- a/net/third_party/quic/core/quic_session.cc
+++ b/net/third_party/quic/core/quic_session.cc
@@ -583,15 +583,24 @@
     --num_dynamic_incoming_streams_;
   }
 
-  if (draining_streams_.find(stream_id) != draining_streams_.end() &&
-      IsIncomingStream(stream_id)) {
-    --num_draining_incoming_streams_;
+  bool stream_was_draining = false;
+  if (draining_streams_.find(stream_id) != draining_streams_.end()) {
+    if (IsIncomingStream(stream_id)) {
+      --num_draining_incoming_streams_;
+    }
+    stream_was_draining = true;
+    draining_streams_.erase(stream_id);
   }
-  draining_streams_.erase(stream_id);
 
   stream->OnClose();
   // Decrease the number of streams being emulated when a new one is opened.
   connection_->SetNumOpenStreams(dynamic_stream_map_.size());
+
+  if (!stream_was_draining && !IsIncomingStream(stream_id)) {
+    // Streams that first became draining already called OnCanCreate...
+    // This covers the case where the stream went directly to being closed.
+    OnCanCreateNewOutgoingStream();
+  }
 }
 
 void QuicSession::OnFinalByteOffsetReceived(
@@ -883,6 +892,10 @@
       ++num_draining_incoming_streams_;
     }
   }
+  if (!IsIncomingStream(stream_id)) {
+    // Inform application that a stream is available.
+    OnCanCreateNewOutgoingStream();
+  }
 }
 
 bool QuicSession::MaybeIncreaseLargestPeerStreamId(
@@ -1401,5 +1414,7 @@
   return connection_->deprecate_post_process_after_data();
 }
 
+void QuicSession::OnCanCreateNewOutgoingStream() {}
+
 #undef ENDPOINT  // undef for jumbo builds
 }  // namespace quic
diff --git a/net/third_party/quic/core/quic_session.h b/net/third_party/quic/core/quic_session.h
index 278c3338a..26ad3a1 100644
--- a/net/third_party/quic/core/quic_session.h
+++ b/net/third_party/quic/core/quic_session.h
@@ -347,6 +347,11 @@
     return supported_versions_;
   }
 
+  // Called when new outgoing streams are available to be opened. This occurs
+  // when an extant, open, stream is moved to draining or closed. The default
+  // implementation does nothing.
+  virtual void OnCanCreateNewOutgoingStream();
+
  protected:
   using StaticStreamMap = QuicSmallMap<QuicStreamId, QuicStream*, 2>;
 
diff --git a/net/third_party/quic/core/quic_version_manager.cc b/net/third_party/quic/core/quic_version_manager.cc
index 70498a1..5780446 100644
--- a/net/third_party/quic/core/quic_version_manager.cc
+++ b/net/third_party/quic/core/quic_version_manager.cc
@@ -14,7 +14,7 @@
 
 QuicVersionManager::QuicVersionManager(
     ParsedQuicVersionVector supported_versions)
-    : enable_version_99_(GetQuicFlag(FLAGS_quic_enable_version_99)),
+    : enable_version_99_(GetQuicReloadableFlag(quic_enable_version_99)),
       enable_version_46_(GetQuicReloadableFlag(quic_enable_version_46)),
       enable_version_45_(GetQuicReloadableFlag(quic_enable_version_45)),
       enable_version_44_(GetQuicReloadableFlag(quic_enable_version_44)),
@@ -38,13 +38,13 @@
 }
 
 void QuicVersionManager::MaybeRefilterSupportedVersions() {
-  if (enable_version_99_ != GetQuicFlag(FLAGS_quic_enable_version_99) ||
+  if (enable_version_99_ != GetQuicReloadableFlag(quic_enable_version_99) ||
       enable_version_46_ != GetQuicReloadableFlag(quic_enable_version_46) ||
       enable_version_45_ != GetQuicReloadableFlag(quic_enable_version_45) ||
       enable_version_44_ != GetQuicReloadableFlag(quic_enable_version_44) ||
       enable_version_43_ != GetQuicReloadableFlag(quic_enable_version_43) ||
       disable_version_35_ != GetQuicReloadableFlag(quic_disable_version_35)) {
-    enable_version_99_ = GetQuicFlag(FLAGS_quic_enable_version_99);
+    enable_version_99_ = GetQuicReloadableFlag(quic_enable_version_99);
     enable_version_46_ = GetQuicReloadableFlag(quic_enable_version_46);
     enable_version_45_ = GetQuicReloadableFlag(quic_enable_version_45);
     enable_version_44_ = GetQuicReloadableFlag(quic_enable_version_44);
diff --git a/net/third_party/quic/core/quic_version_manager.h b/net/third_party/quic/core/quic_version_manager.h
index a230c73..9804bf5 100644
--- a/net/third_party/quic/core/quic_version_manager.h
+++ b/net/third_party/quic/core/quic_version_manager.h
@@ -35,7 +35,7 @@
   }
 
  private:
-  // FLAGS_quic_enable_version_99
+  // FLAGS_quic_reloadable_flag_quic_enable_version_99
   bool enable_version_99_;
   // FLAGS_quic_reloadable_flag_quic_enable_version_46
   bool enable_version_46_;
diff --git a/net/third_party/quic/core/quic_version_manager_test.cc b/net/third_party/quic/core/quic_version_manager_test.cc
index 6002861..53df8555 100644
--- a/net/third_party/quic/core/quic_version_manager_test.cc
+++ b/net/third_party/quic/core/quic_version_manager_test.cc
@@ -18,7 +18,7 @@
 TEST_F(QuicVersionManagerTest, QuicVersionManager) {
   static_assert(QUIC_ARRAYSIZE(kSupportedTransportVersions) == 7u,
                 "Supported versions out of sync");
-  SetQuicFlag(&FLAGS_quic_enable_version_99, false);
+  SetQuicReloadableFlag(quic_enable_version_99, false);
   SetQuicReloadableFlag(quic_enable_version_46, false);
   SetQuicReloadableFlag(quic_enable_version_45, false);
   SetQuicReloadableFlag(quic_enable_version_44, false);
@@ -58,7 +58,7 @@
                                         QUIC_VERSION_39, QUIC_VERSION_35}),
             manager.GetSupportedTransportVersions());
 
-  SetQuicFlag(&FLAGS_quic_enable_version_99, true);
+  SetQuicReloadableFlag(quic_enable_version_99, true);
   EXPECT_EQ(
       QuicTransportVersionVector(
           {QUIC_VERSION_99, QUIC_VERSION_46, QUIC_VERSION_45, QUIC_VERSION_44,
diff --git a/net/third_party/quic/core/quic_versions.cc b/net/third_party/quic/core/quic_versions.cc
index e82679b6..8c613946 100644
--- a/net/third_party/quic/core/quic_versions.cc
+++ b/net/third_party/quic/core/quic_versions.cc
@@ -158,7 +158,7 @@
   filtered_versions.reserve(versions.size());
   for (ParsedQuicVersion version : versions) {
     if (version.transport_version == QUIC_VERSION_99) {
-      if (GetQuicFlag(FLAGS_quic_enable_version_99) &&
+      if (GetQuicReloadableFlag(quic_enable_version_99) &&
           GetQuicReloadableFlag(quic_enable_version_46) &&
           GetQuicReloadableFlag(quic_enable_version_45) &&
           GetQuicReloadableFlag(quic_enable_version_44) &&
diff --git a/net/third_party/quic/core/quic_versions_test.cc b/net/third_party/quic/core/quic_versions_test.cc
index 3ad9bbab..a9be875 100644
--- a/net/third_party/quic/core/quic_versions_test.cc
+++ b/net/third_party/quic/core/quic_versions_test.cc
@@ -315,7 +315,7 @@
   SetQuicReloadableFlag(quic_enable_version_44, true);
   SetQuicReloadableFlag(quic_enable_version_45, true);
   SetQuicReloadableFlag(quic_enable_version_46, true);
-  SetQuicFlag(&FLAGS_quic_enable_version_99, true);
+  SetQuicReloadableFlag(quic_enable_version_99, true);
   ParsedQuicVersionVector parsed_versions;
   for (QuicTransportVersion version : all_versions) {
     parsed_versions.push_back(ParsedQuicVersion(PROTOCOL_QUIC_CRYPTO, version));
@@ -340,7 +340,7 @@
   SetQuicReloadableFlag(quic_enable_version_44, true);
   SetQuicReloadableFlag(quic_enable_version_45, true);
   SetQuicReloadableFlag(quic_enable_version_46, true);
-  SetQuicFlag(&FLAGS_quic_enable_version_99, false);
+  SetQuicReloadableFlag(quic_enable_version_99, false);
   ParsedQuicVersionVector parsed_versions;
   for (QuicTransportVersion version : all_versions) {
     parsed_versions.push_back(ParsedQuicVersion(PROTOCOL_QUIC_CRYPTO, version));
@@ -365,7 +365,7 @@
   SetQuicReloadableFlag(quic_enable_version_44, true);
   SetQuicReloadableFlag(quic_enable_version_45, true);
   SetQuicReloadableFlag(quic_enable_version_46, false);
-  SetQuicFlag(&FLAGS_quic_enable_version_99, false);
+  SetQuicReloadableFlag(quic_enable_version_99, false);
   ParsedQuicVersionVector parsed_versions;
   for (QuicTransportVersion version : all_versions) {
     parsed_versions.push_back(ParsedQuicVersion(PROTOCOL_QUIC_CRYPTO, version));
@@ -390,7 +390,7 @@
   SetQuicReloadableFlag(quic_enable_version_44, true);
   SetQuicReloadableFlag(quic_enable_version_45, false);
   SetQuicReloadableFlag(quic_enable_version_46, false);
-  SetQuicFlag(&FLAGS_quic_enable_version_99, false);
+  SetQuicReloadableFlag(quic_enable_version_99, false);
   ParsedQuicVersionVector parsed_versions;
   for (QuicTransportVersion version : all_versions) {
     parsed_versions.push_back(ParsedQuicVersion(PROTOCOL_QUIC_CRYPTO, version));
@@ -414,7 +414,7 @@
   SetQuicReloadableFlag(quic_enable_version_44, false);
   SetQuicReloadableFlag(quic_enable_version_45, false);
   SetQuicReloadableFlag(quic_enable_version_46, false);
-  SetQuicFlag(&FLAGS_quic_enable_version_99, false);
+  SetQuicReloadableFlag(quic_enable_version_99, false);
   ParsedQuicVersionVector parsed_versions;
   for (QuicTransportVersion version : all_versions) {
     parsed_versions.push_back(ParsedQuicVersion(PROTOCOL_QUIC_CRYPTO, version));
@@ -438,7 +438,7 @@
   SetQuicReloadableFlag(quic_enable_version_44, false);
   SetQuicReloadableFlag(quic_enable_version_45, false);
   SetQuicReloadableFlag(quic_enable_version_46, false);
-  SetQuicFlag(&FLAGS_quic_enable_version_99, false);
+  SetQuicReloadableFlag(quic_enable_version_99, false);
   ParsedQuicVersionVector parsed_versions;
   for (QuicTransportVersion version : all_versions) {
     parsed_versions.push_back(ParsedQuicVersion(PROTOCOL_QUIC_CRYPTO, version));
@@ -462,7 +462,7 @@
   SetQuicReloadableFlag(quic_enable_version_44, false);
   SetQuicReloadableFlag(quic_enable_version_45, false);
   SetQuicReloadableFlag(quic_enable_version_46, false);
-  SetQuicFlag(&FLAGS_quic_enable_version_99, false);
+  SetQuicReloadableFlag(quic_enable_version_99, false);
   ParsedQuicVersionVector parsed_versions;
   for (QuicTransportVersion version : all_versions) {
     parsed_versions.push_back(ParsedQuicVersion(PROTOCOL_QUIC_CRYPTO, version));
diff --git a/net/third_party/quic/quartc/quartc_factory.cc b/net/third_party/quic/quartc/quartc_factory.cc
index dca09fa5..f2e90b5 100644
--- a/net/third_party/quic/quartc/quartc_factory.cc
+++ b/net/third_party/quic/quartc/quartc_factory.cc
@@ -38,6 +38,9 @@
   // fixes it.
   SetQuicReloadableFlag(quic_fix_reset_zombie_streams, true);
 
+  // Fix b/110259444.
+  SetQuicReloadableFlag(quic_fix_spurious_ack_alarm, true);
+
   std::unique_ptr<QuicConnection> quic_connection =
       CreateQuicConnection(perspective, writer.get());
 
diff --git a/net/third_party/quic/test_tools/quic_connection_peer.cc b/net/third_party/quic/test_tools/quic_connection_peer.cc
index 43c6166..d601803 100644
--- a/net/third_party/quic/test_tools/quic_connection_peer.cc
+++ b/net/third_party/quic/test_tools/quic_connection_peer.cc
@@ -183,12 +183,6 @@
 }
 
 // static
-QuicAlarm* QuicConnectionPeer::GetRetransmittableOnWireAlarm(
-    QuicConnection* connection) {
-  return connection->retransmittable_on_wire_alarm_.get();
-}
-
-// static
 QuicAlarm* QuicConnectionPeer::GetPathDegradingAlarm(
     QuicConnection* connection) {
   return connection->path_degrading_alarm_.get();
diff --git a/net/third_party/quic/test_tools/quic_connection_peer.h b/net/third_party/quic/test_tools/quic_connection_peer.h
index dea5cfb..9d36b31 100644
--- a/net/third_party/quic/test_tools/quic_connection_peer.h
+++ b/net/third_party/quic/test_tools/quic_connection_peer.h
@@ -93,7 +93,6 @@
   static QuicAlarm* GetSendAlarm(QuicConnection* connection);
   static QuicAlarm* GetTimeoutAlarm(QuicConnection* connection);
   static QuicAlarm* GetMtuDiscoveryAlarm(QuicConnection* connection);
-  static QuicAlarm* GetRetransmittableOnWireAlarm(QuicConnection* connection);
   static QuicAlarm* GetPathDegradingAlarm(QuicConnection* connection);
   static QuicAlarm* GetProcessUndecryptablePacketsAlarm(
       QuicConnection* connection);
diff --git a/net/third_party/quic/test_tools/simple_session_notifier_test.cc b/net/third_party/quic/test_tools/simple_session_notifier_test.cc
index db61db5ab..c3694fd 100644
--- a/net/third_party/quic/test_tools/simple_session_notifier_test.cc
+++ b/net/third_party/quic/test_tools/simple_session_notifier_test.cc
@@ -4,6 +4,7 @@
 
 #include "net/third_party/quic/test_tools/simple_session_notifier.h"
 
+#include "net/third_party/quic/core/quic_utils.h"
 #include "net/third_party/quic/platform/api/quic_test.h"
 #include "net/third_party/quic/test_tools/quic_connection_peer.h"
 #include "net/third_party/quic/test_tools/quic_test_utils.h"
@@ -103,35 +104,55 @@
   InSequence s;
   // Send crypto data [0, 1024) in ENCRYPTION_NONE.
   connection_.SetDefaultEncryptionLevel(ENCRYPTION_NONE);
-  EXPECT_CALL(connection_, SendStreamData(1, 1024, 0, NO_FIN))
+  EXPECT_CALL(connection_, SendStreamData(QuicUtils::GetCryptoStreamId(
+                                              connection_.transport_version()),
+                                          1024, 0, NO_FIN))
       .WillOnce(Return(QuicConsumedData(1024, false)));
-  notifier_.WriteOrBufferData(1, 1024, NO_FIN);
+  notifier_.WriteOrBufferData(
+      QuicUtils::GetCryptoStreamId(connection_.transport_version()), 1024,
+      NO_FIN);
   // Send crypto data [1024, 2048) in ENCRYPTION_INITIAL.
   connection_.SetDefaultEncryptionLevel(ENCRYPTION_INITIAL);
-  EXPECT_CALL(connection_, SendStreamData(1, 1024, 1024, NO_FIN))
+  EXPECT_CALL(connection_, SendStreamData(QuicUtils::GetCryptoStreamId(
+                                              connection_.transport_version()),
+                                          1024, 1024, NO_FIN))
       .WillOnce(Return(QuicConsumedData(1024, false)));
-  notifier_.WriteOrBufferData(1, 1024, NO_FIN);
+  notifier_.WriteOrBufferData(
+      QuicUtils::GetCryptoStreamId(connection_.transport_version()), 1024,
+      NO_FIN);
   // Ack [1024, 2048).
-  QuicStreamFrame stream_frame(1, false, 1024, 1024);
+  QuicStreamFrame stream_frame(
+      QuicUtils::GetCryptoStreamId(connection_.transport_version()), false,
+      1024, 1024);
   notifier_.OnFrameAcked(QuicFrame(stream_frame), QuicTime::Delta::Zero());
-  EXPECT_TRUE(notifier_.StreamIsWaitingForAcks(1));
+  EXPECT_TRUE(notifier_.StreamIsWaitingForAcks(
+      QuicUtils::GetCryptoStreamId(connection_.transport_version())));
   // Neuters unencrypted data.
   notifier_.NeuterUnencryptedData();
-  EXPECT_FALSE(notifier_.StreamIsWaitingForAcks(1));
+  EXPECT_FALSE(notifier_.StreamIsWaitingForAcks(
+      QuicUtils::GetCryptoStreamId(connection_.transport_version())));
 }
 
 TEST_F(SimpleSessionNotifierTest, OnCanWrite) {
   InSequence s;
   // Send crypto data [0, 1024) in ENCRYPTION_NONE.
   connection_.SetDefaultEncryptionLevel(ENCRYPTION_NONE);
-  EXPECT_CALL(connection_, SendStreamData(1, 1024, 0, NO_FIN))
+  EXPECT_CALL(connection_, SendStreamData(QuicUtils::GetCryptoStreamId(
+                                              connection_.transport_version()),
+                                          1024, 0, NO_FIN))
       .WillOnce(Return(QuicConsumedData(1024, false)));
-  notifier_.WriteOrBufferData(1, 1024, NO_FIN);
+  notifier_.WriteOrBufferData(
+      QuicUtils::GetCryptoStreamId(connection_.transport_version()), 1024,
+      NO_FIN);
   // Send crypto data [1024, 2048) in ENCRYPTION_INITIAL.
   connection_.SetDefaultEncryptionLevel(ENCRYPTION_INITIAL);
-  EXPECT_CALL(connection_, SendStreamData(1, 1024, 1024, NO_FIN))
+  EXPECT_CALL(connection_, SendStreamData(QuicUtils::GetCryptoStreamId(
+                                              connection_.transport_version()),
+                                          1024, 1024, NO_FIN))
       .WillOnce(Return(QuicConsumedData(1024, false)));
-  notifier_.WriteOrBufferData(1, 1024, NO_FIN);
+  notifier_.WriteOrBufferData(
+      QuicUtils::GetCryptoStreamId(connection_.transport_version()), 1024,
+      NO_FIN);
   // Send stream 3 [0, 1024) and connection is blocked.
   EXPECT_CALL(connection_, SendStreamData(3, 1024, 0, FIN))
       .WillOnce(Return(QuicConsumedData(512, false)));
@@ -144,7 +165,9 @@
   notifier_.WriteOrBufferRstStream(5, QUIC_ERROR_PROCESSING_STREAM, 1024);
 
   // Lost crypto data [500, 1500) and stream 3 [0, 512).
-  QuicStreamFrame frame1(1, false, 500, 1000);
+  QuicStreamFrame frame1(
+      QuicUtils::GetCryptoStreamId(connection_.transport_version()), false, 500,
+      1000);
   QuicStreamFrame frame2(3, false, 0, 512);
   notifier_.OnFrameLost(QuicFrame(frame1));
   notifier_.OnFrameLost(QuicFrame(frame2));
@@ -152,9 +175,13 @@
   // Connection becomes writable.
   // Lost crypto data gets retransmitted as [500, 1024) and [1024, 1500), as
   // they are in different encryption levels.
-  EXPECT_CALL(connection_, SendStreamData(1, 524, 500, NO_FIN))
+  EXPECT_CALL(connection_, SendStreamData(QuicUtils::GetCryptoStreamId(
+                                              connection_.transport_version()),
+                                          524, 500, NO_FIN))
       .WillOnce(Return(QuicConsumedData(524, false)));
-  EXPECT_CALL(connection_, SendStreamData(1, 476, 1024, NO_FIN))
+  EXPECT_CALL(connection_, SendStreamData(QuicUtils::GetCryptoStreamId(
+                                              connection_.transport_version()),
+                                          476, 1024, NO_FIN))
       .WillOnce(Return(QuicConsumedData(476, false)));
   // Lost stream 3 data gets retransmitted.
   EXPECT_CALL(connection_, SendStreamData(3, 512, 0, NO_FIN))
diff --git a/net/third_party/quic/tools/quic_simple_server_session.cc b/net/third_party/quic/tools/quic_simple_server_session.cc
index f86cc4d..87e66e90f 100644
--- a/net/third_party/quic/tools/quic_simple_server_session.cc
+++ b/net/third_party/quic/tools/quic_simple_server_session.cc
@@ -49,13 +49,6 @@
       stream_helper());
 }
 
-void QuicSimpleServerSession::StreamDraining(QuicStreamId id) {
-  QuicSpdySession::StreamDraining(id);
-  if (!IsIncomingStream(id)) {
-    HandlePromisedPushRequests();
-  }
-}
-
 void QuicSimpleServerSession::OnStreamFrame(const QuicStreamFrame& frame) {
   if (!IsIncomingStream(frame.stream_id)) {
     QUIC_LOG(WARNING) << "Client shouldn't send data on server push stream";
@@ -120,12 +113,6 @@
   return stream;
 }
 
-void QuicSimpleServerSession::CloseStreamInner(QuicStreamId stream_id,
-                                               bool locally_reset) {
-  QuicSpdySession::CloseStreamInner(stream_id, locally_reset);
-  HandlePromisedPushRequests();
-}
-
 void QuicSimpleServerSession::HandleFrameOnNonexistentOutgoingStream(
     QuicStreamId stream_id) {
   // If this stream is a promised but not created stream (stream_id within the
@@ -219,4 +206,7 @@
   }
 }
 
+void QuicSimpleServerSession::OnCanCreateNewOutgoingStream() {
+  HandlePromisedPushRequests();
+}
 }  // namespace quic
diff --git a/net/third_party/quic/tools/quic_simple_server_session.h b/net/third_party/quic/tools/quic_simple_server_session.h
index 1d6e02f..049ff500 100644
--- a/net/third_party/quic/tools/quic_simple_server_session.h
+++ b/net/third_party/quic/tools/quic_simple_server_session.h
@@ -66,11 +66,6 @@
 
   ~QuicSimpleServerSession() override;
 
-  // When a stream is marked draining, it will decrease the number of open
-  // streams. If it is an outgoing stream, try to open a new stream to send
-  // remaing push responses.
-  void StreamDraining(QuicStreamId id) override;
-
   // Override base class to detact client sending data on server push stream.
   void OnStreamFrame(const QuicStreamFrame& frame) override;
 
@@ -84,14 +79,13 @@
       QuicStreamId original_stream_id,
       const spdy::SpdyHeaderBlock& original_request_headers);
 
+  void OnCanCreateNewOutgoingStream() override;
+
  protected:
   // QuicSession methods:
   QuicSpdyStream* CreateIncomingStream(QuicStreamId id) override;
   QuicSimpleServerStream* CreateOutgoingBidirectionalStream() override;
   QuicSimpleServerStream* CreateOutgoingUnidirectionalStream() override;
-  // Closing an outgoing stream can reduce open outgoing stream count, try
-  // to handle queued promised streams right now.
-  void CloseStreamInner(QuicStreamId stream_id, bool locally_reset) override;
   // Override to return true for locally preserved server push stream.
   void HandleFrameOnNonexistentOutgoingStream(QuicStreamId stream_id) override;
   // Override to handle reseting locally preserved streams.
diff --git a/net/third_party/quic/tools/quic_simple_server_stream.cc b/net/third_party/quic/tools/quic_simple_server_stream.cc
index 4f441de..c15dec9 100644
--- a/net/third_party/quic/tools/quic_simple_server_stream.cc
+++ b/net/third_party/quic/tools/quic_simple_server_stream.cc
@@ -273,7 +273,7 @@
   QUIC_DLOG(INFO) << "Stream " << id()
                   << " writing body (fin = false) with size: " << body.size();
   if (!body.empty()) {
-    WriteOrBufferData(body, /*fin=*/false, nullptr);
+    WriteOrBufferBody(body, /*fin=*/false, nullptr);
   }
 }
 
@@ -303,7 +303,7 @@
   QUIC_DLOG(INFO) << "Stream " << id() << " writing body (fin = " << send_fin
                   << ") with size: " << body.size();
   if (!body.empty() || send_fin) {
-    WriteOrBufferData(body, send_fin, nullptr);
+    WriteOrBufferBody(body, send_fin, nullptr);
   }
   if (send_fin) {
     // Nothing else to send.
diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc
index 9e9e45b..f746ec5 100644
--- a/net/url_request/url_request_context_builder.cc
+++ b/net/url_request/url_request_context_builder.cc
@@ -250,6 +250,10 @@
         request_context->network_quality_estimator()
             ->GetSocketPerformanceWatcherFactory();
   }
+#if BUILDFLAG(ENABLE_REPORTING)
+  session_context->network_error_logging_service =
+      request_context->network_error_logging_service();
+#endif
 }
 
 void URLRequestContextBuilder::set_accept_language(
@@ -547,6 +551,31 @@
       proxy_resolution_service_.get();
   storage->set_proxy_resolution_service(std::move(proxy_resolution_service_));
 
+#if BUILDFLAG(ENABLE_REPORTING)
+  // Note: ReportingService::Create and NetworkErrorLoggingService::Create can
+  // both return nullptr if the corresponding base::Feature is disabled.
+
+  if (reporting_policy_) {
+    storage->set_reporting_service(
+        ReportingService::Create(*reporting_policy_, context.get()));
+  }
+
+  if (network_error_logging_enabled_) {
+    storage->set_network_error_logging_service(
+        NetworkErrorLoggingService::Create(
+            NetworkErrorLoggingDelegate::Create()));
+  }
+
+  // If both Reporting and Network Error Logging are actually enabled, then
+  // connect them so Network Error Logging can use Reporting to deliver error
+  // reports.
+  if (context->reporting_service() &&
+      context->network_error_logging_service()) {
+    context->network_error_logging_service()->SetReportingService(
+        context->reporting_service());
+  }
+#endif  // BUILDFLAG(ENABLE_REPORTING)
+
   HttpNetworkSession::Context network_session_context;
   SetHttpNetworkSessionComponents(context.get(), &network_session_context);
 
@@ -658,31 +687,6 @@
   }
   storage->set_job_factory(std::move(top_job_factory));
 
-#if BUILDFLAG(ENABLE_REPORTING)
-  // Note: ReportingService::Create and NetworkErrorLoggingService::Create can
-  // both return nullptr if the corresponding base::Feature is disabled.
-
-  if (reporting_policy_) {
-    storage->set_reporting_service(
-        ReportingService::Create(*reporting_policy_, context.get()));
-  }
-
-  if (network_error_logging_enabled_) {
-    storage->set_network_error_logging_service(
-        NetworkErrorLoggingService::Create(
-            NetworkErrorLoggingDelegate::Create()));
-  }
-
-  // If both Reporting and Network Error Logging are actually enabled, then
-  // connect them so Network Error Logging can use Reporting to deliver error
-  // reports.
-  if (context->reporting_service() &&
-      context->network_error_logging_service()) {
-    context->network_error_logging_service()->SetReportingService(
-        context->reporting_service());
-  }
-#endif  // BUILDFLAG(ENABLE_REPORTING)
-
   return std::move(context);
 }
 
diff --git a/net/url_request/url_request_http_job.cc b/net/url_request/url_request_http_job.cc
index ef14ad301..1962fa8 100644
--- a/net/url_request/url_request_http_job.cc
+++ b/net/url_request/url_request_http_job.cc
@@ -501,7 +501,6 @@
   ProcessExpectCTHeader();
 #if BUILDFLAG(ENABLE_REPORTING)
   ProcessReportToHeader();
-  ProcessNetworkErrorLoggingHeader();
 #endif  // BUILDFLAG(ENABLE_REPORTING)
 
   // The HTTP transaction may be restarted several times for the purposes
@@ -886,46 +885,6 @@
 
   service->ProcessHeader(request_info_.url.GetOrigin(), value);
 }
-
-void URLRequestHttpJob::ProcessNetworkErrorLoggingHeader() {
-  DCHECK(response_info_);
-
-  HttpResponseHeaders* headers = GetResponseHeaders();
-  std::string value;
-  if (!headers->GetNormalizedHeader(NetworkErrorLoggingService::kHeaderName,
-                                    &value)) {
-    return;
-  }
-
-  NetworkErrorLoggingService* service =
-      request_->context()->network_error_logging_service();
-  if (!service) {
-    NetworkErrorLoggingService::
-        RecordHeaderDiscardedForNoNetworkErrorLoggingService();
-    return;
-  }
-
-  // Only accept NEL headers on HTTPS connections that have no certificate
-  // errors.
-  const SSLInfo& ssl_info = response_info_->ssl_info;
-  if (!ssl_info.is_valid()) {
-    NetworkErrorLoggingService::RecordHeaderDiscardedForInvalidSSLInfo();
-    return;
-  }
-  if (IsCertStatusError(ssl_info.cert_status)) {
-    NetworkErrorLoggingService::RecordHeaderDiscardedForCertStatusError();
-    return;
-  }
-
-  IPEndPoint endpoint;
-  if (!GetRemoteEndpoint(&endpoint)) {
-    NetworkErrorLoggingService::RecordHeaderDiscardedForMissingRemoteEndpoint();
-    return;
-  }
-
-  service->OnHeader(url::Origin::Create(request_info_.url), endpoint.address(),
-                    value);
-}
 #endif  // BUILDFLAG(ENABLE_REPORTING)
 
 void URLRequestHttpJob::OnStartCompleted(int result) {
diff --git a/net/url_request/url_request_http_job.h b/net/url_request/url_request_http_job.h
index dc2d4fa..8f8037e8 100644
--- a/net/url_request/url_request_http_job.h
+++ b/net/url_request/url_request_http_job.h
@@ -94,11 +94,6 @@
   // Processes the Report-To header, if one exists. This header configures where
   // the Reporting API (in //net/reporting) will send reports for the origin.
   void ProcessReportToHeader();
-
-  // Processes the NEL header, if one exists. This header configures whether
-  // network errors will be reported to a specified group of endpoints using the
-  // Reporting API.
-  void ProcessNetworkErrorLoggingHeader();
 #endif  // BUILDFLAG(ENABLE_REPORTING)
 
   // |result| should be OK, or the request is canceled.
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index f6441cb..84baee1 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -7253,16 +7253,6 @@
   std::vector<RequestDetails> errors_;
 };
 
-std::unique_ptr<test_server::HttpResponse> SendNelHeader(
-    const test_server::HttpRequest& request) {
-  std::unique_ptr<test_server::BasicHttpResponse> http_response(
-      new test_server::BasicHttpResponse);
-  http_response->set_code(HTTP_OK);
-  http_response->AddCustomHeader(NetworkErrorLoggingService::kHeaderName,
-                                 "foo");
-  return std::move(http_response);
-}
-
 std::unique_ptr<test_server::HttpResponse> SendEmptyResponse(
     const test_server::HttpRequest& request) {
   return std::make_unique<test_server::RawHttpResponse>("", "");
@@ -7275,99 +7265,6 @@
 
 }  // namespace
 
-TEST_F(URLRequestTestHTTP, DontProcessNelHeaderNoDelegate) {
-  http_test_server()->RegisterRequestHandler(
-      base::BindRepeating(&SendNelHeader));
-  ASSERT_TRUE(http_test_server()->Start());
-  GURL request_url = http_test_server()->GetURL("/");
-
-  TestNetworkDelegate network_delegate;
-  TestURLRequestContext context(true);
-  context.set_network_delegate(&network_delegate);
-  context.Init();
-
-  TestDelegate d;
-  std::unique_ptr<URLRequest> request(context.CreateRequest(
-      request_url, DEFAULT_PRIORITY, &d, TRAFFIC_ANNOTATION_FOR_TESTS));
-  request->Start();
-  d.RunUntilComplete();
-}
-
-TEST_F(URLRequestTestHTTP, DontProcessNelHeaderHttp) {
-  http_test_server()->RegisterRequestHandler(
-      base::BindRepeating(&SendNelHeader));
-  ASSERT_TRUE(http_test_server()->Start());
-  GURL request_url = http_test_server()->GetURL("/");
-
-  TestNetworkDelegate network_delegate;
-  TestNetworkErrorLoggingService nel_service;
-  TestURLRequestContext context(true);
-  context.set_network_delegate(&network_delegate);
-  context.set_network_error_logging_service(&nel_service);
-  context.Init();
-
-  TestDelegate d;
-  std::unique_ptr<URLRequest> request(context.CreateRequest(
-      request_url, DEFAULT_PRIORITY, &d, TRAFFIC_ANNOTATION_FOR_TESTS));
-  request->Start();
-  d.RunUntilComplete();
-
-  EXPECT_TRUE(nel_service.headers().empty());
-}
-
-TEST_F(URLRequestTestHTTP, ProcessNelHeaderHttps) {
-  EmbeddedTestServer https_test_server(net::EmbeddedTestServer::TYPE_HTTPS);
-  https_test_server.RegisterRequestHandler(base::BindRepeating(&SendNelHeader));
-  ASSERT_TRUE(https_test_server.Start());
-  GURL request_url = https_test_server.GetURL("/");
-
-  TestNetworkDelegate network_delegate;
-  TestNetworkErrorLoggingService nel_service;
-  TestURLRequestContext context(true);
-  context.set_network_delegate(&network_delegate);
-  context.set_network_error_logging_service(&nel_service);
-  context.Init();
-
-  TestDelegate d;
-  std::unique_ptr<URLRequest> request(context.CreateRequest(
-      request_url, DEFAULT_PRIORITY, &d, TRAFFIC_ANNOTATION_FOR_TESTS));
-  request->Start();
-  d.RunUntilComplete();
-
-  ASSERT_EQ(1u, nel_service.headers().size());
-  EXPECT_EQ(url::Origin::Create(request_url), nel_service.headers()[0].origin);
-  AddressList address_list;
-  EXPECT_TRUE(https_test_server.GetAddressList(&address_list));
-  EXPECT_TRUE(nel_service.headers()[0].MatchesAddressList(address_list));
-  EXPECT_EQ("foo", nel_service.headers()[0].value);
-}
-
-TEST_F(URLRequestTestHTTP, DontProcessNelHeaderInvalidHttps) {
-  EmbeddedTestServer https_test_server(net::EmbeddedTestServer::TYPE_HTTPS);
-  https_test_server.SetSSLConfig(net::EmbeddedTestServer::CERT_MISMATCHED_NAME);
-  https_test_server.RegisterRequestHandler(base::BindRepeating(&SendNelHeader));
-  ASSERT_TRUE(https_test_server.Start());
-  GURL request_url = https_test_server.GetURL("/");
-
-  TestNetworkDelegate network_delegate;
-  TestNetworkErrorLoggingService nel_service;
-  TestURLRequestContext context(true);
-  context.set_network_delegate(&network_delegate);
-  context.set_network_error_logging_service(&nel_service);
-  context.Init();
-
-  TestDelegate d;
-  d.set_allow_certificate_errors(true);
-  std::unique_ptr<URLRequest> request(context.CreateRequest(
-      request_url, DEFAULT_PRIORITY, &d, TRAFFIC_ANNOTATION_FOR_TESTS));
-  request->Start();
-  d.RunUntilComplete();
-
-  EXPECT_TRUE(d.have_certificate_errors());
-  EXPECT_TRUE(IsCertStatusError(request->ssl_info().cert_status));
-  EXPECT_TRUE(nel_service.headers().empty());
-}
-
 TEST_F(URLRequestTestHTTP, DontForwardErrorToNelNoDelegate) {
   URLRequestFailedJob::AddUrlHandler();
 
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc
index f3fbb4d..d0397bc8 100644
--- a/pdf/out_of_process_instance.cc
+++ b/pdf/out_of_process_instance.cc
@@ -1385,7 +1385,7 @@
 }
 
 void OutOfProcessInstance::ScrollToPage(int page) {
-  if (engine_->GetNumberOfPages() == 0)
+  if (!engine_ || engine_->GetNumberOfPages() == 0)
     return;
 
   pp::VarDictionary message;
@@ -1582,8 +1582,9 @@
 }
 
 void OutOfProcessInstance::Print() {
-  if (!engine_->HasPermission(PDFEngine::PERMISSION_PRINT_LOW_QUALITY) &&
-      !engine_->HasPermission(PDFEngine::PERMISSION_PRINT_HIGH_QUALITY)) {
+  if (!engine_ ||
+      (!engine_->HasPermission(PDFEngine::PERMISSION_PRINT_LOW_QUALITY) &&
+       !engine_->HasPermission(PDFEngine::PERMISSION_PRINT_HIGH_QUALITY))) {
     return;
   }
 
diff --git a/services/catalog/catalog.cc b/services/catalog/catalog.cc
index 26f458f..aa5bad2 100644
--- a/services/catalog/catalog.cc
+++ b/services/catalog/catalog.cc
@@ -211,13 +211,13 @@
   catalog::Catalog::SetDefaultCatalogManifest(std::move(manifest_value));
 }
 
-Instance* Catalog::GetInstanceForUserId(const std::string& user_id) {
-  auto it = instances_.find(user_id);
+Instance* Catalog::GetInstanceForGroup(const std::string& instance_group) {
+  auto it = instances_.find(instance_group);
   if (it != instances_.end())
     return it->second.get();
 
   auto result = instances_.insert(std::make_pair(
-      user_id,
+      instance_group,
       std::make_unique<Instance>(&system_cache_, service_manifest_provider_)));
   return result.first->second.get();
 }
@@ -225,7 +225,8 @@
 void Catalog::BindCatalogRequest(
     mojom::CatalogRequest request,
     const service_manager::BindSourceInfo& source_info) {
-  Instance* instance = GetInstanceForUserId(source_info.identity.user_id());
+  Instance* instance =
+      GetInstanceForGroup(source_info.identity.instance_group());
   instance->BindCatalog(std::move(request));
 }
 
diff --git a/services/catalog/catalog.h b/services/catalog/catalog.h
index 866d5b0..8c96c3b 100644
--- a/services/catalog/catalog.h
+++ b/services/catalog/catalog.h
@@ -59,7 +59,7 @@
   // to be relative to the current executable's path.
   static void LoadDefaultCatalogManifest(const base::FilePath& path);
 
-  Instance* GetInstanceForUserId(const std::string& user_id);
+  Instance* GetInstanceForGroup(const std::string& instance_group);
 
  private:
   class DirectoryThreadState;
diff --git a/services/catalog/entry.cc b/services/catalog/entry.cc
index d5ea10c..f3884de 100644
--- a/services/catalog/entry.cc
+++ b/services/catalog/entry.cc
@@ -170,36 +170,41 @@
     if (const base::Value* instance_sharing_value =
             options->FindKey("instance_sharing")) {
       const std::string& instance_sharing = instance_sharing_value->GetString();
-      if (instance_sharing == "none")
+      if (instance_sharing == "none") {
         options_struct.instance_sharing =
             ServiceOptions::InstanceSharingType::NONE;
-      else if (instance_sharing == "singleton")
+      } else if (instance_sharing == "singleton") {
         options_struct.instance_sharing =
             ServiceOptions::InstanceSharingType::SINGLETON;
-      else if (instance_sharing == "shared_instance_across_users")
+      } else if (instance_sharing == "shared_instance_across_users" ||
+                 instance_sharing == "shared_across_instance_groups") {
         options_struct.instance_sharing =
-            ServiceOptions::InstanceSharingType::SHARED_INSTANCE_ACROSS_USERS;
-      else
+            ServiceOptions::InstanceSharingType::SHARED_ACROSS_INSTANCE_GROUPS;
+      } else {
         LOG(ERROR) << "Entry::Deserialize invalid instance sharing type: "
                    << instance_sharing;
+      }
     }
 
-    if (const base::Value* can_connect_to_other_services_as_any_user_value =
-            options->FindKey("can_connect_to_other_services_as_any_user"))
-      options_struct.can_connect_to_other_services_as_any_user =
-          can_connect_to_other_services_as_any_user_value->GetBool();
+    if (const base::Value* can_connect_to_instances_in_any_group =
+            options->FindKey("can_connect_to_other_services_as_any_user")) {
+      options_struct.can_connect_to_instances_in_any_group =
+          can_connect_to_instances_in_any_group->GetBool();
+    }
 
     if (const base::Value*
             can_connect_to_other_services_with_any_instance_name_value =
                 options->FindKey(
-                    "can_connect_to_other_services_with_any_instance_name"))
+                    "can_connect_to_other_services_with_any_instance_name")) {
       options_struct.can_connect_to_other_services_with_any_instance_name =
           can_connect_to_other_services_with_any_instance_name_value->GetBool();
+    }
 
     if (const base::Value* can_create_other_service_instances_value =
-            options->FindKey("can_create_other_service_instances"))
+            options->FindKey("can_create_other_service_instances")) {
       options_struct.can_create_other_service_instances =
           can_create_other_service_instances_value->GetBool();
+    }
 
     entry->AddOptions(std::move(options_struct));
   }
diff --git a/services/catalog/entry_unittest.cc b/services/catalog/entry_unittest.cc
index f7ab066..f89668b4 100644
--- a/services/catalog/entry_unittest.cc
+++ b/services/catalog/entry_unittest.cc
@@ -75,7 +75,7 @@
 
   EXPECT_EQ(ServiceOptions::InstanceSharingType::SINGLETON,
             entry->options().instance_sharing);
-  EXPECT_TRUE(entry->options().can_connect_to_other_services_as_any_user);
+  EXPECT_TRUE(entry->options().can_connect_to_instances_in_any_group);
   EXPECT_TRUE(
       entry->options().can_connect_to_other_services_with_any_instance_name);
   EXPECT_TRUE(entry->options().can_create_other_service_instances);
diff --git a/services/catalog/service_options.h b/services/catalog/service_options.h
index a38b2e8..380d40c 100644
--- a/services/catalog/service_options.h
+++ b/services/catalog/service_options.h
@@ -11,15 +11,15 @@
   enum class InstanceSharingType {
     NONE,
     SINGLETON,
-    SHARED_INSTANCE_ACROSS_USERS
+    SHARED_ACROSS_INSTANCE_GROUPS,
   };
 
   InstanceSharingType instance_sharing = InstanceSharingType::NONE;
-  bool can_connect_to_other_services_as_any_user = false;
+  bool can_connect_to_instances_in_any_group = false;
   bool can_connect_to_other_services_with_any_instance_name = false;
   bool can_create_other_service_instances = false;
 };
 
 }  // namespace catalog
 
-#endif  // SERVICES_CATALOG_SERVICE_OPTIONS_H_
\ No newline at end of file
+#endif  // SERVICES_CATALOG_SERVICE_OPTIONS_H_
diff --git a/services/file/file_service.cc b/services/file/file_service.cc
index 2c583b6..6de0c0d9 100644
--- a/services/file/file_service.cc
+++ b/services/file/file_service.cc
@@ -94,7 +94,7 @@
 
 void FileService::OnStart() {
   file_system_objects_.reset(new FileService::FileSystemObjects(
-      GetUserDirForUserId(context()->identity().user_id())));
+      GetUserDirForUserId(context()->identity().instance_group())));
   leveldb_objects_.reset(
       new FileService::LevelDBServiceObjects(file_service_runner_));
 }
diff --git a/services/network/BUILD.gn b/services/network/BUILD.gn
index 9baf1ec..197a273 100644
--- a/services/network/BUILD.gn
+++ b/services/network/BUILD.gn
@@ -61,6 +61,8 @@
     "network_change_manager.h",
     "network_context.cc",
     "network_context.h",
+    "network_qualities_pref_delegate.cc",
+    "network_qualities_pref_delegate.h",
     "network_quality_estimator_manager.cc",
     "network_quality_estimator_manager.h",
     "network_sandbox_hook_linux.cc",
@@ -280,6 +282,7 @@
     "keepalive_statistics_recorder_unittest.cc",
     "network_change_manager_unittest.cc",
     "network_context_unittest.cc",
+    "network_qualities_pref_delegate_unittest.cc",
     "network_quality_estimator_manager_unittest.cc",
     "network_service_proxy_delegate_unittest.cc",
     "network_service_unittest.cc",
@@ -343,6 +346,7 @@
     ":test_support",
     "//base",
     "//components/network_session_configurator/browser",
+    "//components/prefs:test_support",
     "//crypto:test_support",
     "//jingle:jingle_fake_socket",
     "//mojo/core/embedder",
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index d59b9d9..52ca693e8 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -709,6 +709,10 @@
   url_request_context_->transport_security_state()->DeleteAllDynamicDataSince(
       time);
 
+  // May not be set in all tests.
+  if (network_qualities_pref_delegate_)
+    network_qualities_pref_delegate_->ClearPrefs();
+
   url_request_context_->http_server_properties()->Clear(
       std::move(completion_callback));
 }
@@ -1625,6 +1629,7 @@
     pref_service_factory.set_async(true);
     scoped_refptr<PrefRegistrySimple> pref_registry(new PrefRegistrySimple());
     HttpServerPropertiesPrefDelegate::RegisterPrefs(pref_registry.get());
+    NetworkQualitiesPrefDelegate::RegisterPrefs(pref_registry.get());
     pref_service = pref_service_factory.Create(pref_registry.get());
 
     builder->SetHttpServerProperties(
@@ -1632,6 +1637,10 @@
             std::make_unique<HttpServerPropertiesPrefDelegate>(
                 pref_service.get()),
             net_log));
+
+    network_qualities_pref_delegate_ =
+        std::make_unique<NetworkQualitiesPrefDelegate>(
+            pref_service.get(), network_service_->network_quality_estimator());
   }
 
   if (params_->transport_security_persister_path) {
diff --git a/services/network/network_context.h b/services/network/network_context.h
index cb128c9..fbfa68f 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -31,6 +31,7 @@
 #include "net/dns/host_resolver.h"
 #include "services/network/http_cache_data_counter.h"
 #include "services/network/http_cache_data_remover.h"
+#include "services/network/network_qualities_pref_delegate.h"
 #include "services/network/public/cpp/cors/origin_access_list.h"
 #include "services/network/public/cpp/network_service_buildflags.h"
 #include "services/network/public/mojom/host_resolver.mojom.h"
@@ -336,6 +337,13 @@
     host_resolver_factory_ = std::move(factory);
   }
 
+  void set_network_qualities_pref_delegate_for_testing(
+      std::unique_ptr<NetworkQualitiesPrefDelegate>
+          network_qualities_pref_delegate) {
+    network_qualities_pref_delegate_ =
+        std::move(network_qualities_pref_delegate);
+  }
+
  private:
   class ContextNetworkDelegate;
 
@@ -504,6 +512,9 @@
   // Manages allowed origin access lists.
   cors::OriginAccessList cors_origin_access_list_;
 
+  std::unique_ptr<NetworkQualitiesPrefDelegate>
+      network_qualities_pref_delegate_;
+
   DISALLOW_COPY_AND_ASSIGN(NetworkContext);
 };
 
diff --git a/services/network/network_context_unittest.cc b/services/network/network_context_unittest.cc
index b9235b5..c3f2cea 100644
--- a/services/network/network_context_unittest.cc
+++ b/services/network/network_context_unittest.cc
@@ -38,6 +38,7 @@
 #include "build/build_config.h"
 #include "components/network_session_configurator/browser/network_session_configurator.h"
 #include "components/network_session_configurator/common/network_switches.h"
+#include "components/prefs/testing_pref_service.h"
 #include "mojo/public/cpp/bindings/interface_request.h"
 #include "mojo/public/cpp/bindings/strong_binding.h"
 #include "mojo/public/cpp/system/data_pipe_utils.h"
@@ -65,6 +66,7 @@
 #include "net/http/http_transaction_factory.h"
 #include "net/http/http_transaction_test_util.h"
 #include "net/http/transport_security_state_test_util.h"
+#include "net/nqe/network_quality_estimator_test_util.h"
 #include "net/proxy_resolution/proxy_config.h"
 #include "net/proxy_resolution/proxy_info.h"
 #include "net/proxy_resolution/proxy_resolution_service.h"
@@ -88,6 +90,7 @@
 #include "services/network/cookie_manager.h"
 #include "services/network/net_log_exporter.h"
 #include "services/network/network_context.h"
+#include "services/network/network_qualities_pref_delegate.h"
 #include "services/network/network_service.h"
 #include "services/network/public/cpp/features.h"
 #include "services/network/public/cpp/network_service_buildflags.h"
@@ -828,6 +831,45 @@
                    ->GetSupportsSpdy(kSchemeHostPort));
 }
 
+// Checks that ClearNetworkingHistorySince() clears network quality prefs.
+TEST_F(NetworkContextTest, ClearingNetworkingHistoryClearNetworkQualityPrefs) {
+  const url::SchemeHostPort kSchemeHostPort("https", "foo", 443);
+  net::TestNetworkQualityEstimator estimator;
+  std::unique_ptr<NetworkContext> network_context =
+      CreateContextWithParams(mojom::NetworkContextParams::New());
+  TestingPrefServiceSimple pref_service_simple;
+  NetworkQualitiesPrefDelegate::RegisterPrefs(pref_service_simple.registry());
+
+  std::unique_ptr<NetworkQualitiesPrefDelegate>
+      network_qualities_pref_delegate =
+          std::make_unique<NetworkQualitiesPrefDelegate>(&pref_service_simple,
+                                                         &estimator);
+  NetworkQualitiesPrefDelegate* network_qualities_pref_delegate_ptr =
+      network_qualities_pref_delegate.get();
+  network_context->set_network_qualities_pref_delegate_for_testing(
+      std::move(network_qualities_pref_delegate));
+
+  // Running the loop allows prefs to be set.
+  base::RunLoop().RunUntilIdle();
+  EXPECT_FALSE(
+      network_qualities_pref_delegate_ptr->ForceReadPrefsForTesting().empty());
+
+  // Clear the networking history.
+  base::RunLoop run_loop;
+  base::HistogramTester histogram_tester;
+  network_context->ClearNetworkingHistorySince(
+      base::Time::Now() - base::TimeDelta::FromHours(1),
+      run_loop.QuitClosure());
+  run_loop.Run();
+
+  // Running the loop should clear the network quality prefs.
+  base::RunLoop().RunUntilIdle();
+  // Prefs should be empty now.
+  EXPECT_TRUE(
+      network_qualities_pref_delegate_ptr->ForceReadPrefsForTesting().empty());
+  histogram_tester.ExpectTotalCount("NQE.PrefsSizeOnClearing", 1);
+}
+
 // Test that TransportSecurity state is persisted (or not) as expected.
 TEST_F(NetworkContextTest, TransportSecurityStatePersisted) {
   const char kDomain[] = "foo.test";
diff --git a/services/network/network_qualities_pref_delegate.cc b/services/network/network_qualities_pref_delegate.cc
new file mode 100644
index 0000000..a6681bc
--- /dev/null
+++ b/services/network/network_qualities_pref_delegate.cc
@@ -0,0 +1,93 @@
+// Copyright 2018 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 "services/network/network_qualities_pref_delegate.h"
+
+#include <memory>
+#include <string>
+
+#include "base/bind.h"
+#include "base/memory/ptr_util.h"
+#include "base/metrics/histogram_macros.h"
+#include "base/values.h"
+#include "components/prefs/pref_registry.h"
+#include "components/prefs/pref_registry_simple.h"
+#include "components/prefs/pref_service.h"
+#include "net/nqe/network_quality_estimator.h"
+
+namespace {
+
+// Prefs for persisting network qualities.
+const char kNetworkQualities[] = "net.network_qualities";
+
+// PrefDelegateImpl writes the provided dictionary value to the network quality
+// estimator prefs on the disk.
+class PrefDelegateImpl
+    : public net::NetworkQualitiesPrefsManager::PrefDelegate {
+ public:
+  // |pref_service| is used to read and write prefs from/to the disk.
+  explicit PrefDelegateImpl(PrefService* pref_service)
+      : pref_service_(pref_service), path_(kNetworkQualities) {
+    DCHECK(pref_service_);
+  }
+  ~PrefDelegateImpl() override {}
+
+  void SetDictionaryValue(const base::DictionaryValue& value) override {
+    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+    pref_service_->Set(path_, value);
+    UMA_HISTOGRAM_EXACT_LINEAR("NQE.Prefs.WriteCount", 1, 2);
+  }
+
+  std::unique_ptr<base::DictionaryValue> GetDictionaryValue() override {
+    DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+    UMA_HISTOGRAM_EXACT_LINEAR("NQE.Prefs.ReadCount", 1, 2);
+    return pref_service_->GetDictionary(path_)->CreateDeepCopy();
+  }
+
+ private:
+  PrefService* pref_service_;
+
+  // |path_| is the location of the network quality estimator prefs.
+  const std::string path_;
+
+  SEQUENCE_CHECKER(sequence_checker_);
+
+  DISALLOW_COPY_AND_ASSIGN(PrefDelegateImpl);
+};
+
+}  // namespace
+
+namespace network {
+
+NetworkQualitiesPrefDelegate::NetworkQualitiesPrefDelegate(
+    PrefService* pref_service,
+    net::NetworkQualityEstimator* network_quality_estimator)
+    : prefs_manager_(std::make_unique<PrefDelegateImpl>(pref_service)) {
+  DCHECK(pref_service);
+  DCHECK(network_quality_estimator);
+  prefs_manager_.InitializeOnNetworkThread(network_quality_estimator);
+}
+
+NetworkQualitiesPrefDelegate::~NetworkQualitiesPrefDelegate() {
+  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+}
+
+void NetworkQualitiesPrefDelegate::ClearPrefs() {
+  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+  prefs_manager_.ClearPrefs();
+}
+
+// static
+void NetworkQualitiesPrefDelegate::RegisterPrefs(PrefRegistrySimple* registry) {
+  registry->RegisterDictionaryPref(kNetworkQualities, PrefRegistry::LOSSY_PREF);
+}
+
+std::map<net::nqe::internal::NetworkID,
+         net::nqe::internal::CachedNetworkQuality>
+NetworkQualitiesPrefDelegate::ForceReadPrefsForTesting() const {
+  DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+  return prefs_manager_.ForceReadPrefsForTesting();
+}
+
+}  // namespace network
diff --git a/services/network/network_qualities_pref_delegate.h b/services/network/network_qualities_pref_delegate.h
new file mode 100644
index 0000000..d359e21
--- /dev/null
+++ b/services/network/network_qualities_pref_delegate.h
@@ -0,0 +1,58 @@
+// Copyright 2018 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.
+
+#ifndef SERVICES_NETWORK_NETWORK_QUALITIES_PREF_DELEGATE_H_
+#define SERVICES_NETWORK_NETWORK_QUALITIES_PREF_DELEGATE_H_
+
+#include <map>
+
+#include "base/component_export.h"
+#include "base/macros.h"
+#include "base/sequence_checker.h"
+#include "net/nqe/cached_network_quality.h"
+#include "net/nqe/network_id.h"
+#include "net/nqe/network_qualities_prefs_manager.h"
+
+namespace net {
+class NetworkQualityEstimator;
+}
+
+class PrefRegistrySimple;
+class PrefService;
+
+namespace network {
+
+// UI service to manage storage of network quality prefs.
+class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkQualitiesPrefDelegate {
+ public:
+  NetworkQualitiesPrefDelegate(
+      PrefService* pref_service,
+      net::NetworkQualityEstimator* network_quality_estimator);
+  ~NetworkQualitiesPrefDelegate();
+
+  // Registers the profile-specific network quality estimator prefs.
+  static void RegisterPrefs(PrefRegistrySimple* registry);
+
+  // Clear the network quality estimator prefs.
+  void ClearPrefs();
+
+  // Reads the prefs from the disk, parses them into a map of NetworkIDs and
+  // CachedNetworkQualities, and returns the map.
+  std::map<net::nqe::internal::NetworkID,
+           net::nqe::internal::CachedNetworkQuality>
+  ForceReadPrefsForTesting() const;
+
+ private:
+  // Prefs manager that is owned by this service. Created on the UI thread, but
+  // used and deleted on the IO thread.
+  net::NetworkQualitiesPrefsManager prefs_manager_;
+
+  SEQUENCE_CHECKER(sequence_checker_);
+
+  DISALLOW_COPY_AND_ASSIGN(NetworkQualitiesPrefDelegate);
+};
+
+}  // namespace network
+
+#endif  // SERVICES_NETWORK_NETWORK_QUALITIES_PREF_DELEGATE_H_
diff --git a/services/network/network_qualities_pref_delegate_unittest.cc b/services/network/network_qualities_pref_delegate_unittest.cc
new file mode 100644
index 0000000..066555bc
--- /dev/null
+++ b/services/network/network_qualities_pref_delegate_unittest.cc
@@ -0,0 +1,112 @@
+// Copyright 2018 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 "services/network/network_qualities_pref_delegate.h"
+
+#include <map>
+#include <string>
+
+#include "base/bind.h"
+#include "base/macros.h"
+#include "base/test/metrics/histogram_tester.h"
+#include "base/test/scoped_task_environment.h"
+#include "components/prefs/testing_pref_service.h"
+#include "net/base/network_change_notifier.h"
+#include "net/nqe/cached_network_quality.h"
+#include "net/nqe/effective_connection_type.h"
+#include "net/nqe/network_id.h"
+#include "net/nqe/network_quality_estimator_test_util.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace network {
+
+namespace {
+
+class NetworkQualitiesPrefDelegateTest : public testing::Test {
+ public:
+  NetworkQualitiesPrefDelegateTest()
+      : scoped_task_environment_(
+            base::test::ScopedTaskEnvironment::MainThreadType::IO) {}
+
+  ~NetworkQualitiesPrefDelegateTest() override = default;
+
+ private:
+  base::test::ScopedTaskEnvironment scoped_task_environment_;
+
+  DISALLOW_COPY_AND_ASSIGN(NetworkQualitiesPrefDelegateTest);
+};
+
+// Verify that prefs are writen and read correctly.
+TEST_F(NetworkQualitiesPrefDelegateTest, WritingReadingToPrefsEnabled) {
+  TestingPrefServiceSimple pref_service_simple;
+  net::TestNetworkQualityEstimator estimator;
+  NetworkQualitiesPrefDelegate::RegisterPrefs(pref_service_simple.registry());
+
+  base::HistogramTester initial_histogram_tester;
+  NetworkQualitiesPrefDelegate pref_delegate(&pref_service_simple, &estimator);
+  // NetworkQualityEstimator must be notified of the read prefs at startup.
+  EXPECT_FALSE(
+      initial_histogram_tester.GetAllSamples("NQE.Prefs.ReadSize").empty());
+
+  {
+    base::HistogramTester histogram_tester;
+    estimator.set_effective_connection_type(
+        net::EFFECTIVE_CONNECTION_TYPE_OFFLINE);
+    estimator.set_recent_effective_connection_type(
+        net::EFFECTIVE_CONNECTION_TYPE_OFFLINE);
+    estimator.RunOneRequest();
+
+    // Prefs are written only if persistent caching was enabled.
+    EXPECT_FALSE(
+        histogram_tester.GetAllSamples("NQE.Prefs.WriteCount").empty());
+    histogram_tester.ExpectTotalCount("NQE.Prefs.ReadCount", 0);
+
+    // NetworkQualityEstimator should not be notified of change in prefs.
+    histogram_tester.ExpectTotalCount("NQE.Prefs.ReadSize", 0);
+  }
+
+  {
+    base::HistogramTester histogram_tester;
+    estimator.set_effective_connection_type(
+        net::EFFECTIVE_CONNECTION_TYPE_SLOW_2G);
+    estimator.set_recent_effective_connection_type(
+        net::EFFECTIVE_CONNECTION_TYPE_SLOW_2G);
+    estimator.RunOneRequest();
+
+    // Prefs are written even if the network id was unavailable.
+    EXPECT_FALSE(
+        histogram_tester.GetAllSamples("NQE.Prefs.WriteCount").empty());
+    histogram_tester.ExpectTotalCount("NQE.Prefs.ReadCount", 0);
+
+    // NetworkQualityEstimator should not be notified of change in prefs.
+    histogram_tester.ExpectTotalCount("NQE.Prefs.ReadSize", 0);
+  }
+
+  // Verify the contents of the prefs by reading them again.
+  std::map<net::nqe::internal::NetworkID,
+           net::nqe::internal::CachedNetworkQuality>
+      read_prefs = pref_delegate.ForceReadPrefsForTesting();
+  // Number of entries must be between 1 and 2. It's possible that 2 entries
+  // are added if the connection type is unknown to network quality estimator
+  // at the time of startup, and shortly after it receives a notification
+  // about the change in the connection type.
+  EXPECT_LE(1u, read_prefs.size());
+  EXPECT_GE(2u, read_prefs.size());
+
+  // Verify that the cached network quality was written correctly.
+  EXPECT_EQ(net::EFFECTIVE_CONNECTION_TYPE_SLOW_2G,
+            read_prefs.begin()->second.effective_connection_type());
+  if (net::NetworkChangeNotifier::GetConnectionType() ==
+      net::NetworkChangeNotifier::CONNECTION_ETHERNET) {
+    // Verify that the network ID was written correctly.
+    net::nqe::internal::NetworkID ethernet_network_id(
+        net::NetworkChangeNotifier::CONNECTION_ETHERNET, std::string(),
+        INT32_MIN);
+    EXPECT_EQ(ethernet_network_id, read_prefs.begin()->first);
+  }
+}
+
+}  // namespace
+
+}  // namespace network
diff --git a/services/network/public/cpp/network_connection_tracker.h b/services/network/public/cpp/network_connection_tracker.h
index a370627..1f1fc33 100644
--- a/services/network/public/cpp/network_connection_tracker.h
+++ b/services/network/public/cpp/network_connection_tracker.h
@@ -26,6 +26,10 @@
 class NetworkConnectionTracker;
 using NetworkConnectionTrackerGetter =
     base::RepeatingCallback<NetworkConnectionTracker*()>;
+// Defines the type of a callback that can be used to asynchronously get a
+// NetworkConnectionTracker instance.
+using NetworkConnectionTrackerAsyncGetter = base::RepeatingCallback<void(
+    base::OnceCallback<void(NetworkConnectionTracker*)>)>;
 
 // This class subscribes to network change events from
 // network::mojom::NetworkChangeManager and propogates these notifications to
diff --git a/services/network/test/test_network_connection_tracker.cc b/services/network/test/test_network_connection_tracker.cc
index 459cdb64..889ffec 100644
--- a/services/network/test/test_network_connection_tracker.cc
+++ b/services/network/test/test_network_connection_tracker.cc
@@ -4,7 +4,10 @@
 
 #include "services/network/test/test_network_connection_tracker.h"
 
+#include <utility>
+
 #include "base/bind.h"
+#include "base/callback.h"
 #include "base/logging.h"
 #include "base/memory/ptr_util.h"
 #include "base/threading/sequenced_task_runner_handle.h"
@@ -15,6 +18,19 @@
 
 namespace {
 
+using NetworkConnectionTrackerCallback =
+    base::OnceCallback<void(NetworkConnectionTracker*)>;
+
+void GetInstanceAsync(NetworkConnectionTrackerCallback callback) {
+  base::SequencedTaskRunnerHandle::Get()->PostTask(
+      FROM_HERE,
+      base::BindOnce(
+          [](NetworkConnectionTrackerCallback callback) {
+            std::move(callback).Run(g_test_network_connection_tracker_instance);
+          },
+          std::move(callback)));
+}
+
 NetworkConnectionTracker* GetNonTestInstance() {
   return TestNetworkConnectionTracker::GetInstance();
 }
@@ -38,6 +54,12 @@
   return base::BindRepeating(&GetNonTestInstance);
 }
 
+// static
+NetworkConnectionTrackerAsyncGetter
+TestNetworkConnectionTracker::CreateAsyncGetter() {
+  return base::BindRepeating(&GetInstanceAsync);
+}
+
 TestNetworkConnectionTracker::TestNetworkConnectionTracker() {
   if (g_test_network_connection_tracker_instance) {
     LOG(WARNING) << "Creating more than one TestNetworkConnectionTracker";
diff --git a/services/network/test/test_network_connection_tracker.h b/services/network/test/test_network_connection_tracker.h
index 491bbc35..0a6f8ae 100644
--- a/services/network/test/test_network_connection_tracker.h
+++ b/services/network/test/test_network_connection_tracker.h
@@ -29,6 +29,10 @@
   // TestNetworkConnectionTracker instance when called.
   static NetworkConnectionTrackerGetter CreateGetter();
 
+  // Creates a NetworkConnectionTrackerGetter that will asynchronously return
+  // the active TestNetworkConnectionTracker instance.
+  static NetworkConnectionTrackerAsyncGetter CreateAsyncGetter();
+
   ~TestNetworkConnectionTracker() override;
 
   bool GetConnectionType(network::mojom::ConnectionType* type,
diff --git a/services/resource_coordinator/memory_instrumentation/coordinator_impl.cc b/services/resource_coordinator/memory_instrumentation/coordinator_impl.cc
index c5acb11..3d8b509 100644
--- a/services/resource_coordinator/memory_instrumentation/coordinator_impl.cc
+++ b/services/resource_coordinator/memory_instrumentation/coordinator_impl.cc
@@ -379,7 +379,7 @@
     const base::ProcessId pid = GetProcessIdForClientIdentity(client_identity);
     if (pid == base::kNullProcessId) {
       VLOG(1) << "Couldn't find a PID for client \"" << client_identity.name()
-              << "." << client_identity.instance() << "\"";
+              << "." << client_identity.instance_id() << "\"";
       continue;
     }
     clients.emplace_back(kv.second->client.get(), pid, kv.second->process_type);
diff --git a/services/service_manager/embedder/service_manager_embedder_switches_export.h b/services/service_manager/embedder/service_manager_embedder_switches_export.h
index 7c643a7..94151b8d 100644
--- a/services/service_manager/embedder/service_manager_embedder_switches_export.h
+++ b/services/service_manager/embedder/service_manager_embedder_switches_export.h
@@ -2,8 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#ifndef SERVICES_SERVICE_MANAGER_SERVICE_MANAGER_EMBEDDER_SWITCHES_EXPORT_H_
-#define SERVICES_SERVICE_MANAGER_SERVICE_MANAGER_EMBEDDER_SWITCHES_EXPORT_H_
+#ifndef SERVICES_SERVICE_MANAGER_EMBEDDER_SERVICE_MANAGER_EMBEDDER_SWITCHES_EXPORT_H_
+#define SERVICES_SERVICE_MANAGER_EMBEDDER_SERVICE_MANAGER_EMBEDDER_SWITCHES_EXPORT_H_
 
 #if defined(COMPONENT_BUILD)
 #if defined(WIN32)
@@ -12,7 +12,7 @@
 #define SERVICE_MANAGER_EMBEDDER_SWITCHES_EXPORT __declspec(dllexport)
 #else
 #define SERVICE_MANAGER_EMBEDDER_SWITCHES_EXPORT __declspec(dllimport)
-#endif  // defined(SERVICE_MANAGER_EMBEDDER_IMPL)
+#endif  // defined(SERVICE_MANAGER_EMBEDDER_SWITCHES_IMPL)
 
 #else  // defined(WIN32)
 #if defined(SERVICE_MANAGER_EMBEDDER_SWITCHES_IMPL)
@@ -20,11 +20,11 @@
   __attribute__((visibility("default")))
 #else
 #define SERVICE_MANAGER_EMBEDDER_SWITCHES_EXPORT
-#endif  // defined(SERVICE_MANAGER_EMBEDDER_IMPL)
+#endif  // defined(SERVICE_MANAGER_EMBEDDER_SWITCHES_IMPL)
 #endif
 
 #else  // defined(COMPONENT_BUILD)
 #define SERVICE_MANAGER_EMBEDDER_SWITCHES_EXPORT
 #endif
 
-#endif  // SERVICES_SERVICE_MANAGER_SERVICE_MANAGER_EMBEDDER_SWITCHES_EXPORT_H_
+#endif  // SERVICES_SERVICE_MANAGER_EMBEDDER_SERVICE_MANAGER_EMBEDDER_SWITCHES_EXPORT_H_
diff --git a/services/service_manager/public/cpp/identity.cc b/services/service_manager/public/cpp/identity.cc
index 50fb372..97bfe1d2d 100644
--- a/services/service_manager/public/cpp/identity.cc
+++ b/services/service_manager/public/cpp/identity.cc
@@ -14,43 +14,38 @@
 Identity::Identity(const std::string& name)
     : Identity(name, mojom::kInheritUserID) {}
 
-Identity::Identity(const std::string& name, const std::string& user_id)
-    : Identity(name, user_id, "") {}
+Identity::Identity(const std::string& name, const std::string& instance_group)
+    : Identity(name, instance_group, "") {}
 
 Identity::Identity(const std::string& name,
-                   const std::string& user_id,
-                   const std::string& instance)
-    : name_(name), user_id_(user_id), instance_(instance) {
-  DCHECK(!user_id.empty());
-  DCHECK(base::IsValidGUID(user_id));
+                   const std::string& instance_group,
+                   const std::string& instance_id)
+    : name_(name), instance_group_(instance_group), instance_id_(instance_id) {
+  DCHECK(!instance_group_.empty());
+  DCHECK(base::IsValidGUID(instance_group_));
 }
 
 Identity::Identity(const Identity& other) = default;
 
-Identity::~Identity() {}
+Identity::~Identity() = default;
 
-Identity& Identity::operator=(const Identity& other) {
-  name_ = other.name_;
-  user_id_ = other.user_id_;
-  instance_ = other.instance_;
-  return *this;
-}
+Identity& Identity::operator=(const Identity& other) = default;
 
 bool Identity::operator<(const Identity& other) const {
   if (name_ != other.name_)
     return name_ < other.name_;
-  if (instance_ != other.instance_)
-    return instance_ < other.instance_;
-  return user_id_ < other.user_id_;
+  if (instance_group_ != other.instance_group_)
+    return instance_group_ < other.instance_group_;
+  return instance_id_ < other.instance_id_;
 }
 
 bool Identity::operator==(const Identity& other) const {
-  return other.name_ == name_ && other.instance_ == instance_ &&
-         other.user_id_ == user_id_;
+  return name_ == other.name_ && instance_group_ == other.instance_group_ &&
+         instance_id_ == other.instance_id_;
 }
 
 bool Identity::IsValid() const {
-  return !name_.empty() && base::IsValidGUID(user_id_);
+  return !name_.empty() && base::IsValidGUID(instance_group_);
 }
 
 }  // namespace service_manager
diff --git a/services/service_manager/public/cpp/identity.h b/services/service_manager/public/cpp/identity.h
index 564b511..37a8b7c 100644
--- a/services/service_manager/public/cpp/identity.h
+++ b/services/service_manager/public/cpp/identity.h
@@ -11,38 +11,56 @@
 
 namespace service_manager {
 
-// Represents the identity of an application.
-// |name| is the structured name of the application.
-// |user_id| is a GUID string representing the identity of a user in the system.
-// Every running service instance is associated with a specific user ID.
-// |instance| is a string that allows to tie a specific instance to another. A
-// typical use case of instance is to control process grouping for a given name.
+// Represents the identity of a service instance. Useful to clients who want to
+// connect to running (or lazily started) service instances through the Service
+// Manager. Every Service also has a unique Identity assigned to it by the
+// Service Manager on service startup, communicated to the service instance via
+// |Service::OnStart()|.
+//
+// |name| is the name of the service, as specified in the service's manifest.
+//
+// |instance_group| is a GUID string representing the identity of an isolated
+// group of instances running in the system. Most services may only connect to
+// instances in the same instance group as themselves. This group is implied
+// when |instance_group| is empty.
+//
+// |instance_id| identifies a more specific instance within the targeted
+// instance group, or globally if the target's instances are shared across
+// instance groups. Typically this is also the empty string unless a client
+// knows there are multiple instances of the target service and wants to connect
+// to a specific one.
+//
+// TODO(https://crbug.com/895591): Switch |instance_group| and |instance_id|
+// fields to base::Optional<base::UnguessableToken> instead of free-form
+// strings.
 class SERVICE_MANAGER_PUBLIC_CPP_TYPES_EXPORT Identity {
  public:
   Identity();
   explicit Identity(const std::string& name);
+  Identity(const std::string& name, const std::string& instance_group);
   Identity(const std::string& name,
-           const std::string& user_id);
-  Identity(const std::string& name,
-           const std::string& user_id,
-           const std::string& instance);
+           const std::string& instance_group,
+           const std::string& instance_id);
   Identity(const Identity& other);
   ~Identity();
 
   Identity& operator=(const Identity& other);
   bool operator<(const Identity& other) const;
   bool operator==(const Identity& other) const;
+
   bool IsValid() const;
 
   const std::string& name() const { return name_; }
-  const std::string& user_id() const { return user_id_; }
-  void set_user_id(const std::string& user_id) { user_id_ = user_id; }
-  const std::string& instance() const { return instance_; }
+  const std::string& instance_group() const { return instance_group_; }
+  void set_instance_group(const std::string& instance_group) {
+    instance_group_ = instance_group;
+  }
+  const std::string& instance_id() const { return instance_id_; }
 
  private:
   std::string name_;
-  std::string user_id_;
-  std::string instance_;
+  std::string instance_group_;
+  std::string instance_id_;
 };
 
 }  // namespace service_manager
diff --git a/services/service_manager/public/cpp/identity_mojom_traits.h b/services/service_manager/public/cpp/identity_mojom_traits.h
index 64c4c68..80136f17 100644
--- a/services/service_manager/public/cpp/identity_mojom_traits.h
+++ b/services/service_manager/public/cpp/identity_mojom_traits.h
@@ -17,26 +17,27 @@
   static const std::string& name(const service_manager::Identity& identity) {
     return identity.name();
   }
-  static const std::string& user_id(const service_manager::Identity& identity) {
-    return identity.user_id();
-  }
-  static const std::string& instance(
+  static const std::string& instance_group(
       const service_manager::Identity& identity) {
-    return identity.instance();
+    return identity.instance_group();
+  }
+  static const std::string& instance_id(
+      const service_manager::Identity& identity) {
+    return identity.instance_id();
   }
   static bool Read(service_manager::mojom::IdentityDataView data,
                    service_manager::Identity* out) {
-    std::string name, user_id, instance;
+    std::string name, instance_group, instance_id;
     if (!data.ReadName(&name))
       return false;
 
-    if (!data.ReadUserId(&user_id))
+    if (!data.ReadInstanceGroup(&instance_group))
       return false;
 
-    if (!data.ReadInstance(&instance))
+    if (!data.ReadInstanceId(&instance_id))
       return false;
 
-    *out = service_manager::Identity(name, user_id, instance);
+    *out = service_manager::Identity(name, instance_group, instance_id);
     return true;
   }
 };
diff --git a/services/service_manager/public/cpp/service_test.cc b/services/service_manager/public/cpp/service_test.cc
index 613458e3..9f7a6ea 100644
--- a/services/service_manager/public/cpp/service_test.cc
+++ b/services/service_manager/public/cpp/service_test.cc
@@ -22,7 +22,7 @@
 
 void ServiceTestClient::OnStart() {
   test_->OnStartCalled(context()->connector(), context()->identity().name(),
-                       context()->identity().user_id());
+                       context()->identity().instance_group());
 }
 
 void ServiceTestClient::OnBindInterface(
@@ -53,10 +53,9 @@
 
 void ServiceTest::OnStartCalled(Connector* connector,
                                 const std::string& name,
-                                const std::string& user_id) {
+                                const std::string& instance_group) {
   DCHECK_EQ(connector_, connector);
   initialize_name_ = name;
-  initialize_userid_ = user_id;
   initialize_called_.Run();
 }
 
diff --git a/services/service_manager/public/cpp/service_test.h b/services/service_manager/public/cpp/service_test.h
index 7bccecf6..2ff4209 100644
--- a/services/service_manager/public/cpp/service_test.h
+++ b/services/service_manager/public/cpp/service_test.h
@@ -73,7 +73,6 @@
 
   // Instance information received from the Service Manager during OnStart().
   const std::string& test_name() const { return initialize_name_; }
-  const std::string& test_userid() const { return initialize_userid_; }
   uint32_t test_instance_id() const { return initialize_instance_id_; }
 
   // By default, creates a simple Service that captures the metadata sent
@@ -89,7 +88,7 @@
   // Call to set OnStart() metadata when GetService() is overridden.
   void OnStartCalled(Connector* connector,
                      const std::string& name,
-                     const std::string& userid);
+                     const std::string& instance_group);
 
   // Explicitly shuts down the ServiceManager and |context_|. This is called
   // from TearDown(), but may be called explicitly to test shutdown behavior.
@@ -118,7 +117,6 @@
 
   Connector* connector_ = nullptr;
   std::string initialize_name_;
-  std::string initialize_userid_ = service_manager::mojom::kInheritUserID;
   uint32_t initialize_instance_id_ = service_manager::mojom::kInvalidInstanceID;
 
   base::Closure initialize_called_;
diff --git a/services/service_manager/public/java/src/org/chromium/services/service_manager/Connector.java b/services/service_manager/public/java/src/org/chromium/services/service_manager/Connector.java
index ccf55823..3901aa6 100644
--- a/services/service_manager/public/java/src/org/chromium/services/service_manager/Connector.java
+++ b/services/service_manager/public/java/src/org/chromium/services/service_manager/Connector.java
@@ -40,8 +40,8 @@
             String serviceName, String interfaceName, InterfaceRequest<I> request) {
         Identity target = new Identity();
         target.name = serviceName;
-        target.userId = ConstantsConstants.INHERIT_USER_ID;
-        target.instance = "";
+        target.instanceGroup = ConstantsConstants.INHERIT_USER_ID;
+        target.instanceId = "";
 
         org.chromium.service_manager.mojom.Connector.BindInterfaceResponse callback =
                 new ConnectorBindInterfaceResponseImpl();
diff --git a/services/service_manager/public/mojom/connector.mojom b/services/service_manager/public/mojom/connector.mojom
index e0f8b7b..2bcda406 100644
--- a/services/service_manager/public/mojom/connector.mojom
+++ b/services/service_manager/public/mojom/connector.mojom
@@ -29,31 +29,36 @@
   // A name identifying a service.
   string name;
 
-  // The user id of the target service instance to bind to. If no such instance
-  // exists, the service manager may start one. This user id will be passed to
-  // the new instance via Initialize().
+  // Identifies the instance group to which a service instance belongs. Most
+  // running service instances can only reach (via Connector) other service
+  // instances running in the same instance group. This facilitates a mode of
+  // isolation which is useful for modeling, e.g., different users in a multi-
+  // user system.
   //
-  // When binding to other services, services must generally pass kInheritUserID
-  // for this value, and the service manager will either bind to an existing
-  // instance matching the caller's user id, create a new instance matching the
-  // caller's user id, or bind to an existing instance running as kRootUserID.
-  // By default, services do not have the ability to set arbitrary values to
-  // this field, and doing so will result in an error response.
+  // If the special value |kInheritUserID| is given in an Identity passed to
+  // |Connector.BindInterface()|, it is implied that the connecting service
+  // wants to connect to an instance in its own instance group.
   //
-  // A service with the ability to launch other services with arbitrary user ids
-  // (e.g. a login service) may set this value. The user id string is a valid
-  // guid of the form "%08X-%04X-%04X-%04X-%012llX", and (aside from the root
-  // user whose guid is defined above) intended to be not-guessable.
+  // Services with appropriate permissions (declared in manifest options) may
+  // explicitly choose other instance groups when making outgoing service
+  // interface requests.
   //
-  // When a service is initialized or receives a bind request from another
-  // service, this value is always the resolved user id, never |kInheritUserID|.
-  string user_id;
+  // When a new service instance is initialized and the Service Manager provides
+  // its Identity via |Service.OnStart()|, that Identity always includes a
+  // concrete instance group ID.
+  //
+  // TODO(https://crbug.com/895591): Switch this to a nullable UnguessableToken
+  // field, where a null implies "inherit instance group."
+  string instance_group;
 
-  // A service may spawn multiple instances with the same (name, user_id)
-  // pair, provided they are started with unique values of this field.
-  // TODO(beng): enforce the emptiness of this parameter unless the client bears
-  //             the appropriate capability.
-  string instance;
+  // When making outgoing connections to a service, the |instance_id| field may
+  // be used to select one of multiple instances within the instance group. This
+  // is only meaningful if the target service is not designated as a singleton
+  // service in its manifest.
+  //
+  // May be (and is typically) empty, indicating the default and singular
+  // instance of the service within the target instance group.
+  string instance_id;
 };
 
 // Implemented by an object in the service manager associated with a specific
diff --git a/services/service_manager/public/mojom/constants.mojom b/services/service_manager/public/mojom/constants.mojom
index 5f540fc4..46c54ea 100644
--- a/services/service_manager/public/mojom/constants.mojom
+++ b/services/service_manager/public/mojom/constants.mojom
@@ -6,7 +6,7 @@
 
 const string kServiceName = "service_manager";
 
-// TODO(beng): Determine who (if anyone) uses kRootUserID.
+// TODO(https://crbug.com/895591): Remove these constants.
 const string kRootUserID = "505C0EE9-3013-43C0-82B0-A84F50CF8D84";
 const string kInheritUserID = "D26290E4-4485-4EAE-81A2-66D1EEB40A9D";
 const uint32 kInvalidInstanceID = 0;
diff --git a/services/service_manager/runner/host/service_process_launcher.cc b/services/service_manager/runner/host/service_process_launcher.cc
index 7139b21..6dd8baff 100644
--- a/services/service_manager/runner/host/service_process_launcher.cc
+++ b/services/service_manager/runner/host/service_process_launcher.cc
@@ -106,7 +106,7 @@
   child_command_line->AppendArguments(parent_command_line, false);
   child_command_line->AppendSwitchASCII(switches::kServiceName, target.name());
 #ifndef NDEBUG
-  child_command_line->AppendSwitchASCII("u", target.user_id());
+  child_command_line->AppendSwitchASCII("u", target.instance_group());
 #endif
 
   if (!IsUnsandboxedSandboxType(sandbox_type)) {
@@ -222,8 +222,8 @@
   DVLOG(0)
 #endif
       << "Launched child process pid=" << child_process_.Pid()
-      << ", instance=" << target.instance() << ", name=" << target.name()
-      << ", user_id=" << target.user_id();
+      << ", instance_id=" << target.instance_id() << ", name=" << target.name()
+      << ", instance_group=" << target.instance_group();
 
   mojo::OutgoingInvitation::Send(std::move(invitation), child_process_.Handle(),
                                  channel.TakeLocalEndpoint());
diff --git a/services/service_manager/service_manager.cc b/services/service_manager/service_manager.cc
index d8f8ba4..19991c4 100644
--- a/services/service_manager/service_manager.cc
+++ b/services/service_manager/service_manager.cc
@@ -6,6 +6,7 @@
 
 #include <stdint.h>
 
+#include <algorithm>
 #include <utility>
 
 #include "base/bind.h"
@@ -21,6 +22,7 @@
 #include "base/stl_util.h"
 #include "base/strings/string_util.h"
 #include "base/trace_event/trace_event.h"
+#include "base/unguessable_token.h"
 #include "build/build_config.h"
 #include "mojo/public/cpp/bindings/associated_binding.h"
 #include "mojo/public/cpp/bindings/binding.h"
@@ -534,8 +536,8 @@
 
   // mojom::ServiceManager implementation:
   void AddListener(mojom::ServiceManagerListenerPtr listener) override {
-    // TODO(beng): this should only track the instances matching this user, and
-    // root.
+    // TODO(beng): this should only track the instances matching this instance
+    // group, or the root instance group.
     service_manager_->AddListener(std::move(listener));
   }
 
@@ -544,8 +546,8 @@
       mojom::ServicePtr* service,
       mojom::PIDReceiverRequest* pid_receiver_request,
       const std::string* target_interface_name) {
-    if (target->user_id() == mojom::kInheritUserID)
-      target->set_user_id(identity_.user_id());
+    if (target->instance_group() == mojom::kInheritUserID)
+      target->set_instance_group(identity_.instance_group());
 
     mojom::ConnectResult result = ValidateIdentity(*target);
     if (!Succeeded(result))
@@ -562,8 +564,9 @@
       LOG(ERROR) << "Error: empty service name.";
       return mojom::ConnectResult::INVALID_ARGUMENT;
     }
-    if (!base::IsValidGUID(identity.user_id())) {
-      LOG(ERROR) << "Error: invalid user_id: " << identity.user_id();
+    if (!base::IsValidGUID(identity.instance_group())) {
+      LOG(ERROR) << "Error: invalid instance group: "
+                 << identity.instance_group();
       return mojom::ConnectResult::INVALID_ARGUMENT;
     }
     return mojom::ConnectResult::SUCCEEDED;
@@ -590,8 +593,9 @@
       }
       if (service_manager_->GetExistingInstance(target)) {
         LOG(ERROR) << "Cannot find a client process matching existing identity:"
-                   << "Name: " << target.name() << " User: "
-                   << target.user_id() << " Instance: " << target.instance();
+                   << "Name: " << target.name()
+                   << " Instance Group: " << target.instance_group()
+                   << " Instance: " << target.instance_id();
         return mojom::ConnectResult::INVALID_ARGUMENT;
       }
     }
@@ -605,29 +609,31 @@
     // TODO(beng): Need to do the following additional policy validation of
     // whether this instance is allowed to connect using:
     // - non-null client process info.
-    bool skip_user_check =
+    bool skip_instance_group_check =
         options_.instance_sharing ==
             catalog::ServiceOptions::InstanceSharingType::SINGLETON ||
         options_.instance_sharing ==
             catalog::ServiceOptions::InstanceSharingType::
-                SHARED_INSTANCE_ACROSS_USERS ||
-        options_.can_connect_to_other_services_as_any_user;
+                SHARED_ACROSS_INSTANCE_GROUPS ||
+        options_.can_connect_to_instances_in_any_group;
 
-    if (!skip_user_check && target.user_id() != identity_.user_id() &&
-        target.user_id() != mojom::kRootUserID) {
+    if (!skip_instance_group_check &&
+        target.instance_group() != identity_.instance_group() &&
+        target.instance_group() != mojom::kRootUserID) {
       LOG(ERROR) << "Instance: " << identity_.name()
-                 << " running as: " << identity_.user_id()
+                 << " running in group: " << identity_.instance_group()
                  << " attempting to connect to: " << target.name()
-                 << " as: " << target.user_id() << " without"
-                 << " the 'can_connect_to_other_services_as_any_user' option.";
+                 << " in group: " << target.instance_group() << " without"
+                 << " the 'can_connect_to_instances_in_any_group' option.";
       return mojom::ConnectResult::ACCESS_DENIED;
     }
-    if (!target.instance().empty() && target.instance() != target.name() &&
+    if (!target.instance_id().empty() &&
+        target.instance_id() != target.name() &&
         !options_.can_connect_to_other_services_with_any_instance_name) {
       LOG(ERROR)
           << "Instance: " << identity_.name() << " attempting to"
           << " connect to " << target.name()
-          << " using Instance name: " << target.instance() << " without the"
+          << " using Instance name: " << target.instance_id() << " without the"
           << " 'can_connect_to_other_services_with_any_instance_name' option.";
       return mojom::ConnectResult::ACCESS_DENIED;
     }
@@ -781,9 +787,10 @@
       case InstanceType::kRegular:
         regular_instances_.insert(std::make_pair(identity, instance));
         break;
-      case InstanceType::kAllUsers:
+      case InstanceType::kSharedAcrossInstanceGroups:
         all_user_instances_.insert(std::make_pair(
-            NameAndInstanceId(identity.name(), identity.instance()), instance));
+            NameAndInstanceId(identity.name(), identity.instance_id()),
+            instance));
         break;
       case InstanceType::kSingleton:
         singleton_instances_.insert(std::make_pair(identity.name(), instance));
@@ -798,7 +805,7 @@
     if (default_iter != regular_instances_.end())
       return default_iter->second;
     auto all_user_iter = all_user_instances_.find(
-        NameAndInstanceId(identity.name(), identity.instance()));
+        NameAndInstanceId(identity.name(), identity.instance_id()));
     if (all_user_iter != all_user_instances_.end())
       return all_user_iter->second;
     auto singleton_iter = singleton_instances_.find(identity.name());
@@ -814,7 +821,7 @@
       return true;
     }
     auto all_user_iter = all_user_instances_.find(
-        NameAndInstanceId(identity.name(), identity.instance()));
+        NameAndInstanceId(identity.name(), identity.instance_id()));
     if (all_user_iter != all_user_instances_.end()) {
       all_user_instances_.erase(all_user_iter);
       return true;
@@ -824,6 +831,7 @@
       singleton_instances_.erase(singleton_iter);
       return true;
     }
+
     return false;
   }
 
@@ -913,8 +921,8 @@
                        TRACE_EVENT_SCOPE_THREAD, "original_name",
                        params->target().name());
   DCHECK(!params->target().name().empty());
-  DCHECK(base::IsValidGUID(params->target().user_id()));
-  DCHECK_NE(mojom::kInheritUserID, params->target().user_id());
+  DCHECK(base::IsValidGUID(params->target().instance_group()));
+  DCHECK_NE(mojom::kInheritUserID, params->target().instance_group());
   DCHECK(!params->HasClientProcessInfo() ||
          GetExistingInstance(params->target()) == nullptr);
 
@@ -923,7 +931,7 @@
     return;
 
   const catalog::Entry* entry =
-      catalog_.GetInstanceForUserId(params->target().user_id())
+      catalog_.GetInstanceForGroup(params->target().instance_group())
           ->Resolve(params->target().name());
   if (!entry) {
     LOG(ERROR) << "Failed to resolve service name: " << params->target().name();
@@ -932,7 +940,7 @@
     return;
   }
 
-  const std::string& instance_name = params->target().instance();
+  const std::string& instance_name = params->target().instance_id();
   const InterfaceProviderSpecMap& interface_provider_specs =
       entry->interface_provider_specs();
 
@@ -940,17 +948,17 @@
 
   bool all_user_instance = entry->options().instance_sharing ==
                            catalog::ServiceOptions::InstanceSharingType::
-                               SHARED_INSTANCE_ACROSS_USERS;
+                               SHARED_ACROSS_INSTANCE_GROUPS;
   bool singleton_instance =
       entry->options().instance_sharing ==
       catalog::ServiceOptions::InstanceSharingType::SINGLETON;
   const Identity original_target(params->target());
 
-  // Services that have "shared_instance_across_users" value of
-  // "instance_sharing" option are
-  // allowed to field connection requests from any user. They also run with a
-  // synthetic user id generated here. The user id provided via Connect() is
-  // ignored. Additionally services with the "shared_instance_across_users"
+  // Services that have "shared_across_instance_groups" value of
+  // "instance_sharing" option are allowed to field connection requests from
+  // instances in any instance group. They also run with a synthetic instance
+  // group generated here. The instance group provided via |Connect()| is
+  // ignored. Additionally services with the "shared_across_instance_groups"
   // value are not tied to the lifetime of the service that started them,
   // instead they are owned by the Service Manager.
   Identity source_identity_for_creation;
@@ -959,7 +967,7 @@
   if (singleton_instance)
     instance_type = InstanceType::kSingleton;
   else if (all_user_instance)
-    instance_type = InstanceType::kAllUsers;
+    instance_type = InstanceType::kSharedAcrossInstanceGroups;
   else
     instance_type = InstanceType::kRegular;
 
@@ -967,15 +975,15 @@
   if (instance_type == InstanceType::kSingleton) {
     source_identity_for_creation = CreateServiceManagerIdentity();
     target = Identity(params->target().name(), base::GenerateGUID());
-  } else if (instance_type == InstanceType::kAllUsers) {
+  } else if (instance_type == InstanceType::kSharedAcrossInstanceGroups) {
     source_identity_for_creation = CreateServiceManagerIdentity();
     target =
         Identity(params->target().name(), base::GenerateGUID(), instance_name);
   } else {
     DCHECK_EQ(instance_type, InstanceType::kRegular);
     source_identity_for_creation = params->source();
-    target = Identity(params->target().name(), params->target().user_id(),
-                      instance_name);
+    target = Identity(params->target().name(),
+                      params->target().instance_group(), instance_name);
   }
   params->set_target(target);
 
@@ -1006,17 +1014,20 @@
 
   if (entry->parent()) {
     // This service is provided by another service via a ServiceFactory.
-    const std::string* target_user_id = &target.user_id();
     std::string factory_instance_name = instance_name;
 
-    // Use the original user ID so the existing embedder factory can be found
-    // and used to create the new service.
-    target_user_id = &original_target.user_id();
-    Identity packaged_service_target(target);
-    packaged_service_target.set_user_id(original_target.user_id());
+    // We normally ignore the target instance group and generate a unique
+    // instance group identifier when starting shared instances, but when those
+    // instances need to be started by a service factory, it's conceivable that
+    // the factory itself may be part of the originally targeted instance group.
+    // In that case we use the originally targeted instance group to identify
+    // the factory service.
+    Identity packaged_service_target(instance->identity());
+    packaged_service_target.set_instance_group(
+        original_target.instance_group());
     instance->set_identity(packaged_service_target);
 
-    Identity factory(entry->parent()->name(), *target_user_id,
+    Identity factory(entry->parent()->name(), original_target.instance_group(),
                      factory_instance_name);
 
     mojom::PIDReceiverPtr pid_receiver;
@@ -1051,8 +1062,8 @@
   params->set_source(CreateServiceManagerIdentity());
 
   Identity target_identity = identity;
-  if (target_identity.user_id() == mojom::kInheritUserID)
-    target_identity.set_user_id(mojom::kRootUserID);
+  if (target_identity.instance_group() == mojom::kInheritUserID)
+    target_identity.set_instance_group(mojom::kRootUserID);
   params->set_target(target_identity);
 
   Connect(std::move(params));
@@ -1061,7 +1072,7 @@
 bool ServiceManager::QueryCatalog(const Identity& identity,
                                   std::string* sandbox_type) {
   const catalog::Entry* entry =
-      catalog_.GetInstanceForUserId(identity.user_id())
+      catalog_.GetInstanceForGroup(identity.instance_group())
           ->Resolve(identity.name());
   if (!entry)
     return false;
@@ -1189,7 +1200,7 @@
     InstanceType instance_type,
     const InterfaceProviderSpecMap& specs,
     const catalog::ServiceOptions& options) {
-  CHECK(target.user_id() != mojom::kInheritUserID);
+  CHECK(target.instance_group() != mojom::kInheritUserID);
 
   auto instance = std::make_unique<Instance>(this, target, specs, options);
   Instance* raw_instance = instance.get();
diff --git a/services/service_manager/service_manager.h b/services/service_manager/service_manager.h
index fea1d04..92bf266 100644
--- a/services/service_manager/service_manager.h
+++ b/services/service_manager/service_manager.h
@@ -93,9 +93,21 @@
   // Used in CreateInstance to specify how an instance should be shared between
   // various identities.
   enum class InstanceType {
-    kRegular,   // Unique for each user and each instance name.
-    kAllUsers,  // Same instance for all users. Unique for each instance name.
-    kSingleton  // Same instance for all users and all instance names.
+    // All fields of the instance's identity are relevant, so instances are
+    // generally isolated to their own instance group, and there may be multiple
+    // instances of the service within each instance group.
+    kRegular,
+
+    // There may be multiple instances of the service qualified by instance ID,
+    // but all such instances are shared across instance group boundaries. The
+    // instance group is therefore effectively ignored when resolving an
+    // Identity to a running instance.
+    kSharedAcrossInstanceGroups,
+
+    // A single instance of the service exists globally. For all connections to
+    // the service, both instance group and instance ID are ignored when
+    // resolving the Identity.
+    kSingleton,
   };
 
   void InitCatalog(mojom::ServicePtr catalog);
@@ -111,8 +123,8 @@
   void OnInstanceStopped(const Identity& identity);
 
   // Returns a running instance matching |identity|. This might be an instance
-  // running as a different user or with a different instance name if one is
-  // available that services all users or is a singleton.
+  // running as in a different instance group or with a different instance ID if
+  // the service is shared across instance groups or is a singleton.
   Instance* GetExistingInstance(const Identity& identity) const;
 
   // Erases any identities mapping to |instance|. Following this call it is
diff --git a/services/service_manager/tests/connect/connect_test.mojom b/services/service_manager/tests/connect/connect_test.mojom
index 666d1d0..44e442c 100644
--- a/services/service_manager/tests/connect/connect_test.mojom
+++ b/services/service_manager/tests/connect/connect_test.mojom
@@ -42,9 +42,9 @@
 
 struct ConnectionState {
   string connection_remote_name;
-  string connection_remote_userid;
+  string connection_remote_instance_group;
   string initialize_local_name;
-  string initialize_userid;
+  string initialize_local_instance_group;
 };
 
 interface ExposedInterface {
diff --git a/services/service_manager/tests/connect/connect_test_app.cc b/services/service_manager/tests/connect/connect_test_app.cc
index f004f3d..5dd45e2 100644
--- a/services/service_manager/tests/connect/connect_test_app.cc
+++ b/services/service_manager/tests/connect/connect_test_app.cc
@@ -84,9 +84,11 @@
     bindings_.AddBinding(this, std::move(request));
     test::mojom::ConnectionStatePtr state(test::mojom::ConnectionState::New());
     state->connection_remote_name = source_info.identity.name();
-    state->connection_remote_userid = source_info.identity.user_id();
+    state->connection_remote_instance_group =
+        source_info.identity.instance_group();
     state->initialize_local_name = context()->identity().name();
-    state->initialize_userid = context()->identity().user_id();
+    state->initialize_local_instance_group =
+        context()->identity().instance_group();
 
     context()->connector()->BindInterface(source_info.identity, &caller_);
     caller_->ConnectionAccepted(std::move(state));
@@ -112,7 +114,7 @@
     std::move(callback).Run("APP");
   }
   void GetInstance(GetInstanceCallback callback) override {
-    std::move(callback).Run(context()->identity().instance());
+    std::move(callback).Run(context()->identity().instance_id());
   }
 
   // test::mojom::StandaloneApp:
diff --git a/services/service_manager/tests/connect/connect_test_class_app.cc b/services/service_manager/tests/connect/connect_test_class_app.cc
index 36dc7e8..ae5114d 100644
--- a/services/service_manager/tests/connect/connect_test_class_app.cc
+++ b/services/service_manager/tests/connect/connect_test_class_app.cc
@@ -64,7 +64,7 @@
     std::move(callback).Run("CLASS APP");
   }
   void GetInstance(GetInstanceCallback callback) override {
-    std::move(callback).Run(context()->identity().instance());
+    std::move(callback).Run(context()->identity().instance_id());
   }
 
   // test::mojom::ClassInterface:
diff --git a/services/service_manager/tests/connect/connect_test_exe.cc b/services/service_manager/tests/connect/connect_test_exe.cc
index 4e521f8..5cd6a30 100644
--- a/services/service_manager/tests/connect/connect_test_exe.cc
+++ b/services/service_manager/tests/connect/connect_test_exe.cc
@@ -45,7 +45,7 @@
   }
 
   void GetInstance(GetInstanceCallback callback) override {
-    std::move(callback).Run(context()->identity().instance());
+    std::move(callback).Run(context()->identity().instance_id());
   }
 
   service_manager::BinderRegistry registry_;
diff --git a/services/service_manager/tests/connect/connect_test_package.cc b/services/service_manager/tests/connect/connect_test_package.cc
index 1276058b..d742a8d 100644
--- a/services/service_manager/tests/connect/connect_test_package.cc
+++ b/services/service_manager/tests/connect/connect_test_package.cc
@@ -93,9 +93,11 @@
     bindings_.AddBinding(this, std::move(request));
     test::mojom::ConnectionStatePtr state(test::mojom::ConnectionState::New());
     state->connection_remote_name = source_info.identity.name();
-    state->connection_remote_userid = source_info.identity.user_id();
+    state->connection_remote_instance_group =
+        source_info.identity.instance_group();
     state->initialize_local_name = service_binding_.identity().name();
-    state->initialize_userid = service_binding_.identity().user_id();
+    state->initialize_local_instance_group =
+        service_binding_.identity().instance_group();
 
     service_binding_.GetConnector()->BindInterface(source_info.identity,
                                                    &caller_);
@@ -118,7 +120,7 @@
   }
 
   void GetInstance(GetInstanceCallback callback) override {
-    std::move(callback).Run(service_binding_.identity().instance());
+    std::move(callback).Run(service_binding_.identity().instance_id());
   }
 
   // test::mojom::BlockedInterface:
@@ -244,7 +246,7 @@
   }
 
   void GetInstance(GetInstanceCallback callback) override {
-    std::move(callback).Run(service_binding_.identity().instance());
+    std::move(callback).Run(service_binding_.identity().instance_id());
   }
 
   void OnConnectionError() {
diff --git a/services/service_manager/tests/connect/connect_unittest.cc b/services/service_manager/tests/connect/connect_unittest.cc
index 61ebb76b..e4b6589 100644
--- a/services/service_manager/tests/connect/connect_unittest.cc
+++ b/services/service_manager/tests/connect/connect_unittest.cc
@@ -105,15 +105,16 @@
   void CompareConnectionState(
       const std::string& connection_local_name,
       const std::string& connection_remote_name,
-      const std::string& connection_remote_userid,
+      const std::string& connection_remote_instance_group,
       const std::string& initialize_local_name,
-      const std::string& initialize_userid) {
+      const std::string& initialize_local_instance_group) {
     EXPECT_EQ(connection_remote_name,
               connection_state_->connection_remote_name);
-    EXPECT_EQ(connection_remote_userid,
-              connection_state_->connection_remote_userid);
+    EXPECT_EQ(connection_remote_instance_group,
+              connection_state_->connection_remote_instance_group);
     EXPECT_EQ(initialize_local_name, connection_state_->initialize_local_name);
-    EXPECT_EQ(initialize_userid, connection_state_->initialize_userid);
+    EXPECT_EQ(initialize_local_instance_group,
+              connection_state_->initialize_local_instance_group);
   }
 
  private:
@@ -448,8 +449,8 @@
   // Connect to an instance with an explicitly different user_id. This supplied
   // user id should be ignored by the service manager (which will generate its
   // own synthetic user id for all-user singleton instances).
-  const std::string singleton_userid = base::GenerateGUID();
-  Identity singleton_id(kTestSingletonAppName, singleton_userid);
+  const std::string singleton_instance_group = base::GenerateGUID();
+  Identity singleton_id(kTestSingletonAppName, singleton_instance_group);
   connector()->StartService(singleton_id);
   Identity first_resolved_identity;
   {
@@ -458,7 +459,8 @@
     test_api.SetStartServiceCallback(base::Bind(
         &StartServiceResponse, &loop, nullptr, &first_resolved_identity));
     loop.Run();
-    EXPECT_NE(first_resolved_identity.user_id(), singleton_userid);
+    EXPECT_NE(first_resolved_identity.instance_group(),
+              singleton_instance_group);
   }
   // This connects using the current client's user_id. It should be bound to the
   // same service started above, with the same service manager-generated user
@@ -471,7 +473,8 @@
     test_api.SetStartServiceCallback(
         base::Bind(&StartServiceResponse, &loop, nullptr, &resolved_identity));
     loop.Run();
-    EXPECT_EQ(resolved_identity.user_id(), first_resolved_identity.user_id());
+    EXPECT_EQ(resolved_identity.instance_group(),
+              first_resolved_identity.instance_group());
   }
 }
 
diff --git a/services/service_manager/tests/service_manager/service_manager_unittest.cc b/services/service_manager/tests/service_manager/service_manager_unittest.cc
index cc22ccd..145fdcc3 100644
--- a/services/service_manager/tests/service_manager/service_manager_unittest.cc
+++ b/services/service_manager/tests/service_manager/service_manager_unittest.cc
@@ -232,8 +232,9 @@
         [](base::RunLoop* loop, const Identity* expected_identity,
            const Identity& identity) {
           EXPECT_EQ(expected_identity->name(), identity.name());
-          EXPECT_EQ(expected_identity->user_id(), identity.user_id());
-          EXPECT_EQ(expected_identity->instance(), identity.instance());
+          EXPECT_EQ(expected_identity->instance_group(),
+                    identity.instance_group());
+          EXPECT_EQ(expected_identity->instance_id(), identity.instance_id());
           loop->Quit();
         },
         &loop, &identity));
diff --git a/services/test/user_id/user_id_service.cc b/services/test/user_id/user_id_service.cc
index c6ca29d..f94d1450 100644
--- a/services/test/user_id/user_id_service.cc
+++ b/services/test/user_id/user_id_service.cc
@@ -34,7 +34,7 @@
 }
 
 void UserIdService::GetUserId(GetUserIdCallback callback) {
-  std::move(callback).Run(context()->identity().user_id());
+  std::move(callback).Run(context()->identity().instance_group());
 }
 
 }  // namespace user_id
diff --git a/services/ws/public/mojom/window_tree.mojom b/services/ws/public/mojom/window_tree.mojom
index 23bae10..14b857d 100644
--- a/services/ws/public/mojom/window_tree.mojom
+++ b/services/ws/public/mojom/window_tree.mojom
@@ -418,6 +418,11 @@
 // calling SetWindowBounds(), connection 1 does not receive
 // OnWindowBoundsChanged().
 interface WindowTreeClient {
+  // Sent when clients establishes a connection to the WindowService.
+  // |client_id| gives the unique id for the client. This value is generally
+  // only useful for debugging.
+  OnClientId(uint32 client_id);
+
   // Invoked when the client application has been embedded at |root|.
   // See Embed() on WindowTree for more details. |tree| will be a handle back to
   // the window manager service, unless the connection is to the root connection
diff --git a/services/ws/test_window_tree_client.cc b/services/ws/test_window_tree_client.cc
index c1a58d03..0281b30 100644
--- a/services/ws/test_window_tree_client.cc
+++ b/services/ws/test_window_tree_client.cc
@@ -64,6 +64,8 @@
 
 void TestWindowTreeClient::OnChangeAdded() {}
 
+void TestWindowTreeClient::OnClientId(uint32_t client_id) {}
+
 void TestWindowTreeClient::OnEmbed(
     mojom::WindowDataPtr root,
     mojom::WindowTreePtr tree,
diff --git a/services/ws/test_window_tree_client.h b/services/ws/test_window_tree_client.h
index 61bc2ab..82d7296 100644
--- a/services/ws/test_window_tree_client.h
+++ b/services/ws/test_window_tree_client.h
@@ -83,6 +83,7 @@
   void OnChangeAdded() override;
 
   // mojom::WindowTreeClient:
+  void OnClientId(uint32_t client_id) override;
   void OnEmbed(
       mojom::WindowDataPtr root,
       mojom::WindowTreePtr tree,
diff --git a/services/ws/window_tree_binding.cc b/services/ws/window_tree_binding.cc
index e25472d..9c20f4e 100644
--- a/services/ws/window_tree_binding.cc
+++ b/services/ws/window_tree_binding.cc
@@ -62,6 +62,7 @@
   binding_ = std::make_unique<mojo::Binding<mojom::WindowTree>>(
       window_tree_.get(), std::move(window_tree_request));
   binding_->set_connection_error_handler(std::move(connection_lost_callback));
+  window_tree_client_->OnClientId(window_tree_->client_id());
   window_tree_client_->GetScreenProviderObserver(
       MakeRequest(&screen_provider_observer_));
   window_service_->screen_provider()->AddObserver(
diff --git a/services/ws/window_tree_client_unittest.cc b/services/ws/window_tree_client_unittest.cc
index ae4f8de..b59ccd44 100644
--- a/services/ws/window_tree_client_unittest.cc
+++ b/services/ws/window_tree_client_unittest.cc
@@ -162,6 +162,8 @@
     binding_.Bind(std::move(request));
   }
 
+  ClientSpecificId client_id() const { return client_id_; }
+
   // Runs a nested MessageLoop until |count| changes (calls to
   // WindowTreeClient functions) have been received.
   void WaitForChangeCount(size_t count) {
@@ -277,6 +279,7 @@
   };
 
   // TestWindowTreeClient:
+  void OnClientId(ClientSpecificId id) override { client_id_ = id; }
   void OnChangeAdded() override {
     if (wait_state_.get() &&
         tracker_.changes()->size() >= wait_state_->change_count) {
@@ -438,6 +441,7 @@
   uint32_t waiting_change_id_;
   bool on_change_completed_result_;
   std::unique_ptr<base::RunLoop> change_completed_run_loop_;
+  ClientSpecificId client_id_ = 0u;
 
   DISALLOW_COPY_AND_ASSIGN(TestWindowTreeClient2);
 };
@@ -635,6 +639,10 @@
   DISALLOW_COPY_AND_ASSIGN(WindowTreeClientTest);
 };
 
+TEST_F(WindowTreeClientTest, GotClientId) {
+  EXPECT_NE(0u, wt_client1_->client_id());
+}
+
 // Verifies two clients get different ids.
 TEST_F(WindowTreeClientTest, TwoClientsGetDifferentClientIds) {
   ASSERT_NO_FATAL_FAILURE(EstablishSecondClient(true));
diff --git a/testing/buildbot/filters/chromeos.single_process_mash.ash_unittests.filter b/testing/buildbot/filters/chromeos.single_process_mash.ash_unittests.filter
index a4f10f5..fb2aed4f 100644
--- a/testing/buildbot/filters/chromeos.single_process_mash.ash_unittests.filter
+++ b/testing/buildbot/filters/chromeos.single_process_mash.ash_unittests.filter
@@ -1,4 +1,4 @@
-# These tests fail. https://crbug.com/646565
+# Virtual keyboard: these tests fail. https://crbug.com/646565
 -AppListPresenterDelegateTest.TapAppListWithVirtualKeyboardDismissesVirtualKeyboard/0
 -AppListPresenterDelegateTest.TapAppListWithVirtualKeyboardDismissesVirtualKeyboard/1
 -AshKeyboardControllerTest.*
@@ -14,7 +14,7 @@
 -WindowAnimationsTest.SlideOutAnimation
 -WorkspaceLayoutManagerSystemUiAreaTest.*
 
-# These tests crash. https://crbug.com/646565
+# Virtual keyboard: these tests crash. https://crbug.com/646565
 -LockContentsViewKeyboardUnitTest.AutoLayoutExtraSmallUsersListForKeyboard
 -LockContentsViewKeyboardUnitTest.AutoLayoutSmallUsersListForKeyboard
 -LockContentsViewKeyboardUnitTest.PinSubmitWithVirtualKeyboardShown
@@ -23,8 +23,8 @@
 -LockLayoutManagerTest.KeyboardBounds
 -LockWindowVirtualKeyboardTest.VirtualKeyboardDoesNotCoverAuthView
 -MagnificationControllerTest.TextfieldFocusedWithKeyboard
-# Crashes in ui::FakeContextFactory::GetLastCompositorFrame().
--NonClientFrameControllerMashTest.ContentRegionNotDrawnForClient
+-OverviewVirtualKeyboardTest.ToggleOverviewModeHidesVirtualKeyboard
+-OverviewVirtualKeyboardTest.ToggleOverviewModeDoesNotHideLockedVirtualKeyboard
 -ShelfLayoutManagerKeyboardTest.ShelfIgnoreWorkAreaChangeInNonStickyMode
 -ShelfLayoutManagerKeyboardTest.ShelfNotMoveOnKeyboardOpen
 -ShelfLayoutManagerKeyboardTest.ShelfShouldChangeWorkAreaInStickyMode
@@ -58,6 +58,7 @@
 -VirtualKeyboardTest.EventsAreHandledBasedOnHitTestBounds
 -VirtualKeyboardTest.HitTestBoundsAreResetWhenContainerTypeChanges
 -VirtualKeyboardTrayTest.PerformActionTogglesVirtualKeyboard
--WindowSelectorControllerTest.ToggleOverviewModeHidesVirtualKeyboard
--WindowSelectorControllerTest.ToggleOverviewModeDoesNotHideLockedVirtualKeyboard
 -WorkspaceLayoutManagerKeyboardTest.IgnoreWorkAreaChangeinNonStickyMode
+
+# https://crbug.com/902171
+-NonClientFrameControllerMashTest.ContentRegionNotDrawnForClient
diff --git a/testing/buildbot/filters/chromeos.single_process_mash.browser_tests.filter b/testing/buildbot/filters/chromeos.single_process_mash.browser_tests.filter
index 13a19df..05cf347 100644
--- a/testing/buildbot/filters/chromeos.single_process_mash.browser_tests.filter
+++ b/testing/buildbot/filters/chromeos.single_process_mash.browser_tests.filter
@@ -27,9 +27,7 @@
 # ChromeVox and Select-to-Speak not yet supported. https://crbug.com/594887
 -ChromeVox*
 -SelectToSpeak*
-
-# Viz hit testing not supported with Mash https://crbug.com/879308
--PDFExtensionHitTestTest.MouseLeave/1
+-SwitchAccess*
 
 # Flaky. https://crbug.com/888188.
 -ChromeSessionManagerTest.LoginExistingUsers
diff --git a/testing/buildbot/filters/chromeos.single_process_mash.interactive_ui_tests.filter b/testing/buildbot/filters/chromeos.single_process_mash.interactive_ui_tests.filter
index 95349d0..c1a2c1b 100644
--- a/testing/buildbot/filters/chromeos.single_process_mash.interactive_ui_tests.filter
+++ b/testing/buildbot/filters/chromeos.single_process_mash.interactive_ui_tests.filter
@@ -39,9 +39,6 @@
 
 # TabDragging: crbug.com/890071
 -TabDragging/DetachToBrowserTabDragControllerTest.DetachToOwnWindowWhileInImmersiveFullscreenMode/1
--TabDragging/DetachToBrowserTabDragControllerTest.DragToSeparateWindow/1
--TabDragging/DetachToBrowserTabDragControllerTest.DragWithMaskedWindows/0
--TabDragging/DetachToBrowserTabDragControllerTest.DragWithMaskedWindows/1
 -TabDragging/DetachToBrowserTabDragControllerTestTouch.PressSecondFingerWhileDetached/0
 
 # This test is flaky. https://crbug.com/897879
diff --git a/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter b/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter
index 85699999..bc1dc5f 100644
--- a/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter
+++ b/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter
@@ -16,51 +16,6 @@
 # https://crbug.com/853798
 -ProfileBrowserTest.SeparateMediaCache
 
-# about:net-internals should be largely removed before shipping the network
-# service.
-# https://crbug.com/678391
--NetInternalsTest.netInternalsChromeOSViewStoreDebugLogs
--NetInternalsTest.netInternalsDnsViewAddTwoTwice
--NetInternalsTest.netInternalsDnsViewExpired
--NetInternalsTest.netInternalsDnsViewFail
--NetInternalsTest.netInternalsDnsViewIncognitoClears
--NetInternalsTest.netInternalsDnsViewNetworkChanged
--NetInternalsTest.netInternalsDnsViewSuccess
--NetInternalsTest.netInternalsDomainSecurityPolicyViewAddDelete
--NetInternalsTest.netInternalsDomainSecurityPolicyViewAddError
--NetInternalsTest.netInternalsDomainSecurityPolicyViewAddFail
--NetInternalsTest.netInternalsDomainSecurityPolicyViewAddOverwrite
--NetInternalsTest.netInternalsDomainSecurityPolicyViewAddTwice
--NetInternalsTest.netInternalsDomainSecurityPolicyViewDeleteError
--NetInternalsTest.netInternalsDomainSecurityPolicyViewDeleteNotFound
--NetInternalsTest.netInternalsDomainSecurityPolicyViewExpectCTAddDelete
--NetInternalsTest.netInternalsDomainSecurityPolicyViewExpectCTAddError
--NetInternalsTest.netInternalsDomainSecurityPolicyViewExpectCTAddFail
--NetInternalsTest.netInternalsDomainSecurityPolicyViewExpectCTAddOverwrite
--NetInternalsTest.netInternalsDomainSecurityPolicyViewExpectCTAddTwice
--NetInternalsTest.netInternalsDomainSecurityPolicyViewExpectCTQueryError
--NetInternalsTest.netInternalsDomainSecurityPolicyViewExpectCTQueryNotFound
--NetInternalsTest.netInternalsDomainSecurityPolicyViewExpectCTTestReport
--NetInternalsTest.netInternalsDomainSecurityPolicyViewQueryError
--NetInternalsTest.netInternalsDomainSecurityPolicyViewQueryNotFound
--NetInternalsTest.netInternalsEventsViewFilter
--NetInternalsTest.netInternalsLogUtilExportImport
--NetInternalsTest.netInternalsLogUtilImportNetLogFile
--NetInternalsTest.netInternalsLogUtilImportNetLogFileTruncated
--NetInternalsTest.netInternalsLogUtilStopCapturing
--NetInternalsTest.netInternalsLogViewPainterPrintAsText
--NetInternalsTest.netInternalsPrerenderViewFail
--NetInternalsTest.netInternalsPrerenderViewSucceed
--NetInternalsTest.netInternalsSessionBandwidthSucceed
--NetInternalsTest.netInternalsTimelineViewDegenerate
--NetInternalsTest.netInternalsTimelineViewLoadLog
--NetInternalsTest.netInternalsTimelineViewNoEvents
--NetInternalsTest.netInternalsTimelineViewRange
--NetInternalsTest.netInternalsTimelineViewScrollbar
--NetInternalsTest.netInternalsTimelineViewZoomIn
--NetInternalsTest.netInternalsTimelineViewZoomOut
--NetInternalsTest.netInternalsTourTabs
-
 # https://crbug.com/816684 Track Page Load Metrics.
 -PageLoadMetricsBrowserTest.LoadingMetricsFailed
 
diff --git a/testing/buildbot/filters/mojo.fyi.network_content_browsertests.filter b/testing/buildbot/filters/mojo.fyi.network_content_browsertests.filter
index b2b3e38..bba74554 100644
--- a/testing/buildbot/filters/mojo.fyi.network_content_browsertests.filter
+++ b/testing/buildbot/filters/mojo.fyi.network_content_browsertests.filter
@@ -21,10 +21,6 @@
 -CrossSiteDocumentBlockingIsolatedOriginTest.BlockDocumentsFromIsolatedOrigin
 -CrossSiteDocumentBlockingServiceWorkerTest.NoNetwork
 
-# Flakes on Android.
-# https://crbug.com/827318
--RenderThreadImplBrowserTest.NonResourceDispatchIPCTasksDontGoThroughScheduler
-
 # NOTE: if adding an exclusion for an existing failure (e.g. additional test for
 # feature X that is already not working), please add it beside the existing
 # failures. Otherwise please reach out to network-service-dev@.
diff --git a/testing/libfuzzer/reproducing_on_windows.md b/testing/libfuzzer/reproducing_on_windows.md
index 99056ba5..aa3f6db 100644
--- a/testing/libfuzzer/reproducing_on_windows.md
+++ b/testing/libfuzzer/reproducing_on_windows.md
@@ -12,7 +12,8 @@
 1. Download the test case from ClusterFuzz (if you are CCed on an issue filed by
    ClusterFuzz, a link to it is next to "Reproducer testcase" in the
    bug description). For the rest of this walkthrough, we call the path of this
-   file: `$TESTCASE_PATH`.
+   file: `$TESTCASE_PATH`. We will call the fuzz target you want to reproduce a
+   crash on: `$FUZZER_NAME`.
 
 2. Generate gn build configuration for libFuzzer:
 
diff --git a/third_party/WebKit/LayoutTests/SlowTests b/third_party/WebKit/LayoutTests/SlowTests
index 37a527d..1fff632 100644
--- a/third_party/WebKit/LayoutTests/SlowTests
+++ b/third_party/WebKit/LayoutTests/SlowTests
@@ -794,7 +794,6 @@
 crbug.com/874695 external/wpt/webvtt/rendering/cues-with-video/processing-model/evil/9_cues_overlapping_completely.html [ Slow ]
 crbug.com/874695 external/wpt/workers/constructors/SharedWorker/same-origin.html [ Slow ]
 crbug.com/874695 external/wpt/workers/constructors/Worker/same-origin.html [ Slow ]
-crbug.com/874695 external/wpt/workers/interfaces/WorkerGlobalScope/onerror/propagate-to-window-onerror.html [ Slow ]
 crbug.com/874695 external/wpt/workers/interfaces/WorkerUtils/importScripts/006.html [ Slow ]
 crbug.com/874695 external/wpt/workers/semantics/multiple-workers/003.html [ Slow ]
 crbug.com/874695 external/wpt/workers/semantics/multiple-workers/004.html [ Slow ]
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations
index 843b050a..940b0b1 100644
--- a/third_party/WebKit/LayoutTests/TestExpectations
+++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -124,93 +124,10 @@
 crbug.com/891427 virtual/prefer_compositing_to_lcd_text/scrollbars/custom-scrollbar-changing-style-relayout-div-body-scrollablearea.html [ Pass Failure Timeout Crash ]
 
 
-# Remove these when --enable-display-compositor-pixel-dump becomes the
-# "default" setting. These will all need to be re-baselined at that point.
-# All differences should be related to the overflow menu being (now
-# expectedly) present in the new output.
-crbug.com/881040 media/controls-after-reload.html [ Failure ]
-crbug.com/881040 media/controls-strict.html [ Failure ]
-crbug.com/881040 media/controls-styling-strict.html [ Failure ]
-crbug.com/881040 media/controls-styling.html [ Failure ]
-crbug.com/881040 media/controls-without-preload.html [ Failure ]
-crbug.com/881040 media/video-controls-rendering.html [ Failure ]
-crbug.com/881040 media/video-display-toggle.html [ Failure ]
-crbug.com/881040 media/video-no-audio.html [ Failure ]
-crbug.com/881040 [ Mac Win10 Linux Android ] media/video-zoom-controls.html [ Failure ]
+# These two are left over from crbug.com/881040, I rebaselined them twice and
+# they continue to fail.
 crbug.com/881040 media/controls/lazy-loaded-style.html [ Failure Pass ]
-crbug.com/881040 media/controls/paint-controls-webkit-appearance-none-custom-bg.html [ Failure ]
-crbug.com/881040 media/controls/paint-controls-webkit-appearance-none.html [ Failure ]
-crbug.com/881040 virtual/android/fullscreen/full-screen-iframe-allowed-video.html [ Failure ]
-crbug.com/881040 virtual/android/fullscreen/video-controls-timeline.html [ Failure ]
-crbug.com/881040 virtual/android/fullscreen/video-scrolled-iframe.html [ Failure ]
 crbug.com/881040 virtual/new-remote-playback-pipeline/media/controls/lazy-loaded-style.html [ Failure Pass ]
-crbug.com/881040 virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg.html [ Failure ]
-crbug.com/881040 virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none.html [ Failure ]
-crbug.com/881040 media/video-layer-crash.html [ Failure ]
-
-# Remove these when --enable-display-compositor-pixel-dump becomes the
-# "default" setting, and after re-baselining these tests. I went through each
-# of these tests by hand and inspected the differences. All of the
-# tests listed below had extremely subtle differences, mostly just a handful
-# of edge pixels, mostly with colors that are off by 1 in R, G, or B.
-crbug.com/667551 animations/rotate-transform-equivalent.html [ Failure ]
-crbug.com/667551 compositing/3d-corners.html [ Failure ]
-crbug.com/667551 compositing/direct-image-compositing.html [ Failure ]
-crbug.com/667551 compositing/flat-with-transformed-child.html [ Failure ]
-crbug.com/667551 compositing/lots-of-img-layers-with-opacity.html [ Failure ]
-crbug.com/667551 compositing/lots-of-img-layers.html [ Failure ]
-crbug.com/667551 compositing/perpendicular-layer-sorting.html [ Failure ]
-crbug.com/667551 compositing/perspective-interest-rect.html [ Failure ]
-crbug.com/667551 compositing/video-frame-size-change.html [ Failure ]
-crbug.com/667551 compositing/geometry/fixed-position-transform-composited-page-scale-down.html [ Failure ]
-crbug.com/667551 compositing/geometry/fixed-position-transform-composited-page-scale.html [ Failure ]
-crbug.com/667551 compositing/geometry/layer-due-to-layer-children-deep.html [ Failure ]
-crbug.com/667551 compositing/geometry/layer-due-to-layer-children.html [ Failure ]
-crbug.com/667551 compositing/geometry/vertical-scroll-composited.html [ Failure ]
-crbug.com/667551 compositing/masks/mask-with-removed-filters.html [ Failure ]
-crbug.com/667551 compositing/overflow/border-radius-styles-with-composited-child.html [ Failure ]
-crbug.com/667551 compositing/overflow/mask-with-filter.html [ Failure ]
-crbug.com/667551 compositing/overflow/nested-render-surfaces-with-rotation.html [ Failure ]
-crbug.com/667551 compositing/overflow/scaled-overflow.html [ Failure ]
-crbug.com/667551 compositing/overflow/tiled-mask.html [ Failure ]
-crbug.com/667551 compositing/reflections/nested-reflection-anchor-point.html [ Failure ]
-crbug.com/667551 css3/blending/background-blend-mode-overlapping-accelerated-elements.html [ Failure ]
-crbug.com/667551 fast/borders/border-radius-mask-canvas-border.html [ Failure Pass ]
-crbug.com/667551 fast/borders/border-radius-mask-canvas-with-mask.html [ Failure Pass ]
-crbug.com/667551 fast/borders/border-radius-mask-canvas.html [ Failure ]
-crbug.com/667551 fast/borders/border-radius-mask-video.html [ Failure ]
-crbug.com/667551 fast/borders/border-radius-with-composited-child.html [ Failure ]
-crbug.com/667551 fast/clip/overflow-border-radius-composited-parent.html [ Failure ]
-crbug.com/667551 fast/clip/overflow-border-radius-composited.html [ Failure ]
-crbug.com/667551 [ Mac Linux Android ] paint/invalidation/scroll/scrollbar-damage-and-full-viewport-repaint.html [ Failure ]
-crbug.com/667551 transforms/3d/general/perspective-units.html [ Failure ]
-crbug.com/667551 transforms/3d/general/transform-origin-z-change.html [ Failure ]
-crbug.com/667551 transforms/3d/point-mapping/3d-point-mapping-2.html [ Failure ]
-crbug.com/667551 transforms/3d/point-mapping/3d-point-mapping-3.html [ Failure ]
-crbug.com/667551 transforms/3d/point-mapping/3d-point-mapping-deep.html [ Failure ]
-crbug.com/667551 transforms/3d/point-mapping/3d-point-mapping-origins.html [ Failure ]
-crbug.com/667551 transforms/3d/point-mapping/3d-point-mapping-preserve-3d.html [ Failure ]
-crbug.com/667551 transforms/3d/point-mapping/3d-point-mapping.html [ Failure ]
-crbug.com/667551 virtual/prefer_compositing_to_lcd_text/compositing/overflow/border-radius-styles-with-composited-child.html [ Failure ]
-crbug.com/667551 virtual/prefer_compositing_to_lcd_text/compositing/overflow/mask-with-filter.html [ Failure ]
-crbug.com/667551 virtual/prefer_compositing_to_lcd_text/compositing/overflow/nested-render-surfaces-with-rotation.html [ Failure ]
-crbug.com/667551 virtual/prefer_compositing_to_lcd_text/compositing/overflow/scaled-overflow.html [ Failure ]
-crbug.com/667551 virtual/prefer_compositing_to_lcd_text/compositing/overflow/tiled-mask.html [ Failure ]
-crbug.com/667551 compositing/overflow/rotate-clip.html [ Failure ]
-crbug.com/667551 compositing/overflow/rotate-then-clip-effect-interleave.html [ Failure ]
-crbug.com/667551 compositing/overflow/rotate-then-clip-z-order-interleave.html [ Failure ]
-crbug.com/667551 compositing/overflow/rotate-then-clip.html [ Failure ]
-crbug.com/667551 virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-clip.html [ Failure ]
-crbug.com/667551 virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-then-clip-effect-interleave.html [ Failure ]
-crbug.com/667551 virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-then-clip-z-order-interleave.html [ Failure ]
-crbug.com/667551 virtual/prefer_compositing_to_lcd_text/compositing/overflow/rotate-then-clip.html [ Failure ]
-crbug.com/667551 [ Mac ] css3/filters/effect-contrast-hw.html [ Failure ]
-crbug.com/667551 [ Mac ] fast/borders/border-radius-mask-video-ratio.html [ Failure ]
-crbug.com/667551 [ Mac ] fast/borders/border-radius-mask-video-shadow.html [ Failure ]
-crbug.com/667551 [ Mac ] fast/sub-pixel/transformed-iframe-copy-on-scroll.html [ Failure ]
-crbug.com/667551 [ Mac ] overflow/overflow-transform-perspective.html [ Failure ]
-crbug.com/667551 [ Mac ] virtual/layout_ng/overflow/overflow-transform-perspective.html [ Failure ]
-crbug.com/667551 [ Win ] compositing/reflections/nested-reflection-animated.html [ Failure ]
 
 # With --enable-display-compositor-pixel-dump enabled by default, these three
 # tests fail. See crbug.com/887140 for more info.
@@ -3975,8 +3892,6 @@
 crbug.com/655458 external/wpt/workers/interfaces/WorkerUtils/navigator/language.html [ Failure ]
 crbug.com/655458 external/wpt/workers/constructors/SharedWorker/interface-objects.html [ Failure ]
 crbug.com/655458 external/wpt/workers/constructors/SharedWorker/unresolvable-url.html [ Failure ]
-crbug.com/685303 external/wpt/workers/interfaces/WorkerGlobalScope/onerror/propagate-to-window-onerror.html [ Failure Timeout ]
-crbug.com/685303 external/wpt/workers/constructors/Worker/AbstractWorker.onerror.html [ Failure Timeout ]
 crbug.com/655458 external/wpt/workers/interfaces/WorkerUtils/importScripts/006.html [ Failure Timeout ]
 crbug.com/655458 external/wpt/workers/semantics/multiple-workers/007.html [ Timeout ]
 
diff --git a/third_party/WebKit/LayoutTests/compositing/3d-corners-expected.png b/third_party/WebKit/LayoutTests/compositing/3d-corners-expected.png
index 030030f..77e0497 100644
--- a/third_party/WebKit/LayoutTests/compositing/3d-corners-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/3d-corners-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/flat-with-transformed-child-expected.png b/third_party/WebKit/LayoutTests/compositing/flat-with-transformed-child-expected.png
index e896b06..4f2de57 100644
--- a/third_party/WebKit/LayoutTests/compositing/flat-with-transformed-child-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/flat-with-transformed-child-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/geometry/vertical-scroll-composited-expected.png b/third_party/WebKit/LayoutTests/compositing/geometry/vertical-scroll-composited-expected.png
index c7bf98b..fb5be1f 100644
--- a/third_party/WebKit/LayoutTests/compositing/geometry/vertical-scroll-composited-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/geometry/vertical-scroll-composited-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/lots-of-img-layers-expected.png b/third_party/WebKit/LayoutTests/compositing/lots-of-img-layers-expected.png
index f27c69a..312bcf9 100644
--- a/third_party/WebKit/LayoutTests/compositing/lots-of-img-layers-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/lots-of-img-layers-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/lots-of-img-layers-with-opacity-expected.png b/third_party/WebKit/LayoutTests/compositing/lots-of-img-layers-with-opacity-expected.png
index 0b6f5e7..a88d0274c 100644
--- a/third_party/WebKit/LayoutTests/compositing/lots-of-img-layers-with-opacity-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/lots-of-img-layers-with-opacity-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-styles-with-composited-child-expected.png b/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-styles-with-composited-child-expected.png
index a9c5b83c..969f416 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-styles-with-composited-child-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/border-radius-styles-with-composited-child-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/mask-with-filter-expected.png b/third_party/WebKit/LayoutTests/compositing/overflow/mask-with-filter-expected.png
index bfaa23e..2b12f00 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/mask-with-filter-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/mask-with-filter-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/nested-render-surfaces-with-rotation-expected.png b/third_party/WebKit/LayoutTests/compositing/overflow/nested-render-surfaces-with-rotation-expected.png
deleted file mode 100644
index a2e6ff6..0000000
--- a/third_party/WebKit/LayoutTests/compositing/overflow/nested-render-surfaces-with-rotation-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/rotate-clip-expected.png b/third_party/WebKit/LayoutTests/compositing/overflow/rotate-clip-expected.png
index 9daec2d..286a73e 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/rotate-clip-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/rotate-clip-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-effect-interleave-expected.png b/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-effect-interleave-expected.png
index 2aed34e1..6576faa 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-effect-interleave-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-effect-interleave-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-expected.png b/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-expected.png
index 9daec2d..286a73e 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-z-order-interleave-expected.png b/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-z-order-interleave-expected.png
index d4ef5fe..0edab25 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-z-order-interleave-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/rotate-then-clip-z-order-interleave-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/scaled-overflow-expected.png b/third_party/WebKit/LayoutTests/compositing/overflow/scaled-overflow-expected.png
index 67503d7..eaa152c 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/scaled-overflow-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/scaled-overflow-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/overflow/tiled-mask-expected.png b/third_party/WebKit/LayoutTests/compositing/overflow/tiled-mask-expected.png
index 500561a..49e4d2e8 100644
--- a/third_party/WebKit/LayoutTests/compositing/overflow/tiled-mask-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/overflow/tiled-mask-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/perpendicular-layer-sorting-expected.png b/third_party/WebKit/LayoutTests/compositing/perpendicular-layer-sorting-expected.png
index 9a75d615..fa252db 100644
--- a/third_party/WebKit/LayoutTests/compositing/perpendicular-layer-sorting-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/perpendicular-layer-sorting-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/compositing/perspective-interest-rect-expected.png b/third_party/WebKit/LayoutTests/compositing/perspective-interest-rect-expected.png
index 453aee2c..6beffe78 100644
--- a/third_party/WebKit/LayoutTests/compositing/perspective-interest-rect-expected.png
+++ b/third_party/WebKit/LayoutTests/compositing/perspective-interest-rect-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/external/wpt/workers/modules/dedicated-worker-import-failure.html b/third_party/WebKit/LayoutTests/external/wpt/workers/modules/dedicated-worker-import-failure.html
index 81d93322..439bea8 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/workers/modules/dedicated-worker-import-failure.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/workers/modules/dedicated-worker-import-failure.html
@@ -2,6 +2,7 @@
 <title>DedicatedWorker: import failure</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
+<script> setup({allow_uncaught_exception: true}); </script>
 <script>
 
 promise_test(async () => {
diff --git a/third_party/WebKit/LayoutTests/external/wpt/workers/modules/resources/new-worker-window.html b/third_party/WebKit/LayoutTests/external/wpt/workers/modules/resources/new-worker-window.html
index 5ae1507..a7bd2ee 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/workers/modules/resources/new-worker-window.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/workers/modules/resources/new-worker-window.html
@@ -9,7 +9,10 @@
 window.onmessage = e => {
   worker = new Worker(e.data, { type: 'module' });
   worker.onmessage = msg => window.opener.postMessage(msg.data, '*');
-  worker.onerror = err => window.opener.postMessage(['ERROR'], '*');
+  worker.onerror = err => {
+      window.opener.postMessage(['ERROR'], '*');
+      err.preventDefault();
+  };
 };
 window.opener.postMessage('LOADED', '*');
 </script>
diff --git a/third_party/WebKit/LayoutTests/fast/css/containment/change-text-node-data-center-expected.html b/third_party/WebKit/LayoutTests/fast/css/containment/change-text-node-data-center-expected.html
new file mode 100644
index 0000000..4925eb6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/containment/change-text-node-data-center-expected.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<style>
+div {
+  display: inline-block;
+  float: left;
+  background: silver;
+  width: 100px;
+  height: 100px;
+  margin: 20px;
+  font-size: 25px;
+  overflow: hidden;
+  line-height: 1;
+  text-align: center;
+}
+.first-line::first-line {
+  font-size: 30px;
+}
+</style>
+<div>baar</div>
+<div>baarbaar baarbaar</div>
+<div>baarbaarbaar baarbaarbaar baarbaarbaar baarbaarbaar baarbaarbaar</div>
+<div>baar baar baar baar</div>
+<div>baar</div>
+<div>b &#x55e8;</div>
+<div class="first-line">baar</div>
+<div class="first-line">baarbaar baarbaar</div>
+<div class="first-line">baarbaarbaar baarbaarbaar baarbaarbaar baarbaarbaar baarbaarbaar</div>
+<div class="first-line">baar baar baar baar</div>
+<div class="first-line">baar</div>
+<div class="first-line">b &#x55e8;</div>
diff --git a/third_party/WebKit/LayoutTests/fast/css/containment/change-text-node-data-center.html b/third_party/WebKit/LayoutTests/fast/css/containment/change-text-node-data-center.html
new file mode 100644
index 0000000..7cfde0d6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/containment/change-text-node-data-center.html
@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<link rel="match" href="change-text-node-data-expected.html">
+<style>
+div {
+  display: inline-block;
+  float: left;
+  background: silver;
+  width: 100px;
+  height: 100px;
+  margin: 20px;
+  font-size: 25px;
+  overflow: hidden;
+  contain: layout size;
+  line-height: 1;
+  text-align: center;
+}
+.first-line::first-line {
+  font-size: 30px;
+}
+</style>
+<script>
+  const originalValues = [
+    "foo",
+    "foofoo foofoo",
+    "foofoofoo foofoofoo foofoofoo foofoofoo foofoofoo",
+    "foo",
+    "foo foo foo foo foo",
+    "foo",
+  ];
+  const newValues = [
+    "baar",
+    "baarbaar baarbaar",
+    "baarbaarbaar baarbaarbaar baarbaarbaar baarbaarbaar baarbaarbaar",
+    "baar baar baar baar",
+    "baar",
+    "b \u55e8",
+  ];
+
+  function setupTest() {
+    originalValues.forEach((text) => {
+      let div = document.createElement("div");
+      div.appendChild(document.createTextNode(text));
+      document.body.appendChild(div);
+    });
+
+    originalValues.forEach((text) => {
+      let firstLineDiv = document.createElement("div");
+      firstLineDiv.className = "first-line";
+      firstLineDiv.appendChild(document.createTextNode(text));
+      document.body.appendChild(firstLineDiv);
+    });
+  }
+
+  function changeTextNodeData() {
+    let divs = document.getElementsByTagName("div");
+    for (let i = 0; i < divs.length; i++) {
+      divs[i].childNodes[0].data = newValues[i % newValues.length];
+    }
+  }
+
+  function runTest() {
+    setupTest();
+    document.body.offsetLeft;
+    changeTextNodeData();
+  }
+</script>
+<body onload="runTest();">
+</body>
diff --git a/third_party/WebKit/LayoutTests/fast/css/containment/change-text-node-data-right-expected.html b/third_party/WebKit/LayoutTests/fast/css/containment/change-text-node-data-right-expected.html
new file mode 100644
index 0000000..fe4542c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/containment/change-text-node-data-right-expected.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<style>
+div {
+  display: inline-block;
+  float: left;
+  background: silver;
+  width: 100px;
+  height: 100px;
+  margin: 20px;
+  font-size: 25px;
+  overflow: hidden;
+  line-height: 1;
+  text-align: right;
+}
+.first-line::first-line {
+  font-size: 30px;
+}
+</style>
+<div>baar</div>
+<div>baarbaar baarbaar</div>
+<div>baarbaarbaar baarbaarbaar baarbaarbaar baarbaarbaar baarbaarbaar</div>
+<div>baar baar baar baar</div>
+<div>baar</div>
+<div>b &#x55e8;</div>
+<div class="first-line">baar</div>
+<div class="first-line">baarbaar baarbaar</div>
+<div class="first-line">baarbaarbaar baarbaarbaar baarbaarbaar baarbaarbaar baarbaarbaar</div>
+<div class="first-line">baar baar baar baar</div>
+<div class="first-line">baar</div>
+<div class="first-line">b &#x55e8;</div>
diff --git a/third_party/WebKit/LayoutTests/fast/css/containment/change-text-node-data-right.html b/third_party/WebKit/LayoutTests/fast/css/containment/change-text-node-data-right.html
new file mode 100644
index 0000000..d516b64
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/css/containment/change-text-node-data-right.html
@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<link rel="match" href="change-text-node-data-expected.html">
+<style>
+div {
+  display: inline-block;
+  float: left;
+  background: silver;
+  width: 100px;
+  height: 100px;
+  margin: 20px;
+  font-size: 25px;
+  overflow: hidden;
+  contain: layout size;
+  line-height: 1;
+  text-align: right;
+}
+.first-line::first-line {
+  font-size: 30px;
+}
+</style>
+<script>
+  const originalValues = [
+    "foo",
+    "foofoo foofoo",
+    "foofoofoo foofoofoo foofoofoo foofoofoo foofoofoo",
+    "foo",
+    "foo foo foo foo foo",
+    "foo",
+  ];
+  const newValues = [
+    "baar",
+    "baarbaar baarbaar",
+    "baarbaarbaar baarbaarbaar baarbaarbaar baarbaarbaar baarbaarbaar",
+    "baar baar baar baar",
+    "baar",
+    "b \u55e8",
+  ];
+
+  function setupTest() {
+    originalValues.forEach((text) => {
+      let div = document.createElement("div");
+      div.appendChild(document.createTextNode(text));
+      document.body.appendChild(div);
+    });
+
+    originalValues.forEach((text) => {
+      let firstLineDiv = document.createElement("div");
+      firstLineDiv.className = "first-line";
+      firstLineDiv.appendChild(document.createTextNode(text));
+      document.body.appendChild(firstLineDiv);
+    });
+  }
+
+  function changeTextNodeData() {
+    let divs = document.getElementsByTagName("div");
+    for (let i = 0; i < divs.length; i++) {
+      divs[i].childNodes[0].data = newValues[i % newValues.length];
+    }
+  }
+
+  function runTest() {
+    setupTest();
+    document.body.offsetLeft;
+    changeTextNodeData();
+  }
+</script>
+<body onload="runTest();">
+</body>
diff --git a/third_party/WebKit/LayoutTests/fast/scrolling/no-hover-during-scroll.html b/third_party/WebKit/LayoutTests/fast/scrolling/no-hover-during-scroll.html
index 73d22ca..688319d0 100644
--- a/third_party/WebKit/LayoutTests/fast/scrolling/no-hover-during-scroll.html
+++ b/third_party/WebKit/LayoutTests/fast/scrolling/no-hover-during-scroll.html
@@ -39,6 +39,9 @@
   const textWhenHovered = "currently hovered";
   const textWhenWasHovered = "was hovered";
   const mouse = GestureSourceType.MOUSE_INPUT;
+  const scrollSpeed = 350;
+  const hoveredColor = "rgb(255, 255, 0)";
+  const unhoveredColor = "rgb(0, 0, 255)";
 
   function buildPage() {
     for (let i = 0; i < numHoverElements; i++) {
@@ -71,31 +74,33 @@
 
     promise_test(async () => {
       let x = array[0].offsetLeft + 10;
-      let y = array[0].offsetTop + 10;
+      let y = array[0].offsetTop + 25;
       // Move cursor to 1st element.
       await mouseMoveTo(x, y);
       await waitFor( () => { return array[0].innerHTML == textWhenHovered;}, 'wait for move to 1st element');
       assert_equals(array[0].innerHTML, textWhenHovered);
       assert_equals(array[1].innerHTML, textWhenNotHovered);
-      assert_equals(getComputedStyle(array[0]).backgroundColor, 'rgb(255, 255, 0)');
+      assert_equals(getComputedStyle(array[0]).backgroundColor, hoveredColor);
 
       // Scroll end up at 4th element. Hover state does not update during scrolling
-      // so that 2nd, 3rd and 4th elements do not see the mouseover and mouseout events.
+      // so that 2nd, 3rd elements do not see the mouseover and mouseout events, but hover state
+      // is updated at the end of scroll, so 4th element does see a mouseover and mouseout events.
       assert_equals(document.scrollingElement.scrollTop, 0);
-      await smoothScroll(3 * elementHeight, x, y, mouse, 'down', SPEED_INSTANT);
+      await smoothScroll(3 * elementHeight, x, y, mouse, 'down', scrollSpeed);
       // Wait enough time to see if we fire a fake mouse move event to update the hover state.
       await waitForAnimationEnd(() => { return document.scrollingElement.scrollTop; }, 200, 60);
-      assert_approx_equals(document.scrollingElement.scrollTop, 3 * elementHeight, 10);
-      assert_equals(array[0].innerHTML, textWhenHovered);
+      // TODO(crbug/902438): Support wheel scroll at low speeds in GpuBenchmarking::SmoothScrollBy. 
+      assert_approx_equals(document.scrollingElement.scrollTop, 3 * elementHeight, 25);
+      assert_equals(array[0].innerHTML, textWhenWasHovered);
       assert_equals(array[1].innerHTML, textWhenNotHovered);
       assert_equals(array[2].innerHTML, textWhenNotHovered);
-      assert_equals(array[3].innerHTML, textWhenNotHovered);
+      assert_equals(array[3].innerHTML, textWhenHovered);
       assert_equals(array[4].innerHTML, textWhenNotHovered);
-      assert_equals(getComputedStyle(array[0]).backgroundColor, 'rgb(255, 255, 0)');
-      assert_equals(getComputedStyle(array[1]).backgroundColor, 'rgb(0, 0, 255)');
-      assert_equals(getComputedStyle(array[2]).backgroundColor, 'rgb(0, 0, 255)');
-      assert_equals(getComputedStyle(array[3]).backgroundColor, 'rgb(0, 0, 255)');
-    }, 'Mouse wheel scroll on the page, no hover update during scrolling.');
+      assert_equals(getComputedStyle(array[0]).backgroundColor, unhoveredColor);
+      assert_equals(getComputedStyle(array[1]).backgroundColor, unhoveredColor);
+      assert_equals(getComputedStyle(array[2]).backgroundColor, unhoveredColor);
+      assert_equals(getComputedStyle(array[3]).backgroundColor, hoveredColor);
+    }, 'Mouse wheel scroll on the page, no hover update during scrolling, but updating hover at the end of scroll.');
   }
 
 </script>
\ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/fast/workers/worker-onerror-04-expected.txt b/third_party/WebKit/LayoutTests/fast/workers/worker-onerror-04-expected.txt
index 04d7a2f9..771ecc6 100644
--- a/third_party/WebKit/LayoutTests/fast/workers/worker-onerror-04-expected.txt
+++ b/third_party/WebKit/LayoutTests/fast/workers/worker-onerror-04-expected.txt
@@ -1,3 +1,4 @@
+CONSOLE ERROR: line 7: Uncaught ReferenceError: foo is not defined
 This tests that unhandled exceptions in a worker's onerror handler trigger 'worker.onerror'.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
diff --git a/third_party/WebKit/LayoutTests/fast/workers/worker-terminate.html b/third_party/WebKit/LayoutTests/fast/workers/worker-terminate.html
index fb00893..1863f24 100644
--- a/third_party/WebKit/LayoutTests/fast/workers/worker-terminate.html
+++ b/third_party/WebKit/LayoutTests/fast/workers/worker-terminate.html
@@ -11,6 +11,10 @@
 if (window.testRunner) {
     testRunner.dumpAsText();
     testRunner.waitUntilDone();
+    // Disable console messages because console errors about worker script
+    // fetching can be printed depending on timing of worker termination and
+    // that confuses the test expectations.
+    testRunner.setDumpConsoleMessages(false);
 }
 
 var worker = new Worker('resources/worker-common.js');
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/scripts-panel.js b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/scripts-panel.js
index d90f47b..5673b303 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/scripts-panel.js
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/scripts-panel.js
@@ -25,10 +25,8 @@
     TestRunner.addResult('Source requested for ' + this.url());
   }
 
-  Bindings.debuggerWorkspaceBinding._resetForTest(TestRunner.mainTarget);
-  Bindings.resourceMapping._resetForTest(TestRunner.mainTarget);
   var page = new SDKTestRunner.PageMock('http://example.com');
-  SDKTestRunner.connectToPage('mock-page', page, true /* makeMainTarget */);
+  page.connectAsMainTarget('mock-page');
 
   function addNetworkFile(url) {
     page.evalScript(url, '', false /* isContentScript */);
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/scripts-sorting-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/scripts-sorting-expected.txt
index 5996176..09afe21 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/scripts-sorting-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/scripts-sorting-expected.txt
@@ -2,13 +2,31 @@
 
 Sources:
 -------- Setting mode: [frame]
-mock-target-1
+*Non*URL*path
+bar.js?file=bar/zzz.js
+bar.js?file=bar/zzz.js
+block.js?block=foo
+foo.js?file=bar/aaa.js
+foo.js?file=bar/aaa.js
+ga.js
+jquery-1.5.1.min.js
+jquery.cookie.js
+lenta.ban?pg=4883&ifr=1
+lenta.ban?pg=5309&ifr=1
+motor.js?1308927432
+top100.jcn?80674
+xgemius.js
+Sources:
+-------- Setting mode: [frame/domain]
+(no domain)
   *Non*URL*path
+bar.com
   bar.js?file=bar/zzz.js
+  foo.js?file=bar/aaa.js
+foo.com
   bar.js?file=bar/zzz.js
   block.js?block=foo
   foo.js?file=bar/aaa.js
-  foo.js?file=bar/aaa.js
   ga.js
   jquery-1.5.1.min.js
   jquery.cookie.js
@@ -18,144 +36,40 @@
   top100.jcn?80674
   xgemius.js
 Sources:
--------- Setting mode: [frame/domain]
-mock-target-1
-  (no domain)
-    *Non*URL*path
-  bar.com
-    bar.js?file=bar/zzz.js
-    foo.js?file=bar/aaa.js
-  foo.com
-    bar.js?file=bar/zzz.js
-    block.js?block=foo
-    foo.js?file=bar/aaa.js
-    ga.js
-    jquery-1.5.1.min.js
-    jquery.cookie.js
-    lenta.ban?pg=4883&ifr=1
-    lenta.ban?pg=5309&ifr=1
-    motor.js?1308927432
-    top100.jcn?80674
-    xgemius.js
-Sources:
 -------- Setting mode: [frame/domain/folder]
-mock-target-1
-  (no domain)
-    *Non*URL*path
-  bar.com
-    foo/path
-      bar.js?file=bar/zzz.js
-      foo.js?file=bar/aaa.js
-  foo.com
-    _js/production
-      motor.js?1308927432
-    foo/path
-      bar.js?file=bar/zzz.js
-      foo.js?file=bar/aaa.js
-    i
-      js
-        jquery-1.5.1.min.js
-        jquery.cookie.js
-      xgemius.js
-    block.js?block=foo
-    ga.js
-    lenta.ban?pg=4883&ifr=1
-    lenta.ban?pg=5309&ifr=1
-    top100.jcn?80674
-Sources:
--------- Setting mode: [domain]
-mock-target-1
-  (no domain)
-    *Non*URL*path
-  bar.com
-    bar.js?file=bar/zzz.js
-    foo.js?file=bar/aaa.js
-  foo.com
-    bar.js?file=bar/zzz.js
-    block.js?block=foo
-    foo.js?file=bar/aaa.js
-    ga.js
-    jquery-1.5.1.min.js
-    jquery.cookie.js
-    lenta.ban?pg=4883&ifr=1
-    lenta.ban?pg=5309&ifr=1
-    motor.js?1308927432
-    top100.jcn?80674
-    xgemius.js
-Sources:
--------- Setting mode: [domain/folder]
-mock-target-1
-  (no domain)
-    *Non*URL*path
-  bar.com
-    foo/path
-      bar.js?file=bar/zzz.js
-      foo.js?file=bar/aaa.js
-  foo.com
-    _js/production
-      motor.js?1308927432
-    foo/path
-      bar.js?file=bar/zzz.js
-      foo.js?file=bar/aaa.js
-    i
-      js
-        jquery-1.5.1.min.js
-        jquery.cookie.js
-      xgemius.js
-    block.js?block=foo
-    ga.js
-    lenta.ban?pg=4883&ifr=1
-    lenta.ban?pg=5309&ifr=1
-    top100.jcn?80674
-Content Scripts:
--------- Setting mode: [frame]
-mock-target-1
-  *Another*Non*URL*path
-  bar.js
-  baz.js
-Content Scripts:
--------- Setting mode: [frame/domain]
-mock-target-1
-  (no domain)
-    *Another*Non*URL*path
-  extension-name
-    bar.js
-    baz.js
-Content Scripts:
--------- Setting mode: [frame/domain/folder]
-mock-target-1
-  (no domain)
-    *Another*Non*URL*path
-  extension-name
-    folder
-      baz.js
-    bar.js
-Content Scripts:
--------- Setting mode: [domain]
-mock-target-1
-  (no domain)
-    *Another*Non*URL*path
-  extension-name
-    bar.js
-    baz.js
-Content Scripts:
--------- Setting mode: [domain/folder]
-mock-target-1
-  (no domain)
-    *Another*Non*URL*path
-  extension-name
-    folder
-      baz.js
-    bar.js
-Sources:
--------- Setting mode: [frame]
-mock-target-1
+(no domain)
   *Non*URL*path
+bar.com
+  foo/path
+    bar.js?file=bar/zzz.js
+    foo.js?file=bar/aaa.js
+foo.com
+  _js/production
+    motor.js?1308927432
+  foo/path
+    bar.js?file=bar/zzz.js
+    foo.js?file=bar/aaa.js
+  i
+    js
+      jquery-1.5.1.min.js
+      jquery.cookie.js
+    xgemius.js
+  block.js?block=foo
+  ga.js
+  lenta.ban?pg=4883&ifr=1
+  lenta.ban?pg=5309&ifr=1
+  top100.jcn?80674
+Sources:
+-------- Setting mode: [domain]
+(no domain)
+  *Non*URL*path
+bar.com
   bar.js?file=bar/zzz.js
+  foo.js?file=bar/aaa.js
+foo.com
   bar.js?file=bar/zzz.js
   block.js?block=foo
   foo.js?file=bar/aaa.js
-  foo.js?file=bar/aaa.js
   ga.js
   jquery-1.5.1.min.js
   jquery.cookie.js
@@ -165,133 +79,199 @@
   top100.jcn?80674
   xgemius.js
 Sources:
--------- Setting mode: [frame/domain]
-mock-target-1
-  (no domain)
-    *Non*URL*path
-  bar.com
-    bar.js?file=bar/zzz.js
-    foo.js?file=bar/aaa.js
-  foo.com
-    bar.js?file=bar/zzz.js
-    block.js?block=foo
-    foo.js?file=bar/aaa.js
-    ga.js
-    jquery-1.5.1.min.js
-    jquery.cookie.js
-    lenta.ban?pg=4883&ifr=1
-    lenta.ban?pg=5309&ifr=1
-    motor.js?1308927432
-    top100.jcn?80674
-    xgemius.js
-Sources:
--------- Setting mode: [frame/domain/folder]
-mock-target-1
-  (no domain)
-    *Non*URL*path
-  bar.com
-    foo/path
-      bar.js?file=bar/zzz.js
-      foo.js?file=bar/aaa.js
-  foo.com
-    _js/production
-      motor.js?1308927432
-    foo/path
-      bar.js?file=bar/zzz.js
-      foo.js?file=bar/aaa.js
-    i
-      js
-        jquery-1.5.1.min.js
-        jquery.cookie.js
-      xgemius.js
-    block.js?block=foo
-    ga.js
-    lenta.ban?pg=4883&ifr=1
-    lenta.ban?pg=5309&ifr=1
-    top100.jcn?80674
-Sources:
--------- Setting mode: [domain]
-mock-target-1
-  (no domain)
-    *Non*URL*path
-  bar.com
-    bar.js?file=bar/zzz.js
-    foo.js?file=bar/aaa.js
-  foo.com
-    bar.js?file=bar/zzz.js
-    block.js?block=foo
-    foo.js?file=bar/aaa.js
-    ga.js
-    jquery-1.5.1.min.js
-    jquery.cookie.js
-    lenta.ban?pg=4883&ifr=1
-    lenta.ban?pg=5309&ifr=1
-    motor.js?1308927432
-    top100.jcn?80674
-    xgemius.js
-Sources:
 -------- Setting mode: [domain/folder]
-mock-target-1
-  (no domain)
-    *Non*URL*path
-  bar.com
-    foo/path
-      bar.js?file=bar/zzz.js
-      foo.js?file=bar/aaa.js
-  foo.com
-    _js/production
-      motor.js?1308927432
-    foo/path
-      bar.js?file=bar/zzz.js
-      foo.js?file=bar/aaa.js
-    i
-      js
-        jquery-1.5.1.min.js
-        jquery.cookie.js
-      xgemius.js
-    block.js?block=foo
-    ga.js
-    lenta.ban?pg=4883&ifr=1
-    lenta.ban?pg=5309&ifr=1
-    top100.jcn?80674
+(no domain)
+  *Non*URL*path
+bar.com
+  foo/path
+    bar.js?file=bar/zzz.js
+    foo.js?file=bar/aaa.js
+foo.com
+  _js/production
+    motor.js?1308927432
+  foo/path
+    bar.js?file=bar/zzz.js
+    foo.js?file=bar/aaa.js
+  i
+    js
+      jquery-1.5.1.min.js
+      jquery.cookie.js
+    xgemius.js
+  block.js?block=foo
+  ga.js
+  lenta.ban?pg=4883&ifr=1
+  lenta.ban?pg=5309&ifr=1
+  top100.jcn?80674
 Content Scripts:
 -------- Setting mode: [frame]
-mock-target-1
+*Another*Non*URL*path
+bar.js
+baz.js
+Content Scripts:
+-------- Setting mode: [frame/domain]
+(no domain)
   *Another*Non*URL*path
+extension-name
   bar.js
   baz.js
 Content Scripts:
--------- Setting mode: [frame/domain]
-mock-target-1
-  (no domain)
-    *Another*Non*URL*path
-  extension-name
-    bar.js
-    baz.js
-Content Scripts:
 -------- Setting mode: [frame/domain/folder]
-mock-target-1
-  (no domain)
-    *Another*Non*URL*path
-  extension-name
-    folder
-      baz.js
-    bar.js
+(no domain)
+  *Another*Non*URL*path
+extension-name
+  folder
+    baz.js
+  bar.js
 Content Scripts:
 -------- Setting mode: [domain]
-mock-target-1
-  (no domain)
-    *Another*Non*URL*path
-  extension-name
-    bar.js
-    baz.js
+(no domain)
+  *Another*Non*URL*path
+extension-name
+  bar.js
+  baz.js
 Content Scripts:
 -------- Setting mode: [domain/folder]
-mock-target-1
-  (no domain)
-    *Another*Non*URL*path
-  extension-name
-    folder
-      baz.js
-    bar.js
+(no domain)
+  *Another*Non*URL*path
+extension-name
+  folder
+    baz.js
+  bar.js
+Sources:
+-------- Setting mode: [frame]
+*Non*URL*path
+bar.js?file=bar/zzz.js
+bar.js?file=bar/zzz.js
+block.js?block=foo
+foo.js?file=bar/aaa.js
+foo.js?file=bar/aaa.js
+ga.js
+jquery-1.5.1.min.js
+jquery.cookie.js
+lenta.ban?pg=4883&ifr=1
+lenta.ban?pg=5309&ifr=1
+motor.js?1308927432
+top100.jcn?80674
+xgemius.js
+Sources:
+-------- Setting mode: [frame/domain]
+(no domain)
+  *Non*URL*path
+bar.com
+  bar.js?file=bar/zzz.js
+  foo.js?file=bar/aaa.js
+foo.com
+  bar.js?file=bar/zzz.js
+  block.js?block=foo
+  foo.js?file=bar/aaa.js
+  ga.js
+  jquery-1.5.1.min.js
+  jquery.cookie.js
+  lenta.ban?pg=4883&ifr=1
+  lenta.ban?pg=5309&ifr=1
+  motor.js?1308927432
+  top100.jcn?80674
+  xgemius.js
+Sources:
+-------- Setting mode: [frame/domain/folder]
+(no domain)
+  *Non*URL*path
+bar.com
+  foo/path
+    bar.js?file=bar/zzz.js
+    foo.js?file=bar/aaa.js
+foo.com
+  _js/production
+    motor.js?1308927432
+  foo/path
+    bar.js?file=bar/zzz.js
+    foo.js?file=bar/aaa.js
+  i
+    js
+      jquery-1.5.1.min.js
+      jquery.cookie.js
+    xgemius.js
+  block.js?block=foo
+  ga.js
+  lenta.ban?pg=4883&ifr=1
+  lenta.ban?pg=5309&ifr=1
+  top100.jcn?80674
+Sources:
+-------- Setting mode: [domain]
+(no domain)
+  *Non*URL*path
+bar.com
+  bar.js?file=bar/zzz.js
+  foo.js?file=bar/aaa.js
+foo.com
+  bar.js?file=bar/zzz.js
+  block.js?block=foo
+  foo.js?file=bar/aaa.js
+  ga.js
+  jquery-1.5.1.min.js
+  jquery.cookie.js
+  lenta.ban?pg=4883&ifr=1
+  lenta.ban?pg=5309&ifr=1
+  motor.js?1308927432
+  top100.jcn?80674
+  xgemius.js
+Sources:
+-------- Setting mode: [domain/folder]
+(no domain)
+  *Non*URL*path
+bar.com
+  foo/path
+    bar.js?file=bar/zzz.js
+    foo.js?file=bar/aaa.js
+foo.com
+  _js/production
+    motor.js?1308927432
+  foo/path
+    bar.js?file=bar/zzz.js
+    foo.js?file=bar/aaa.js
+  i
+    js
+      jquery-1.5.1.min.js
+      jquery.cookie.js
+    xgemius.js
+  block.js?block=foo
+  ga.js
+  lenta.ban?pg=4883&ifr=1
+  lenta.ban?pg=5309&ifr=1
+  top100.jcn?80674
+Content Scripts:
+-------- Setting mode: [frame]
+*Another*Non*URL*path
+bar.js
+baz.js
+Content Scripts:
+-------- Setting mode: [frame/domain]
+(no domain)
+  *Another*Non*URL*path
+extension-name
+  bar.js
+  baz.js
+Content Scripts:
+-------- Setting mode: [frame/domain/folder]
+(no domain)
+  *Another*Non*URL*path
+extension-name
+  folder
+    baz.js
+  bar.js
+Content Scripts:
+-------- Setting mode: [domain]
+(no domain)
+  *Another*Non*URL*path
+extension-name
+  bar.js
+  baz.js
+Content Scripts:
+-------- Setting mode: [domain/folder]
+(no domain)
+  *Another*Non*URL*path
+extension-name
+  folder
+    baz.js
+  bar.js
 
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/scripts-sorting.js b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/scripts-sorting.js
index 476cfc6..1d62c056 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/scripts-sorting.js
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/scripts-sorting.js
@@ -17,12 +17,9 @@
   sourcesNavigatorView = createNavigatorView(Sources.NetworkNavigatorView);
   contentScriptsNavigatorView = createNavigatorView(Sources.ContentScriptsNavigatorView);
 
-  Bindings.debuggerWorkspaceBinding._resetForTest(TestRunner.mainTarget);
-  Bindings.resourceMapping._resetForTest(TestRunner.mainTarget);
-
   var pageMock = new SDKTestRunner.PageMock('http://example.com');
   pageMock.turnIntoWorker();
-  SDKTestRunner.connectToPage('mock-target-1', pageMock);
+  pageMock.connectAsMainTarget('mock-target-1');
 
   var uiSourceCodes = [];
   async function addUISourceCode(url, isContentScript) {
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/switch-file.js b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/switch-file.js
index 7e84d18..1916370 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/switch-file.js
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger-ui/switch-file.js
@@ -21,7 +21,7 @@
   files = files.map(file => 'http://example.com/' + file);
 
   var page = new SDKTestRunner.PageMock('http://example.com');
-  SDKTestRunner.connectToPage('mock-page', page);
+  page.connectAsMainTarget('mock-page');
 
   var uiSourceCodes = [];
   for (var i = 0; i < files.length; ++i) {
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger/navigator-view-expected.txt b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger/navigator-view-expected.txt
index 5a642065..f626b3e 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger/navigator-view-expected.txt
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger/navigator-view-expected.txt
@@ -126,9 +126,10 @@
   childframe (post-message-listener.html)
     script.js
     script.js?a=1
-mock-target-100
-  script.js
-  script.js?a=3
+script1.js
+  script1.js?a=3
+script2.js
+  script2.js
 Sources:
 -------- Setting mode: [frame/domain]
 top
@@ -139,10 +140,12 @@
     localhost:8080
       script.js
       script.js?a=1
-mock-target-100
-  localhost:8080
-    script.js
-    script.js?a=3
+script1.js
+  127.0.0.1:8000
+    script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    script2.js
 Sources:
 -------- Setting mode: [frame/domain/folder]
 top
@@ -157,13 +160,14 @@
           script.js?a=1
         baz
           script.js
-mock-target-100
-  localhost:8080
-    LayoutTests/inspector/debugger/foo
-      bar
-        script.js?a=3
-      baz
-        script.js
+script1.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script2.js
 Sources:
 -------- Setting mode: [domain]
 localhost:8080
@@ -171,10 +175,12 @@
   script.js
   script.js?a=1
   script.js?a=2
-mock-target-100
-  localhost:8080
-    script.js
-    script.js?a=3
+script1.js
+  127.0.0.1:8000
+    script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    script2.js
 Sources:
 -------- Setting mode: [domain/folder]
 localhost:8080
@@ -185,13 +191,14 @@
       script.js?a=2
     baz
       script.js
-mock-target-100
-  localhost:8080
-    LayoutTests/inspector/debugger/foo
-      bar
-        script.js?a=3
-      baz
-        script.js
+script1.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script2.js
 
 
 ================================================
@@ -211,9 +218,10 @@
   childframe (post-message-listener.html)
     script.js
     script.js?a=1
-mock-target-100
-  script.js
-  script.js?a=3
+script1.js
+  script1.js?a=3
+script2.js
+  script2.js
 Sources:
 -------- Setting mode: [frame/domain]
 top
@@ -233,10 +241,12 @@
     localhost:8080
       script.js
       script.js?a=1
-mock-target-100
-  localhost:8080
-    script.js
-    script.js?a=3
+script1.js
+  127.0.0.1:8000
+    script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    script2.js
 Sources:
 -------- Setting mode: [frame/domain/folder]
 top
@@ -262,13 +272,14 @@
           script.js?a=1
         baz
           script.js
-mock-target-100
-  localhost:8080
-    LayoutTests/inspector/debugger/foo
-      bar
-        script.js?a=3
-      baz
-        script.js
+script1.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script2.js
 Sources:
 -------- Setting mode: [domain]
 (no domain)
@@ -285,10 +296,12 @@
   script.js
   script.js?a=1
   script.js?a=2
-mock-target-100
-  localhost:8080
-    script.js
-    script.js?a=3
+script1.js
+  127.0.0.1:8000
+    script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    script2.js
 Sources:
 -------- Setting mode: [domain/folder]
 (no domain)
@@ -310,13 +323,14 @@
       script.js?a=2
     baz
       script.js
-mock-target-100
-  localhost:8080
-    LayoutTests/inspector/debugger/foo
-      bar
-        script.js?a=3
-      baz
-        script.js
+script1.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script2.js
 Content Scripts:
 -------- Setting mode: [frame]
 top
@@ -370,9 +384,10 @@
   childframe (post-message-listener.html)
     script.js
     script.js?a=1
-mock-target-100
-  script.js
-  script.js?a=3
+script1.js
+  script1.js?a=3
+script2.js
+  script2.js
 Sources:
 -------- Setting mode: [frame/domain]
 top
@@ -392,10 +407,12 @@
     localhost:8080
       script.js
       script.js?a=1
-mock-target-100
-  localhost:8080
-    script.js
-    script.js?a=3
+script1.js
+  127.0.0.1:8000
+    script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    script2.js
 Sources:
 -------- Setting mode: [frame/domain/folder]
 top
@@ -421,13 +438,14 @@
           script.js?a=1
         baz
           script.js
-mock-target-100
-  localhost:8080
-    LayoutTests/inspector/debugger/foo
-      bar
-        script.js?a=3
-      baz
-        script.js
+script1.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script2.js
 Sources:
 -------- Setting mode: [domain]
 (no domain)
@@ -444,10 +462,12 @@
   script.js
   script.js?a=1
   script.js?a=2
-mock-target-100
-  localhost:8080
-    script.js
-    script.js?a=3
+script1.js
+  127.0.0.1:8000
+    script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    script2.js
 Sources:
 -------- Setting mode: [domain/folder]
 (no domain)
@@ -469,13 +489,14 @@
       script.js?a=2
     baz
       script.js
-mock-target-100
-  localhost:8080
-    LayoutTests/inspector/debugger/foo
-      bar
-        script.js?a=3
-      baz
-        script.js
+script1.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script2.js
 
 
 ================================================
@@ -496,9 +517,10 @@
   childframe (post-message-listener.html)
     script.js
     script.js?a=1
-mock-target-100
-  script.js
-  script.js?a=3
+script1.js
+  script1.js?a=3
+script2.js
+  script2.js
 Sources:
 -------- Setting mode: [frame/domain]
 top
@@ -519,10 +541,12 @@
     localhost:8080
       script.js
       script.js?a=1
-mock-target-100
-  localhost:8080
-    script.js
-    script.js?a=3
+script1.js
+  127.0.0.1:8000
+    script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    script2.js
 Sources:
 -------- Setting mode: [frame/domain/folder]
 top
@@ -551,13 +575,14 @@
           script.js?a=1
         baz
           script.js
-mock-target-100
-  localhost:8080
-    LayoutTests/inspector/debugger/foo
-      bar
-        script.js?a=3
-      baz
-        script.js
+script1.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script2.js
 Sources:
 -------- Setting mode: [domain]
 (no domain)
@@ -575,10 +600,12 @@
   script.js
   script.js?a=1
   script.js?a=2
-mock-target-100
-  localhost:8080
-    script.js
-    script.js?a=3
+script1.js
+  127.0.0.1:8000
+    script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    script2.js
 Sources:
 -------- Setting mode: [domain/folder]
 (no domain)
@@ -603,13 +630,14 @@
         script.js
     debugger2/foo/bar
       script.js
-mock-target-100
-  localhost:8080
-    LayoutTests/inspector/debugger/foo
-      bar
-        script.js?a=3
-      baz
-        script.js
+script1.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script2.js
 
 
 ================================================
@@ -631,9 +659,10 @@
   childframe (post-message-listener.html)
     script.js
     script.js?a=1
-mock-target-100
-  script.js
-  script.js?a=3
+script1.js
+  script1.js?a=3
+script2.js
+  script2.js
 Sources:
 -------- Setting mode: [frame/domain]
 top
@@ -655,10 +684,12 @@
     localhost:8080
       script.js
       script.js?a=1
-mock-target-100
-  localhost:8080
-    script.js
-    script.js?a=3
+script1.js
+  127.0.0.1:8000
+    script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    script2.js
 Sources:
 -------- Setting mode: [frame/domain/folder]
 top
@@ -688,13 +719,14 @@
           script.js?a=1
         baz
           script.js
-mock-target-100
-  localhost:8080
-    LayoutTests/inspector/debugger/foo
-      bar
-        script.js?a=3
-      baz
-        script.js
+script1.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script2.js
 Sources:
 -------- Setting mode: [domain]
 (no domain)
@@ -713,10 +745,12 @@
   script.js?a=1
   script.js?a=2
   script.js?a=2
-mock-target-100
-  localhost:8080
-    script.js
-    script.js?a=3
+script1.js
+  127.0.0.1:8000
+    script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    script2.js
 Sources:
 -------- Setting mode: [domain/folder]
 (no domain)
@@ -742,13 +776,14 @@
     debugger2/foo/bar
       script.js
       script.js?a=2
-mock-target-100
-  localhost:8080
-    LayoutTests/inspector/debugger/foo
-      bar
-        script.js?a=3
-      baz
-        script.js
+script1.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script2.js
 
 
 ================================================
@@ -772,9 +807,10 @@
   childframe (post-message-listener.html)
     script.js
     script.js?a=1
-mock-target-100
-  script.js
-  script.js?a=3
+script1.js
+  script1.js?a=3
+script2.js
+  script2.js
 Sources:
 -------- Setting mode: [frame/domain]
 top
@@ -798,10 +834,12 @@
     localhost:8080
       script.js
       script.js?a=1
-mock-target-100
-  localhost:8080
-    script.js
-    script.js?a=3
+script1.js
+  127.0.0.1:8000
+    script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    script2.js
 Sources:
 -------- Setting mode: [frame/domain/folder]
 top
@@ -835,13 +873,14 @@
           script.js?a=1
         baz
           script.js
-mock-target-100
-  localhost:8080
-    LayoutTests/inspector/debugger/foo
-      bar
-        script.js?a=3
-      baz
-        script.js
+script1.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script2.js
 Sources:
 -------- Setting mode: [domain]
 (no domain)
@@ -862,10 +901,12 @@
   script.js?a=1
   script.js?a=2
   script.js?a=2
-mock-target-100
-  localhost:8080
-    script.js
-    script.js?a=3
+script1.js
+  127.0.0.1:8000
+    script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    script2.js
 Sources:
 -------- Setting mode: [domain/folder]
 (no domain)
@@ -895,13 +936,14 @@
         script.js?a=2
       baz
         script.js
-mock-target-100
-  localhost:8080
-    LayoutTests/inspector/debugger/foo
-      bar
-        script.js?a=3
-      baz
-        script.js
+script1.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script2.js
 
 
 ================================================
@@ -927,9 +969,10 @@
   childframe (post-message-listener.html)
     script.js
     script.js?a=1
-mock-target-100
-  script.js
-  script.js?a=3
+script1.js
+  script1.js?a=3
+script2.js
+  script2.js
 Sources:
 -------- Setting mode: [frame/domain]
 top
@@ -956,10 +999,12 @@
     localhost:8080
       script.js
       script.js?a=1
-mock-target-100
-  localhost:8080
-    script.js
-    script.js?a=3
+script1.js
+  127.0.0.1:8000
+    script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    script2.js
 Sources:
 -------- Setting mode: [frame/domain/folder]
 top
@@ -999,13 +1044,14 @@
           script.js?a=1
         baz
           script.js
-mock-target-100
-  localhost:8080
-    LayoutTests/inspector/debugger/foo
-      bar
-        script.js?a=3
-      baz
-        script.js
+script1.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script2.js
 Sources:
 -------- Setting mode: [domain]
 (no domain)
@@ -1029,10 +1075,12 @@
   script.js?a=1
   script.js?a=2
   script.js?a=2
-mock-target-100
-  localhost:8080
-    script.js
-    script.js?a=3
+script1.js
+  127.0.0.1:8000
+    script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    script2.js
 Sources:
 -------- Setting mode: [domain/folder]
 (no domain)
@@ -1068,13 +1116,14 @@
           foo.js
         foo.js
       foo.js
-mock-target-100
-  localhost:8080
-    LayoutTests/inspector/debugger/foo
-      bar
-        script.js?a=3
-      baz
-        script.js
+script1.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script2.js
 
 
 ================================================
@@ -1101,9 +1150,10 @@
   childframe (post-message-listener.html)
     script.js
     script.js?a=1
-mock-target-100
-  script.js
-  script.js?a=3
+script1.js
+  script1.js?a=3
+script2.js
+  script2.js
 Sources:
 -------- Setting mode: [frame/domain]
 top
@@ -1130,10 +1180,12 @@
     localhost:8080
       script.js
       script.js?a=1
-mock-target-100
-  localhost:8080
-    script.js
-    script.js?a=3
+script1.js
+  127.0.0.1:8000
+    script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    script2.js
 Sources:
 -------- Setting mode: [frame/domain/folder]
 top
@@ -1173,13 +1225,14 @@
           script.js?a=1
         baz
           script.js
-mock-target-100
-  localhost:8080
-    LayoutTests/inspector/debugger/foo
-      bar
-        script.js?a=3
-      baz
-        script.js
+script1.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script2.js
 Sources:
 -------- Setting mode: [domain]
 (no domain)
@@ -1203,10 +1256,12 @@
   script.js?a=1
   script.js?a=2
   script.js?a=2
-mock-target-100
-  localhost:8080
-    script.js
-    script.js?a=3
+script1.js
+  127.0.0.1:8000
+    script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    script2.js
 Sources:
 -------- Setting mode: [domain/folder]
 (no domain)
@@ -1242,13 +1297,14 @@
           foo.js
         foo.js
       foo.js
-mock-target-100
-  localhost:8080
-    LayoutTests/inspector/debugger/foo
-      bar
-        script.js?a=3
-      baz
-        script.js
+script1.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script1.js?a=3
+script2.js
+  127.0.0.1:8000
+    devtools/sources/debugger/resources
+      script2.js
 Content Scripts:
 -------- Setting mode: [frame]
 top
diff --git a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger/navigator-view.js b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger/navigator-view.js
index 01c4c76..6a415ed 100644
--- a/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger/navigator-view.js
+++ b/third_party/WebKit/LayoutTests/http/tests/devtools/sources/debugger/navigator-view.js
@@ -13,9 +13,6 @@
   Bindings.debuggerWorkspaceBinding._resetForTest(TestRunner.mainTarget);
   Bindings.resourceMapping._resetForTest(TestRunner.mainTarget);
 
-  var pageMock = new SDKTestRunner.PageMock('mock-url.com/frame.html');
-  pageMock.turnIntoWorker();
-  var target2 = SDKTestRunner.connectToPage('mock-target-100', pageMock);
   var subframe = TestRunner.mainFrame().childFrames[0];
 
   var sourcesNavigatorView = new Sources.NetworkNavigatorView();
@@ -36,8 +33,11 @@
     uiSourceCodes.push(uiSourceCode);
   }
 
-  async function addUISourceCode2(url, isContentScript) {
-    pageMock.evalScript(url, '', isContentScript);
+  async function addUISourceCode2(url) {
+    TestRunner.evaluateInPageAnonymously(`
+      window.workers = window.workers || [];
+      window.workers.push(new Worker('${url}', {name: 'mock-target-100'}));
+    `);
     var uiSourceCode = await waitForUISourceCodeAdded(url);
     uiSourceCodes.push(uiSourceCode);
   }
@@ -84,8 +84,8 @@
 
   TestRunner.addResult('\n\n================================================');
   TestRunner.addResult('Adding resources into another target:');
-  await addUISourceCode2(rootURL + 'foo/bar/script.js?a=3', false);
-  await addUISourceCode2(rootURL + 'foo/baz/script.js', false);
+  await addUISourceCode2(TestRunner.url('resources/script1.js?a=3'));
+  await addUISourceCode2(TestRunner.url('resources/script2.js'));
   SourcesTestRunner.dumpNavigatorViewInAllModes(sourcesNavigatorView);
 
   TestRunner.addResult('\n\n================================================');
@@ -151,7 +151,10 @@
 
   TestRunner.addResult('\n\n================================================');
   TestRunner.addResult('Removing all resources:');
-  Bindings.debuggerWorkspaceBinding._resetForTest(target2);
+  for (const target of SDK.targetManager.targets()) {
+    if (target !== TestRunner.mainTarget)
+      Bindings.debuggerWorkspaceBinding._resetForTest(target);
+  }
   SourcesTestRunner.dumpNavigatorViewInAllModes(sourcesNavigatorView);
   SourcesTestRunner.dumpNavigatorViewInAllModes(contentScriptsNavigatorView);
 
diff --git a/third_party/WebKit/LayoutTests/platform/linux/animations/rotate-transform-equivalent-expected.png b/third_party/WebKit/LayoutTests/platform/linux/animations/rotate-transform-equivalent-expected.png
index 6b7d09a..a2b52d3 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/animations/rotate-transform-equivalent-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/animations/rotate-transform-equivalent-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/direct-image-compositing-expected.png b/third_party/WebKit/LayoutTests/platform/linux/compositing/direct-image-compositing-expected.png
index 9093d985..bb3c623 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/direct-image-compositing-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/direct-image-compositing-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/fixed-position-transform-composited-page-scale-down-expected.png b/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/fixed-position-transform-composited-page-scale-down-expected.png
index 31e99d54..6a2a167 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/fixed-position-transform-composited-page-scale-down-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/fixed-position-transform-composited-page-scale-down-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/fixed-position-transform-composited-page-scale-expected.png b/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/fixed-position-transform-composited-page-scale-expected.png
index 8a3ea89..f5b91651 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/fixed-position-transform-composited-page-scale-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/fixed-position-transform-composited-page-scale-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/layer-due-to-layer-children-deep-expected.png b/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/layer-due-to-layer-children-deep-expected.png
index c86200fc..6e2abbe1 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/layer-due-to-layer-children-deep-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/layer-due-to-layer-children-deep-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/layer-due-to-layer-children-expected.png b/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/layer-due-to-layer-children-expected.png
index 21bc51a..59e62676 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/layer-due-to-layer-children-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/layer-due-to-layer-children-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/mask-with-removed-filters-expected.png b/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/mask-with-removed-filters-expected.png
index 56f6eebf..d63d1d2 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/mask-with-removed-filters-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/masks/mask-with-removed-filters-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/reflections/nested-reflection-anchor-point-expected.png b/third_party/WebKit/LayoutTests/platform/linux/compositing/reflections/nested-reflection-anchor-point-expected.png
index e1e3d7d..4509f81 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/compositing/reflections/nested-reflection-anchor-point-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/reflections/nested-reflection-anchor-point-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png b/third_party/WebKit/LayoutTests/platform/linux/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png
index 2943e801..9d6184b2 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-border-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-border-expected.png
index 49fae8f..b74dd02 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-border-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-border-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-expected.png
index 9376445..ee379af6 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-with-mask-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-with-mask-expected.png
index c3208ee9..c6f4b6f 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-with-mask-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-canvas-with-mask-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-video-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-video-expected.png
index 77c6fea..6e29ef2 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-video-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-mask-video-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-with-composited-child-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-with-composited-child-expected.png
index 76ff66f..9d9c232 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-with-composited-child-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/borders/border-radius-with-composited-child-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/clip/overflow-border-radius-composited-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/clip/overflow-border-radius-composited-expected.png
index b5665790..3e6a684 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/clip/overflow-border-radius-composited-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/clip/overflow-border-radius-composited-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/clip/overflow-border-radius-composited-parent-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/clip/overflow-border-radius-composited-parent-expected.png
index fb94f6dc..f1f8011 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/fast/clip/overflow-border-radius-composited-parent-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/fast/clip/overflow-border-radius-composited-parent-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls-after-reload-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/controls-after-reload-expected.png
index af2d071b..b805516 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/media/controls-after-reload-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls-after-reload-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls-strict-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/controls-strict-expected.png
index 58856e2..fca4441 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/media/controls-strict-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls-strict-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-expected.png
index ae1db3b4..a9db566 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-strict-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-strict-expected.png
index 2948071..a2cdbded 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-strict-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-strict-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls-without-preload-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/controls-without-preload-expected.png
index 0f254c8..16a2b350 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/media/controls-without-preload-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls-without-preload-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png
index 120b231..8705e0b6 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-expected.png
index 4341c83..2b25f10 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-controls-rendering-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/video-controls-rendering-expected.png
index 6f061986..6feaffe6 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/media/video-controls-rendering-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-controls-rendering-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-display-toggle-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/video-display-toggle-expected.png
index 3368e343..e53564fe 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/media/video-display-toggle-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-display-toggle-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-layer-crash-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/video-layer-crash-expected.png
index 48fb9ca..93be32fd 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/media/video-layer-crash-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-layer-crash-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-no-audio-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/video-no-audio-expected.png
index 3072ab0b..64a762c 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/media/video-no-audio-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-no-audio-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-zoom-controls-expected.png b/third_party/WebKit/LayoutTests/platform/linux/media/video-zoom-controls-expected.png
index 0d30c06..158cb0c9 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/media/video-zoom-controls-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-zoom-controls-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/general/perspective-units-expected.png b/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/general/perspective-units-expected.png
index 99772e56..bfc1e3d 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/general/perspective-units-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/general/perspective-units-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-2-expected.png b/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-2-expected.png
index c518ae06..b311d811 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-2-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-2-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-3-expected.png b/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-3-expected.png
index 045e9f6..42530ff 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-3-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-3-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-expected.png b/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-expected.png
index 15f7617..53bb1aa 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png b/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png
index 289dbdd..040de78 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png b/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png
index 24c0dd7d..17f9339 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/android/fullscreen/full-screen-iframe-allowed-video-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/android/fullscreen/full-screen-iframe-allowed-video-expected.png
index 8aedabea..bea834b7f 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/virtual/android/fullscreen/full-screen-iframe-allowed-video-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/android/fullscreen/full-screen-iframe-allowed-video-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/android/fullscreen/video-controls-timeline-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/android/fullscreen/video-controls-timeline-expected.png
index ef81892..355b9c3 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/virtual/android/fullscreen/video-controls-timeline-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/android/fullscreen/video-controls-timeline-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/android/fullscreen/video-scrolled-iframe-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/android/fullscreen/video-scrolled-iframe-expected.png
index 8aedabea..bea834b7f 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/virtual/android/fullscreen/video-scrolled-iframe-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/android/fullscreen/video-scrolled-iframe-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/compositing/overflow/tiled-mask-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/compositing/overflow/tiled-mask-expected.png
deleted file mode 100644
index f0d3620c4..0000000
--- a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/compositing/overflow/tiled-mask-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png
index 120b231..8705e0b6 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-expected.png
index 4341c83..2b25f10 100644
--- a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png
index a8fc463..b6c82a2 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-after-reload-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-after-reload-expected.png
index 86276bb..bc86a51bc 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-after-reload-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-after-reload-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-strict-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-strict-expected.png
index 83d0ebfa..a7dcd69 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-strict-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-strict-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-styling-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-styling-expected.png
index df2a7f2a..2fce9b0 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-styling-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-styling-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-styling-strict-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-styling-strict-expected.png
index ccf39e5..b55884d 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-styling-strict-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-styling-strict-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-without-preload-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-without-preload-expected.png
index 4a55d10..96294b9 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-without-preload-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls-without-preload-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png
index f5398dc8..e663685 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls/paint-controls-webkit-appearance-none-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls/paint-controls-webkit-appearance-none-expected.png
index c1a23f7d..36f6c1a 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls/paint-controls-webkit-appearance-none-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls/paint-controls-webkit-appearance-none-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-controls-rendering-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-controls-rendering-expected.png
index 7b7848d..2d5c5b1 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-controls-rendering-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-controls-rendering-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-display-toggle-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-display-toggle-expected.png
index 897023e..0af2bac 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-display-toggle-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-display-toggle-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-no-audio-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-no-audio-expected.png
index 2557d3e..1a13c8b 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-no-audio-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-no-audio-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-zoom-controls-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-zoom-controls-expected.png
index 0462bbf..e3c7936 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-zoom-controls-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/video-zoom-controls-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png
index f5398dc8..e663685 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-expected.png
index c1a23f7d..36f6c1a 100644
--- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/transforms/3d/point-mapping/3d-point-mapping-3-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/transforms/3d/point-mapping/3d-point-mapping-3-expected.png
new file mode 100644
index 0000000..4ac6837
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/mac-retina/transforms/3d/point-mapping/3d-point-mapping-3-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png
new file mode 100644
index 0000000..cbf9655
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/mac-retina/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/animations/rotate-transform-equivalent-expected.png b/third_party/WebKit/LayoutTests/platform/mac/animations/rotate-transform-equivalent-expected.png
index a2e71c0c..3877b48 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/animations/rotate-transform-equivalent-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/animations/rotate-transform-equivalent-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/direct-image-compositing-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/direct-image-compositing-expected.png
index 3ee11d1..f0fe9800 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/direct-image-compositing-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/direct-image-compositing-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/fixed-position-transform-composited-page-scale-down-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/fixed-position-transform-composited-page-scale-down-expected.png
index 68159b57..11cb2c6 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/fixed-position-transform-composited-page-scale-down-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/fixed-position-transform-composited-page-scale-down-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/fixed-position-transform-composited-page-scale-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/fixed-position-transform-composited-page-scale-expected.png
index 17adf89..7f9d558 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/fixed-position-transform-composited-page-scale-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/fixed-position-transform-composited-page-scale-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/layer-due-to-layer-children-deep-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/layer-due-to-layer-children-deep-expected.png
index eb20299..fbcfcee6 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/layer-due-to-layer-children-deep-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/layer-due-to-layer-children-deep-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/layer-due-to-layer-children-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/layer-due-to-layer-children-expected.png
index a5c28fd..be16801 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/layer-due-to-layer-children-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/layer-due-to-layer-children-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/mask-with-removed-filters-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/mask-with-removed-filters-expected.png
index 27f80875..786597fe 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/mask-with-removed-filters-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/masks/mask-with-removed-filters-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/nested-render-surfaces-with-rotation-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/nested-render-surfaces-with-rotation-expected.png
new file mode 100644
index 0000000..12eb170
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/nested-render-surfaces-with-rotation-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/reflections/nested-reflection-anchor-point-expected.png b/third_party/WebKit/LayoutTests/platform/mac/compositing/reflections/nested-reflection-anchor-point-expected.png
index 6e47911..093a659 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/compositing/reflections/nested-reflection-anchor-point-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/reflections/nested-reflection-anchor-point-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png
index 31b168ae..2db5f77 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-contrast-hw-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-contrast-hw-expected.png
index fb67839..3e8577f 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-contrast-hw-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-contrast-hw-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-expected.png
index 3eb36267..50e87f4c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-with-mask-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-with-mask-expected.png
index e3c47f5..8c84638 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-with-mask-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-canvas-with-mask-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-video-ratio-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-video-ratio-expected.png
index 02bb72a..cfb83ff3 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-video-ratio-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-video-ratio-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-video-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-video-shadow-expected.png
index 53dd23a9..b3e404cf 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-video-shadow-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-mask-video-shadow-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-with-composited-child-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-with-composited-child-expected.png
index fa3a31a..22fce6f 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-with-composited-child-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/borders/border-radius-with-composited-child-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/sub-pixel/transformed-iframe-copy-on-scroll-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/sub-pixel/transformed-iframe-copy-on-scroll-expected.png
index 146bd85..ecc71241 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/fast/sub-pixel/transformed-iframe-copy-on-scroll-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/fast/sub-pixel/transformed-iframe-copy-on-scroll-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls-after-reload-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/controls-after-reload-expected.png
index e7bd7cc..44c64cd 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/media/controls-after-reload-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls-after-reload-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls-strict-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/controls-strict-expected.png
index b84d92af..7939add5 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/media/controls-strict-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls-strict-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-expected.png
index 7804a7c..776ad4d 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-strict-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-strict-expected.png
index 0d46dcb..032e640 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-strict-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-strict-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls-without-preload-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/controls-without-preload-expected.png
index d32f00c..e761cf9c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/media/controls-without-preload-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls-without-preload-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png
index d3de7e9..f5bdef9 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-expected.png
index 7dc5dcb..4a08f5d 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-controls-rendering-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/video-controls-rendering-expected.png
index b9436e4..be2ea72 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/media/video-controls-rendering-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-controls-rendering-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-display-toggle-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/video-display-toggle-expected.png
index 3795abc..f5b9495 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/media/video-display-toggle-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-display-toggle-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-layer-crash-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/video-layer-crash-expected.png
index 34a0f4cc..9525fa1 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/media/video-layer-crash-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-layer-crash-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-no-audio-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/video-no-audio-expected.png
index 2443723..4b264d5c 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/media/video-no-audio-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-no-audio-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-zoom-controls-expected.png b/third_party/WebKit/LayoutTests/platform/mac/media/video-zoom-controls-expected.png
index 65ca7c7e..8ecaf64 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/media/video-zoom-controls-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-zoom-controls-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/overflow/overflow-transform-perspective-expected.png b/third_party/WebKit/LayoutTests/platform/mac/overflow/overflow-transform-perspective-expected.png
index f38e6c04..adbfea4 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/overflow/overflow-transform-perspective-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/overflow/overflow-transform-perspective-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/general/perspective-units-expected.png b/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/general/perspective-units-expected.png
index 11bb9b7..1316f4b 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/general/perspective-units-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/general/perspective-units-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-2-expected.png b/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-2-expected.png
index 83143a4..be542869 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-2-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-2-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-3-expected.png b/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-3-expected.png
index cfb54903..2dff9ab 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-3-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-3-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png b/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png
index 4fc50bb..4596d32 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-expected.png b/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-expected.png
index c1fbddc3..6f81352a 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png b/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png
index 2184fac..166cb520 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png b/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png
index e2cacb0..0aca9887 100644
--- a/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/mac/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/overflow/tiled-mask-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/overflow/tiled-mask-expected.png
deleted file mode 100644
index f0d3620c4..0000000
--- a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/overflow/tiled-mask-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/animations/rotate-transform-equivalent-expected.png b/third_party/WebKit/LayoutTests/platform/win/animations/rotate-transform-equivalent-expected.png
index e210750b..148b78e 100644
--- a/third_party/WebKit/LayoutTests/platform/win/animations/rotate-transform-equivalent-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/animations/rotate-transform-equivalent-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/direct-image-compositing-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/direct-image-compositing-expected.png
index eda13ed5..c6e23ba 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/direct-image-compositing-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/direct-image-compositing-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/fixed-position-transform-composited-page-scale-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/fixed-position-transform-composited-page-scale-expected.png
index 08242b1..b5ddfe7 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/fixed-position-transform-composited-page-scale-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/fixed-position-transform-composited-page-scale-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/layer-due-to-layer-children-deep-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/layer-due-to-layer-children-deep-expected.png
index 7570587..0094f41 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/layer-due-to-layer-children-deep-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/layer-due-to-layer-children-deep-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/layer-due-to-layer-children-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/layer-due-to-layer-children-expected.png
index 4fa6e20..afc7fc4f 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/layer-due-to-layer-children-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/layer-due-to-layer-children-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/masks/mask-with-removed-filters-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/masks/mask-with-removed-filters-expected.png
index 59ec2b1c..33c1b1f3 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/masks/mask-with-removed-filters-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/masks/mask-with-removed-filters-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/nested-render-surfaces-with-rotation-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/nested-render-surfaces-with-rotation-expected.png
new file mode 100644
index 0000000..1600edb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/nested-render-surfaces-with-rotation-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/reflections/nested-reflection-anchor-point-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/reflections/nested-reflection-anchor-point-expected.png
index f254eba..23942c2 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/reflections/nested-reflection-anchor-point-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/reflections/nested-reflection-anchor-point-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/reflections/nested-reflection-animated-expected.png b/third_party/WebKit/LayoutTests/platform/win/compositing/reflections/nested-reflection-animated-expected.png
index a8a1df6..17e1196 100644
--- a/third_party/WebKit/LayoutTests/platform/win/compositing/reflections/nested-reflection-animated-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/compositing/reflections/nested-reflection-animated-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png b/third_party/WebKit/LayoutTests/platform/win/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png
index 85e81de..dcae8a2f 100644
--- a/third_party/WebKit/LayoutTests/platform/win/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/css3/blending/background-blend-mode-overlapping-accelerated-elements-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/css3/filters/effect-contrast-hw-expected.png b/third_party/WebKit/LayoutTests/platform/win/css3/filters/effect-contrast-hw-expected.png
index 93b6b585..5b17288 100644
--- a/third_party/WebKit/LayoutTests/platform/win/css3/filters/effect-contrast-hw-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/css3/filters/effect-contrast-hw-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-border-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-border-expected.png
index 24825e8..66d2ac6e 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-border-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-border-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-expected.png
index 3c8ae2a..baf012d 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-with-mask-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-with-mask-expected.png
index 9cdbb2f..495db63e 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-with-mask-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-canvas-with-mask-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-video-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-video-expected.png
index 7377763..669e7ee02 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-video-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-mask-video-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-with-composited-child-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-with-composited-child-expected.png
index a9316ac..04630cad 100644
--- a/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-with-composited-child-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/fast/borders/border-radius-with-composited-child-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls-after-reload-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/controls-after-reload-expected.png
index ec294b55..560ede0 100644
--- a/third_party/WebKit/LayoutTests/platform/win/media/controls-after-reload-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/media/controls-after-reload-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls-strict-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/controls-strict-expected.png
index d5f2e89b..801ffeb 100644
--- a/third_party/WebKit/LayoutTests/platform/win/media/controls-strict-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/media/controls-strict-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-expected.png
index 539cbac1..9053a0944 100644
--- a/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-strict-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-strict-expected.png
index 870b219..27bb09ae 100644
--- a/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-strict-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-strict-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls-without-preload-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/controls-without-preload-expected.png
index 73a3fa9..d41ef4a 100644
--- a/third_party/WebKit/LayoutTests/platform/win/media/controls-without-preload-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/media/controls-without-preload-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png
index 5acc521..7343df8f 100644
--- a/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-expected.png
index b34f451..63a0399d 100644
--- a/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-controls-rendering-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/video-controls-rendering-expected.png
index 9cd5b09..c030883 100644
--- a/third_party/WebKit/LayoutTests/platform/win/media/video-controls-rendering-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/media/video-controls-rendering-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-display-toggle-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/video-display-toggle-expected.png
index fbb8785..fb91e2c 100644
--- a/third_party/WebKit/LayoutTests/platform/win/media/video-display-toggle-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/media/video-display-toggle-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-layer-crash-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/video-layer-crash-expected.png
index 1c1ed78..2c7f8c2 100644
--- a/third_party/WebKit/LayoutTests/platform/win/media/video-layer-crash-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/media/video-layer-crash-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-no-audio-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/video-no-audio-expected.png
index 64235ca..bbe1ca4d7 100644
--- a/third_party/WebKit/LayoutTests/platform/win/media/video-no-audio-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/media/video-no-audio-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-zoom-controls-expected.png b/third_party/WebKit/LayoutTests/platform/win/media/video-zoom-controls-expected.png
index f1043561d0..67b2be0 100644
--- a/third_party/WebKit/LayoutTests/platform/win/media/video-zoom-controls-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/media/video-zoom-controls-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/transforms/3d/general/perspective-units-expected.png b/third_party/WebKit/LayoutTests/platform/win/transforms/3d/general/perspective-units-expected.png
index 01ef186..e48c78e 100644
--- a/third_party/WebKit/LayoutTests/platform/win/transforms/3d/general/perspective-units-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/transforms/3d/general/perspective-units-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-2-expected.png b/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-2-expected.png
index a2a0581..f8591a19 100644
--- a/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-2-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-2-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-3-expected.png b/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-3-expected.png
index b3dcc16..350de238 100644
--- a/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-3-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-3-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png b/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png
index 4043e9f..00e1cc82 100644
--- a/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-expected.png b/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-expected.png
index f0dda5cd..645983d 100644
--- a/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png b/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png
index a62ae920..3e0b3aa 100644
--- a/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-origins-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png b/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png
index ae65002..296086c 100644
--- a/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png
+++ b/third_party/WebKit/LayoutTests/platform/win/transforms/3d/point-mapping/3d-point-mapping-preserve-3d-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/compositing/overflow/tiled-mask-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/compositing/overflow/tiled-mask-expected.png
deleted file mode 100644
index c79b681..0000000
--- a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/compositing/overflow/tiled-mask-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win7/media/video-zoom-controls-expected.png b/third_party/WebKit/LayoutTests/platform/win7/media/video-zoom-controls-expected.png
deleted file mode 100644
index cfa75e12..0000000
--- a/third_party/WebKit/LayoutTests/platform/win7/media/video-zoom-controls-expected.png
+++ /dev/null
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/transforms/3d/general/transform-origin-z-change-expected.png b/third_party/WebKit/LayoutTests/transforms/3d/general/transform-origin-z-change-expected.png
index 03eb899b6..fd36c4a4 100644
--- a/third_party/WebKit/LayoutTests/transforms/3d/general/transform-origin-z-change-expected.png
+++ b/third_party/WebKit/LayoutTests/transforms/3d/general/transform-origin-z-change-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/nested-render-surfaces-with-rotation-expected.png b/third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/nested-render-surfaces-with-rotation-expected.png
index a9af2c9..4c296cd 100644
--- a/third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/nested-render-surfaces-with-rotation-expected.png
+++ b/third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/nested-render-surfaces-with-rotation-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/tiled-mask-expected.png b/third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/tiled-mask-expected.png
new file mode 100644
index 0000000..49e4d2e8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/virtual/prefer_compositing_to_lcd_text/compositing/overflow/tiled-mask-expected.png
Binary files differ
diff --git a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt b/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
index 62c76e0..7521df4 100644
--- a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
+++ b/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
@@ -2226,12 +2226,22 @@
     getter timestamp
     getter vibrationActuator
     method constructor
+interface GamepadAxisEvent : GamepadEvent
+    attribute @@toStringTag
+    getter axis
+    getter value
+    method constructor
 interface GamepadButton
     attribute @@toStringTag
     getter pressed
     getter touched
     getter value
     method constructor
+interface GamepadButtonEvent : GamepadEvent
+    attribute @@toStringTag
+    getter button
+    getter value
+    method constructor
 interface GamepadEvent : Event
     attribute @@toStringTag
     getter gamepad
diff --git a/third_party/blink/perf_tests/layout/change-text-css-contain.html b/third_party/blink/perf_tests/layout/change-text-css-contain.html
index 4a9c913..8052746 100644
--- a/third_party/blink/perf_tests/layout/change-text-css-contain.html
+++ b/third_party/blink/perf_tests/layout/change-text-css-contain.html
@@ -13,6 +13,14 @@
   contain: size layout;
   line-height: 1;
 }
+
+span:nth-child(2n) {
+  text-align: center;
+}
+
+span:nth-child(3n) {
+  text-align: end;
+}
 </style>
 <script src="../resources/runner.js"></script>
 <script>
diff --git a/third_party/blink/public/mojom/indexeddb/indexeddb.mojom b/third_party/blink/public/mojom/indexeddb/indexeddb.mojom
index 552ffb44..e64b5f3 100644
--- a/third_party/blink/public/mojom/indexeddb/indexeddb.mojom
+++ b/third_party/blink/public/mojom/indexeddb/indexeddb.mojom
@@ -156,7 +156,7 @@
 };
 
 struct IDBValue {
-  string bits;
+  array<uint8> bits;
   array<IDBBlobInfo> blob_or_file_info;
 };
 
diff --git a/third_party/blink/public/mojom/payments/payment_app.mojom b/third_party/blink/public/mojom/payments/payment_app.mojom
index faa032b..49c95cf 100644
--- a/third_party/blink/public/mojom/payments/payment_app.mojom
+++ b/third_party/blink/public/mojom/payments/payment_app.mojom
@@ -88,10 +88,7 @@
 // This interface is provided to pass a payment handler response from payment
 // request event in renderer side to browser side by calling respondWith().
 interface PaymentHandlerResponseCallback {
-  OnResponseForAbortPayment(bool payment_aborted,
-                            mojo_base.mojom.TimeTicks dispatch_event_time);
-  OnResponseForCanMakePayment(bool can_make_payment,
-                              mojo_base.mojom.TimeTicks dispatch_event_time);
-  OnResponseForPaymentRequest(PaymentHandlerResponse response,
-                              mojo_base.mojom.TimeTicks dispatch_event_time);
+  OnResponseForAbortPayment(bool payment_aborted);
+  OnResponseForCanMakePayment(bool can_make_payment);
+  OnResponseForPaymentRequest(PaymentHandlerResponse response);
 };
diff --git a/third_party/blink/public/platform/web_mouse_event.h b/third_party/blink/public/platform/web_mouse_event.h
index d413a9d..add377b 100644
--- a/third_party/blink/public/platform/web_mouse_event.h
+++ b/third_party/blink/public/platform/web_mouse_event.h
@@ -75,7 +75,6 @@
                                       base::TimeTicks time_stamp_param,
                                       PointerId id_param = kMousePointerId);
 
-  BLINK_PLATFORM_EXPORT WebFloatPoint MovementInRootFrame() const;
   BLINK_PLATFORM_EXPORT WebFloatPoint PositionInRootFrame() const;
 
   // Sets any scaled values to be their computed values and sets |frame_scale_|
diff --git a/third_party/blink/public/web/modules/service_worker/web_service_worker_context_client.h b/third_party/blink/public/web/modules/service_worker/web_service_worker_context_client.h
index cc97d2d..3fc1a2db 100644
--- a/third_party/blink/public/web/modules/service_worker/web_service_worker_context_client.h
+++ b/third_party/blink/public/web/modules/service_worker/web_service_worker_context_client.h
@@ -145,39 +145,31 @@
 
   // Called after an 'activate' event completed.
   virtual void DidHandleActivateEvent(int event_id,
-                                      mojom::ServiceWorkerEventStatus,
-                                      base::TimeTicks event_dispatch_time) {}
+                                      mojom::ServiceWorkerEventStatus) {}
 
   // Called after Background Fetch events (dispatched via
   // WebServiceWorkerContextProxy) are handled by the service worker.
   virtual void DidHandleBackgroundFetchAbortEvent(
       int event_id,
-      mojom::ServiceWorkerEventStatus,
-      base::TimeTicks event_dispatch_time) {}
+      mojom::ServiceWorkerEventStatus) {}
   virtual void DidHandleBackgroundFetchClickEvent(
       int event_id,
-      mojom::ServiceWorkerEventStatus,
-      base::TimeTicks event_dispatch_time) {}
+      mojom::ServiceWorkerEventStatus) {}
   virtual void DidHandleBackgroundFetchFailEvent(
       int event_id,
-      mojom::ServiceWorkerEventStatus,
-      base::TimeTicks event_dispatch_time) {}
+      mojom::ServiceWorkerEventStatus) {}
   virtual void DidHandleBackgroundFetchSuccessEvent(
       int event_id,
-      mojom::ServiceWorkerEventStatus,
-      base::TimeTicks event_dispatch_time) {}
+      mojom::ServiceWorkerEventStatus) {}
 
   // Called after 'cookiechange' events are handled by the service worker.
   virtual void DidHandleCookieChangeEvent(int event_id,
-                                          mojom::ServiceWorkerEventStatus,
-                                          base::TimeTicks event_dispatch_time) {
-  }
+                                          mojom::ServiceWorkerEventStatus) {}
 
   // Called after ExtendableMessageEvent was handled by the service worker.
   virtual void DidHandleExtendableMessageEvent(
       int event_id,
-      mojom::ServiceWorkerEventStatus,
-      base::TimeTicks event_dispatch_time) {}
+      mojom::ServiceWorkerEventStatus) {}
 
   // RespondToFetchEvent* will be called after the service worker returns a
   // response to a FetchEvent, and DidHandleFetchEvent will be called after the
@@ -204,71 +196,56 @@
       base::TimeTicks event_dispatch_time,
       base::TimeTicks respond_with_settled_time) {}
   virtual void DidHandleFetchEvent(int fetch_event_id,
-                                   mojom::ServiceWorkerEventStatus,
-                                   base::TimeTicks event_dispatch_time) {}
+                                   mojom::ServiceWorkerEventStatus) {}
 
   // Called after InstallEvent (dispatched via WebServiceWorkerContextProxy) is
   // handled by the service worker.
   virtual void DidHandleInstallEvent(int install_event_id,
-                                     mojom::ServiceWorkerEventStatus,
-                                     base::TimeTicks event_dispatch_time) {}
+                                     mojom::ServiceWorkerEventStatus) {}
 
   // Called after NotificationClickEvent (dispatched via
   // WebServiceWorkerContextProxy) is handled by the service worker.
   virtual void DidHandleNotificationClickEvent(
       int event_id,
-      mojom::ServiceWorkerEventStatus,
-      base::TimeTicks event_dispatch_time) {}
+      mojom::ServiceWorkerEventStatus) {}
 
   // Called after NotificationCloseEvent (dispatched via
   // WebServiceWorkerContextProxy) is handled by the service worker.
   virtual void DidHandleNotificationCloseEvent(
       int event_id,
-      mojom::ServiceWorkerEventStatus,
-      base::TimeTicks event_dispatch_time) {}
+      mojom::ServiceWorkerEventStatus) {}
 
   // Called after PushEvent (dispatched via WebServiceWorkerContextProxy) is
   // handled by the service worker.
   virtual void DidHandlePushEvent(int push_event_id,
-                                  mojom::ServiceWorkerEventStatus,
-                                  base::TimeTicks event_dispatch_time) {}
+                                  mojom::ServiceWorkerEventStatus) {}
 
   // Called after SyncEvent (dispatched via WebServiceWorkerContextProxy) is
   // handled by the service worker.
   virtual void DidHandleSyncEvent(int sync_event_id,
-                                  mojom::ServiceWorkerEventStatus,
-                                  base::TimeTicks event_dispatch_time) {}
+                                  mojom::ServiceWorkerEventStatus) {}
 
   // RespondToAbortPaymentEvent will be called after the service worker
   // returns a response to a AbortPaymentEvent, and DidHandleAbortPaymentEvent
   // will be called after the end of AbortPaymentEvent's lifecycle.
   // |event_id| is the id that was passed to DispatchAbortPaymentEvent.
-  virtual void RespondToAbortPaymentEvent(int event_id,
-                                          bool abort_payment,
-                                          base::TimeTicks event_dispatch_time) {
-  }
+  virtual void RespondToAbortPaymentEvent(int event_id, bool abort_payment) {}
   // Called after AbortPaymentEvent (dispatched
   // via WebServiceWorkerContextProxy) is handled by the service worker.
   virtual void DidHandleAbortPaymentEvent(int abort_payment_event_id,
-                                          mojom::ServiceWorkerEventStatus,
-                                          base::TimeTicks event_dispatch_time) {
-  }
+                                          mojom::ServiceWorkerEventStatus) {}
 
   // RespondToCanMakePaymentEvent will be called after the service worker
   // returns a response to a CanMakePaymentEvent, and
   // DidHandleCanMakePaymentEvent will be called after the end of
   // CanMakePaymentEvent's lifecycle. |event_id| is the id that was passed
   // to DispatchCanMakePaymentEvent.
-  virtual void RespondToCanMakePaymentEvent(
-      int event_id,
-      bool can_make_payment,
-      base::TimeTicks event_dispatch_time) {}
+  virtual void RespondToCanMakePaymentEvent(int event_id,
+                                            bool can_make_payment) {}
   // Called after CanMakePaymentEvent (dispatched
   // via WebServiceWorkerContextProxy) is handled by the service worker.
-  virtual void DidHandleCanMakePaymentEvent(
-      int payment_request_event_id,
-      mojom::ServiceWorkerEventStatus,
-      base::TimeTicks event_dispatch_time) {}
+  virtual void DidHandleCanMakePaymentEvent(int payment_request_event_id,
+                                            mojom::ServiceWorkerEventStatus) {}
 
   // RespondToPaymentRequestEvent will be called after the service worker
   // returns a response to a PaymentRequestEvent, and
@@ -277,14 +254,11 @@
   // to DispatchPaymentRequestEvent.
   virtual void RespondToPaymentRequestEvent(
       int event_id,
-      const WebPaymentHandlerResponse& response,
-      base::TimeTicks event_dispatch_time) {}
+      const WebPaymentHandlerResponse& response) {}
   // Called after PaymentRequestEvent (dispatched via
   // WebServiceWorkerContextProxy) is handled by the service worker.
-  virtual void DidHandlePaymentRequestEvent(
-      int payment_request_event_id,
-      mojom::ServiceWorkerEventStatus,
-      base::TimeTicks event_dispatch_time) {}
+  virtual void DidHandlePaymentRequestEvent(int payment_request_event_id,
+                                            mojom::ServiceWorkerEventStatus) {}
 
   // Called on the main thread.
   virtual std::unique_ptr<WebServiceWorkerNetworkProvider>
diff --git a/third_party/blink/renderer/bindings/modules/BUILD.gn b/third_party/blink/renderer/bindings/modules/BUILD.gn
index a9cee1c..5399130 100644
--- a/third_party/blink/renderer/bindings/modules/BUILD.gn
+++ b/third_party/blink/renderer/bindings/modules/BUILD.gn
@@ -28,6 +28,8 @@
     "//third_party/blink/renderer/modules/device_orientation/device_orientation_event.idl",
     "//third_party/blink/renderer/modules/encryptedmedia/media_encrypted_event.idl",
     "//third_party/blink/renderer/modules/encryptedmedia/media_key_message_event.idl",
+    "//third_party/blink/renderer/modules/gamepad/gamepad_axis_event.idl",
+    "//third_party/blink/renderer/modules/gamepad/gamepad_button_event.idl",
     "//third_party/blink/renderer/modules/gamepad/gamepad_event.idl",
     "//third_party/blink/renderer/modules/indexeddb/idb_version_change_event.idl",
     "//third_party/blink/renderer/modules/mediarecorder/blob_event.idl",
diff --git a/third_party/blink/renderer/bindings/modules/v8/v8_binding_for_modules.cc b/third_party/blink/renderer/bindings/modules/v8/v8_binding_for_modules.cc
index 10e94a4..5935418 100644
--- a/third_party/blink/renderer/bindings/modules/v8/v8_binding_for_modules.cc
+++ b/third_party/blink/renderer/bindings/modules/v8/v8_binding_for_modules.cc
@@ -478,7 +478,7 @@
 // the conceptual description in the spec states that the key produced by the
 // key generator is injected into the value before it is written to IndexedDB.
 //
-// We cannot implementing the spec's conceptual description. We need to assign
+// We cannot implement the spec's conceptual description. We need to assign
 // primary keys in the browser process, to ensure that multiple renderer
 // processes talking to the same database receive sequential keys. At the same
 // time, we want the value serialization code to live in the renderer process,
diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc
index 81041f8..5d6ac01 100644
--- a/third_party/blink/renderer/core/dom/document.cc
+++ b/third_party/blink/renderer/core/dom/document.cc
@@ -2744,9 +2744,12 @@
   layout_view_->Compositor()->SetNeedsCompositingUpdate(
       kCompositingUpdateAfterCompositingInputChange);
 
-  DCHECK(!firstChild());
-  if (AXObjectCache* cache = ExistingAXObjectCache())
-    cache->UpdateCacheAfterNodeIsAttached(this);
+  {
+    ReattachLegacyLayoutObjectList legacy_layout_objects(*this);
+    AttachContext context;
+    ContainerNode::AttachLayoutTree(context);
+    legacy_layout_objects.ForceLegacyLayoutIfNeeded();
+  }
 
   // The TextAutosizer can't update layout view info while the Document is
   // detached, so update now in case anything changed.
diff --git a/third_party/blink/renderer/core/events/web_input_event_conversion_test.cc b/third_party/blink/renderer/core/events/web_input_event_conversion_test.cc
index 20ebc34..18ca509 100644
--- a/third_party/blink/renderer/core/events/web_input_event_conversion_test.cc
+++ b/third_party/blink/renderer/core/events/web_input_event_conversion_test.cc
@@ -148,10 +148,8 @@
     EXPECT_EQ(15, transformed_event.PositionInScreen().x);
     EXPECT_EQ(15, transformed_event.PositionInScreen().y);
 
-    IntPoint movement =
-        FlooredIntPoint(transformed_event.MovementInRootFrame());
-    EXPECT_EQ(5, movement.X());
-    EXPECT_EQ(5, movement.Y());
+    EXPECT_EQ(15, transformed_event.movement_x);
+    EXPECT_EQ(15, transformed_event.movement_y);
   }
 
   {
@@ -322,8 +320,8 @@
     EXPECT_FLOAT_EQ(3.5f, transformed_event.PositionInWidget().y);
     EXPECT_FLOAT_EQ(2.2f, transformed_event.width);
     EXPECT_FLOAT_EQ(3.3f, transformed_event.height);
-    EXPECT_EQ(10, transformed_event.movement_x);
-    EXPECT_EQ(10, transformed_event.movement_y);
+    EXPECT_EQ(30, transformed_event.movement_x);
+    EXPECT_EQ(30, transformed_event.movement_y);
   }
 }
 
@@ -363,11 +361,8 @@
     EXPECT_FLOAT_EQ(30, position.Y());
     EXPECT_EQ(90, transformed_event.PositionInScreen().x);
     EXPECT_EQ(90, transformed_event.PositionInScreen().y);
-
-    IntPoint movement =
-        FlooredIntPoint(transformed_event.MovementInRootFrame());
-    EXPECT_EQ(20, movement.X());
-    EXPECT_EQ(20, movement.Y());
+    EXPECT_EQ(60, transformed_event.movement_x);
+    EXPECT_EQ(60, transformed_event.movement_y);
   }
 
   {
@@ -400,10 +395,8 @@
     EXPECT_EQ(90, coalescedevents[0].PositionInScreen().x);
     EXPECT_EQ(90, coalescedevents[0].PositionInScreen().y);
 
-    IntPoint movement =
-        FlooredIntPoint(coalescedevents[0].MovementInRootFrame());
-    EXPECT_EQ(20, movement.X());
-    EXPECT_EQ(20, movement.Y());
+    EXPECT_EQ(60, coalescedevents[0].movement_x);
+    EXPECT_EQ(60, coalescedevents[0].movement_y);
 
     position = coalescedevents[1].PositionInRootFrame();
     EXPECT_FLOAT_EQ(30, position.X());
@@ -411,9 +404,8 @@
     EXPECT_EQ(90, coalescedevents[1].PositionInScreen().x);
     EXPECT_EQ(120, coalescedevents[1].PositionInScreen().y);
 
-    movement = FlooredIntPoint(coalescedevents[1].MovementInRootFrame());
-    EXPECT_EQ(20, movement.X());
-    EXPECT_EQ(10, movement.Y());
+    EXPECT_EQ(60, coalescedevents[1].movement_x);
+    EXPECT_EQ(30, coalescedevents[1].movement_y);
   }
 
   {
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
index d88e0d2..cac9f082 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -3265,6 +3265,10 @@
   elastic_overscroll_ += FloatSize(args.elastic_overscroll_delta.x(),
                                    args.elastic_overscroll_delta.y());
   UpdateBrowserControlsConstraint(args.browser_controls_constraint);
+
+  if (RuntimeEnabledFeatures::NoHoverDuringScrollEnabled() &&
+      args.scroll_gesture_did_end)
+    MainFrameImpl()->GetFrame()->GetEventHandler().RecomputeMouseHoverState();
 }
 
 void WebViewImpl::RecordWheelAndTouchScrollingCount(
diff --git a/third_party/blink/renderer/core/exported/web_view_test.cc b/third_party/blink/renderer/core/exported/web_view_test.cc
index d41000b23..e011990 100644
--- a/third_party/blink/renderer/core/exported/web_view_test.cc
+++ b/third_party/blink/renderer/core/exported/web_view_test.cc
@@ -265,9 +265,8 @@
         web_view_helper_.GetLayerTreeView();
     layer_tree_view->SetViewportSizeAndScale(
         static_cast<gfx::Size>(size), /*device_scale_factor=*/1.f,
-        layer_tree_view->layer_tree_host()->local_surface_id_from_parent(),
         layer_tree_view->layer_tree_host()
-            ->local_surface_id_allocation_time_from_parent());
+            ->local_surface_id_allocation_from_parent());
   }
 
   std::string RegisterMockedHttpURLLoad(const std::string& file_name) {
diff --git a/third_party/blink/renderer/core/fetch/data_pipe_bytes_consumer.cc b/third_party/blink/renderer/core/fetch/data_pipe_bytes_consumer.cc
index fb3eaf8..9769aa7 100644
--- a/third_party/blink/renderer/core/fetch/data_pipe_bytes_consumer.cc
+++ b/third_party/blink/renderer/core/fetch/data_pipe_bytes_consumer.cc
@@ -143,7 +143,6 @@
 
 void DataPipeBytesConsumer::Cancel() {
   DCHECK(!is_in_two_phase_read_);
-  ClearClient();
   ClearDataPipe();
   SignalComplete();
 }
diff --git a/third_party/blink/renderer/core/fetch/form_data_bytes_consumer.cc b/third_party/blink/renderer/core/fetch/form_data_bytes_consumer.cc
index 7accd23..bf7ffb6 100644
--- a/third_party/blink/renderer/core/fetch/form_data_bytes_consumer.cc
+++ b/third_party/blink/renderer/core/fetch/form_data_bytes_consumer.cc
@@ -7,7 +7,7 @@
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/renderer/core/execution_context/execution_context.h"
 #include "third_party/blink/renderer/core/fetch/blob_bytes_consumer.h"
-#include "third_party/blink/renderer/core/fetch/data_pipe_bytes_consumer.h"
+#include "third_party/blink/renderer/core/fetch/bytes_consumer_for_data_consumer_handle.h"
 #include "third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h"
 #include "third_party/blink/renderer/core/typed_arrays/dom_array_buffer_view.h"
 #include "third_party/blink/renderer/platform/blob/blob_data.h"
@@ -199,12 +199,11 @@
                 std::move(pipe_producer_handle),
                 WTF::Bind(&DataPipeAndDataBytesConsumer::DataPipeGetterCallback,
                           WrapWeakPersistent(this)));
-        DataPipeBytesConsumer::CompletionNotifier* completion_notifier =
-            nullptr;
-        data_pipe_consumer_ = new DataPipeBytesConsumer(
-            execution_context_, std::move(pipe_consumer_handle),
-            &completion_notifier);
-        completion_notifier_ = completion_notifier;
+        std::unique_ptr<WebDataConsumerHandle> consumer_handle =
+            Platform::Current()->CreateDataConsumerHandle(
+                std::move(pipe_consumer_handle));
+        data_pipe_consumer_ = new BytesConsumerForDataConsumerHandle(
+            execution_context_, std::move(consumer_handle));
         if (client_)
           data_pipe_consumer_->SetClient(client_);
       }
@@ -225,7 +224,6 @@
         // We're done. Move on to the next element.
         was_data_pipe_getter_callback_called_ = false;
         data_pipe_consumer_ = nullptr;
-        completion_notifier_ = nullptr;
         ++iter_;
         return BeginRead(buffer, available);
       }
@@ -323,7 +321,6 @@
     visitor->Trace(client_);
     visitor->Trace(simple_consumer_);
     visitor->Trace(data_pipe_consumer_);
-    visitor->Trace(completion_notifier_);
     BytesConsumer::Trace(visitor);
   }
 
@@ -331,28 +328,19 @@
   void DataPipeGetterCallback(int32_t status, uint64_t size) {
     switch (state_) {
       case PublicState::kErrored:
-        // The error should have already been propagated to the notifier.
-        DCHECK(!completion_notifier_);
-        DCHECK(!data_pipe_consumer_);
         return;
       case PublicState::kClosed:
-        // The data_pipe_consumer_ should already be cleaned up.
-        DCHECK(!completion_notifier_);
-        DCHECK(!data_pipe_consumer_);
         return;
       case PublicState::kReadableOrWaiting:
         break;
     }
 
-    DCHECK(completion_notifier_);
+    DCHECK(data_pipe_consumer_);
     auto client = client_;
-    if (status != 0) {
-      // 0 is net::OK.
+    if (status != 0)  // 0 is net::OK.
       SetError();
-    } else {
+    else
       was_data_pipe_getter_callback_called_ = true;
-      completion_notifier_->SignalComplete();
-    }
 
     if (client)
       client->OnStateChange();
@@ -365,11 +353,7 @@
     state_ = PublicState::kClosed;
     ClearClient();
     simple_consumer_ = nullptr;
-    if (data_pipe_consumer_) {
-      data_pipe_consumer_->Cancel();
-      data_pipe_consumer_ = nullptr;
-      completion_notifier_ = nullptr;
-    }
+    data_pipe_consumer_ = nullptr;
   }
 
   void SetError() {
@@ -380,11 +364,7 @@
     error_ = Error("error");
     ClearClient();
     simple_consumer_ = nullptr;
-    if (completion_notifier_) {
-      completion_notifier_->SignalError(error_);
-      completion_notifier_ = nullptr;
-      data_pipe_consumer_ = nullptr;
-    }
+    data_pipe_consumer_ = nullptr;
   }
 
   Member<ExecutionContext> execution_context_;
@@ -394,8 +374,7 @@
   Error error_;
   Member<BytesConsumer::Client> client_;
   Member<SimpleFormDataBytesConsumer> simple_consumer_;
-  Member<DataPipeBytesConsumer> data_pipe_consumer_;
-  Member<DataPipeBytesConsumer::CompletionNotifier> completion_notifier_;
+  Member<BytesConsumerForDataConsumerHandle> data_pipe_consumer_;
   bool was_data_pipe_getter_callback_called_ = false;
 };
 
diff --git a/third_party/blink/renderer/core/input/event_handler.cc b/third_party/blink/renderer/core/input/event_handler.cc
index 7850aff2..e348758 100644
--- a/third_party/blink/renderer/core/input/event_handler.cc
+++ b/third_party/blink/renderer/core/input/event_handler.cc
@@ -1238,6 +1238,10 @@
   scroll_manager_->AnimateSnapFling(monotonic_time);
 }
 
+void EventHandler::RecomputeMouseHoverState() {
+  mouse_event_manager_->RecomputeMouseHoverState();
+}
+
 void EventHandler::SetCapturingMouseEventsNode(Node* n) {
   CaptureMouseEventsToWidget(n);
   capturing_mouse_events_node_ = n;
@@ -2028,6 +2032,11 @@
 
 void EventHandler::MayUpdateHoverWhenContentUnderMouseChanged(
     MouseEventManager::UpdateHoverReason update_hover_reason) {
+  if (update_hover_reason ==
+          MouseEventManager::UpdateHoverReason::kScrollOffsetChanged &&
+      RuntimeEnabledFeatures::NoHoverDuringScrollEnabled()) {
+    return;
+  }
   mouse_event_manager_->MayUpdateHoverWhenContentUnderMouseChanged(
       update_hover_reason);
 }
diff --git a/third_party/blink/renderer/core/input/event_handler.h b/third_party/blink/renderer/core/input/event_handler.h
index e5a0c96..d268bfd 100644
--- a/third_party/blink/renderer/core/input/event_handler.h
+++ b/third_party/blink/renderer/core/input/event_handler.h
@@ -286,6 +286,8 @@
 
   void AnimateSnapFling(base::TimeTicks monotonic_time);
 
+  void RecomputeMouseHoverState();
+
  private:
   enum NoCursorChangeType { kNoCursorChange };
 
diff --git a/third_party/blink/renderer/core/input/mouse_event_manager.cc b/third_party/blink/renderer/core/input/mouse_event_manager.cc
index c12b9425..8357c59f62 100644
--- a/third_party/blink/renderer/core/input/mouse_event_manager.cc
+++ b/third_party/blink/renderer/core/input/mouse_event_manager.cc
@@ -350,6 +350,10 @@
   TRACE_EVENT0("input", "MouseEventManager::fakeMouseMoveEventTimerFired");
   DCHECK(timer == &fake_mouse_move_event_timer_);
 
+  RecomputeMouseHoverState();
+}
+
+void MouseEventManager::RecomputeMouseHoverState() {
   if (is_mouse_position_unknown_)
     return;
 
diff --git a/third_party/blink/renderer/core/input/mouse_event_manager.h b/third_party/blink/renderer/core/input/mouse_event_manager.h
index cf6f92d..96902911c 100644
--- a/third_party/blink/renderer/core/input/mouse_event_manager.h
+++ b/third_party/blink/renderer/core/input/mouse_event_manager.h
@@ -154,6 +154,8 @@
 
   bool FakeMouseMovePending() const;
 
+  void RecomputeMouseHoverState();
+
  private:
   class MouseEventBoundaryEventDispatcher : public BoundaryEventDispatcher {
    public:
diff --git a/third_party/blink/renderer/core/input/pointer_event_manager_test.cc b/third_party/blink/renderer/core/input/pointer_event_manager_test.cc
index b286e727..aed4ee7 100644
--- a/third_party/blink/renderer/core/input/pointer_event_manager_test.cc
+++ b/third_party/blink/renderer/core/input/pointer_event_manager_test.cc
@@ -66,6 +66,8 @@
     last_screen_y_ = pointer_event->screenY();
     last_width_ = pointer_event->width();
     last_height_ = pointer_event->height();
+    last_movement_x_ = pointer_event->movementX();
+    last_movement_y_ = pointer_event->movementY();
   }
 
   double last_client_x_ = 0;
@@ -76,6 +78,8 @@
   double last_screen_y_ = 0;
   double last_width_ = 0;
   double last_height_ = 0;
+  double last_movement_x_ = 0;
+  double last_movement_y_ = 0;
 
  private:
   PointerEventCoordinateListenerCallback()
@@ -199,6 +203,8 @@
   ASSERT_EQ(callback->last_screen_y_, 50);
   ASSERT_EQ(callback->last_width_, 8);
   ASSERT_EQ(callback->last_height_, 12);
+  ASSERT_EQ(callback->last_movement_x_, 10);
+  ASSERT_EQ(callback->last_movement_y_, 10);
 }
 
 }  // namespace blink
diff --git a/third_party/blink/renderer/core/input/scroll_manager.cc b/third_party/blink/renderer/core/input/scroll_manager.cc
index f0baacd..c09b716 100644
--- a/third_party/blink/renderer/core/input/scroll_manager.cc
+++ b/third_party/blink/renderer/core/input/scroll_manager.cc
@@ -607,6 +607,8 @@
   }
 
   ClearGestureScrollState();
+  if (RuntimeEnabledFeatures::NoHoverDuringScrollEnabled())
+    frame_->GetEventHandler().RecomputeMouseHoverState();
   return WebInputEventResult::kNotHandled;
 }
 
diff --git a/third_party/blink/renderer/core/layout/flexible_box_algorithm.cc b/third_party/blink/renderer/core/layout/flexible_box_algorithm.cc
index 23a793f..78ceea5 100644
--- a/third_party/blink/renderer/core/layout/flexible_box_algorithm.cc
+++ b/third_party/blink/renderer/core/layout/flexible_box_algorithm.cc
@@ -55,8 +55,8 @@
       << "Use LayoutUnit::Max() for no max size";
 }
 
-bool FlexItem::HasOrthogonalFlow() const {
-  return algorithm->IsHorizontalFlow() != box->IsHorizontalWritingMode();
+bool FlexItem::MainAxisIsInlineAxis() const {
+  return algorithm->IsHorizontalFlow() == box->IsHorizontalWritingMode();
 }
 
 LayoutUnit FlexItem::FlowAwareMarginStart() const {
@@ -146,13 +146,14 @@
   // relying on legacy in this method.
   DCHECK_EQ(Alignment(), ItemPosition::kStretch);
   LayoutFlexibleBox* flexbox = ToLayoutFlexibleBox(box->Parent());
-  if (!HasOrthogonalFlow() && box->StyleRef().LogicalHeight().IsAuto()) {
+  if (MainAxisIsInlineAxis() && box->StyleRef().LogicalHeight().IsAuto()) {
     LayoutUnit stretched_logical_height =
         std::max(box->BorderAndPaddingLogicalHeight(),
                  line_cross_axis_extent - CrossAxisMarginExtent());
     cross_axis_size = box->ConstrainLogicalHeightByMinMax(
         stretched_logical_height, box->IntrinsicContentLogicalHeight());
-  } else if (HasOrthogonalFlow() && box->StyleRef().LogicalWidth().IsAuto()) {
+  } else if (!MainAxisIsInlineAxis() &&
+             box->StyleRef().LogicalWidth().IsAuto()) {
     LayoutUnit child_width = (line_cross_axis_extent - CrossAxisMarginExtent())
                                  .ClampNegativeToZero();
     // This probably doesn't work in NG because flexbox might not yet know its
diff --git a/third_party/blink/renderer/core/layout/flexible_box_algorithm.h b/third_party/blink/renderer/core/layout/flexible_box_algorithm.h
index 3fcb14b4..6018164f5 100644
--- a/third_party/blink/renderer/core/layout/flexible_box_algorithm.h
+++ b/third_party/blink/renderer/core/layout/flexible_box_algorithm.h
@@ -97,7 +97,7 @@
 
   ItemPosition Alignment() const;
 
-  bool HasOrthogonalFlow() const;
+  bool MainAxisIsInlineAxis() const;
 
   LayoutUnit FlowAwareMarginStart() const;
   LayoutUnit FlowAwareMarginEnd() const;
@@ -152,6 +152,11 @@
     return vector_->at(start_ + i);
   }
 
+  FlexItem* begin() { return vector_->begin() + start_; }
+  const FlexItem* begin() const { return vector_->begin() + start_; }
+  FlexItem* end() { return vector_->begin() + end_; }
+  const FlexItem* end() const { return vector_->begin() + end_; }
+
  private:
   FlexItemVector* vector_;
   wtf_size_t start_;
diff --git a/third_party/blink/renderer/core/layout/layout_flexible_box.cc b/third_party/blink/renderer/core/layout/layout_flexible_box.cc
index 0edc000..091b5b31 100644
--- a/third_party/blink/renderer/core/layout/layout_flexible_box.cc
+++ b/third_party/blink/renderer/core/layout/layout_flexible_box.cc
@@ -202,12 +202,12 @@
   if (!baseline_child)
     return LayoutUnit(-1);
 
-  if (!IsColumnFlow() && HasOrthogonalFlow(*baseline_child)) {
+  if (!IsColumnFlow() && !MainAxisIsInlineAxis(*baseline_child)) {
     // TODO(cbiesinger): Should LogicalTop here be LogicalLeft?
     return CrossAxisExtentForChild(*baseline_child) +
            baseline_child->LogicalTop();
   }
-  if (IsColumnFlow() && !HasOrthogonalFlow(*baseline_child)) {
+  if (IsColumnFlow() && MainAxisIsInlineAxis(*baseline_child)) {
     return MainAxisExtentForChild(*baseline_child) +
            baseline_child->LogicalTop();
   }
@@ -408,8 +408,14 @@
                   max_child_logical_bottom + PaddingAfter());
 }
 
-bool LayoutFlexibleBox::HasOrthogonalFlow(const LayoutBox& child) const {
-  return IsHorizontalFlow() != child.IsHorizontalWritingMode();
+bool LayoutFlexibleBox::MainAxisIsInlineAxis(const LayoutBox& child) const {
+  // If we have a horizontal flow, that means the main size is the width.
+  // That's the inline size for horizontal writing modes, and the block
+  // size in vertical writing modes. For a vertical flow, main size is the
+  // height, so it's the inverse. So we need the inline size if we have a
+  // horizontal flow and horizontal writing mode, or vertical flow and vertical
+  // writing mode. Otherwise we need the block size.
+  return IsHorizontalFlow() == child.IsHorizontalWritingMode();
 }
 
 bool LayoutFlexibleBox::IsColumnFlow() const {
@@ -452,7 +458,7 @@
 LayoutUnit LayoutFlexibleBox::ChildIntrinsicLogicalHeight(
     const LayoutBox& child) const {
   // This should only be called if the logical height is the cross size
-  DCHECK(!HasOrthogonalFlow(child));
+  DCHECK(MainAxisIsInlineAxis(child));
   if (NeedToStretchChildLogicalHeight(child)) {
     LayoutUnit child_intrinsic_content_logical_height;
     if (!child.ShouldApplySizeContainment()) {
@@ -472,7 +478,7 @@
 LayoutUnit LayoutFlexibleBox::ChildIntrinsicLogicalWidth(
     const LayoutBox& child) const {
   // This should only be called if the logical width is the cross size
-  DCHECK(HasOrthogonalFlow(child));
+  DCHECK(!MainAxisIsInlineAxis(child));
   // If our height is auto, make sure that our returned height is unaffected by
   // earlier layouts by returning the max preferred logical width
   if (!CrossAxisLengthIsDefinite(child, child.StyleRef().LogicalWidth()))
@@ -483,8 +489,8 @@
 
 LayoutUnit LayoutFlexibleBox::CrossAxisIntrinsicExtentForChild(
     const LayoutBox& child) const {
-  return HasOrthogonalFlow(child) ? ChildIntrinsicLogicalWidth(child)
-                                  : ChildIntrinsicLogicalHeight(child);
+  return MainAxisIsInlineAxis(child) ? ChildIntrinsicLogicalHeight(child)
+                                     : ChildIntrinsicLogicalWidth(child);
 }
 
 LayoutUnit LayoutFlexibleBox::MainAxisExtentForChild(
@@ -529,13 +535,7 @@
     const LayoutBox& child,
     SizeType size_type,
     const Length& size) const {
-  // If we have a horizontal flow, that means the main size is the width.
-  // That's the logical width for horizontal writing modes, and the logical
-  // height in vertical writing modes. For a vertical flow, main size is the
-  // height, so it's the inverse. So we need the logical width if we have a
-  // horizontal flow and horizontal writing mode, or vertical flow and vertical
-  // writing mode. Otherwise we need the logical height.
-  if (IsHorizontalFlow() != child.StyleRef().IsHorizontalWritingMode()) {
+  if (!MainAxisIsInlineAxis(child)) {
     // We don't have to check for "auto" here - computeContentLogicalHeight
     // will just return -1 for that case anyway. It's safe to access
     // scrollbarLogicalHeight here because ComputeNextFlexLine will have
@@ -654,10 +654,10 @@
     cross_size = LayoutUnit(cross_size_length.Value());
   } else {
     DCHECK(cross_size_length.IsPercentOrCalc());
-    cross_size = HasOrthogonalFlow(child)
-                     ? AdjustBorderBoxLogicalWidthForBoxSizing(
-                           ValueForLength(cross_size_length, ContentWidth()))
-                     : child.ComputePercentageLogicalHeight(cross_size_length);
+    cross_size = MainAxisIsInlineAxis(child)
+                     ? child.ComputePercentageLogicalHeight(cross_size_length)
+                     : AdjustBorderBoxLogicalWidthForBoxSizing(
+                           ValueForLength(cross_size_length, ContentWidth()));
   }
 
   const LayoutSize& child_intrinsic_size = child.IntrinsicSize();
@@ -705,7 +705,7 @@
   if (length.IsAuto())
     return false;
   if (length.IsPercentOrCalc()) {
-    if (HasOrthogonalFlow(child) ||
+    if (!MainAxisIsInlineAxis(child) ||
         has_definite_height_ == SizeDefiniteness::kDefinite)
       return true;
     if (has_definite_height_ == SizeDefiniteness::kIndefinite)
@@ -723,10 +723,10 @@
 void LayoutFlexibleBox::CacheChildMainSize(const LayoutBox& child) {
   DCHECK(!child.NeedsLayout());
   LayoutUnit main_size;
-  if (HasOrthogonalFlow(child))
-    main_size = child.LogicalHeight();
-  else
+  if (MainAxisIsInlineAxis(child))
     main_size = child.MaxPreferredLogicalWidth();
+  else
+    main_size = child.LogicalHeight();
   intrinsic_size_along_main_axis_.Set(&child, main_size);
   relaid_out_children_.insert(&child);
 }
@@ -784,7 +784,11 @@
   // width of the child. For the logical width axis we just use the preferred
   // width; for the height we need to lay out the child.
   LayoutUnit main_axis_extent;
-  if (HasOrthogonalFlow(child)) {
+  if (MainAxisIsInlineAxis(child)) {
+    // We don't need to add scrollbarLogicalWidth here because the preferred
+    // width includes the scrollbar, even for overflow: auto.
+    main_axis_extent = child.MaxPreferredLogicalWidth();
+  } else {
     if (child_layout_type == kNeverLayout)
       return LayoutUnit();
 
@@ -796,10 +800,6 @@
       CacheChildMainSize(child);
     }
     main_axis_extent = intrinsic_size_along_main_axis_.at(&child);
-  } else {
-    // We don't need to add scrollbarLogicalWidth here because the preferred
-    // width includes the scrollbar, even for overflow: auto.
-    main_axis_extent = child.MaxPreferredLogicalWidth();
   }
   DCHECK_GE(main_axis_extent - main_axis_border_and_padding, LayoutUnit())
       << main_axis_extent << " - " << main_axis_border_and_padding;
@@ -1046,9 +1046,9 @@
     return false;
 
   // Here we implement https://drafts.csswg.org/css-flexbox/#algo-stretch
-  if (HasOrthogonalFlow(child) && child.HasOverrideLogicalWidth())
+  if (!MainAxisIsInlineAxis(child) && child.HasOverrideLogicalWidth())
     return true;
-  if (!HasOrthogonalFlow(child) && child.HasOverrideLogicalHeight())
+  if (MainAxisIsInlineAxis(child) && child.HasOverrideLogicalHeight())
     return true;
 
   // We don't currently implement the optimization from
@@ -1069,14 +1069,14 @@
   if (!MainAxisLengthIsDefinite(child, Length(0, kPercent)))
     return false;
 
-  if (HasOrthogonalFlow(child))
-    return child.HasOverrideLogicalHeight();
-  return child.HasOverrideLogicalWidth();
+  if (MainAxisIsInlineAxis(child))
+    return child.HasOverrideLogicalWidth();
+  return child.HasOverrideLogicalHeight();
 }
 
 bool LayoutFlexibleBox::UseOverrideLogicalHeightForPerentageResolution(
     const LayoutBox& child) const {
-  if (!HasOrthogonalFlow(child))
+  if (MainAxisIsInlineAxis(child))
     return CrossSizeIsDefiniteForPercentageResolution(child);
   return MainSizeIsDefiniteForPercentageResolution(child);
 }
@@ -1187,11 +1187,10 @@
 }
 
 void LayoutFlexibleBox::SetOverrideMainAxisContentSizeForChild(FlexItem& item) {
-  // child_preferred_size includes scrollbar width.
-  if (HasOrthogonalFlow(*item.box)) {
-    item.box->SetOverrideLogicalHeight(item.FlexedBorderBoxSize());
-  } else {
+  if (MainAxisIsInlineAxis(*item.box)) {
     item.box->SetOverrideLogicalWidth(item.FlexedBorderBoxSize());
+  } else {
+    item.box->SetOverrideLogicalHeight(item.FlexedBorderBoxSize());
   }
 }
 
@@ -1491,11 +1490,8 @@
        ++line_number) {
     FlexLine& line_context = line_contexts[line_number];
     line_context.cross_axis_offset += line_offset;
-    for (wtf_size_t child_number = 0;
-         child_number < line_context.line_items.size(); ++child_number) {
-      FlexItem& flex_item = line_context.line_items[child_number];
+    for (FlexItem& flex_item : line_context.line_items)
       AdjustAlignmentForChild(*flex_item.box, line_offset);
-    }
 
     if (align_content.Distribution() == ContentDistributionType::kStretch &&
         available_cross_axis_space > 0)
@@ -1519,6 +1515,7 @@
 void LayoutFlexibleBox::AlignChildren(Vector<FlexLine>& line_contexts) {
   // Keep track of the space between the baseline edge and the after edge of
   // the box for each line.
+  // TODO(cbiesinger): This should be stored in FlexLine
   Vector<LayoutUnit> min_margin_after_baselines;
 
   for (FlexLine& line_context : line_contexts) {
@@ -1526,9 +1523,7 @@
     LayoutUnit line_cross_axis_extent = line_context.cross_axis_extent;
     LayoutUnit max_ascent = line_context.max_ascent;
 
-    for (wtf_size_t child_number = 0;
-         child_number < line_context.line_items.size(); ++child_number) {
-      FlexItem& flex_item = line_context.line_items[child_number];
+    for (FlexItem& flex_item : line_context.line_items) {
       DCHECK(!flex_item.box->IsOutOfFlowPositioned());
 
       if (UpdateAutoMarginsInCrossAxis(
@@ -1564,14 +1559,11 @@
   // wrap-reverse flips the cross axis start and end. For baseline alignment,
   // this means we need to align the after edge of baseline elements with the
   // after edge of the flex line.
-  for (wtf_size_t line_number = 0; line_number < line_contexts.size();
-       ++line_number) {
-    const FlexLine& line_context = line_contexts[line_number];
+  wtf_size_t line_number = 0;
+  for (FlexLine& line_context : line_contexts) {
     LayoutUnit min_margin_after_baseline =
-        min_margin_after_baselines[line_number];
-    for (wtf_size_t child_number = 0;
-         child_number < line_context.line_items.size(); ++child_number) {
-      const FlexItem& flex_item = line_context.line_items[child_number];
+        min_margin_after_baselines[line_number++];
+    for (FlexItem& flex_item : line_context.line_items) {
       if (flex_item.Alignment() == ItemPosition::kBaseline &&
           !flex_item.HasAutoMarginsInCrossAxis() && min_margin_after_baseline)
         AdjustAlignmentForChild(*flex_item.box, min_margin_after_baseline);
@@ -1581,7 +1573,7 @@
 
 void LayoutFlexibleBox::ApplyStretchAlignmentToChild(FlexItem& flex_item) {
   LayoutBox& child = *flex_item.box;
-  if (!flex_item.HasOrthogonalFlow() &&
+  if (flex_item.MainAxisIsInlineAxis() &&
       child.StyleRef().LogicalHeight().IsAuto()) {
     // FIXME: Can avoid laying out here in some cases. See
     // https://webkit.org/b/87905.
@@ -1611,7 +1603,7 @@
       child.SetIntrinsicContentLogicalHeight(
           child_intrinsic_content_logical_height);
     }
-  } else if (flex_item.HasOrthogonalFlow() &&
+  } else if (!flex_item.MainAxisIsInlineAxis() &&
              child.StyleRef().LogicalWidth().IsAuto()) {
     if (flex_item.cross_axis_size != child.LogicalWidth()) {
       child.SetOverrideLogicalWidth(flex_item.cross_axis_size);
@@ -1627,9 +1619,7 @@
 
   LayoutUnit cross_extent = CrossAxisExtent();
   for (const FlexLine& line_context : line_contexts) {
-    for (wtf_size_t child_number = 0;
-         child_number < line_context.line_items.size(); ++child_number) {
-      const FlexItem& flex_item = line_context.line_items[child_number];
+    for (const FlexItem& flex_item : line_context.line_items) {
       DCHECK(!flex_item.box->IsOutOfFlowPositioned());
 
       LayoutPoint location = FlowAwareLocationForChild(*flex_item.box);
@@ -1646,9 +1636,7 @@
     LayoutUnit cross_axis_start_edge) {
   LayoutUnit content_extent = CrossAxisContentExtent();
   for (const FlexLine& line_context : line_contexts) {
-    for (wtf_size_t child_number = 0;
-         child_number < line_context.line_items.size(); ++child_number) {
-      const FlexItem& flex_item = line_context.line_items[child_number];
+    for (const FlexItem& flex_item : line_context.line_items) {
       LayoutUnit line_cross_axis_extent = line_context.cross_axis_extent;
       LayoutUnit original_offset =
           line_context.cross_axis_offset - cross_axis_start_edge;
diff --git a/third_party/blink/renderer/core/layout/layout_flexible_box.h b/third_party/blink/renderer/core/layout/layout_flexible_box.h
index 79af885..31c8dbfb 100644
--- a/third_party/blink/renderer/core/layout/layout_flexible_box.h
+++ b/third_party/blink/renderer/core/layout/layout_flexible_box.h
@@ -109,7 +109,7 @@
 
   enum class SizeDefiniteness { kDefinite, kIndefinite, kUnknown };
 
-  bool HasOrthogonalFlow(const LayoutBox& child) const;
+  bool MainAxisIsInlineAxis(const LayoutBox& child) const;
   bool IsColumnFlow() const;
   bool IsLeftToRightFlow() const;
   bool IsMultiline() const;
diff --git a/third_party/blink/renderer/core/layout/layout_text.cc b/third_party/blink/renderer/core/layout/layout_text.cc
index 3e47694..c493b46 100644
--- a/third_party/blink/renderer/core/layout/layout_text.cc
+++ b/third_party/blink/renderer/core/layout/layout_text.cc
@@ -1603,10 +1603,39 @@
           // If "line-height" is "normal" we might need to recompute the
           // baseline which is not straight forward.
           !StyleRef().LineHeight().IsNegative() &&
-          // We would need to recompute the position if "direction" is "rtl" or
-          // "text-align" is not the default one.
+          // We would need to recompute the position if "direction" is "rtl".
           StyleRef().IsLeftToRightDirection() &&
-          (StyleRef().GetTextAlign(true) == ETextAlign::kStart));
+          // We would need to layout the text if it is justified.
+          (StyleRef().GetTextAlign(true) != ETextAlign::kJustify));
+}
+
+void LayoutText::SetFirstTextBoxLogicalLeft(float text_width) const {
+  DCHECK(FirstTextBox());
+  DCHECK(ContainingBlock());
+  DCHECK(StyleRef().IsLeftToRightDirection());
+
+  LayoutUnit offset_left = ContainingBlock()->LogicalLeftOffsetForContent();
+  LayoutUnit available_space = ContainingBlock()->ContentLogicalWidth();
+
+  switch (StyleRef().GetTextAlign(true)) {
+    case ETextAlign::kLeft:
+    case ETextAlign::kWebkitLeft:
+    case ETextAlign::kJustify:
+    case ETextAlign::kStart:
+      // Do nothing.
+      break;
+    case ETextAlign::kRight:
+    case ETextAlign::kWebkitRight:
+    case ETextAlign::kEnd:
+      offset_left += available_space - text_width;
+      break;
+    case ETextAlign::kCenter:
+    case ETextAlign::kWebkitCenter:
+      offset_left += (available_space - text_width) / 2;
+      break;
+  }
+
+  FirstTextBox()->SetLogicalLeft(offset_left);
 }
 
 void LayoutText::SetTextWithOffset(scoped_refptr<StringImpl> text,
@@ -1634,6 +1663,7 @@
     if (text_width <= ContainingBlock()->ContentLogicalWidth()) {
       FirstTextBox()->ManuallySetStartLenAndLogicalWidth(
           offset, text->length(), LayoutUnit(text_width));
+      SetFirstTextBoxLogicalLeft(text_width);
       SetText(std::move(text), force, true);
       lines_dirty_ = false;
       valid_ng_items_ = false;
diff --git a/third_party/blink/renderer/core/layout/layout_text.h b/third_party/blink/renderer/core/layout/layout_text.h
index 72d263f8..cfefdc2e 100644
--- a/third_party/blink/renderer/core/layout/layout_text.h
+++ b/third_party/blink/renderer/core/layout/layout_text.h
@@ -398,6 +398,7 @@
   LayoutRect LocalVisualRectIgnoringVisibility() const final;
 
   bool CanOptimizeSetText() const;
+  void SetFirstTextBoxLogicalLeft(float text_width) const;
 
   // We put the bitfield first to minimize padding on 64-bit.
  protected:
diff --git a/third_party/blink/renderer/core/page/page_overlay_test.cc b/third_party/blink/renderer/core/page/page_overlay_test.cc
index 154ece4..f26efd6 100644
--- a/third_party/blink/renderer/core/page/page_overlay_test.cc
+++ b/third_party/blink/renderer/core/page/page_overlay_test.cc
@@ -82,9 +82,8 @@
     content::LayerTreeView* layer_tree_view = helper_.GetLayerTreeView();
     layer_tree_view->SetViewportSizeAndScale(
         static_cast<gfx::Size>(size), /*device_scale_factor=*/1.f,
-        layer_tree_view->layer_tree_host()->local_surface_id_from_parent(),
         layer_tree_view->layer_tree_host()
-            ->local_surface_id_allocation_time_from_parent());
+            ->local_surface_id_allocation_from_parent());
   }
 
   template <typename OverlayType>
diff --git a/third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.cc b/third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.cc
index 39f95ee0..89038f54 100644
--- a/third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.cc
+++ b/third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.cc
@@ -20,6 +20,7 @@
 #include "third_party/blink/renderer/core/workers/dedicated_worker_thread.h"
 #include "third_party/blink/renderer/core/workers/worker_options.h"
 #include "third_party/blink/renderer/platform/cross_thread_functional.h"
+#include "third_party/blink/renderer/platform/loader/fetch/access_control_status.h"
 #include "third_party/blink/renderer/platform/web_task_runner.h"
 #include "third_party/blink/renderer/platform/wtf/wtf.h"
 
@@ -184,6 +185,10 @@
       CrossThreadBind(&DedicatedWorkerObjectProxy::ProcessUnhandledException,
                       CrossThreadUnretained(worker_object_proxy_.get()),
                       exception_id, CrossThreadUnretained(GetWorkerThread())));
+
+  // Propagate an unhandled error to the parent context.
+  AccessControlStatus access_control_status = kSharableCrossOrigin;
+  GetExecutionContext()->DispatchErrorEvent(event, access_control_status);
 }
 
 void DedicatedWorkerMessagingProxy::Trace(blink::Visitor* visitor) {
diff --git a/third_party/blink/renderer/devtools/front_end/sdk_test_runner/PageMockTestRunner.js b/third_party/blink/renderer/devtools/front_end/sdk_test_runner/PageMockTestRunner.js
index 004eb1eb..f089e4a 100644
--- a/third_party/blink/renderer/devtools/front_end/sdk_test_runner/PageMockTestRunner.js
+++ b/third_party/blink/renderer/devtools/front_end/sdk_test_runner/PageMockTestRunner.js
@@ -13,18 +13,6 @@
   return (prefix || '') + ++id;
 }
 
-SDKTestRunner.connectToPage = function(targetName, pageMock, makeMainTarget) {
-  const mockTarget = SDK.targetManager.createTarget(
-      nextId('mock-target-'), targetName, pageMock._type, params => pageMock.createConnection(params));
-
-  if (makeMainTarget) {
-    SDK.targetManager._targets = SDK.targetManager._targets.filter(target => target !== mockTarget);
-    SDK.targetManager._targets.unshift(mockTarget);
-  }
-
-  return mockTarget;
-};
-
 SDKTestRunner.PageMock = class {
   constructor(url) {
     this._url = url;
@@ -53,10 +41,17 @@
     this._type = SDK.Target.Type.Worker;
   }
 
-  createConnection(params) {
-    this._enabledDomains.clear();
-    this._connection = new MockPageConnection(this, params);
-    return this._connection;
+  connectAsMainTarget(targetName) {
+    Bindings.debuggerWorkspaceBinding._resetForTest(TestRunner.mainTarget);
+    Bindings.resourceMapping._resetForTest(TestRunner.mainTarget);
+
+    SDK.targetManager._targets = [];
+    const target = SDK.targetManager.createTarget(nextId('mock-target-'), targetName, this._type, params => {
+      this._enabledDomains.clear();
+      this._connection = new MockPageConnection(this, params);
+      return this._connection;
+    });
+    return target;
   }
 
   evalScript(url, content, isContentScript) {
diff --git a/third_party/blink/renderer/modules/gamepad/BUILD.gn b/third_party/blink/renderer/modules/gamepad/BUILD.gn
index 2545e1c..e50e5a69 100644
--- a/third_party/blink/renderer/modules/gamepad/BUILD.gn
+++ b/third_party/blink/renderer/modules/gamepad/BUILD.gn
@@ -8,8 +8,12 @@
   sources = [
     "gamepad.cc",
     "gamepad.h",
+    "gamepad_axis_event.cc",
+    "gamepad_axis_event.h",
     "gamepad_button.cc",
     "gamepad_button.h",
+    "gamepad_button_event.cc",
+    "gamepad_button_event.h",
     "gamepad_dispatcher.cc",
     "gamepad_dispatcher.h",
     "gamepad_event.cc",
diff --git a/third_party/blink/renderer/modules/gamepad/gamepad_axis_event.cc b/third_party/blink/renderer/modules/gamepad/gamepad_axis_event.cc
new file mode 100644
index 0000000..f573067
--- /dev/null
+++ b/third_party/blink/renderer/modules/gamepad/gamepad_axis_event.cc
@@ -0,0 +1,34 @@
+// Copyright 2018 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 "third_party/blink/renderer/modules/gamepad/gamepad_axis_event.h"
+
+namespace blink {
+
+GamepadAxisEvent::GamepadAxisEvent(const AtomicString& type,
+                                   Bubbles bubbles,
+                                   Cancelable cancelable,
+                                   Gamepad* gamepad,
+                                   uint32_t axis,
+                                   double value)
+    : GamepadEvent(type, bubbles, cancelable, gamepad),
+      axis_(axis),
+      value_(value) {}
+
+GamepadAxisEvent::GamepadAxisEvent(const AtomicString& type,
+                                   const GamepadAxisEventInit* initializer)
+    : GamepadEvent(type, initializer) {
+  if (initializer->hasAxis())
+    axis_ = initializer->axis();
+  if (initializer->hasValue())
+    value_ = initializer->value();
+}
+
+GamepadAxisEvent::~GamepadAxisEvent() = default;
+
+const AtomicString& GamepadAxisEvent::InterfaceName() const {
+  return event_interface_names::kGamepadAxisEvent;
+}
+
+}  // namespace blink
diff --git a/third_party/blink/renderer/modules/gamepad/gamepad_axis_event.h b/third_party/blink/renderer/modules/gamepad/gamepad_axis_event.h
new file mode 100644
index 0000000..09edeea
--- /dev/null
+++ b/third_party/blink/renderer/modules/gamepad/gamepad_axis_event.h
@@ -0,0 +1,53 @@
+// Copyright 2018 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.
+
+#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_GAMEPAD_GAMEPAD_AXIS_EVENT_H_
+#define THIRD_PARTY_BLINK_RENDERER_MODULES_GAMEPAD_GAMEPAD_AXIS_EVENT_H_
+
+#include "third_party/blink/renderer/modules/gamepad/gamepad.h"
+#include "third_party/blink/renderer/modules/gamepad/gamepad_axis_event_init.h"
+#include "third_party/blink/renderer/modules/gamepad/gamepad_event.h"
+
+namespace blink {
+
+class GamepadAxisEvent final : public GamepadEvent {
+  DEFINE_WRAPPERTYPEINFO();
+
+ public:
+  static GamepadAxisEvent* Create(const AtomicString& type,
+                                  Bubbles bubbles,
+                                  Cancelable cancelable,
+                                  Gamepad* gamepad,
+                                  uint32_t axis,
+                                  double value) {
+    return new GamepadAxisEvent(type, bubbles, cancelable, gamepad, axis,
+                                value);
+  }
+  static GamepadAxisEvent* Create(const AtomicString& type,
+                                  const GamepadAxisEventInit* initializer) {
+    return new GamepadAxisEvent(type, initializer);
+  }
+  ~GamepadAxisEvent() override;
+
+  uint32_t getAxis() const { return axis_; }
+  double getValue() const { return value_; }
+
+  const AtomicString& InterfaceName() const override;
+
+ private:
+  GamepadAxisEvent(const AtomicString& type,
+                   Bubbles,
+                   Cancelable,
+                   Gamepad*,
+                   uint32_t axis,
+                   double value);
+  GamepadAxisEvent(const AtomicString&, const GamepadAxisEventInit*);
+
+  uint32_t axis_ = 0;
+  double value_ = 0.0;
+};
+
+}  // namespace blink
+
+#endif  // THIRD_PARTY_BLINK_RENDERER_MODULES_GAMEPAD_GAMEPAD_AXIS_EVENT_H_
diff --git a/third_party/blink/renderer/modules/gamepad/gamepad_axis_event.idl b/third_party/blink/renderer/modules/gamepad/gamepad_axis_event.idl
new file mode 100644
index 0000000..044b4b8e
--- /dev/null
+++ b/third_party/blink/renderer/modules/gamepad/gamepad_axis_event.idl
@@ -0,0 +1,14 @@
+// Copyright 2018 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.
+
+// Non-standard gamepad axis event.
+// https://docs.google.com/document/d/1rnQ1gU0iwPXbO7OvKS6KO9gyfpSdSQvKhK9_OkzUuKE
+
+[
+    RuntimeEnabled=GamepadButtonAxisEvents,
+    Constructor(DOMString type, optional GamepadAxisEventInit eventInitDict)
+] interface GamepadAxisEvent : GamepadEvent {
+    [ImplementedAs=getAxis] readonly attribute unsigned long axis;
+    [ImplementedAs=getValue] readonly attribute double value;
+};
diff --git a/third_party/blink/renderer/modules/gamepad/gamepad_axis_event_init.idl b/third_party/blink/renderer/modules/gamepad/gamepad_axis_event_init.idl
new file mode 100644
index 0000000..7c92561
--- /dev/null
+++ b/third_party/blink/renderer/modules/gamepad/gamepad_axis_event_init.idl
@@ -0,0 +1,11 @@
+// Copyright 2018 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.
+
+// Initialization dictionary type for GamepadAxisEvent.
+// https://docs.google.com/document/d/1rnQ1gU0iwPXbO7OvKS6KO9gyfpSdSQvKhK9_OkzUuKE
+
+dictionary GamepadAxisEventInit : GamepadEventInit {
+    unsigned long axis;
+    double value;
+};
diff --git a/third_party/blink/renderer/modules/gamepad/gamepad_button_event.cc b/third_party/blink/renderer/modules/gamepad/gamepad_button_event.cc
new file mode 100644
index 0000000..ceb65fb
--- /dev/null
+++ b/third_party/blink/renderer/modules/gamepad/gamepad_button_event.cc
@@ -0,0 +1,35 @@
+// Copyright 2018 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 "third_party/blink/renderer/modules/gamepad/gamepad_button_event.h"
+
+namespace blink {
+
+GamepadButtonEvent::GamepadButtonEvent(const AtomicString& type,
+                                       Bubbles bubbles,
+                                       Cancelable cancelable,
+                                       Gamepad* gamepad,
+                                       uint32_t button,
+                                       double value)
+    : GamepadEvent(type, bubbles, cancelable, gamepad),
+      button_(button),
+      value_(value) {}
+
+GamepadButtonEvent::GamepadButtonEvent(
+    const AtomicString& type,
+    const GamepadButtonEventInit* initializer)
+    : GamepadEvent(type, initializer) {
+  if (initializer->hasButton())
+    button_ = initializer->button();
+  if (initializer->hasValue())
+    value_ = initializer->value();
+}
+
+GamepadButtonEvent::~GamepadButtonEvent() = default;
+
+const AtomicString& GamepadButtonEvent::InterfaceName() const {
+  return event_interface_names::kGamepadButtonEvent;
+}
+
+}  // namespace blink
diff --git a/third_party/blink/renderer/modules/gamepad/gamepad_button_event.h b/third_party/blink/renderer/modules/gamepad/gamepad_button_event.h
new file mode 100644
index 0000000..0ad4ac9
--- /dev/null
+++ b/third_party/blink/renderer/modules/gamepad/gamepad_button_event.h
@@ -0,0 +1,54 @@
+// Copyright 2018 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.
+
+#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_GAMEPAD_GAMEPAD_BUTTON_EVENT_H_
+#define THIRD_PARTY_BLINK_RENDERER_MODULES_GAMEPAD_GAMEPAD_BUTTON_EVENT_H_
+
+#include "third_party/blink/renderer/modules/gamepad/gamepad.h"
+#include "third_party/blink/renderer/modules/gamepad/gamepad_button.h"
+#include "third_party/blink/renderer/modules/gamepad/gamepad_button_event_init.h"
+#include "third_party/blink/renderer/modules/gamepad/gamepad_event.h"
+
+namespace blink {
+
+class GamepadButtonEvent final : public GamepadEvent {
+  DEFINE_WRAPPERTYPEINFO();
+
+ public:
+  static GamepadButtonEvent* Create(const AtomicString& type,
+                                    Bubbles bubbles,
+                                    Cancelable cancelable,
+                                    Gamepad* gamepad,
+                                    uint32_t button,
+                                    double value) {
+    return new GamepadButtonEvent(type, bubbles, cancelable, gamepad, button,
+                                  value);
+  }
+  static GamepadButtonEvent* Create(const AtomicString& type,
+                                    const GamepadButtonEventInit* initializer) {
+    return new GamepadButtonEvent(type, initializer);
+  }
+  ~GamepadButtonEvent() override;
+
+  uint32_t getButton() const { return button_; }
+  double getValue() const { return value_; }
+
+  const AtomicString& InterfaceName() const override;
+
+ private:
+  GamepadButtonEvent(const AtomicString& type,
+                     Bubbles,
+                     Cancelable,
+                     Gamepad*,
+                     uint32_t button,
+                     double value);
+  GamepadButtonEvent(const AtomicString&, const GamepadButtonEventInit*);
+
+  uint32_t button_ = 0;
+  double value_ = 0.0;
+};
+
+}  // namespace blink
+
+#endif  // THIRD_PARTY_BLINK_RENDERER_MODULES_GAMEPAD_GAMEPAD_BUTTON_EVENT_H_
diff --git a/third_party/blink/renderer/modules/gamepad/gamepad_button_event.idl b/third_party/blink/renderer/modules/gamepad/gamepad_button_event.idl
new file mode 100644
index 0000000..21ac8cf
--- /dev/null
+++ b/third_party/blink/renderer/modules/gamepad/gamepad_button_event.idl
@@ -0,0 +1,14 @@
+// Copyright 2018 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.
+
+// Non-standard gamepad button event.
+// https://docs.google.com/document/d/1rnQ1gU0iwPXbO7OvKS6KO9gyfpSdSQvKhK9_OkzUuKE
+
+[
+    RuntimeEnabled=GamepadButtonAxisEvents,
+    Constructor(DOMString type, optional GamepadButtonEventInit eventInitDict)
+] interface GamepadButtonEvent : GamepadEvent {
+    [ImplementedAs=getButton] readonly attribute unsigned long button;
+    [ImplementedAs=getValue] readonly attribute double value;
+};
diff --git a/third_party/blink/renderer/modules/gamepad/gamepad_button_event_init.idl b/third_party/blink/renderer/modules/gamepad/gamepad_button_event_init.idl
new file mode 100644
index 0000000..0f423aa8
--- /dev/null
+++ b/third_party/blink/renderer/modules/gamepad/gamepad_button_event_init.idl
@@ -0,0 +1,11 @@
+// Copyright 2018 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.
+
+// Initialization dictionary type for GamepadButtonEvent.
+// https://docs.google.com/document/d/1rnQ1gU0iwPXbO7OvKS6KO9gyfpSdSQvKhK9_OkzUuKE
+
+dictionary GamepadButtonEventInit : GamepadEventInit {
+    unsigned long button;
+    double value;
+};
diff --git a/third_party/blink/renderer/modules/gamepad/gamepad_event.h b/third_party/blink/renderer/modules/gamepad/gamepad_event.h
index 3a9b1b8..af9af7e 100644
--- a/third_party/blink/renderer/modules/gamepad/gamepad_event.h
+++ b/third_party/blink/renderer/modules/gamepad/gamepad_event.h
@@ -11,7 +11,7 @@
 
 namespace blink {
 
-class GamepadEvent final : public Event {
+class GamepadEvent : public Event {
   DEFINE_WRAPPERTYPEINFO();
 
  public:
@@ -33,10 +33,11 @@
 
   void Trace(blink::Visitor*) override;
 
- private:
+ protected:
   GamepadEvent(const AtomicString& type, Bubbles, Cancelable, Gamepad*);
   GamepadEvent(const AtomicString&, const GamepadEventInit*);
 
+ private:
   Member<Gamepad> gamepad_;
 };
 
diff --git a/third_party/blink/renderer/modules/indexeddb/idb_value_wrapping.h b/third_party/blink/renderer/modules/indexeddb/idb_value_wrapping.h
index 5ae34bd..b2ff10e 100644
--- a/third_party/blink/renderer/modules/indexeddb/idb_value_wrapping.h
+++ b/third_party/blink/renderer/modules/indexeddb/idb_value_wrapping.h
@@ -40,7 +40,7 @@
 //    This may be necessary when extracting the primary key and/or index keys
 //    for the serialized value.
 // 2) Wrapping - DoneCloning() transitions the instance to an internal
-//    reprensetation optimized for wrapping via WrapIfBiggerThan().
+//    representation optimized for wrapping via WrapIfBiggerThan().
 // 3) Reading results - After any desired wrapping is performed, the Take*()
 //    methods yield the serialized value components passed to the backing store.
 //    To avoid unnecessary copies, the Take*() methods move out parts of the
diff --git a/third_party/blink/renderer/modules/modules_idl_files.gni b/third_party/blink/renderer/modules/modules_idl_files.gni
index ac02a900..0999371 100644
--- a/third_party/blink/renderer/modules/modules_idl_files.gni
+++ b/third_party/blink/renderer/modules/modules_idl_files.gni
@@ -151,7 +151,9 @@
           "filesystem/metadata.idl",
           "filesystem/metadata_callback.idl",
           "gamepad/gamepad.idl",
+          "gamepad/gamepad_axis_event.idl",
           "gamepad/gamepad_button.idl",
+          "gamepad/gamepad_button_event.idl",
           "gamepad/gamepad_event.idl",
           "gamepad/gamepad_haptic_actuator.idl",
           "gamepad/gamepad_list.idl",
@@ -535,6 +537,8 @@
           "filesystem/file_system_get_directory_options.idl",
           "filesystem/file_system_get_file_options.idl",
           "filesystem/get_system_directory_options.idl",
+          "gamepad/gamepad_axis_event_init.idl",
+          "gamepad/gamepad_button_event_init.idl",
           "gamepad/gamepad_effect_parameters.idl",
           "gamepad/gamepad_event_init.idl",
           "geolocation/position_options.idl",
diff --git a/third_party/blink/renderer/modules/payments/abort_payment_respond_with_observer.cc b/third_party/blink/renderer/modules/payments/abort_payment_respond_with_observer.cc
index b44dae5..55992d19 100644
--- a/third_party/blink/renderer/modules/payments/abort_payment_respond_with_observer.cc
+++ b/third_party/blink/renderer/modules/payments/abort_payment_respond_with_observer.cc
@@ -27,7 +27,7 @@
                                            "AbortPaymentEvent", error);
 
   ServiceWorkerGlobalScopeClient::From(GetExecutionContext())
-      ->RespondToAbortPaymentEvent(event_id_, false, event_dispatch_time_);
+      ->RespondToAbortPaymentEvent(event_id_, false);
 }
 
 void AbortPaymentRespondWithObserver::OnResponseFulfilled(
@@ -47,13 +47,13 @@
   }
 
   ServiceWorkerGlobalScopeClient::From(GetExecutionContext())
-      ->RespondToAbortPaymentEvent(event_id_, response, event_dispatch_time_);
+      ->RespondToAbortPaymentEvent(event_id_, response);
 }
 
 void AbortPaymentRespondWithObserver::OnNoResponse() {
   DCHECK(GetExecutionContext());
   ServiceWorkerGlobalScopeClient::From(GetExecutionContext())
-      ->RespondToAbortPaymentEvent(event_id_, false, event_dispatch_time_);
+      ->RespondToAbortPaymentEvent(event_id_, false);
 }
 
 void AbortPaymentRespondWithObserver::Trace(blink::Visitor* visitor) {
diff --git a/third_party/blink/renderer/modules/payments/can_make_payment_respond_with_observer.cc b/third_party/blink/renderer/modules/payments/can_make_payment_respond_with_observer.cc
index 60da117..41e87e2 100644
--- a/third_party/blink/renderer/modules/payments/can_make_payment_respond_with_observer.cc
+++ b/third_party/blink/renderer/modules/payments/can_make_payment_respond_with_observer.cc
@@ -27,7 +27,7 @@
                                            "CanMakePaymentEvent", error);
 
   ServiceWorkerGlobalScopeClient::From(GetExecutionContext())
-      ->RespondToCanMakePaymentEvent(event_id_, false, event_dispatch_time_);
+      ->RespondToCanMakePaymentEvent(event_id_, false);
 }
 
 void CanMakePaymentRespondWithObserver::OnResponseFulfilled(
@@ -47,13 +47,13 @@
   }
 
   ServiceWorkerGlobalScopeClient::From(GetExecutionContext())
-      ->RespondToCanMakePaymentEvent(event_id_, response, event_dispatch_time_);
+      ->RespondToCanMakePaymentEvent(event_id_, response);
 }
 
 void CanMakePaymentRespondWithObserver::OnNoResponse() {
   DCHECK(GetExecutionContext());
   ServiceWorkerGlobalScopeClient::From(GetExecutionContext())
-      ->RespondToCanMakePaymentEvent(event_id_, true, event_dispatch_time_);
+      ->RespondToCanMakePaymentEvent(event_id_, true);
 }
 
 void CanMakePaymentRespondWithObserver::Trace(blink::Visitor* visitor) {
diff --git a/third_party/blink/renderer/modules/payments/payment_request_respond_with_observer.cc b/third_party/blink/renderer/modules/payments/payment_request_respond_with_observer.cc
index 781d367..8122f169 100644
--- a/third_party/blink/renderer/modules/payments/payment_request_respond_with_observer.cc
+++ b/third_party/blink/renderer/modules/payments/payment_request_respond_with_observer.cc
@@ -33,7 +33,7 @@
 
   WebPaymentHandlerResponse web_data;
   ServiceWorkerGlobalScopeClient::From(GetExecutionContext())
-      ->RespondToPaymentRequestEvent(event_id_, web_data, event_dispatch_time_);
+      ->RespondToPaymentRequestEvent(event_id_, web_data);
 }
 
 void PaymentRequestRespondWithObserver::OnResponseFulfilled(
@@ -80,14 +80,13 @@
   }
   web_data.stringified_details = ToCoreString(details_value);
   ServiceWorkerGlobalScopeClient::From(GetExecutionContext())
-      ->RespondToPaymentRequestEvent(event_id_, web_data, event_dispatch_time_);
+      ->RespondToPaymentRequestEvent(event_id_, web_data);
 }
 
 void PaymentRequestRespondWithObserver::OnNoResponse() {
   DCHECK(GetExecutionContext());
   ServiceWorkerGlobalScopeClient::From(GetExecutionContext())
-      ->RespondToPaymentRequestEvent(event_id_, WebPaymentHandlerResponse(),
-                                     event_dispatch_time_);
+      ->RespondToPaymentRequestEvent(event_id_, WebPaymentHandlerResponse());
 }
 
 PaymentRequestRespondWithObserver::PaymentRequestRespondWithObserver(
diff --git a/third_party/blink/renderer/modules/peerconnection/adapters/quic_stream_host.cc b/third_party/blink/renderer/modules/peerconnection/adapters/quic_stream_host.cc
index 25f2393..7b2e604 100644
--- a/third_party/blink/renderer/modules/peerconnection/adapters/quic_stream_host.cc
+++ b/third_party/blink/renderer/modules/peerconnection/adapters/quic_stream_host.cc
@@ -49,16 +49,22 @@
   Delete();
 }
 
-// TODO(https://crbug.com/874296): When the blink binding (RTCQuicStream) is
-// updated to support reading/writing, remove this function.
-void QuicStreamHost::Finish() {
+void QuicStreamHost::MarkReceivedDataConsumed(uint32_t amount) {
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
   DCHECK(p2p_stream_);
-  std::vector<uint8_t> data;
-  p2p_stream_->WriteData(data, true);
-  writeable_ = false;
-  if (!readable_ && !writeable_) {
-    Delete();
+  p2p_stream_->MarkReceivedDataConsumed(amount);
+}
+
+void QuicStreamHost::WriteData(std::vector<uint8_t> data, bool fin) {
+  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
+  DCHECK(p2p_stream_);
+  p2p_stream_->WriteData(data, fin);
+  if (fin) {
+    DCHECK(writable_);
+    writable_ = false;
+    if (!readable_ && !writable_) {
+      Delete();
+    }
   }
 }
 
@@ -70,21 +76,24 @@
   Delete();
 }
 
-// TODO(https://crbug.com/874296): When the blink binding (RTCQuicStream) is
-// updated to support reading/writing, update this function to do more than just
-// call OnRemoteFinish.
 void QuicStreamHost::OnDataReceived(std::vector<uint8_t> data, bool fin) {
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
-  if (!fin) {
-    return;
+  PostCrossThreadTask(*proxy_thread(), FROM_HERE,
+                      CrossThreadBind(&QuicStreamProxy::OnDataReceived,
+                                      stream_proxy_, std::move(data), fin));
+  if (fin) {
+    readable_ = false;
+    if (!readable_ && !writable_) {
+      Delete();
+    }
   }
-  PostCrossThreadTask(
-      *proxy_thread(), FROM_HERE,
-      CrossThreadBind(&QuicStreamProxy::OnRemoteFinish, stream_proxy_));
-  readable_ = false;
-  if (!readable_ && !writeable_) {
-    Delete();
-  }
+}
+
+void QuicStreamHost::OnWriteDataConsumed(uint32_t amount) {
+  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
+  PostCrossThreadTask(*proxy_thread(), FROM_HERE,
+                      CrossThreadBind(&QuicStreamProxy::OnWriteDataConsumed,
+                                      stream_proxy_, amount));
 }
 
 void QuicStreamHost::Delete() {
diff --git a/third_party/blink/renderer/modules/peerconnection/adapters/quic_stream_host.h b/third_party/blink/renderer/modules/peerconnection/adapters/quic_stream_host.h
index 6733e2f..7b2095e 100644
--- a/third_party/blink/renderer/modules/peerconnection/adapters/quic_stream_host.h
+++ b/third_party/blink/renderer/modules/peerconnection/adapters/quic_stream_host.h
@@ -56,7 +56,8 @@
   scoped_refptr<base::SingleThreadTaskRunner> proxy_thread() const;
 
   void Reset();
-  void Finish();
+  void MarkReceivedDataConsumed(uint32_t amount);
+  void WriteData(std::vector<uint8_t> data, bool fin);
 
  private:
   // Instruct the QuicTransportHost to remove and delete this stream host.
@@ -65,6 +66,7 @@
   // P2PQuicStream::Delegate overrides.
   void OnRemoteReset() override;
   void OnDataReceived(std::vector<uint8_t> data, bool fin) override;
+  void OnWriteDataConsumed(uint32_t amount) override;
 
   // Up reference. Owned by QuicTransportProxy.
   QuicTransportHost* transport_host_ = nullptr;
@@ -73,10 +75,10 @@
   // Back reference. Owned by QuicTransportProxy.
   base::WeakPtr<QuicStreamProxy> stream_proxy_;
 
-  // |readable_| transitions to false when OnRemoteFinish() is called.
+  // |readable_| transitions to false when OnDataReceived(_, true) is called.
   bool readable_ = true;
-  // |writeable_| transitions to false when Finish() is called.
-  bool writeable_ = true;
+  // |writable_| transitions to false when WriteData(_, true) is called.
+  bool writable_ = true;
 
   THREAD_CHECKER(thread_checker_);
 };
diff --git a/third_party/blink/renderer/modules/peerconnection/adapters/quic_stream_proxy.cc b/third_party/blink/renderer/modules/peerconnection/adapters/quic_stream_proxy.cc
index e50ebf0..6d443602 100644
--- a/third_party/blink/renderer/modules/peerconnection/adapters/quic_stream_proxy.cc
+++ b/third_party/blink/renderer/modules/peerconnection/adapters/quic_stream_proxy.cc
@@ -51,13 +51,23 @@
   Delete();
 }
 
-void QuicStreamProxy::Finish() {
+void QuicStreamProxy::MarkReceivedDataConsumed(uint32_t amount) {
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
   PostCrossThreadTask(*host_thread(), FROM_HERE,
-                      CrossThreadBind(&QuicStreamHost::Finish, stream_host_));
-  writeable_ = false;
-  if (!readable_ && !writeable_) {
-    Delete();
+                      CrossThreadBind(&QuicStreamHost::MarkReceivedDataConsumed,
+                                      stream_host_, amount));
+}
+
+void QuicStreamProxy::WriteData(std::vector<uint8_t> data, bool fin) {
+  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
+  PostCrossThreadTask(*host_thread(), FROM_HERE,
+                      CrossThreadBind(&QuicStreamHost::WriteData, stream_host_,
+                                      std::move(data), fin));
+  if (fin) {
+    writable_ = false;
+    if (!readable_ && !writable_) {
+      Delete();
+    }
   }
 }
 
@@ -70,16 +80,24 @@
   delegate_copy->OnRemoteReset();
 }
 
-void QuicStreamProxy::OnRemoteFinish() {
+void QuicStreamProxy::OnDataReceived(std::vector<uint8_t> data, bool fin) {
   DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
   DCHECK(delegate_);
   // Need to copy the |delegate_| member since Delete() will destroy |this|.
   Delegate* delegate_copy = delegate_;
-  readable_ = false;
-  if (!readable_ && !writeable_) {
-    Delete();
+  if (fin) {
+    readable_ = false;
+    if (!readable_ && !writable_) {
+      Delete();
+    }
   }
-  delegate_copy->OnRemoteFinish();
+  delegate_copy->OnDataReceived(std::move(data), fin);
+}
+
+void QuicStreamProxy::OnWriteDataConsumed(uint32_t amount) {
+  DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
+  DCHECK(delegate_);
+  delegate_->OnWriteDataConsumed(amount);
 }
 
 void QuicStreamProxy::Delete() {
diff --git a/third_party/blink/renderer/modules/peerconnection/adapters/quic_stream_proxy.h b/third_party/blink/renderer/modules/peerconnection/adapters/quic_stream_proxy.h
index 0d059f6..2a318948 100644
--- a/third_party/blink/renderer/modules/peerconnection/adapters/quic_stream_proxy.h
+++ b/third_party/blink/renderer/modules/peerconnection/adapters/quic_stream_proxy.h
@@ -43,8 +43,10 @@
 
     // Called when the remote side resets the stream.
     virtual void OnRemoteReset() {}
-    // Called when the remote side finishes the stream.
-    virtual void OnRemoteFinish() {}
+    // Called when the remote side receives data and/or the finish bit.
+    virtual void OnDataReceived(std::vector<uint8_t> data, bool fin) {}
+    // Called when data written with WriteData() has been consumed by QUIC.
+    virtual void OnWriteDataConsumed(uint32_t amount) {}
   };
 
   QuicStreamProxy();
@@ -67,7 +69,8 @@
   scoped_refptr<base::SingleThreadTaskRunner> host_thread() const;
 
   void Reset();
-  void Finish();
+  void MarkReceivedDataConsumed(uint32_t amount);
+  void WriteData(std::vector<uint8_t> data, bool fin);
 
  private:
   // Instruct the QuicTransportProxy to remove and delete this stream proxy.
@@ -76,7 +79,8 @@
   // Callbacks from QuicStreamHost.
   friend class QuicStreamHost;
   void OnRemoteReset();
-  void OnRemoteFinish();
+  void OnDataReceived(std::vector<uint8_t> data, bool fin);
+  void OnWriteDataConsumed(uint32_t amount);
 
   // Up reference. Owned by the QuicTransportProxy client.
   QuicTransportProxy* transport_proxy_ = nullptr;
@@ -85,10 +89,10 @@
   // Back reference. Owned by the RTCQuicTransport.
   Delegate* delegate_ = nullptr;
 
-  // |readable_| transitions to false when OnRemoteFinish() is called.
+  // |readable_| transitions to false when OnDataReceived(_, true) is called.
   bool readable_ = true;
-  // |writeable_| transitions to false when Finish() is called.
-  bool writeable_ = true;
+  // |writable_| transitions to false when WriteData(_, true) is called.
+  bool writable_ = true;
 
   THREAD_CHECKER(thread_checker_);
 };
diff --git a/third_party/blink/renderer/modules/peerconnection/adapters/web_rtc_cross_thread_copier.h b/third_party/blink/renderer/modules/peerconnection/adapters/web_rtc_cross_thread_copier.h
index 73ab10b2..e9b69b18 100644
--- a/third_party/blink/renderer/modules/peerconnection/adapters/web_rtc_cross_thread_copier.h
+++ b/third_party/blink/renderer/modules/peerconnection/adapters/web_rtc_cross_thread_copier.h
@@ -86,6 +86,12 @@
   STATIC_ONLY(CrossThreadCopier);
 };
 
+template <>
+struct CrossThreadCopier<std::vector<uint8_t>>
+    : public CrossThreadCopierPassThrough<std::vector<uint8_t>> {
+  STATIC_ONLY(CrossThreadCopier);
+};
+
 }  // namespace blink
 
 #endif  // THIRD_PARTY_BLINK_RENDERER_MODULES_PEERCONNECTION_ADAPTERS_WEB_RTC_CROSS_THREAD_COPIER_H_
diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_quic_stream.cc b/third_party/blink/renderer/modules/peerconnection/rtc_quic_stream.cc
index 32473c6..d5c1319 100644
--- a/third_party/blink/renderer/modules/peerconnection/rtc_quic_stream.cc
+++ b/third_party/blink/renderer/modules/peerconnection/rtc_quic_stream.cc
@@ -53,7 +53,7 @@
   if (!writeable_) {
     return;
   }
-  proxy_->Finish();
+  proxy_->WriteData({}, /*fin=*/true);
   writeable_ = false;
   if (readable_) {
     DCHECK_EQ(state_, RTCQuicStreamState::kOpen);
@@ -92,7 +92,10 @@
   DispatchEvent(*Event::Create(event_type_names::kStatechange));
 }
 
-void RTCQuicStream::OnRemoteFinish() {
+void RTCQuicStream::OnDataReceived(std::vector<uint8_t> data, bool fin) {
+  if (!fin) {
+    return;
+  }
   DCHECK_NE(state_, RTCQuicStreamState::kClosed);
   DCHECK(readable_);
   readable_ = false;
@@ -106,6 +109,8 @@
   DispatchEvent(*Event::Create(event_type_names::kStatechange));
 }
 
+void RTCQuicStream::OnWriteDataConsumed(uint32_t amount) {}
+
 const AtomicString& RTCQuicStream::InterfaceName() const {
   return event_target_names::kRTCQuicStream;
 }
diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_quic_stream.h b/third_party/blink/renderer/modules/peerconnection/rtc_quic_stream.h
index c6707df..ac29e10 100644
--- a/third_party/blink/renderer/modules/peerconnection/rtc_quic_stream.h
+++ b/third_party/blink/renderer/modules/peerconnection/rtc_quic_stream.h
@@ -55,7 +55,8 @@
 
   // QuicStreamProxy::Delegate overrides.
   void OnRemoteReset() override;
-  void OnRemoteFinish() override;
+  void OnDataReceived(std::vector<uint8_t> data, bool fin) override;
+  void OnWriteDataConsumed(uint32_t amount) override;
 
   Member<RTCQuicTransport> transport_;
   RTCQuicStreamState state_ = RTCQuicStreamState::kOpen;
diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_client.cc b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_client.cc
index f0d8ef2..a90f554 100644
--- a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_client.cc
+++ b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_client.cc
@@ -149,56 +149,44 @@
 
 void ServiceWorkerGlobalScopeClient::DidHandleActivateEvent(
     int event_id,
-    mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
-  client_.DidHandleActivateEvent(event_id, status, event_dispatch_time);
+    mojom::ServiceWorkerEventStatus status) {
+  client_.DidHandleActivateEvent(event_id, status);
 }
 
 void ServiceWorkerGlobalScopeClient::DidHandleBackgroundFetchAbortEvent(
     int event_id,
-    mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
-  client_.DidHandleBackgroundFetchAbortEvent(event_id, status,
-                                             event_dispatch_time);
+    mojom::ServiceWorkerEventStatus status) {
+  client_.DidHandleBackgroundFetchAbortEvent(event_id, status);
 }
 
 void ServiceWorkerGlobalScopeClient::DidHandleBackgroundFetchClickEvent(
     int event_id,
-    mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
-  client_.DidHandleBackgroundFetchClickEvent(event_id, status,
-                                             event_dispatch_time);
+    mojom::ServiceWorkerEventStatus status) {
+  client_.DidHandleBackgroundFetchClickEvent(event_id, status);
 }
 
 void ServiceWorkerGlobalScopeClient::DidHandleBackgroundFetchFailEvent(
     int event_id,
-    mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
-  client_.DidHandleBackgroundFetchFailEvent(event_id, status,
-                                            event_dispatch_time);
+    mojom::ServiceWorkerEventStatus status) {
+  client_.DidHandleBackgroundFetchFailEvent(event_id, status);
 }
 
 void ServiceWorkerGlobalScopeClient::DidHandleBackgroundFetchSuccessEvent(
     int event_id,
-    mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
-  client_.DidHandleBackgroundFetchSuccessEvent(event_id, status,
-                                               event_dispatch_time);
+    mojom::ServiceWorkerEventStatus status) {
+  client_.DidHandleBackgroundFetchSuccessEvent(event_id, status);
 }
 
 void ServiceWorkerGlobalScopeClient::DidHandleCookieChangeEvent(
     int event_id,
-    mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
-  client_.DidHandleCookieChangeEvent(event_id, status, event_dispatch_time);
+    mojom::ServiceWorkerEventStatus status) {
+  client_.DidHandleCookieChangeEvent(event_id, status);
 }
 
 void ServiceWorkerGlobalScopeClient::DidHandleExtendableMessageEvent(
     int event_id,
-    mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
-  client_.DidHandleExtendableMessageEvent(event_id, status,
-                                          event_dispatch_time);
+    mojom::ServiceWorkerEventStatus status) {
+  client_.DidHandleExtendableMessageEvent(event_id, status);
 }
 
 void ServiceWorkerGlobalScopeClient::RespondToFetchEventWithNoResponse(
@@ -231,92 +219,74 @@
 
 void ServiceWorkerGlobalScopeClient::RespondToAbortPaymentEvent(
     int event_id,
-    bool abort_payment,
-    base::TimeTicks event_dispatch_time) {
-  client_.RespondToAbortPaymentEvent(event_id, abort_payment,
-                                     event_dispatch_time);
+    bool abort_payment) {
+  client_.RespondToAbortPaymentEvent(event_id, abort_payment);
 }
 
 void ServiceWorkerGlobalScopeClient::RespondToCanMakePaymentEvent(
     int event_id,
-    bool response,
-    base::TimeTicks event_dispatch_time) {
-  client_.RespondToCanMakePaymentEvent(event_id, response, event_dispatch_time);
+    bool response) {
+  client_.RespondToCanMakePaymentEvent(event_id, response);
 }
 
 void ServiceWorkerGlobalScopeClient::RespondToPaymentRequestEvent(
     int event_id,
-    const WebPaymentHandlerResponse& response,
-    base::TimeTicks event_dispatch_time) {
-  client_.RespondToPaymentRequestEvent(event_id, response, event_dispatch_time);
+    const WebPaymentHandlerResponse& response) {
+  client_.RespondToPaymentRequestEvent(event_id, response);
 }
 
 void ServiceWorkerGlobalScopeClient::DidHandleFetchEvent(
     int fetch_event_id,
-    mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
-  client_.DidHandleFetchEvent(fetch_event_id, status, event_dispatch_time);
+    mojom::ServiceWorkerEventStatus status) {
+  client_.DidHandleFetchEvent(fetch_event_id, status);
 }
 
 void ServiceWorkerGlobalScopeClient::DidHandleInstallEvent(
     int install_event_id,
-    mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
-  client_.DidHandleInstallEvent(install_event_id, status, event_dispatch_time);
+    mojom::ServiceWorkerEventStatus status) {
+  client_.DidHandleInstallEvent(install_event_id, status);
 }
 
 void ServiceWorkerGlobalScopeClient::DidHandleNotificationClickEvent(
     int event_id,
-    mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
-  client_.DidHandleNotificationClickEvent(event_id, status,
-                                          event_dispatch_time);
+    mojom::ServiceWorkerEventStatus status) {
+  client_.DidHandleNotificationClickEvent(event_id, status);
 }
 
 void ServiceWorkerGlobalScopeClient::DidHandleNotificationCloseEvent(
     int event_id,
-    mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
-  client_.DidHandleNotificationCloseEvent(event_id, status,
-                                          event_dispatch_time);
+    mojom::ServiceWorkerEventStatus status) {
+  client_.DidHandleNotificationCloseEvent(event_id, status);
 }
 
 void ServiceWorkerGlobalScopeClient::DidHandlePushEvent(
     int push_event_id,
-    mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
-  client_.DidHandlePushEvent(push_event_id, status, event_dispatch_time);
+    mojom::ServiceWorkerEventStatus status) {
+  client_.DidHandlePushEvent(push_event_id, status);
 }
 
 void ServiceWorkerGlobalScopeClient::DidHandleSyncEvent(
     int sync_event_id,
-    mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
-  client_.DidHandleSyncEvent(sync_event_id, status, event_dispatch_time);
+    mojom::ServiceWorkerEventStatus status) {
+  client_.DidHandleSyncEvent(sync_event_id, status);
 }
 
 void ServiceWorkerGlobalScopeClient::DidHandleAbortPaymentEvent(
     int abort_payment_event_id,
-    mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
-  client_.DidHandleAbortPaymentEvent(abort_payment_event_id, status,
-                                     event_dispatch_time);
+    mojom::ServiceWorkerEventStatus status) {
+  client_.DidHandleAbortPaymentEvent(abort_payment_event_id, status);
 }
 
 void ServiceWorkerGlobalScopeClient::DidHandleCanMakePaymentEvent(
     int payment_request_event_id,
-    mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
-  client_.DidHandleCanMakePaymentEvent(payment_request_event_id, status,
-                                       event_dispatch_time);
+    mojom::ServiceWorkerEventStatus status) {
+  client_.DidHandleCanMakePaymentEvent(payment_request_event_id, status);
 }
 
 void ServiceWorkerGlobalScopeClient::DidHandlePaymentRequestEvent(
     int payment_request_event_id,
-    mojom::ServiceWorkerEventStatus status,
-    base::TimeTicks event_dispatch_time) {
-  client_.DidHandlePaymentRequestEvent(payment_request_event_id, status,
-                                       event_dispatch_time);
+    mojom::ServiceWorkerEventStatus status) {
+  client_.DidHandlePaymentRequestEvent(payment_request_event_id, status);
 }
 
 void ServiceWorkerGlobalScopeClient::BindServiceWorkerHost(
diff --git a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_client.h b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_client.h
index a5336ec..1959da5 100644
--- a/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_client.h
+++ b/third_party/blink/renderer/modules/service_worker/service_worker_global_scope_client.h
@@ -87,28 +87,19 @@
   void Focus(const String& client_uuid, FocusCallback);
   void Navigate(const String& client_uuid, const KURL&, ScriptPromiseResolver*);
 
-  void DidHandleActivateEvent(int event_id,
-                              mojom::ServiceWorkerEventStatus,
-                              base::TimeTicks event_dispatch_time);
+  void DidHandleActivateEvent(int event_id, mojom::ServiceWorkerEventStatus);
   void DidHandleBackgroundFetchAbortEvent(int event_id,
-                                          mojom::ServiceWorkerEventStatus,
-                                          base::TimeTicks event_dispatch_time);
+                                          mojom::ServiceWorkerEventStatus);
   void DidHandleBackgroundFetchClickEvent(int event_id,
-                                          mojom::ServiceWorkerEventStatus,
-                                          base::TimeTicks event_dispatch_time);
+                                          mojom::ServiceWorkerEventStatus);
   void DidHandleBackgroundFetchFailEvent(int event_id,
-                                         mojom::ServiceWorkerEventStatus,
-                                         base::TimeTicks event_dispatch_time);
-  void DidHandleBackgroundFetchSuccessEvent(
-      int event_id,
-      mojom::ServiceWorkerEventStatus,
-      base::TimeTicks event_dispatch_time);
+                                         mojom::ServiceWorkerEventStatus);
+  void DidHandleBackgroundFetchSuccessEvent(int event_id,
+                                            mojom::ServiceWorkerEventStatus);
   void DidHandleCookieChangeEvent(int event_id,
-                                  mojom::ServiceWorkerEventStatus,
-                                  base::TimeTicks event_dispatch_time);
+                                  mojom::ServiceWorkerEventStatus);
   void DidHandleExtendableMessageEvent(int event_id,
-                                       mojom::ServiceWorkerEventStatus,
-                                       base::TimeTicks event_dispatch_time);
+                                       mojom::ServiceWorkerEventStatus);
   void RespondToFetchEventWithNoResponse(
       int fetch_event_id,
       base::TimeTicks event_dispatch_time,
@@ -123,42 +114,25 @@
       WebServiceWorkerStreamHandle*,
       base::TimeTicks event_dispatch_time,
       base::TimeTicks respond_with_settled_time);
-  void RespondToAbortPaymentEvent(int event_id,
-                                  bool abort_payment,
-                                  base::TimeTicks event_dispatch_time);
-  void RespondToCanMakePaymentEvent(int event_id,
-                                    bool can_make_payment,
-                                    base::TimeTicks event_dispatch_time);
+  void RespondToAbortPaymentEvent(int event_id, bool abort_payment);
+  void RespondToCanMakePaymentEvent(int event_id, bool can_make_payment);
   void RespondToPaymentRequestEvent(int event_id,
-                                    const WebPaymentHandlerResponse&,
-                                    base::TimeTicks event_dispatch_time);
-  void DidHandleFetchEvent(int fetch_event_id,
-                           mojom::ServiceWorkerEventStatus,
-                           base::TimeTicks event_dispatch_time);
+                                    const WebPaymentHandlerResponse&);
+  void DidHandleFetchEvent(int fetch_event_id, mojom::ServiceWorkerEventStatus);
   void DidHandleInstallEvent(int install_event_id,
-                             mojom::ServiceWorkerEventStatus,
-                             base::TimeTicks event_dispatch_time);
+                             mojom::ServiceWorkerEventStatus);
   void DidHandleNotificationClickEvent(int event_id,
-                                       mojom::ServiceWorkerEventStatus,
-                                       base::TimeTicks event_dispatch_time);
+                                       mojom::ServiceWorkerEventStatus);
   void DidHandleNotificationCloseEvent(int event_id,
-                                       mojom::ServiceWorkerEventStatus,
-                                       base::TimeTicks event_dispatch_time);
-  void DidHandlePushEvent(int push_event_id,
-                          mojom::ServiceWorkerEventStatus,
-                          base::TimeTicks event_dispatch_time);
-  void DidHandleSyncEvent(int sync_event_id,
-                          mojom::ServiceWorkerEventStatus,
-                          base::TimeTicks event_dispatch_time);
+                                       mojom::ServiceWorkerEventStatus);
+  void DidHandlePushEvent(int push_event_id, mojom::ServiceWorkerEventStatus);
+  void DidHandleSyncEvent(int sync_event_id, mojom::ServiceWorkerEventStatus);
   void DidHandleAbortPaymentEvent(int abort_payment_event_id,
-                                  mojom::ServiceWorkerEventStatus,
-                                  base::TimeTicks event_dispatch_time);
+                                  mojom::ServiceWorkerEventStatus);
   void DidHandleCanMakePaymentEvent(int payment_request_event_id,
-                                    mojom::ServiceWorkerEventStatus,
-                                    base::TimeTicks event_dispatch_time);
+                                    mojom::ServiceWorkerEventStatus);
   void DidHandlePaymentRequestEvent(int payment_request_event_id,
-                                    mojom::ServiceWorkerEventStatus,
-                                    base::TimeTicks event_dispatch_time);
+                                    mojom::ServiceWorkerEventStatus);
 
   void BindServiceWorkerHost(
       mojom::blink::ServiceWorkerHostAssociatedPtrInfo service_worker_host);
diff --git a/third_party/blink/renderer/modules/service_worker/wait_until_observer.cc b/third_party/blink/renderer/modules/service_worker/wait_until_observer.cc
index 1f8680d..dc55259 100644
--- a/third_party/blink/renderer/modules/service_worker/wait_until_observer.cc
+++ b/third_party/blink/renderer/modules/service_worker/wait_until_observer.cc
@@ -111,7 +111,6 @@
 }
 
 void WaitUntilObserver::WillDispatchEvent() {
-  event_dispatch_time_ = WTF::CurrentTimeTicks();
   // When handling a notificationclick, paymentrequest, or backgroundfetchclick
   // event, we want to allow one window to be focused or opened. These calls are
   // allowed between the call to willDispatchEvent() and the last call to
@@ -257,66 +256,55 @@
           : mojom::ServiceWorkerEventStatus::COMPLETED;
   switch (type_) {
     case kAbortPayment:
-      client->DidHandleAbortPaymentEvent(event_id_, status,
-                                         event_dispatch_time_);
+      client->DidHandleAbortPaymentEvent(event_id_, status);
       break;
     case kActivate:
-      client->DidHandleActivateEvent(event_id_, status, event_dispatch_time_);
+      client->DidHandleActivateEvent(event_id_, status);
       break;
     case kCanMakePayment:
-      client->DidHandleCanMakePaymentEvent(event_id_, status,
-                                           event_dispatch_time_);
+      client->DidHandleCanMakePaymentEvent(event_id_, status);
       break;
     case kCookieChange:
-      client->DidHandleCookieChangeEvent(event_id_, status,
-                                         event_dispatch_time_);
+      client->DidHandleCookieChangeEvent(event_id_, status);
       break;
     case kFetch:
-      client->DidHandleFetchEvent(event_id_, status, event_dispatch_time_);
+      client->DidHandleFetchEvent(event_id_, status);
       break;
     case kInstall:
       To<ServiceWorkerGlobalScope>(*execution_context_).SetIsInstalling(false);
-      client->DidHandleInstallEvent(event_id_, status, event_dispatch_time_);
+      client->DidHandleInstallEvent(event_id_, status);
       break;
     case kMessage:
-      client->DidHandleExtendableMessageEvent(event_id_, status,
-                                              event_dispatch_time_);
+      client->DidHandleExtendableMessageEvent(event_id_, status);
       break;
     case kNotificationClick:
-      client->DidHandleNotificationClickEvent(event_id_, status,
-                                              event_dispatch_time_);
+      client->DidHandleNotificationClickEvent(event_id_, status);
       consume_window_interaction_timer_.Stop();
       ConsumeWindowInteraction(nullptr);
       break;
     case kNotificationClose:
-      client->DidHandleNotificationCloseEvent(event_id_, status,
-                                              event_dispatch_time_);
+      client->DidHandleNotificationCloseEvent(event_id_, status);
       break;
     case kPush:
-      client->DidHandlePushEvent(event_id_, status, event_dispatch_time_);
+      client->DidHandlePushEvent(event_id_, status);
       break;
     case kSync:
-      client->DidHandleSyncEvent(event_id_, status, event_dispatch_time_);
+      client->DidHandleSyncEvent(event_id_, status);
       break;
     case kPaymentRequest:
-      client->DidHandlePaymentRequestEvent(event_id_, status,
-                                           event_dispatch_time_);
+      client->DidHandlePaymentRequestEvent(event_id_, status);
       break;
     case kBackgroundFetchAbort:
-      client->DidHandleBackgroundFetchAbortEvent(event_id_, status,
-                                                 event_dispatch_time_);
+      client->DidHandleBackgroundFetchAbortEvent(event_id_, status);
       break;
     case kBackgroundFetchClick:
-      client->DidHandleBackgroundFetchClickEvent(event_id_, status,
-                                                 event_dispatch_time_);
+      client->DidHandleBackgroundFetchClickEvent(event_id_, status);
       break;
     case kBackgroundFetchFail:
-      client->DidHandleBackgroundFetchFailEvent(event_id_, status,
-                                                event_dispatch_time_);
+      client->DidHandleBackgroundFetchFailEvent(event_id_, status);
       break;
     case kBackgroundFetchSuccess:
-      client->DidHandleBackgroundFetchSuccessEvent(event_id_, status,
-                                                   event_dispatch_time_);
+      client->DidHandleBackgroundFetchSuccessEvent(event_id_, status);
       break;
   }
   execution_context_ = nullptr;
diff --git a/third_party/blink/renderer/modules/service_worker/wait_until_observer.h b/third_party/blink/renderer/modules/service_worker/wait_until_observer.h
index fa322d6e..9764493 100644
--- a/third_party/blink/renderer/modules/service_worker/wait_until_observer.h
+++ b/third_party/blink/renderer/modules/service_worker/wait_until_observer.h
@@ -110,7 +110,6 @@
   int pending_promises_ = 0;
   EventDispatchState event_dispatch_state_ = EventDispatchState::kInitial;
   bool has_rejected_promise_ = false;
-  TimeTicks event_dispatch_time_;
   TaskRunnerTimer<WaitUntilObserver> consume_window_interaction_timer_;
 };
 
diff --git a/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc b/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc
index 95ddf43d..418f607 100644
--- a/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc
+++ b/third_party/blink/renderer/platform/graphics/canvas_resource_provider.cc
@@ -512,6 +512,33 @@
   return nullptr;
 }
 
+class CanvasResourceProvider::CanvasImageProvider : public cc::ImageProvider {
+ public:
+  CanvasImageProvider(cc::ImageDecodeCache* cache_n32,
+                      cc::ImageDecodeCache* cache_f16,
+                      const gfx::ColorSpace& target_color_space,
+                      SkColorType target_color_type);
+  ~CanvasImageProvider() override = default;
+
+  // cc::ImageProvider implementation.
+  ScopedDecodedDrawImage GetDecodedDrawImage(const cc::DrawImage&) override;
+
+  void ReleaseLockedImages() { locked_images_.clear(); }
+
+ private:
+  void CanUnlockImage(ScopedDecodedDrawImage);
+  void CleanupLockedImages();
+
+  bool cleanup_task_pending_ = false;
+  std::vector<ScopedDecodedDrawImage> locked_images_;
+  cc::PlaybackImageProvider playback_image_provider_n32_;
+  base::Optional<cc::PlaybackImageProvider> playback_image_provider_f16_;
+
+  base::WeakPtrFactory<CanvasImageProvider> weak_factory_;
+
+  DISALLOW_COPY_AND_ASSIGN(CanvasImageProvider);
+};
+
 CanvasResourceProvider::CanvasImageProvider::CanvasImageProvider(
     cc::ImageDecodeCache* cache_n32,
     cc::ImageDecodeCache* cache_f16,
@@ -530,8 +557,6 @@
   }
 }
 
-CanvasResourceProvider::CanvasImageProvider::~CanvasImageProvider() = default;
-
 cc::ImageProvider::ScopedDecodedDrawImage
 CanvasResourceProvider::CanvasImageProvider::GetDecodedDrawImage(
     const cc::DrawImage& draw_image) {
@@ -557,17 +582,11 @@
     ReleaseLockedImages();
   }
 
-  // It is safe to use base::Unretained, since decodes acquired from a provider
-  // must not exceed the provider's lifetime.
   auto decoded_draw_image = scoped_decoded_image.decoded_image();
   return ScopedDecodedDrawImage(
-      decoded_draw_image,
-      base::BindOnce(&CanvasImageProvider::CanUnlockImage,
-                     base::Unretained(this), std::move(scoped_decoded_image)));
-}
-
-void CanvasResourceProvider::CanvasImageProvider::ReleaseLockedImages() {
-  locked_images_.clear();
+      decoded_draw_image, base::BindOnce(&CanvasImageProvider::CanUnlockImage,
+                                         weak_factory_.GetWeakPtr(),
+                                         std::move(scoped_decoded_image)));
 }
 
 void CanvasResourceProvider::CanvasImageProvider::CanUnlockImage(
@@ -629,10 +648,9 @@
     cc::ImageDecodeCache* cache_f16 = nullptr;
     if (ColorParams().PixelFormat() == kF16CanvasPixelFormat)
       cache_f16 = ImageDecodeCacheF16();
-    canvas_image_provider_.emplace(ImageDecodeCacheRGBA8(), cache_f16,
-                                   target_color_space,
-                                   color_params_.GetSkColorType());
-    cc::ImageProvider* image_provider = &*canvas_image_provider_;
+    canvas_image_provider_ = std::make_unique<CanvasImageProvider>(
+        ImageDecodeCacheRGBA8(), cache_f16, target_color_space,
+        color_params_.GetSkColorType());
 
     cc::SkiaPaintCanvas::ContextFlushes context_flushes;
     if (IsAccelerated() &&
@@ -648,10 +666,11 @@
     if (ColorParams().NeedsSkColorSpaceXformCanvas()) {
       canvas_ = std::make_unique<cc::SkiaPaintCanvas>(
           GetSkSurface()->getCanvas(), ColorParams().GetSkColorSpace(),
-          image_provider, context_flushes);
+          canvas_image_provider_.get(), context_flushes);
     } else {
       canvas_ = std::make_unique<cc::SkiaPaintCanvas>(
-          GetSkSurface()->getCanvas(), image_provider, context_flushes);
+          GetSkSurface()->getCanvas(), canvas_image_provider_.get(),
+          context_flushes);
     }
   }
 
diff --git a/third_party/blink/renderer/platform/graphics/canvas_resource_provider.h b/third_party/blink/renderer/platform/graphics/canvas_resource_provider.h
index 9266694..28d57015 100644
--- a/third_party/blink/renderer/platform/graphics/canvas_resource_provider.h
+++ b/third_party/blink/renderer/platform/graphics/canvas_resource_provider.h
@@ -180,30 +180,7 @@
   cc::PaintImage MakeImageSnapshot();
 
  private:
-  class CanvasImageProvider : public cc::ImageProvider {
-   public:
-    CanvasImageProvider(cc::ImageDecodeCache* cache_n32,
-                        cc::ImageDecodeCache* cache_f16,
-                        const gfx::ColorSpace& target_color_space,
-                        SkColorType target_color_type);
-    ~CanvasImageProvider() override;
-
-    // cc::ImageProvider implementation.
-    ScopedDecodedDrawImage GetDecodedDrawImage(const cc::DrawImage&) override;
-
-    void ReleaseLockedImages();
-
-   private:
-    void CanUnlockImage(ScopedDecodedDrawImage);
-    void CleanupLockedImages();
-
-    bool cleanup_task_pending_ = false;
-    std::vector<ScopedDecodedDrawImage> locked_images_;
-    cc::PlaybackImageProvider playback_image_provider_n32_;
-    base::Optional<cc::PlaybackImageProvider> playback_image_provider_f16_;
-
-    base::WeakPtrFactory<CanvasImageProvider> weak_factory_;
-  };
+  class CanvasImageProvider;
 
   virtual sk_sp<SkSurface> CreateSkSurface() const = 0;
   virtual scoped_refptr<CanvasResource> CreateResource();
@@ -214,7 +191,7 @@
   base::WeakPtr<CanvasResourceDispatcher> resource_dispatcher_;
   IntSize size_;
   CanvasColorParams color_params_;
-  base::Optional<CanvasImageProvider> canvas_image_provider_;
+  std::unique_ptr<CanvasImageProvider> canvas_image_provider_;
   std::unique_ptr<cc::SkiaPaintCanvas> canvas_;
   mutable sk_sp<SkSurface> surface_;  // mutable for lazy init
   std::unique_ptr<SkCanvas> xform_canvas_;
diff --git a/third_party/blink/renderer/platform/scheduler/main_thread/main_thread_unittest.cc b/third_party/blink/renderer/platform/scheduler/main_thread/main_thread_unittest.cc
index 774a2d9..4585e1f 100644
--- a/third_party/blink/renderer/platform/scheduler/main_thread/main_thread_unittest.cc
+++ b/third_party/blink/renderer/platform/scheduler/main_thread/main_thread_unittest.cc
@@ -173,10 +173,9 @@
 void EnterRunLoop(base::MessageLoop* message_loop, Thread* thread) {
   // Note: blink::Threads do not support nested run loops, which is why we use a
   // run loop directly.
-  base::RunLoop run_loop;
+  base::RunLoop run_loop(base::RunLoop::Type::kNestableTasksAllowed);
   message_loop->task_runner()->PostTask(
       FROM_HERE, WTF::Bind(&base::RunLoop::Quit, WTF::Unretained(&run_loop)));
-  message_loop->SetNestableTasksAllowed(true);
   run_loop.Run();
 }
 
diff --git a/third_party/blink/renderer/platform/testing/viewport_layers_setup.cc b/third_party/blink/renderer/platform/testing/viewport_layers_setup.cc
index 8a7b1a7..6275435 100644
--- a/third_party/blink/renderer/platform/testing/viewport_layers_setup.cc
+++ b/third_party/blink/renderer/platform/testing/viewport_layers_setup.cc
@@ -40,8 +40,8 @@
   viewport_layers.inner_viewport_scroll = graphics_layer_->CcLayer();
   layer_tree_->layer_tree_host()->RegisterViewportLayers(viewport_layers);
   layer_tree_->layer_tree_host()->SetViewportSizeAndScale(
-      gfx::Size(1, 1), /*device_scale_factor=*/1.f, viz::LocalSurfaceId(),
-      base::TimeTicks());
+      gfx::Size(1, 1), /*device_scale_factor=*/1.f,
+      viz::LocalSurfaceIdAllocation());
 
   graphics_layer_->SetLayerState(PropertyTreeState(PropertyTreeState::Root()),
                                  IntPoint());
diff --git a/third_party/blink/renderer/platform/web_mouse_event.cc b/third_party/blink/renderer/platform/web_mouse_event.cc
index e21d084..ff5338a 100644
--- a/third_party/blink/renderer/platform/web_mouse_event.cc
+++ b/third_party/blink/renderer/platform/web_mouse_event.cc
@@ -29,11 +29,6 @@
   SetMenuSourceType(gesture_event.GetType());
 }
 
-WebFloatPoint WebMouseEvent::MovementInRootFrame() const {
-  return WebFloatPoint((movement_x / frame_scale_),
-                       (movement_y / frame_scale_));
-}
-
 WebFloatPoint WebMouseEvent::PositionInRootFrame() const {
   return WebFloatPoint(
       (position_in_widget_.x / frame_scale_) + frame_translate_.x,
diff --git a/third_party/blink/renderer/platform/web_pointer_event.cc b/third_party/blink/renderer/platform/web_pointer_event.cc
index c82c078b..8c710c1 100644
--- a/third_party/blink/renderer/platform/web_pointer_event.cc
+++ b/third_party/blink/renderer/platform/web_pointer_event.cc
@@ -90,8 +90,6 @@
     transformed_event.width /= frame_scale_;
   if (HasHeight())
     transformed_event.height /= frame_scale_;
-  transformed_event.movement_x /= frame_scale_;
-  transformed_event.movement_y /= frame_scale_;
   transformed_event.position_in_widget_ =
       WebFloatPoint((transformed_event.PositionInWidget().x / frame_scale_) +
                         frame_translate_.x,
diff --git a/third_party/blink/renderer/platform/web_touch_event.cc b/third_party/blink/renderer/platform/web_touch_event.cc
index 4f6bf26..e358ccb9 100644
--- a/third_party/blink/renderer/platform/web_touch_event.cc
+++ b/third_party/blink/renderer/platform/web_touch_event.cc
@@ -26,8 +26,6 @@
   WebTouchPoint transformed_point = touches[point];
   transformed_point.radius_x /= frame_scale_;
   transformed_point.radius_y /= frame_scale_;
-  transformed_point.movement_x /= frame_scale_;
-  transformed_point.movement_y /= frame_scale_;
   transformed_point.SetPositionInWidget(
       (transformed_point.PositionInWidget().x / frame_scale_) +
           frame_translate_.x,
diff --git a/third_party/byte_buddy/BUILD.gn b/third_party/byte_buddy/BUILD.gn
index b0c1b5d..6e9c9a1 100644
--- a/third_party/byte_buddy/BUILD.gn
+++ b/third_party/byte_buddy/BUILD.gn
@@ -7,17 +7,20 @@
 java_prebuilt("byte_buddy_java") {
   supports_android = true
   testonly = true
+  enable_bytecode_checks = false
   jar_path = "lib/byte-buddy.jar"
 }
 
 java_prebuilt("byte_buddy_agent_java") {
   supports_android = true
   testonly = true
+  enable_bytecode_checks = false
   jar_path = "lib/byte-buddy-agent.jar"
 }
 
 android_java_prebuilt("byte_buddy_android_java") {
   testonly = true
+  enable_bytecode_checks = false
   deps = [
     "//third_party/android_tools:dx_25_0_2_java",
   ]
diff --git a/third_party/libvpx/README.chromium b/third_party/libvpx/README.chromium
index 3f9c046..30877e8 100644
--- a/third_party/libvpx/README.chromium
+++ b/third_party/libvpx/README.chromium
@@ -5,9 +5,9 @@
 License File: source/libvpx/LICENSE
 Security Critical: yes
 
-Date: Monday October 29 2018
+Date: Tuesday November 06 2018
 Branch: master
-Commit: fa0076282e62f649483bde868602aab86448a661
+Commit: 7808cc796ef1b7dde0a5e03f6d71e8a7f0174a1e
 
 Description:
 Contains the sources used to compile libvpx binaries used by Google Chrome and
diff --git a/third_party/libvpx/libvpx_srcs.gni b/third_party/libvpx/libvpx_srcs.gni
index bcfe761c..dc614696 100644
--- a/third_party/libvpx/libvpx_srcs.gni
+++ b/third_party/libvpx/libvpx_srcs.gni
@@ -436,6 +436,7 @@
   "//third_party/libvpx/source/libvpx/vpx_dsp/x86/highbd_variance_sse2.c",
   "//third_party/libvpx/source/libvpx/vpx_dsp/x86/inv_txfm_sse2.c",
   "//third_party/libvpx/source/libvpx/vpx_dsp/x86/loopfilter_sse2.c",
+  "//third_party/libvpx/source/libvpx/vpx_dsp/x86/post_proc_sse2.c",
   "//third_party/libvpx/source/libvpx/vpx_dsp/x86/quantize_sse2.c",
   "//third_party/libvpx/source/libvpx/vpx_dsp/x86/sum_squares_sse2.c",
   "//third_party/libvpx/source/libvpx/vpx_dsp/x86/variance_sse2.c",
@@ -916,6 +917,7 @@
   "//third_party/libvpx/source/libvpx/vpx_dsp/x86/highbd_variance_sse2.c",
   "//third_party/libvpx/source/libvpx/vpx_dsp/x86/inv_txfm_sse2.c",
   "//third_party/libvpx/source/libvpx/vpx_dsp/x86/loopfilter_sse2.c",
+  "//third_party/libvpx/source/libvpx/vpx_dsp/x86/post_proc_sse2.c",
   "//third_party/libvpx/source/libvpx/vpx_dsp/x86/quantize_sse2.c",
   "//third_party/libvpx/source/libvpx/vpx_dsp/x86/sum_squares_sse2.c",
   "//third_party/libvpx/source/libvpx/vpx_dsp/x86/variance_sse2.c",
diff --git a/third_party/libvpx/source/config/ios/arm-neon/vp8_rtcd.h b/third_party/libvpx/source/config/ios/arm-neon/vp8_rtcd.h
index 737afd5..8f2d3e5 100644
--- a/third_party/libvpx/source/config/ios/arm-neon/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/ios/arm-neon/vp8_rtcd.h
@@ -27,68 +27,68 @@
 extern "C" {
 #endif
 
-void vp8_bilinear_predict16x16_c(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_bilinear_predict16x16_c(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-void vp8_bilinear_predict16x16_neon(unsigned char* src,
-                                    int src_pitch,
-                                    int xofst,
-                                    int yofst,
-                                    unsigned char* dst,
+void vp8_bilinear_predict16x16_neon(unsigned char* src_ptr,
+                                    int src_pixels_per_line,
+                                    int xoffset,
+                                    int yoffset,
+                                    unsigned char* dst_ptr,
                                     int dst_pitch);
 #define vp8_bilinear_predict16x16 vp8_bilinear_predict16x16_neon
 
-void vp8_bilinear_predict4x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict4x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict4x4_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict4x4_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_neon
 
-void vp8_bilinear_predict8x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x4_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x4_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_neon
 
-void vp8_bilinear_predict8x8_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x8_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x8_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x8_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict8x8 vp8_bilinear_predict8x8_neon
 
 void vp8_blend_b_c(unsigned char* y,
                    unsigned char* u,
                    unsigned char* v,
-                   int y1,
-                   int u1,
-                   int v1,
+                   int y_1,
+                   int u_1,
+                   int v_1,
                    int alpha,
                    int stride);
 #define vp8_blend_b vp8_blend_b_c
@@ -96,9 +96,9 @@
 void vp8_blend_mb_inner_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_inner vp8_blend_mb_inner_c
@@ -106,9 +106,9 @@
 void vp8_blend_mb_outer_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_outer vp8_blend_mb_outer_c
@@ -117,44 +117,44 @@
 #define vp8_block_error vp8_block_error_c
 
 void vp8_copy_mem16x16_c(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 void vp8_copy_mem16x16_neon(unsigned char* src,
-                            int src_pitch,
+                            int src_stride,
                             unsigned char* dst,
-                            int dst_pitch);
+                            int dst_stride);
 #define vp8_copy_mem16x16 vp8_copy_mem16x16_neon
 
 void vp8_copy_mem8x4_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 void vp8_copy_mem8x4_neon(unsigned char* src,
-                          int src_pitch,
+                          int src_stride,
                           unsigned char* dst,
-                          int dst_pitch);
+                          int dst_stride);
 #define vp8_copy_mem8x4 vp8_copy_mem8x4_neon
 
 void vp8_copy_mem8x8_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 void vp8_copy_mem8x8_neon(unsigned char* src,
-                          int src_pitch,
+                          int src_stride,
                           unsigned char* dst,
-                          int dst_pitch);
+                          int dst_stride);
 #define vp8_copy_mem8x8 vp8_copy_mem8x8_neon
 
-void vp8_dc_only_idct_add_c(short input,
-                            unsigned char* pred,
+void vp8_dc_only_idct_add_c(short input_dc,
+                            unsigned char* pred_ptr,
                             int pred_stride,
-                            unsigned char* dst,
+                            unsigned char* dst_ptr,
                             int dst_stride);
-void vp8_dc_only_idct_add_neon(short input,
-                               unsigned char* pred,
+void vp8_dc_only_idct_add_neon(short input_dc,
+                               unsigned char* pred_ptr,
                                int pred_stride,
-                               unsigned char* dst,
+                               unsigned char* dst_ptr,
                                int dst_stride);
 #define vp8_dc_only_idct_add vp8_dc_only_idct_add_neon
 
@@ -196,11 +196,11 @@
 
 void vp8_dequant_idct_add_c(short* input,
                             short* dq,
-                            unsigned char* output,
+                            unsigned char* dest,
                             int stride);
 void vp8_dequant_idct_add_neon(short* input,
                                short* dq,
-                               unsigned char* output,
+                               unsigned char* dest,
                                int stride);
 #define vp8_dequant_idct_add vp8_dequant_idct_add_neon
 
@@ -230,8 +230,8 @@
                                        char* eobs);
 #define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_neon
 
-void vp8_dequantize_b_c(struct blockd*, short* dqc);
-void vp8_dequantize_b_neon(struct blockd*, short* dqc);
+void vp8_dequantize_b_c(struct blockd*, short* DQC);
+void vp8_dequantize_b_neon(struct blockd*, short* DQC);
 #define vp8_dequantize_b vp8_dequantize_b_neon
 
 int vp8_diamond_search_sad_c(struct macroblock* x,
@@ -283,91 +283,91 @@
                           union int_mv* center_mv);
 #define vp8_full_search_sad vp8_full_search_sad_c
 
-void vp8_loop_filter_bh_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bh_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bh_neon(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bh_neon(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
 #define vp8_loop_filter_bh vp8_loop_filter_bh_neon
 
-void vp8_loop_filter_bv_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bv_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bv_neon(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bv_neon(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
 #define vp8_loop_filter_bv vp8_loop_filter_bv_neon
 
-void vp8_loop_filter_mbh_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbh_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbh_neon(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbh_neon(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbh vp8_loop_filter_mbh_neon
 
-void vp8_loop_filter_mbv_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbv_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbv_neon(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbv_neon(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbv vp8_loop_filter_mbv_neon
 
-void vp8_loop_filter_bhs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bhs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bhs_neon(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bhs_neon(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_neon
 
-void vp8_loop_filter_bvs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bvs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bvs_neon(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bvs_neon(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_neon
 
-void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y,
-                                              int ystride,
+void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y_ptr,
+                                              int y_stride,
                                               const unsigned char* blimit);
-void vp8_loop_filter_mbhs_neon(unsigned char* y,
-                               int ystride,
+void vp8_loop_filter_mbhs_neon(unsigned char* y_ptr,
+                               int y_stride,
                                const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbh vp8_loop_filter_mbhs_neon
 
-void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y,
-                                            int ystride,
+void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y_ptr,
+                                            int y_stride,
                                             const unsigned char* blimit);
-void vp8_loop_filter_mbvs_neon(unsigned char* y,
-                               int ystride,
+void vp8_loop_filter_mbvs_neon(unsigned char* y_ptr,
+                               int y_stride,
                                const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbv vp8_loop_filter_mbvs_neon
 
@@ -381,8 +381,8 @@
                               struct block* b,
                               struct blockd* d,
                               union int_mv* ref_mv,
-                              int sad_per_bit,
-                              int distance,
+                              int error_per_bit,
+                              int search_range,
                               struct variance_vtable* fn_ptr,
                               int* mvcost[2],
                               union int_mv* center_mv);
@@ -400,81 +400,81 @@
 #define vp8_short_fdct8x4 vp8_short_fdct8x4_neon
 
 void vp8_short_idct4x4llm_c(short* input,
-                            unsigned char* pred,
-                            int pitch,
-                            unsigned char* dst,
+                            unsigned char* pred_ptr,
+                            int pred_stride,
+                            unsigned char* dst_ptr,
                             int dst_stride);
 void vp8_short_idct4x4llm_neon(short* input,
-                               unsigned char* pred,
-                               int pitch,
-                               unsigned char* dst,
+                               unsigned char* pred_ptr,
+                               int pred_stride,
+                               unsigned char* dst_ptr,
                                int dst_stride);
 #define vp8_short_idct4x4llm vp8_short_idct4x4llm_neon
 
-void vp8_short_inv_walsh4x4_c(short* input, short* output);
-void vp8_short_inv_walsh4x4_neon(short* input, short* output);
+void vp8_short_inv_walsh4x4_c(short* input, short* mb_dqcoeff);
+void vp8_short_inv_walsh4x4_neon(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_neon
 
-void vp8_short_inv_walsh4x4_1_c(short* input, short* output);
+void vp8_short_inv_walsh4x4_1_c(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c
 
 void vp8_short_walsh4x4_c(short* input, short* output, int pitch);
 void vp8_short_walsh4x4_neon(short* input, short* output, int pitch);
 #define vp8_short_walsh4x4 vp8_short_walsh4x4_neon
 
-void vp8_sixtap_predict16x16_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_sixtap_predict16x16_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_sixtap_predict16x16_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_sixtap_predict16x16_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_sixtap_predict16x16 vp8_sixtap_predict16x16_neon
 
-void vp8_sixtap_predict4x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict4x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict4x4_neon(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict4x4_neon(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
 #define vp8_sixtap_predict4x4 vp8_sixtap_predict4x4_neon
 
-void vp8_sixtap_predict8x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x4_neon(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x4_neon(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
 #define vp8_sixtap_predict8x4 vp8_sixtap_predict8x4_neon
 
-void vp8_sixtap_predict8x8_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x8_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x8_neon(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x8_neon(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
 #define vp8_sixtap_predict8x8 vp8_sixtap_predict8x8_neon
 
diff --git a/third_party/libvpx/source/config/ios/arm-neon/vp9_rtcd.h b/third_party/libvpx/source/config/ios/arm-neon/vp9_rtcd.h
index 309c7808..cdfebccf 100644
--- a/third_party/libvpx/source/config/ios/arm-neon/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/ios/arm-neon/vp9_rtcd.h
@@ -140,12 +140,12 @@
 #define vp9_fwht4x4 vp9_fwht4x4_c
 
 void vp9_iht16x16_256_add_c(const tran_low_t* input,
-                            uint8_t* output,
-                            int pitch,
+                            uint8_t* dest,
+                            int stride,
                             int tx_type);
 void vp9_iht16x16_256_add_neon(const tran_low_t* input,
-                               uint8_t* output,
-                               int pitch,
+                               uint8_t* dest,
+                               int stride,
                                int tx_type);
 #define vp9_iht16x16_256_add vp9_iht16x16_256_add_neon
 
diff --git a/third_party/libvpx/source/config/ios/arm-neon/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/ios/arm-neon/vpx_dsp_rtcd.h
index 453e90e..abd9cbd 100644
--- a/third_party/libvpx/source/config/ios/arm-neon/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/ios/arm-neon/vpx_dsp_rtcd.h
@@ -235,349 +235,349 @@
 #define vpx_convolve_copy vpx_convolve_copy_neon
 
 void vpx_d117_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c
 
 void vpx_d117_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c
 
 void vpx_d117_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c
 
 void vpx_d117_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c
 
 void vpx_d135_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d135_predictor_16x16_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_neon
 
 void vpx_d135_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d135_predictor_32x32_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_neon
 
 void vpx_d135_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d135_predictor_4x4_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_neon
 
 void vpx_d135_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d135_predictor_8x8_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_neon
 
 void vpx_d153_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d153_predictor_16x16 vpx_d153_predictor_16x16_c
 
 void vpx_d153_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d153_predictor_32x32 vpx_d153_predictor_32x32_c
 
 void vpx_d153_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d153_predictor_4x4 vpx_d153_predictor_4x4_c
 
 void vpx_d153_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d153_predictor_8x8 vpx_d153_predictor_8x8_c
 
 void vpx_d207_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d207_predictor_16x16 vpx_d207_predictor_16x16_c
 
 void vpx_d207_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d207_predictor_32x32 vpx_d207_predictor_32x32_c
 
 void vpx_d207_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_c
 
 void vpx_d207_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d207_predictor_8x8 vpx_d207_predictor_8x8_c
 
 void vpx_d45_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_16x16_neon(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_d45_predictor_16x16 vpx_d45_predictor_16x16_neon
 
 void vpx_d45_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_32x32_neon(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_d45_predictor_32x32 vpx_d45_predictor_32x32_neon
 
 void vpx_d45_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_4x4_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_neon
 
 void vpx_d45_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_8x8_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_neon
 
 void vpx_d45e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c
 
 void vpx_d63_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d63_predictor_16x16 vpx_d63_predictor_16x16_c
 
 void vpx_d63_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d63_predictor_32x32 vpx_d63_predictor_32x32_c
 
 void vpx_d63_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d63_predictor_4x4 vpx_d63_predictor_4x4_c
 
 void vpx_d63_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d63_predictor_8x8 vpx_d63_predictor_8x8_c
 
 void vpx_d63e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c
 
 void vpx_dc_128_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_16x16_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_neon
 
 void vpx_dc_128_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_32x32_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_neon
 
 void vpx_dc_128_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_4x4_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_neon
 
 void vpx_dc_128_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_8x8_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_neon
 
 void vpx_dc_left_predictor_16x16_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_16x16_neon(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 #define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_neon
 
 void vpx_dc_left_predictor_32x32_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_32x32_neon(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 #define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_neon
 
 void vpx_dc_left_predictor_4x4_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_4x4_neon(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 #define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_neon
 
 void vpx_dc_left_predictor_8x8_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_8x8_neon(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 #define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_neon
 
 void vpx_dc_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_16x16_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_neon
 
 void vpx_dc_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_32x32_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_neon
 
 void vpx_dc_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_4x4_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_neon
 
 void vpx_dc_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_8x8_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_neon
 
 void vpx_dc_top_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_16x16_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_neon
 
 void vpx_dc_top_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_32x32_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_neon
 
 void vpx_dc_top_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_4x4_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_neon
 
 void vpx_dc_top_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_8x8_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_neon
@@ -621,13 +621,13 @@
 #define vpx_fdct8x8_1 vpx_fdct8x8_1_neon
 
 void vpx_get16x16var_c(const uint8_t* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        const uint8_t* ref_ptr,
                        int ref_stride,
                        unsigned int* sse,
                        int* sum);
 void vpx_get16x16var_neon(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
                           int ref_stride,
                           unsigned int* sse,
@@ -635,23 +635,23 @@
 #define vpx_get16x16var vpx_get16x16var_neon
 
 unsigned int vpx_get4x4sse_cs_c(const unsigned char* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const unsigned char* ref_ptr,
                                 int ref_stride);
 unsigned int vpx_get4x4sse_cs_neon(const unsigned char* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const unsigned char* ref_ptr,
                                    int ref_stride);
 #define vpx_get4x4sse_cs vpx_get4x4sse_cs_neon
 
 void vpx_get8x8var_c(const uint8_t* src_ptr,
-                     int source_stride,
+                     int src_stride,
                      const uint8_t* ref_ptr,
                      int ref_stride,
                      unsigned int* sse,
                      int* sum);
 void vpx_get8x8var_neon(const uint8_t* src_ptr,
-                        int source_stride,
+                        int src_stride,
                         const uint8_t* ref_ptr,
                         int ref_stride,
                         unsigned int* sse,
@@ -662,41 +662,41 @@
 #define vpx_get_mb_ss vpx_get_mb_ss_c
 
 void vpx_h_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_16x16_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_h_predictor_16x16 vpx_h_predictor_16x16_neon
 
 void vpx_h_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_32x32_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_h_predictor_32x32 vpx_h_predictor_32x32_neon
 
 void vpx_h_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_4x4_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_h_predictor_4x4 vpx_h_predictor_4x4_neon
 
 void vpx_h_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_8x8_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_h_predictor_8x8 vpx_h_predictor_8x8_neon
@@ -723,7 +723,7 @@
 #define vpx_hadamard_8x8 vpx_hadamard_8x8_neon
 
 void vpx_he_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c
@@ -996,12 +996,12 @@
                                   const uint8_t* thresh1);
 #define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_neon
 
-void vpx_mbpost_proc_across_ip_c(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_c(unsigned char* src,
                                  int pitch,
                                  int rows,
                                  int cols,
                                  int flimit);
-void vpx_mbpost_proc_across_ip_neon(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_neon(unsigned char* src,
                                     int pitch,
                                     int rows,
                                     int cols,
@@ -1035,35 +1035,35 @@
 #define vpx_minmax_8x8 vpx_minmax_8x8_neon
 
 unsigned int vpx_mse16x16_c(const uint8_t* src_ptr,
-                            int source_stride,
+                            int src_stride,
                             const uint8_t* ref_ptr,
-                            int recon_stride,
+                            int ref_stride,
                             unsigned int* sse);
 unsigned int vpx_mse16x16_neon(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
-                               int recon_stride,
+                               int ref_stride,
                                unsigned int* sse);
 #define vpx_mse16x16 vpx_mse16x16_neon
 
 unsigned int vpx_mse16x8_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 #define vpx_mse16x8 vpx_mse16x8_c
 
 unsigned int vpx_mse8x16_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 #define vpx_mse8x16 vpx_mse8x16_c
 
 unsigned int vpx_mse8x8_c(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
-                          int recon_stride,
+                          int ref_stride,
                           unsigned int* sse);
 #define vpx_mse8x8 vpx_mse8x8_c
 
@@ -1180,12 +1180,12 @@
 
 void vpx_sad16x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x16x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad16x16x4d vpx_sad16x16x4d_neon
@@ -1221,12 +1221,12 @@
 
 void vpx_sad16x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x32x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad16x32x4d vpx_sad16x32x4d_neon
@@ -1262,12 +1262,12 @@
 
 void vpx_sad16x8x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad16x8x4d_neon(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 #define vpx_sad16x8x4d vpx_sad16x8x4d_neon
@@ -1303,12 +1303,12 @@
 
 void vpx_sad32x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x16x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x16x4d vpx_sad32x16x4d_neon
@@ -1337,12 +1337,12 @@
 
 void vpx_sad32x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x32x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x32x4d vpx_sad32x32x4d_neon
@@ -1371,12 +1371,12 @@
 
 void vpx_sad32x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x64x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x64x4d vpx_sad32x64x4d_neon
@@ -1412,12 +1412,12 @@
 
 void vpx_sad4x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x4x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad4x4x4d vpx_sad4x4x4d_neon
@@ -1453,12 +1453,12 @@
 
 void vpx_sad4x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x8x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad4x8x4d vpx_sad4x8x4d_neon
@@ -1487,12 +1487,12 @@
 
 void vpx_sad64x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x32x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad64x32x4d vpx_sad64x32x4d_neon
@@ -1521,12 +1521,12 @@
 
 void vpx_sad64x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x64x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad64x64x4d vpx_sad64x64x4d_neon
@@ -1562,12 +1562,12 @@
 
 void vpx_sad8x16x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad8x16x4d_neon(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 #define vpx_sad8x16x4d vpx_sad8x16x4d_neon
@@ -1603,12 +1603,12 @@
 
 void vpx_sad8x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x4x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad8x4x4d vpx_sad8x4x4d_neon
@@ -1644,12 +1644,12 @@
 
 void vpx_sad8x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x8x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad8x8x4d vpx_sad8x8x4d_neon
@@ -1755,17 +1755,17 @@
 #define vpx_scaled_vert vpx_scaled_vert_c
 
 uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x16_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1773,17 +1773,17 @@
 #define vpx_sub_pixel_avg_variance16x16 vpx_sub_pixel_avg_variance16x16_neon
 
 uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x32_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1791,17 +1791,17 @@
 #define vpx_sub_pixel_avg_variance16x32 vpx_sub_pixel_avg_variance16x32_neon
 
 uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x8_neon(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
@@ -1809,17 +1809,17 @@
 #define vpx_sub_pixel_avg_variance16x8 vpx_sub_pixel_avg_variance16x8_neon
 
 uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x16_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1827,17 +1827,17 @@
 #define vpx_sub_pixel_avg_variance32x16 vpx_sub_pixel_avg_variance32x16_neon
 
 uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x32_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1845,17 +1845,17 @@
 #define vpx_sub_pixel_avg_variance32x32 vpx_sub_pixel_avg_variance32x32_neon
 
 uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x64_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1863,17 +1863,17 @@
 #define vpx_sub_pixel_avg_variance32x64 vpx_sub_pixel_avg_variance32x64_neon
 
 uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x4_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
@@ -1881,17 +1881,17 @@
 #define vpx_sub_pixel_avg_variance4x4 vpx_sub_pixel_avg_variance4x4_neon
 
 uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x8_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
@@ -1899,17 +1899,17 @@
 #define vpx_sub_pixel_avg_variance4x8 vpx_sub_pixel_avg_variance4x8_neon
 
 uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x32_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1917,17 +1917,17 @@
 #define vpx_sub_pixel_avg_variance64x32 vpx_sub_pixel_avg_variance64x32_neon
 
 uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x64_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1935,17 +1935,17 @@
 #define vpx_sub_pixel_avg_variance64x64 vpx_sub_pixel_avg_variance64x64_neon
 
 uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x16_neon(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
@@ -1953,17 +1953,17 @@
 #define vpx_sub_pixel_avg_variance8x16 vpx_sub_pixel_avg_variance8x16_neon
 
 uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x4_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
@@ -1971,17 +1971,17 @@
 #define vpx_sub_pixel_avg_variance8x4 vpx_sub_pixel_avg_variance8x4_neon
 
 uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x8_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
@@ -1989,208 +1989,208 @@
 #define vpx_sub_pixel_avg_variance8x8 vpx_sub_pixel_avg_variance8x8_neon
 
 uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x16_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance16x16 vpx_sub_pixel_variance16x16_neon
 
 uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x32_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance16x32 vpx_sub_pixel_variance16x32_neon
 
 uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x8_neon(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 #define vpx_sub_pixel_variance16x8 vpx_sub_pixel_variance16x8_neon
 
 uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x16_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance32x16 vpx_sub_pixel_variance32x16_neon
 
 uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x32_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance32x32 vpx_sub_pixel_variance32x32_neon
 
 uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x64_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance32x64 vpx_sub_pixel_variance32x64_neon
 
 uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x4_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 #define vpx_sub_pixel_variance4x4 vpx_sub_pixel_variance4x4_neon
 
 uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x8_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 #define vpx_sub_pixel_variance4x8 vpx_sub_pixel_variance4x8_neon
 
 uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x32_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance64x32 vpx_sub_pixel_variance64x32_neon
 
 uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x64_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance64x64 vpx_sub_pixel_variance64x64_neon
 
 uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x16_neon(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 #define vpx_sub_pixel_variance8x16 vpx_sub_pixel_variance8x16_neon
 
 uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x4_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 #define vpx_sub_pixel_variance8x4 vpx_sub_pixel_variance8x4_neon
 
 uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x8_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
@@ -2219,243 +2219,243 @@
 #define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_neon
 
 void vpx_tm_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_16x16_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_neon
 
 void vpx_tm_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_32x32_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_neon
 
 void vpx_tm_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_4x4_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_neon
 
 void vpx_tm_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_8x8_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_neon
 
 void vpx_v_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_16x16_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_v_predictor_16x16 vpx_v_predictor_16x16_neon
 
 void vpx_v_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_32x32_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_v_predictor_32x32 vpx_v_predictor_32x32_neon
 
 void vpx_v_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_4x4_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_v_predictor_4x4 vpx_v_predictor_4x4_neon
 
 void vpx_v_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_8x8_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_v_predictor_8x8 vpx_v_predictor_8x8_neon
 
 unsigned int vpx_variance16x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x16_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance16x16 vpx_variance16x16_neon
 
 unsigned int vpx_variance16x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x32_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance16x32 vpx_variance16x32_neon
 
 unsigned int vpx_variance16x8_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance16x8_neon(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 #define vpx_variance16x8 vpx_variance16x8_neon
 
 unsigned int vpx_variance32x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x16_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance32x16 vpx_variance32x16_neon
 
 unsigned int vpx_variance32x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x32_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance32x32 vpx_variance32x32_neon
 
 unsigned int vpx_variance32x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x64_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance32x64 vpx_variance32x64_neon
 
 unsigned int vpx_variance4x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x4_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance4x4 vpx_variance4x4_neon
 
 unsigned int vpx_variance4x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x8_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance4x8 vpx_variance4x8_neon
 
 unsigned int vpx_variance64x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x32_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance64x32 vpx_variance64x32_neon
 
 unsigned int vpx_variance64x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x64_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance64x64 vpx_variance64x64_neon
 
 unsigned int vpx_variance8x16_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance8x16_neon(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 #define vpx_variance8x16 vpx_variance8x16_neon
 
 unsigned int vpx_variance8x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x4_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance8x4 vpx_variance8x4_neon
 
 unsigned int vpx_variance8x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x8_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance8x8 vpx_variance8x8_neon
 
 void vpx_ve_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c
diff --git a/third_party/libvpx/source/config/ios/arm64/vp8_rtcd.h b/third_party/libvpx/source/config/ios/arm64/vp8_rtcd.h
index 737afd5..8f2d3e5 100644
--- a/third_party/libvpx/source/config/ios/arm64/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/ios/arm64/vp8_rtcd.h
@@ -27,68 +27,68 @@
 extern "C" {
 #endif
 
-void vp8_bilinear_predict16x16_c(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_bilinear_predict16x16_c(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-void vp8_bilinear_predict16x16_neon(unsigned char* src,
-                                    int src_pitch,
-                                    int xofst,
-                                    int yofst,
-                                    unsigned char* dst,
+void vp8_bilinear_predict16x16_neon(unsigned char* src_ptr,
+                                    int src_pixels_per_line,
+                                    int xoffset,
+                                    int yoffset,
+                                    unsigned char* dst_ptr,
                                     int dst_pitch);
 #define vp8_bilinear_predict16x16 vp8_bilinear_predict16x16_neon
 
-void vp8_bilinear_predict4x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict4x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict4x4_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict4x4_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_neon
 
-void vp8_bilinear_predict8x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x4_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x4_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_neon
 
-void vp8_bilinear_predict8x8_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x8_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x8_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x8_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict8x8 vp8_bilinear_predict8x8_neon
 
 void vp8_blend_b_c(unsigned char* y,
                    unsigned char* u,
                    unsigned char* v,
-                   int y1,
-                   int u1,
-                   int v1,
+                   int y_1,
+                   int u_1,
+                   int v_1,
                    int alpha,
                    int stride);
 #define vp8_blend_b vp8_blend_b_c
@@ -96,9 +96,9 @@
 void vp8_blend_mb_inner_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_inner vp8_blend_mb_inner_c
@@ -106,9 +106,9 @@
 void vp8_blend_mb_outer_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_outer vp8_blend_mb_outer_c
@@ -117,44 +117,44 @@
 #define vp8_block_error vp8_block_error_c
 
 void vp8_copy_mem16x16_c(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 void vp8_copy_mem16x16_neon(unsigned char* src,
-                            int src_pitch,
+                            int src_stride,
                             unsigned char* dst,
-                            int dst_pitch);
+                            int dst_stride);
 #define vp8_copy_mem16x16 vp8_copy_mem16x16_neon
 
 void vp8_copy_mem8x4_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 void vp8_copy_mem8x4_neon(unsigned char* src,
-                          int src_pitch,
+                          int src_stride,
                           unsigned char* dst,
-                          int dst_pitch);
+                          int dst_stride);
 #define vp8_copy_mem8x4 vp8_copy_mem8x4_neon
 
 void vp8_copy_mem8x8_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 void vp8_copy_mem8x8_neon(unsigned char* src,
-                          int src_pitch,
+                          int src_stride,
                           unsigned char* dst,
-                          int dst_pitch);
+                          int dst_stride);
 #define vp8_copy_mem8x8 vp8_copy_mem8x8_neon
 
-void vp8_dc_only_idct_add_c(short input,
-                            unsigned char* pred,
+void vp8_dc_only_idct_add_c(short input_dc,
+                            unsigned char* pred_ptr,
                             int pred_stride,
-                            unsigned char* dst,
+                            unsigned char* dst_ptr,
                             int dst_stride);
-void vp8_dc_only_idct_add_neon(short input,
-                               unsigned char* pred,
+void vp8_dc_only_idct_add_neon(short input_dc,
+                               unsigned char* pred_ptr,
                                int pred_stride,
-                               unsigned char* dst,
+                               unsigned char* dst_ptr,
                                int dst_stride);
 #define vp8_dc_only_idct_add vp8_dc_only_idct_add_neon
 
@@ -196,11 +196,11 @@
 
 void vp8_dequant_idct_add_c(short* input,
                             short* dq,
-                            unsigned char* output,
+                            unsigned char* dest,
                             int stride);
 void vp8_dequant_idct_add_neon(short* input,
                                short* dq,
-                               unsigned char* output,
+                               unsigned char* dest,
                                int stride);
 #define vp8_dequant_idct_add vp8_dequant_idct_add_neon
 
@@ -230,8 +230,8 @@
                                        char* eobs);
 #define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_neon
 
-void vp8_dequantize_b_c(struct blockd*, short* dqc);
-void vp8_dequantize_b_neon(struct blockd*, short* dqc);
+void vp8_dequantize_b_c(struct blockd*, short* DQC);
+void vp8_dequantize_b_neon(struct blockd*, short* DQC);
 #define vp8_dequantize_b vp8_dequantize_b_neon
 
 int vp8_diamond_search_sad_c(struct macroblock* x,
@@ -283,91 +283,91 @@
                           union int_mv* center_mv);
 #define vp8_full_search_sad vp8_full_search_sad_c
 
-void vp8_loop_filter_bh_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bh_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bh_neon(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bh_neon(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
 #define vp8_loop_filter_bh vp8_loop_filter_bh_neon
 
-void vp8_loop_filter_bv_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bv_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bv_neon(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bv_neon(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
 #define vp8_loop_filter_bv vp8_loop_filter_bv_neon
 
-void vp8_loop_filter_mbh_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbh_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbh_neon(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbh_neon(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbh vp8_loop_filter_mbh_neon
 
-void vp8_loop_filter_mbv_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbv_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbv_neon(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbv_neon(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbv vp8_loop_filter_mbv_neon
 
-void vp8_loop_filter_bhs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bhs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bhs_neon(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bhs_neon(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_neon
 
-void vp8_loop_filter_bvs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bvs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bvs_neon(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bvs_neon(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_neon
 
-void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y,
-                                              int ystride,
+void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y_ptr,
+                                              int y_stride,
                                               const unsigned char* blimit);
-void vp8_loop_filter_mbhs_neon(unsigned char* y,
-                               int ystride,
+void vp8_loop_filter_mbhs_neon(unsigned char* y_ptr,
+                               int y_stride,
                                const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbh vp8_loop_filter_mbhs_neon
 
-void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y,
-                                            int ystride,
+void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y_ptr,
+                                            int y_stride,
                                             const unsigned char* blimit);
-void vp8_loop_filter_mbvs_neon(unsigned char* y,
-                               int ystride,
+void vp8_loop_filter_mbvs_neon(unsigned char* y_ptr,
+                               int y_stride,
                                const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbv vp8_loop_filter_mbvs_neon
 
@@ -381,8 +381,8 @@
                               struct block* b,
                               struct blockd* d,
                               union int_mv* ref_mv,
-                              int sad_per_bit,
-                              int distance,
+                              int error_per_bit,
+                              int search_range,
                               struct variance_vtable* fn_ptr,
                               int* mvcost[2],
                               union int_mv* center_mv);
@@ -400,81 +400,81 @@
 #define vp8_short_fdct8x4 vp8_short_fdct8x4_neon
 
 void vp8_short_idct4x4llm_c(short* input,
-                            unsigned char* pred,
-                            int pitch,
-                            unsigned char* dst,
+                            unsigned char* pred_ptr,
+                            int pred_stride,
+                            unsigned char* dst_ptr,
                             int dst_stride);
 void vp8_short_idct4x4llm_neon(short* input,
-                               unsigned char* pred,
-                               int pitch,
-                               unsigned char* dst,
+                               unsigned char* pred_ptr,
+                               int pred_stride,
+                               unsigned char* dst_ptr,
                                int dst_stride);
 #define vp8_short_idct4x4llm vp8_short_idct4x4llm_neon
 
-void vp8_short_inv_walsh4x4_c(short* input, short* output);
-void vp8_short_inv_walsh4x4_neon(short* input, short* output);
+void vp8_short_inv_walsh4x4_c(short* input, short* mb_dqcoeff);
+void vp8_short_inv_walsh4x4_neon(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_neon
 
-void vp8_short_inv_walsh4x4_1_c(short* input, short* output);
+void vp8_short_inv_walsh4x4_1_c(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c
 
 void vp8_short_walsh4x4_c(short* input, short* output, int pitch);
 void vp8_short_walsh4x4_neon(short* input, short* output, int pitch);
 #define vp8_short_walsh4x4 vp8_short_walsh4x4_neon
 
-void vp8_sixtap_predict16x16_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_sixtap_predict16x16_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_sixtap_predict16x16_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_sixtap_predict16x16_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_sixtap_predict16x16 vp8_sixtap_predict16x16_neon
 
-void vp8_sixtap_predict4x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict4x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict4x4_neon(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict4x4_neon(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
 #define vp8_sixtap_predict4x4 vp8_sixtap_predict4x4_neon
 
-void vp8_sixtap_predict8x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x4_neon(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x4_neon(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
 #define vp8_sixtap_predict8x4 vp8_sixtap_predict8x4_neon
 
-void vp8_sixtap_predict8x8_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x8_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x8_neon(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x8_neon(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
 #define vp8_sixtap_predict8x8 vp8_sixtap_predict8x8_neon
 
diff --git a/third_party/libvpx/source/config/ios/arm64/vp9_rtcd.h b/third_party/libvpx/source/config/ios/arm64/vp9_rtcd.h
index 309c7808..cdfebccf 100644
--- a/third_party/libvpx/source/config/ios/arm64/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/ios/arm64/vp9_rtcd.h
@@ -140,12 +140,12 @@
 #define vp9_fwht4x4 vp9_fwht4x4_c
 
 void vp9_iht16x16_256_add_c(const tran_low_t* input,
-                            uint8_t* output,
-                            int pitch,
+                            uint8_t* dest,
+                            int stride,
                             int tx_type);
 void vp9_iht16x16_256_add_neon(const tran_low_t* input,
-                               uint8_t* output,
-                               int pitch,
+                               uint8_t* dest,
+                               int stride,
                                int tx_type);
 #define vp9_iht16x16_256_add vp9_iht16x16_256_add_neon
 
diff --git a/third_party/libvpx/source/config/ios/arm64/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/ios/arm64/vpx_dsp_rtcd.h
index 453e90e..abd9cbd 100644
--- a/third_party/libvpx/source/config/ios/arm64/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/ios/arm64/vpx_dsp_rtcd.h
@@ -235,349 +235,349 @@
 #define vpx_convolve_copy vpx_convolve_copy_neon
 
 void vpx_d117_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c
 
 void vpx_d117_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c
 
 void vpx_d117_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c
 
 void vpx_d117_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c
 
 void vpx_d135_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d135_predictor_16x16_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_neon
 
 void vpx_d135_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d135_predictor_32x32_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_neon
 
 void vpx_d135_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d135_predictor_4x4_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_neon
 
 void vpx_d135_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d135_predictor_8x8_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_neon
 
 void vpx_d153_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d153_predictor_16x16 vpx_d153_predictor_16x16_c
 
 void vpx_d153_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d153_predictor_32x32 vpx_d153_predictor_32x32_c
 
 void vpx_d153_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d153_predictor_4x4 vpx_d153_predictor_4x4_c
 
 void vpx_d153_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d153_predictor_8x8 vpx_d153_predictor_8x8_c
 
 void vpx_d207_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d207_predictor_16x16 vpx_d207_predictor_16x16_c
 
 void vpx_d207_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d207_predictor_32x32 vpx_d207_predictor_32x32_c
 
 void vpx_d207_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_c
 
 void vpx_d207_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d207_predictor_8x8 vpx_d207_predictor_8x8_c
 
 void vpx_d45_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_16x16_neon(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_d45_predictor_16x16 vpx_d45_predictor_16x16_neon
 
 void vpx_d45_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_32x32_neon(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_d45_predictor_32x32 vpx_d45_predictor_32x32_neon
 
 void vpx_d45_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_4x4_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_neon
 
 void vpx_d45_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_8x8_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_neon
 
 void vpx_d45e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c
 
 void vpx_d63_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d63_predictor_16x16 vpx_d63_predictor_16x16_c
 
 void vpx_d63_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d63_predictor_32x32 vpx_d63_predictor_32x32_c
 
 void vpx_d63_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d63_predictor_4x4 vpx_d63_predictor_4x4_c
 
 void vpx_d63_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d63_predictor_8x8 vpx_d63_predictor_8x8_c
 
 void vpx_d63e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c
 
 void vpx_dc_128_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_16x16_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_neon
 
 void vpx_dc_128_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_32x32_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_neon
 
 void vpx_dc_128_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_4x4_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_neon
 
 void vpx_dc_128_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_8x8_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_neon
 
 void vpx_dc_left_predictor_16x16_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_16x16_neon(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 #define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_neon
 
 void vpx_dc_left_predictor_32x32_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_32x32_neon(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 #define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_neon
 
 void vpx_dc_left_predictor_4x4_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_4x4_neon(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 #define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_neon
 
 void vpx_dc_left_predictor_8x8_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_8x8_neon(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 #define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_neon
 
 void vpx_dc_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_16x16_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_neon
 
 void vpx_dc_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_32x32_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_neon
 
 void vpx_dc_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_4x4_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_neon
 
 void vpx_dc_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_8x8_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_neon
 
 void vpx_dc_top_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_16x16_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_neon
 
 void vpx_dc_top_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_32x32_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_neon
 
 void vpx_dc_top_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_4x4_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_neon
 
 void vpx_dc_top_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_8x8_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_neon
@@ -621,13 +621,13 @@
 #define vpx_fdct8x8_1 vpx_fdct8x8_1_neon
 
 void vpx_get16x16var_c(const uint8_t* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        const uint8_t* ref_ptr,
                        int ref_stride,
                        unsigned int* sse,
                        int* sum);
 void vpx_get16x16var_neon(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
                           int ref_stride,
                           unsigned int* sse,
@@ -635,23 +635,23 @@
 #define vpx_get16x16var vpx_get16x16var_neon
 
 unsigned int vpx_get4x4sse_cs_c(const unsigned char* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const unsigned char* ref_ptr,
                                 int ref_stride);
 unsigned int vpx_get4x4sse_cs_neon(const unsigned char* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const unsigned char* ref_ptr,
                                    int ref_stride);
 #define vpx_get4x4sse_cs vpx_get4x4sse_cs_neon
 
 void vpx_get8x8var_c(const uint8_t* src_ptr,
-                     int source_stride,
+                     int src_stride,
                      const uint8_t* ref_ptr,
                      int ref_stride,
                      unsigned int* sse,
                      int* sum);
 void vpx_get8x8var_neon(const uint8_t* src_ptr,
-                        int source_stride,
+                        int src_stride,
                         const uint8_t* ref_ptr,
                         int ref_stride,
                         unsigned int* sse,
@@ -662,41 +662,41 @@
 #define vpx_get_mb_ss vpx_get_mb_ss_c
 
 void vpx_h_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_16x16_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_h_predictor_16x16 vpx_h_predictor_16x16_neon
 
 void vpx_h_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_32x32_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_h_predictor_32x32 vpx_h_predictor_32x32_neon
 
 void vpx_h_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_4x4_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_h_predictor_4x4 vpx_h_predictor_4x4_neon
 
 void vpx_h_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_8x8_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_h_predictor_8x8 vpx_h_predictor_8x8_neon
@@ -723,7 +723,7 @@
 #define vpx_hadamard_8x8 vpx_hadamard_8x8_neon
 
 void vpx_he_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c
@@ -996,12 +996,12 @@
                                   const uint8_t* thresh1);
 #define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_neon
 
-void vpx_mbpost_proc_across_ip_c(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_c(unsigned char* src,
                                  int pitch,
                                  int rows,
                                  int cols,
                                  int flimit);
-void vpx_mbpost_proc_across_ip_neon(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_neon(unsigned char* src,
                                     int pitch,
                                     int rows,
                                     int cols,
@@ -1035,35 +1035,35 @@
 #define vpx_minmax_8x8 vpx_minmax_8x8_neon
 
 unsigned int vpx_mse16x16_c(const uint8_t* src_ptr,
-                            int source_stride,
+                            int src_stride,
                             const uint8_t* ref_ptr,
-                            int recon_stride,
+                            int ref_stride,
                             unsigned int* sse);
 unsigned int vpx_mse16x16_neon(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
-                               int recon_stride,
+                               int ref_stride,
                                unsigned int* sse);
 #define vpx_mse16x16 vpx_mse16x16_neon
 
 unsigned int vpx_mse16x8_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 #define vpx_mse16x8 vpx_mse16x8_c
 
 unsigned int vpx_mse8x16_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 #define vpx_mse8x16 vpx_mse8x16_c
 
 unsigned int vpx_mse8x8_c(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
-                          int recon_stride,
+                          int ref_stride,
                           unsigned int* sse);
 #define vpx_mse8x8 vpx_mse8x8_c
 
@@ -1180,12 +1180,12 @@
 
 void vpx_sad16x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x16x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad16x16x4d vpx_sad16x16x4d_neon
@@ -1221,12 +1221,12 @@
 
 void vpx_sad16x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x32x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad16x32x4d vpx_sad16x32x4d_neon
@@ -1262,12 +1262,12 @@
 
 void vpx_sad16x8x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad16x8x4d_neon(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 #define vpx_sad16x8x4d vpx_sad16x8x4d_neon
@@ -1303,12 +1303,12 @@
 
 void vpx_sad32x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x16x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x16x4d vpx_sad32x16x4d_neon
@@ -1337,12 +1337,12 @@
 
 void vpx_sad32x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x32x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x32x4d vpx_sad32x32x4d_neon
@@ -1371,12 +1371,12 @@
 
 void vpx_sad32x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x64x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x64x4d vpx_sad32x64x4d_neon
@@ -1412,12 +1412,12 @@
 
 void vpx_sad4x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x4x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad4x4x4d vpx_sad4x4x4d_neon
@@ -1453,12 +1453,12 @@
 
 void vpx_sad4x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x8x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad4x8x4d vpx_sad4x8x4d_neon
@@ -1487,12 +1487,12 @@
 
 void vpx_sad64x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x32x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad64x32x4d vpx_sad64x32x4d_neon
@@ -1521,12 +1521,12 @@
 
 void vpx_sad64x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x64x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad64x64x4d vpx_sad64x64x4d_neon
@@ -1562,12 +1562,12 @@
 
 void vpx_sad8x16x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad8x16x4d_neon(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 #define vpx_sad8x16x4d vpx_sad8x16x4d_neon
@@ -1603,12 +1603,12 @@
 
 void vpx_sad8x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x4x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad8x4x4d vpx_sad8x4x4d_neon
@@ -1644,12 +1644,12 @@
 
 void vpx_sad8x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x8x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad8x8x4d vpx_sad8x8x4d_neon
@@ -1755,17 +1755,17 @@
 #define vpx_scaled_vert vpx_scaled_vert_c
 
 uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x16_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1773,17 +1773,17 @@
 #define vpx_sub_pixel_avg_variance16x16 vpx_sub_pixel_avg_variance16x16_neon
 
 uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x32_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1791,17 +1791,17 @@
 #define vpx_sub_pixel_avg_variance16x32 vpx_sub_pixel_avg_variance16x32_neon
 
 uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x8_neon(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
@@ -1809,17 +1809,17 @@
 #define vpx_sub_pixel_avg_variance16x8 vpx_sub_pixel_avg_variance16x8_neon
 
 uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x16_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1827,17 +1827,17 @@
 #define vpx_sub_pixel_avg_variance32x16 vpx_sub_pixel_avg_variance32x16_neon
 
 uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x32_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1845,17 +1845,17 @@
 #define vpx_sub_pixel_avg_variance32x32 vpx_sub_pixel_avg_variance32x32_neon
 
 uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x64_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1863,17 +1863,17 @@
 #define vpx_sub_pixel_avg_variance32x64 vpx_sub_pixel_avg_variance32x64_neon
 
 uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x4_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
@@ -1881,17 +1881,17 @@
 #define vpx_sub_pixel_avg_variance4x4 vpx_sub_pixel_avg_variance4x4_neon
 
 uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x8_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
@@ -1899,17 +1899,17 @@
 #define vpx_sub_pixel_avg_variance4x8 vpx_sub_pixel_avg_variance4x8_neon
 
 uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x32_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1917,17 +1917,17 @@
 #define vpx_sub_pixel_avg_variance64x32 vpx_sub_pixel_avg_variance64x32_neon
 
 uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x64_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1935,17 +1935,17 @@
 #define vpx_sub_pixel_avg_variance64x64 vpx_sub_pixel_avg_variance64x64_neon
 
 uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x16_neon(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
@@ -1953,17 +1953,17 @@
 #define vpx_sub_pixel_avg_variance8x16 vpx_sub_pixel_avg_variance8x16_neon
 
 uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x4_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
@@ -1971,17 +1971,17 @@
 #define vpx_sub_pixel_avg_variance8x4 vpx_sub_pixel_avg_variance8x4_neon
 
 uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x8_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
@@ -1989,208 +1989,208 @@
 #define vpx_sub_pixel_avg_variance8x8 vpx_sub_pixel_avg_variance8x8_neon
 
 uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x16_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance16x16 vpx_sub_pixel_variance16x16_neon
 
 uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x32_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance16x32 vpx_sub_pixel_variance16x32_neon
 
 uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x8_neon(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 #define vpx_sub_pixel_variance16x8 vpx_sub_pixel_variance16x8_neon
 
 uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x16_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance32x16 vpx_sub_pixel_variance32x16_neon
 
 uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x32_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance32x32 vpx_sub_pixel_variance32x32_neon
 
 uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x64_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance32x64 vpx_sub_pixel_variance32x64_neon
 
 uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x4_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 #define vpx_sub_pixel_variance4x4 vpx_sub_pixel_variance4x4_neon
 
 uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x8_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 #define vpx_sub_pixel_variance4x8 vpx_sub_pixel_variance4x8_neon
 
 uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x32_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance64x32 vpx_sub_pixel_variance64x32_neon
 
 uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x64_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance64x64 vpx_sub_pixel_variance64x64_neon
 
 uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x16_neon(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 #define vpx_sub_pixel_variance8x16 vpx_sub_pixel_variance8x16_neon
 
 uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x4_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 #define vpx_sub_pixel_variance8x4 vpx_sub_pixel_variance8x4_neon
 
 uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x8_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
@@ -2219,243 +2219,243 @@
 #define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_neon
 
 void vpx_tm_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_16x16_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_neon
 
 void vpx_tm_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_32x32_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_neon
 
 void vpx_tm_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_4x4_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_neon
 
 void vpx_tm_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_8x8_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_neon
 
 void vpx_v_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_16x16_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_v_predictor_16x16 vpx_v_predictor_16x16_neon
 
 void vpx_v_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_32x32_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_v_predictor_32x32 vpx_v_predictor_32x32_neon
 
 void vpx_v_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_4x4_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_v_predictor_4x4 vpx_v_predictor_4x4_neon
 
 void vpx_v_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_8x8_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_v_predictor_8x8 vpx_v_predictor_8x8_neon
 
 unsigned int vpx_variance16x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x16_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance16x16 vpx_variance16x16_neon
 
 unsigned int vpx_variance16x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x32_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance16x32 vpx_variance16x32_neon
 
 unsigned int vpx_variance16x8_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance16x8_neon(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 #define vpx_variance16x8 vpx_variance16x8_neon
 
 unsigned int vpx_variance32x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x16_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance32x16 vpx_variance32x16_neon
 
 unsigned int vpx_variance32x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x32_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance32x32 vpx_variance32x32_neon
 
 unsigned int vpx_variance32x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x64_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance32x64 vpx_variance32x64_neon
 
 unsigned int vpx_variance4x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x4_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance4x4 vpx_variance4x4_neon
 
 unsigned int vpx_variance4x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x8_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance4x8 vpx_variance4x8_neon
 
 unsigned int vpx_variance64x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x32_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance64x32 vpx_variance64x32_neon
 
 unsigned int vpx_variance64x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x64_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance64x64 vpx_variance64x64_neon
 
 unsigned int vpx_variance8x16_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance8x16_neon(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 #define vpx_variance8x16 vpx_variance8x16_neon
 
 unsigned int vpx_variance8x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x4_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance8x4 vpx_variance8x4_neon
 
 unsigned int vpx_variance8x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x8_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance8x8 vpx_variance8x8_neon
 
 void vpx_ve_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c
diff --git a/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vp8_rtcd.h b/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vp8_rtcd.h
index ca242d0..aa7a2070 100644
--- a/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vp8_rtcd.h
@@ -27,88 +27,88 @@
 extern "C" {
 #endif
 
-void vp8_bilinear_predict16x16_c(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_bilinear_predict16x16_c(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-void vp8_bilinear_predict16x16_neon(unsigned char* src,
-                                    int src_pitch,
-                                    int xofst,
-                                    int yofst,
-                                    unsigned char* dst,
+void vp8_bilinear_predict16x16_neon(unsigned char* src_ptr,
+                                    int src_pixels_per_line,
+                                    int xoffset,
+                                    int yoffset,
+                                    unsigned char* dst_ptr,
                                     int dst_pitch);
-RTCD_EXTERN void (*vp8_bilinear_predict16x16)(unsigned char* src,
-                                              int src_pitch,
-                                              int xofst,
-                                              int yofst,
-                                              unsigned char* dst,
+RTCD_EXTERN void (*vp8_bilinear_predict16x16)(unsigned char* src_ptr,
+                                              int src_pixels_per_line,
+                                              int xoffset,
+                                              int yoffset,
+                                              unsigned char* dst_ptr,
                                               int dst_pitch);
 
-void vp8_bilinear_predict4x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict4x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict4x4_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict4x4_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
-RTCD_EXTERN void (*vp8_bilinear_predict4x4)(unsigned char* src,
-                                            int src_pitch,
-                                            int xofst,
-                                            int yofst,
-                                            unsigned char* dst,
+RTCD_EXTERN void (*vp8_bilinear_predict4x4)(unsigned char* src_ptr,
+                                            int src_pixels_per_line,
+                                            int xoffset,
+                                            int yoffset,
+                                            unsigned char* dst_ptr,
                                             int dst_pitch);
 
-void vp8_bilinear_predict8x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x4_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x4_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
-RTCD_EXTERN void (*vp8_bilinear_predict8x4)(unsigned char* src,
-                                            int src_pitch,
-                                            int xofst,
-                                            int yofst,
-                                            unsigned char* dst,
+RTCD_EXTERN void (*vp8_bilinear_predict8x4)(unsigned char* src_ptr,
+                                            int src_pixels_per_line,
+                                            int xoffset,
+                                            int yoffset,
+                                            unsigned char* dst_ptr,
                                             int dst_pitch);
 
-void vp8_bilinear_predict8x8_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x8_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x8_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x8_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
-RTCD_EXTERN void (*vp8_bilinear_predict8x8)(unsigned char* src,
-                                            int src_pitch,
-                                            int xofst,
-                                            int yofst,
-                                            unsigned char* dst,
+RTCD_EXTERN void (*vp8_bilinear_predict8x8)(unsigned char* src_ptr,
+                                            int src_pixels_per_line,
+                                            int xoffset,
+                                            int yoffset,
+                                            unsigned char* dst_ptr,
                                             int dst_pitch);
 
 void vp8_blend_b_c(unsigned char* y,
                    unsigned char* u,
                    unsigned char* v,
-                   int y1,
-                   int u1,
-                   int v1,
+                   int y_1,
+                   int u_1,
+                   int v_1,
                    int alpha,
                    int stride);
 #define vp8_blend_b vp8_blend_b_c
@@ -116,9 +116,9 @@
 void vp8_blend_mb_inner_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_inner vp8_blend_mb_inner_c
@@ -126,9 +126,9 @@
 void vp8_blend_mb_outer_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_outer vp8_blend_mb_outer_c
@@ -137,58 +137,58 @@
 #define vp8_block_error vp8_block_error_c
 
 void vp8_copy_mem16x16_c(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 void vp8_copy_mem16x16_neon(unsigned char* src,
-                            int src_pitch,
-                            unsigned char* dst,
-                            int dst_pitch);
-RTCD_EXTERN void (*vp8_copy_mem16x16)(unsigned char* src,
-                                      int src_pitch,
-                                      unsigned char* dst,
-                                      int dst_pitch);
-
-void vp8_copy_mem8x4_c(unsigned char* src,
-                       int src_pitch,
-                       unsigned char* dst,
-                       int dst_pitch);
-void vp8_copy_mem8x4_neon(unsigned char* src,
-                          int src_pitch,
-                          unsigned char* dst,
-                          int dst_pitch);
-RTCD_EXTERN void (*vp8_copy_mem8x4)(unsigned char* src,
-                                    int src_pitch,
-                                    unsigned char* dst,
-                                    int dst_pitch);
-
-void vp8_copy_mem8x8_c(unsigned char* src,
-                       int src_pitch,
-                       unsigned char* dst,
-                       int dst_pitch);
-void vp8_copy_mem8x8_neon(unsigned char* src,
-                          int src_pitch,
-                          unsigned char* dst,
-                          int dst_pitch);
-RTCD_EXTERN void (*vp8_copy_mem8x8)(unsigned char* src,
-                                    int src_pitch,
-                                    unsigned char* dst,
-                                    int dst_pitch);
-
-void vp8_dc_only_idct_add_c(short input,
-                            unsigned char* pred,
-                            int pred_stride,
+                            int src_stride,
                             unsigned char* dst,
                             int dst_stride);
-void vp8_dc_only_idct_add_neon(short input,
-                               unsigned char* pred,
+RTCD_EXTERN void (*vp8_copy_mem16x16)(unsigned char* src,
+                                      int src_stride,
+                                      unsigned char* dst,
+                                      int dst_stride);
+
+void vp8_copy_mem8x4_c(unsigned char* src,
+                       int src_stride,
+                       unsigned char* dst,
+                       int dst_stride);
+void vp8_copy_mem8x4_neon(unsigned char* src,
+                          int src_stride,
+                          unsigned char* dst,
+                          int dst_stride);
+RTCD_EXTERN void (*vp8_copy_mem8x4)(unsigned char* src,
+                                    int src_stride,
+                                    unsigned char* dst,
+                                    int dst_stride);
+
+void vp8_copy_mem8x8_c(unsigned char* src,
+                       int src_stride,
+                       unsigned char* dst,
+                       int dst_stride);
+void vp8_copy_mem8x8_neon(unsigned char* src,
+                          int src_stride,
+                          unsigned char* dst,
+                          int dst_stride);
+RTCD_EXTERN void (*vp8_copy_mem8x8)(unsigned char* src,
+                                    int src_stride,
+                                    unsigned char* dst,
+                                    int dst_stride);
+
+void vp8_dc_only_idct_add_c(short input_dc,
+                            unsigned char* pred_ptr,
+                            int pred_stride,
+                            unsigned char* dst_ptr,
+                            int dst_stride);
+void vp8_dc_only_idct_add_neon(short input_dc,
+                               unsigned char* pred_ptr,
                                int pred_stride,
-                               unsigned char* dst,
+                               unsigned char* dst_ptr,
                                int dst_stride);
-RTCD_EXTERN void (*vp8_dc_only_idct_add)(short input,
-                                         unsigned char* pred,
+RTCD_EXTERN void (*vp8_dc_only_idct_add)(short input_dc,
+                                         unsigned char* pred_ptr,
                                          int pred_stride,
-                                         unsigned char* dst,
+                                         unsigned char* dst_ptr,
                                          int dst_stride);
 
 int vp8_denoiser_filter_c(unsigned char* mc_running_avg_y,
@@ -243,15 +243,15 @@
 
 void vp8_dequant_idct_add_c(short* input,
                             short* dq,
-                            unsigned char* output,
+                            unsigned char* dest,
                             int stride);
 void vp8_dequant_idct_add_neon(short* input,
                                short* dq,
-                               unsigned char* output,
+                               unsigned char* dest,
                                int stride);
 RTCD_EXTERN void (*vp8_dequant_idct_add)(short* input,
                                          short* dq,
-                                         unsigned char* output,
+                                         unsigned char* dest,
                                          int stride);
 
 void vp8_dequant_idct_add_uv_block_c(short* q,
@@ -289,9 +289,9 @@
                                                  int stride,
                                                  char* eobs);
 
-void vp8_dequantize_b_c(struct blockd*, short* dqc);
-void vp8_dequantize_b_neon(struct blockd*, short* dqc);
-RTCD_EXTERN void (*vp8_dequantize_b)(struct blockd*, short* dqc);
+void vp8_dequantize_b_c(struct blockd*, short* DQC);
+void vp8_dequantize_b_neon(struct blockd*, short* DQC);
+RTCD_EXTERN void (*vp8_dequantize_b)(struct blockd*, short* DQC);
 
 int vp8_diamond_search_sad_c(struct macroblock* x,
                              struct block* b,
@@ -342,120 +342,120 @@
                           union int_mv* center_mv);
 #define vp8_full_search_sad vp8_full_search_sad_c
 
-void vp8_loop_filter_bh_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bh_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bh_neon(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bh_neon(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
-RTCD_EXTERN void (*vp8_loop_filter_bh)(unsigned char* y,
-                                       unsigned char* u,
-                                       unsigned char* v,
-                                       int ystride,
+RTCD_EXTERN void (*vp8_loop_filter_bh)(unsigned char* y_ptr,
+                                       unsigned char* u_ptr,
+                                       unsigned char* v_ptr,
+                                       int y_stride,
                                        int uv_stride,
                                        struct loop_filter_info* lfi);
 
-void vp8_loop_filter_bv_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bv_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bv_neon(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bv_neon(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
-RTCD_EXTERN void (*vp8_loop_filter_bv)(unsigned char* y,
-                                       unsigned char* u,
-                                       unsigned char* v,
-                                       int ystride,
+RTCD_EXTERN void (*vp8_loop_filter_bv)(unsigned char* y_ptr,
+                                       unsigned char* u_ptr,
+                                       unsigned char* v_ptr,
+                                       int y_stride,
                                        int uv_stride,
                                        struct loop_filter_info* lfi);
 
-void vp8_loop_filter_mbh_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbh_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbh_neon(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbh_neon(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
-RTCD_EXTERN void (*vp8_loop_filter_mbh)(unsigned char* y,
-                                        unsigned char* u,
-                                        unsigned char* v,
-                                        int ystride,
+RTCD_EXTERN void (*vp8_loop_filter_mbh)(unsigned char* y_ptr,
+                                        unsigned char* u_ptr,
+                                        unsigned char* v_ptr,
+                                        int y_stride,
                                         int uv_stride,
                                         struct loop_filter_info* lfi);
 
-void vp8_loop_filter_mbv_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbv_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbv_neon(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbv_neon(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
-RTCD_EXTERN void (*vp8_loop_filter_mbv)(unsigned char* y,
-                                        unsigned char* u,
-                                        unsigned char* v,
-                                        int ystride,
+RTCD_EXTERN void (*vp8_loop_filter_mbv)(unsigned char* y_ptr,
+                                        unsigned char* u_ptr,
+                                        unsigned char* v_ptr,
+                                        int y_stride,
                                         int uv_stride,
                                         struct loop_filter_info* lfi);
 
-void vp8_loop_filter_bhs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bhs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bhs_neon(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bhs_neon(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
-RTCD_EXTERN void (*vp8_loop_filter_simple_bh)(unsigned char* y,
-                                              int ystride,
+RTCD_EXTERN void (*vp8_loop_filter_simple_bh)(unsigned char* y_ptr,
+                                              int y_stride,
                                               const unsigned char* blimit);
 
-void vp8_loop_filter_bvs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bvs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bvs_neon(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bvs_neon(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
-RTCD_EXTERN void (*vp8_loop_filter_simple_bv)(unsigned char* y,
-                                              int ystride,
+RTCD_EXTERN void (*vp8_loop_filter_simple_bv)(unsigned char* y_ptr,
+                                              int y_stride,
                                               const unsigned char* blimit);
 
-void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y,
-                                              int ystride,
+void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y_ptr,
+                                              int y_stride,
                                               const unsigned char* blimit);
-void vp8_loop_filter_mbhs_neon(unsigned char* y,
-                               int ystride,
+void vp8_loop_filter_mbhs_neon(unsigned char* y_ptr,
+                               int y_stride,
                                const unsigned char* blimit);
-RTCD_EXTERN void (*vp8_loop_filter_simple_mbh)(unsigned char* y,
-                                               int ystride,
+RTCD_EXTERN void (*vp8_loop_filter_simple_mbh)(unsigned char* y_ptr,
+                                               int y_stride,
                                                const unsigned char* blimit);
 
-void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y,
-                                            int ystride,
+void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y_ptr,
+                                            int y_stride,
                                             const unsigned char* blimit);
-void vp8_loop_filter_mbvs_neon(unsigned char* y,
-                               int ystride,
+void vp8_loop_filter_mbvs_neon(unsigned char* y_ptr,
+                               int y_stride,
                                const unsigned char* blimit);
-RTCD_EXTERN void (*vp8_loop_filter_simple_mbv)(unsigned char* y,
-                                               int ystride,
+RTCD_EXTERN void (*vp8_loop_filter_simple_mbv)(unsigned char* y_ptr,
+                                               int y_stride,
                                                const unsigned char* blimit);
 
 int vp8_mbblock_error_c(struct macroblock* mb, int dc);
@@ -468,8 +468,8 @@
                               struct block* b,
                               struct blockd* d,
                               union int_mv* ref_mv,
-                              int sad_per_bit,
-                              int distance,
+                              int error_per_bit,
+                              int search_range,
                               struct variance_vtable* fn_ptr,
                               int* mvcost[2],
                               union int_mv* center_mv);
@@ -487,106 +487,106 @@
 RTCD_EXTERN void (*vp8_short_fdct8x4)(short* input, short* output, int pitch);
 
 void vp8_short_idct4x4llm_c(short* input,
-                            unsigned char* pred,
-                            int pitch,
-                            unsigned char* dst,
+                            unsigned char* pred_ptr,
+                            int pred_stride,
+                            unsigned char* dst_ptr,
                             int dst_stride);
 void vp8_short_idct4x4llm_neon(short* input,
-                               unsigned char* pred,
-                               int pitch,
-                               unsigned char* dst,
+                               unsigned char* pred_ptr,
+                               int pred_stride,
+                               unsigned char* dst_ptr,
                                int dst_stride);
 RTCD_EXTERN void (*vp8_short_idct4x4llm)(short* input,
-                                         unsigned char* pred,
-                                         int pitch,
-                                         unsigned char* dst,
+                                         unsigned char* pred_ptr,
+                                         int pred_stride,
+                                         unsigned char* dst_ptr,
                                          int dst_stride);
 
-void vp8_short_inv_walsh4x4_c(short* input, short* output);
-void vp8_short_inv_walsh4x4_neon(short* input, short* output);
-RTCD_EXTERN void (*vp8_short_inv_walsh4x4)(short* input, short* output);
+void vp8_short_inv_walsh4x4_c(short* input, short* mb_dqcoeff);
+void vp8_short_inv_walsh4x4_neon(short* input, short* mb_dqcoeff);
+RTCD_EXTERN void (*vp8_short_inv_walsh4x4)(short* input, short* mb_dqcoeff);
 
-void vp8_short_inv_walsh4x4_1_c(short* input, short* output);
+void vp8_short_inv_walsh4x4_1_c(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c
 
 void vp8_short_walsh4x4_c(short* input, short* output, int pitch);
 void vp8_short_walsh4x4_neon(short* input, short* output, int pitch);
 RTCD_EXTERN void (*vp8_short_walsh4x4)(short* input, short* output, int pitch);
 
-void vp8_sixtap_predict16x16_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_sixtap_predict16x16_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_sixtap_predict16x16_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_sixtap_predict16x16_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict16x16)(unsigned char* src,
-                                            int src_pitch,
-                                            int xofst,
-                                            int yofst,
-                                            unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict16x16)(unsigned char* src_ptr,
+                                            int src_pixels_per_line,
+                                            int xoffset,
+                                            int yoffset,
+                                            unsigned char* dst_ptr,
                                             int dst_pitch);
 
-void vp8_sixtap_predict4x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict4x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict4x4_neon(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict4x4_neon(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict4x4)(unsigned char* src,
-                                          int src_pitch,
-                                          int xofst,
-                                          int yofst,
-                                          unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict4x4)(unsigned char* src_ptr,
+                                          int src_pixels_per_line,
+                                          int xoffset,
+                                          int yoffset,
+                                          unsigned char* dst_ptr,
                                           int dst_pitch);
 
-void vp8_sixtap_predict8x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x4_neon(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x4_neon(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict8x4)(unsigned char* src,
-                                          int src_pitch,
-                                          int xofst,
-                                          int yofst,
-                                          unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict8x4)(unsigned char* src_ptr,
+                                          int src_pixels_per_line,
+                                          int xoffset,
+                                          int yoffset,
+                                          unsigned char* dst_ptr,
                                           int dst_pitch);
 
-void vp8_sixtap_predict8x8_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x8_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x8_neon(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x8_neon(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict8x8)(unsigned char* src,
-                                          int src_pitch,
-                                          int xofst,
-                                          int yofst,
-                                          unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict8x8)(unsigned char* src_ptr,
+                                          int src_pixels_per_line,
+                                          int xoffset,
+                                          int yoffset,
+                                          unsigned char* dst_ptr,
                                           int dst_pitch);
 
 void vp8_rtcd(void);
diff --git a/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vp9_rtcd.h b/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vp9_rtcd.h
index 28fa6b5..e7c5c4e 100644
--- a/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vp9_rtcd.h
@@ -162,16 +162,16 @@
 #define vp9_fwht4x4 vp9_fwht4x4_c
 
 void vp9_iht16x16_256_add_c(const tran_low_t* input,
-                            uint8_t* output,
-                            int pitch,
+                            uint8_t* dest,
+                            int stride,
                             int tx_type);
 void vp9_iht16x16_256_add_neon(const tran_low_t* input,
-                               uint8_t* output,
-                               int pitch,
+                               uint8_t* dest,
+                               int stride,
                                int tx_type);
 RTCD_EXTERN void (*vp9_iht16x16_256_add)(const tran_low_t* input,
-                                         uint8_t* output,
-                                         int pitch,
+                                         uint8_t* dest,
+                                         int stride,
                                          int tx_type);
 
 void vp9_iht4x4_16_add_c(const tran_low_t* input,
diff --git a/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vpx_dsp_rtcd.h
index aea7215e..0f5ae3e 100644
--- a/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm-neon-cpu-detect/vpx_dsp_rtcd.h
@@ -320,422 +320,422 @@
                                       int h);
 
 void vpx_d117_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c
 
 void vpx_d117_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c
 
 void vpx_d117_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c
 
 void vpx_d117_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c
 
 void vpx_d135_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d135_predictor_16x16_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d135_predictor_16x16)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d135_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d135_predictor_32x32_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d135_predictor_32x32)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d135_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d135_predictor_4x4_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 RTCD_EXTERN void (*vpx_d135_predictor_4x4)(uint8_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint8_t* above,
                                            const uint8_t* left);
 
 void vpx_d135_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d135_predictor_8x8_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 RTCD_EXTERN void (*vpx_d135_predictor_8x8)(uint8_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint8_t* above,
                                            const uint8_t* left);
 
 void vpx_d153_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d153_predictor_16x16 vpx_d153_predictor_16x16_c
 
 void vpx_d153_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d153_predictor_32x32 vpx_d153_predictor_32x32_c
 
 void vpx_d153_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d153_predictor_4x4 vpx_d153_predictor_4x4_c
 
 void vpx_d153_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d153_predictor_8x8 vpx_d153_predictor_8x8_c
 
 void vpx_d207_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d207_predictor_16x16 vpx_d207_predictor_16x16_c
 
 void vpx_d207_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d207_predictor_32x32 vpx_d207_predictor_32x32_c
 
 void vpx_d207_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_c
 
 void vpx_d207_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d207_predictor_8x8 vpx_d207_predictor_8x8_c
 
 void vpx_d45_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_16x16_neon(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 RTCD_EXTERN void (*vpx_d45_predictor_16x16)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d45_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_32x32_neon(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 RTCD_EXTERN void (*vpx_d45_predictor_32x32)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d45_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_4x4_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 RTCD_EXTERN void (*vpx_d45_predictor_4x4)(uint8_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint8_t* above,
                                           const uint8_t* left);
 
 void vpx_d45_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_8x8_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 RTCD_EXTERN void (*vpx_d45_predictor_8x8)(uint8_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint8_t* above,
                                           const uint8_t* left);
 
 void vpx_d45e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c
 
 void vpx_d63_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d63_predictor_16x16 vpx_d63_predictor_16x16_c
 
 void vpx_d63_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d63_predictor_32x32 vpx_d63_predictor_32x32_c
 
 void vpx_d63_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d63_predictor_4x4 vpx_d63_predictor_4x4_c
 
 void vpx_d63_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d63_predictor_8x8 vpx_d63_predictor_8x8_c
 
 void vpx_d63e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c
 
 void vpx_dc_128_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_16x16_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 RTCD_EXTERN void (*vpx_dc_128_predictor_16x16)(uint8_t* dst,
-                                               ptrdiff_t y_stride,
+                                               ptrdiff_t stride,
                                                const uint8_t* above,
                                                const uint8_t* left);
 
 void vpx_dc_128_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_32x32_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 RTCD_EXTERN void (*vpx_dc_128_predictor_32x32)(uint8_t* dst,
-                                               ptrdiff_t y_stride,
+                                               ptrdiff_t stride,
                                                const uint8_t* above,
                                                const uint8_t* left);
 
 void vpx_dc_128_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_4x4_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_dc_128_predictor_4x4)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_dc_128_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_8x8_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_dc_128_predictor_8x8)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_dc_left_predictor_16x16_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_16x16_neon(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 RTCD_EXTERN void (*vpx_dc_left_predictor_16x16)(uint8_t* dst,
-                                                ptrdiff_t y_stride,
+                                                ptrdiff_t stride,
                                                 const uint8_t* above,
                                                 const uint8_t* left);
 
 void vpx_dc_left_predictor_32x32_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_32x32_neon(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 RTCD_EXTERN void (*vpx_dc_left_predictor_32x32)(uint8_t* dst,
-                                                ptrdiff_t y_stride,
+                                                ptrdiff_t stride,
                                                 const uint8_t* above,
                                                 const uint8_t* left);
 
 void vpx_dc_left_predictor_4x4_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_4x4_neon(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_dc_left_predictor_4x4)(uint8_t* dst,
-                                              ptrdiff_t y_stride,
+                                              ptrdiff_t stride,
                                               const uint8_t* above,
                                               const uint8_t* left);
 
 void vpx_dc_left_predictor_8x8_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_8x8_neon(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_dc_left_predictor_8x8)(uint8_t* dst,
-                                              ptrdiff_t y_stride,
+                                              ptrdiff_t stride,
                                               const uint8_t* above,
                                               const uint8_t* left);
 
 void vpx_dc_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_16x16_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 RTCD_EXTERN void (*vpx_dc_predictor_16x16)(uint8_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint8_t* above,
                                            const uint8_t* left);
 
 void vpx_dc_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_32x32_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 RTCD_EXTERN void (*vpx_dc_predictor_32x32)(uint8_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint8_t* above,
                                            const uint8_t* left);
 
 void vpx_dc_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_4x4_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 RTCD_EXTERN void (*vpx_dc_predictor_4x4)(uint8_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint8_t* above,
                                          const uint8_t* left);
 
 void vpx_dc_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_8x8_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 RTCD_EXTERN void (*vpx_dc_predictor_8x8)(uint8_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint8_t* above,
                                          const uint8_t* left);
 
 void vpx_dc_top_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_16x16_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 RTCD_EXTERN void (*vpx_dc_top_predictor_16x16)(uint8_t* dst,
-                                               ptrdiff_t y_stride,
+                                               ptrdiff_t stride,
                                                const uint8_t* above,
                                                const uint8_t* left);
 
 void vpx_dc_top_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_32x32_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 RTCD_EXTERN void (*vpx_dc_top_predictor_32x32)(uint8_t* dst,
-                                               ptrdiff_t y_stride,
+                                               ptrdiff_t stride,
                                                const uint8_t* above,
                                                const uint8_t* left);
 
 void vpx_dc_top_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_4x4_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_dc_top_predictor_4x4)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_dc_top_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_8x8_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_dc_top_predictor_8x8)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
@@ -796,51 +796,51 @@
                                   int stride);
 
 void vpx_get16x16var_c(const uint8_t* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        const uint8_t* ref_ptr,
                        int ref_stride,
                        unsigned int* sse,
                        int* sum);
 void vpx_get16x16var_neon(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
                           int ref_stride,
                           unsigned int* sse,
                           int* sum);
 RTCD_EXTERN void (*vpx_get16x16var)(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse,
                                     int* sum);
 
 unsigned int vpx_get4x4sse_cs_c(const unsigned char* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const unsigned char* ref_ptr,
                                 int ref_stride);
 unsigned int vpx_get4x4sse_cs_neon(const unsigned char* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const unsigned char* ref_ptr,
                                    int ref_stride);
 RTCD_EXTERN unsigned int (*vpx_get4x4sse_cs)(const unsigned char* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const unsigned char* ref_ptr,
                                              int ref_stride);
 
 void vpx_get8x8var_c(const uint8_t* src_ptr,
-                     int source_stride,
+                     int src_stride,
                      const uint8_t* ref_ptr,
                      int ref_stride,
                      unsigned int* sse,
                      int* sum);
 void vpx_get8x8var_neon(const uint8_t* src_ptr,
-                        int source_stride,
+                        int src_stride,
                         const uint8_t* ref_ptr,
                         int ref_stride,
                         unsigned int* sse,
                         int* sum);
 RTCD_EXTERN void (*vpx_get8x8var)(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse,
@@ -850,54 +850,54 @@
 #define vpx_get_mb_ss vpx_get_mb_ss_c
 
 void vpx_h_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_16x16_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 RTCD_EXTERN void (*vpx_h_predictor_16x16)(uint8_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint8_t* above,
                                           const uint8_t* left);
 
 void vpx_h_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_32x32_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 RTCD_EXTERN void (*vpx_h_predictor_32x32)(uint8_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint8_t* above,
                                           const uint8_t* left);
 
 void vpx_h_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_4x4_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 RTCD_EXTERN void (*vpx_h_predictor_4x4)(uint8_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint8_t* above,
                                         const uint8_t* left);
 
 void vpx_h_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_8x8_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 RTCD_EXTERN void (*vpx_h_predictor_8x8)(uint8_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint8_t* above,
                                         const uint8_t* left);
 
@@ -927,7 +927,7 @@
                                      int16_t* coeff);
 
 void vpx_he_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c
@@ -1289,17 +1289,17 @@
                                             const uint8_t* limit1,
                                             const uint8_t* thresh1);
 
-void vpx_mbpost_proc_across_ip_c(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_c(unsigned char* src,
                                  int pitch,
                                  int rows,
                                  int cols,
                                  int flimit);
-void vpx_mbpost_proc_across_ip_neon(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_neon(unsigned char* src,
                                     int pitch,
                                     int rows,
                                     int cols,
                                     int flimit);
-RTCD_EXTERN void (*vpx_mbpost_proc_across_ip)(unsigned char* dst,
+RTCD_EXTERN void (*vpx_mbpost_proc_across_ip)(unsigned char* src,
                                               int pitch,
                                               int rows,
                                               int cols,
@@ -1341,39 +1341,39 @@
                                    int* max);
 
 unsigned int vpx_mse16x16_c(const uint8_t* src_ptr,
-                            int source_stride,
+                            int src_stride,
                             const uint8_t* ref_ptr,
-                            int recon_stride,
+                            int ref_stride,
                             unsigned int* sse);
 unsigned int vpx_mse16x16_neon(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
-                               int recon_stride,
+                               int ref_stride,
                                unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_mse16x16)(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
-                                         int recon_stride,
+                                         int ref_stride,
                                          unsigned int* sse);
 
 unsigned int vpx_mse16x8_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 #define vpx_mse16x8 vpx_mse16x8_c
 
 unsigned int vpx_mse8x16_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 #define vpx_mse8x16 vpx_mse8x16_c
 
 unsigned int vpx_mse8x8_c(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
-                          int recon_stride,
+                          int ref_stride,
                           unsigned int* sse);
 #define vpx_mse8x8 vpx_mse8x8_c
 
@@ -1526,17 +1526,17 @@
 
 void vpx_sad16x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x16x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 RTCD_EXTERN void (*vpx_sad16x16x4d)(const uint8_t* src_ptr,
                                     int src_stride,
-                                    const uint8_t* const ref_ptr[],
+                                    const uint8_t* const ref_array[],
                                     int ref_stride,
                                     uint32_t* sad_array);
 
@@ -1578,17 +1578,17 @@
 
 void vpx_sad16x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x32x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 RTCD_EXTERN void (*vpx_sad16x32x4d)(const uint8_t* src_ptr,
                                     int src_stride,
-                                    const uint8_t* const ref_ptr[],
+                                    const uint8_t* const ref_array[],
                                     int ref_stride,
                                     uint32_t* sad_array);
 
@@ -1630,17 +1630,17 @@
 
 void vpx_sad16x8x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad16x8x4d_neon(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 RTCD_EXTERN void (*vpx_sad16x8x4d)(const uint8_t* src_ptr,
                                    int src_stride,
-                                   const uint8_t* const ref_ptr[],
+                                   const uint8_t* const ref_array[],
                                    int ref_stride,
                                    uint32_t* sad_array);
 
@@ -1682,17 +1682,17 @@
 
 void vpx_sad32x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x16x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 RTCD_EXTERN void (*vpx_sad32x16x4d)(const uint8_t* src_ptr,
                                     int src_stride,
-                                    const uint8_t* const ref_ptr[],
+                                    const uint8_t* const ref_array[],
                                     int ref_stride,
                                     uint32_t* sad_array);
 
@@ -1727,17 +1727,17 @@
 
 void vpx_sad32x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x32x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 RTCD_EXTERN void (*vpx_sad32x32x4d)(const uint8_t* src_ptr,
                                     int src_stride,
-                                    const uint8_t* const ref_ptr[],
+                                    const uint8_t* const ref_array[],
                                     int ref_stride,
                                     uint32_t* sad_array);
 
@@ -1772,17 +1772,17 @@
 
 void vpx_sad32x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x64x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 RTCD_EXTERN void (*vpx_sad32x64x4d)(const uint8_t* src_ptr,
                                     int src_stride,
-                                    const uint8_t* const ref_ptr[],
+                                    const uint8_t* const ref_array[],
                                     int ref_stride,
                                     uint32_t* sad_array);
 
@@ -1824,17 +1824,17 @@
 
 void vpx_sad4x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x4x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 RTCD_EXTERN void (*vpx_sad4x4x4d)(const uint8_t* src_ptr,
                                   int src_stride,
-                                  const uint8_t* const ref_ptr[],
+                                  const uint8_t* const ref_array[],
                                   int ref_stride,
                                   uint32_t* sad_array);
 
@@ -1876,17 +1876,17 @@
 
 void vpx_sad4x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x8x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 RTCD_EXTERN void (*vpx_sad4x8x4d)(const uint8_t* src_ptr,
                                   int src_stride,
-                                  const uint8_t* const ref_ptr[],
+                                  const uint8_t* const ref_array[],
                                   int ref_stride,
                                   uint32_t* sad_array);
 
@@ -1921,17 +1921,17 @@
 
 void vpx_sad64x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x32x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 RTCD_EXTERN void (*vpx_sad64x32x4d)(const uint8_t* src_ptr,
                                     int src_stride,
-                                    const uint8_t* const ref_ptr[],
+                                    const uint8_t* const ref_array[],
                                     int ref_stride,
                                     uint32_t* sad_array);
 
@@ -1966,17 +1966,17 @@
 
 void vpx_sad64x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x64x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 RTCD_EXTERN void (*vpx_sad64x64x4d)(const uint8_t* src_ptr,
                                     int src_stride,
-                                    const uint8_t* const ref_ptr[],
+                                    const uint8_t* const ref_array[],
                                     int ref_stride,
                                     uint32_t* sad_array);
 
@@ -2018,17 +2018,17 @@
 
 void vpx_sad8x16x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad8x16x4d_neon(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 RTCD_EXTERN void (*vpx_sad8x16x4d)(const uint8_t* src_ptr,
                                    int src_stride,
-                                   const uint8_t* const ref_ptr[],
+                                   const uint8_t* const ref_array[],
                                    int ref_stride,
                                    uint32_t* sad_array);
 
@@ -2070,17 +2070,17 @@
 
 void vpx_sad8x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x4x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 RTCD_EXTERN void (*vpx_sad8x4x4d)(const uint8_t* src_ptr,
                                   int src_stride,
-                                  const uint8_t* const ref_ptr[],
+                                  const uint8_t* const ref_array[],
                                   int ref_stride,
                                   uint32_t* sad_array);
 
@@ -2122,17 +2122,17 @@
 
 void vpx_sad8x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x8x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 RTCD_EXTERN void (*vpx_sad8x8x4d)(const uint8_t* src_ptr,
                                   int src_stride,
-                                  const uint8_t* const ref_ptr[],
+                                  const uint8_t* const ref_array[],
                                   int ref_stride,
                                   uint32_t* sad_array);
 
@@ -2247,625 +2247,625 @@
 #define vpx_scaled_vert vpx_scaled_vert_c
 
 uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x16_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x16)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x32_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x32)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x8_neon(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x8)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x16_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x16)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x32_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x32)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x64_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x64)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x4_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x4)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x8_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x8)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x32_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x32)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x64_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x64)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x16_neon(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x16)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x4_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x4)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x8_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x8)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x16_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x16)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x32_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x32)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x8_neon(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x8)(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x16_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x16)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x32_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x32)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x64_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x64)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x4_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x4)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x8_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x8)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x32_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x32)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x64_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x64)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x16_neon(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x16)(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x4_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x4)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x8_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x8)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -2902,319 +2902,319 @@
                                                int size);
 
 void vpx_tm_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_16x16_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 RTCD_EXTERN void (*vpx_tm_predictor_16x16)(uint8_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint8_t* above,
                                            const uint8_t* left);
 
 void vpx_tm_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_32x32_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 RTCD_EXTERN void (*vpx_tm_predictor_32x32)(uint8_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint8_t* above,
                                            const uint8_t* left);
 
 void vpx_tm_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_4x4_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 RTCD_EXTERN void (*vpx_tm_predictor_4x4)(uint8_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint8_t* above,
                                          const uint8_t* left);
 
 void vpx_tm_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_8x8_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 RTCD_EXTERN void (*vpx_tm_predictor_8x8)(uint8_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint8_t* above,
                                          const uint8_t* left);
 
 void vpx_v_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_16x16_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 RTCD_EXTERN void (*vpx_v_predictor_16x16)(uint8_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint8_t* above,
                                           const uint8_t* left);
 
 void vpx_v_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_32x32_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 RTCD_EXTERN void (*vpx_v_predictor_32x32)(uint8_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint8_t* above,
                                           const uint8_t* left);
 
 void vpx_v_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_4x4_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 RTCD_EXTERN void (*vpx_v_predictor_4x4)(uint8_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint8_t* above,
                                         const uint8_t* left);
 
 void vpx_v_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_8x8_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 RTCD_EXTERN void (*vpx_v_predictor_8x8)(uint8_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint8_t* above,
                                         const uint8_t* left);
 
 unsigned int vpx_variance16x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x16_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance16x16)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance16x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x32_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance16x32)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance16x8_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance16x8_neon(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance16x8)(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 
 unsigned int vpx_variance32x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x16_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance32x16)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance32x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x32_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance32x32)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance32x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x64_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance32x64)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance4x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x4_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance4x4)(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 
 unsigned int vpx_variance4x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x8_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance4x8)(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 
 unsigned int vpx_variance64x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x32_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance64x32)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance64x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x64_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance64x64)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance8x16_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance8x16_neon(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance8x16)(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 
 unsigned int vpx_variance8x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x4_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance8x4)(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 
 unsigned int vpx_variance8x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x8_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance8x8)(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 
 void vpx_ve_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c
diff --git a/third_party/libvpx/source/config/linux/arm-neon/vp8_rtcd.h b/third_party/libvpx/source/config/linux/arm-neon/vp8_rtcd.h
index 737afd5..8f2d3e5 100644
--- a/third_party/libvpx/source/config/linux/arm-neon/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm-neon/vp8_rtcd.h
@@ -27,68 +27,68 @@
 extern "C" {
 #endif
 
-void vp8_bilinear_predict16x16_c(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_bilinear_predict16x16_c(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-void vp8_bilinear_predict16x16_neon(unsigned char* src,
-                                    int src_pitch,
-                                    int xofst,
-                                    int yofst,
-                                    unsigned char* dst,
+void vp8_bilinear_predict16x16_neon(unsigned char* src_ptr,
+                                    int src_pixels_per_line,
+                                    int xoffset,
+                                    int yoffset,
+                                    unsigned char* dst_ptr,
                                     int dst_pitch);
 #define vp8_bilinear_predict16x16 vp8_bilinear_predict16x16_neon
 
-void vp8_bilinear_predict4x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict4x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict4x4_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict4x4_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_neon
 
-void vp8_bilinear_predict8x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x4_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x4_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_neon
 
-void vp8_bilinear_predict8x8_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x8_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x8_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x8_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict8x8 vp8_bilinear_predict8x8_neon
 
 void vp8_blend_b_c(unsigned char* y,
                    unsigned char* u,
                    unsigned char* v,
-                   int y1,
-                   int u1,
-                   int v1,
+                   int y_1,
+                   int u_1,
+                   int v_1,
                    int alpha,
                    int stride);
 #define vp8_blend_b vp8_blend_b_c
@@ -96,9 +96,9 @@
 void vp8_blend_mb_inner_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_inner vp8_blend_mb_inner_c
@@ -106,9 +106,9 @@
 void vp8_blend_mb_outer_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_outer vp8_blend_mb_outer_c
@@ -117,44 +117,44 @@
 #define vp8_block_error vp8_block_error_c
 
 void vp8_copy_mem16x16_c(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 void vp8_copy_mem16x16_neon(unsigned char* src,
-                            int src_pitch,
+                            int src_stride,
                             unsigned char* dst,
-                            int dst_pitch);
+                            int dst_stride);
 #define vp8_copy_mem16x16 vp8_copy_mem16x16_neon
 
 void vp8_copy_mem8x4_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 void vp8_copy_mem8x4_neon(unsigned char* src,
-                          int src_pitch,
+                          int src_stride,
                           unsigned char* dst,
-                          int dst_pitch);
+                          int dst_stride);
 #define vp8_copy_mem8x4 vp8_copy_mem8x4_neon
 
 void vp8_copy_mem8x8_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 void vp8_copy_mem8x8_neon(unsigned char* src,
-                          int src_pitch,
+                          int src_stride,
                           unsigned char* dst,
-                          int dst_pitch);
+                          int dst_stride);
 #define vp8_copy_mem8x8 vp8_copy_mem8x8_neon
 
-void vp8_dc_only_idct_add_c(short input,
-                            unsigned char* pred,
+void vp8_dc_only_idct_add_c(short input_dc,
+                            unsigned char* pred_ptr,
                             int pred_stride,
-                            unsigned char* dst,
+                            unsigned char* dst_ptr,
                             int dst_stride);
-void vp8_dc_only_idct_add_neon(short input,
-                               unsigned char* pred,
+void vp8_dc_only_idct_add_neon(short input_dc,
+                               unsigned char* pred_ptr,
                                int pred_stride,
-                               unsigned char* dst,
+                               unsigned char* dst_ptr,
                                int dst_stride);
 #define vp8_dc_only_idct_add vp8_dc_only_idct_add_neon
 
@@ -196,11 +196,11 @@
 
 void vp8_dequant_idct_add_c(short* input,
                             short* dq,
-                            unsigned char* output,
+                            unsigned char* dest,
                             int stride);
 void vp8_dequant_idct_add_neon(short* input,
                                short* dq,
-                               unsigned char* output,
+                               unsigned char* dest,
                                int stride);
 #define vp8_dequant_idct_add vp8_dequant_idct_add_neon
 
@@ -230,8 +230,8 @@
                                        char* eobs);
 #define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_neon
 
-void vp8_dequantize_b_c(struct blockd*, short* dqc);
-void vp8_dequantize_b_neon(struct blockd*, short* dqc);
+void vp8_dequantize_b_c(struct blockd*, short* DQC);
+void vp8_dequantize_b_neon(struct blockd*, short* DQC);
 #define vp8_dequantize_b vp8_dequantize_b_neon
 
 int vp8_diamond_search_sad_c(struct macroblock* x,
@@ -283,91 +283,91 @@
                           union int_mv* center_mv);
 #define vp8_full_search_sad vp8_full_search_sad_c
 
-void vp8_loop_filter_bh_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bh_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bh_neon(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bh_neon(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
 #define vp8_loop_filter_bh vp8_loop_filter_bh_neon
 
-void vp8_loop_filter_bv_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bv_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bv_neon(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bv_neon(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
 #define vp8_loop_filter_bv vp8_loop_filter_bv_neon
 
-void vp8_loop_filter_mbh_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbh_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbh_neon(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbh_neon(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbh vp8_loop_filter_mbh_neon
 
-void vp8_loop_filter_mbv_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbv_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbv_neon(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbv_neon(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbv vp8_loop_filter_mbv_neon
 
-void vp8_loop_filter_bhs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bhs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bhs_neon(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bhs_neon(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_neon
 
-void vp8_loop_filter_bvs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bvs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bvs_neon(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bvs_neon(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_neon
 
-void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y,
-                                              int ystride,
+void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y_ptr,
+                                              int y_stride,
                                               const unsigned char* blimit);
-void vp8_loop_filter_mbhs_neon(unsigned char* y,
-                               int ystride,
+void vp8_loop_filter_mbhs_neon(unsigned char* y_ptr,
+                               int y_stride,
                                const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbh vp8_loop_filter_mbhs_neon
 
-void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y,
-                                            int ystride,
+void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y_ptr,
+                                            int y_stride,
                                             const unsigned char* blimit);
-void vp8_loop_filter_mbvs_neon(unsigned char* y,
-                               int ystride,
+void vp8_loop_filter_mbvs_neon(unsigned char* y_ptr,
+                               int y_stride,
                                const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbv vp8_loop_filter_mbvs_neon
 
@@ -381,8 +381,8 @@
                               struct block* b,
                               struct blockd* d,
                               union int_mv* ref_mv,
-                              int sad_per_bit,
-                              int distance,
+                              int error_per_bit,
+                              int search_range,
                               struct variance_vtable* fn_ptr,
                               int* mvcost[2],
                               union int_mv* center_mv);
@@ -400,81 +400,81 @@
 #define vp8_short_fdct8x4 vp8_short_fdct8x4_neon
 
 void vp8_short_idct4x4llm_c(short* input,
-                            unsigned char* pred,
-                            int pitch,
-                            unsigned char* dst,
+                            unsigned char* pred_ptr,
+                            int pred_stride,
+                            unsigned char* dst_ptr,
                             int dst_stride);
 void vp8_short_idct4x4llm_neon(short* input,
-                               unsigned char* pred,
-                               int pitch,
-                               unsigned char* dst,
+                               unsigned char* pred_ptr,
+                               int pred_stride,
+                               unsigned char* dst_ptr,
                                int dst_stride);
 #define vp8_short_idct4x4llm vp8_short_idct4x4llm_neon
 
-void vp8_short_inv_walsh4x4_c(short* input, short* output);
-void vp8_short_inv_walsh4x4_neon(short* input, short* output);
+void vp8_short_inv_walsh4x4_c(short* input, short* mb_dqcoeff);
+void vp8_short_inv_walsh4x4_neon(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_neon
 
-void vp8_short_inv_walsh4x4_1_c(short* input, short* output);
+void vp8_short_inv_walsh4x4_1_c(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c
 
 void vp8_short_walsh4x4_c(short* input, short* output, int pitch);
 void vp8_short_walsh4x4_neon(short* input, short* output, int pitch);
 #define vp8_short_walsh4x4 vp8_short_walsh4x4_neon
 
-void vp8_sixtap_predict16x16_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_sixtap_predict16x16_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_sixtap_predict16x16_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_sixtap_predict16x16_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_sixtap_predict16x16 vp8_sixtap_predict16x16_neon
 
-void vp8_sixtap_predict4x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict4x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict4x4_neon(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict4x4_neon(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
 #define vp8_sixtap_predict4x4 vp8_sixtap_predict4x4_neon
 
-void vp8_sixtap_predict8x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x4_neon(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x4_neon(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
 #define vp8_sixtap_predict8x4 vp8_sixtap_predict8x4_neon
 
-void vp8_sixtap_predict8x8_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x8_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x8_neon(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x8_neon(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
 #define vp8_sixtap_predict8x8 vp8_sixtap_predict8x8_neon
 
diff --git a/third_party/libvpx/source/config/linux/arm-neon/vp9_rtcd.h b/third_party/libvpx/source/config/linux/arm-neon/vp9_rtcd.h
index 309c7808..cdfebccf 100644
--- a/third_party/libvpx/source/config/linux/arm-neon/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm-neon/vp9_rtcd.h
@@ -140,12 +140,12 @@
 #define vp9_fwht4x4 vp9_fwht4x4_c
 
 void vp9_iht16x16_256_add_c(const tran_low_t* input,
-                            uint8_t* output,
-                            int pitch,
+                            uint8_t* dest,
+                            int stride,
                             int tx_type);
 void vp9_iht16x16_256_add_neon(const tran_low_t* input,
-                               uint8_t* output,
-                               int pitch,
+                               uint8_t* dest,
+                               int stride,
                                int tx_type);
 #define vp9_iht16x16_256_add vp9_iht16x16_256_add_neon
 
diff --git a/third_party/libvpx/source/config/linux/arm-neon/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/linux/arm-neon/vpx_dsp_rtcd.h
index 453e90e..abd9cbd 100644
--- a/third_party/libvpx/source/config/linux/arm-neon/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm-neon/vpx_dsp_rtcd.h
@@ -235,349 +235,349 @@
 #define vpx_convolve_copy vpx_convolve_copy_neon
 
 void vpx_d117_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c
 
 void vpx_d117_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c
 
 void vpx_d117_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c
 
 void vpx_d117_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c
 
 void vpx_d135_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d135_predictor_16x16_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_neon
 
 void vpx_d135_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d135_predictor_32x32_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_neon
 
 void vpx_d135_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d135_predictor_4x4_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_neon
 
 void vpx_d135_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d135_predictor_8x8_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_neon
 
 void vpx_d153_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d153_predictor_16x16 vpx_d153_predictor_16x16_c
 
 void vpx_d153_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d153_predictor_32x32 vpx_d153_predictor_32x32_c
 
 void vpx_d153_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d153_predictor_4x4 vpx_d153_predictor_4x4_c
 
 void vpx_d153_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d153_predictor_8x8 vpx_d153_predictor_8x8_c
 
 void vpx_d207_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d207_predictor_16x16 vpx_d207_predictor_16x16_c
 
 void vpx_d207_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d207_predictor_32x32 vpx_d207_predictor_32x32_c
 
 void vpx_d207_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_c
 
 void vpx_d207_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d207_predictor_8x8 vpx_d207_predictor_8x8_c
 
 void vpx_d45_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_16x16_neon(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_d45_predictor_16x16 vpx_d45_predictor_16x16_neon
 
 void vpx_d45_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_32x32_neon(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_d45_predictor_32x32 vpx_d45_predictor_32x32_neon
 
 void vpx_d45_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_4x4_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_neon
 
 void vpx_d45_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_8x8_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_neon
 
 void vpx_d45e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c
 
 void vpx_d63_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d63_predictor_16x16 vpx_d63_predictor_16x16_c
 
 void vpx_d63_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d63_predictor_32x32 vpx_d63_predictor_32x32_c
 
 void vpx_d63_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d63_predictor_4x4 vpx_d63_predictor_4x4_c
 
 void vpx_d63_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d63_predictor_8x8 vpx_d63_predictor_8x8_c
 
 void vpx_d63e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c
 
 void vpx_dc_128_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_16x16_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_neon
 
 void vpx_dc_128_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_32x32_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_neon
 
 void vpx_dc_128_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_4x4_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_neon
 
 void vpx_dc_128_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_8x8_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_neon
 
 void vpx_dc_left_predictor_16x16_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_16x16_neon(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 #define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_neon
 
 void vpx_dc_left_predictor_32x32_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_32x32_neon(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 #define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_neon
 
 void vpx_dc_left_predictor_4x4_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_4x4_neon(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 #define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_neon
 
 void vpx_dc_left_predictor_8x8_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_8x8_neon(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 #define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_neon
 
 void vpx_dc_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_16x16_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_neon
 
 void vpx_dc_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_32x32_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_neon
 
 void vpx_dc_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_4x4_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_neon
 
 void vpx_dc_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_8x8_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_neon
 
 void vpx_dc_top_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_16x16_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_neon
 
 void vpx_dc_top_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_32x32_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_neon
 
 void vpx_dc_top_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_4x4_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_neon
 
 void vpx_dc_top_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_8x8_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_neon
@@ -621,13 +621,13 @@
 #define vpx_fdct8x8_1 vpx_fdct8x8_1_neon
 
 void vpx_get16x16var_c(const uint8_t* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        const uint8_t* ref_ptr,
                        int ref_stride,
                        unsigned int* sse,
                        int* sum);
 void vpx_get16x16var_neon(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
                           int ref_stride,
                           unsigned int* sse,
@@ -635,23 +635,23 @@
 #define vpx_get16x16var vpx_get16x16var_neon
 
 unsigned int vpx_get4x4sse_cs_c(const unsigned char* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const unsigned char* ref_ptr,
                                 int ref_stride);
 unsigned int vpx_get4x4sse_cs_neon(const unsigned char* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const unsigned char* ref_ptr,
                                    int ref_stride);
 #define vpx_get4x4sse_cs vpx_get4x4sse_cs_neon
 
 void vpx_get8x8var_c(const uint8_t* src_ptr,
-                     int source_stride,
+                     int src_stride,
                      const uint8_t* ref_ptr,
                      int ref_stride,
                      unsigned int* sse,
                      int* sum);
 void vpx_get8x8var_neon(const uint8_t* src_ptr,
-                        int source_stride,
+                        int src_stride,
                         const uint8_t* ref_ptr,
                         int ref_stride,
                         unsigned int* sse,
@@ -662,41 +662,41 @@
 #define vpx_get_mb_ss vpx_get_mb_ss_c
 
 void vpx_h_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_16x16_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_h_predictor_16x16 vpx_h_predictor_16x16_neon
 
 void vpx_h_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_32x32_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_h_predictor_32x32 vpx_h_predictor_32x32_neon
 
 void vpx_h_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_4x4_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_h_predictor_4x4 vpx_h_predictor_4x4_neon
 
 void vpx_h_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_8x8_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_h_predictor_8x8 vpx_h_predictor_8x8_neon
@@ -723,7 +723,7 @@
 #define vpx_hadamard_8x8 vpx_hadamard_8x8_neon
 
 void vpx_he_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c
@@ -996,12 +996,12 @@
                                   const uint8_t* thresh1);
 #define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_neon
 
-void vpx_mbpost_proc_across_ip_c(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_c(unsigned char* src,
                                  int pitch,
                                  int rows,
                                  int cols,
                                  int flimit);
-void vpx_mbpost_proc_across_ip_neon(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_neon(unsigned char* src,
                                     int pitch,
                                     int rows,
                                     int cols,
@@ -1035,35 +1035,35 @@
 #define vpx_minmax_8x8 vpx_minmax_8x8_neon
 
 unsigned int vpx_mse16x16_c(const uint8_t* src_ptr,
-                            int source_stride,
+                            int src_stride,
                             const uint8_t* ref_ptr,
-                            int recon_stride,
+                            int ref_stride,
                             unsigned int* sse);
 unsigned int vpx_mse16x16_neon(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
-                               int recon_stride,
+                               int ref_stride,
                                unsigned int* sse);
 #define vpx_mse16x16 vpx_mse16x16_neon
 
 unsigned int vpx_mse16x8_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 #define vpx_mse16x8 vpx_mse16x8_c
 
 unsigned int vpx_mse8x16_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 #define vpx_mse8x16 vpx_mse8x16_c
 
 unsigned int vpx_mse8x8_c(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
-                          int recon_stride,
+                          int ref_stride,
                           unsigned int* sse);
 #define vpx_mse8x8 vpx_mse8x8_c
 
@@ -1180,12 +1180,12 @@
 
 void vpx_sad16x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x16x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad16x16x4d vpx_sad16x16x4d_neon
@@ -1221,12 +1221,12 @@
 
 void vpx_sad16x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x32x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad16x32x4d vpx_sad16x32x4d_neon
@@ -1262,12 +1262,12 @@
 
 void vpx_sad16x8x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad16x8x4d_neon(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 #define vpx_sad16x8x4d vpx_sad16x8x4d_neon
@@ -1303,12 +1303,12 @@
 
 void vpx_sad32x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x16x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x16x4d vpx_sad32x16x4d_neon
@@ -1337,12 +1337,12 @@
 
 void vpx_sad32x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x32x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x32x4d vpx_sad32x32x4d_neon
@@ -1371,12 +1371,12 @@
 
 void vpx_sad32x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x64x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x64x4d vpx_sad32x64x4d_neon
@@ -1412,12 +1412,12 @@
 
 void vpx_sad4x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x4x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad4x4x4d vpx_sad4x4x4d_neon
@@ -1453,12 +1453,12 @@
 
 void vpx_sad4x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x8x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad4x8x4d vpx_sad4x8x4d_neon
@@ -1487,12 +1487,12 @@
 
 void vpx_sad64x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x32x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad64x32x4d vpx_sad64x32x4d_neon
@@ -1521,12 +1521,12 @@
 
 void vpx_sad64x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x64x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad64x64x4d vpx_sad64x64x4d_neon
@@ -1562,12 +1562,12 @@
 
 void vpx_sad8x16x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad8x16x4d_neon(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 #define vpx_sad8x16x4d vpx_sad8x16x4d_neon
@@ -1603,12 +1603,12 @@
 
 void vpx_sad8x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x4x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad8x4x4d vpx_sad8x4x4d_neon
@@ -1644,12 +1644,12 @@
 
 void vpx_sad8x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x8x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad8x8x4d vpx_sad8x8x4d_neon
@@ -1755,17 +1755,17 @@
 #define vpx_scaled_vert vpx_scaled_vert_c
 
 uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x16_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1773,17 +1773,17 @@
 #define vpx_sub_pixel_avg_variance16x16 vpx_sub_pixel_avg_variance16x16_neon
 
 uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x32_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1791,17 +1791,17 @@
 #define vpx_sub_pixel_avg_variance16x32 vpx_sub_pixel_avg_variance16x32_neon
 
 uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x8_neon(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
@@ -1809,17 +1809,17 @@
 #define vpx_sub_pixel_avg_variance16x8 vpx_sub_pixel_avg_variance16x8_neon
 
 uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x16_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1827,17 +1827,17 @@
 #define vpx_sub_pixel_avg_variance32x16 vpx_sub_pixel_avg_variance32x16_neon
 
 uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x32_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1845,17 +1845,17 @@
 #define vpx_sub_pixel_avg_variance32x32 vpx_sub_pixel_avg_variance32x32_neon
 
 uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x64_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1863,17 +1863,17 @@
 #define vpx_sub_pixel_avg_variance32x64 vpx_sub_pixel_avg_variance32x64_neon
 
 uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x4_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
@@ -1881,17 +1881,17 @@
 #define vpx_sub_pixel_avg_variance4x4 vpx_sub_pixel_avg_variance4x4_neon
 
 uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x8_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
@@ -1899,17 +1899,17 @@
 #define vpx_sub_pixel_avg_variance4x8 vpx_sub_pixel_avg_variance4x8_neon
 
 uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x32_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1917,17 +1917,17 @@
 #define vpx_sub_pixel_avg_variance64x32 vpx_sub_pixel_avg_variance64x32_neon
 
 uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x64_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1935,17 +1935,17 @@
 #define vpx_sub_pixel_avg_variance64x64 vpx_sub_pixel_avg_variance64x64_neon
 
 uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x16_neon(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
@@ -1953,17 +1953,17 @@
 #define vpx_sub_pixel_avg_variance8x16 vpx_sub_pixel_avg_variance8x16_neon
 
 uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x4_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
@@ -1971,17 +1971,17 @@
 #define vpx_sub_pixel_avg_variance8x4 vpx_sub_pixel_avg_variance8x4_neon
 
 uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x8_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
@@ -1989,208 +1989,208 @@
 #define vpx_sub_pixel_avg_variance8x8 vpx_sub_pixel_avg_variance8x8_neon
 
 uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x16_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance16x16 vpx_sub_pixel_variance16x16_neon
 
 uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x32_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance16x32 vpx_sub_pixel_variance16x32_neon
 
 uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x8_neon(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 #define vpx_sub_pixel_variance16x8 vpx_sub_pixel_variance16x8_neon
 
 uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x16_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance32x16 vpx_sub_pixel_variance32x16_neon
 
 uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x32_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance32x32 vpx_sub_pixel_variance32x32_neon
 
 uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x64_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance32x64 vpx_sub_pixel_variance32x64_neon
 
 uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x4_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 #define vpx_sub_pixel_variance4x4 vpx_sub_pixel_variance4x4_neon
 
 uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x8_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 #define vpx_sub_pixel_variance4x8 vpx_sub_pixel_variance4x8_neon
 
 uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x32_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance64x32 vpx_sub_pixel_variance64x32_neon
 
 uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x64_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance64x64 vpx_sub_pixel_variance64x64_neon
 
 uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x16_neon(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 #define vpx_sub_pixel_variance8x16 vpx_sub_pixel_variance8x16_neon
 
 uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x4_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 #define vpx_sub_pixel_variance8x4 vpx_sub_pixel_variance8x4_neon
 
 uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x8_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
@@ -2219,243 +2219,243 @@
 #define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_neon
 
 void vpx_tm_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_16x16_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_neon
 
 void vpx_tm_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_32x32_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_neon
 
 void vpx_tm_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_4x4_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_neon
 
 void vpx_tm_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_8x8_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_neon
 
 void vpx_v_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_16x16_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_v_predictor_16x16 vpx_v_predictor_16x16_neon
 
 void vpx_v_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_32x32_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_v_predictor_32x32 vpx_v_predictor_32x32_neon
 
 void vpx_v_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_4x4_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_v_predictor_4x4 vpx_v_predictor_4x4_neon
 
 void vpx_v_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_8x8_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_v_predictor_8x8 vpx_v_predictor_8x8_neon
 
 unsigned int vpx_variance16x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x16_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance16x16 vpx_variance16x16_neon
 
 unsigned int vpx_variance16x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x32_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance16x32 vpx_variance16x32_neon
 
 unsigned int vpx_variance16x8_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance16x8_neon(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 #define vpx_variance16x8 vpx_variance16x8_neon
 
 unsigned int vpx_variance32x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x16_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance32x16 vpx_variance32x16_neon
 
 unsigned int vpx_variance32x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x32_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance32x32 vpx_variance32x32_neon
 
 unsigned int vpx_variance32x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x64_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance32x64 vpx_variance32x64_neon
 
 unsigned int vpx_variance4x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x4_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance4x4 vpx_variance4x4_neon
 
 unsigned int vpx_variance4x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x8_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance4x8 vpx_variance4x8_neon
 
 unsigned int vpx_variance64x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x32_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance64x32 vpx_variance64x32_neon
 
 unsigned int vpx_variance64x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x64_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance64x64 vpx_variance64x64_neon
 
 unsigned int vpx_variance8x16_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance8x16_neon(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 #define vpx_variance8x16 vpx_variance8x16_neon
 
 unsigned int vpx_variance8x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x4_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance8x4 vpx_variance8x4_neon
 
 unsigned int vpx_variance8x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x8_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance8x8 vpx_variance8x8_neon
 
 void vpx_ve_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c
diff --git a/third_party/libvpx/source/config/linux/arm/vp8_rtcd.h b/third_party/libvpx/source/config/linux/arm/vp8_rtcd.h
index a84e3b3..5ec67483 100644
--- a/third_party/libvpx/source/config/linux/arm/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm/vp8_rtcd.h
@@ -27,44 +27,44 @@
 extern "C" {
 #endif
 
-void vp8_bilinear_predict16x16_c(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_bilinear_predict16x16_c(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
 #define vp8_bilinear_predict16x16 vp8_bilinear_predict16x16_c
 
-void vp8_bilinear_predict4x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict4x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
 #define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_c
 
-void vp8_bilinear_predict8x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
 #define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_c
 
-void vp8_bilinear_predict8x8_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x8_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
 #define vp8_bilinear_predict8x8 vp8_bilinear_predict8x8_c
 
 void vp8_blend_b_c(unsigned char* y,
                    unsigned char* u,
                    unsigned char* v,
-                   int y1,
-                   int u1,
-                   int v1,
+                   int y_1,
+                   int u_1,
+                   int v_1,
                    int alpha,
                    int stride);
 #define vp8_blend_b vp8_blend_b_c
@@ -72,9 +72,9 @@
 void vp8_blend_mb_inner_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_inner vp8_blend_mb_inner_c
@@ -82,9 +82,9 @@
 void vp8_blend_mb_outer_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_outer vp8_blend_mb_outer_c
@@ -93,27 +93,27 @@
 #define vp8_block_error vp8_block_error_c
 
 void vp8_copy_mem16x16_c(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 #define vp8_copy_mem16x16 vp8_copy_mem16x16_c
 
 void vp8_copy_mem8x4_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 #define vp8_copy_mem8x4 vp8_copy_mem8x4_c
 
 void vp8_copy_mem8x8_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 #define vp8_copy_mem8x8 vp8_copy_mem8x8_c
 
-void vp8_dc_only_idct_add_c(short input,
-                            unsigned char* pred,
+void vp8_dc_only_idct_add_c(short input_dc,
+                            unsigned char* pred_ptr,
                             int pred_stride,
-                            unsigned char* dst,
+                            unsigned char* dst_ptr,
                             int dst_stride);
 #define vp8_dc_only_idct_add vp8_dc_only_idct_add_c
 
@@ -139,7 +139,7 @@
 
 void vp8_dequant_idct_add_c(short* input,
                             short* dq,
-                            unsigned char* output,
+                            unsigned char* dest,
                             int stride);
 #define vp8_dequant_idct_add vp8_dequant_idct_add_c
 
@@ -158,7 +158,7 @@
                                     char* eobs);
 #define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_c
 
-void vp8_dequantize_b_c(struct blockd*, short* dqc);
+void vp8_dequantize_b_c(struct blockd*, short* DQC);
 #define vp8_dequantize_b vp8_dequantize_b_c
 
 int vp8_diamond_search_sad_c(struct macroblock* x,
@@ -209,55 +209,55 @@
                           union int_mv* center_mv);
 #define vp8_full_search_sad vp8_full_search_sad_c
 
-void vp8_loop_filter_bh_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bh_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
 #define vp8_loop_filter_bh vp8_loop_filter_bh_c
 
-void vp8_loop_filter_bv_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bv_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
 #define vp8_loop_filter_bv vp8_loop_filter_bv_c
 
-void vp8_loop_filter_mbh_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbh_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbh vp8_loop_filter_mbh_c
 
-void vp8_loop_filter_mbv_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbv_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbv vp8_loop_filter_mbv_c
 
-void vp8_loop_filter_bhs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bhs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
 #define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_c
 
-void vp8_loop_filter_bvs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bvs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
 #define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_c
 
-void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y,
-                                              int ystride,
+void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y_ptr,
+                                              int y_stride,
                                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbh vp8_loop_filter_simple_horizontal_edge_c
 
-void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y,
-                                            int ystride,
+void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y_ptr,
+                                            int y_stride,
                                             const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbv vp8_loop_filter_simple_vertical_edge_c
 
@@ -271,8 +271,8 @@
                               struct block* b,
                               struct blockd* d,
                               union int_mv* ref_mv,
-                              int sad_per_bit,
-                              int distance,
+                              int error_per_bit,
+                              int search_range,
                               struct variance_vtable* fn_ptr,
                               int* mvcost[2],
                               union int_mv* center_mv);
@@ -288,50 +288,50 @@
 #define vp8_short_fdct8x4 vp8_short_fdct8x4_c
 
 void vp8_short_idct4x4llm_c(short* input,
-                            unsigned char* pred,
-                            int pitch,
-                            unsigned char* dst,
+                            unsigned char* pred_ptr,
+                            int pred_stride,
+                            unsigned char* dst_ptr,
                             int dst_stride);
 #define vp8_short_idct4x4llm vp8_short_idct4x4llm_c
 
-void vp8_short_inv_walsh4x4_c(short* input, short* output);
+void vp8_short_inv_walsh4x4_c(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_c
 
-void vp8_short_inv_walsh4x4_1_c(short* input, short* output);
+void vp8_short_inv_walsh4x4_1_c(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c
 
 void vp8_short_walsh4x4_c(short* input, short* output, int pitch);
 #define vp8_short_walsh4x4 vp8_short_walsh4x4_c
 
-void vp8_sixtap_predict16x16_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_sixtap_predict16x16_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
 #define vp8_sixtap_predict16x16 vp8_sixtap_predict16x16_c
 
-void vp8_sixtap_predict4x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict4x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
 #define vp8_sixtap_predict4x4 vp8_sixtap_predict4x4_c
 
-void vp8_sixtap_predict8x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
 #define vp8_sixtap_predict8x4 vp8_sixtap_predict8x4_c
 
-void vp8_sixtap_predict8x8_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x8_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
 #define vp8_sixtap_predict8x8 vp8_sixtap_predict8x8_c
 
diff --git a/third_party/libvpx/source/config/linux/arm/vp9_rtcd.h b/third_party/libvpx/source/config/linux/arm/vp9_rtcd.h
index 478101ff..6880668 100644
--- a/third_party/libvpx/source/config/linux/arm/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm/vp9_rtcd.h
@@ -115,8 +115,8 @@
 #define vp9_fwht4x4 vp9_fwht4x4_c
 
 void vp9_iht16x16_256_add_c(const tran_low_t* input,
-                            uint8_t* output,
-                            int pitch,
+                            uint8_t* dest,
+                            int stride,
                             int tx_type);
 #define vp9_iht16x16_256_add vp9_iht16x16_256_add_c
 
diff --git a/third_party/libvpx/source/config/linux/arm/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/linux/arm/vpx_dsp_rtcd.h
index 063a8c7..dc7b59b 100644
--- a/third_party/libvpx/source/config/linux/arm/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm/vpx_dsp_rtcd.h
@@ -139,253 +139,253 @@
 #define vpx_convolve_copy vpx_convolve_copy_c
 
 void vpx_d117_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c
 
 void vpx_d117_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c
 
 void vpx_d117_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c
 
 void vpx_d117_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c
 
 void vpx_d135_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_c
 
 void vpx_d135_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_c
 
 void vpx_d135_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_c
 
 void vpx_d135_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_c
 
 void vpx_d153_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d153_predictor_16x16 vpx_d153_predictor_16x16_c
 
 void vpx_d153_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d153_predictor_32x32 vpx_d153_predictor_32x32_c
 
 void vpx_d153_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d153_predictor_4x4 vpx_d153_predictor_4x4_c
 
 void vpx_d153_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d153_predictor_8x8 vpx_d153_predictor_8x8_c
 
 void vpx_d207_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d207_predictor_16x16 vpx_d207_predictor_16x16_c
 
 void vpx_d207_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d207_predictor_32x32 vpx_d207_predictor_32x32_c
 
 void vpx_d207_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_c
 
 void vpx_d207_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d207_predictor_8x8 vpx_d207_predictor_8x8_c
 
 void vpx_d45_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d45_predictor_16x16 vpx_d45_predictor_16x16_c
 
 void vpx_d45_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d45_predictor_32x32 vpx_d45_predictor_32x32_c
 
 void vpx_d45_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_c
 
 void vpx_d45_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_c
 
 void vpx_d45e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c
 
 void vpx_d63_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d63_predictor_16x16 vpx_d63_predictor_16x16_c
 
 void vpx_d63_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d63_predictor_32x32 vpx_d63_predictor_32x32_c
 
 void vpx_d63_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d63_predictor_4x4 vpx_d63_predictor_4x4_c
 
 void vpx_d63_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d63_predictor_8x8 vpx_d63_predictor_8x8_c
 
 void vpx_d63e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c
 
 void vpx_dc_128_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_c
 
 void vpx_dc_128_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_c
 
 void vpx_dc_128_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_c
 
 void vpx_dc_128_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_c
 
 void vpx_dc_left_predictor_16x16_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_c
 
 void vpx_dc_left_predictor_32x32_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_c
 
 void vpx_dc_left_predictor_4x4_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_c
 
 void vpx_dc_left_predictor_8x8_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_c
 
 void vpx_dc_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_c
 
 void vpx_dc_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_c
 
 void vpx_dc_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_c
 
 void vpx_dc_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_c
 
 void vpx_dc_top_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_c
 
 void vpx_dc_top_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_c
 
 void vpx_dc_top_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_c
 
 void vpx_dc_top_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_c
@@ -418,7 +418,7 @@
 #define vpx_fdct8x8_1 vpx_fdct8x8_1_c
 
 void vpx_get16x16var_c(const uint8_t* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        const uint8_t* ref_ptr,
                        int ref_stride,
                        unsigned int* sse,
@@ -426,13 +426,13 @@
 #define vpx_get16x16var vpx_get16x16var_c
 
 unsigned int vpx_get4x4sse_cs_c(const unsigned char* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const unsigned char* ref_ptr,
                                 int ref_stride);
 #define vpx_get4x4sse_cs vpx_get4x4sse_cs_c
 
 void vpx_get8x8var_c(const uint8_t* src_ptr,
-                     int source_stride,
+                     int src_stride,
                      const uint8_t* ref_ptr,
                      int ref_stride,
                      unsigned int* sse,
@@ -443,25 +443,25 @@
 #define vpx_get_mb_ss vpx_get_mb_ss_c
 
 void vpx_h_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_h_predictor_16x16 vpx_h_predictor_16x16_c
 
 void vpx_h_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_h_predictor_32x32 vpx_h_predictor_32x32_c
 
 void vpx_h_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 #define vpx_h_predictor_4x4 vpx_h_predictor_4x4_c
 
 void vpx_h_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 #define vpx_h_predictor_8x8 vpx_h_predictor_8x8_c
@@ -482,7 +482,7 @@
 #define vpx_hadamard_8x8 vpx_hadamard_8x8_c
 
 void vpx_he_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c
@@ -643,7 +643,7 @@
                                const uint8_t* thresh1);
 #define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_c
 
-void vpx_mbpost_proc_across_ip_c(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_c(unsigned char* src,
                                  int pitch,
                                  int rows,
                                  int cols,
@@ -666,30 +666,30 @@
 #define vpx_minmax_8x8 vpx_minmax_8x8_c
 
 unsigned int vpx_mse16x16_c(const uint8_t* src_ptr,
-                            int source_stride,
+                            int src_stride,
                             const uint8_t* ref_ptr,
-                            int recon_stride,
+                            int ref_stride,
                             unsigned int* sse);
 #define vpx_mse16x16 vpx_mse16x16_c
 
 unsigned int vpx_mse16x8_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 #define vpx_mse16x8 vpx_mse16x8_c
 
 unsigned int vpx_mse8x16_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 #define vpx_mse8x16 vpx_mse8x16_c
 
 unsigned int vpx_mse8x8_c(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
-                          int recon_stride,
+                          int ref_stride,
                           unsigned int* sse);
 #define vpx_mse8x8 vpx_mse8x8_c
 
@@ -764,7 +764,7 @@
 
 void vpx_sad16x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad16x16x4d vpx_sad16x16x4d_c
@@ -791,7 +791,7 @@
 
 void vpx_sad16x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad16x32x4d vpx_sad16x32x4d_c
@@ -818,7 +818,7 @@
 
 void vpx_sad16x8x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 #define vpx_sad16x8x4d vpx_sad16x8x4d_c
@@ -845,7 +845,7 @@
 
 void vpx_sad32x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad32x16x4d vpx_sad32x16x4d_c
@@ -865,7 +865,7 @@
 
 void vpx_sad32x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad32x32x4d vpx_sad32x32x4d_c
@@ -885,7 +885,7 @@
 
 void vpx_sad32x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad32x64x4d vpx_sad32x64x4d_c
@@ -912,7 +912,7 @@
 
 void vpx_sad4x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 #define vpx_sad4x4x4d vpx_sad4x4x4d_c
@@ -939,7 +939,7 @@
 
 void vpx_sad4x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 #define vpx_sad4x8x4d vpx_sad4x8x4d_c
@@ -959,7 +959,7 @@
 
 void vpx_sad64x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad64x32x4d vpx_sad64x32x4d_c
@@ -979,7 +979,7 @@
 
 void vpx_sad64x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad64x64x4d vpx_sad64x64x4d_c
@@ -1006,7 +1006,7 @@
 
 void vpx_sad8x16x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 #define vpx_sad8x16x4d vpx_sad8x16x4d_c
@@ -1033,7 +1033,7 @@
 
 void vpx_sad8x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 #define vpx_sad8x4x4d vpx_sad8x4x4d_c
@@ -1060,7 +1060,7 @@
 
 void vpx_sad8x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 #define vpx_sad8x8x4d vpx_sad8x8x4d_c
@@ -1154,9 +1154,9 @@
 #define vpx_scaled_vert vpx_scaled_vert_c
 
 uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -1164,9 +1164,9 @@
 #define vpx_sub_pixel_avg_variance16x16 vpx_sub_pixel_avg_variance16x16_c
 
 uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -1174,9 +1174,9 @@
 #define vpx_sub_pixel_avg_variance16x32 vpx_sub_pixel_avg_variance16x32_c
 
 uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
@@ -1184,9 +1184,9 @@
 #define vpx_sub_pixel_avg_variance16x8 vpx_sub_pixel_avg_variance16x8_c
 
 uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -1194,9 +1194,9 @@
 #define vpx_sub_pixel_avg_variance32x16 vpx_sub_pixel_avg_variance32x16_c
 
 uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -1204,9 +1204,9 @@
 #define vpx_sub_pixel_avg_variance32x32 vpx_sub_pixel_avg_variance32x32_c
 
 uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -1214,9 +1214,9 @@
 #define vpx_sub_pixel_avg_variance32x64 vpx_sub_pixel_avg_variance32x64_c
 
 uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
@@ -1224,9 +1224,9 @@
 #define vpx_sub_pixel_avg_variance4x4 vpx_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
@@ -1234,9 +1234,9 @@
 #define vpx_sub_pixel_avg_variance4x8 vpx_sub_pixel_avg_variance4x8_c
 
 uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -1244,9 +1244,9 @@
 #define vpx_sub_pixel_avg_variance64x32 vpx_sub_pixel_avg_variance64x32_c
 
 uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -1254,9 +1254,9 @@
 #define vpx_sub_pixel_avg_variance64x64 vpx_sub_pixel_avg_variance64x64_c
 
 uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
@@ -1264,9 +1264,9 @@
 #define vpx_sub_pixel_avg_variance8x16 vpx_sub_pixel_avg_variance8x16_c
 
 uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
@@ -1274,9 +1274,9 @@
 #define vpx_sub_pixel_avg_variance8x4 vpx_sub_pixel_avg_variance8x4_c
 
 uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
@@ -1284,117 +1284,117 @@
 #define vpx_sub_pixel_avg_variance8x8 vpx_sub_pixel_avg_variance8x8_c
 
 uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance16x16 vpx_sub_pixel_variance16x16_c
 
 uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance16x32 vpx_sub_pixel_variance16x32_c
 
 uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 #define vpx_sub_pixel_variance16x8 vpx_sub_pixel_variance16x8_c
 
 uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance32x16 vpx_sub_pixel_variance32x16_c
 
 uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance32x32 vpx_sub_pixel_variance32x32_c
 
 uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance32x64 vpx_sub_pixel_variance32x64_c
 
 uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 #define vpx_sub_pixel_variance4x4 vpx_sub_pixel_variance4x4_c
 
 uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 #define vpx_sub_pixel_variance4x8 vpx_sub_pixel_variance4x8_c
 
 uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance64x32 vpx_sub_pixel_variance64x32_c
 
 uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance64x64 vpx_sub_pixel_variance64x64_c
 
 uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 #define vpx_sub_pixel_variance8x16 vpx_sub_pixel_variance8x16_c
 
 uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 #define vpx_sub_pixel_variance8x4 vpx_sub_pixel_variance8x4_c
 
 uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
@@ -1414,146 +1414,146 @@
 #define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_c
 
 void vpx_tm_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_c
 
 void vpx_tm_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_c
 
 void vpx_tm_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_c
 
 void vpx_tm_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_c
 
 void vpx_v_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_v_predictor_16x16 vpx_v_predictor_16x16_c
 
 void vpx_v_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_v_predictor_32x32 vpx_v_predictor_32x32_c
 
 void vpx_v_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 #define vpx_v_predictor_4x4 vpx_v_predictor_4x4_c
 
 void vpx_v_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 #define vpx_v_predictor_8x8 vpx_v_predictor_8x8_c
 
 unsigned int vpx_variance16x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance16x16 vpx_variance16x16_c
 
 unsigned int vpx_variance16x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance16x32 vpx_variance16x32_c
 
 unsigned int vpx_variance16x8_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 #define vpx_variance16x8 vpx_variance16x8_c
 
 unsigned int vpx_variance32x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance32x16 vpx_variance32x16_c
 
 unsigned int vpx_variance32x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance32x32 vpx_variance32x32_c
 
 unsigned int vpx_variance32x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance32x64 vpx_variance32x64_c
 
 unsigned int vpx_variance4x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 #define vpx_variance4x4 vpx_variance4x4_c
 
 unsigned int vpx_variance4x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 #define vpx_variance4x8 vpx_variance4x8_c
 
 unsigned int vpx_variance64x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance64x32 vpx_variance64x32_c
 
 unsigned int vpx_variance64x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance64x64 vpx_variance64x64_c
 
 unsigned int vpx_variance8x16_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 #define vpx_variance8x16 vpx_variance8x16_c
 
 unsigned int vpx_variance8x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 #define vpx_variance8x4 vpx_variance8x4_c
 
 unsigned int vpx_variance8x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 #define vpx_variance8x8 vpx_variance8x8_c
 
 void vpx_ve_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c
diff --git a/third_party/libvpx/source/config/linux/arm64/vp8_rtcd.h b/third_party/libvpx/source/config/linux/arm64/vp8_rtcd.h
index 737afd5..8f2d3e5 100644
--- a/third_party/libvpx/source/config/linux/arm64/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm64/vp8_rtcd.h
@@ -27,68 +27,68 @@
 extern "C" {
 #endif
 
-void vp8_bilinear_predict16x16_c(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_bilinear_predict16x16_c(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-void vp8_bilinear_predict16x16_neon(unsigned char* src,
-                                    int src_pitch,
-                                    int xofst,
-                                    int yofst,
-                                    unsigned char* dst,
+void vp8_bilinear_predict16x16_neon(unsigned char* src_ptr,
+                                    int src_pixels_per_line,
+                                    int xoffset,
+                                    int yoffset,
+                                    unsigned char* dst_ptr,
                                     int dst_pitch);
 #define vp8_bilinear_predict16x16 vp8_bilinear_predict16x16_neon
 
-void vp8_bilinear_predict4x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict4x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict4x4_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict4x4_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_neon
 
-void vp8_bilinear_predict8x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x4_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x4_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_neon
 
-void vp8_bilinear_predict8x8_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x8_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x8_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x8_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict8x8 vp8_bilinear_predict8x8_neon
 
 void vp8_blend_b_c(unsigned char* y,
                    unsigned char* u,
                    unsigned char* v,
-                   int y1,
-                   int u1,
-                   int v1,
+                   int y_1,
+                   int u_1,
+                   int v_1,
                    int alpha,
                    int stride);
 #define vp8_blend_b vp8_blend_b_c
@@ -96,9 +96,9 @@
 void vp8_blend_mb_inner_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_inner vp8_blend_mb_inner_c
@@ -106,9 +106,9 @@
 void vp8_blend_mb_outer_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_outer vp8_blend_mb_outer_c
@@ -117,44 +117,44 @@
 #define vp8_block_error vp8_block_error_c
 
 void vp8_copy_mem16x16_c(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 void vp8_copy_mem16x16_neon(unsigned char* src,
-                            int src_pitch,
+                            int src_stride,
                             unsigned char* dst,
-                            int dst_pitch);
+                            int dst_stride);
 #define vp8_copy_mem16x16 vp8_copy_mem16x16_neon
 
 void vp8_copy_mem8x4_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 void vp8_copy_mem8x4_neon(unsigned char* src,
-                          int src_pitch,
+                          int src_stride,
                           unsigned char* dst,
-                          int dst_pitch);
+                          int dst_stride);
 #define vp8_copy_mem8x4 vp8_copy_mem8x4_neon
 
 void vp8_copy_mem8x8_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 void vp8_copy_mem8x8_neon(unsigned char* src,
-                          int src_pitch,
+                          int src_stride,
                           unsigned char* dst,
-                          int dst_pitch);
+                          int dst_stride);
 #define vp8_copy_mem8x8 vp8_copy_mem8x8_neon
 
-void vp8_dc_only_idct_add_c(short input,
-                            unsigned char* pred,
+void vp8_dc_only_idct_add_c(short input_dc,
+                            unsigned char* pred_ptr,
                             int pred_stride,
-                            unsigned char* dst,
+                            unsigned char* dst_ptr,
                             int dst_stride);
-void vp8_dc_only_idct_add_neon(short input,
-                               unsigned char* pred,
+void vp8_dc_only_idct_add_neon(short input_dc,
+                               unsigned char* pred_ptr,
                                int pred_stride,
-                               unsigned char* dst,
+                               unsigned char* dst_ptr,
                                int dst_stride);
 #define vp8_dc_only_idct_add vp8_dc_only_idct_add_neon
 
@@ -196,11 +196,11 @@
 
 void vp8_dequant_idct_add_c(short* input,
                             short* dq,
-                            unsigned char* output,
+                            unsigned char* dest,
                             int stride);
 void vp8_dequant_idct_add_neon(short* input,
                                short* dq,
-                               unsigned char* output,
+                               unsigned char* dest,
                                int stride);
 #define vp8_dequant_idct_add vp8_dequant_idct_add_neon
 
@@ -230,8 +230,8 @@
                                        char* eobs);
 #define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_neon
 
-void vp8_dequantize_b_c(struct blockd*, short* dqc);
-void vp8_dequantize_b_neon(struct blockd*, short* dqc);
+void vp8_dequantize_b_c(struct blockd*, short* DQC);
+void vp8_dequantize_b_neon(struct blockd*, short* DQC);
 #define vp8_dequantize_b vp8_dequantize_b_neon
 
 int vp8_diamond_search_sad_c(struct macroblock* x,
@@ -283,91 +283,91 @@
                           union int_mv* center_mv);
 #define vp8_full_search_sad vp8_full_search_sad_c
 
-void vp8_loop_filter_bh_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bh_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bh_neon(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bh_neon(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
 #define vp8_loop_filter_bh vp8_loop_filter_bh_neon
 
-void vp8_loop_filter_bv_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bv_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bv_neon(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bv_neon(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
 #define vp8_loop_filter_bv vp8_loop_filter_bv_neon
 
-void vp8_loop_filter_mbh_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbh_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbh_neon(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbh_neon(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbh vp8_loop_filter_mbh_neon
 
-void vp8_loop_filter_mbv_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbv_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbv_neon(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbv_neon(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbv vp8_loop_filter_mbv_neon
 
-void vp8_loop_filter_bhs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bhs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bhs_neon(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bhs_neon(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_neon
 
-void vp8_loop_filter_bvs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bvs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bvs_neon(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bvs_neon(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_neon
 
-void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y,
-                                              int ystride,
+void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y_ptr,
+                                              int y_stride,
                                               const unsigned char* blimit);
-void vp8_loop_filter_mbhs_neon(unsigned char* y,
-                               int ystride,
+void vp8_loop_filter_mbhs_neon(unsigned char* y_ptr,
+                               int y_stride,
                                const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbh vp8_loop_filter_mbhs_neon
 
-void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y,
-                                            int ystride,
+void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y_ptr,
+                                            int y_stride,
                                             const unsigned char* blimit);
-void vp8_loop_filter_mbvs_neon(unsigned char* y,
-                               int ystride,
+void vp8_loop_filter_mbvs_neon(unsigned char* y_ptr,
+                               int y_stride,
                                const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbv vp8_loop_filter_mbvs_neon
 
@@ -381,8 +381,8 @@
                               struct block* b,
                               struct blockd* d,
                               union int_mv* ref_mv,
-                              int sad_per_bit,
-                              int distance,
+                              int error_per_bit,
+                              int search_range,
                               struct variance_vtable* fn_ptr,
                               int* mvcost[2],
                               union int_mv* center_mv);
@@ -400,81 +400,81 @@
 #define vp8_short_fdct8x4 vp8_short_fdct8x4_neon
 
 void vp8_short_idct4x4llm_c(short* input,
-                            unsigned char* pred,
-                            int pitch,
-                            unsigned char* dst,
+                            unsigned char* pred_ptr,
+                            int pred_stride,
+                            unsigned char* dst_ptr,
                             int dst_stride);
 void vp8_short_idct4x4llm_neon(short* input,
-                               unsigned char* pred,
-                               int pitch,
-                               unsigned char* dst,
+                               unsigned char* pred_ptr,
+                               int pred_stride,
+                               unsigned char* dst_ptr,
                                int dst_stride);
 #define vp8_short_idct4x4llm vp8_short_idct4x4llm_neon
 
-void vp8_short_inv_walsh4x4_c(short* input, short* output);
-void vp8_short_inv_walsh4x4_neon(short* input, short* output);
+void vp8_short_inv_walsh4x4_c(short* input, short* mb_dqcoeff);
+void vp8_short_inv_walsh4x4_neon(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_neon
 
-void vp8_short_inv_walsh4x4_1_c(short* input, short* output);
+void vp8_short_inv_walsh4x4_1_c(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c
 
 void vp8_short_walsh4x4_c(short* input, short* output, int pitch);
 void vp8_short_walsh4x4_neon(short* input, short* output, int pitch);
 #define vp8_short_walsh4x4 vp8_short_walsh4x4_neon
 
-void vp8_sixtap_predict16x16_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_sixtap_predict16x16_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_sixtap_predict16x16_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_sixtap_predict16x16_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_sixtap_predict16x16 vp8_sixtap_predict16x16_neon
 
-void vp8_sixtap_predict4x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict4x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict4x4_neon(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict4x4_neon(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
 #define vp8_sixtap_predict4x4 vp8_sixtap_predict4x4_neon
 
-void vp8_sixtap_predict8x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x4_neon(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x4_neon(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
 #define vp8_sixtap_predict8x4 vp8_sixtap_predict8x4_neon
 
-void vp8_sixtap_predict8x8_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x8_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x8_neon(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x8_neon(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
 #define vp8_sixtap_predict8x8 vp8_sixtap_predict8x8_neon
 
diff --git a/third_party/libvpx/source/config/linux/arm64/vp9_rtcd.h b/third_party/libvpx/source/config/linux/arm64/vp9_rtcd.h
index 309c7808..cdfebccf 100644
--- a/third_party/libvpx/source/config/linux/arm64/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm64/vp9_rtcd.h
@@ -140,12 +140,12 @@
 #define vp9_fwht4x4 vp9_fwht4x4_c
 
 void vp9_iht16x16_256_add_c(const tran_low_t* input,
-                            uint8_t* output,
-                            int pitch,
+                            uint8_t* dest,
+                            int stride,
                             int tx_type);
 void vp9_iht16x16_256_add_neon(const tran_low_t* input,
-                               uint8_t* output,
-                               int pitch,
+                               uint8_t* dest,
+                               int stride,
                                int tx_type);
 #define vp9_iht16x16_256_add vp9_iht16x16_256_add_neon
 
diff --git a/third_party/libvpx/source/config/linux/arm64/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/linux/arm64/vpx_dsp_rtcd.h
index 453e90e..abd9cbd 100644
--- a/third_party/libvpx/source/config/linux/arm64/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/linux/arm64/vpx_dsp_rtcd.h
@@ -235,349 +235,349 @@
 #define vpx_convolve_copy vpx_convolve_copy_neon
 
 void vpx_d117_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c
 
 void vpx_d117_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c
 
 void vpx_d117_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c
 
 void vpx_d117_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c
 
 void vpx_d135_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d135_predictor_16x16_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_neon
 
 void vpx_d135_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d135_predictor_32x32_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_neon
 
 void vpx_d135_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d135_predictor_4x4_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_neon
 
 void vpx_d135_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d135_predictor_8x8_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_neon
 
 void vpx_d153_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d153_predictor_16x16 vpx_d153_predictor_16x16_c
 
 void vpx_d153_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d153_predictor_32x32 vpx_d153_predictor_32x32_c
 
 void vpx_d153_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d153_predictor_4x4 vpx_d153_predictor_4x4_c
 
 void vpx_d153_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d153_predictor_8x8 vpx_d153_predictor_8x8_c
 
 void vpx_d207_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d207_predictor_16x16 vpx_d207_predictor_16x16_c
 
 void vpx_d207_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d207_predictor_32x32 vpx_d207_predictor_32x32_c
 
 void vpx_d207_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_c
 
 void vpx_d207_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d207_predictor_8x8 vpx_d207_predictor_8x8_c
 
 void vpx_d45_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_16x16_neon(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_d45_predictor_16x16 vpx_d45_predictor_16x16_neon
 
 void vpx_d45_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_32x32_neon(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_d45_predictor_32x32 vpx_d45_predictor_32x32_neon
 
 void vpx_d45_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_4x4_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_neon
 
 void vpx_d45_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_8x8_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_neon
 
 void vpx_d45e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c
 
 void vpx_d63_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d63_predictor_16x16 vpx_d63_predictor_16x16_c
 
 void vpx_d63_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d63_predictor_32x32 vpx_d63_predictor_32x32_c
 
 void vpx_d63_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d63_predictor_4x4 vpx_d63_predictor_4x4_c
 
 void vpx_d63_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d63_predictor_8x8 vpx_d63_predictor_8x8_c
 
 void vpx_d63e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c
 
 void vpx_dc_128_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_16x16_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_neon
 
 void vpx_dc_128_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_32x32_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_neon
 
 void vpx_dc_128_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_4x4_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_neon
 
 void vpx_dc_128_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_8x8_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_neon
 
 void vpx_dc_left_predictor_16x16_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_16x16_neon(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 #define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_neon
 
 void vpx_dc_left_predictor_32x32_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_32x32_neon(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 #define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_neon
 
 void vpx_dc_left_predictor_4x4_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_4x4_neon(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 #define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_neon
 
 void vpx_dc_left_predictor_8x8_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_8x8_neon(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 #define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_neon
 
 void vpx_dc_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_16x16_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_neon
 
 void vpx_dc_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_32x32_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_neon
 
 void vpx_dc_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_4x4_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_neon
 
 void vpx_dc_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_8x8_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_neon
 
 void vpx_dc_top_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_16x16_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_neon
 
 void vpx_dc_top_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_32x32_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_neon
 
 void vpx_dc_top_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_4x4_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_neon
 
 void vpx_dc_top_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_8x8_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_neon
@@ -621,13 +621,13 @@
 #define vpx_fdct8x8_1 vpx_fdct8x8_1_neon
 
 void vpx_get16x16var_c(const uint8_t* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        const uint8_t* ref_ptr,
                        int ref_stride,
                        unsigned int* sse,
                        int* sum);
 void vpx_get16x16var_neon(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
                           int ref_stride,
                           unsigned int* sse,
@@ -635,23 +635,23 @@
 #define vpx_get16x16var vpx_get16x16var_neon
 
 unsigned int vpx_get4x4sse_cs_c(const unsigned char* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const unsigned char* ref_ptr,
                                 int ref_stride);
 unsigned int vpx_get4x4sse_cs_neon(const unsigned char* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const unsigned char* ref_ptr,
                                    int ref_stride);
 #define vpx_get4x4sse_cs vpx_get4x4sse_cs_neon
 
 void vpx_get8x8var_c(const uint8_t* src_ptr,
-                     int source_stride,
+                     int src_stride,
                      const uint8_t* ref_ptr,
                      int ref_stride,
                      unsigned int* sse,
                      int* sum);
 void vpx_get8x8var_neon(const uint8_t* src_ptr,
-                        int source_stride,
+                        int src_stride,
                         const uint8_t* ref_ptr,
                         int ref_stride,
                         unsigned int* sse,
@@ -662,41 +662,41 @@
 #define vpx_get_mb_ss vpx_get_mb_ss_c
 
 void vpx_h_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_16x16_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_h_predictor_16x16 vpx_h_predictor_16x16_neon
 
 void vpx_h_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_32x32_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_h_predictor_32x32 vpx_h_predictor_32x32_neon
 
 void vpx_h_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_4x4_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_h_predictor_4x4 vpx_h_predictor_4x4_neon
 
 void vpx_h_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_8x8_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_h_predictor_8x8 vpx_h_predictor_8x8_neon
@@ -723,7 +723,7 @@
 #define vpx_hadamard_8x8 vpx_hadamard_8x8_neon
 
 void vpx_he_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c
@@ -996,12 +996,12 @@
                                   const uint8_t* thresh1);
 #define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_neon
 
-void vpx_mbpost_proc_across_ip_c(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_c(unsigned char* src,
                                  int pitch,
                                  int rows,
                                  int cols,
                                  int flimit);
-void vpx_mbpost_proc_across_ip_neon(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_neon(unsigned char* src,
                                     int pitch,
                                     int rows,
                                     int cols,
@@ -1035,35 +1035,35 @@
 #define vpx_minmax_8x8 vpx_minmax_8x8_neon
 
 unsigned int vpx_mse16x16_c(const uint8_t* src_ptr,
-                            int source_stride,
+                            int src_stride,
                             const uint8_t* ref_ptr,
-                            int recon_stride,
+                            int ref_stride,
                             unsigned int* sse);
 unsigned int vpx_mse16x16_neon(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
-                               int recon_stride,
+                               int ref_stride,
                                unsigned int* sse);
 #define vpx_mse16x16 vpx_mse16x16_neon
 
 unsigned int vpx_mse16x8_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 #define vpx_mse16x8 vpx_mse16x8_c
 
 unsigned int vpx_mse8x16_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 #define vpx_mse8x16 vpx_mse8x16_c
 
 unsigned int vpx_mse8x8_c(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
-                          int recon_stride,
+                          int ref_stride,
                           unsigned int* sse);
 #define vpx_mse8x8 vpx_mse8x8_c
 
@@ -1180,12 +1180,12 @@
 
 void vpx_sad16x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x16x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad16x16x4d vpx_sad16x16x4d_neon
@@ -1221,12 +1221,12 @@
 
 void vpx_sad16x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x32x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad16x32x4d vpx_sad16x32x4d_neon
@@ -1262,12 +1262,12 @@
 
 void vpx_sad16x8x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad16x8x4d_neon(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 #define vpx_sad16x8x4d vpx_sad16x8x4d_neon
@@ -1303,12 +1303,12 @@
 
 void vpx_sad32x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x16x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x16x4d vpx_sad32x16x4d_neon
@@ -1337,12 +1337,12 @@
 
 void vpx_sad32x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x32x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x32x4d vpx_sad32x32x4d_neon
@@ -1371,12 +1371,12 @@
 
 void vpx_sad32x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x64x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x64x4d vpx_sad32x64x4d_neon
@@ -1412,12 +1412,12 @@
 
 void vpx_sad4x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x4x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad4x4x4d vpx_sad4x4x4d_neon
@@ -1453,12 +1453,12 @@
 
 void vpx_sad4x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x8x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad4x8x4d vpx_sad4x8x4d_neon
@@ -1487,12 +1487,12 @@
 
 void vpx_sad64x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x32x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad64x32x4d vpx_sad64x32x4d_neon
@@ -1521,12 +1521,12 @@
 
 void vpx_sad64x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x64x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad64x64x4d vpx_sad64x64x4d_neon
@@ -1562,12 +1562,12 @@
 
 void vpx_sad8x16x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad8x16x4d_neon(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 #define vpx_sad8x16x4d vpx_sad8x16x4d_neon
@@ -1603,12 +1603,12 @@
 
 void vpx_sad8x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x4x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad8x4x4d vpx_sad8x4x4d_neon
@@ -1644,12 +1644,12 @@
 
 void vpx_sad8x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x8x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad8x8x4d vpx_sad8x8x4d_neon
@@ -1755,17 +1755,17 @@
 #define vpx_scaled_vert vpx_scaled_vert_c
 
 uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x16_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1773,17 +1773,17 @@
 #define vpx_sub_pixel_avg_variance16x16 vpx_sub_pixel_avg_variance16x16_neon
 
 uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x32_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1791,17 +1791,17 @@
 #define vpx_sub_pixel_avg_variance16x32 vpx_sub_pixel_avg_variance16x32_neon
 
 uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x8_neon(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
@@ -1809,17 +1809,17 @@
 #define vpx_sub_pixel_avg_variance16x8 vpx_sub_pixel_avg_variance16x8_neon
 
 uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x16_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1827,17 +1827,17 @@
 #define vpx_sub_pixel_avg_variance32x16 vpx_sub_pixel_avg_variance32x16_neon
 
 uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x32_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1845,17 +1845,17 @@
 #define vpx_sub_pixel_avg_variance32x32 vpx_sub_pixel_avg_variance32x32_neon
 
 uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x64_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1863,17 +1863,17 @@
 #define vpx_sub_pixel_avg_variance32x64 vpx_sub_pixel_avg_variance32x64_neon
 
 uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x4_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
@@ -1881,17 +1881,17 @@
 #define vpx_sub_pixel_avg_variance4x4 vpx_sub_pixel_avg_variance4x4_neon
 
 uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x8_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
@@ -1899,17 +1899,17 @@
 #define vpx_sub_pixel_avg_variance4x8 vpx_sub_pixel_avg_variance4x8_neon
 
 uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x32_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1917,17 +1917,17 @@
 #define vpx_sub_pixel_avg_variance64x32 vpx_sub_pixel_avg_variance64x32_neon
 
 uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x64_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -1935,17 +1935,17 @@
 #define vpx_sub_pixel_avg_variance64x64 vpx_sub_pixel_avg_variance64x64_neon
 
 uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x16_neon(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
@@ -1953,17 +1953,17 @@
 #define vpx_sub_pixel_avg_variance8x16 vpx_sub_pixel_avg_variance8x16_neon
 
 uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x4_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
@@ -1971,17 +1971,17 @@
 #define vpx_sub_pixel_avg_variance8x4 vpx_sub_pixel_avg_variance8x4_neon
 
 uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x8_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
@@ -1989,208 +1989,208 @@
 #define vpx_sub_pixel_avg_variance8x8 vpx_sub_pixel_avg_variance8x8_neon
 
 uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x16_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance16x16 vpx_sub_pixel_variance16x16_neon
 
 uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x32_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance16x32 vpx_sub_pixel_variance16x32_neon
 
 uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x8_neon(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 #define vpx_sub_pixel_variance16x8 vpx_sub_pixel_variance16x8_neon
 
 uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x16_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance32x16 vpx_sub_pixel_variance32x16_neon
 
 uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x32_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance32x32 vpx_sub_pixel_variance32x32_neon
 
 uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x64_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance32x64 vpx_sub_pixel_variance32x64_neon
 
 uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x4_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 #define vpx_sub_pixel_variance4x4 vpx_sub_pixel_variance4x4_neon
 
 uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x8_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 #define vpx_sub_pixel_variance4x8 vpx_sub_pixel_variance4x8_neon
 
 uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x32_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance64x32 vpx_sub_pixel_variance64x32_neon
 
 uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x64_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance64x64 vpx_sub_pixel_variance64x64_neon
 
 uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x16_neon(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 #define vpx_sub_pixel_variance8x16 vpx_sub_pixel_variance8x16_neon
 
 uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x4_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 #define vpx_sub_pixel_variance8x4 vpx_sub_pixel_variance8x4_neon
 
 uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x8_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
@@ -2219,243 +2219,243 @@
 #define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_neon
 
 void vpx_tm_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_16x16_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_neon
 
 void vpx_tm_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_32x32_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_neon
 
 void vpx_tm_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_4x4_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_neon
 
 void vpx_tm_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_8x8_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_neon
 
 void vpx_v_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_16x16_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_v_predictor_16x16 vpx_v_predictor_16x16_neon
 
 void vpx_v_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_32x32_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_v_predictor_32x32 vpx_v_predictor_32x32_neon
 
 void vpx_v_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_4x4_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_v_predictor_4x4 vpx_v_predictor_4x4_neon
 
 void vpx_v_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_8x8_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_v_predictor_8x8 vpx_v_predictor_8x8_neon
 
 unsigned int vpx_variance16x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x16_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance16x16 vpx_variance16x16_neon
 
 unsigned int vpx_variance16x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x32_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance16x32 vpx_variance16x32_neon
 
 unsigned int vpx_variance16x8_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance16x8_neon(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 #define vpx_variance16x8 vpx_variance16x8_neon
 
 unsigned int vpx_variance32x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x16_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance32x16 vpx_variance32x16_neon
 
 unsigned int vpx_variance32x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x32_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance32x32 vpx_variance32x32_neon
 
 unsigned int vpx_variance32x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x64_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance32x64 vpx_variance32x64_neon
 
 unsigned int vpx_variance4x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x4_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance4x4 vpx_variance4x4_neon
 
 unsigned int vpx_variance4x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x8_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance4x8 vpx_variance4x8_neon
 
 unsigned int vpx_variance64x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x32_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance64x32 vpx_variance64x32_neon
 
 unsigned int vpx_variance64x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x64_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance64x64 vpx_variance64x64_neon
 
 unsigned int vpx_variance8x16_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance8x16_neon(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 #define vpx_variance8x16 vpx_variance8x16_neon
 
 unsigned int vpx_variance8x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x4_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance8x4 vpx_variance8x4_neon
 
 unsigned int vpx_variance8x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x8_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance8x8 vpx_variance8x8_neon
 
 void vpx_ve_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c
diff --git a/third_party/libvpx/source/config/linux/chromeos-arm-neon/vp8_rtcd.h b/third_party/libvpx/source/config/linux/chromeos-arm-neon/vp8_rtcd.h
index 737afd5..8f2d3e5 100644
--- a/third_party/libvpx/source/config/linux/chromeos-arm-neon/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/linux/chromeos-arm-neon/vp8_rtcd.h
@@ -27,68 +27,68 @@
 extern "C" {
 #endif
 
-void vp8_bilinear_predict16x16_c(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_bilinear_predict16x16_c(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-void vp8_bilinear_predict16x16_neon(unsigned char* src,
-                                    int src_pitch,
-                                    int xofst,
-                                    int yofst,
-                                    unsigned char* dst,
+void vp8_bilinear_predict16x16_neon(unsigned char* src_ptr,
+                                    int src_pixels_per_line,
+                                    int xoffset,
+                                    int yoffset,
+                                    unsigned char* dst_ptr,
                                     int dst_pitch);
 #define vp8_bilinear_predict16x16 vp8_bilinear_predict16x16_neon
 
-void vp8_bilinear_predict4x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict4x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict4x4_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict4x4_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_neon
 
-void vp8_bilinear_predict8x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x4_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x4_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_neon
 
-void vp8_bilinear_predict8x8_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x8_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x8_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x8_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict8x8 vp8_bilinear_predict8x8_neon
 
 void vp8_blend_b_c(unsigned char* y,
                    unsigned char* u,
                    unsigned char* v,
-                   int y1,
-                   int u1,
-                   int v1,
+                   int y_1,
+                   int u_1,
+                   int v_1,
                    int alpha,
                    int stride);
 #define vp8_blend_b vp8_blend_b_c
@@ -96,9 +96,9 @@
 void vp8_blend_mb_inner_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_inner vp8_blend_mb_inner_c
@@ -106,9 +106,9 @@
 void vp8_blend_mb_outer_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_outer vp8_blend_mb_outer_c
@@ -117,44 +117,44 @@
 #define vp8_block_error vp8_block_error_c
 
 void vp8_copy_mem16x16_c(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 void vp8_copy_mem16x16_neon(unsigned char* src,
-                            int src_pitch,
+                            int src_stride,
                             unsigned char* dst,
-                            int dst_pitch);
+                            int dst_stride);
 #define vp8_copy_mem16x16 vp8_copy_mem16x16_neon
 
 void vp8_copy_mem8x4_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 void vp8_copy_mem8x4_neon(unsigned char* src,
-                          int src_pitch,
+                          int src_stride,
                           unsigned char* dst,
-                          int dst_pitch);
+                          int dst_stride);
 #define vp8_copy_mem8x4 vp8_copy_mem8x4_neon
 
 void vp8_copy_mem8x8_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 void vp8_copy_mem8x8_neon(unsigned char* src,
-                          int src_pitch,
+                          int src_stride,
                           unsigned char* dst,
-                          int dst_pitch);
+                          int dst_stride);
 #define vp8_copy_mem8x8 vp8_copy_mem8x8_neon
 
-void vp8_dc_only_idct_add_c(short input,
-                            unsigned char* pred,
+void vp8_dc_only_idct_add_c(short input_dc,
+                            unsigned char* pred_ptr,
                             int pred_stride,
-                            unsigned char* dst,
+                            unsigned char* dst_ptr,
                             int dst_stride);
-void vp8_dc_only_idct_add_neon(short input,
-                               unsigned char* pred,
+void vp8_dc_only_idct_add_neon(short input_dc,
+                               unsigned char* pred_ptr,
                                int pred_stride,
-                               unsigned char* dst,
+                               unsigned char* dst_ptr,
                                int dst_stride);
 #define vp8_dc_only_idct_add vp8_dc_only_idct_add_neon
 
@@ -196,11 +196,11 @@
 
 void vp8_dequant_idct_add_c(short* input,
                             short* dq,
-                            unsigned char* output,
+                            unsigned char* dest,
                             int stride);
 void vp8_dequant_idct_add_neon(short* input,
                                short* dq,
-                               unsigned char* output,
+                               unsigned char* dest,
                                int stride);
 #define vp8_dequant_idct_add vp8_dequant_idct_add_neon
 
@@ -230,8 +230,8 @@
                                        char* eobs);
 #define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_neon
 
-void vp8_dequantize_b_c(struct blockd*, short* dqc);
-void vp8_dequantize_b_neon(struct blockd*, short* dqc);
+void vp8_dequantize_b_c(struct blockd*, short* DQC);
+void vp8_dequantize_b_neon(struct blockd*, short* DQC);
 #define vp8_dequantize_b vp8_dequantize_b_neon
 
 int vp8_diamond_search_sad_c(struct macroblock* x,
@@ -283,91 +283,91 @@
                           union int_mv* center_mv);
 #define vp8_full_search_sad vp8_full_search_sad_c
 
-void vp8_loop_filter_bh_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bh_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bh_neon(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bh_neon(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
 #define vp8_loop_filter_bh vp8_loop_filter_bh_neon
 
-void vp8_loop_filter_bv_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bv_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bv_neon(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bv_neon(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
 #define vp8_loop_filter_bv vp8_loop_filter_bv_neon
 
-void vp8_loop_filter_mbh_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbh_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbh_neon(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbh_neon(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbh vp8_loop_filter_mbh_neon
 
-void vp8_loop_filter_mbv_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbv_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbv_neon(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbv_neon(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbv vp8_loop_filter_mbv_neon
 
-void vp8_loop_filter_bhs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bhs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bhs_neon(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bhs_neon(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_neon
 
-void vp8_loop_filter_bvs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bvs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bvs_neon(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bvs_neon(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_neon
 
-void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y,
-                                              int ystride,
+void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y_ptr,
+                                              int y_stride,
                                               const unsigned char* blimit);
-void vp8_loop_filter_mbhs_neon(unsigned char* y,
-                               int ystride,
+void vp8_loop_filter_mbhs_neon(unsigned char* y_ptr,
+                               int y_stride,
                                const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbh vp8_loop_filter_mbhs_neon
 
-void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y,
-                                            int ystride,
+void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y_ptr,
+                                            int y_stride,
                                             const unsigned char* blimit);
-void vp8_loop_filter_mbvs_neon(unsigned char* y,
-                               int ystride,
+void vp8_loop_filter_mbvs_neon(unsigned char* y_ptr,
+                               int y_stride,
                                const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbv vp8_loop_filter_mbvs_neon
 
@@ -381,8 +381,8 @@
                               struct block* b,
                               struct blockd* d,
                               union int_mv* ref_mv,
-                              int sad_per_bit,
-                              int distance,
+                              int error_per_bit,
+                              int search_range,
                               struct variance_vtable* fn_ptr,
                               int* mvcost[2],
                               union int_mv* center_mv);
@@ -400,81 +400,81 @@
 #define vp8_short_fdct8x4 vp8_short_fdct8x4_neon
 
 void vp8_short_idct4x4llm_c(short* input,
-                            unsigned char* pred,
-                            int pitch,
-                            unsigned char* dst,
+                            unsigned char* pred_ptr,
+                            int pred_stride,
+                            unsigned char* dst_ptr,
                             int dst_stride);
 void vp8_short_idct4x4llm_neon(short* input,
-                               unsigned char* pred,
-                               int pitch,
-                               unsigned char* dst,
+                               unsigned char* pred_ptr,
+                               int pred_stride,
+                               unsigned char* dst_ptr,
                                int dst_stride);
 #define vp8_short_idct4x4llm vp8_short_idct4x4llm_neon
 
-void vp8_short_inv_walsh4x4_c(short* input, short* output);
-void vp8_short_inv_walsh4x4_neon(short* input, short* output);
+void vp8_short_inv_walsh4x4_c(short* input, short* mb_dqcoeff);
+void vp8_short_inv_walsh4x4_neon(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_neon
 
-void vp8_short_inv_walsh4x4_1_c(short* input, short* output);
+void vp8_short_inv_walsh4x4_1_c(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c
 
 void vp8_short_walsh4x4_c(short* input, short* output, int pitch);
 void vp8_short_walsh4x4_neon(short* input, short* output, int pitch);
 #define vp8_short_walsh4x4 vp8_short_walsh4x4_neon
 
-void vp8_sixtap_predict16x16_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_sixtap_predict16x16_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_sixtap_predict16x16_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_sixtap_predict16x16_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_sixtap_predict16x16 vp8_sixtap_predict16x16_neon
 
-void vp8_sixtap_predict4x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict4x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict4x4_neon(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict4x4_neon(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
 #define vp8_sixtap_predict4x4 vp8_sixtap_predict4x4_neon
 
-void vp8_sixtap_predict8x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x4_neon(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x4_neon(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
 #define vp8_sixtap_predict8x4 vp8_sixtap_predict8x4_neon
 
-void vp8_sixtap_predict8x8_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x8_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x8_neon(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x8_neon(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
 #define vp8_sixtap_predict8x8 vp8_sixtap_predict8x8_neon
 
diff --git a/third_party/libvpx/source/config/linux/chromeos-arm-neon/vp9_rtcd.h b/third_party/libvpx/source/config/linux/chromeos-arm-neon/vp9_rtcd.h
index 574cd7a..a88b5f0 100644
--- a/third_party/libvpx/source/config/linux/chromeos-arm-neon/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/linux/chromeos-arm-neon/vp9_rtcd.h
@@ -165,13 +165,13 @@
 #define vp9_highbd_fwht4x4 vp9_highbd_fwht4x4_c
 
 void vp9_highbd_iht16x16_256_add_c(const tran_low_t* input,
-                                   uint16_t* output,
-                                   int pitch,
+                                   uint16_t* dest,
+                                   int stride,
                                    int tx_type,
                                    int bd);
 void vp9_highbd_iht16x16_256_add_neon(const tran_low_t* input,
-                                      uint16_t* output,
-                                      int pitch,
+                                      uint16_t* dest,
+                                      int stride,
                                       int tx_type,
                                       int bd);
 #define vp9_highbd_iht16x16_256_add vp9_highbd_iht16x16_256_add_neon
@@ -262,12 +262,12 @@
 #define vp9_highbd_temporal_filter_apply vp9_highbd_temporal_filter_apply_c
 
 void vp9_iht16x16_256_add_c(const tran_low_t* input,
-                            uint8_t* output,
-                            int pitch,
+                            uint8_t* dest,
+                            int stride,
                             int tx_type);
 void vp9_iht16x16_256_add_neon(const tran_low_t* input,
-                               uint8_t* output,
-                               int pitch,
+                               uint8_t* dest,
+                               int stride,
                                int tx_type);
 #define vp9_iht16x16_256_add vp9_iht16x16_256_add_neon
 
diff --git a/third_party/libvpx/source/config/linux/chromeos-arm-neon/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/linux/chromeos-arm-neon/vpx_dsp_rtcd.h
index 13fe98c..50b633b 100644
--- a/third_party/libvpx/source/config/linux/chromeos-arm-neon/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/linux/chromeos-arm-neon/vpx_dsp_rtcd.h
@@ -235,349 +235,349 @@
 #define vpx_convolve_copy vpx_convolve_copy_neon
 
 void vpx_d117_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c
 
 void vpx_d117_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c
 
 void vpx_d117_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c
 
 void vpx_d117_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c
 
 void vpx_d135_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d135_predictor_16x16_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_neon
 
 void vpx_d135_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d135_predictor_32x32_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_neon
 
 void vpx_d135_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d135_predictor_4x4_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_neon
 
 void vpx_d135_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d135_predictor_8x8_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_neon
 
 void vpx_d153_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d153_predictor_16x16 vpx_d153_predictor_16x16_c
 
 void vpx_d153_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d153_predictor_32x32 vpx_d153_predictor_32x32_c
 
 void vpx_d153_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d153_predictor_4x4 vpx_d153_predictor_4x4_c
 
 void vpx_d153_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d153_predictor_8x8 vpx_d153_predictor_8x8_c
 
 void vpx_d207_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d207_predictor_16x16 vpx_d207_predictor_16x16_c
 
 void vpx_d207_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d207_predictor_32x32 vpx_d207_predictor_32x32_c
 
 void vpx_d207_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_c
 
 void vpx_d207_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d207_predictor_8x8 vpx_d207_predictor_8x8_c
 
 void vpx_d45_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_16x16_neon(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_d45_predictor_16x16 vpx_d45_predictor_16x16_neon
 
 void vpx_d45_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_32x32_neon(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_d45_predictor_32x32 vpx_d45_predictor_32x32_neon
 
 void vpx_d45_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_4x4_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_neon
 
 void vpx_d45_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_8x8_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_neon
 
 void vpx_d45e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c
 
 void vpx_d63_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d63_predictor_16x16 vpx_d63_predictor_16x16_c
 
 void vpx_d63_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d63_predictor_32x32 vpx_d63_predictor_32x32_c
 
 void vpx_d63_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d63_predictor_4x4 vpx_d63_predictor_4x4_c
 
 void vpx_d63_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d63_predictor_8x8 vpx_d63_predictor_8x8_c
 
 void vpx_d63e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c
 
 void vpx_dc_128_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_16x16_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_neon
 
 void vpx_dc_128_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_32x32_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_neon
 
 void vpx_dc_128_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_4x4_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_neon
 
 void vpx_dc_128_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_8x8_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_neon
 
 void vpx_dc_left_predictor_16x16_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_16x16_neon(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 #define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_neon
 
 void vpx_dc_left_predictor_32x32_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_32x32_neon(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 #define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_neon
 
 void vpx_dc_left_predictor_4x4_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_4x4_neon(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 #define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_neon
 
 void vpx_dc_left_predictor_8x8_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_8x8_neon(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 #define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_neon
 
 void vpx_dc_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_16x16_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_neon
 
 void vpx_dc_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_32x32_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_neon
 
 void vpx_dc_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_4x4_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_neon
 
 void vpx_dc_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_8x8_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_neon
 
 void vpx_dc_top_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_16x16_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_neon
 
 void vpx_dc_top_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_32x32_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_neon
 
 void vpx_dc_top_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_4x4_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_neon
 
 void vpx_dc_top_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_8x8_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_neon
@@ -621,13 +621,13 @@
 #define vpx_fdct8x8_1 vpx_fdct8x8_1_neon
 
 void vpx_get16x16var_c(const uint8_t* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        const uint8_t* ref_ptr,
                        int ref_stride,
                        unsigned int* sse,
                        int* sum);
 void vpx_get16x16var_neon(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
                           int ref_stride,
                           unsigned int* sse,
@@ -635,23 +635,23 @@
 #define vpx_get16x16var vpx_get16x16var_neon
 
 unsigned int vpx_get4x4sse_cs_c(const unsigned char* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const unsigned char* ref_ptr,
                                 int ref_stride);
 unsigned int vpx_get4x4sse_cs_neon(const unsigned char* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const unsigned char* ref_ptr,
                                    int ref_stride);
 #define vpx_get4x4sse_cs vpx_get4x4sse_cs_neon
 
 void vpx_get8x8var_c(const uint8_t* src_ptr,
-                     int source_stride,
+                     int src_stride,
                      const uint8_t* ref_ptr,
                      int ref_stride,
                      unsigned int* sse,
                      int* sum);
 void vpx_get8x8var_neon(const uint8_t* src_ptr,
-                        int source_stride,
+                        int src_stride,
                         const uint8_t* ref_ptr,
                         int ref_stride,
                         unsigned int* sse,
@@ -662,41 +662,41 @@
 #define vpx_get_mb_ss vpx_get_mb_ss_c
 
 void vpx_h_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_16x16_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_h_predictor_16x16 vpx_h_predictor_16x16_neon
 
 void vpx_h_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_32x32_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_h_predictor_32x32 vpx_h_predictor_32x32_neon
 
 void vpx_h_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_4x4_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_h_predictor_4x4 vpx_h_predictor_4x4_neon
 
 void vpx_h_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_8x8_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_h_predictor_8x8 vpx_h_predictor_8x8_neon
@@ -723,13 +723,13 @@
 #define vpx_hadamard_8x8 vpx_hadamard_8x8_neon
 
 void vpx_he_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c
 
 void vpx_highbd_10_get16x16var_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse,
@@ -737,7 +737,7 @@
 #define vpx_highbd_10_get16x16var vpx_highbd_10_get16x16var_c
 
 void vpx_highbd_10_get8x8var_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse,
@@ -745,38 +745,38 @@
 #define vpx_highbd_10_get8x8var vpx_highbd_10_get8x8var_c
 
 unsigned int vpx_highbd_10_mse16x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 #define vpx_highbd_10_mse16x16 vpx_highbd_10_mse16x16_c
 
 unsigned int vpx_highbd_10_mse16x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_10_mse16x8 vpx_highbd_10_mse16x8_c
 
 unsigned int vpx_highbd_10_mse8x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_10_mse8x16 vpx_highbd_10_mse8x16_c
 
 unsigned int vpx_highbd_10_mse8x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_10_mse8x8 vpx_highbd_10_mse8x8_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -786,9 +786,9 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -797,9 +797,9 @@
   vpx_highbd_10_sub_pixel_avg_variance16x32_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -809,9 +809,9 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -821,9 +821,9 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -833,9 +833,9 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -844,9 +844,9 @@
   vpx_highbd_10_sub_pixel_avg_variance32x64_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -855,9 +855,9 @@
   vpx_highbd_10_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -867,9 +867,9 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -879,9 +879,9 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -890,9 +890,9 @@
   vpx_highbd_10_sub_pixel_avg_variance64x64_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -901,9 +901,9 @@
   vpx_highbd_10_sub_pixel_avg_variance8x16_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -912,9 +912,9 @@
   vpx_highbd_10_sub_pixel_avg_variance8x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -923,9 +923,9 @@
   vpx_highbd_10_sub_pixel_avg_variance8x8_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -933,9 +933,9 @@
   vpx_highbd_10_sub_pixel_variance16x16_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -943,9 +943,9 @@
   vpx_highbd_10_sub_pixel_variance16x32_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -953,9 +953,9 @@
   vpx_highbd_10_sub_pixel_variance16x8_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -963,9 +963,9 @@
   vpx_highbd_10_sub_pixel_variance32x16_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -973,9 +973,9 @@
   vpx_highbd_10_sub_pixel_variance32x32_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -983,9 +983,9 @@
   vpx_highbd_10_sub_pixel_variance32x64_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -993,9 +993,9 @@
   vpx_highbd_10_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1003,9 +1003,9 @@
   vpx_highbd_10_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1013,9 +1013,9 @@
   vpx_highbd_10_sub_pixel_variance64x32_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1023,9 +1023,9 @@
   vpx_highbd_10_sub_pixel_variance64x64_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1033,9 +1033,9 @@
   vpx_highbd_10_sub_pixel_variance8x16_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1043,9 +1043,9 @@
   vpx_highbd_10_sub_pixel_variance8x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1053,98 +1053,98 @@
   vpx_highbd_10_sub_pixel_variance8x8_c
 
 unsigned int vpx_highbd_10_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance16x16 vpx_highbd_10_variance16x16_c
 
 unsigned int vpx_highbd_10_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance16x32 vpx_highbd_10_variance16x32_c
 
 unsigned int vpx_highbd_10_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_10_variance16x8 vpx_highbd_10_variance16x8_c
 
 unsigned int vpx_highbd_10_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance32x16 vpx_highbd_10_variance32x16_c
 
 unsigned int vpx_highbd_10_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance32x32 vpx_highbd_10_variance32x32_c
 
 unsigned int vpx_highbd_10_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance32x64 vpx_highbd_10_variance32x64_c
 
 unsigned int vpx_highbd_10_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance4x4 vpx_highbd_10_variance4x4_c
 
 unsigned int vpx_highbd_10_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance4x8 vpx_highbd_10_variance4x8_c
 
 unsigned int vpx_highbd_10_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance64x32 vpx_highbd_10_variance64x32_c
 
 unsigned int vpx_highbd_10_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance64x64 vpx_highbd_10_variance64x64_c
 
 unsigned int vpx_highbd_10_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_10_variance8x16 vpx_highbd_10_variance8x16_c
 
 unsigned int vpx_highbd_10_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance8x4 vpx_highbd_10_variance8x4_c
 
 unsigned int vpx_highbd_10_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance8x8 vpx_highbd_10_variance8x8_c
 
 void vpx_highbd_12_get16x16var_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse,
@@ -1152,7 +1152,7 @@
 #define vpx_highbd_12_get16x16var vpx_highbd_12_get16x16var_c
 
 void vpx_highbd_12_get8x8var_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse,
@@ -1160,38 +1160,38 @@
 #define vpx_highbd_12_get8x8var vpx_highbd_12_get8x8var_c
 
 unsigned int vpx_highbd_12_mse16x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 #define vpx_highbd_12_mse16x16 vpx_highbd_12_mse16x16_c
 
 unsigned int vpx_highbd_12_mse16x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_12_mse16x8 vpx_highbd_12_mse16x8_c
 
 unsigned int vpx_highbd_12_mse8x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_12_mse8x16 vpx_highbd_12_mse8x16_c
 
 unsigned int vpx_highbd_12_mse8x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_12_mse8x8 vpx_highbd_12_mse8x8_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1201,9 +1201,9 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1212,9 +1212,9 @@
   vpx_highbd_12_sub_pixel_avg_variance16x32_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1224,9 +1224,9 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1236,9 +1236,9 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1248,9 +1248,9 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1259,9 +1259,9 @@
   vpx_highbd_12_sub_pixel_avg_variance32x64_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1270,9 +1270,9 @@
   vpx_highbd_12_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1282,9 +1282,9 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1294,9 +1294,9 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1305,9 +1305,9 @@
   vpx_highbd_12_sub_pixel_avg_variance64x64_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1316,9 +1316,9 @@
   vpx_highbd_12_sub_pixel_avg_variance8x16_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1327,9 +1327,9 @@
   vpx_highbd_12_sub_pixel_avg_variance8x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1338,9 +1338,9 @@
   vpx_highbd_12_sub_pixel_avg_variance8x8_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1348,9 +1348,9 @@
   vpx_highbd_12_sub_pixel_variance16x16_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1358,9 +1358,9 @@
   vpx_highbd_12_sub_pixel_variance16x32_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1368,9 +1368,9 @@
   vpx_highbd_12_sub_pixel_variance16x8_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1378,9 +1378,9 @@
   vpx_highbd_12_sub_pixel_variance32x16_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1388,9 +1388,9 @@
   vpx_highbd_12_sub_pixel_variance32x32_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1398,9 +1398,9 @@
   vpx_highbd_12_sub_pixel_variance32x64_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1408,9 +1408,9 @@
   vpx_highbd_12_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1418,9 +1418,9 @@
   vpx_highbd_12_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1428,9 +1428,9 @@
   vpx_highbd_12_sub_pixel_variance64x32_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1438,9 +1438,9 @@
   vpx_highbd_12_sub_pixel_variance64x64_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1448,9 +1448,9 @@
   vpx_highbd_12_sub_pixel_variance8x16_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1458,9 +1458,9 @@
   vpx_highbd_12_sub_pixel_variance8x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1468,98 +1468,98 @@
   vpx_highbd_12_sub_pixel_variance8x8_c
 
 unsigned int vpx_highbd_12_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance16x16 vpx_highbd_12_variance16x16_c
 
 unsigned int vpx_highbd_12_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance16x32 vpx_highbd_12_variance16x32_c
 
 unsigned int vpx_highbd_12_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_12_variance16x8 vpx_highbd_12_variance16x8_c
 
 unsigned int vpx_highbd_12_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance32x16 vpx_highbd_12_variance32x16_c
 
 unsigned int vpx_highbd_12_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance32x32 vpx_highbd_12_variance32x32_c
 
 unsigned int vpx_highbd_12_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance32x64 vpx_highbd_12_variance32x64_c
 
 unsigned int vpx_highbd_12_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance4x4 vpx_highbd_12_variance4x4_c
 
 unsigned int vpx_highbd_12_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance4x8 vpx_highbd_12_variance4x8_c
 
 unsigned int vpx_highbd_12_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance64x32 vpx_highbd_12_variance64x32_c
 
 unsigned int vpx_highbd_12_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance64x64 vpx_highbd_12_variance64x64_c
 
 unsigned int vpx_highbd_12_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_12_variance8x16 vpx_highbd_12_variance8x16_c
 
 unsigned int vpx_highbd_12_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance8x4 vpx_highbd_12_variance8x4_c
 
 unsigned int vpx_highbd_12_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance8x8 vpx_highbd_12_variance8x8_c
 
 void vpx_highbd_8_get16x16var_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse,
@@ -1567,7 +1567,7 @@
 #define vpx_highbd_8_get16x16var vpx_highbd_8_get16x16var_c
 
 void vpx_highbd_8_get8x8var_c(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
                               int ref_stride,
                               unsigned int* sse,
@@ -1575,37 +1575,37 @@
 #define vpx_highbd_8_get8x8var vpx_highbd_8_get8x8var_c
 
 unsigned int vpx_highbd_8_mse16x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_8_mse16x16 vpx_highbd_8_mse16x16_c
 
 unsigned int vpx_highbd_8_mse16x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_8_mse16x8 vpx_highbd_8_mse16x8_c
 
 unsigned int vpx_highbd_8_mse8x16_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_8_mse8x16 vpx_highbd_8_mse8x16_c
 
 unsigned int vpx_highbd_8_mse8x8_c(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
-                                   int recon_stride,
+                                   int ref_stride,
                                    unsigned int* sse);
 #define vpx_highbd_8_mse8x8 vpx_highbd_8_mse8x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1614,9 +1614,9 @@
   vpx_highbd_8_sub_pixel_avg_variance16x16_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1625,9 +1625,9 @@
   vpx_highbd_8_sub_pixel_avg_variance16x32_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1636,9 +1636,9 @@
   vpx_highbd_8_sub_pixel_avg_variance16x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1647,9 +1647,9 @@
   vpx_highbd_8_sub_pixel_avg_variance32x16_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1658,9 +1658,9 @@
   vpx_highbd_8_sub_pixel_avg_variance32x32_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1669,9 +1669,9 @@
   vpx_highbd_8_sub_pixel_avg_variance32x64_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -1680,9 +1680,9 @@
   vpx_highbd_8_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -1691,9 +1691,9 @@
   vpx_highbd_8_sub_pixel_avg_variance4x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1702,9 +1702,9 @@
   vpx_highbd_8_sub_pixel_avg_variance64x32_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1713,9 +1713,9 @@
   vpx_highbd_8_sub_pixel_avg_variance64x64_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1724,9 +1724,9 @@
   vpx_highbd_8_sub_pixel_avg_variance8x16_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -1735,9 +1735,9 @@
   vpx_highbd_8_sub_pixel_avg_variance8x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -1746,9 +1746,9 @@
   vpx_highbd_8_sub_pixel_avg_variance8x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1756,9 +1756,9 @@
   vpx_highbd_8_sub_pixel_variance16x16_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1766,9 +1766,9 @@
   vpx_highbd_8_sub_pixel_variance16x32_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1776,9 +1776,9 @@
   vpx_highbd_8_sub_pixel_variance16x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1786,9 +1786,9 @@
   vpx_highbd_8_sub_pixel_variance32x16_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1796,9 +1796,9 @@
   vpx_highbd_8_sub_pixel_variance32x32_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1806,27 +1806,27 @@
   vpx_highbd_8_sub_pixel_variance32x64_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance4x4 vpx_highbd_8_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance4x8 vpx_highbd_8_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1834,9 +1834,9 @@
   vpx_highbd_8_sub_pixel_variance64x32_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1844,9 +1844,9 @@
   vpx_highbd_8_sub_pixel_variance64x64_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1854,118 +1854,118 @@
   vpx_highbd_8_sub_pixel_variance8x16_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance8x4 vpx_highbd_8_sub_pixel_variance8x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance8x8 vpx_highbd_8_sub_pixel_variance8x8_c
 
 unsigned int vpx_highbd_8_variance16x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance16x16 vpx_highbd_8_variance16x16_c
 
 unsigned int vpx_highbd_8_variance16x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance16x32 vpx_highbd_8_variance16x32_c
 
 unsigned int vpx_highbd_8_variance16x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_8_variance16x8 vpx_highbd_8_variance16x8_c
 
 unsigned int vpx_highbd_8_variance32x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance32x16 vpx_highbd_8_variance32x16_c
 
 unsigned int vpx_highbd_8_variance32x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance32x32 vpx_highbd_8_variance32x32_c
 
 unsigned int vpx_highbd_8_variance32x64_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance32x64 vpx_highbd_8_variance32x64_c
 
 unsigned int vpx_highbd_8_variance4x4_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance4x4 vpx_highbd_8_variance4x4_c
 
 unsigned int vpx_highbd_8_variance4x8_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance4x8 vpx_highbd_8_variance4x8_c
 
 unsigned int vpx_highbd_8_variance64x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance64x32 vpx_highbd_8_variance64x32_c
 
 unsigned int vpx_highbd_8_variance64x64_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance64x64 vpx_highbd_8_variance64x64_c
 
 unsigned int vpx_highbd_8_variance8x16_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_8_variance8x16 vpx_highbd_8_variance8x16_c
 
 unsigned int vpx_highbd_8_variance8x4_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance8x4 vpx_highbd_8_variance8x4_c
 
 unsigned int vpx_highbd_8_variance8x8_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance8x8 vpx_highbd_8_variance8x8_c
 
-unsigned int vpx_highbd_avg_4x4_c(const uint8_t*, int p);
+unsigned int vpx_highbd_avg_4x4_c(const uint8_t* s8, int p);
 #define vpx_highbd_avg_4x4 vpx_highbd_avg_4x4_c
 
-unsigned int vpx_highbd_avg_8x8_c(const uint8_t*, int p);
+unsigned int vpx_highbd_avg_8x8_c(const uint8_t* s8, int p);
 #define vpx_highbd_avg_8x8 vpx_highbd_avg_8x8_c
 
 void vpx_highbd_comp_avg_pred_c(uint16_t* comp_pred,
@@ -1987,7 +1987,7 @@
                             int y_step_q4,
                             int w,
                             int h,
-                            int bps);
+                            int bd);
 void vpx_highbd_convolve8_neon(const uint16_t* src,
                                ptrdiff_t src_stride,
                                uint16_t* dst,
@@ -1999,7 +1999,7 @@
                                int y_step_q4,
                                int w,
                                int h,
-                               int bps);
+                               int bd);
 #define vpx_highbd_convolve8 vpx_highbd_convolve8_neon
 
 void vpx_highbd_convolve8_avg_c(const uint16_t* src,
@@ -2013,7 +2013,7 @@
                                 int y_step_q4,
                                 int w,
                                 int h,
-                                int bps);
+                                int bd);
 void vpx_highbd_convolve8_avg_neon(const uint16_t* src,
                                    ptrdiff_t src_stride,
                                    uint16_t* dst,
@@ -2025,7 +2025,7 @@
                                    int y_step_q4,
                                    int w,
                                    int h,
-                                   int bps);
+                                   int bd);
 #define vpx_highbd_convolve8_avg vpx_highbd_convolve8_avg_neon
 
 void vpx_highbd_convolve8_avg_horiz_c(const uint16_t* src,
@@ -2039,7 +2039,7 @@
                                       int y_step_q4,
                                       int w,
                                       int h,
-                                      int bps);
+                                      int bd);
 void vpx_highbd_convolve8_avg_horiz_neon(const uint16_t* src,
                                          ptrdiff_t src_stride,
                                          uint16_t* dst,
@@ -2051,7 +2051,7 @@
                                          int y_step_q4,
                                          int w,
                                          int h,
-                                         int bps);
+                                         int bd);
 #define vpx_highbd_convolve8_avg_horiz vpx_highbd_convolve8_avg_horiz_neon
 
 void vpx_highbd_convolve8_avg_vert_c(const uint16_t* src,
@@ -2065,7 +2065,7 @@
                                      int y_step_q4,
                                      int w,
                                      int h,
-                                     int bps);
+                                     int bd);
 void vpx_highbd_convolve8_avg_vert_neon(const uint16_t* src,
                                         ptrdiff_t src_stride,
                                         uint16_t* dst,
@@ -2077,7 +2077,7 @@
                                         int y_step_q4,
                                         int w,
                                         int h,
-                                        int bps);
+                                        int bd);
 #define vpx_highbd_convolve8_avg_vert vpx_highbd_convolve8_avg_vert_neon
 
 void vpx_highbd_convolve8_horiz_c(const uint16_t* src,
@@ -2091,7 +2091,7 @@
                                   int y_step_q4,
                                   int w,
                                   int h,
-                                  int bps);
+                                  int bd);
 void vpx_highbd_convolve8_horiz_neon(const uint16_t* src,
                                      ptrdiff_t src_stride,
                                      uint16_t* dst,
@@ -2103,7 +2103,7 @@
                                      int y_step_q4,
                                      int w,
                                      int h,
-                                     int bps);
+                                     int bd);
 #define vpx_highbd_convolve8_horiz vpx_highbd_convolve8_horiz_neon
 
 void vpx_highbd_convolve8_vert_c(const uint16_t* src,
@@ -2117,7 +2117,7 @@
                                  int y_step_q4,
                                  int w,
                                  int h,
-                                 int bps);
+                                 int bd);
 void vpx_highbd_convolve8_vert_neon(const uint16_t* src,
                                     ptrdiff_t src_stride,
                                     uint16_t* dst,
@@ -2129,7 +2129,7 @@
                                     int y_step_q4,
                                     int w,
                                     int h,
-                                    int bps);
+                                    int bd);
 #define vpx_highbd_convolve8_vert vpx_highbd_convolve8_vert_neon
 
 void vpx_highbd_convolve_avg_c(const uint16_t* src,
@@ -2143,7 +2143,7 @@
                                int y_step_q4,
                                int w,
                                int h,
-                               int bps);
+                               int bd);
 void vpx_highbd_convolve_avg_neon(const uint16_t* src,
                                   ptrdiff_t src_stride,
                                   uint16_t* dst,
@@ -2155,7 +2155,7 @@
                                   int y_step_q4,
                                   int w,
                                   int h,
-                                  int bps);
+                                  int bd);
 #define vpx_highbd_convolve_avg vpx_highbd_convolve_avg_neon
 
 void vpx_highbd_convolve_copy_c(const uint16_t* src,
@@ -2169,7 +2169,7 @@
                                 int y_step_q4,
                                 int w,
                                 int h,
-                                int bps);
+                                int bd);
 void vpx_highbd_convolve_copy_neon(const uint16_t* src,
                                    ptrdiff_t src_stride,
                                    uint16_t* dst,
@@ -2181,272 +2181,272 @@
                                    int y_step_q4,
                                    int w,
                                    int h,
-                                   int bps);
+                                   int bd);
 #define vpx_highbd_convolve_copy vpx_highbd_convolve_copy_neon
 
 void vpx_highbd_d117_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d117_predictor_16x16 vpx_highbd_d117_predictor_16x16_c
 
 void vpx_highbd_d117_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d117_predictor_32x32 vpx_highbd_d117_predictor_32x32_c
 
 void vpx_highbd_d117_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d117_predictor_4x4 vpx_highbd_d117_predictor_4x4_c
 
 void vpx_highbd_d117_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d117_predictor_8x8 vpx_highbd_d117_predictor_8x8_c
 
 void vpx_highbd_d135_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d135_predictor_16x16_neon(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_d135_predictor_16x16 vpx_highbd_d135_predictor_16x16_neon
 
 void vpx_highbd_d135_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d135_predictor_32x32_neon(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_d135_predictor_32x32 vpx_highbd_d135_predictor_32x32_neon
 
 void vpx_highbd_d135_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d135_predictor_4x4_neon(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d135_predictor_4x4 vpx_highbd_d135_predictor_4x4_neon
 
 void vpx_highbd_d135_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d135_predictor_8x8_neon(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d135_predictor_8x8 vpx_highbd_d135_predictor_8x8_neon
 
 void vpx_highbd_d153_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d153_predictor_16x16 vpx_highbd_d153_predictor_16x16_c
 
 void vpx_highbd_d153_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d153_predictor_32x32 vpx_highbd_d153_predictor_32x32_c
 
 void vpx_highbd_d153_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d153_predictor_4x4 vpx_highbd_d153_predictor_4x4_c
 
 void vpx_highbd_d153_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d153_predictor_8x8 vpx_highbd_d153_predictor_8x8_c
 
 void vpx_highbd_d207_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d207_predictor_16x16 vpx_highbd_d207_predictor_16x16_c
 
 void vpx_highbd_d207_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d207_predictor_32x32 vpx_highbd_d207_predictor_32x32_c
 
 void vpx_highbd_d207_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d207_predictor_4x4 vpx_highbd_d207_predictor_4x4_c
 
 void vpx_highbd_d207_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d207_predictor_8x8 vpx_highbd_d207_predictor_8x8_c
 
 void vpx_highbd_d45_predictor_16x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d45_predictor_16x16_neon(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 #define vpx_highbd_d45_predictor_16x16 vpx_highbd_d45_predictor_16x16_neon
 
 void vpx_highbd_d45_predictor_32x32_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d45_predictor_32x32_neon(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 #define vpx_highbd_d45_predictor_32x32 vpx_highbd_d45_predictor_32x32_neon
 
 void vpx_highbd_d45_predictor_4x4_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d45_predictor_4x4_neon(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d45_predictor_4x4 vpx_highbd_d45_predictor_4x4_neon
 
 void vpx_highbd_d45_predictor_8x8_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d45_predictor_8x8_neon(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d45_predictor_8x8 vpx_highbd_d45_predictor_8x8_neon
 
 void vpx_highbd_d63_predictor_16x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_d63_predictor_16x16 vpx_highbd_d63_predictor_16x16_c
 
 void vpx_highbd_d63_predictor_32x32_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_d63_predictor_32x32 vpx_highbd_d63_predictor_32x32_c
 
 void vpx_highbd_d63_predictor_4x4_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 #define vpx_highbd_d63_predictor_4x4 vpx_highbd_d63_predictor_4x4_c
 
 void vpx_highbd_d63_predictor_8x8_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 #define vpx_highbd_d63_predictor_8x8 vpx_highbd_d63_predictor_8x8_c
 
 void vpx_highbd_dc_128_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_128_predictor_16x16_neon(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_128_predictor_16x16 vpx_highbd_dc_128_predictor_16x16_neon
 
 void vpx_highbd_dc_128_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_128_predictor_32x32_neon(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_128_predictor_32x32 vpx_highbd_dc_128_predictor_32x32_neon
 
 void vpx_highbd_dc_128_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_128_predictor_4x4_neon(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_128_predictor_4x4 vpx_highbd_dc_128_predictor_4x4_neon
 
 void vpx_highbd_dc_128_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_128_predictor_8x8_neon(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_128_predictor_8x8 vpx_highbd_dc_128_predictor_8x8_neon
 
 void vpx_highbd_dc_left_predictor_16x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 void vpx_highbd_dc_left_predictor_16x16_neon(uint16_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint16_t* above,
                                              const uint16_t* left,
                                              int bd);
@@ -2454,12 +2454,12 @@
   vpx_highbd_dc_left_predictor_16x16_neon
 
 void vpx_highbd_dc_left_predictor_32x32_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 void vpx_highbd_dc_left_predictor_32x32_neon(uint16_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint16_t* above,
                                              const uint16_t* left,
                                              int bd);
@@ -2467,120 +2467,120 @@
   vpx_highbd_dc_left_predictor_32x32_neon
 
 void vpx_highbd_dc_left_predictor_4x4_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 void vpx_highbd_dc_left_predictor_4x4_neon(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 #define vpx_highbd_dc_left_predictor_4x4 vpx_highbd_dc_left_predictor_4x4_neon
 
 void vpx_highbd_dc_left_predictor_8x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 void vpx_highbd_dc_left_predictor_8x8_neon(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 #define vpx_highbd_dc_left_predictor_8x8 vpx_highbd_dc_left_predictor_8x8_neon
 
 void vpx_highbd_dc_predictor_16x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_dc_predictor_16x16_neon(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_dc_predictor_16x16 vpx_highbd_dc_predictor_16x16_neon
 
 void vpx_highbd_dc_predictor_32x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_dc_predictor_32x32_neon(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_dc_predictor_32x32 vpx_highbd_dc_predictor_32x32_neon
 
 void vpx_highbd_dc_predictor_4x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_dc_predictor_4x4_neon(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_dc_predictor_4x4 vpx_highbd_dc_predictor_4x4_neon
 
 void vpx_highbd_dc_predictor_8x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_dc_predictor_8x8_neon(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_dc_predictor_8x8 vpx_highbd_dc_predictor_8x8_neon
 
 void vpx_highbd_dc_top_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_top_predictor_16x16_neon(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_top_predictor_16x16 vpx_highbd_dc_top_predictor_16x16_neon
 
 void vpx_highbd_dc_top_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_top_predictor_32x32_neon(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_top_predictor_32x32 vpx_highbd_dc_top_predictor_32x32_neon
 
 void vpx_highbd_dc_top_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_top_predictor_4x4_neon(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_top_predictor_4x4 vpx_highbd_dc_top_predictor_4x4_neon
 
 void vpx_highbd_dc_top_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_top_predictor_8x8_neon(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
@@ -2624,53 +2624,68 @@
 #define vpx_highbd_fdct8x8_1 vpx_fdct8x8_1_neon
 
 void vpx_highbd_h_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_h_predictor_16x16_neon(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_h_predictor_16x16 vpx_highbd_h_predictor_16x16_neon
 
 void vpx_highbd_h_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_h_predictor_32x32_neon(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_h_predictor_32x32 vpx_highbd_h_predictor_32x32_neon
 
 void vpx_highbd_h_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_h_predictor_4x4_neon(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_h_predictor_4x4 vpx_highbd_h_predictor_4x4_neon
 
 void vpx_highbd_h_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_h_predictor_8x8_neon(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_h_predictor_8x8 vpx_highbd_h_predictor_8x8_neon
 
+void vpx_highbd_hadamard_16x16_c(const int16_t* src_diff,
+                                 ptrdiff_t src_stride,
+                                 tran_low_t* coeff);
+#define vpx_highbd_hadamard_16x16 vpx_highbd_hadamard_16x16_c
+
+void vpx_highbd_hadamard_32x32_c(const int16_t* src_diff,
+                                 ptrdiff_t src_stride,
+                                 tran_low_t* coeff);
+#define vpx_highbd_hadamard_32x32 vpx_highbd_hadamard_32x32_c
+
+void vpx_highbd_hadamard_8x8_c(const int16_t* src_diff,
+                               ptrdiff_t src_stride,
+                               tran_low_t* coeff);
+#define vpx_highbd_hadamard_8x8 vpx_highbd_hadamard_8x8_c
+
 void vpx_highbd_idct16x16_10_add_c(const tran_low_t* input,
                                    uint16_t* dest,
                                    int stride,
@@ -3005,9 +3020,9 @@
                                          int bd);
 #define vpx_highbd_lpf_vertical_8_dual vpx_highbd_lpf_vertical_8_dual_neon
 
-void vpx_highbd_minmax_8x8_c(const uint8_t* s,
+void vpx_highbd_minmax_8x8_c(const uint8_t* s8,
                              int p,
-                             const uint8_t* d,
+                             const uint8_t* d8,
                              int dp,
                              int* min,
                              int* max);
@@ -3058,7 +3073,7 @@
 
 void vpx_highbd_sad16x16x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad16x16x4d vpx_highbd_sad16x16x4d_c
@@ -3078,7 +3093,7 @@
 
 void vpx_highbd_sad16x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad16x32x4d vpx_highbd_sad16x32x4d_c
@@ -3098,7 +3113,7 @@
 
 void vpx_highbd_sad16x8x4d_c(const uint8_t* src_ptr,
                              int src_stride,
-                             const uint8_t* const ref_ptr[],
+                             const uint8_t* const ref_array[],
                              int ref_stride,
                              uint32_t* sad_array);
 #define vpx_highbd_sad16x8x4d vpx_highbd_sad16x8x4d_c
@@ -3118,7 +3133,7 @@
 
 void vpx_highbd_sad32x16x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad32x16x4d vpx_highbd_sad32x16x4d_c
@@ -3138,7 +3153,7 @@
 
 void vpx_highbd_sad32x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad32x32x4d vpx_highbd_sad32x32x4d_c
@@ -3158,7 +3173,7 @@
 
 void vpx_highbd_sad32x64x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad32x64x4d vpx_highbd_sad32x64x4d_c
@@ -3178,7 +3193,7 @@
 
 void vpx_highbd_sad4x4x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 #define vpx_highbd_sad4x4x4d vpx_highbd_sad4x4x4d_c
@@ -3198,7 +3213,7 @@
 
 void vpx_highbd_sad4x8x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 #define vpx_highbd_sad4x8x4d vpx_highbd_sad4x8x4d_c
@@ -3218,7 +3233,7 @@
 
 void vpx_highbd_sad64x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad64x32x4d vpx_highbd_sad64x32x4d_c
@@ -3238,7 +3253,7 @@
 
 void vpx_highbd_sad64x64x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad64x64x4d vpx_highbd_sad64x64x4d_c
@@ -3258,7 +3273,7 @@
 
 void vpx_highbd_sad8x16x4d_c(const uint8_t* src_ptr,
                              int src_stride,
-                             const uint8_t* const ref_ptr[],
+                             const uint8_t* const ref_array[],
                              int ref_stride,
                              uint32_t* sad_array);
 #define vpx_highbd_sad8x16x4d vpx_highbd_sad8x16x4d_c
@@ -3278,7 +3293,7 @@
 
 void vpx_highbd_sad8x4x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 #define vpx_highbd_sad8x4x4d vpx_highbd_sad8x4x4d_c
@@ -3298,7 +3313,7 @@
 
 void vpx_highbd_sad8x8x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 #define vpx_highbd_sad8x8x4d vpx_highbd_sad8x8x4d_c
@@ -3307,104 +3322,104 @@
                                  int cols,
                                  int16_t* diff_ptr,
                                  ptrdiff_t diff_stride,
-                                 const uint8_t* src_ptr,
+                                 const uint8_t* src8_ptr,
                                  ptrdiff_t src_stride,
-                                 const uint8_t* pred_ptr,
+                                 const uint8_t* pred8_ptr,
                                  ptrdiff_t pred_stride,
                                  int bd);
 #define vpx_highbd_subtract_block vpx_highbd_subtract_block_c
 
 void vpx_highbd_tm_predictor_16x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_tm_predictor_16x16_neon(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_tm_predictor_16x16 vpx_highbd_tm_predictor_16x16_neon
 
 void vpx_highbd_tm_predictor_32x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_tm_predictor_32x32_neon(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_tm_predictor_32x32 vpx_highbd_tm_predictor_32x32_neon
 
 void vpx_highbd_tm_predictor_4x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_tm_predictor_4x4_neon(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_tm_predictor_4x4 vpx_highbd_tm_predictor_4x4_neon
 
 void vpx_highbd_tm_predictor_8x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_tm_predictor_8x8_neon(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_tm_predictor_8x8 vpx_highbd_tm_predictor_8x8_neon
 
 void vpx_highbd_v_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_v_predictor_16x16_neon(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_v_predictor_16x16 vpx_highbd_v_predictor_16x16_neon
 
 void vpx_highbd_v_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_v_predictor_32x32_neon(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_v_predictor_32x32 vpx_highbd_v_predictor_32x32_neon
 
 void vpx_highbd_v_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_v_predictor_4x4_neon(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_v_predictor_4x4 vpx_highbd_v_predictor_4x4_neon
 
 void vpx_highbd_v_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_v_predictor_8x8_neon(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
@@ -3678,12 +3693,12 @@
                                   const uint8_t* thresh1);
 #define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_neon
 
-void vpx_mbpost_proc_across_ip_c(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_c(unsigned char* src,
                                  int pitch,
                                  int rows,
                                  int cols,
                                  int flimit);
-void vpx_mbpost_proc_across_ip_neon(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_neon(unsigned char* src,
                                     int pitch,
                                     int rows,
                                     int cols,
@@ -3717,35 +3732,35 @@
 #define vpx_minmax_8x8 vpx_minmax_8x8_neon
 
 unsigned int vpx_mse16x16_c(const uint8_t* src_ptr,
-                            int source_stride,
+                            int src_stride,
                             const uint8_t* ref_ptr,
-                            int recon_stride,
+                            int ref_stride,
                             unsigned int* sse);
 unsigned int vpx_mse16x16_neon(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
-                               int recon_stride,
+                               int ref_stride,
                                unsigned int* sse);
 #define vpx_mse16x16 vpx_mse16x16_neon
 
 unsigned int vpx_mse16x8_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 #define vpx_mse16x8 vpx_mse16x8_c
 
 unsigned int vpx_mse8x16_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 #define vpx_mse8x16 vpx_mse8x16_c
 
 unsigned int vpx_mse8x8_c(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
-                          int recon_stride,
+                          int ref_stride,
                           unsigned int* sse);
 #define vpx_mse8x8 vpx_mse8x8_c
 
@@ -3862,12 +3877,12 @@
 
 void vpx_sad16x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x16x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad16x16x4d vpx_sad16x16x4d_neon
@@ -3903,12 +3918,12 @@
 
 void vpx_sad16x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x32x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad16x32x4d vpx_sad16x32x4d_neon
@@ -3944,12 +3959,12 @@
 
 void vpx_sad16x8x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad16x8x4d_neon(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 #define vpx_sad16x8x4d vpx_sad16x8x4d_neon
@@ -3985,12 +4000,12 @@
 
 void vpx_sad32x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x16x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x16x4d vpx_sad32x16x4d_neon
@@ -4019,12 +4034,12 @@
 
 void vpx_sad32x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x32x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x32x4d vpx_sad32x32x4d_neon
@@ -4053,12 +4068,12 @@
 
 void vpx_sad32x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x64x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x64x4d vpx_sad32x64x4d_neon
@@ -4094,12 +4109,12 @@
 
 void vpx_sad4x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x4x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad4x4x4d vpx_sad4x4x4d_neon
@@ -4135,12 +4150,12 @@
 
 void vpx_sad4x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x8x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad4x8x4d vpx_sad4x8x4d_neon
@@ -4169,12 +4184,12 @@
 
 void vpx_sad64x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x32x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad64x32x4d vpx_sad64x32x4d_neon
@@ -4203,12 +4218,12 @@
 
 void vpx_sad64x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x64x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad64x64x4d vpx_sad64x64x4d_neon
@@ -4244,12 +4259,12 @@
 
 void vpx_sad8x16x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad8x16x4d_neon(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 #define vpx_sad8x16x4d vpx_sad8x16x4d_neon
@@ -4285,12 +4300,12 @@
 
 void vpx_sad8x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x4x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad8x4x4d vpx_sad8x4x4d_neon
@@ -4326,12 +4341,12 @@
 
 void vpx_sad8x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x8x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad8x8x4d vpx_sad8x8x4d_neon
@@ -4437,17 +4452,17 @@
 #define vpx_scaled_vert vpx_scaled_vert_c
 
 uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x16_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -4455,17 +4470,17 @@
 #define vpx_sub_pixel_avg_variance16x16 vpx_sub_pixel_avg_variance16x16_neon
 
 uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x32_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -4473,17 +4488,17 @@
 #define vpx_sub_pixel_avg_variance16x32 vpx_sub_pixel_avg_variance16x32_neon
 
 uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x8_neon(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
@@ -4491,17 +4506,17 @@
 #define vpx_sub_pixel_avg_variance16x8 vpx_sub_pixel_avg_variance16x8_neon
 
 uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x16_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -4509,17 +4524,17 @@
 #define vpx_sub_pixel_avg_variance32x16 vpx_sub_pixel_avg_variance32x16_neon
 
 uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x32_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -4527,17 +4542,17 @@
 #define vpx_sub_pixel_avg_variance32x32 vpx_sub_pixel_avg_variance32x32_neon
 
 uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x64_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -4545,17 +4560,17 @@
 #define vpx_sub_pixel_avg_variance32x64 vpx_sub_pixel_avg_variance32x64_neon
 
 uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x4_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
@@ -4563,17 +4578,17 @@
 #define vpx_sub_pixel_avg_variance4x4 vpx_sub_pixel_avg_variance4x4_neon
 
 uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x8_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
@@ -4581,17 +4596,17 @@
 #define vpx_sub_pixel_avg_variance4x8 vpx_sub_pixel_avg_variance4x8_neon
 
 uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x32_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -4599,17 +4614,17 @@
 #define vpx_sub_pixel_avg_variance64x32 vpx_sub_pixel_avg_variance64x32_neon
 
 uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x64_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -4617,17 +4632,17 @@
 #define vpx_sub_pixel_avg_variance64x64 vpx_sub_pixel_avg_variance64x64_neon
 
 uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x16_neon(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
@@ -4635,17 +4650,17 @@
 #define vpx_sub_pixel_avg_variance8x16 vpx_sub_pixel_avg_variance8x16_neon
 
 uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x4_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
@@ -4653,17 +4668,17 @@
 #define vpx_sub_pixel_avg_variance8x4 vpx_sub_pixel_avg_variance8x4_neon
 
 uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x8_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
@@ -4671,208 +4686,208 @@
 #define vpx_sub_pixel_avg_variance8x8 vpx_sub_pixel_avg_variance8x8_neon
 
 uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x16_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance16x16 vpx_sub_pixel_variance16x16_neon
 
 uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x32_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance16x32 vpx_sub_pixel_variance16x32_neon
 
 uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x8_neon(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 #define vpx_sub_pixel_variance16x8 vpx_sub_pixel_variance16x8_neon
 
 uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x16_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance32x16 vpx_sub_pixel_variance32x16_neon
 
 uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x32_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance32x32 vpx_sub_pixel_variance32x32_neon
 
 uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x64_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance32x64 vpx_sub_pixel_variance32x64_neon
 
 uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x4_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 #define vpx_sub_pixel_variance4x4 vpx_sub_pixel_variance4x4_neon
 
 uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x8_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 #define vpx_sub_pixel_variance4x8 vpx_sub_pixel_variance4x8_neon
 
 uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x32_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance64x32 vpx_sub_pixel_variance64x32_neon
 
 uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x64_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance64x64 vpx_sub_pixel_variance64x64_neon
 
 uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x16_neon(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 #define vpx_sub_pixel_variance8x16 vpx_sub_pixel_variance8x16_neon
 
 uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x4_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 #define vpx_sub_pixel_variance8x4 vpx_sub_pixel_variance8x4_neon
 
 uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x8_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
@@ -4901,243 +4916,243 @@
 #define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_neon
 
 void vpx_tm_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_16x16_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_neon
 
 void vpx_tm_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_32x32_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_neon
 
 void vpx_tm_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_4x4_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_neon
 
 void vpx_tm_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_8x8_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_neon
 
 void vpx_v_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_16x16_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_v_predictor_16x16 vpx_v_predictor_16x16_neon
 
 void vpx_v_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_32x32_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_v_predictor_32x32 vpx_v_predictor_32x32_neon
 
 void vpx_v_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_4x4_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_v_predictor_4x4 vpx_v_predictor_4x4_neon
 
 void vpx_v_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_8x8_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_v_predictor_8x8 vpx_v_predictor_8x8_neon
 
 unsigned int vpx_variance16x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x16_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance16x16 vpx_variance16x16_neon
 
 unsigned int vpx_variance16x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x32_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance16x32 vpx_variance16x32_neon
 
 unsigned int vpx_variance16x8_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance16x8_neon(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 #define vpx_variance16x8 vpx_variance16x8_neon
 
 unsigned int vpx_variance32x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x16_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance32x16 vpx_variance32x16_neon
 
 unsigned int vpx_variance32x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x32_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance32x32 vpx_variance32x32_neon
 
 unsigned int vpx_variance32x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x64_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance32x64 vpx_variance32x64_neon
 
 unsigned int vpx_variance4x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x4_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance4x4 vpx_variance4x4_neon
 
 unsigned int vpx_variance4x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x8_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance4x8 vpx_variance4x8_neon
 
 unsigned int vpx_variance64x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x32_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance64x32 vpx_variance64x32_neon
 
 unsigned int vpx_variance64x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x64_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance64x64 vpx_variance64x64_neon
 
 unsigned int vpx_variance8x16_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance8x16_neon(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 #define vpx_variance8x16 vpx_variance8x16_neon
 
 unsigned int vpx_variance8x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x4_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance8x4 vpx_variance8x4_neon
 
 unsigned int vpx_variance8x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x8_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance8x8 vpx_variance8x8_neon
 
 void vpx_ve_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c
diff --git a/third_party/libvpx/source/config/linux/chromeos-arm64/vp8_rtcd.h b/third_party/libvpx/source/config/linux/chromeos-arm64/vp8_rtcd.h
index 737afd5..8f2d3e5 100644
--- a/third_party/libvpx/source/config/linux/chromeos-arm64/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/linux/chromeos-arm64/vp8_rtcd.h
@@ -27,68 +27,68 @@
 extern "C" {
 #endif
 
-void vp8_bilinear_predict16x16_c(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_bilinear_predict16x16_c(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-void vp8_bilinear_predict16x16_neon(unsigned char* src,
-                                    int src_pitch,
-                                    int xofst,
-                                    int yofst,
-                                    unsigned char* dst,
+void vp8_bilinear_predict16x16_neon(unsigned char* src_ptr,
+                                    int src_pixels_per_line,
+                                    int xoffset,
+                                    int yoffset,
+                                    unsigned char* dst_ptr,
                                     int dst_pitch);
 #define vp8_bilinear_predict16x16 vp8_bilinear_predict16x16_neon
 
-void vp8_bilinear_predict4x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict4x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict4x4_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict4x4_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_neon
 
-void vp8_bilinear_predict8x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x4_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x4_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_neon
 
-void vp8_bilinear_predict8x8_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x8_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x8_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x8_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict8x8 vp8_bilinear_predict8x8_neon
 
 void vp8_blend_b_c(unsigned char* y,
                    unsigned char* u,
                    unsigned char* v,
-                   int y1,
-                   int u1,
-                   int v1,
+                   int y_1,
+                   int u_1,
+                   int v_1,
                    int alpha,
                    int stride);
 #define vp8_blend_b vp8_blend_b_c
@@ -96,9 +96,9 @@
 void vp8_blend_mb_inner_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_inner vp8_blend_mb_inner_c
@@ -106,9 +106,9 @@
 void vp8_blend_mb_outer_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_outer vp8_blend_mb_outer_c
@@ -117,44 +117,44 @@
 #define vp8_block_error vp8_block_error_c
 
 void vp8_copy_mem16x16_c(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 void vp8_copy_mem16x16_neon(unsigned char* src,
-                            int src_pitch,
+                            int src_stride,
                             unsigned char* dst,
-                            int dst_pitch);
+                            int dst_stride);
 #define vp8_copy_mem16x16 vp8_copy_mem16x16_neon
 
 void vp8_copy_mem8x4_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 void vp8_copy_mem8x4_neon(unsigned char* src,
-                          int src_pitch,
+                          int src_stride,
                           unsigned char* dst,
-                          int dst_pitch);
+                          int dst_stride);
 #define vp8_copy_mem8x4 vp8_copy_mem8x4_neon
 
 void vp8_copy_mem8x8_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 void vp8_copy_mem8x8_neon(unsigned char* src,
-                          int src_pitch,
+                          int src_stride,
                           unsigned char* dst,
-                          int dst_pitch);
+                          int dst_stride);
 #define vp8_copy_mem8x8 vp8_copy_mem8x8_neon
 
-void vp8_dc_only_idct_add_c(short input,
-                            unsigned char* pred,
+void vp8_dc_only_idct_add_c(short input_dc,
+                            unsigned char* pred_ptr,
                             int pred_stride,
-                            unsigned char* dst,
+                            unsigned char* dst_ptr,
                             int dst_stride);
-void vp8_dc_only_idct_add_neon(short input,
-                               unsigned char* pred,
+void vp8_dc_only_idct_add_neon(short input_dc,
+                               unsigned char* pred_ptr,
                                int pred_stride,
-                               unsigned char* dst,
+                               unsigned char* dst_ptr,
                                int dst_stride);
 #define vp8_dc_only_idct_add vp8_dc_only_idct_add_neon
 
@@ -196,11 +196,11 @@
 
 void vp8_dequant_idct_add_c(short* input,
                             short* dq,
-                            unsigned char* output,
+                            unsigned char* dest,
                             int stride);
 void vp8_dequant_idct_add_neon(short* input,
                                short* dq,
-                               unsigned char* output,
+                               unsigned char* dest,
                                int stride);
 #define vp8_dequant_idct_add vp8_dequant_idct_add_neon
 
@@ -230,8 +230,8 @@
                                        char* eobs);
 #define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_neon
 
-void vp8_dequantize_b_c(struct blockd*, short* dqc);
-void vp8_dequantize_b_neon(struct blockd*, short* dqc);
+void vp8_dequantize_b_c(struct blockd*, short* DQC);
+void vp8_dequantize_b_neon(struct blockd*, short* DQC);
 #define vp8_dequantize_b vp8_dequantize_b_neon
 
 int vp8_diamond_search_sad_c(struct macroblock* x,
@@ -283,91 +283,91 @@
                           union int_mv* center_mv);
 #define vp8_full_search_sad vp8_full_search_sad_c
 
-void vp8_loop_filter_bh_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bh_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bh_neon(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bh_neon(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
 #define vp8_loop_filter_bh vp8_loop_filter_bh_neon
 
-void vp8_loop_filter_bv_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bv_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bv_neon(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bv_neon(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
 #define vp8_loop_filter_bv vp8_loop_filter_bv_neon
 
-void vp8_loop_filter_mbh_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbh_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbh_neon(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbh_neon(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbh vp8_loop_filter_mbh_neon
 
-void vp8_loop_filter_mbv_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbv_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbv_neon(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbv_neon(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbv vp8_loop_filter_mbv_neon
 
-void vp8_loop_filter_bhs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bhs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bhs_neon(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bhs_neon(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_neon
 
-void vp8_loop_filter_bvs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bvs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bvs_neon(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bvs_neon(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_neon
 
-void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y,
-                                              int ystride,
+void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y_ptr,
+                                              int y_stride,
                                               const unsigned char* blimit);
-void vp8_loop_filter_mbhs_neon(unsigned char* y,
-                               int ystride,
+void vp8_loop_filter_mbhs_neon(unsigned char* y_ptr,
+                               int y_stride,
                                const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbh vp8_loop_filter_mbhs_neon
 
-void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y,
-                                            int ystride,
+void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y_ptr,
+                                            int y_stride,
                                             const unsigned char* blimit);
-void vp8_loop_filter_mbvs_neon(unsigned char* y,
-                               int ystride,
+void vp8_loop_filter_mbvs_neon(unsigned char* y_ptr,
+                               int y_stride,
                                const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbv vp8_loop_filter_mbvs_neon
 
@@ -381,8 +381,8 @@
                               struct block* b,
                               struct blockd* d,
                               union int_mv* ref_mv,
-                              int sad_per_bit,
-                              int distance,
+                              int error_per_bit,
+                              int search_range,
                               struct variance_vtable* fn_ptr,
                               int* mvcost[2],
                               union int_mv* center_mv);
@@ -400,81 +400,81 @@
 #define vp8_short_fdct8x4 vp8_short_fdct8x4_neon
 
 void vp8_short_idct4x4llm_c(short* input,
-                            unsigned char* pred,
-                            int pitch,
-                            unsigned char* dst,
+                            unsigned char* pred_ptr,
+                            int pred_stride,
+                            unsigned char* dst_ptr,
                             int dst_stride);
 void vp8_short_idct4x4llm_neon(short* input,
-                               unsigned char* pred,
-                               int pitch,
-                               unsigned char* dst,
+                               unsigned char* pred_ptr,
+                               int pred_stride,
+                               unsigned char* dst_ptr,
                                int dst_stride);
 #define vp8_short_idct4x4llm vp8_short_idct4x4llm_neon
 
-void vp8_short_inv_walsh4x4_c(short* input, short* output);
-void vp8_short_inv_walsh4x4_neon(short* input, short* output);
+void vp8_short_inv_walsh4x4_c(short* input, short* mb_dqcoeff);
+void vp8_short_inv_walsh4x4_neon(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_neon
 
-void vp8_short_inv_walsh4x4_1_c(short* input, short* output);
+void vp8_short_inv_walsh4x4_1_c(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c
 
 void vp8_short_walsh4x4_c(short* input, short* output, int pitch);
 void vp8_short_walsh4x4_neon(short* input, short* output, int pitch);
 #define vp8_short_walsh4x4 vp8_short_walsh4x4_neon
 
-void vp8_sixtap_predict16x16_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_sixtap_predict16x16_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_sixtap_predict16x16_neon(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_sixtap_predict16x16_neon(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_sixtap_predict16x16 vp8_sixtap_predict16x16_neon
 
-void vp8_sixtap_predict4x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict4x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict4x4_neon(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict4x4_neon(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
 #define vp8_sixtap_predict4x4 vp8_sixtap_predict4x4_neon
 
-void vp8_sixtap_predict8x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x4_neon(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x4_neon(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
 #define vp8_sixtap_predict8x4 vp8_sixtap_predict8x4_neon
 
-void vp8_sixtap_predict8x8_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x8_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x8_neon(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x8_neon(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
 #define vp8_sixtap_predict8x8 vp8_sixtap_predict8x8_neon
 
diff --git a/third_party/libvpx/source/config/linux/chromeos-arm64/vp9_rtcd.h b/third_party/libvpx/source/config/linux/chromeos-arm64/vp9_rtcd.h
index 574cd7a..a88b5f0 100644
--- a/third_party/libvpx/source/config/linux/chromeos-arm64/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/linux/chromeos-arm64/vp9_rtcd.h
@@ -165,13 +165,13 @@
 #define vp9_highbd_fwht4x4 vp9_highbd_fwht4x4_c
 
 void vp9_highbd_iht16x16_256_add_c(const tran_low_t* input,
-                                   uint16_t* output,
-                                   int pitch,
+                                   uint16_t* dest,
+                                   int stride,
                                    int tx_type,
                                    int bd);
 void vp9_highbd_iht16x16_256_add_neon(const tran_low_t* input,
-                                      uint16_t* output,
-                                      int pitch,
+                                      uint16_t* dest,
+                                      int stride,
                                       int tx_type,
                                       int bd);
 #define vp9_highbd_iht16x16_256_add vp9_highbd_iht16x16_256_add_neon
@@ -262,12 +262,12 @@
 #define vp9_highbd_temporal_filter_apply vp9_highbd_temporal_filter_apply_c
 
 void vp9_iht16x16_256_add_c(const tran_low_t* input,
-                            uint8_t* output,
-                            int pitch,
+                            uint8_t* dest,
+                            int stride,
                             int tx_type);
 void vp9_iht16x16_256_add_neon(const tran_low_t* input,
-                               uint8_t* output,
-                               int pitch,
+                               uint8_t* dest,
+                               int stride,
                                int tx_type);
 #define vp9_iht16x16_256_add vp9_iht16x16_256_add_neon
 
diff --git a/third_party/libvpx/source/config/linux/chromeos-arm64/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/linux/chromeos-arm64/vpx_dsp_rtcd.h
index 13fe98c..50b633b 100644
--- a/third_party/libvpx/source/config/linux/chromeos-arm64/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/linux/chromeos-arm64/vpx_dsp_rtcd.h
@@ -235,349 +235,349 @@
 #define vpx_convolve_copy vpx_convolve_copy_neon
 
 void vpx_d117_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c
 
 void vpx_d117_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c
 
 void vpx_d117_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c
 
 void vpx_d117_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c
 
 void vpx_d135_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d135_predictor_16x16_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_neon
 
 void vpx_d135_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d135_predictor_32x32_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_neon
 
 void vpx_d135_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d135_predictor_4x4_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_neon
 
 void vpx_d135_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d135_predictor_8x8_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_neon
 
 void vpx_d153_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d153_predictor_16x16 vpx_d153_predictor_16x16_c
 
 void vpx_d153_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d153_predictor_32x32 vpx_d153_predictor_32x32_c
 
 void vpx_d153_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d153_predictor_4x4 vpx_d153_predictor_4x4_c
 
 void vpx_d153_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d153_predictor_8x8 vpx_d153_predictor_8x8_c
 
 void vpx_d207_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d207_predictor_16x16 vpx_d207_predictor_16x16_c
 
 void vpx_d207_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d207_predictor_32x32 vpx_d207_predictor_32x32_c
 
 void vpx_d207_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_c
 
 void vpx_d207_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d207_predictor_8x8 vpx_d207_predictor_8x8_c
 
 void vpx_d45_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_16x16_neon(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_d45_predictor_16x16 vpx_d45_predictor_16x16_neon
 
 void vpx_d45_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_32x32_neon(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_d45_predictor_32x32 vpx_d45_predictor_32x32_neon
 
 void vpx_d45_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_4x4_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_neon
 
 void vpx_d45_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_8x8_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_neon
 
 void vpx_d45e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c
 
 void vpx_d63_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d63_predictor_16x16 vpx_d63_predictor_16x16_c
 
 void vpx_d63_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d63_predictor_32x32 vpx_d63_predictor_32x32_c
 
 void vpx_d63_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d63_predictor_4x4 vpx_d63_predictor_4x4_c
 
 void vpx_d63_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d63_predictor_8x8 vpx_d63_predictor_8x8_c
 
 void vpx_d63e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c
 
 void vpx_dc_128_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_16x16_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_neon
 
 void vpx_dc_128_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_32x32_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_neon
 
 void vpx_dc_128_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_4x4_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_neon
 
 void vpx_dc_128_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_8x8_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_neon
 
 void vpx_dc_left_predictor_16x16_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_16x16_neon(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 #define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_neon
 
 void vpx_dc_left_predictor_32x32_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_32x32_neon(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 #define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_neon
 
 void vpx_dc_left_predictor_4x4_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_4x4_neon(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 #define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_neon
 
 void vpx_dc_left_predictor_8x8_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_8x8_neon(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 #define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_neon
 
 void vpx_dc_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_16x16_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_neon
 
 void vpx_dc_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_32x32_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_neon
 
 void vpx_dc_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_4x4_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_neon
 
 void vpx_dc_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_8x8_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_neon
 
 void vpx_dc_top_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_16x16_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_neon
 
 void vpx_dc_top_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_32x32_neon(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_neon
 
 void vpx_dc_top_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_4x4_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_neon
 
 void vpx_dc_top_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_8x8_neon(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_neon
@@ -621,13 +621,13 @@
 #define vpx_fdct8x8_1 vpx_fdct8x8_1_neon
 
 void vpx_get16x16var_c(const uint8_t* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        const uint8_t* ref_ptr,
                        int ref_stride,
                        unsigned int* sse,
                        int* sum);
 void vpx_get16x16var_neon(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
                           int ref_stride,
                           unsigned int* sse,
@@ -635,23 +635,23 @@
 #define vpx_get16x16var vpx_get16x16var_neon
 
 unsigned int vpx_get4x4sse_cs_c(const unsigned char* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const unsigned char* ref_ptr,
                                 int ref_stride);
 unsigned int vpx_get4x4sse_cs_neon(const unsigned char* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const unsigned char* ref_ptr,
                                    int ref_stride);
 #define vpx_get4x4sse_cs vpx_get4x4sse_cs_neon
 
 void vpx_get8x8var_c(const uint8_t* src_ptr,
-                     int source_stride,
+                     int src_stride,
                      const uint8_t* ref_ptr,
                      int ref_stride,
                      unsigned int* sse,
                      int* sum);
 void vpx_get8x8var_neon(const uint8_t* src_ptr,
-                        int source_stride,
+                        int src_stride,
                         const uint8_t* ref_ptr,
                         int ref_stride,
                         unsigned int* sse,
@@ -662,41 +662,41 @@
 #define vpx_get_mb_ss vpx_get_mb_ss_c
 
 void vpx_h_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_16x16_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_h_predictor_16x16 vpx_h_predictor_16x16_neon
 
 void vpx_h_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_32x32_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_h_predictor_32x32 vpx_h_predictor_32x32_neon
 
 void vpx_h_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_4x4_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_h_predictor_4x4 vpx_h_predictor_4x4_neon
 
 void vpx_h_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_8x8_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_h_predictor_8x8 vpx_h_predictor_8x8_neon
@@ -723,13 +723,13 @@
 #define vpx_hadamard_8x8 vpx_hadamard_8x8_neon
 
 void vpx_he_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c
 
 void vpx_highbd_10_get16x16var_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse,
@@ -737,7 +737,7 @@
 #define vpx_highbd_10_get16x16var vpx_highbd_10_get16x16var_c
 
 void vpx_highbd_10_get8x8var_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse,
@@ -745,38 +745,38 @@
 #define vpx_highbd_10_get8x8var vpx_highbd_10_get8x8var_c
 
 unsigned int vpx_highbd_10_mse16x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 #define vpx_highbd_10_mse16x16 vpx_highbd_10_mse16x16_c
 
 unsigned int vpx_highbd_10_mse16x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_10_mse16x8 vpx_highbd_10_mse16x8_c
 
 unsigned int vpx_highbd_10_mse8x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_10_mse8x16 vpx_highbd_10_mse8x16_c
 
 unsigned int vpx_highbd_10_mse8x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_10_mse8x8 vpx_highbd_10_mse8x8_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -786,9 +786,9 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -797,9 +797,9 @@
   vpx_highbd_10_sub_pixel_avg_variance16x32_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -809,9 +809,9 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -821,9 +821,9 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -833,9 +833,9 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -844,9 +844,9 @@
   vpx_highbd_10_sub_pixel_avg_variance32x64_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -855,9 +855,9 @@
   vpx_highbd_10_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -867,9 +867,9 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -879,9 +879,9 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -890,9 +890,9 @@
   vpx_highbd_10_sub_pixel_avg_variance64x64_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -901,9 +901,9 @@
   vpx_highbd_10_sub_pixel_avg_variance8x16_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -912,9 +912,9 @@
   vpx_highbd_10_sub_pixel_avg_variance8x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -923,9 +923,9 @@
   vpx_highbd_10_sub_pixel_avg_variance8x8_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -933,9 +933,9 @@
   vpx_highbd_10_sub_pixel_variance16x16_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -943,9 +943,9 @@
   vpx_highbd_10_sub_pixel_variance16x32_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -953,9 +953,9 @@
   vpx_highbd_10_sub_pixel_variance16x8_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -963,9 +963,9 @@
   vpx_highbd_10_sub_pixel_variance32x16_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -973,9 +973,9 @@
   vpx_highbd_10_sub_pixel_variance32x32_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -983,9 +983,9 @@
   vpx_highbd_10_sub_pixel_variance32x64_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -993,9 +993,9 @@
   vpx_highbd_10_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1003,9 +1003,9 @@
   vpx_highbd_10_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1013,9 +1013,9 @@
   vpx_highbd_10_sub_pixel_variance64x32_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1023,9 +1023,9 @@
   vpx_highbd_10_sub_pixel_variance64x64_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1033,9 +1033,9 @@
   vpx_highbd_10_sub_pixel_variance8x16_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1043,9 +1043,9 @@
   vpx_highbd_10_sub_pixel_variance8x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1053,98 +1053,98 @@
   vpx_highbd_10_sub_pixel_variance8x8_c
 
 unsigned int vpx_highbd_10_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance16x16 vpx_highbd_10_variance16x16_c
 
 unsigned int vpx_highbd_10_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance16x32 vpx_highbd_10_variance16x32_c
 
 unsigned int vpx_highbd_10_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_10_variance16x8 vpx_highbd_10_variance16x8_c
 
 unsigned int vpx_highbd_10_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance32x16 vpx_highbd_10_variance32x16_c
 
 unsigned int vpx_highbd_10_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance32x32 vpx_highbd_10_variance32x32_c
 
 unsigned int vpx_highbd_10_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance32x64 vpx_highbd_10_variance32x64_c
 
 unsigned int vpx_highbd_10_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance4x4 vpx_highbd_10_variance4x4_c
 
 unsigned int vpx_highbd_10_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance4x8 vpx_highbd_10_variance4x8_c
 
 unsigned int vpx_highbd_10_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance64x32 vpx_highbd_10_variance64x32_c
 
 unsigned int vpx_highbd_10_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance64x64 vpx_highbd_10_variance64x64_c
 
 unsigned int vpx_highbd_10_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_10_variance8x16 vpx_highbd_10_variance8x16_c
 
 unsigned int vpx_highbd_10_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance8x4 vpx_highbd_10_variance8x4_c
 
 unsigned int vpx_highbd_10_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance8x8 vpx_highbd_10_variance8x8_c
 
 void vpx_highbd_12_get16x16var_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse,
@@ -1152,7 +1152,7 @@
 #define vpx_highbd_12_get16x16var vpx_highbd_12_get16x16var_c
 
 void vpx_highbd_12_get8x8var_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse,
@@ -1160,38 +1160,38 @@
 #define vpx_highbd_12_get8x8var vpx_highbd_12_get8x8var_c
 
 unsigned int vpx_highbd_12_mse16x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 #define vpx_highbd_12_mse16x16 vpx_highbd_12_mse16x16_c
 
 unsigned int vpx_highbd_12_mse16x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_12_mse16x8 vpx_highbd_12_mse16x8_c
 
 unsigned int vpx_highbd_12_mse8x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_12_mse8x16 vpx_highbd_12_mse8x16_c
 
 unsigned int vpx_highbd_12_mse8x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_12_mse8x8 vpx_highbd_12_mse8x8_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1201,9 +1201,9 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1212,9 +1212,9 @@
   vpx_highbd_12_sub_pixel_avg_variance16x32_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1224,9 +1224,9 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1236,9 +1236,9 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1248,9 +1248,9 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1259,9 +1259,9 @@
   vpx_highbd_12_sub_pixel_avg_variance32x64_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1270,9 +1270,9 @@
   vpx_highbd_12_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1282,9 +1282,9 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1294,9 +1294,9 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1305,9 +1305,9 @@
   vpx_highbd_12_sub_pixel_avg_variance64x64_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1316,9 +1316,9 @@
   vpx_highbd_12_sub_pixel_avg_variance8x16_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1327,9 +1327,9 @@
   vpx_highbd_12_sub_pixel_avg_variance8x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1338,9 +1338,9 @@
   vpx_highbd_12_sub_pixel_avg_variance8x8_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1348,9 +1348,9 @@
   vpx_highbd_12_sub_pixel_variance16x16_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1358,9 +1358,9 @@
   vpx_highbd_12_sub_pixel_variance16x32_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1368,9 +1368,9 @@
   vpx_highbd_12_sub_pixel_variance16x8_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1378,9 +1378,9 @@
   vpx_highbd_12_sub_pixel_variance32x16_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1388,9 +1388,9 @@
   vpx_highbd_12_sub_pixel_variance32x32_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1398,9 +1398,9 @@
   vpx_highbd_12_sub_pixel_variance32x64_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1408,9 +1408,9 @@
   vpx_highbd_12_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1418,9 +1418,9 @@
   vpx_highbd_12_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1428,9 +1428,9 @@
   vpx_highbd_12_sub_pixel_variance64x32_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1438,9 +1438,9 @@
   vpx_highbd_12_sub_pixel_variance64x64_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1448,9 +1448,9 @@
   vpx_highbd_12_sub_pixel_variance8x16_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1458,9 +1458,9 @@
   vpx_highbd_12_sub_pixel_variance8x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1468,98 +1468,98 @@
   vpx_highbd_12_sub_pixel_variance8x8_c
 
 unsigned int vpx_highbd_12_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance16x16 vpx_highbd_12_variance16x16_c
 
 unsigned int vpx_highbd_12_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance16x32 vpx_highbd_12_variance16x32_c
 
 unsigned int vpx_highbd_12_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_12_variance16x8 vpx_highbd_12_variance16x8_c
 
 unsigned int vpx_highbd_12_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance32x16 vpx_highbd_12_variance32x16_c
 
 unsigned int vpx_highbd_12_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance32x32 vpx_highbd_12_variance32x32_c
 
 unsigned int vpx_highbd_12_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance32x64 vpx_highbd_12_variance32x64_c
 
 unsigned int vpx_highbd_12_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance4x4 vpx_highbd_12_variance4x4_c
 
 unsigned int vpx_highbd_12_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance4x8 vpx_highbd_12_variance4x8_c
 
 unsigned int vpx_highbd_12_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance64x32 vpx_highbd_12_variance64x32_c
 
 unsigned int vpx_highbd_12_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance64x64 vpx_highbd_12_variance64x64_c
 
 unsigned int vpx_highbd_12_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_12_variance8x16 vpx_highbd_12_variance8x16_c
 
 unsigned int vpx_highbd_12_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance8x4 vpx_highbd_12_variance8x4_c
 
 unsigned int vpx_highbd_12_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance8x8 vpx_highbd_12_variance8x8_c
 
 void vpx_highbd_8_get16x16var_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse,
@@ -1567,7 +1567,7 @@
 #define vpx_highbd_8_get16x16var vpx_highbd_8_get16x16var_c
 
 void vpx_highbd_8_get8x8var_c(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
                               int ref_stride,
                               unsigned int* sse,
@@ -1575,37 +1575,37 @@
 #define vpx_highbd_8_get8x8var vpx_highbd_8_get8x8var_c
 
 unsigned int vpx_highbd_8_mse16x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_8_mse16x16 vpx_highbd_8_mse16x16_c
 
 unsigned int vpx_highbd_8_mse16x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_8_mse16x8 vpx_highbd_8_mse16x8_c
 
 unsigned int vpx_highbd_8_mse8x16_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_8_mse8x16 vpx_highbd_8_mse8x16_c
 
 unsigned int vpx_highbd_8_mse8x8_c(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
-                                   int recon_stride,
+                                   int ref_stride,
                                    unsigned int* sse);
 #define vpx_highbd_8_mse8x8 vpx_highbd_8_mse8x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1614,9 +1614,9 @@
   vpx_highbd_8_sub_pixel_avg_variance16x16_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1625,9 +1625,9 @@
   vpx_highbd_8_sub_pixel_avg_variance16x32_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1636,9 +1636,9 @@
   vpx_highbd_8_sub_pixel_avg_variance16x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1647,9 +1647,9 @@
   vpx_highbd_8_sub_pixel_avg_variance32x16_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1658,9 +1658,9 @@
   vpx_highbd_8_sub_pixel_avg_variance32x32_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1669,9 +1669,9 @@
   vpx_highbd_8_sub_pixel_avg_variance32x64_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -1680,9 +1680,9 @@
   vpx_highbd_8_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -1691,9 +1691,9 @@
   vpx_highbd_8_sub_pixel_avg_variance4x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1702,9 +1702,9 @@
   vpx_highbd_8_sub_pixel_avg_variance64x32_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1713,9 +1713,9 @@
   vpx_highbd_8_sub_pixel_avg_variance64x64_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1724,9 +1724,9 @@
   vpx_highbd_8_sub_pixel_avg_variance8x16_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -1735,9 +1735,9 @@
   vpx_highbd_8_sub_pixel_avg_variance8x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -1746,9 +1746,9 @@
   vpx_highbd_8_sub_pixel_avg_variance8x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1756,9 +1756,9 @@
   vpx_highbd_8_sub_pixel_variance16x16_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1766,9 +1766,9 @@
   vpx_highbd_8_sub_pixel_variance16x32_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1776,9 +1776,9 @@
   vpx_highbd_8_sub_pixel_variance16x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1786,9 +1786,9 @@
   vpx_highbd_8_sub_pixel_variance32x16_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1796,9 +1796,9 @@
   vpx_highbd_8_sub_pixel_variance32x32_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1806,27 +1806,27 @@
   vpx_highbd_8_sub_pixel_variance32x64_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance4x4 vpx_highbd_8_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance4x8 vpx_highbd_8_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1834,9 +1834,9 @@
   vpx_highbd_8_sub_pixel_variance64x32_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1844,9 +1844,9 @@
   vpx_highbd_8_sub_pixel_variance64x64_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1854,118 +1854,118 @@
   vpx_highbd_8_sub_pixel_variance8x16_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance8x4 vpx_highbd_8_sub_pixel_variance8x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance8x8 vpx_highbd_8_sub_pixel_variance8x8_c
 
 unsigned int vpx_highbd_8_variance16x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance16x16 vpx_highbd_8_variance16x16_c
 
 unsigned int vpx_highbd_8_variance16x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance16x32 vpx_highbd_8_variance16x32_c
 
 unsigned int vpx_highbd_8_variance16x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_8_variance16x8 vpx_highbd_8_variance16x8_c
 
 unsigned int vpx_highbd_8_variance32x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance32x16 vpx_highbd_8_variance32x16_c
 
 unsigned int vpx_highbd_8_variance32x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance32x32 vpx_highbd_8_variance32x32_c
 
 unsigned int vpx_highbd_8_variance32x64_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance32x64 vpx_highbd_8_variance32x64_c
 
 unsigned int vpx_highbd_8_variance4x4_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance4x4 vpx_highbd_8_variance4x4_c
 
 unsigned int vpx_highbd_8_variance4x8_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance4x8 vpx_highbd_8_variance4x8_c
 
 unsigned int vpx_highbd_8_variance64x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance64x32 vpx_highbd_8_variance64x32_c
 
 unsigned int vpx_highbd_8_variance64x64_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance64x64 vpx_highbd_8_variance64x64_c
 
 unsigned int vpx_highbd_8_variance8x16_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_8_variance8x16 vpx_highbd_8_variance8x16_c
 
 unsigned int vpx_highbd_8_variance8x4_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance8x4 vpx_highbd_8_variance8x4_c
 
 unsigned int vpx_highbd_8_variance8x8_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance8x8 vpx_highbd_8_variance8x8_c
 
-unsigned int vpx_highbd_avg_4x4_c(const uint8_t*, int p);
+unsigned int vpx_highbd_avg_4x4_c(const uint8_t* s8, int p);
 #define vpx_highbd_avg_4x4 vpx_highbd_avg_4x4_c
 
-unsigned int vpx_highbd_avg_8x8_c(const uint8_t*, int p);
+unsigned int vpx_highbd_avg_8x8_c(const uint8_t* s8, int p);
 #define vpx_highbd_avg_8x8 vpx_highbd_avg_8x8_c
 
 void vpx_highbd_comp_avg_pred_c(uint16_t* comp_pred,
@@ -1987,7 +1987,7 @@
                             int y_step_q4,
                             int w,
                             int h,
-                            int bps);
+                            int bd);
 void vpx_highbd_convolve8_neon(const uint16_t* src,
                                ptrdiff_t src_stride,
                                uint16_t* dst,
@@ -1999,7 +1999,7 @@
                                int y_step_q4,
                                int w,
                                int h,
-                               int bps);
+                               int bd);
 #define vpx_highbd_convolve8 vpx_highbd_convolve8_neon
 
 void vpx_highbd_convolve8_avg_c(const uint16_t* src,
@@ -2013,7 +2013,7 @@
                                 int y_step_q4,
                                 int w,
                                 int h,
-                                int bps);
+                                int bd);
 void vpx_highbd_convolve8_avg_neon(const uint16_t* src,
                                    ptrdiff_t src_stride,
                                    uint16_t* dst,
@@ -2025,7 +2025,7 @@
                                    int y_step_q4,
                                    int w,
                                    int h,
-                                   int bps);
+                                   int bd);
 #define vpx_highbd_convolve8_avg vpx_highbd_convolve8_avg_neon
 
 void vpx_highbd_convolve8_avg_horiz_c(const uint16_t* src,
@@ -2039,7 +2039,7 @@
                                       int y_step_q4,
                                       int w,
                                       int h,
-                                      int bps);
+                                      int bd);
 void vpx_highbd_convolve8_avg_horiz_neon(const uint16_t* src,
                                          ptrdiff_t src_stride,
                                          uint16_t* dst,
@@ -2051,7 +2051,7 @@
                                          int y_step_q4,
                                          int w,
                                          int h,
-                                         int bps);
+                                         int bd);
 #define vpx_highbd_convolve8_avg_horiz vpx_highbd_convolve8_avg_horiz_neon
 
 void vpx_highbd_convolve8_avg_vert_c(const uint16_t* src,
@@ -2065,7 +2065,7 @@
                                      int y_step_q4,
                                      int w,
                                      int h,
-                                     int bps);
+                                     int bd);
 void vpx_highbd_convolve8_avg_vert_neon(const uint16_t* src,
                                         ptrdiff_t src_stride,
                                         uint16_t* dst,
@@ -2077,7 +2077,7 @@
                                         int y_step_q4,
                                         int w,
                                         int h,
-                                        int bps);
+                                        int bd);
 #define vpx_highbd_convolve8_avg_vert vpx_highbd_convolve8_avg_vert_neon
 
 void vpx_highbd_convolve8_horiz_c(const uint16_t* src,
@@ -2091,7 +2091,7 @@
                                   int y_step_q4,
                                   int w,
                                   int h,
-                                  int bps);
+                                  int bd);
 void vpx_highbd_convolve8_horiz_neon(const uint16_t* src,
                                      ptrdiff_t src_stride,
                                      uint16_t* dst,
@@ -2103,7 +2103,7 @@
                                      int y_step_q4,
                                      int w,
                                      int h,
-                                     int bps);
+                                     int bd);
 #define vpx_highbd_convolve8_horiz vpx_highbd_convolve8_horiz_neon
 
 void vpx_highbd_convolve8_vert_c(const uint16_t* src,
@@ -2117,7 +2117,7 @@
                                  int y_step_q4,
                                  int w,
                                  int h,
-                                 int bps);
+                                 int bd);
 void vpx_highbd_convolve8_vert_neon(const uint16_t* src,
                                     ptrdiff_t src_stride,
                                     uint16_t* dst,
@@ -2129,7 +2129,7 @@
                                     int y_step_q4,
                                     int w,
                                     int h,
-                                    int bps);
+                                    int bd);
 #define vpx_highbd_convolve8_vert vpx_highbd_convolve8_vert_neon
 
 void vpx_highbd_convolve_avg_c(const uint16_t* src,
@@ -2143,7 +2143,7 @@
                                int y_step_q4,
                                int w,
                                int h,
-                               int bps);
+                               int bd);
 void vpx_highbd_convolve_avg_neon(const uint16_t* src,
                                   ptrdiff_t src_stride,
                                   uint16_t* dst,
@@ -2155,7 +2155,7 @@
                                   int y_step_q4,
                                   int w,
                                   int h,
-                                  int bps);
+                                  int bd);
 #define vpx_highbd_convolve_avg vpx_highbd_convolve_avg_neon
 
 void vpx_highbd_convolve_copy_c(const uint16_t* src,
@@ -2169,7 +2169,7 @@
                                 int y_step_q4,
                                 int w,
                                 int h,
-                                int bps);
+                                int bd);
 void vpx_highbd_convolve_copy_neon(const uint16_t* src,
                                    ptrdiff_t src_stride,
                                    uint16_t* dst,
@@ -2181,272 +2181,272 @@
                                    int y_step_q4,
                                    int w,
                                    int h,
-                                   int bps);
+                                   int bd);
 #define vpx_highbd_convolve_copy vpx_highbd_convolve_copy_neon
 
 void vpx_highbd_d117_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d117_predictor_16x16 vpx_highbd_d117_predictor_16x16_c
 
 void vpx_highbd_d117_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d117_predictor_32x32 vpx_highbd_d117_predictor_32x32_c
 
 void vpx_highbd_d117_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d117_predictor_4x4 vpx_highbd_d117_predictor_4x4_c
 
 void vpx_highbd_d117_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d117_predictor_8x8 vpx_highbd_d117_predictor_8x8_c
 
 void vpx_highbd_d135_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d135_predictor_16x16_neon(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_d135_predictor_16x16 vpx_highbd_d135_predictor_16x16_neon
 
 void vpx_highbd_d135_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d135_predictor_32x32_neon(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_d135_predictor_32x32 vpx_highbd_d135_predictor_32x32_neon
 
 void vpx_highbd_d135_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d135_predictor_4x4_neon(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d135_predictor_4x4 vpx_highbd_d135_predictor_4x4_neon
 
 void vpx_highbd_d135_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d135_predictor_8x8_neon(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d135_predictor_8x8 vpx_highbd_d135_predictor_8x8_neon
 
 void vpx_highbd_d153_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d153_predictor_16x16 vpx_highbd_d153_predictor_16x16_c
 
 void vpx_highbd_d153_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d153_predictor_32x32 vpx_highbd_d153_predictor_32x32_c
 
 void vpx_highbd_d153_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d153_predictor_4x4 vpx_highbd_d153_predictor_4x4_c
 
 void vpx_highbd_d153_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d153_predictor_8x8 vpx_highbd_d153_predictor_8x8_c
 
 void vpx_highbd_d207_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d207_predictor_16x16 vpx_highbd_d207_predictor_16x16_c
 
 void vpx_highbd_d207_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d207_predictor_32x32 vpx_highbd_d207_predictor_32x32_c
 
 void vpx_highbd_d207_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d207_predictor_4x4 vpx_highbd_d207_predictor_4x4_c
 
 void vpx_highbd_d207_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d207_predictor_8x8 vpx_highbd_d207_predictor_8x8_c
 
 void vpx_highbd_d45_predictor_16x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d45_predictor_16x16_neon(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 #define vpx_highbd_d45_predictor_16x16 vpx_highbd_d45_predictor_16x16_neon
 
 void vpx_highbd_d45_predictor_32x32_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d45_predictor_32x32_neon(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 #define vpx_highbd_d45_predictor_32x32 vpx_highbd_d45_predictor_32x32_neon
 
 void vpx_highbd_d45_predictor_4x4_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d45_predictor_4x4_neon(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d45_predictor_4x4 vpx_highbd_d45_predictor_4x4_neon
 
 void vpx_highbd_d45_predictor_8x8_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d45_predictor_8x8_neon(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d45_predictor_8x8 vpx_highbd_d45_predictor_8x8_neon
 
 void vpx_highbd_d63_predictor_16x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_d63_predictor_16x16 vpx_highbd_d63_predictor_16x16_c
 
 void vpx_highbd_d63_predictor_32x32_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_d63_predictor_32x32 vpx_highbd_d63_predictor_32x32_c
 
 void vpx_highbd_d63_predictor_4x4_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 #define vpx_highbd_d63_predictor_4x4 vpx_highbd_d63_predictor_4x4_c
 
 void vpx_highbd_d63_predictor_8x8_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 #define vpx_highbd_d63_predictor_8x8 vpx_highbd_d63_predictor_8x8_c
 
 void vpx_highbd_dc_128_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_128_predictor_16x16_neon(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_128_predictor_16x16 vpx_highbd_dc_128_predictor_16x16_neon
 
 void vpx_highbd_dc_128_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_128_predictor_32x32_neon(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_128_predictor_32x32 vpx_highbd_dc_128_predictor_32x32_neon
 
 void vpx_highbd_dc_128_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_128_predictor_4x4_neon(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_128_predictor_4x4 vpx_highbd_dc_128_predictor_4x4_neon
 
 void vpx_highbd_dc_128_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_128_predictor_8x8_neon(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_128_predictor_8x8 vpx_highbd_dc_128_predictor_8x8_neon
 
 void vpx_highbd_dc_left_predictor_16x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 void vpx_highbd_dc_left_predictor_16x16_neon(uint16_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint16_t* above,
                                              const uint16_t* left,
                                              int bd);
@@ -2454,12 +2454,12 @@
   vpx_highbd_dc_left_predictor_16x16_neon
 
 void vpx_highbd_dc_left_predictor_32x32_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 void vpx_highbd_dc_left_predictor_32x32_neon(uint16_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint16_t* above,
                                              const uint16_t* left,
                                              int bd);
@@ -2467,120 +2467,120 @@
   vpx_highbd_dc_left_predictor_32x32_neon
 
 void vpx_highbd_dc_left_predictor_4x4_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 void vpx_highbd_dc_left_predictor_4x4_neon(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 #define vpx_highbd_dc_left_predictor_4x4 vpx_highbd_dc_left_predictor_4x4_neon
 
 void vpx_highbd_dc_left_predictor_8x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 void vpx_highbd_dc_left_predictor_8x8_neon(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 #define vpx_highbd_dc_left_predictor_8x8 vpx_highbd_dc_left_predictor_8x8_neon
 
 void vpx_highbd_dc_predictor_16x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_dc_predictor_16x16_neon(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_dc_predictor_16x16 vpx_highbd_dc_predictor_16x16_neon
 
 void vpx_highbd_dc_predictor_32x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_dc_predictor_32x32_neon(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_dc_predictor_32x32 vpx_highbd_dc_predictor_32x32_neon
 
 void vpx_highbd_dc_predictor_4x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_dc_predictor_4x4_neon(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_dc_predictor_4x4 vpx_highbd_dc_predictor_4x4_neon
 
 void vpx_highbd_dc_predictor_8x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_dc_predictor_8x8_neon(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_dc_predictor_8x8 vpx_highbd_dc_predictor_8x8_neon
 
 void vpx_highbd_dc_top_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_top_predictor_16x16_neon(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_top_predictor_16x16 vpx_highbd_dc_top_predictor_16x16_neon
 
 void vpx_highbd_dc_top_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_top_predictor_32x32_neon(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_top_predictor_32x32 vpx_highbd_dc_top_predictor_32x32_neon
 
 void vpx_highbd_dc_top_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_top_predictor_4x4_neon(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_top_predictor_4x4 vpx_highbd_dc_top_predictor_4x4_neon
 
 void vpx_highbd_dc_top_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_top_predictor_8x8_neon(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
@@ -2624,53 +2624,68 @@
 #define vpx_highbd_fdct8x8_1 vpx_fdct8x8_1_neon
 
 void vpx_highbd_h_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_h_predictor_16x16_neon(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_h_predictor_16x16 vpx_highbd_h_predictor_16x16_neon
 
 void vpx_highbd_h_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_h_predictor_32x32_neon(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_h_predictor_32x32 vpx_highbd_h_predictor_32x32_neon
 
 void vpx_highbd_h_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_h_predictor_4x4_neon(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_h_predictor_4x4 vpx_highbd_h_predictor_4x4_neon
 
 void vpx_highbd_h_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_h_predictor_8x8_neon(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_h_predictor_8x8 vpx_highbd_h_predictor_8x8_neon
 
+void vpx_highbd_hadamard_16x16_c(const int16_t* src_diff,
+                                 ptrdiff_t src_stride,
+                                 tran_low_t* coeff);
+#define vpx_highbd_hadamard_16x16 vpx_highbd_hadamard_16x16_c
+
+void vpx_highbd_hadamard_32x32_c(const int16_t* src_diff,
+                                 ptrdiff_t src_stride,
+                                 tran_low_t* coeff);
+#define vpx_highbd_hadamard_32x32 vpx_highbd_hadamard_32x32_c
+
+void vpx_highbd_hadamard_8x8_c(const int16_t* src_diff,
+                               ptrdiff_t src_stride,
+                               tran_low_t* coeff);
+#define vpx_highbd_hadamard_8x8 vpx_highbd_hadamard_8x8_c
+
 void vpx_highbd_idct16x16_10_add_c(const tran_low_t* input,
                                    uint16_t* dest,
                                    int stride,
@@ -3005,9 +3020,9 @@
                                          int bd);
 #define vpx_highbd_lpf_vertical_8_dual vpx_highbd_lpf_vertical_8_dual_neon
 
-void vpx_highbd_minmax_8x8_c(const uint8_t* s,
+void vpx_highbd_minmax_8x8_c(const uint8_t* s8,
                              int p,
-                             const uint8_t* d,
+                             const uint8_t* d8,
                              int dp,
                              int* min,
                              int* max);
@@ -3058,7 +3073,7 @@
 
 void vpx_highbd_sad16x16x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad16x16x4d vpx_highbd_sad16x16x4d_c
@@ -3078,7 +3093,7 @@
 
 void vpx_highbd_sad16x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad16x32x4d vpx_highbd_sad16x32x4d_c
@@ -3098,7 +3113,7 @@
 
 void vpx_highbd_sad16x8x4d_c(const uint8_t* src_ptr,
                              int src_stride,
-                             const uint8_t* const ref_ptr[],
+                             const uint8_t* const ref_array[],
                              int ref_stride,
                              uint32_t* sad_array);
 #define vpx_highbd_sad16x8x4d vpx_highbd_sad16x8x4d_c
@@ -3118,7 +3133,7 @@
 
 void vpx_highbd_sad32x16x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad32x16x4d vpx_highbd_sad32x16x4d_c
@@ -3138,7 +3153,7 @@
 
 void vpx_highbd_sad32x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad32x32x4d vpx_highbd_sad32x32x4d_c
@@ -3158,7 +3173,7 @@
 
 void vpx_highbd_sad32x64x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad32x64x4d vpx_highbd_sad32x64x4d_c
@@ -3178,7 +3193,7 @@
 
 void vpx_highbd_sad4x4x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 #define vpx_highbd_sad4x4x4d vpx_highbd_sad4x4x4d_c
@@ -3198,7 +3213,7 @@
 
 void vpx_highbd_sad4x8x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 #define vpx_highbd_sad4x8x4d vpx_highbd_sad4x8x4d_c
@@ -3218,7 +3233,7 @@
 
 void vpx_highbd_sad64x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad64x32x4d vpx_highbd_sad64x32x4d_c
@@ -3238,7 +3253,7 @@
 
 void vpx_highbd_sad64x64x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad64x64x4d vpx_highbd_sad64x64x4d_c
@@ -3258,7 +3273,7 @@
 
 void vpx_highbd_sad8x16x4d_c(const uint8_t* src_ptr,
                              int src_stride,
-                             const uint8_t* const ref_ptr[],
+                             const uint8_t* const ref_array[],
                              int ref_stride,
                              uint32_t* sad_array);
 #define vpx_highbd_sad8x16x4d vpx_highbd_sad8x16x4d_c
@@ -3278,7 +3293,7 @@
 
 void vpx_highbd_sad8x4x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 #define vpx_highbd_sad8x4x4d vpx_highbd_sad8x4x4d_c
@@ -3298,7 +3313,7 @@
 
 void vpx_highbd_sad8x8x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 #define vpx_highbd_sad8x8x4d vpx_highbd_sad8x8x4d_c
@@ -3307,104 +3322,104 @@
                                  int cols,
                                  int16_t* diff_ptr,
                                  ptrdiff_t diff_stride,
-                                 const uint8_t* src_ptr,
+                                 const uint8_t* src8_ptr,
                                  ptrdiff_t src_stride,
-                                 const uint8_t* pred_ptr,
+                                 const uint8_t* pred8_ptr,
                                  ptrdiff_t pred_stride,
                                  int bd);
 #define vpx_highbd_subtract_block vpx_highbd_subtract_block_c
 
 void vpx_highbd_tm_predictor_16x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_tm_predictor_16x16_neon(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_tm_predictor_16x16 vpx_highbd_tm_predictor_16x16_neon
 
 void vpx_highbd_tm_predictor_32x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_tm_predictor_32x32_neon(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_tm_predictor_32x32 vpx_highbd_tm_predictor_32x32_neon
 
 void vpx_highbd_tm_predictor_4x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_tm_predictor_4x4_neon(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_tm_predictor_4x4 vpx_highbd_tm_predictor_4x4_neon
 
 void vpx_highbd_tm_predictor_8x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_tm_predictor_8x8_neon(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_tm_predictor_8x8 vpx_highbd_tm_predictor_8x8_neon
 
 void vpx_highbd_v_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_v_predictor_16x16_neon(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_v_predictor_16x16 vpx_highbd_v_predictor_16x16_neon
 
 void vpx_highbd_v_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_v_predictor_32x32_neon(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_v_predictor_32x32 vpx_highbd_v_predictor_32x32_neon
 
 void vpx_highbd_v_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_v_predictor_4x4_neon(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_v_predictor_4x4 vpx_highbd_v_predictor_4x4_neon
 
 void vpx_highbd_v_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_v_predictor_8x8_neon(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
@@ -3678,12 +3693,12 @@
                                   const uint8_t* thresh1);
 #define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_neon
 
-void vpx_mbpost_proc_across_ip_c(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_c(unsigned char* src,
                                  int pitch,
                                  int rows,
                                  int cols,
                                  int flimit);
-void vpx_mbpost_proc_across_ip_neon(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_neon(unsigned char* src,
                                     int pitch,
                                     int rows,
                                     int cols,
@@ -3717,35 +3732,35 @@
 #define vpx_minmax_8x8 vpx_minmax_8x8_neon
 
 unsigned int vpx_mse16x16_c(const uint8_t* src_ptr,
-                            int source_stride,
+                            int src_stride,
                             const uint8_t* ref_ptr,
-                            int recon_stride,
+                            int ref_stride,
                             unsigned int* sse);
 unsigned int vpx_mse16x16_neon(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
-                               int recon_stride,
+                               int ref_stride,
                                unsigned int* sse);
 #define vpx_mse16x16 vpx_mse16x16_neon
 
 unsigned int vpx_mse16x8_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 #define vpx_mse16x8 vpx_mse16x8_c
 
 unsigned int vpx_mse8x16_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 #define vpx_mse8x16 vpx_mse8x16_c
 
 unsigned int vpx_mse8x8_c(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
-                          int recon_stride,
+                          int ref_stride,
                           unsigned int* sse);
 #define vpx_mse8x8 vpx_mse8x8_c
 
@@ -3862,12 +3877,12 @@
 
 void vpx_sad16x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x16x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad16x16x4d vpx_sad16x16x4d_neon
@@ -3903,12 +3918,12 @@
 
 void vpx_sad16x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x32x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad16x32x4d vpx_sad16x32x4d_neon
@@ -3944,12 +3959,12 @@
 
 void vpx_sad16x8x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad16x8x4d_neon(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 #define vpx_sad16x8x4d vpx_sad16x8x4d_neon
@@ -3985,12 +4000,12 @@
 
 void vpx_sad32x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x16x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x16x4d vpx_sad32x16x4d_neon
@@ -4019,12 +4034,12 @@
 
 void vpx_sad32x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x32x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x32x4d vpx_sad32x32x4d_neon
@@ -4053,12 +4068,12 @@
 
 void vpx_sad32x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x64x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x64x4d vpx_sad32x64x4d_neon
@@ -4094,12 +4109,12 @@
 
 void vpx_sad4x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x4x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad4x4x4d vpx_sad4x4x4d_neon
@@ -4135,12 +4150,12 @@
 
 void vpx_sad4x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x8x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad4x8x4d vpx_sad4x8x4d_neon
@@ -4169,12 +4184,12 @@
 
 void vpx_sad64x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x32x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad64x32x4d vpx_sad64x32x4d_neon
@@ -4203,12 +4218,12 @@
 
 void vpx_sad64x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x64x4d_neon(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad64x64x4d vpx_sad64x64x4d_neon
@@ -4244,12 +4259,12 @@
 
 void vpx_sad8x16x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad8x16x4d_neon(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 #define vpx_sad8x16x4d vpx_sad8x16x4d_neon
@@ -4285,12 +4300,12 @@
 
 void vpx_sad8x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x4x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad8x4x4d vpx_sad8x4x4d_neon
@@ -4326,12 +4341,12 @@
 
 void vpx_sad8x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x8x4d_neon(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad8x8x4d vpx_sad8x8x4d_neon
@@ -4437,17 +4452,17 @@
 #define vpx_scaled_vert vpx_scaled_vert_c
 
 uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x16_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -4455,17 +4470,17 @@
 #define vpx_sub_pixel_avg_variance16x16 vpx_sub_pixel_avg_variance16x16_neon
 
 uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x32_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -4473,17 +4488,17 @@
 #define vpx_sub_pixel_avg_variance16x32 vpx_sub_pixel_avg_variance16x32_neon
 
 uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x8_neon(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
@@ -4491,17 +4506,17 @@
 #define vpx_sub_pixel_avg_variance16x8 vpx_sub_pixel_avg_variance16x8_neon
 
 uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x16_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -4509,17 +4524,17 @@
 #define vpx_sub_pixel_avg_variance32x16 vpx_sub_pixel_avg_variance32x16_neon
 
 uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x32_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -4527,17 +4542,17 @@
 #define vpx_sub_pixel_avg_variance32x32 vpx_sub_pixel_avg_variance32x32_neon
 
 uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x64_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -4545,17 +4560,17 @@
 #define vpx_sub_pixel_avg_variance32x64 vpx_sub_pixel_avg_variance32x64_neon
 
 uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x4_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
@@ -4563,17 +4578,17 @@
 #define vpx_sub_pixel_avg_variance4x4 vpx_sub_pixel_avg_variance4x4_neon
 
 uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x8_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
@@ -4581,17 +4596,17 @@
 #define vpx_sub_pixel_avg_variance4x8 vpx_sub_pixel_avg_variance4x8_neon
 
 uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x32_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -4599,17 +4614,17 @@
 #define vpx_sub_pixel_avg_variance64x32 vpx_sub_pixel_avg_variance64x32_neon
 
 uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x64_neon(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
@@ -4617,17 +4632,17 @@
 #define vpx_sub_pixel_avg_variance64x64 vpx_sub_pixel_avg_variance64x64_neon
 
 uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x16_neon(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
@@ -4635,17 +4650,17 @@
 #define vpx_sub_pixel_avg_variance8x16 vpx_sub_pixel_avg_variance8x16_neon
 
 uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x4_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
@@ -4653,17 +4668,17 @@
 #define vpx_sub_pixel_avg_variance8x4 vpx_sub_pixel_avg_variance8x4_neon
 
 uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x8_neon(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
@@ -4671,208 +4686,208 @@
 #define vpx_sub_pixel_avg_variance8x8 vpx_sub_pixel_avg_variance8x8_neon
 
 uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x16_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance16x16 vpx_sub_pixel_variance16x16_neon
 
 uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x32_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance16x32 vpx_sub_pixel_variance16x32_neon
 
 uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x8_neon(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 #define vpx_sub_pixel_variance16x8 vpx_sub_pixel_variance16x8_neon
 
 uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x16_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance32x16 vpx_sub_pixel_variance32x16_neon
 
 uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x32_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance32x32 vpx_sub_pixel_variance32x32_neon
 
 uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x64_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance32x64 vpx_sub_pixel_variance32x64_neon
 
 uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x4_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 #define vpx_sub_pixel_variance4x4 vpx_sub_pixel_variance4x4_neon
 
 uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x8_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 #define vpx_sub_pixel_variance4x8 vpx_sub_pixel_variance4x8_neon
 
 uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x32_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance64x32 vpx_sub_pixel_variance64x32_neon
 
 uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x64_neon(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 #define vpx_sub_pixel_variance64x64 vpx_sub_pixel_variance64x64_neon
 
 uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x16_neon(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 #define vpx_sub_pixel_variance8x16 vpx_sub_pixel_variance8x16_neon
 
 uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x4_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 #define vpx_sub_pixel_variance8x4 vpx_sub_pixel_variance8x4_neon
 
 uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x8_neon(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
@@ -4901,243 +4916,243 @@
 #define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_neon
 
 void vpx_tm_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_16x16_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_neon
 
 void vpx_tm_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_32x32_neon(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_neon
 
 void vpx_tm_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_4x4_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_neon
 
 void vpx_tm_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_8x8_neon(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_neon
 
 void vpx_v_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_16x16_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_v_predictor_16x16 vpx_v_predictor_16x16_neon
 
 void vpx_v_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_32x32_neon(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_v_predictor_32x32 vpx_v_predictor_32x32_neon
 
 void vpx_v_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_4x4_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_v_predictor_4x4 vpx_v_predictor_4x4_neon
 
 void vpx_v_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_8x8_neon(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_v_predictor_8x8 vpx_v_predictor_8x8_neon
 
 unsigned int vpx_variance16x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x16_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance16x16 vpx_variance16x16_neon
 
 unsigned int vpx_variance16x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x32_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance16x32 vpx_variance16x32_neon
 
 unsigned int vpx_variance16x8_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance16x8_neon(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 #define vpx_variance16x8 vpx_variance16x8_neon
 
 unsigned int vpx_variance32x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x16_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance32x16 vpx_variance32x16_neon
 
 unsigned int vpx_variance32x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x32_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance32x32 vpx_variance32x32_neon
 
 unsigned int vpx_variance32x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x64_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance32x64 vpx_variance32x64_neon
 
 unsigned int vpx_variance4x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x4_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance4x4 vpx_variance4x4_neon
 
 unsigned int vpx_variance4x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x8_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance4x8 vpx_variance4x8_neon
 
 unsigned int vpx_variance64x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x32_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance64x32 vpx_variance64x32_neon
 
 unsigned int vpx_variance64x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x64_neon(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 #define vpx_variance64x64 vpx_variance64x64_neon
 
 unsigned int vpx_variance8x16_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance8x16_neon(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 #define vpx_variance8x16 vpx_variance8x16_neon
 
 unsigned int vpx_variance8x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x4_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance8x4 vpx_variance8x4_neon
 
 unsigned int vpx_variance8x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x8_neon(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance8x8 vpx_variance8x8_neon
 
 void vpx_ve_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c
diff --git a/third_party/libvpx/source/config/linux/generic/vp8_rtcd.h b/third_party/libvpx/source/config/linux/generic/vp8_rtcd.h
index dc054d6..6e6147d3 100644
--- a/third_party/libvpx/source/config/linux/generic/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/linux/generic/vp8_rtcd.h
@@ -27,44 +27,44 @@
 extern "C" {
 #endif
 
-void vp8_bilinear_predict16x16_c(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_bilinear_predict16x16_c(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
 #define vp8_bilinear_predict16x16 vp8_bilinear_predict16x16_c
 
-void vp8_bilinear_predict4x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict4x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
 #define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_c
 
-void vp8_bilinear_predict8x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
 #define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_c
 
-void vp8_bilinear_predict8x8_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x8_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
 #define vp8_bilinear_predict8x8 vp8_bilinear_predict8x8_c
 
 void vp8_blend_b_c(unsigned char* y,
                    unsigned char* u,
                    unsigned char* v,
-                   int y1,
-                   int u1,
-                   int v1,
+                   int y_1,
+                   int u_1,
+                   int v_1,
                    int alpha,
                    int stride);
 #define vp8_blend_b vp8_blend_b_c
@@ -72,9 +72,9 @@
 void vp8_blend_mb_inner_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_inner vp8_blend_mb_inner_c
@@ -82,9 +82,9 @@
 void vp8_blend_mb_outer_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_outer vp8_blend_mb_outer_c
@@ -93,27 +93,27 @@
 #define vp8_block_error vp8_block_error_c
 
 void vp8_copy_mem16x16_c(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 #define vp8_copy_mem16x16 vp8_copy_mem16x16_c
 
 void vp8_copy_mem8x4_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 #define vp8_copy_mem8x4 vp8_copy_mem8x4_c
 
 void vp8_copy_mem8x8_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 #define vp8_copy_mem8x8 vp8_copy_mem8x8_c
 
-void vp8_dc_only_idct_add_c(short input,
-                            unsigned char* pred,
+void vp8_dc_only_idct_add_c(short input_dc,
+                            unsigned char* pred_ptr,
                             int pred_stride,
-                            unsigned char* dst,
+                            unsigned char* dst_ptr,
                             int dst_stride);
 #define vp8_dc_only_idct_add vp8_dc_only_idct_add_c
 
@@ -139,7 +139,7 @@
 
 void vp8_dequant_idct_add_c(short* input,
                             short* dq,
-                            unsigned char* output,
+                            unsigned char* dest,
                             int stride);
 #define vp8_dequant_idct_add vp8_dequant_idct_add_c
 
@@ -158,7 +158,7 @@
                                     char* eobs);
 #define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_c
 
-void vp8_dequantize_b_c(struct blockd*, short* dqc);
+void vp8_dequantize_b_c(struct blockd*, short* DQC);
 #define vp8_dequantize_b vp8_dequantize_b_c
 
 int vp8_diamond_search_sad_c(struct macroblock* x,
@@ -209,55 +209,55 @@
                           union int_mv* center_mv);
 #define vp8_full_search_sad vp8_full_search_sad_c
 
-void vp8_loop_filter_bh_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bh_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
 #define vp8_loop_filter_bh vp8_loop_filter_bh_c
 
-void vp8_loop_filter_bv_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bv_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
 #define vp8_loop_filter_bv vp8_loop_filter_bv_c
 
-void vp8_loop_filter_mbh_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbh_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbh vp8_loop_filter_mbh_c
 
-void vp8_loop_filter_mbv_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbv_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbv vp8_loop_filter_mbv_c
 
-void vp8_loop_filter_bhs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bhs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
 #define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_c
 
-void vp8_loop_filter_bvs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bvs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
 #define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_c
 
-void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y,
-                                              int ystride,
+void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y_ptr,
+                                              int y_stride,
                                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbh vp8_loop_filter_simple_horizontal_edge_c
 
-void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y,
-                                            int ystride,
+void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y_ptr,
+                                            int y_stride,
                                             const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbv vp8_loop_filter_simple_vertical_edge_c
 
@@ -271,8 +271,8 @@
                               struct block* b,
                               struct blockd* d,
                               union int_mv* ref_mv,
-                              int sad_per_bit,
-                              int distance,
+                              int error_per_bit,
+                              int search_range,
                               struct variance_vtable* fn_ptr,
                               int* mvcost[2],
                               union int_mv* center_mv);
@@ -288,50 +288,50 @@
 #define vp8_short_fdct8x4 vp8_short_fdct8x4_c
 
 void vp8_short_idct4x4llm_c(short* input,
-                            unsigned char* pred,
-                            int pitch,
-                            unsigned char* dst,
+                            unsigned char* pred_ptr,
+                            int pred_stride,
+                            unsigned char* dst_ptr,
                             int dst_stride);
 #define vp8_short_idct4x4llm vp8_short_idct4x4llm_c
 
-void vp8_short_inv_walsh4x4_c(short* input, short* output);
+void vp8_short_inv_walsh4x4_c(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_c
 
-void vp8_short_inv_walsh4x4_1_c(short* input, short* output);
+void vp8_short_inv_walsh4x4_1_c(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c
 
 void vp8_short_walsh4x4_c(short* input, short* output, int pitch);
 #define vp8_short_walsh4x4 vp8_short_walsh4x4_c
 
-void vp8_sixtap_predict16x16_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_sixtap_predict16x16_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
 #define vp8_sixtap_predict16x16 vp8_sixtap_predict16x16_c
 
-void vp8_sixtap_predict4x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict4x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
 #define vp8_sixtap_predict4x4 vp8_sixtap_predict4x4_c
 
-void vp8_sixtap_predict8x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
 #define vp8_sixtap_predict8x4 vp8_sixtap_predict8x4_c
 
-void vp8_sixtap_predict8x8_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x8_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
 #define vp8_sixtap_predict8x8 vp8_sixtap_predict8x8_c
 
diff --git a/third_party/libvpx/source/config/linux/generic/vp9_rtcd.h b/third_party/libvpx/source/config/linux/generic/vp9_rtcd.h
index 289a739..5ee904c 100644
--- a/third_party/libvpx/source/config/linux/generic/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/linux/generic/vp9_rtcd.h
@@ -143,8 +143,8 @@
 #define vp9_highbd_fwht4x4 vp9_highbd_fwht4x4_c
 
 void vp9_highbd_iht16x16_256_add_c(const tran_low_t* input,
-                                   uint16_t* output,
-                                   int pitch,
+                                   uint16_t* dest,
+                                   int stride,
                                    int tx_type,
                                    int bd);
 #define vp9_highbd_iht16x16_256_add vp9_highbd_iht16x16_256_add_c
@@ -225,8 +225,8 @@
 #define vp9_highbd_temporal_filter_apply vp9_highbd_temporal_filter_apply_c
 
 void vp9_iht16x16_256_add_c(const tran_low_t* input,
-                            uint8_t* output,
-                            int pitch,
+                            uint8_t* dest,
+                            int stride,
                             int tx_type);
 #define vp9_iht16x16_256_add vp9_iht16x16_256_add_c
 
diff --git a/third_party/libvpx/source/config/linux/generic/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/linux/generic/vpx_dsp_rtcd.h
index 29706b5..f8a910d 100644
--- a/third_party/libvpx/source/config/linux/generic/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/linux/generic/vpx_dsp_rtcd.h
@@ -139,253 +139,253 @@
 #define vpx_convolve_copy vpx_convolve_copy_c
 
 void vpx_d117_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c
 
 void vpx_d117_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c
 
 void vpx_d117_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c
 
 void vpx_d117_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c
 
 void vpx_d135_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_c
 
 void vpx_d135_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_c
 
 void vpx_d135_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_c
 
 void vpx_d135_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_c
 
 void vpx_d153_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d153_predictor_16x16 vpx_d153_predictor_16x16_c
 
 void vpx_d153_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d153_predictor_32x32 vpx_d153_predictor_32x32_c
 
 void vpx_d153_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d153_predictor_4x4 vpx_d153_predictor_4x4_c
 
 void vpx_d153_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d153_predictor_8x8 vpx_d153_predictor_8x8_c
 
 void vpx_d207_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d207_predictor_16x16 vpx_d207_predictor_16x16_c
 
 void vpx_d207_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d207_predictor_32x32 vpx_d207_predictor_32x32_c
 
 void vpx_d207_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_c
 
 void vpx_d207_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d207_predictor_8x8 vpx_d207_predictor_8x8_c
 
 void vpx_d45_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d45_predictor_16x16 vpx_d45_predictor_16x16_c
 
 void vpx_d45_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d45_predictor_32x32 vpx_d45_predictor_32x32_c
 
 void vpx_d45_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_c
 
 void vpx_d45_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_c
 
 void vpx_d45e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c
 
 void vpx_d63_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d63_predictor_16x16 vpx_d63_predictor_16x16_c
 
 void vpx_d63_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d63_predictor_32x32 vpx_d63_predictor_32x32_c
 
 void vpx_d63_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d63_predictor_4x4 vpx_d63_predictor_4x4_c
 
 void vpx_d63_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d63_predictor_8x8 vpx_d63_predictor_8x8_c
 
 void vpx_d63e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c
 
 void vpx_dc_128_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_c
 
 void vpx_dc_128_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_c
 
 void vpx_dc_128_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_c
 
 void vpx_dc_128_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_c
 
 void vpx_dc_left_predictor_16x16_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_c
 
 void vpx_dc_left_predictor_32x32_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_c
 
 void vpx_dc_left_predictor_4x4_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_c
 
 void vpx_dc_left_predictor_8x8_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_c
 
 void vpx_dc_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_c
 
 void vpx_dc_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_c
 
 void vpx_dc_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_c
 
 void vpx_dc_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_c
 
 void vpx_dc_top_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_c
 
 void vpx_dc_top_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_c
 
 void vpx_dc_top_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_c
 
 void vpx_dc_top_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_c
@@ -418,7 +418,7 @@
 #define vpx_fdct8x8_1 vpx_fdct8x8_1_c
 
 void vpx_get16x16var_c(const uint8_t* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        const uint8_t* ref_ptr,
                        int ref_stride,
                        unsigned int* sse,
@@ -426,13 +426,13 @@
 #define vpx_get16x16var vpx_get16x16var_c
 
 unsigned int vpx_get4x4sse_cs_c(const unsigned char* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const unsigned char* ref_ptr,
                                 int ref_stride);
 #define vpx_get4x4sse_cs vpx_get4x4sse_cs_c
 
 void vpx_get8x8var_c(const uint8_t* src_ptr,
-                     int source_stride,
+                     int src_stride,
                      const uint8_t* ref_ptr,
                      int ref_stride,
                      unsigned int* sse,
@@ -443,25 +443,25 @@
 #define vpx_get_mb_ss vpx_get_mb_ss_c
 
 void vpx_h_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_h_predictor_16x16 vpx_h_predictor_16x16_c
 
 void vpx_h_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_h_predictor_32x32 vpx_h_predictor_32x32_c
 
 void vpx_h_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 #define vpx_h_predictor_4x4 vpx_h_predictor_4x4_c
 
 void vpx_h_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 #define vpx_h_predictor_8x8 vpx_h_predictor_8x8_c
@@ -482,13 +482,13 @@
 #define vpx_hadamard_8x8 vpx_hadamard_8x8_c
 
 void vpx_he_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c
 
 void vpx_highbd_10_get16x16var_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse,
@@ -496,7 +496,7 @@
 #define vpx_highbd_10_get16x16var vpx_highbd_10_get16x16var_c
 
 void vpx_highbd_10_get8x8var_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse,
@@ -504,38 +504,38 @@
 #define vpx_highbd_10_get8x8var vpx_highbd_10_get8x8var_c
 
 unsigned int vpx_highbd_10_mse16x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 #define vpx_highbd_10_mse16x16 vpx_highbd_10_mse16x16_c
 
 unsigned int vpx_highbd_10_mse16x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_10_mse16x8 vpx_highbd_10_mse16x8_c
 
 unsigned int vpx_highbd_10_mse8x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_10_mse8x16 vpx_highbd_10_mse8x16_c
 
 unsigned int vpx_highbd_10_mse8x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_10_mse8x8 vpx_highbd_10_mse8x8_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -545,9 +545,9 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -556,9 +556,9 @@
   vpx_highbd_10_sub_pixel_avg_variance16x32_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -568,9 +568,9 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -580,9 +580,9 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -592,9 +592,9 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -603,9 +603,9 @@
   vpx_highbd_10_sub_pixel_avg_variance32x64_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -614,9 +614,9 @@
   vpx_highbd_10_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -626,9 +626,9 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -638,9 +638,9 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -649,9 +649,9 @@
   vpx_highbd_10_sub_pixel_avg_variance64x64_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -660,9 +660,9 @@
   vpx_highbd_10_sub_pixel_avg_variance8x16_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -671,9 +671,9 @@
   vpx_highbd_10_sub_pixel_avg_variance8x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -682,9 +682,9 @@
   vpx_highbd_10_sub_pixel_avg_variance8x8_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -692,9 +692,9 @@
   vpx_highbd_10_sub_pixel_variance16x16_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -702,9 +702,9 @@
   vpx_highbd_10_sub_pixel_variance16x32_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -712,9 +712,9 @@
   vpx_highbd_10_sub_pixel_variance16x8_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -722,9 +722,9 @@
   vpx_highbd_10_sub_pixel_variance32x16_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -732,9 +732,9 @@
   vpx_highbd_10_sub_pixel_variance32x32_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -742,9 +742,9 @@
   vpx_highbd_10_sub_pixel_variance32x64_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -752,9 +752,9 @@
   vpx_highbd_10_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -762,9 +762,9 @@
   vpx_highbd_10_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -772,9 +772,9 @@
   vpx_highbd_10_sub_pixel_variance64x32_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -782,9 +782,9 @@
   vpx_highbd_10_sub_pixel_variance64x64_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -792,9 +792,9 @@
   vpx_highbd_10_sub_pixel_variance8x16_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -802,9 +802,9 @@
   vpx_highbd_10_sub_pixel_variance8x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -812,98 +812,98 @@
   vpx_highbd_10_sub_pixel_variance8x8_c
 
 unsigned int vpx_highbd_10_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance16x16 vpx_highbd_10_variance16x16_c
 
 unsigned int vpx_highbd_10_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance16x32 vpx_highbd_10_variance16x32_c
 
 unsigned int vpx_highbd_10_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_10_variance16x8 vpx_highbd_10_variance16x8_c
 
 unsigned int vpx_highbd_10_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance32x16 vpx_highbd_10_variance32x16_c
 
 unsigned int vpx_highbd_10_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance32x32 vpx_highbd_10_variance32x32_c
 
 unsigned int vpx_highbd_10_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance32x64 vpx_highbd_10_variance32x64_c
 
 unsigned int vpx_highbd_10_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance4x4 vpx_highbd_10_variance4x4_c
 
 unsigned int vpx_highbd_10_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance4x8 vpx_highbd_10_variance4x8_c
 
 unsigned int vpx_highbd_10_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance64x32 vpx_highbd_10_variance64x32_c
 
 unsigned int vpx_highbd_10_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance64x64 vpx_highbd_10_variance64x64_c
 
 unsigned int vpx_highbd_10_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_10_variance8x16 vpx_highbd_10_variance8x16_c
 
 unsigned int vpx_highbd_10_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance8x4 vpx_highbd_10_variance8x4_c
 
 unsigned int vpx_highbd_10_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance8x8 vpx_highbd_10_variance8x8_c
 
 void vpx_highbd_12_get16x16var_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse,
@@ -911,7 +911,7 @@
 #define vpx_highbd_12_get16x16var vpx_highbd_12_get16x16var_c
 
 void vpx_highbd_12_get8x8var_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse,
@@ -919,38 +919,38 @@
 #define vpx_highbd_12_get8x8var vpx_highbd_12_get8x8var_c
 
 unsigned int vpx_highbd_12_mse16x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 #define vpx_highbd_12_mse16x16 vpx_highbd_12_mse16x16_c
 
 unsigned int vpx_highbd_12_mse16x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_12_mse16x8 vpx_highbd_12_mse16x8_c
 
 unsigned int vpx_highbd_12_mse8x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_12_mse8x16 vpx_highbd_12_mse8x16_c
 
 unsigned int vpx_highbd_12_mse8x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_12_mse8x8 vpx_highbd_12_mse8x8_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -960,9 +960,9 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -971,9 +971,9 @@
   vpx_highbd_12_sub_pixel_avg_variance16x32_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -983,9 +983,9 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -995,9 +995,9 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1007,9 +1007,9 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1018,9 +1018,9 @@
   vpx_highbd_12_sub_pixel_avg_variance32x64_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1029,9 +1029,9 @@
   vpx_highbd_12_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1041,9 +1041,9 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1053,9 +1053,9 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1064,9 +1064,9 @@
   vpx_highbd_12_sub_pixel_avg_variance64x64_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1075,9 +1075,9 @@
   vpx_highbd_12_sub_pixel_avg_variance8x16_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1086,9 +1086,9 @@
   vpx_highbd_12_sub_pixel_avg_variance8x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1097,9 +1097,9 @@
   vpx_highbd_12_sub_pixel_avg_variance8x8_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1107,9 +1107,9 @@
   vpx_highbd_12_sub_pixel_variance16x16_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1117,9 +1117,9 @@
   vpx_highbd_12_sub_pixel_variance16x32_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1127,9 +1127,9 @@
   vpx_highbd_12_sub_pixel_variance16x8_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1137,9 +1137,9 @@
   vpx_highbd_12_sub_pixel_variance32x16_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1147,9 +1147,9 @@
   vpx_highbd_12_sub_pixel_variance32x32_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1157,9 +1157,9 @@
   vpx_highbd_12_sub_pixel_variance32x64_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1167,9 +1167,9 @@
   vpx_highbd_12_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1177,9 +1177,9 @@
   vpx_highbd_12_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1187,9 +1187,9 @@
   vpx_highbd_12_sub_pixel_variance64x32_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1197,9 +1197,9 @@
   vpx_highbd_12_sub_pixel_variance64x64_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1207,9 +1207,9 @@
   vpx_highbd_12_sub_pixel_variance8x16_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1217,9 +1217,9 @@
   vpx_highbd_12_sub_pixel_variance8x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1227,98 +1227,98 @@
   vpx_highbd_12_sub_pixel_variance8x8_c
 
 unsigned int vpx_highbd_12_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance16x16 vpx_highbd_12_variance16x16_c
 
 unsigned int vpx_highbd_12_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance16x32 vpx_highbd_12_variance16x32_c
 
 unsigned int vpx_highbd_12_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_12_variance16x8 vpx_highbd_12_variance16x8_c
 
 unsigned int vpx_highbd_12_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance32x16 vpx_highbd_12_variance32x16_c
 
 unsigned int vpx_highbd_12_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance32x32 vpx_highbd_12_variance32x32_c
 
 unsigned int vpx_highbd_12_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance32x64 vpx_highbd_12_variance32x64_c
 
 unsigned int vpx_highbd_12_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance4x4 vpx_highbd_12_variance4x4_c
 
 unsigned int vpx_highbd_12_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance4x8 vpx_highbd_12_variance4x8_c
 
 unsigned int vpx_highbd_12_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance64x32 vpx_highbd_12_variance64x32_c
 
 unsigned int vpx_highbd_12_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance64x64 vpx_highbd_12_variance64x64_c
 
 unsigned int vpx_highbd_12_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_12_variance8x16 vpx_highbd_12_variance8x16_c
 
 unsigned int vpx_highbd_12_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance8x4 vpx_highbd_12_variance8x4_c
 
 unsigned int vpx_highbd_12_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance8x8 vpx_highbd_12_variance8x8_c
 
 void vpx_highbd_8_get16x16var_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse,
@@ -1326,7 +1326,7 @@
 #define vpx_highbd_8_get16x16var vpx_highbd_8_get16x16var_c
 
 void vpx_highbd_8_get8x8var_c(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
                               int ref_stride,
                               unsigned int* sse,
@@ -1334,37 +1334,37 @@
 #define vpx_highbd_8_get8x8var vpx_highbd_8_get8x8var_c
 
 unsigned int vpx_highbd_8_mse16x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_8_mse16x16 vpx_highbd_8_mse16x16_c
 
 unsigned int vpx_highbd_8_mse16x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_8_mse16x8 vpx_highbd_8_mse16x8_c
 
 unsigned int vpx_highbd_8_mse8x16_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_8_mse8x16 vpx_highbd_8_mse8x16_c
 
 unsigned int vpx_highbd_8_mse8x8_c(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
-                                   int recon_stride,
+                                   int ref_stride,
                                    unsigned int* sse);
 #define vpx_highbd_8_mse8x8 vpx_highbd_8_mse8x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1373,9 +1373,9 @@
   vpx_highbd_8_sub_pixel_avg_variance16x16_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1384,9 +1384,9 @@
   vpx_highbd_8_sub_pixel_avg_variance16x32_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1395,9 +1395,9 @@
   vpx_highbd_8_sub_pixel_avg_variance16x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1406,9 +1406,9 @@
   vpx_highbd_8_sub_pixel_avg_variance32x16_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1417,9 +1417,9 @@
   vpx_highbd_8_sub_pixel_avg_variance32x32_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1428,9 +1428,9 @@
   vpx_highbd_8_sub_pixel_avg_variance32x64_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -1439,9 +1439,9 @@
   vpx_highbd_8_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -1450,9 +1450,9 @@
   vpx_highbd_8_sub_pixel_avg_variance4x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1461,9 +1461,9 @@
   vpx_highbd_8_sub_pixel_avg_variance64x32_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1472,9 +1472,9 @@
   vpx_highbd_8_sub_pixel_avg_variance64x64_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1483,9 +1483,9 @@
   vpx_highbd_8_sub_pixel_avg_variance8x16_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -1494,9 +1494,9 @@
   vpx_highbd_8_sub_pixel_avg_variance8x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -1505,9 +1505,9 @@
   vpx_highbd_8_sub_pixel_avg_variance8x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1515,9 +1515,9 @@
   vpx_highbd_8_sub_pixel_variance16x16_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1525,9 +1525,9 @@
   vpx_highbd_8_sub_pixel_variance16x32_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1535,9 +1535,9 @@
   vpx_highbd_8_sub_pixel_variance16x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1545,9 +1545,9 @@
   vpx_highbd_8_sub_pixel_variance32x16_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1555,9 +1555,9 @@
   vpx_highbd_8_sub_pixel_variance32x32_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1565,27 +1565,27 @@
   vpx_highbd_8_sub_pixel_variance32x64_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance4x4 vpx_highbd_8_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance4x8 vpx_highbd_8_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1593,9 +1593,9 @@
   vpx_highbd_8_sub_pixel_variance64x32_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1603,9 +1603,9 @@
   vpx_highbd_8_sub_pixel_variance64x64_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1613,118 +1613,118 @@
   vpx_highbd_8_sub_pixel_variance8x16_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance8x4 vpx_highbd_8_sub_pixel_variance8x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance8x8 vpx_highbd_8_sub_pixel_variance8x8_c
 
 unsigned int vpx_highbd_8_variance16x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance16x16 vpx_highbd_8_variance16x16_c
 
 unsigned int vpx_highbd_8_variance16x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance16x32 vpx_highbd_8_variance16x32_c
 
 unsigned int vpx_highbd_8_variance16x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_8_variance16x8 vpx_highbd_8_variance16x8_c
 
 unsigned int vpx_highbd_8_variance32x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance32x16 vpx_highbd_8_variance32x16_c
 
 unsigned int vpx_highbd_8_variance32x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance32x32 vpx_highbd_8_variance32x32_c
 
 unsigned int vpx_highbd_8_variance32x64_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance32x64 vpx_highbd_8_variance32x64_c
 
 unsigned int vpx_highbd_8_variance4x4_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance4x4 vpx_highbd_8_variance4x4_c
 
 unsigned int vpx_highbd_8_variance4x8_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance4x8 vpx_highbd_8_variance4x8_c
 
 unsigned int vpx_highbd_8_variance64x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance64x32 vpx_highbd_8_variance64x32_c
 
 unsigned int vpx_highbd_8_variance64x64_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance64x64 vpx_highbd_8_variance64x64_c
 
 unsigned int vpx_highbd_8_variance8x16_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_8_variance8x16 vpx_highbd_8_variance8x16_c
 
 unsigned int vpx_highbd_8_variance8x4_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance8x4 vpx_highbd_8_variance8x4_c
 
 unsigned int vpx_highbd_8_variance8x8_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance8x8 vpx_highbd_8_variance8x8_c
 
-unsigned int vpx_highbd_avg_4x4_c(const uint8_t*, int p);
+unsigned int vpx_highbd_avg_4x4_c(const uint8_t* s8, int p);
 #define vpx_highbd_avg_4x4 vpx_highbd_avg_4x4_c
 
-unsigned int vpx_highbd_avg_8x8_c(const uint8_t*, int p);
+unsigned int vpx_highbd_avg_8x8_c(const uint8_t* s8, int p);
 #define vpx_highbd_avg_8x8 vpx_highbd_avg_8x8_c
 
 void vpx_highbd_comp_avg_pred_c(uint16_t* comp_pred,
@@ -1746,7 +1746,7 @@
                             int y_step_q4,
                             int w,
                             int h,
-                            int bps);
+                            int bd);
 #define vpx_highbd_convolve8 vpx_highbd_convolve8_c
 
 void vpx_highbd_convolve8_avg_c(const uint16_t* src,
@@ -1760,7 +1760,7 @@
                                 int y_step_q4,
                                 int w,
                                 int h,
-                                int bps);
+                                int bd);
 #define vpx_highbd_convolve8_avg vpx_highbd_convolve8_avg_c
 
 void vpx_highbd_convolve8_avg_horiz_c(const uint16_t* src,
@@ -1774,7 +1774,7 @@
                                       int y_step_q4,
                                       int w,
                                       int h,
-                                      int bps);
+                                      int bd);
 #define vpx_highbd_convolve8_avg_horiz vpx_highbd_convolve8_avg_horiz_c
 
 void vpx_highbd_convolve8_avg_vert_c(const uint16_t* src,
@@ -1788,7 +1788,7 @@
                                      int y_step_q4,
                                      int w,
                                      int h,
-                                     int bps);
+                                     int bd);
 #define vpx_highbd_convolve8_avg_vert vpx_highbd_convolve8_avg_vert_c
 
 void vpx_highbd_convolve8_horiz_c(const uint16_t* src,
@@ -1802,7 +1802,7 @@
                                   int y_step_q4,
                                   int w,
                                   int h,
-                                  int bps);
+                                  int bd);
 #define vpx_highbd_convolve8_horiz vpx_highbd_convolve8_horiz_c
 
 void vpx_highbd_convolve8_vert_c(const uint16_t* src,
@@ -1816,7 +1816,7 @@
                                  int y_step_q4,
                                  int w,
                                  int h,
-                                 int bps);
+                                 int bd);
 #define vpx_highbd_convolve8_vert vpx_highbd_convolve8_vert_c
 
 void vpx_highbd_convolve_avg_c(const uint16_t* src,
@@ -1830,7 +1830,7 @@
                                int y_step_q4,
                                int w,
                                int h,
-                               int bps);
+                               int bd);
 #define vpx_highbd_convolve_avg vpx_highbd_convolve_avg_c
 
 void vpx_highbd_convolve_copy_c(const uint16_t* src,
@@ -1844,284 +1844,284 @@
                                 int y_step_q4,
                                 int w,
                                 int h,
-                                int bps);
+                                int bd);
 #define vpx_highbd_convolve_copy vpx_highbd_convolve_copy_c
 
 void vpx_highbd_d117_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d117_predictor_16x16 vpx_highbd_d117_predictor_16x16_c
 
 void vpx_highbd_d117_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d117_predictor_32x32 vpx_highbd_d117_predictor_32x32_c
 
 void vpx_highbd_d117_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d117_predictor_4x4 vpx_highbd_d117_predictor_4x4_c
 
 void vpx_highbd_d117_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d117_predictor_8x8 vpx_highbd_d117_predictor_8x8_c
 
 void vpx_highbd_d135_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d135_predictor_16x16 vpx_highbd_d135_predictor_16x16_c
 
 void vpx_highbd_d135_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d135_predictor_32x32 vpx_highbd_d135_predictor_32x32_c
 
 void vpx_highbd_d135_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d135_predictor_4x4 vpx_highbd_d135_predictor_4x4_c
 
 void vpx_highbd_d135_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d135_predictor_8x8 vpx_highbd_d135_predictor_8x8_c
 
 void vpx_highbd_d153_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d153_predictor_16x16 vpx_highbd_d153_predictor_16x16_c
 
 void vpx_highbd_d153_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d153_predictor_32x32 vpx_highbd_d153_predictor_32x32_c
 
 void vpx_highbd_d153_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d153_predictor_4x4 vpx_highbd_d153_predictor_4x4_c
 
 void vpx_highbd_d153_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d153_predictor_8x8 vpx_highbd_d153_predictor_8x8_c
 
 void vpx_highbd_d207_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d207_predictor_16x16 vpx_highbd_d207_predictor_16x16_c
 
 void vpx_highbd_d207_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d207_predictor_32x32 vpx_highbd_d207_predictor_32x32_c
 
 void vpx_highbd_d207_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d207_predictor_4x4 vpx_highbd_d207_predictor_4x4_c
 
 void vpx_highbd_d207_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d207_predictor_8x8 vpx_highbd_d207_predictor_8x8_c
 
 void vpx_highbd_d45_predictor_16x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_d45_predictor_16x16 vpx_highbd_d45_predictor_16x16_c
 
 void vpx_highbd_d45_predictor_32x32_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_d45_predictor_32x32 vpx_highbd_d45_predictor_32x32_c
 
 void vpx_highbd_d45_predictor_4x4_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 #define vpx_highbd_d45_predictor_4x4 vpx_highbd_d45_predictor_4x4_c
 
 void vpx_highbd_d45_predictor_8x8_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 #define vpx_highbd_d45_predictor_8x8 vpx_highbd_d45_predictor_8x8_c
 
 void vpx_highbd_d63_predictor_16x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_d63_predictor_16x16 vpx_highbd_d63_predictor_16x16_c
 
 void vpx_highbd_d63_predictor_32x32_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_d63_predictor_32x32 vpx_highbd_d63_predictor_32x32_c
 
 void vpx_highbd_d63_predictor_4x4_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 #define vpx_highbd_d63_predictor_4x4 vpx_highbd_d63_predictor_4x4_c
 
 void vpx_highbd_d63_predictor_8x8_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 #define vpx_highbd_d63_predictor_8x8 vpx_highbd_d63_predictor_8x8_c
 
 void vpx_highbd_dc_128_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 #define vpx_highbd_dc_128_predictor_16x16 vpx_highbd_dc_128_predictor_16x16_c
 
 void vpx_highbd_dc_128_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 #define vpx_highbd_dc_128_predictor_32x32 vpx_highbd_dc_128_predictor_32x32_c
 
 void vpx_highbd_dc_128_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_dc_128_predictor_4x4 vpx_highbd_dc_128_predictor_4x4_c
 
 void vpx_highbd_dc_128_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_dc_128_predictor_8x8 vpx_highbd_dc_128_predictor_8x8_c
 
 void vpx_highbd_dc_left_predictor_16x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_left_predictor_16x16 vpx_highbd_dc_left_predictor_16x16_c
 
 void vpx_highbd_dc_left_predictor_32x32_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_left_predictor_32x32 vpx_highbd_dc_left_predictor_32x32_c
 
 void vpx_highbd_dc_left_predictor_4x4_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_dc_left_predictor_4x4 vpx_highbd_dc_left_predictor_4x4_c
 
 void vpx_highbd_dc_left_predictor_8x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_dc_left_predictor_8x8 vpx_highbd_dc_left_predictor_8x8_c
 
 void vpx_highbd_dc_predictor_16x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_dc_predictor_16x16 vpx_highbd_dc_predictor_16x16_c
 
 void vpx_highbd_dc_predictor_32x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_dc_predictor_32x32 vpx_highbd_dc_predictor_32x32_c
 
 void vpx_highbd_dc_predictor_4x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 #define vpx_highbd_dc_predictor_4x4 vpx_highbd_dc_predictor_4x4_c
 
 void vpx_highbd_dc_predictor_8x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 #define vpx_highbd_dc_predictor_8x8 vpx_highbd_dc_predictor_8x8_c
 
 void vpx_highbd_dc_top_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 #define vpx_highbd_dc_top_predictor_16x16 vpx_highbd_dc_top_predictor_16x16_c
 
 void vpx_highbd_dc_top_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 #define vpx_highbd_dc_top_predictor_32x32 vpx_highbd_dc_top_predictor_32x32_c
 
 void vpx_highbd_dc_top_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_dc_top_predictor_4x4 vpx_highbd_dc_top_predictor_4x4_c
 
 void vpx_highbd_dc_top_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
@@ -2164,33 +2164,48 @@
 #define vpx_highbd_fdct8x8_1 vpx_highbd_fdct8x8_1_c
 
 void vpx_highbd_h_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 #define vpx_highbd_h_predictor_16x16 vpx_highbd_h_predictor_16x16_c
 
 void vpx_highbd_h_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 #define vpx_highbd_h_predictor_32x32 vpx_highbd_h_predictor_32x32_c
 
 void vpx_highbd_h_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 #define vpx_highbd_h_predictor_4x4 vpx_highbd_h_predictor_4x4_c
 
 void vpx_highbd_h_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 #define vpx_highbd_h_predictor_8x8 vpx_highbd_h_predictor_8x8_c
 
+void vpx_highbd_hadamard_16x16_c(const int16_t* src_diff,
+                                 ptrdiff_t src_stride,
+                                 tran_low_t* coeff);
+#define vpx_highbd_hadamard_16x16 vpx_highbd_hadamard_16x16_c
+
+void vpx_highbd_hadamard_32x32_c(const int16_t* src_diff,
+                                 ptrdiff_t src_stride,
+                                 tran_low_t* coeff);
+#define vpx_highbd_hadamard_32x32 vpx_highbd_hadamard_32x32_c
+
+void vpx_highbd_hadamard_8x8_c(const int16_t* src_diff,
+                               ptrdiff_t src_stride,
+                               tran_low_t* coeff);
+#define vpx_highbd_hadamard_8x8 vpx_highbd_hadamard_8x8_c
+
 void vpx_highbd_idct16x16_10_add_c(const tran_low_t* input,
                                    uint16_t* dest,
                                    int stride,
@@ -2389,9 +2404,9 @@
                                       int bd);
 #define vpx_highbd_lpf_vertical_8_dual vpx_highbd_lpf_vertical_8_dual_c
 
-void vpx_highbd_minmax_8x8_c(const uint8_t* s,
+void vpx_highbd_minmax_8x8_c(const uint8_t* s8,
                              int p,
-                             const uint8_t* d,
+                             const uint8_t* d8,
                              int dp,
                              int* min,
                              int* max);
@@ -2442,7 +2457,7 @@
 
 void vpx_highbd_sad16x16x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad16x16x4d vpx_highbd_sad16x16x4d_c
@@ -2462,7 +2477,7 @@
 
 void vpx_highbd_sad16x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad16x32x4d vpx_highbd_sad16x32x4d_c
@@ -2482,7 +2497,7 @@
 
 void vpx_highbd_sad16x8x4d_c(const uint8_t* src_ptr,
                              int src_stride,
-                             const uint8_t* const ref_ptr[],
+                             const uint8_t* const ref_array[],
                              int ref_stride,
                              uint32_t* sad_array);
 #define vpx_highbd_sad16x8x4d vpx_highbd_sad16x8x4d_c
@@ -2502,7 +2517,7 @@
 
 void vpx_highbd_sad32x16x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad32x16x4d vpx_highbd_sad32x16x4d_c
@@ -2522,7 +2537,7 @@
 
 void vpx_highbd_sad32x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad32x32x4d vpx_highbd_sad32x32x4d_c
@@ -2542,7 +2557,7 @@
 
 void vpx_highbd_sad32x64x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad32x64x4d vpx_highbd_sad32x64x4d_c
@@ -2562,7 +2577,7 @@
 
 void vpx_highbd_sad4x4x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 #define vpx_highbd_sad4x4x4d vpx_highbd_sad4x4x4d_c
@@ -2582,7 +2597,7 @@
 
 void vpx_highbd_sad4x8x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 #define vpx_highbd_sad4x8x4d vpx_highbd_sad4x8x4d_c
@@ -2602,7 +2617,7 @@
 
 void vpx_highbd_sad64x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad64x32x4d vpx_highbd_sad64x32x4d_c
@@ -2622,7 +2637,7 @@
 
 void vpx_highbd_sad64x64x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad64x64x4d vpx_highbd_sad64x64x4d_c
@@ -2642,7 +2657,7 @@
 
 void vpx_highbd_sad8x16x4d_c(const uint8_t* src_ptr,
                              int src_stride,
-                             const uint8_t* const ref_ptr[],
+                             const uint8_t* const ref_array[],
                              int ref_stride,
                              uint32_t* sad_array);
 #define vpx_highbd_sad8x16x4d vpx_highbd_sad8x16x4d_c
@@ -2662,7 +2677,7 @@
 
 void vpx_highbd_sad8x4x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 #define vpx_highbd_sad8x4x4d vpx_highbd_sad8x4x4d_c
@@ -2682,7 +2697,7 @@
 
 void vpx_highbd_sad8x8x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 #define vpx_highbd_sad8x8x4d vpx_highbd_sad8x8x4d_c
@@ -2691,64 +2706,64 @@
                                  int cols,
                                  int16_t* diff_ptr,
                                  ptrdiff_t diff_stride,
-                                 const uint8_t* src_ptr,
+                                 const uint8_t* src8_ptr,
                                  ptrdiff_t src_stride,
-                                 const uint8_t* pred_ptr,
+                                 const uint8_t* pred8_ptr,
                                  ptrdiff_t pred_stride,
                                  int bd);
 #define vpx_highbd_subtract_block vpx_highbd_subtract_block_c
 
 void vpx_highbd_tm_predictor_16x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_tm_predictor_16x16 vpx_highbd_tm_predictor_16x16_c
 
 void vpx_highbd_tm_predictor_32x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_tm_predictor_32x32 vpx_highbd_tm_predictor_32x32_c
 
 void vpx_highbd_tm_predictor_4x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 #define vpx_highbd_tm_predictor_4x4 vpx_highbd_tm_predictor_4x4_c
 
 void vpx_highbd_tm_predictor_8x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 #define vpx_highbd_tm_predictor_8x8 vpx_highbd_tm_predictor_8x8_c
 
 void vpx_highbd_v_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 #define vpx_highbd_v_predictor_16x16 vpx_highbd_v_predictor_16x16_c
 
 void vpx_highbd_v_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 #define vpx_highbd_v_predictor_32x32 vpx_highbd_v_predictor_32x32_c
 
 void vpx_highbd_v_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 #define vpx_highbd_v_predictor_4x4 vpx_highbd_v_predictor_4x4_c
 
 void vpx_highbd_v_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
@@ -2910,7 +2925,7 @@
                                const uint8_t* thresh1);
 #define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_c
 
-void vpx_mbpost_proc_across_ip_c(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_c(unsigned char* src,
                                  int pitch,
                                  int rows,
                                  int cols,
@@ -2933,30 +2948,30 @@
 #define vpx_minmax_8x8 vpx_minmax_8x8_c
 
 unsigned int vpx_mse16x16_c(const uint8_t* src_ptr,
-                            int source_stride,
+                            int src_stride,
                             const uint8_t* ref_ptr,
-                            int recon_stride,
+                            int ref_stride,
                             unsigned int* sse);
 #define vpx_mse16x16 vpx_mse16x16_c
 
 unsigned int vpx_mse16x8_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 #define vpx_mse16x8 vpx_mse16x8_c
 
 unsigned int vpx_mse8x16_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 #define vpx_mse8x16 vpx_mse8x16_c
 
 unsigned int vpx_mse8x8_c(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
-                          int recon_stride,
+                          int ref_stride,
                           unsigned int* sse);
 #define vpx_mse8x8 vpx_mse8x8_c
 
@@ -3031,7 +3046,7 @@
 
 void vpx_sad16x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad16x16x4d vpx_sad16x16x4d_c
@@ -3058,7 +3073,7 @@
 
 void vpx_sad16x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad16x32x4d vpx_sad16x32x4d_c
@@ -3085,7 +3100,7 @@
 
 void vpx_sad16x8x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 #define vpx_sad16x8x4d vpx_sad16x8x4d_c
@@ -3112,7 +3127,7 @@
 
 void vpx_sad32x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad32x16x4d vpx_sad32x16x4d_c
@@ -3132,7 +3147,7 @@
 
 void vpx_sad32x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad32x32x4d vpx_sad32x32x4d_c
@@ -3152,7 +3167,7 @@
 
 void vpx_sad32x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad32x64x4d vpx_sad32x64x4d_c
@@ -3179,7 +3194,7 @@
 
 void vpx_sad4x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 #define vpx_sad4x4x4d vpx_sad4x4x4d_c
@@ -3206,7 +3221,7 @@
 
 void vpx_sad4x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 #define vpx_sad4x8x4d vpx_sad4x8x4d_c
@@ -3226,7 +3241,7 @@
 
 void vpx_sad64x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad64x32x4d vpx_sad64x32x4d_c
@@ -3246,7 +3261,7 @@
 
 void vpx_sad64x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad64x64x4d vpx_sad64x64x4d_c
@@ -3273,7 +3288,7 @@
 
 void vpx_sad8x16x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 #define vpx_sad8x16x4d vpx_sad8x16x4d_c
@@ -3300,7 +3315,7 @@
 
 void vpx_sad8x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 #define vpx_sad8x4x4d vpx_sad8x4x4d_c
@@ -3327,7 +3342,7 @@
 
 void vpx_sad8x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 #define vpx_sad8x8x4d vpx_sad8x8x4d_c
@@ -3421,9 +3436,9 @@
 #define vpx_scaled_vert vpx_scaled_vert_c
 
 uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -3431,9 +3446,9 @@
 #define vpx_sub_pixel_avg_variance16x16 vpx_sub_pixel_avg_variance16x16_c
 
 uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -3441,9 +3456,9 @@
 #define vpx_sub_pixel_avg_variance16x32 vpx_sub_pixel_avg_variance16x32_c
 
 uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
@@ -3451,9 +3466,9 @@
 #define vpx_sub_pixel_avg_variance16x8 vpx_sub_pixel_avg_variance16x8_c
 
 uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -3461,9 +3476,9 @@
 #define vpx_sub_pixel_avg_variance32x16 vpx_sub_pixel_avg_variance32x16_c
 
 uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -3471,9 +3486,9 @@
 #define vpx_sub_pixel_avg_variance32x32 vpx_sub_pixel_avg_variance32x32_c
 
 uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -3481,9 +3496,9 @@
 #define vpx_sub_pixel_avg_variance32x64 vpx_sub_pixel_avg_variance32x64_c
 
 uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
@@ -3491,9 +3506,9 @@
 #define vpx_sub_pixel_avg_variance4x4 vpx_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
@@ -3501,9 +3516,9 @@
 #define vpx_sub_pixel_avg_variance4x8 vpx_sub_pixel_avg_variance4x8_c
 
 uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -3511,9 +3526,9 @@
 #define vpx_sub_pixel_avg_variance64x32 vpx_sub_pixel_avg_variance64x32_c
 
 uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -3521,9 +3536,9 @@
 #define vpx_sub_pixel_avg_variance64x64 vpx_sub_pixel_avg_variance64x64_c
 
 uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
@@ -3531,9 +3546,9 @@
 #define vpx_sub_pixel_avg_variance8x16 vpx_sub_pixel_avg_variance8x16_c
 
 uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
@@ -3541,9 +3556,9 @@
 #define vpx_sub_pixel_avg_variance8x4 vpx_sub_pixel_avg_variance8x4_c
 
 uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
@@ -3551,117 +3566,117 @@
 #define vpx_sub_pixel_avg_variance8x8 vpx_sub_pixel_avg_variance8x8_c
 
 uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance16x16 vpx_sub_pixel_variance16x16_c
 
 uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance16x32 vpx_sub_pixel_variance16x32_c
 
 uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 #define vpx_sub_pixel_variance16x8 vpx_sub_pixel_variance16x8_c
 
 uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance32x16 vpx_sub_pixel_variance32x16_c
 
 uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance32x32 vpx_sub_pixel_variance32x32_c
 
 uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance32x64 vpx_sub_pixel_variance32x64_c
 
 uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 #define vpx_sub_pixel_variance4x4 vpx_sub_pixel_variance4x4_c
 
 uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 #define vpx_sub_pixel_variance4x8 vpx_sub_pixel_variance4x8_c
 
 uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance64x32 vpx_sub_pixel_variance64x32_c
 
 uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance64x64 vpx_sub_pixel_variance64x64_c
 
 uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 #define vpx_sub_pixel_variance8x16 vpx_sub_pixel_variance8x16_c
 
 uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 #define vpx_sub_pixel_variance8x4 vpx_sub_pixel_variance8x4_c
 
 uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
@@ -3681,146 +3696,146 @@
 #define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_c
 
 void vpx_tm_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_c
 
 void vpx_tm_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_c
 
 void vpx_tm_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_c
 
 void vpx_tm_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_c
 
 void vpx_v_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_v_predictor_16x16 vpx_v_predictor_16x16_c
 
 void vpx_v_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_v_predictor_32x32 vpx_v_predictor_32x32_c
 
 void vpx_v_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 #define vpx_v_predictor_4x4 vpx_v_predictor_4x4_c
 
 void vpx_v_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 #define vpx_v_predictor_8x8 vpx_v_predictor_8x8_c
 
 unsigned int vpx_variance16x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance16x16 vpx_variance16x16_c
 
 unsigned int vpx_variance16x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance16x32 vpx_variance16x32_c
 
 unsigned int vpx_variance16x8_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 #define vpx_variance16x8 vpx_variance16x8_c
 
 unsigned int vpx_variance32x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance32x16 vpx_variance32x16_c
 
 unsigned int vpx_variance32x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance32x32 vpx_variance32x32_c
 
 unsigned int vpx_variance32x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance32x64 vpx_variance32x64_c
 
 unsigned int vpx_variance4x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 #define vpx_variance4x4 vpx_variance4x4_c
 
 unsigned int vpx_variance4x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 #define vpx_variance4x8 vpx_variance4x8_c
 
 unsigned int vpx_variance64x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance64x32 vpx_variance64x32_c
 
 unsigned int vpx_variance64x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance64x64 vpx_variance64x64_c
 
 unsigned int vpx_variance8x16_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 #define vpx_variance8x16 vpx_variance8x16_c
 
 unsigned int vpx_variance8x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 #define vpx_variance8x4 vpx_variance8x4_c
 
 unsigned int vpx_variance8x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 #define vpx_variance8x8 vpx_variance8x8_c
 
 void vpx_ve_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c
diff --git a/third_party/libvpx/source/config/linux/ia32/vp8_rtcd.h b/third_party/libvpx/source/config/linux/ia32/vp8_rtcd.h
index 850ca91..c46bfe5 100644
--- a/third_party/libvpx/source/config/linux/ia32/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/linux/ia32/vp8_rtcd.h
@@ -27,90 +27,90 @@
 extern "C" {
 #endif
 
-void vp8_bilinear_predict16x16_c(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_bilinear_predict16x16_c(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-void vp8_bilinear_predict16x16_sse2(unsigned char* src,
-                                    int src_pitch,
-                                    int xofst,
-                                    int yofst,
-                                    unsigned char* dst,
+void vp8_bilinear_predict16x16_sse2(unsigned char* src_ptr,
+                                    int src_pixels_per_line,
+                                    int xoffset,
+                                    int yoffset,
+                                    unsigned char* dst_ptr,
                                     int dst_pitch);
-void vp8_bilinear_predict16x16_ssse3(unsigned char* src,
-                                     int src_pitch,
-                                     int xofst,
-                                     int yofst,
-                                     unsigned char* dst,
+void vp8_bilinear_predict16x16_ssse3(unsigned char* src_ptr,
+                                     int src_pixels_per_line,
+                                     int xoffset,
+                                     int yoffset,
+                                     unsigned char* dst_ptr,
                                      int dst_pitch);
-RTCD_EXTERN void (*vp8_bilinear_predict16x16)(unsigned char* src,
-                                              int src_pitch,
-                                              int xofst,
-                                              int yofst,
-                                              unsigned char* dst,
+RTCD_EXTERN void (*vp8_bilinear_predict16x16)(unsigned char* src_ptr,
+                                              int src_pixels_per_line,
+                                              int xoffset,
+                                              int yoffset,
+                                              unsigned char* dst_ptr,
                                               int dst_pitch);
 
-void vp8_bilinear_predict4x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict4x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict4x4_sse2(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict4x4_sse2(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_sse2
 
-void vp8_bilinear_predict8x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x4_sse2(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x4_sse2(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_sse2
 
-void vp8_bilinear_predict8x8_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x8_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x8_sse2(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x8_sse2(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
-void vp8_bilinear_predict8x8_ssse3(unsigned char* src,
-                                   int src_pitch,
-                                   int xofst,
-                                   int yofst,
-                                   unsigned char* dst,
+void vp8_bilinear_predict8x8_ssse3(unsigned char* src_ptr,
+                                   int src_pixels_per_line,
+                                   int xoffset,
+                                   int yoffset,
+                                   unsigned char* dst_ptr,
                                    int dst_pitch);
-RTCD_EXTERN void (*vp8_bilinear_predict8x8)(unsigned char* src,
-                                            int src_pitch,
-                                            int xofst,
-                                            int yofst,
-                                            unsigned char* dst,
+RTCD_EXTERN void (*vp8_bilinear_predict8x8)(unsigned char* src_ptr,
+                                            int src_pixels_per_line,
+                                            int xoffset,
+                                            int yoffset,
+                                            unsigned char* dst_ptr,
                                             int dst_pitch);
 
 void vp8_blend_b_c(unsigned char* y,
                    unsigned char* u,
                    unsigned char* v,
-                   int y1,
-                   int u1,
-                   int v1,
+                   int y_1,
+                   int u_1,
+                   int v_1,
                    int alpha,
                    int stride);
 #define vp8_blend_b vp8_blend_b_c
@@ -118,9 +118,9 @@
 void vp8_blend_mb_inner_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_inner vp8_blend_mb_inner_c
@@ -128,9 +128,9 @@
 void vp8_blend_mb_outer_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_outer vp8_blend_mb_outer_c
@@ -140,65 +140,65 @@
 #define vp8_block_error vp8_block_error_sse2
 
 void vp8_copy32xn_c(const unsigned char* src_ptr,
-                    int source_stride,
+                    int src_stride,
                     unsigned char* dst_ptr,
                     int dst_stride,
-                    int n);
+                    int height);
 void vp8_copy32xn_sse2(const unsigned char* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        unsigned char* dst_ptr,
                        int dst_stride,
-                       int n);
+                       int height);
 void vp8_copy32xn_sse3(const unsigned char* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        unsigned char* dst_ptr,
                        int dst_stride,
-                       int n);
+                       int height);
 RTCD_EXTERN void (*vp8_copy32xn)(const unsigned char* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  unsigned char* dst_ptr,
                                  int dst_stride,
-                                 int n);
+                                 int height);
 
 void vp8_copy_mem16x16_c(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 void vp8_copy_mem16x16_sse2(unsigned char* src,
-                            int src_pitch,
+                            int src_stride,
                             unsigned char* dst,
-                            int dst_pitch);
+                            int dst_stride);
 #define vp8_copy_mem16x16 vp8_copy_mem16x16_sse2
 
 void vp8_copy_mem8x4_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 void vp8_copy_mem8x4_mmx(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 #define vp8_copy_mem8x4 vp8_copy_mem8x4_mmx
 
 void vp8_copy_mem8x8_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 void vp8_copy_mem8x8_mmx(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 #define vp8_copy_mem8x8 vp8_copy_mem8x8_mmx
 
-void vp8_dc_only_idct_add_c(short input,
-                            unsigned char* pred,
+void vp8_dc_only_idct_add_c(short input_dc,
+                            unsigned char* pred_ptr,
                             int pred_stride,
-                            unsigned char* dst,
+                            unsigned char* dst_ptr,
                             int dst_stride);
-void vp8_dc_only_idct_add_mmx(short input,
-                              unsigned char* pred,
+void vp8_dc_only_idct_add_mmx(short input_dc,
+                              unsigned char* pred_ptr,
                               int pred_stride,
-                              unsigned char* dst,
+                              unsigned char* dst_ptr,
                               int dst_stride);
 #define vp8_dc_only_idct_add vp8_dc_only_idct_add_mmx
 
@@ -240,11 +240,11 @@
 
 void vp8_dequant_idct_add_c(short* input,
                             short* dq,
-                            unsigned char* output,
+                            unsigned char* dest,
                             int stride);
 void vp8_dequant_idct_add_mmx(short* input,
                               short* dq,
-                              unsigned char* output,
+                              unsigned char* dest,
                               int stride);
 #define vp8_dequant_idct_add vp8_dequant_idct_add_mmx
 
@@ -274,8 +274,8 @@
                                        char* eobs);
 #define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_sse2
 
-void vp8_dequantize_b_c(struct blockd*, short* dqc);
-void vp8_dequantize_b_mmx(struct blockd*, short* dqc);
+void vp8_dequantize_b_c(struct blockd*, short* DQC);
+void vp8_dequantize_b_mmx(struct blockd*, short* DQC);
 #define vp8_dequantize_b vp8_dequantize_b_mmx
 
 int vp8_diamond_search_sad_c(struct macroblock* x,
@@ -375,91 +375,91 @@
                                        int* mvcost[2],
                                        union int_mv* center_mv);
 
-void vp8_loop_filter_bh_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bh_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bh_sse2(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bh_sse2(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
 #define vp8_loop_filter_bh vp8_loop_filter_bh_sse2
 
-void vp8_loop_filter_bv_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bv_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bv_sse2(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bv_sse2(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
 #define vp8_loop_filter_bv vp8_loop_filter_bv_sse2
 
-void vp8_loop_filter_mbh_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbh_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbh_sse2(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbh_sse2(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbh vp8_loop_filter_mbh_sse2
 
-void vp8_loop_filter_mbv_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbv_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbv_sse2(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbv_sse2(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbv vp8_loop_filter_mbv_sse2
 
-void vp8_loop_filter_bhs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bhs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bhs_sse2(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bhs_sse2(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_sse2
 
-void vp8_loop_filter_bvs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bvs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bvs_sse2(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bvs_sse2(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_sse2
 
-void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y,
-                                              int ystride,
+void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y_ptr,
+                                              int y_stride,
                                               const unsigned char* blimit);
-void vp8_loop_filter_simple_horizontal_edge_sse2(unsigned char* y,
-                                                 int ystride,
+void vp8_loop_filter_simple_horizontal_edge_sse2(unsigned char* y_ptr,
+                                                 int y_stride,
                                                  const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbh vp8_loop_filter_simple_horizontal_edge_sse2
 
-void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y,
-                                            int ystride,
+void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y_ptr,
+                                            int y_stride,
                                             const unsigned char* blimit);
-void vp8_loop_filter_simple_vertical_edge_sse2(unsigned char* y,
-                                               int ystride,
+void vp8_loop_filter_simple_vertical_edge_sse2(unsigned char* y_ptr,
+                                               int y_stride,
                                                const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbv vp8_loop_filter_simple_vertical_edge_sse2
 
@@ -475,8 +475,8 @@
                               struct block* b,
                               struct blockd* d,
                               union int_mv* ref_mv,
-                              int sad_per_bit,
-                              int distance,
+                              int error_per_bit,
+                              int search_range,
                               struct variance_vtable* fn_ptr,
                               int* mvcost[2],
                               union int_mv* center_mv);
@@ -484,8 +484,8 @@
                               struct block* b,
                               struct blockd* d,
                               union int_mv* ref_mv,
-                              int sad_per_bit,
-                              int distance,
+                              int error_per_bit,
+                              int search_range,
                               struct variance_vtable* fn_ptr,
                               int* mvcost[2],
                               union int_mv* center_mv);
@@ -505,126 +505,126 @@
 #define vp8_short_fdct8x4 vp8_short_fdct8x4_sse2
 
 void vp8_short_idct4x4llm_c(short* input,
-                            unsigned char* pred,
-                            int pitch,
-                            unsigned char* dst,
+                            unsigned char* pred_ptr,
+                            int pred_stride,
+                            unsigned char* dst_ptr,
                             int dst_stride);
 void vp8_short_idct4x4llm_mmx(short* input,
-                              unsigned char* pred,
-                              int pitch,
-                              unsigned char* dst,
+                              unsigned char* pred_ptr,
+                              int pred_stride,
+                              unsigned char* dst_ptr,
                               int dst_stride);
 #define vp8_short_idct4x4llm vp8_short_idct4x4llm_mmx
 
-void vp8_short_inv_walsh4x4_c(short* input, short* output);
-void vp8_short_inv_walsh4x4_sse2(short* input, short* output);
+void vp8_short_inv_walsh4x4_c(short* input, short* mb_dqcoeff);
+void vp8_short_inv_walsh4x4_sse2(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_sse2
 
-void vp8_short_inv_walsh4x4_1_c(short* input, short* output);
+void vp8_short_inv_walsh4x4_1_c(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c
 
 void vp8_short_walsh4x4_c(short* input, short* output, int pitch);
 void vp8_short_walsh4x4_sse2(short* input, short* output, int pitch);
 #define vp8_short_walsh4x4 vp8_short_walsh4x4_sse2
 
-void vp8_sixtap_predict16x16_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_sixtap_predict16x16_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_sixtap_predict16x16_sse2(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_sixtap_predict16x16_sse2(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
-void vp8_sixtap_predict16x16_ssse3(unsigned char* src,
-                                   int src_pitch,
-                                   int xofst,
-                                   int yofst,
-                                   unsigned char* dst,
+void vp8_sixtap_predict16x16_ssse3(unsigned char* src_ptr,
+                                   int src_pixels_per_line,
+                                   int xoffset,
+                                   int yoffset,
+                                   unsigned char* dst_ptr,
                                    int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict16x16)(unsigned char* src,
-                                            int src_pitch,
-                                            int xofst,
-                                            int yofst,
-                                            unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict16x16)(unsigned char* src_ptr,
+                                            int src_pixels_per_line,
+                                            int xoffset,
+                                            int yoffset,
+                                            unsigned char* dst_ptr,
                                             int dst_pitch);
 
-void vp8_sixtap_predict4x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict4x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict4x4_mmx(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_sixtap_predict4x4_mmx(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_sixtap_predict4x4_ssse3(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_sixtap_predict4x4_ssse3(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict4x4)(unsigned char* src,
-                                          int src_pitch,
-                                          int xofst,
-                                          int yofst,
-                                          unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict4x4)(unsigned char* src_ptr,
+                                          int src_pixels_per_line,
+                                          int xoffset,
+                                          int yoffset,
+                                          unsigned char* dst_ptr,
                                           int dst_pitch);
 
-void vp8_sixtap_predict8x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x4_sse2(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x4_sse2(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
-void vp8_sixtap_predict8x4_ssse3(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_sixtap_predict8x4_ssse3(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict8x4)(unsigned char* src,
-                                          int src_pitch,
-                                          int xofst,
-                                          int yofst,
-                                          unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict8x4)(unsigned char* src_ptr,
+                                          int src_pixels_per_line,
+                                          int xoffset,
+                                          int yoffset,
+                                          unsigned char* dst_ptr,
                                           int dst_pitch);
 
-void vp8_sixtap_predict8x8_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x8_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x8_sse2(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x8_sse2(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
-void vp8_sixtap_predict8x8_ssse3(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_sixtap_predict8x8_ssse3(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict8x8)(unsigned char* src,
-                                          int src_pitch,
-                                          int xofst,
-                                          int yofst,
-                                          unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict8x8)(unsigned char* src_ptr,
+                                          int src_pixels_per_line,
+                                          int xoffset,
+                                          int yoffset,
+                                          unsigned char* dst_ptr,
                                           int dst_pitch);
 
 void vp8_rtcd(void);
diff --git a/third_party/libvpx/source/config/linux/ia32/vp9_rtcd.h b/third_party/libvpx/source/config/linux/ia32/vp9_rtcd.h
index 1e1da43..603bd31 100644
--- a/third_party/libvpx/source/config/linux/ia32/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/linux/ia32/vp9_rtcd.h
@@ -242,18 +242,18 @@
 #define vp9_highbd_fwht4x4 vp9_highbd_fwht4x4_c
 
 void vp9_highbd_iht16x16_256_add_c(const tran_low_t* input,
-                                   uint16_t* output,
-                                   int pitch,
+                                   uint16_t* dest,
+                                   int stride,
                                    int tx_type,
                                    int bd);
 void vp9_highbd_iht16x16_256_add_sse4_1(const tran_low_t* input,
-                                        uint16_t* output,
-                                        int pitch,
+                                        uint16_t* dest,
+                                        int stride,
                                         int tx_type,
                                         int bd);
 RTCD_EXTERN void (*vp9_highbd_iht16x16_256_add)(const tran_low_t* input,
-                                                uint16_t* output,
-                                                int pitch,
+                                                uint16_t* dest,
+                                                int stride,
                                                 int tx_type,
                                                 int bd);
 
@@ -351,12 +351,12 @@
 #define vp9_highbd_temporal_filter_apply vp9_highbd_temporal_filter_apply_c
 
 void vp9_iht16x16_256_add_c(const tran_low_t* input,
-                            uint8_t* output,
-                            int pitch,
+                            uint8_t* dest,
+                            int stride,
                             int tx_type);
 void vp9_iht16x16_256_add_sse2(const tran_low_t* input,
-                               uint8_t* output,
-                               int pitch,
+                               uint8_t* dest,
+                               int stride,
                                int tx_type);
 #define vp9_iht16x16_256_add vp9_iht16x16_256_add_sse2
 
diff --git a/third_party/libvpx/source/config/linux/ia32/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/linux/ia32/vpx_dsp_rtcd.h
index 14d1107..b2b02a5 100644
--- a/third_party/libvpx/source/config/linux/ia32/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/linux/ia32/vpx_dsp_rtcd.h
@@ -427,420 +427,420 @@
 #define vpx_convolve_copy vpx_convolve_copy_sse2
 
 void vpx_d117_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c
 
 void vpx_d117_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c
 
 void vpx_d117_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c
 
 void vpx_d117_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c
 
 void vpx_d135_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_c
 
 void vpx_d135_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_c
 
 void vpx_d135_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_c
 
 void vpx_d135_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_c
 
 void vpx_d153_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d153_predictor_16x16_ssse3(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_d153_predictor_16x16)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d153_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d153_predictor_32x32_ssse3(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_d153_predictor_32x32)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d153_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d153_predictor_4x4_ssse3(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 RTCD_EXTERN void (*vpx_d153_predictor_4x4)(uint8_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint8_t* above,
                                            const uint8_t* left);
 
 void vpx_d153_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d153_predictor_8x8_ssse3(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 RTCD_EXTERN void (*vpx_d153_predictor_8x8)(uint8_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint8_t* above,
                                            const uint8_t* left);
 
 void vpx_d207_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d207_predictor_16x16_ssse3(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_d207_predictor_16x16)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d207_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d207_predictor_32x32_ssse3(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_d207_predictor_32x32)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d207_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d207_predictor_4x4_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_sse2
 
 void vpx_d207_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d207_predictor_8x8_ssse3(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 RTCD_EXTERN void (*vpx_d207_predictor_8x8)(uint8_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint8_t* above,
                                            const uint8_t* left);
 
 void vpx_d45_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_16x16_ssse3(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d45_predictor_16x16)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d45_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_32x32_ssse3(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d45_predictor_32x32)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d45_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_4x4_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_sse2
 
 void vpx_d45_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_8x8_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_sse2
 
 void vpx_d45e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c
 
 void vpx_d63_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d63_predictor_16x16_ssse3(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d63_predictor_16x16)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d63_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d63_predictor_32x32_ssse3(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d63_predictor_32x32)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d63_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d63_predictor_4x4_ssse3(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 RTCD_EXTERN void (*vpx_d63_predictor_4x4)(uint8_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint8_t* above,
                                           const uint8_t* left);
 
 void vpx_d63_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d63_predictor_8x8_ssse3(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 RTCD_EXTERN void (*vpx_d63_predictor_8x8)(uint8_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint8_t* above,
                                           const uint8_t* left);
 
 void vpx_d63e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c
 
 void vpx_dc_128_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_16x16_sse2(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_sse2
 
 void vpx_dc_128_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_32x32_sse2(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_sse2
 
 void vpx_dc_128_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_4x4_sse2(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_sse2
 
 void vpx_dc_128_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_8x8_sse2(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_sse2
 
 void vpx_dc_left_predictor_16x16_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_16x16_sse2(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 #define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_sse2
 
 void vpx_dc_left_predictor_32x32_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_32x32_sse2(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 #define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_sse2
 
 void vpx_dc_left_predictor_4x4_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_4x4_sse2(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 #define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_sse2
 
 void vpx_dc_left_predictor_8x8_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_8x8_sse2(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 #define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_sse2
 
 void vpx_dc_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_16x16_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_sse2
 
 void vpx_dc_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_32x32_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_sse2
 
 void vpx_dc_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_4x4_sse2(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_sse2
 
 void vpx_dc_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_8x8_sse2(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_sse2
 
 void vpx_dc_top_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_16x16_sse2(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_sse2
 
 void vpx_dc_top_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_32x32_sse2(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_sse2
 
 void vpx_dc_top_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_4x4_sse2(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_sse2
 
 void vpx_dc_top_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_8x8_sse2(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_sse2
@@ -884,44 +884,44 @@
 #define vpx_fdct8x8_1 vpx_fdct8x8_1_sse2
 
 void vpx_get16x16var_c(const uint8_t* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        const uint8_t* ref_ptr,
                        int ref_stride,
                        unsigned int* sse,
                        int* sum);
 void vpx_get16x16var_sse2(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
                           int ref_stride,
                           unsigned int* sse,
                           int* sum);
 void vpx_get16x16var_avx2(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
                           int ref_stride,
                           unsigned int* sse,
                           int* sum);
 RTCD_EXTERN void (*vpx_get16x16var)(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse,
                                     int* sum);
 
 unsigned int vpx_get4x4sse_cs_c(const unsigned char* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const unsigned char* ref_ptr,
                                 int ref_stride);
 #define vpx_get4x4sse_cs vpx_get4x4sse_cs_c
 
 void vpx_get8x8var_c(const uint8_t* src_ptr,
-                     int source_stride,
+                     int src_stride,
                      const uint8_t* ref_ptr,
                      int ref_stride,
                      unsigned int* sse,
                      int* sum);
 void vpx_get8x8var_sse2(const uint8_t* src_ptr,
-                        int source_stride,
+                        int src_stride,
                         const uint8_t* ref_ptr,
                         int ref_stride,
                         unsigned int* sse,
@@ -933,41 +933,41 @@
 #define vpx_get_mb_ss vpx_get_mb_ss_sse2
 
 void vpx_h_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_16x16_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_h_predictor_16x16 vpx_h_predictor_16x16_sse2
 
 void vpx_h_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_32x32_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_h_predictor_32x32 vpx_h_predictor_32x32_sse2
 
 void vpx_h_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_4x4_sse2(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_h_predictor_4x4 vpx_h_predictor_4x4_sse2
 
 void vpx_h_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_8x8_sse2(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_h_predictor_8x8 vpx_h_predictor_8x8_sse2
@@ -1007,13 +1007,13 @@
 #define vpx_hadamard_8x8 vpx_hadamard_8x8_sse2
 
 void vpx_he_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c
 
 void vpx_highbd_10_get16x16var_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse,
@@ -1021,7 +1021,7 @@
 #define vpx_highbd_10_get16x16var vpx_highbd_10_get16x16var_c
 
 void vpx_highbd_10_get8x8var_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse,
@@ -1029,57 +1029,57 @@
 #define vpx_highbd_10_get8x8var vpx_highbd_10_get8x8var_c
 
 unsigned int vpx_highbd_10_mse16x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 unsigned int vpx_highbd_10_mse16x16_sse2(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
-                                         int recon_stride,
+                                         int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_mse16x16 vpx_highbd_10_mse16x16_sse2
 
 unsigned int vpx_highbd_10_mse16x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_10_mse16x8 vpx_highbd_10_mse16x8_c
 
 unsigned int vpx_highbd_10_mse8x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_10_mse8x16 vpx_highbd_10_mse8x16_c
 
 unsigned int vpx_highbd_10_mse8x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_highbd_10_mse8x8_sse2(const uint8_t* src_ptr,
-                                       int source_stride,
+                                       int src_stride,
                                        const uint8_t* ref_ptr,
-                                       int recon_stride,
+                                       int ref_stride,
                                        unsigned int* sse);
 #define vpx_highbd_10_mse8x8 vpx_highbd_10_mse8x8_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1089,18 +1089,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1109,18 +1109,18 @@
   vpx_highbd_10_sub_pixel_avg_variance16x32_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1130,18 +1130,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1151,18 +1151,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1172,18 +1172,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1192,9 +1192,9 @@
   vpx_highbd_10_sub_pixel_avg_variance32x64_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1203,9 +1203,9 @@
   vpx_highbd_10_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1215,18 +1215,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1236,18 +1236,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1256,18 +1256,18 @@
   vpx_highbd_10_sub_pixel_avg_variance64x64_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1276,18 +1276,18 @@
   vpx_highbd_10_sub_pixel_avg_variance8x16_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1296,18 +1296,18 @@
   vpx_highbd_10_sub_pixel_avg_variance8x4_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1316,16 +1316,16 @@
   vpx_highbd_10_sub_pixel_avg_variance8x8_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance16x16_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1333,16 +1333,16 @@
   vpx_highbd_10_sub_pixel_variance16x16_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance16x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1350,16 +1350,16 @@
   vpx_highbd_10_sub_pixel_variance16x32_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance16x8_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -1367,16 +1367,16 @@
   vpx_highbd_10_sub_pixel_variance16x8_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance32x16_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1384,16 +1384,16 @@
   vpx_highbd_10_sub_pixel_variance32x16_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance32x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1401,16 +1401,16 @@
   vpx_highbd_10_sub_pixel_variance32x32_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance32x64_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1418,9 +1418,9 @@
   vpx_highbd_10_sub_pixel_variance32x64_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1428,9 +1428,9 @@
   vpx_highbd_10_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1438,16 +1438,16 @@
   vpx_highbd_10_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance64x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1455,16 +1455,16 @@
   vpx_highbd_10_sub_pixel_variance64x32_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance64x64_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1472,16 +1472,16 @@
   vpx_highbd_10_sub_pixel_variance64x64_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance8x16_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -1489,16 +1489,16 @@
   vpx_highbd_10_sub_pixel_variance8x16_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance8x4_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -1506,16 +1506,16 @@
   vpx_highbd_10_sub_pixel_variance8x4_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance8x8_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -1523,148 +1523,148 @@
   vpx_highbd_10_sub_pixel_variance8x8_sse2
 
 unsigned int vpx_highbd_10_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance16x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance16x16 vpx_highbd_10_variance16x16_sse2
 
 unsigned int vpx_highbd_10_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance16x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance16x32 vpx_highbd_10_variance16x32_sse2
 
 unsigned int vpx_highbd_10_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_10_variance16x8_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_10_variance16x8 vpx_highbd_10_variance16x8_sse2
 
 unsigned int vpx_highbd_10_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance32x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance32x16 vpx_highbd_10_variance32x16_sse2
 
 unsigned int vpx_highbd_10_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance32x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance32x32 vpx_highbd_10_variance32x32_sse2
 
 unsigned int vpx_highbd_10_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance32x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance32x64 vpx_highbd_10_variance32x64_sse2
 
 unsigned int vpx_highbd_10_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance4x4 vpx_highbd_10_variance4x4_c
 
 unsigned int vpx_highbd_10_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance4x8 vpx_highbd_10_variance4x8_c
 
 unsigned int vpx_highbd_10_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance64x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance64x32 vpx_highbd_10_variance64x32_sse2
 
 unsigned int vpx_highbd_10_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance64x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance64x64 vpx_highbd_10_variance64x64_sse2
 
 unsigned int vpx_highbd_10_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_10_variance8x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_10_variance8x16 vpx_highbd_10_variance8x16_sse2
 
 unsigned int vpx_highbd_10_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance8x4 vpx_highbd_10_variance8x4_c
 
 unsigned int vpx_highbd_10_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 unsigned int vpx_highbd_10_variance8x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 #define vpx_highbd_10_variance8x8 vpx_highbd_10_variance8x8_sse2
 
 void vpx_highbd_12_get16x16var_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse,
@@ -1672,7 +1672,7 @@
 #define vpx_highbd_12_get16x16var vpx_highbd_12_get16x16var_c
 
 void vpx_highbd_12_get8x8var_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse,
@@ -1680,57 +1680,57 @@
 #define vpx_highbd_12_get8x8var vpx_highbd_12_get8x8var_c
 
 unsigned int vpx_highbd_12_mse16x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 unsigned int vpx_highbd_12_mse16x16_sse2(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
-                                         int recon_stride,
+                                         int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_mse16x16 vpx_highbd_12_mse16x16_sse2
 
 unsigned int vpx_highbd_12_mse16x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_12_mse16x8 vpx_highbd_12_mse16x8_c
 
 unsigned int vpx_highbd_12_mse8x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_12_mse8x16 vpx_highbd_12_mse8x16_c
 
 unsigned int vpx_highbd_12_mse8x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_highbd_12_mse8x8_sse2(const uint8_t* src_ptr,
-                                       int source_stride,
+                                       int src_stride,
                                        const uint8_t* ref_ptr,
-                                       int recon_stride,
+                                       int ref_stride,
                                        unsigned int* sse);
 #define vpx_highbd_12_mse8x8 vpx_highbd_12_mse8x8_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1740,18 +1740,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1760,18 +1760,18 @@
   vpx_highbd_12_sub_pixel_avg_variance16x32_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1781,18 +1781,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1802,18 +1802,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1823,18 +1823,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1843,9 +1843,9 @@
   vpx_highbd_12_sub_pixel_avg_variance32x64_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1854,9 +1854,9 @@
   vpx_highbd_12_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1866,18 +1866,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1887,18 +1887,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1907,18 +1907,18 @@
   vpx_highbd_12_sub_pixel_avg_variance64x64_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1927,18 +1927,18 @@
   vpx_highbd_12_sub_pixel_avg_variance8x16_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1947,18 +1947,18 @@
   vpx_highbd_12_sub_pixel_avg_variance8x4_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1967,16 +1967,16 @@
   vpx_highbd_12_sub_pixel_avg_variance8x8_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance16x16_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1984,16 +1984,16 @@
   vpx_highbd_12_sub_pixel_variance16x16_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance16x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2001,16 +2001,16 @@
   vpx_highbd_12_sub_pixel_variance16x32_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance16x8_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2018,16 +2018,16 @@
   vpx_highbd_12_sub_pixel_variance16x8_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance32x16_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2035,16 +2035,16 @@
   vpx_highbd_12_sub_pixel_variance32x16_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance32x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2052,16 +2052,16 @@
   vpx_highbd_12_sub_pixel_variance32x32_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance32x64_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2069,9 +2069,9 @@
   vpx_highbd_12_sub_pixel_variance32x64_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -2079,9 +2079,9 @@
   vpx_highbd_12_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -2089,16 +2089,16 @@
   vpx_highbd_12_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance64x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2106,16 +2106,16 @@
   vpx_highbd_12_sub_pixel_variance64x32_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance64x64_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2123,16 +2123,16 @@
   vpx_highbd_12_sub_pixel_variance64x64_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance8x16_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2140,16 +2140,16 @@
   vpx_highbd_12_sub_pixel_variance8x16_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance8x4_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -2157,16 +2157,16 @@
   vpx_highbd_12_sub_pixel_variance8x4_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance8x8_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -2174,148 +2174,148 @@
   vpx_highbd_12_sub_pixel_variance8x8_sse2
 
 unsigned int vpx_highbd_12_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance16x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance16x16 vpx_highbd_12_variance16x16_sse2
 
 unsigned int vpx_highbd_12_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance16x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance16x32 vpx_highbd_12_variance16x32_sse2
 
 unsigned int vpx_highbd_12_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_12_variance16x8_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_12_variance16x8 vpx_highbd_12_variance16x8_sse2
 
 unsigned int vpx_highbd_12_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance32x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance32x16 vpx_highbd_12_variance32x16_sse2
 
 unsigned int vpx_highbd_12_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance32x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance32x32 vpx_highbd_12_variance32x32_sse2
 
 unsigned int vpx_highbd_12_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance32x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance32x64 vpx_highbd_12_variance32x64_sse2
 
 unsigned int vpx_highbd_12_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance4x4 vpx_highbd_12_variance4x4_c
 
 unsigned int vpx_highbd_12_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance4x8 vpx_highbd_12_variance4x8_c
 
 unsigned int vpx_highbd_12_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance64x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance64x32 vpx_highbd_12_variance64x32_sse2
 
 unsigned int vpx_highbd_12_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance64x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance64x64 vpx_highbd_12_variance64x64_sse2
 
 unsigned int vpx_highbd_12_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_12_variance8x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_12_variance8x16 vpx_highbd_12_variance8x16_sse2
 
 unsigned int vpx_highbd_12_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance8x4 vpx_highbd_12_variance8x4_c
 
 unsigned int vpx_highbd_12_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 unsigned int vpx_highbd_12_variance8x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 #define vpx_highbd_12_variance8x8 vpx_highbd_12_variance8x8_sse2
 
 void vpx_highbd_8_get16x16var_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse,
@@ -2323,7 +2323,7 @@
 #define vpx_highbd_8_get16x16var vpx_highbd_8_get16x16var_c
 
 void vpx_highbd_8_get8x8var_c(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
                               int ref_stride,
                               unsigned int* sse,
@@ -2331,56 +2331,56 @@
 #define vpx_highbd_8_get8x8var vpx_highbd_8_get8x8var_c
 
 unsigned int vpx_highbd_8_mse16x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 unsigned int vpx_highbd_8_mse16x16_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
-                                        int recon_stride,
+                                        int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_mse16x16 vpx_highbd_8_mse16x16_sse2
 
 unsigned int vpx_highbd_8_mse16x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_8_mse16x8 vpx_highbd_8_mse16x8_c
 
 unsigned int vpx_highbd_8_mse8x16_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_8_mse8x16 vpx_highbd_8_mse8x16_c
 
 unsigned int vpx_highbd_8_mse8x8_c(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
-                                   int recon_stride,
+                                   int ref_stride,
                                    unsigned int* sse);
 unsigned int vpx_highbd_8_mse8x8_sse2(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 #define vpx_highbd_8_mse8x8 vpx_highbd_8_mse8x8_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2389,18 +2389,18 @@
   vpx_highbd_8_sub_pixel_avg_variance16x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2409,18 +2409,18 @@
   vpx_highbd_8_sub_pixel_avg_variance16x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2429,18 +2429,18 @@
   vpx_highbd_8_sub_pixel_avg_variance16x8_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2449,18 +2449,18 @@
   vpx_highbd_8_sub_pixel_avg_variance32x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2469,18 +2469,18 @@
   vpx_highbd_8_sub_pixel_avg_variance32x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2489,9 +2489,9 @@
   vpx_highbd_8_sub_pixel_avg_variance32x64_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -2500,9 +2500,9 @@
   vpx_highbd_8_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -2511,18 +2511,18 @@
   vpx_highbd_8_sub_pixel_avg_variance4x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2531,18 +2531,18 @@
   vpx_highbd_8_sub_pixel_avg_variance64x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2551,18 +2551,18 @@
   vpx_highbd_8_sub_pixel_avg_variance64x64_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2571,18 +2571,18 @@
   vpx_highbd_8_sub_pixel_avg_variance8x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
                                                   const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2591,18 +2591,18 @@
   vpx_highbd_8_sub_pixel_avg_variance8x4_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
                                                   const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2611,16 +2611,16 @@
   vpx_highbd_8_sub_pixel_avg_variance8x8_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance16x16_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2628,16 +2628,16 @@
   vpx_highbd_8_sub_pixel_variance16x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance16x32_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2645,16 +2645,16 @@
   vpx_highbd_8_sub_pixel_variance16x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance16x8_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -2662,16 +2662,16 @@
   vpx_highbd_8_sub_pixel_variance16x8_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance32x16_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2679,16 +2679,16 @@
   vpx_highbd_8_sub_pixel_variance32x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance32x32_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2696,16 +2696,16 @@
   vpx_highbd_8_sub_pixel_variance32x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance32x64_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2713,34 +2713,34 @@
   vpx_highbd_8_sub_pixel_variance32x64_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance4x4 vpx_highbd_8_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance4x8 vpx_highbd_8_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance64x32_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2748,16 +2748,16 @@
   vpx_highbd_8_sub_pixel_variance64x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance64x64_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2765,16 +2765,16 @@
   vpx_highbd_8_sub_pixel_variance64x64_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance8x16_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -2782,16 +2782,16 @@
   vpx_highbd_8_sub_pixel_variance8x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance8x4_sse2(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -2799,16 +2799,16 @@
   vpx_highbd_8_sub_pixel_variance8x4_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance8x8_sse2(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -2816,152 +2816,152 @@
   vpx_highbd_8_sub_pixel_variance8x8_sse2
 
 unsigned int vpx_highbd_8_variance16x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance16x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance16x16 vpx_highbd_8_variance16x16_sse2
 
 unsigned int vpx_highbd_8_variance16x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance16x32_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance16x32 vpx_highbd_8_variance16x32_sse2
 
 unsigned int vpx_highbd_8_variance16x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 unsigned int vpx_highbd_8_variance16x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 #define vpx_highbd_8_variance16x8 vpx_highbd_8_variance16x8_sse2
 
 unsigned int vpx_highbd_8_variance32x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance32x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance32x16 vpx_highbd_8_variance32x16_sse2
 
 unsigned int vpx_highbd_8_variance32x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance32x32_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance32x32 vpx_highbd_8_variance32x32_sse2
 
 unsigned int vpx_highbd_8_variance32x64_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance32x64_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance32x64 vpx_highbd_8_variance32x64_sse2
 
 unsigned int vpx_highbd_8_variance4x4_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance4x4 vpx_highbd_8_variance4x4_c
 
 unsigned int vpx_highbd_8_variance4x8_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance4x8 vpx_highbd_8_variance4x8_c
 
 unsigned int vpx_highbd_8_variance64x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance64x32_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance64x32 vpx_highbd_8_variance64x32_sse2
 
 unsigned int vpx_highbd_8_variance64x64_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance64x64_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance64x64 vpx_highbd_8_variance64x64_sse2
 
 unsigned int vpx_highbd_8_variance8x16_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 unsigned int vpx_highbd_8_variance8x16_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 #define vpx_highbd_8_variance8x16 vpx_highbd_8_variance8x16_sse2
 
 unsigned int vpx_highbd_8_variance8x4_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance8x4 vpx_highbd_8_variance8x4_c
 
 unsigned int vpx_highbd_8_variance8x8_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 unsigned int vpx_highbd_8_variance8x8_sse2(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_8_variance8x8 vpx_highbd_8_variance8x8_sse2
 
-unsigned int vpx_highbd_avg_4x4_c(const uint8_t*, int p);
-unsigned int vpx_highbd_avg_4x4_sse2(const uint8_t*, int p);
+unsigned int vpx_highbd_avg_4x4_c(const uint8_t* s8, int p);
+unsigned int vpx_highbd_avg_4x4_sse2(const uint8_t* s8, int p);
 #define vpx_highbd_avg_4x4 vpx_highbd_avg_4x4_sse2
 
-unsigned int vpx_highbd_avg_8x8_c(const uint8_t*, int p);
-unsigned int vpx_highbd_avg_8x8_sse2(const uint8_t*, int p);
+unsigned int vpx_highbd_avg_8x8_c(const uint8_t* s8, int p);
+unsigned int vpx_highbd_avg_8x8_sse2(const uint8_t* s8, int p);
 #define vpx_highbd_avg_8x8 vpx_highbd_avg_8x8_sse2
 
 void vpx_highbd_comp_avg_pred_c(uint16_t* comp_pred,
@@ -2983,7 +2983,7 @@
                             int y_step_q4,
                             int w,
                             int h,
-                            int bps);
+                            int bd);
 void vpx_highbd_convolve8_avx2(const uint16_t* src,
                                ptrdiff_t src_stride,
                                uint16_t* dst,
@@ -2995,7 +2995,7 @@
                                int y_step_q4,
                                int w,
                                int h,
-                               int bps);
+                               int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8)(const uint16_t* src,
                                          ptrdiff_t src_stride,
                                          uint16_t* dst,
@@ -3007,7 +3007,7 @@
                                          int y_step_q4,
                                          int w,
                                          int h,
-                                         int bps);
+                                         int bd);
 
 void vpx_highbd_convolve8_avg_c(const uint16_t* src,
                                 ptrdiff_t src_stride,
@@ -3020,7 +3020,7 @@
                                 int y_step_q4,
                                 int w,
                                 int h,
-                                int bps);
+                                int bd);
 void vpx_highbd_convolve8_avg_avx2(const uint16_t* src,
                                    ptrdiff_t src_stride,
                                    uint16_t* dst,
@@ -3032,7 +3032,7 @@
                                    int y_step_q4,
                                    int w,
                                    int h,
-                                   int bps);
+                                   int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_avg)(const uint16_t* src,
                                              ptrdiff_t src_stride,
                                              uint16_t* dst,
@@ -3044,7 +3044,7 @@
                                              int y_step_q4,
                                              int w,
                                              int h,
-                                             int bps);
+                                             int bd);
 
 void vpx_highbd_convolve8_avg_horiz_c(const uint16_t* src,
                                       ptrdiff_t src_stride,
@@ -3057,7 +3057,7 @@
                                       int y_step_q4,
                                       int w,
                                       int h,
-                                      int bps);
+                                      int bd);
 void vpx_highbd_convolve8_avg_horiz_avx2(const uint16_t* src,
                                          ptrdiff_t src_stride,
                                          uint16_t* dst,
@@ -3069,7 +3069,7 @@
                                          int y_step_q4,
                                          int w,
                                          int h,
-                                         int bps);
+                                         int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_avg_horiz)(const uint16_t* src,
                                                    ptrdiff_t src_stride,
                                                    uint16_t* dst,
@@ -3081,7 +3081,7 @@
                                                    int y_step_q4,
                                                    int w,
                                                    int h,
-                                                   int bps);
+                                                   int bd);
 
 void vpx_highbd_convolve8_avg_vert_c(const uint16_t* src,
                                      ptrdiff_t src_stride,
@@ -3094,7 +3094,7 @@
                                      int y_step_q4,
                                      int w,
                                      int h,
-                                     int bps);
+                                     int bd);
 void vpx_highbd_convolve8_avg_vert_avx2(const uint16_t* src,
                                         ptrdiff_t src_stride,
                                         uint16_t* dst,
@@ -3106,7 +3106,7 @@
                                         int y_step_q4,
                                         int w,
                                         int h,
-                                        int bps);
+                                        int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_avg_vert)(const uint16_t* src,
                                                   ptrdiff_t src_stride,
                                                   uint16_t* dst,
@@ -3118,7 +3118,7 @@
                                                   int y_step_q4,
                                                   int w,
                                                   int h,
-                                                  int bps);
+                                                  int bd);
 
 void vpx_highbd_convolve8_horiz_c(const uint16_t* src,
                                   ptrdiff_t src_stride,
@@ -3131,7 +3131,7 @@
                                   int y_step_q4,
                                   int w,
                                   int h,
-                                  int bps);
+                                  int bd);
 void vpx_highbd_convolve8_horiz_avx2(const uint16_t* src,
                                      ptrdiff_t src_stride,
                                      uint16_t* dst,
@@ -3143,7 +3143,7 @@
                                      int y_step_q4,
                                      int w,
                                      int h,
-                                     int bps);
+                                     int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_horiz)(const uint16_t* src,
                                                ptrdiff_t src_stride,
                                                uint16_t* dst,
@@ -3155,7 +3155,7 @@
                                                int y_step_q4,
                                                int w,
                                                int h,
-                                               int bps);
+                                               int bd);
 
 void vpx_highbd_convolve8_vert_c(const uint16_t* src,
                                  ptrdiff_t src_stride,
@@ -3168,7 +3168,7 @@
                                  int y_step_q4,
                                  int w,
                                  int h,
-                                 int bps);
+                                 int bd);
 void vpx_highbd_convolve8_vert_avx2(const uint16_t* src,
                                     ptrdiff_t src_stride,
                                     uint16_t* dst,
@@ -3180,7 +3180,7 @@
                                     int y_step_q4,
                                     int w,
                                     int h,
-                                    int bps);
+                                    int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_vert)(const uint16_t* src,
                                               ptrdiff_t src_stride,
                                               uint16_t* dst,
@@ -3192,7 +3192,7 @@
                                               int y_step_q4,
                                               int w,
                                               int h,
-                                              int bps);
+                                              int bd);
 
 void vpx_highbd_convolve_avg_c(const uint16_t* src,
                                ptrdiff_t src_stride,
@@ -3205,7 +3205,7 @@
                                int y_step_q4,
                                int w,
                                int h,
-                               int bps);
+                               int bd);
 void vpx_highbd_convolve_avg_sse2(const uint16_t* src,
                                   ptrdiff_t src_stride,
                                   uint16_t* dst,
@@ -3217,7 +3217,7 @@
                                   int y_step_q4,
                                   int w,
                                   int h,
-                                  int bps);
+                                  int bd);
 void vpx_highbd_convolve_avg_avx2(const uint16_t* src,
                                   ptrdiff_t src_stride,
                                   uint16_t* dst,
@@ -3229,7 +3229,7 @@
                                   int y_step_q4,
                                   int w,
                                   int h,
-                                  int bps);
+                                  int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve_avg)(const uint16_t* src,
                                             ptrdiff_t src_stride,
                                             uint16_t* dst,
@@ -3241,7 +3241,7 @@
                                             int y_step_q4,
                                             int w,
                                             int h,
-                                            int bps);
+                                            int bd);
 
 void vpx_highbd_convolve_copy_c(const uint16_t* src,
                                 ptrdiff_t src_stride,
@@ -3254,7 +3254,7 @@
                                 int y_step_q4,
                                 int w,
                                 int h,
-                                int bps);
+                                int bd);
 void vpx_highbd_convolve_copy_sse2(const uint16_t* src,
                                    ptrdiff_t src_stride,
                                    uint16_t* dst,
@@ -3266,7 +3266,7 @@
                                    int y_step_q4,
                                    int w,
                                    int h,
-                                   int bps);
+                                   int bd);
 void vpx_highbd_convolve_copy_avx2(const uint16_t* src,
                                    ptrdiff_t src_stride,
                                    uint16_t* dst,
@@ -3278,7 +3278,7 @@
                                    int y_step_q4,
                                    int w,
                                    int h,
-                                   int bps);
+                                   int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve_copy)(const uint16_t* src,
                                              ptrdiff_t src_stride,
                                              uint16_t* dst,
@@ -3290,427 +3290,427 @@
                                              int y_step_q4,
                                              int w,
                                              int h,
-                                             int bps);
+                                             int bd);
 
 void vpx_highbd_d117_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d117_predictor_16x16_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d117_predictor_16x16)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d117_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d117_predictor_32x32_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d117_predictor_32x32)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d117_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d117_predictor_4x4_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d117_predictor_4x4 vpx_highbd_d117_predictor_4x4_sse2
 
 void vpx_highbd_d117_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d117_predictor_8x8_ssse3(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 RTCD_EXTERN void (*vpx_highbd_d117_predictor_8x8)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
+                                                  ptrdiff_t stride,
                                                   const uint16_t* above,
                                                   const uint16_t* left,
                                                   int bd);
 
 void vpx_highbd_d135_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d135_predictor_16x16_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d135_predictor_16x16)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d135_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d135_predictor_32x32_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d135_predictor_32x32)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d135_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d135_predictor_4x4_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d135_predictor_4x4 vpx_highbd_d135_predictor_4x4_sse2
 
 void vpx_highbd_d135_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d135_predictor_8x8_ssse3(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 RTCD_EXTERN void (*vpx_highbd_d135_predictor_8x8)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
+                                                  ptrdiff_t stride,
                                                   const uint16_t* above,
                                                   const uint16_t* left,
                                                   int bd);
 
 void vpx_highbd_d153_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d153_predictor_16x16_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d153_predictor_16x16)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d153_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d153_predictor_32x32_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d153_predictor_32x32)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d153_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d153_predictor_4x4_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d153_predictor_4x4 vpx_highbd_d153_predictor_4x4_sse2
 
 void vpx_highbd_d153_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d153_predictor_8x8_ssse3(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 RTCD_EXTERN void (*vpx_highbd_d153_predictor_8x8)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
+                                                  ptrdiff_t stride,
                                                   const uint16_t* above,
                                                   const uint16_t* left,
                                                   int bd);
 
 void vpx_highbd_d207_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d207_predictor_16x16_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d207_predictor_16x16)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d207_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d207_predictor_32x32_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d207_predictor_32x32)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d207_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d207_predictor_4x4_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d207_predictor_4x4 vpx_highbd_d207_predictor_4x4_sse2
 
 void vpx_highbd_d207_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d207_predictor_8x8_ssse3(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 RTCD_EXTERN void (*vpx_highbd_d207_predictor_8x8)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
+                                                  ptrdiff_t stride,
                                                   const uint16_t* above,
                                                   const uint16_t* left,
                                                   int bd);
 
 void vpx_highbd_d45_predictor_16x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d45_predictor_16x16_ssse3(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 RTCD_EXTERN void (*vpx_highbd_d45_predictor_16x16)(uint16_t* dst,
-                                                   ptrdiff_t y_stride,
+                                                   ptrdiff_t stride,
                                                    const uint16_t* above,
                                                    const uint16_t* left,
                                                    int bd);
 
 void vpx_highbd_d45_predictor_32x32_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d45_predictor_32x32_ssse3(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 RTCD_EXTERN void (*vpx_highbd_d45_predictor_32x32)(uint16_t* dst,
-                                                   ptrdiff_t y_stride,
+                                                   ptrdiff_t stride,
                                                    const uint16_t* above,
                                                    const uint16_t* left,
                                                    int bd);
 
 void vpx_highbd_d45_predictor_4x4_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d45_predictor_4x4_ssse3(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 RTCD_EXTERN void (*vpx_highbd_d45_predictor_4x4)(uint16_t* dst,
-                                                 ptrdiff_t y_stride,
+                                                 ptrdiff_t stride,
                                                  const uint16_t* above,
                                                  const uint16_t* left,
                                                  int bd);
 
 void vpx_highbd_d45_predictor_8x8_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d45_predictor_8x8_ssse3(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 RTCD_EXTERN void (*vpx_highbd_d45_predictor_8x8)(uint16_t* dst,
-                                                 ptrdiff_t y_stride,
+                                                 ptrdiff_t stride,
                                                  const uint16_t* above,
                                                  const uint16_t* left,
                                                  int bd);
 
 void vpx_highbd_d63_predictor_16x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d63_predictor_16x16_ssse3(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 RTCD_EXTERN void (*vpx_highbd_d63_predictor_16x16)(uint16_t* dst,
-                                                   ptrdiff_t y_stride,
+                                                   ptrdiff_t stride,
                                                    const uint16_t* above,
                                                    const uint16_t* left,
                                                    int bd);
 
 void vpx_highbd_d63_predictor_32x32_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d63_predictor_32x32_ssse3(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 RTCD_EXTERN void (*vpx_highbd_d63_predictor_32x32)(uint16_t* dst,
-                                                   ptrdiff_t y_stride,
+                                                   ptrdiff_t stride,
                                                    const uint16_t* above,
                                                    const uint16_t* left,
                                                    int bd);
 
 void vpx_highbd_d63_predictor_4x4_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d63_predictor_4x4_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d63_predictor_4x4 vpx_highbd_d63_predictor_4x4_sse2
 
 void vpx_highbd_d63_predictor_8x8_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d63_predictor_8x8_ssse3(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 RTCD_EXTERN void (*vpx_highbd_d63_predictor_8x8)(uint16_t* dst,
-                                                 ptrdiff_t y_stride,
+                                                 ptrdiff_t stride,
                                                  const uint16_t* above,
                                                  const uint16_t* left,
                                                  int bd);
 
 void vpx_highbd_dc_128_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_128_predictor_16x16_sse2(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_128_predictor_16x16 vpx_highbd_dc_128_predictor_16x16_sse2
 
 void vpx_highbd_dc_128_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_128_predictor_32x32_sse2(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_128_predictor_32x32 vpx_highbd_dc_128_predictor_32x32_sse2
 
 void vpx_highbd_dc_128_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_128_predictor_4x4_sse2(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_128_predictor_4x4 vpx_highbd_dc_128_predictor_4x4_sse2
 
 void vpx_highbd_dc_128_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_128_predictor_8x8_sse2(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_128_predictor_8x8 vpx_highbd_dc_128_predictor_8x8_sse2
 
 void vpx_highbd_dc_left_predictor_16x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 void vpx_highbd_dc_left_predictor_16x16_sse2(uint16_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint16_t* above,
                                              const uint16_t* left,
                                              int bd);
@@ -3718,12 +3718,12 @@
   vpx_highbd_dc_left_predictor_16x16_sse2
 
 void vpx_highbd_dc_left_predictor_32x32_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 void vpx_highbd_dc_left_predictor_32x32_sse2(uint16_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint16_t* above,
                                              const uint16_t* left,
                                              int bd);
@@ -3731,120 +3731,120 @@
   vpx_highbd_dc_left_predictor_32x32_sse2
 
 void vpx_highbd_dc_left_predictor_4x4_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 void vpx_highbd_dc_left_predictor_4x4_sse2(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 #define vpx_highbd_dc_left_predictor_4x4 vpx_highbd_dc_left_predictor_4x4_sse2
 
 void vpx_highbd_dc_left_predictor_8x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 void vpx_highbd_dc_left_predictor_8x8_sse2(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 #define vpx_highbd_dc_left_predictor_8x8 vpx_highbd_dc_left_predictor_8x8_sse2
 
 void vpx_highbd_dc_predictor_16x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_dc_predictor_16x16_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_dc_predictor_16x16 vpx_highbd_dc_predictor_16x16_sse2
 
 void vpx_highbd_dc_predictor_32x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_dc_predictor_32x32_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_dc_predictor_32x32 vpx_highbd_dc_predictor_32x32_sse2
 
 void vpx_highbd_dc_predictor_4x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_dc_predictor_4x4_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_dc_predictor_4x4 vpx_highbd_dc_predictor_4x4_sse2
 
 void vpx_highbd_dc_predictor_8x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_dc_predictor_8x8_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_dc_predictor_8x8 vpx_highbd_dc_predictor_8x8_sse2
 
 void vpx_highbd_dc_top_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_top_predictor_16x16_sse2(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_top_predictor_16x16 vpx_highbd_dc_top_predictor_16x16_sse2
 
 void vpx_highbd_dc_top_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_top_predictor_32x32_sse2(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_top_predictor_32x32 vpx_highbd_dc_top_predictor_32x32_sse2
 
 void vpx_highbd_dc_top_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_top_predictor_4x4_sse2(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_top_predictor_4x4 vpx_highbd_dc_top_predictor_4x4_sse2
 
 void vpx_highbd_dc_top_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_top_predictor_8x8_sse2(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
@@ -3902,53 +3902,68 @@
 #define vpx_highbd_fdct8x8_1 vpx_highbd_fdct8x8_1_c
 
 void vpx_highbd_h_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_h_predictor_16x16_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_h_predictor_16x16 vpx_highbd_h_predictor_16x16_sse2
 
 void vpx_highbd_h_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_h_predictor_32x32_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_h_predictor_32x32 vpx_highbd_h_predictor_32x32_sse2
 
 void vpx_highbd_h_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_h_predictor_4x4_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_h_predictor_4x4 vpx_highbd_h_predictor_4x4_sse2
 
 void vpx_highbd_h_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_h_predictor_8x8_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_h_predictor_8x8 vpx_highbd_h_predictor_8x8_sse2
 
+void vpx_highbd_hadamard_16x16_c(const int16_t* src_diff,
+                                 ptrdiff_t src_stride,
+                                 tran_low_t* coeff);
+#define vpx_highbd_hadamard_16x16 vpx_highbd_hadamard_16x16_c
+
+void vpx_highbd_hadamard_32x32_c(const int16_t* src_diff,
+                                 ptrdiff_t src_stride,
+                                 tran_low_t* coeff);
+#define vpx_highbd_hadamard_32x32 vpx_highbd_hadamard_32x32_c
+
+void vpx_highbd_hadamard_8x8_c(const int16_t* src_diff,
+                               ptrdiff_t src_stride,
+                               tran_low_t* coeff);
+#define vpx_highbd_hadamard_8x8 vpx_highbd_hadamard_8x8_c
+
 void vpx_highbd_idct16x16_10_add_c(const tran_low_t* input,
                                    uint16_t* dest,
                                    int stride,
@@ -4346,9 +4361,9 @@
                                          int bd);
 #define vpx_highbd_lpf_vertical_8_dual vpx_highbd_lpf_vertical_8_dual_sse2
 
-void vpx_highbd_minmax_8x8_c(const uint8_t* s,
+void vpx_highbd_minmax_8x8_c(const uint8_t* s8,
                              int p,
-                             const uint8_t* d,
+                             const uint8_t* d8,
                              int dp,
                              int* min,
                              int* max);
@@ -4434,12 +4449,12 @@
 
 void vpx_highbd_sad16x16x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad16x16x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad16x16x4d vpx_highbd_sad16x16x4d_sse2
@@ -4468,12 +4483,12 @@
 
 void vpx_highbd_sad16x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad16x32x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad16x32x4d vpx_highbd_sad16x32x4d_sse2
@@ -4502,12 +4517,12 @@
 
 void vpx_highbd_sad16x8x4d_c(const uint8_t* src_ptr,
                              int src_stride,
-                             const uint8_t* const ref_ptr[],
+                             const uint8_t* const ref_array[],
                              int ref_stride,
                              uint32_t* sad_array);
 void vpx_highbd_sad16x8x4d_sse2(const uint8_t* src_ptr,
                                 int src_stride,
-                                const uint8_t* const ref_ptr[],
+                                const uint8_t* const ref_array[],
                                 int ref_stride,
                                 uint32_t* sad_array);
 #define vpx_highbd_sad16x8x4d vpx_highbd_sad16x8x4d_sse2
@@ -4536,12 +4551,12 @@
 
 void vpx_highbd_sad32x16x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad32x16x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad32x16x4d vpx_highbd_sad32x16x4d_sse2
@@ -4570,12 +4585,12 @@
 
 void vpx_highbd_sad32x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad32x32x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad32x32x4d vpx_highbd_sad32x32x4d_sse2
@@ -4604,12 +4619,12 @@
 
 void vpx_highbd_sad32x64x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad32x64x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad32x64x4d vpx_highbd_sad32x64x4d_sse2
@@ -4629,12 +4644,12 @@
 
 void vpx_highbd_sad4x4x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 void vpx_highbd_sad4x4x4d_sse2(const uint8_t* src_ptr,
                                int src_stride,
-                               const uint8_t* const ref_ptr[],
+                               const uint8_t* const ref_array[],
                                int ref_stride,
                                uint32_t* sad_array);
 #define vpx_highbd_sad4x4x4d vpx_highbd_sad4x4x4d_sse2
@@ -4654,12 +4669,12 @@
 
 void vpx_highbd_sad4x8x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 void vpx_highbd_sad4x8x4d_sse2(const uint8_t* src_ptr,
                                int src_stride,
-                               const uint8_t* const ref_ptr[],
+                               const uint8_t* const ref_array[],
                                int ref_stride,
                                uint32_t* sad_array);
 #define vpx_highbd_sad4x8x4d vpx_highbd_sad4x8x4d_sse2
@@ -4688,12 +4703,12 @@
 
 void vpx_highbd_sad64x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad64x32x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad64x32x4d vpx_highbd_sad64x32x4d_sse2
@@ -4722,12 +4737,12 @@
 
 void vpx_highbd_sad64x64x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad64x64x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad64x64x4d vpx_highbd_sad64x64x4d_sse2
@@ -4756,12 +4771,12 @@
 
 void vpx_highbd_sad8x16x4d_c(const uint8_t* src_ptr,
                              int src_stride,
-                             const uint8_t* const ref_ptr[],
+                             const uint8_t* const ref_array[],
                              int ref_stride,
                              uint32_t* sad_array);
 void vpx_highbd_sad8x16x4d_sse2(const uint8_t* src_ptr,
                                 int src_stride,
-                                const uint8_t* const ref_ptr[],
+                                const uint8_t* const ref_array[],
                                 int ref_stride,
                                 uint32_t* sad_array);
 #define vpx_highbd_sad8x16x4d vpx_highbd_sad8x16x4d_sse2
@@ -4790,12 +4805,12 @@
 
 void vpx_highbd_sad8x4x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 void vpx_highbd_sad8x4x4d_sse2(const uint8_t* src_ptr,
                                int src_stride,
-                               const uint8_t* const ref_ptr[],
+                               const uint8_t* const ref_array[],
                                int ref_stride,
                                uint32_t* sad_array);
 #define vpx_highbd_sad8x4x4d vpx_highbd_sad8x4x4d_sse2
@@ -4824,12 +4839,12 @@
 
 void vpx_highbd_sad8x8x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 void vpx_highbd_sad8x8x4d_sse2(const uint8_t* src_ptr,
                                int src_stride,
-                               const uint8_t* const ref_ptr[],
+                               const uint8_t* const ref_array[],
                                int ref_stride,
                                uint32_t* sad_array);
 #define vpx_highbd_sad8x8x4d vpx_highbd_sad8x8x4d_sse2
@@ -4838,104 +4853,104 @@
                                  int cols,
                                  int16_t* diff_ptr,
                                  ptrdiff_t diff_stride,
-                                 const uint8_t* src_ptr,
+                                 const uint8_t* src8_ptr,
                                  ptrdiff_t src_stride,
-                                 const uint8_t* pred_ptr,
+                                 const uint8_t* pred8_ptr,
                                  ptrdiff_t pred_stride,
                                  int bd);
 #define vpx_highbd_subtract_block vpx_highbd_subtract_block_c
 
 void vpx_highbd_tm_predictor_16x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_tm_predictor_16x16_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_tm_predictor_16x16 vpx_highbd_tm_predictor_16x16_sse2
 
 void vpx_highbd_tm_predictor_32x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_tm_predictor_32x32_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_tm_predictor_32x32 vpx_highbd_tm_predictor_32x32_sse2
 
 void vpx_highbd_tm_predictor_4x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_tm_predictor_4x4_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_tm_predictor_4x4 vpx_highbd_tm_predictor_4x4_sse2
 
 void vpx_highbd_tm_predictor_8x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_tm_predictor_8x8_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_tm_predictor_8x8 vpx_highbd_tm_predictor_8x8_sse2
 
 void vpx_highbd_v_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_v_predictor_16x16_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_v_predictor_16x16 vpx_highbd_v_predictor_16x16_sse2
 
 void vpx_highbd_v_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_v_predictor_32x32_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_v_predictor_32x32 vpx_highbd_v_predictor_32x32_sse2
 
 void vpx_highbd_v_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_v_predictor_4x4_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_v_predictor_4x4 vpx_highbd_v_predictor_4x4_sse2
 
 void vpx_highbd_v_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_v_predictor_8x8_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
@@ -5245,12 +5260,12 @@
                                   const uint8_t* thresh1);
 #define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_sse2
 
-void vpx_mbpost_proc_across_ip_c(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_c(unsigned char* src,
                                  int pitch,
                                  int rows,
                                  int cols,
                                  int flimit);
-void vpx_mbpost_proc_across_ip_sse2(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_sse2(unsigned char* src,
                                     int pitch,
                                     int rows,
                                     int cols,
@@ -5284,68 +5299,68 @@
 #define vpx_minmax_8x8 vpx_minmax_8x8_sse2
 
 unsigned int vpx_mse16x16_c(const uint8_t* src_ptr,
-                            int source_stride,
+                            int src_stride,
                             const uint8_t* ref_ptr,
-                            int recon_stride,
+                            int ref_stride,
                             unsigned int* sse);
 unsigned int vpx_mse16x16_sse2(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
-                               int recon_stride,
+                               int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_mse16x16_avx2(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
-                               int recon_stride,
+                               int ref_stride,
                                unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_mse16x16)(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
-                                         int recon_stride,
+                                         int ref_stride,
                                          unsigned int* sse);
 
 unsigned int vpx_mse16x8_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 unsigned int vpx_mse16x8_sse2(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
-                              int recon_stride,
+                              int ref_stride,
                               unsigned int* sse);
 unsigned int vpx_mse16x8_avx2(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
-                              int recon_stride,
+                              int ref_stride,
                               unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_mse16x8)(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
-                                        int recon_stride,
+                                        int ref_stride,
                                         unsigned int* sse);
 
 unsigned int vpx_mse8x16_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 unsigned int vpx_mse8x16_sse2(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
-                              int recon_stride,
+                              int ref_stride,
                               unsigned int* sse);
 #define vpx_mse8x16 vpx_mse8x16_sse2
 
 unsigned int vpx_mse8x8_c(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
-                          int recon_stride,
+                          int ref_stride,
                           unsigned int* sse);
 unsigned int vpx_mse8x8_sse2(const uint8_t* src_ptr,
-                             int source_stride,
+                             int src_stride,
                              const uint8_t* ref_ptr,
-                             int recon_stride,
+                             int ref_stride,
                              unsigned int* sse);
 #define vpx_mse8x8 vpx_mse8x8_sse2
 
@@ -5546,12 +5561,12 @@
 
 void vpx_sad16x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x16x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad16x16x4d vpx_sad16x16x4d_sse2
@@ -5596,12 +5611,12 @@
 
 void vpx_sad16x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x32x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad16x32x4d vpx_sad16x32x4d_sse2
@@ -5651,12 +5666,12 @@
 
 void vpx_sad16x8x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad16x8x4d_sse2(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 #define vpx_sad16x8x4d vpx_sad16x8x4d_sse2
@@ -5717,12 +5732,12 @@
 
 void vpx_sad32x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x16x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x16x4d vpx_sad32x16x4d_sse2
@@ -5767,22 +5782,22 @@
 
 void vpx_sad32x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x32x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 void vpx_sad32x32x4d_avx2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 RTCD_EXTERN void (*vpx_sad32x32x4d)(const uint8_t* src_ptr,
                                     int src_stride,
-                                    const uint8_t* const ref_ptr[],
+                                    const uint8_t* const ref_array[],
                                     int ref_stride,
                                     uint32_t* sad_array);
 
@@ -5826,12 +5841,12 @@
 
 void vpx_sad32x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x64x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x64x4d vpx_sad32x64x4d_sse2
@@ -5876,12 +5891,12 @@
 
 void vpx_sad4x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x4x4d_sse2(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad4x4x4d vpx_sad4x4x4d_sse2
@@ -5926,12 +5941,12 @@
 
 void vpx_sad4x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x8x4d_sse2(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad4x8x4d vpx_sad4x8x4d_sse2
@@ -5976,12 +5991,12 @@
 
 void vpx_sad64x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x32x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad64x32x4d vpx_sad64x32x4d_sse2
@@ -6026,22 +6041,22 @@
 
 void vpx_sad64x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x64x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 void vpx_sad64x64x4d_avx2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 RTCD_EXTERN void (*vpx_sad64x64x4d)(const uint8_t* src_ptr,
                                     int src_stride,
-                                    const uint8_t* const ref_ptr[],
+                                    const uint8_t* const ref_array[],
                                     int ref_stride,
                                     uint32_t* sad_array);
 
@@ -6085,12 +6100,12 @@
 
 void vpx_sad8x16x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad8x16x4d_sse2(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 #define vpx_sad8x16x4d vpx_sad8x16x4d_sse2
@@ -6135,12 +6150,12 @@
 
 void vpx_sad8x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x4x4d_sse2(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad8x4x4d vpx_sad8x4x4d_sse2
@@ -6185,12 +6200,12 @@
 
 void vpx_sad8x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x8x4d_sse2(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad8x8x4d vpx_sad8x8x4d_sse2
@@ -6316,850 +6331,850 @@
 #define vpx_scaled_vert vpx_scaled_vert_c
 
 uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x16_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x16)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x32_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x32)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x8_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x8_ssse3(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x8)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x16_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x16)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x32_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x32_avx2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x32)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x64_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x64)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x4_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x4_ssse3(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x4)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x8_ssse3(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x8)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x32_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x32)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x64_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x64_avx2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x64)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x16_ssse3(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x16)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x4_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x4_ssse3(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x4)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x8_ssse3(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x8)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x16_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x16_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x16)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x32_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x32_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x32)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x8_sse2(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x8_ssse3(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x8)(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x16_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x16_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x16)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x32_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x32_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x32_avx2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x32)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x64_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x64_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x64)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x4_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x4_ssse3(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x4)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x8_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x8_ssse3(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x8)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x32_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x32_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x32)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x64_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x64_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x64_avx2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x64)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x16_sse2(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x16_ssse3(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x16)(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x4_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x4_ssse3(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x4)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x8_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x8_ssse3(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x8)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -7187,315 +7202,315 @@
 #define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_sse2
 
 void vpx_tm_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_16x16_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_sse2
 
 void vpx_tm_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_32x32_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_sse2
 
 void vpx_tm_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_4x4_sse2(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_sse2
 
 void vpx_tm_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_8x8_sse2(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_sse2
 
 void vpx_v_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_16x16_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_v_predictor_16x16 vpx_v_predictor_16x16_sse2
 
 void vpx_v_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_32x32_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_v_predictor_32x32 vpx_v_predictor_32x32_sse2
 
 void vpx_v_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_4x4_sse2(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_v_predictor_4x4 vpx_v_predictor_4x4_sse2
 
 void vpx_v_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_8x8_sse2(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_v_predictor_8x8 vpx_v_predictor_8x8_sse2
 
 unsigned int vpx_variance16x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x16_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance16x16_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance16x16)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance16x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x32_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance16x32_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance16x32)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance16x8_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance16x8_sse2(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 unsigned int vpx_variance16x8_avx2(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance16x8)(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 
 unsigned int vpx_variance32x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x16_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance32x16_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance32x16)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance32x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x32_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance32x32_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance32x32)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance32x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x64_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance32x64_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance32x64)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance4x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x4_sse2(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance4x4 vpx_variance4x4_sse2
 
 unsigned int vpx_variance4x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x8_sse2(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance4x8 vpx_variance4x8_sse2
 
 unsigned int vpx_variance64x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x32_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance64x32_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance64x32)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance64x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x64_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance64x64_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance64x64)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance8x16_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance8x16_sse2(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 #define vpx_variance8x16 vpx_variance8x16_sse2
 
 unsigned int vpx_variance8x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x4_sse2(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance8x4 vpx_variance8x4_sse2
 
 unsigned int vpx_variance8x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x8_sse2(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance8x8 vpx_variance8x8_sse2
 
 void vpx_ve_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c
diff --git a/third_party/libvpx/source/config/linux/mips64el/vp8_rtcd.h b/third_party/libvpx/source/config/linux/mips64el/vp8_rtcd.h
index dc054d6..6e6147d3 100644
--- a/third_party/libvpx/source/config/linux/mips64el/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/linux/mips64el/vp8_rtcd.h
@@ -27,44 +27,44 @@
 extern "C" {
 #endif
 
-void vp8_bilinear_predict16x16_c(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_bilinear_predict16x16_c(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
 #define vp8_bilinear_predict16x16 vp8_bilinear_predict16x16_c
 
-void vp8_bilinear_predict4x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict4x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
 #define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_c
 
-void vp8_bilinear_predict8x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
 #define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_c
 
-void vp8_bilinear_predict8x8_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x8_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
 #define vp8_bilinear_predict8x8 vp8_bilinear_predict8x8_c
 
 void vp8_blend_b_c(unsigned char* y,
                    unsigned char* u,
                    unsigned char* v,
-                   int y1,
-                   int u1,
-                   int v1,
+                   int y_1,
+                   int u_1,
+                   int v_1,
                    int alpha,
                    int stride);
 #define vp8_blend_b vp8_blend_b_c
@@ -72,9 +72,9 @@
 void vp8_blend_mb_inner_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_inner vp8_blend_mb_inner_c
@@ -82,9 +82,9 @@
 void vp8_blend_mb_outer_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_outer vp8_blend_mb_outer_c
@@ -93,27 +93,27 @@
 #define vp8_block_error vp8_block_error_c
 
 void vp8_copy_mem16x16_c(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 #define vp8_copy_mem16x16 vp8_copy_mem16x16_c
 
 void vp8_copy_mem8x4_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 #define vp8_copy_mem8x4 vp8_copy_mem8x4_c
 
 void vp8_copy_mem8x8_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 #define vp8_copy_mem8x8 vp8_copy_mem8x8_c
 
-void vp8_dc_only_idct_add_c(short input,
-                            unsigned char* pred,
+void vp8_dc_only_idct_add_c(short input_dc,
+                            unsigned char* pred_ptr,
                             int pred_stride,
-                            unsigned char* dst,
+                            unsigned char* dst_ptr,
                             int dst_stride);
 #define vp8_dc_only_idct_add vp8_dc_only_idct_add_c
 
@@ -139,7 +139,7 @@
 
 void vp8_dequant_idct_add_c(short* input,
                             short* dq,
-                            unsigned char* output,
+                            unsigned char* dest,
                             int stride);
 #define vp8_dequant_idct_add vp8_dequant_idct_add_c
 
@@ -158,7 +158,7 @@
                                     char* eobs);
 #define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_c
 
-void vp8_dequantize_b_c(struct blockd*, short* dqc);
+void vp8_dequantize_b_c(struct blockd*, short* DQC);
 #define vp8_dequantize_b vp8_dequantize_b_c
 
 int vp8_diamond_search_sad_c(struct macroblock* x,
@@ -209,55 +209,55 @@
                           union int_mv* center_mv);
 #define vp8_full_search_sad vp8_full_search_sad_c
 
-void vp8_loop_filter_bh_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bh_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
 #define vp8_loop_filter_bh vp8_loop_filter_bh_c
 
-void vp8_loop_filter_bv_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bv_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
 #define vp8_loop_filter_bv vp8_loop_filter_bv_c
 
-void vp8_loop_filter_mbh_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbh_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbh vp8_loop_filter_mbh_c
 
-void vp8_loop_filter_mbv_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbv_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbv vp8_loop_filter_mbv_c
 
-void vp8_loop_filter_bhs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bhs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
 #define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_c
 
-void vp8_loop_filter_bvs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bvs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
 #define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_c
 
-void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y,
-                                              int ystride,
+void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y_ptr,
+                                              int y_stride,
                                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbh vp8_loop_filter_simple_horizontal_edge_c
 
-void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y,
-                                            int ystride,
+void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y_ptr,
+                                            int y_stride,
                                             const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbv vp8_loop_filter_simple_vertical_edge_c
 
@@ -271,8 +271,8 @@
                               struct block* b,
                               struct blockd* d,
                               union int_mv* ref_mv,
-                              int sad_per_bit,
-                              int distance,
+                              int error_per_bit,
+                              int search_range,
                               struct variance_vtable* fn_ptr,
                               int* mvcost[2],
                               union int_mv* center_mv);
@@ -288,50 +288,50 @@
 #define vp8_short_fdct8x4 vp8_short_fdct8x4_c
 
 void vp8_short_idct4x4llm_c(short* input,
-                            unsigned char* pred,
-                            int pitch,
-                            unsigned char* dst,
+                            unsigned char* pred_ptr,
+                            int pred_stride,
+                            unsigned char* dst_ptr,
                             int dst_stride);
 #define vp8_short_idct4x4llm vp8_short_idct4x4llm_c
 
-void vp8_short_inv_walsh4x4_c(short* input, short* output);
+void vp8_short_inv_walsh4x4_c(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_c
 
-void vp8_short_inv_walsh4x4_1_c(short* input, short* output);
+void vp8_short_inv_walsh4x4_1_c(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c
 
 void vp8_short_walsh4x4_c(short* input, short* output, int pitch);
 #define vp8_short_walsh4x4 vp8_short_walsh4x4_c
 
-void vp8_sixtap_predict16x16_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_sixtap_predict16x16_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
 #define vp8_sixtap_predict16x16 vp8_sixtap_predict16x16_c
 
-void vp8_sixtap_predict4x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict4x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
 #define vp8_sixtap_predict4x4 vp8_sixtap_predict4x4_c
 
-void vp8_sixtap_predict8x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
 #define vp8_sixtap_predict8x4 vp8_sixtap_predict8x4_c
 
-void vp8_sixtap_predict8x8_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x8_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
 #define vp8_sixtap_predict8x8 vp8_sixtap_predict8x8_c
 
diff --git a/third_party/libvpx/source/config/linux/mips64el/vp9_rtcd.h b/third_party/libvpx/source/config/linux/mips64el/vp9_rtcd.h
index 1eb9db5..d187b0a 100644
--- a/third_party/libvpx/source/config/linux/mips64el/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/linux/mips64el/vp9_rtcd.h
@@ -115,8 +115,8 @@
 #define vp9_fwht4x4 vp9_fwht4x4_c
 
 void vp9_iht16x16_256_add_c(const tran_low_t* input,
-                            uint8_t* output,
-                            int pitch,
+                            uint8_t* dest,
+                            int stride,
                             int tx_type);
 #define vp9_iht16x16_256_add vp9_iht16x16_256_add_c
 
diff --git a/third_party/libvpx/source/config/linux/mips64el/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/linux/mips64el/vpx_dsp_rtcd.h
index 8703d05..b406c88 100644
--- a/third_party/libvpx/source/config/linux/mips64el/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/linux/mips64el/vpx_dsp_rtcd.h
@@ -139,253 +139,253 @@
 #define vpx_convolve_copy vpx_convolve_copy_c
 
 void vpx_d117_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c
 
 void vpx_d117_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c
 
 void vpx_d117_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c
 
 void vpx_d117_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c
 
 void vpx_d135_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_c
 
 void vpx_d135_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_c
 
 void vpx_d135_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_c
 
 void vpx_d135_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_c
 
 void vpx_d153_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d153_predictor_16x16 vpx_d153_predictor_16x16_c
 
 void vpx_d153_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d153_predictor_32x32 vpx_d153_predictor_32x32_c
 
 void vpx_d153_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d153_predictor_4x4 vpx_d153_predictor_4x4_c
 
 void vpx_d153_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d153_predictor_8x8 vpx_d153_predictor_8x8_c
 
 void vpx_d207_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d207_predictor_16x16 vpx_d207_predictor_16x16_c
 
 void vpx_d207_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d207_predictor_32x32 vpx_d207_predictor_32x32_c
 
 void vpx_d207_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_c
 
 void vpx_d207_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d207_predictor_8x8 vpx_d207_predictor_8x8_c
 
 void vpx_d45_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d45_predictor_16x16 vpx_d45_predictor_16x16_c
 
 void vpx_d45_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d45_predictor_32x32 vpx_d45_predictor_32x32_c
 
 void vpx_d45_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_c
 
 void vpx_d45_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_c
 
 void vpx_d45e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c
 
 void vpx_d63_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d63_predictor_16x16 vpx_d63_predictor_16x16_c
 
 void vpx_d63_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d63_predictor_32x32 vpx_d63_predictor_32x32_c
 
 void vpx_d63_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d63_predictor_4x4 vpx_d63_predictor_4x4_c
 
 void vpx_d63_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d63_predictor_8x8 vpx_d63_predictor_8x8_c
 
 void vpx_d63e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c
 
 void vpx_dc_128_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_c
 
 void vpx_dc_128_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_c
 
 void vpx_dc_128_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_c
 
 void vpx_dc_128_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_c
 
 void vpx_dc_left_predictor_16x16_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_c
 
 void vpx_dc_left_predictor_32x32_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_c
 
 void vpx_dc_left_predictor_4x4_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_c
 
 void vpx_dc_left_predictor_8x8_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_c
 
 void vpx_dc_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_c
 
 void vpx_dc_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_c
 
 void vpx_dc_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_c
 
 void vpx_dc_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_c
 
 void vpx_dc_top_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_c
 
 void vpx_dc_top_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_c
 
 void vpx_dc_top_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_c
 
 void vpx_dc_top_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_c
@@ -418,7 +418,7 @@
 #define vpx_fdct8x8_1 vpx_fdct8x8_1_c
 
 void vpx_get16x16var_c(const uint8_t* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        const uint8_t* ref_ptr,
                        int ref_stride,
                        unsigned int* sse,
@@ -426,13 +426,13 @@
 #define vpx_get16x16var vpx_get16x16var_c
 
 unsigned int vpx_get4x4sse_cs_c(const unsigned char* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const unsigned char* ref_ptr,
                                 int ref_stride);
 #define vpx_get4x4sse_cs vpx_get4x4sse_cs_c
 
 void vpx_get8x8var_c(const uint8_t* src_ptr,
-                     int source_stride,
+                     int src_stride,
                      const uint8_t* ref_ptr,
                      int ref_stride,
                      unsigned int* sse,
@@ -443,25 +443,25 @@
 #define vpx_get_mb_ss vpx_get_mb_ss_c
 
 void vpx_h_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_h_predictor_16x16 vpx_h_predictor_16x16_c
 
 void vpx_h_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_h_predictor_32x32 vpx_h_predictor_32x32_c
 
 void vpx_h_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 #define vpx_h_predictor_4x4 vpx_h_predictor_4x4_c
 
 void vpx_h_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 #define vpx_h_predictor_8x8 vpx_h_predictor_8x8_c
@@ -482,7 +482,7 @@
 #define vpx_hadamard_8x8 vpx_hadamard_8x8_c
 
 void vpx_he_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c
@@ -643,7 +643,7 @@
                                const uint8_t* thresh1);
 #define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_c
 
-void vpx_mbpost_proc_across_ip_c(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_c(unsigned char* src,
                                  int pitch,
                                  int rows,
                                  int cols,
@@ -666,30 +666,30 @@
 #define vpx_minmax_8x8 vpx_minmax_8x8_c
 
 unsigned int vpx_mse16x16_c(const uint8_t* src_ptr,
-                            int source_stride,
+                            int src_stride,
                             const uint8_t* ref_ptr,
-                            int recon_stride,
+                            int ref_stride,
                             unsigned int* sse);
 #define vpx_mse16x16 vpx_mse16x16_c
 
 unsigned int vpx_mse16x8_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 #define vpx_mse16x8 vpx_mse16x8_c
 
 unsigned int vpx_mse8x16_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 #define vpx_mse8x16 vpx_mse8x16_c
 
 unsigned int vpx_mse8x8_c(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
-                          int recon_stride,
+                          int ref_stride,
                           unsigned int* sse);
 #define vpx_mse8x8 vpx_mse8x8_c
 
@@ -764,7 +764,7 @@
 
 void vpx_sad16x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad16x16x4d vpx_sad16x16x4d_c
@@ -791,7 +791,7 @@
 
 void vpx_sad16x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad16x32x4d vpx_sad16x32x4d_c
@@ -818,7 +818,7 @@
 
 void vpx_sad16x8x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 #define vpx_sad16x8x4d vpx_sad16x8x4d_c
@@ -845,7 +845,7 @@
 
 void vpx_sad32x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad32x16x4d vpx_sad32x16x4d_c
@@ -865,7 +865,7 @@
 
 void vpx_sad32x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad32x32x4d vpx_sad32x32x4d_c
@@ -885,7 +885,7 @@
 
 void vpx_sad32x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad32x64x4d vpx_sad32x64x4d_c
@@ -912,7 +912,7 @@
 
 void vpx_sad4x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 #define vpx_sad4x4x4d vpx_sad4x4x4d_c
@@ -939,7 +939,7 @@
 
 void vpx_sad4x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 #define vpx_sad4x8x4d vpx_sad4x8x4d_c
@@ -959,7 +959,7 @@
 
 void vpx_sad64x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad64x32x4d vpx_sad64x32x4d_c
@@ -979,7 +979,7 @@
 
 void vpx_sad64x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad64x64x4d vpx_sad64x64x4d_c
@@ -1006,7 +1006,7 @@
 
 void vpx_sad8x16x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 #define vpx_sad8x16x4d vpx_sad8x16x4d_c
@@ -1033,7 +1033,7 @@
 
 void vpx_sad8x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 #define vpx_sad8x4x4d vpx_sad8x4x4d_c
@@ -1060,7 +1060,7 @@
 
 void vpx_sad8x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 #define vpx_sad8x8x4d vpx_sad8x8x4d_c
@@ -1154,9 +1154,9 @@
 #define vpx_scaled_vert vpx_scaled_vert_c
 
 uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -1164,9 +1164,9 @@
 #define vpx_sub_pixel_avg_variance16x16 vpx_sub_pixel_avg_variance16x16_c
 
 uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -1174,9 +1174,9 @@
 #define vpx_sub_pixel_avg_variance16x32 vpx_sub_pixel_avg_variance16x32_c
 
 uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
@@ -1184,9 +1184,9 @@
 #define vpx_sub_pixel_avg_variance16x8 vpx_sub_pixel_avg_variance16x8_c
 
 uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -1194,9 +1194,9 @@
 #define vpx_sub_pixel_avg_variance32x16 vpx_sub_pixel_avg_variance32x16_c
 
 uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -1204,9 +1204,9 @@
 #define vpx_sub_pixel_avg_variance32x32 vpx_sub_pixel_avg_variance32x32_c
 
 uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -1214,9 +1214,9 @@
 #define vpx_sub_pixel_avg_variance32x64 vpx_sub_pixel_avg_variance32x64_c
 
 uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
@@ -1224,9 +1224,9 @@
 #define vpx_sub_pixel_avg_variance4x4 vpx_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
@@ -1234,9 +1234,9 @@
 #define vpx_sub_pixel_avg_variance4x8 vpx_sub_pixel_avg_variance4x8_c
 
 uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -1244,9 +1244,9 @@
 #define vpx_sub_pixel_avg_variance64x32 vpx_sub_pixel_avg_variance64x32_c
 
 uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -1254,9 +1254,9 @@
 #define vpx_sub_pixel_avg_variance64x64 vpx_sub_pixel_avg_variance64x64_c
 
 uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
@@ -1264,9 +1264,9 @@
 #define vpx_sub_pixel_avg_variance8x16 vpx_sub_pixel_avg_variance8x16_c
 
 uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
@@ -1274,9 +1274,9 @@
 #define vpx_sub_pixel_avg_variance8x4 vpx_sub_pixel_avg_variance8x4_c
 
 uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
@@ -1284,117 +1284,117 @@
 #define vpx_sub_pixel_avg_variance8x8 vpx_sub_pixel_avg_variance8x8_c
 
 uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance16x16 vpx_sub_pixel_variance16x16_c
 
 uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance16x32 vpx_sub_pixel_variance16x32_c
 
 uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 #define vpx_sub_pixel_variance16x8 vpx_sub_pixel_variance16x8_c
 
 uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance32x16 vpx_sub_pixel_variance32x16_c
 
 uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance32x32 vpx_sub_pixel_variance32x32_c
 
 uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance32x64 vpx_sub_pixel_variance32x64_c
 
 uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 #define vpx_sub_pixel_variance4x4 vpx_sub_pixel_variance4x4_c
 
 uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 #define vpx_sub_pixel_variance4x8 vpx_sub_pixel_variance4x8_c
 
 uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance64x32 vpx_sub_pixel_variance64x32_c
 
 uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance64x64 vpx_sub_pixel_variance64x64_c
 
 uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 #define vpx_sub_pixel_variance8x16 vpx_sub_pixel_variance8x16_c
 
 uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 #define vpx_sub_pixel_variance8x4 vpx_sub_pixel_variance8x4_c
 
 uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
@@ -1414,146 +1414,146 @@
 #define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_c
 
 void vpx_tm_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_c
 
 void vpx_tm_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_c
 
 void vpx_tm_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_c
 
 void vpx_tm_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_c
 
 void vpx_v_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_v_predictor_16x16 vpx_v_predictor_16x16_c
 
 void vpx_v_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_v_predictor_32x32 vpx_v_predictor_32x32_c
 
 void vpx_v_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 #define vpx_v_predictor_4x4 vpx_v_predictor_4x4_c
 
 void vpx_v_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 #define vpx_v_predictor_8x8 vpx_v_predictor_8x8_c
 
 unsigned int vpx_variance16x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance16x16 vpx_variance16x16_c
 
 unsigned int vpx_variance16x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance16x32 vpx_variance16x32_c
 
 unsigned int vpx_variance16x8_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 #define vpx_variance16x8 vpx_variance16x8_c
 
 unsigned int vpx_variance32x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance32x16 vpx_variance32x16_c
 
 unsigned int vpx_variance32x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance32x32 vpx_variance32x32_c
 
 unsigned int vpx_variance32x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance32x64 vpx_variance32x64_c
 
 unsigned int vpx_variance4x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 #define vpx_variance4x4 vpx_variance4x4_c
 
 unsigned int vpx_variance4x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 #define vpx_variance4x8 vpx_variance4x8_c
 
 unsigned int vpx_variance64x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance64x32 vpx_variance64x32_c
 
 unsigned int vpx_variance64x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance64x64 vpx_variance64x64_c
 
 unsigned int vpx_variance8x16_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 #define vpx_variance8x16 vpx_variance8x16_c
 
 unsigned int vpx_variance8x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 #define vpx_variance8x4 vpx_variance8x4_c
 
 unsigned int vpx_variance8x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 #define vpx_variance8x8 vpx_variance8x8_c
 
 void vpx_ve_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c
diff --git a/third_party/libvpx/source/config/linux/mipsel/vp8_rtcd.h b/third_party/libvpx/source/config/linux/mipsel/vp8_rtcd.h
index dc054d6..6e6147d3 100644
--- a/third_party/libvpx/source/config/linux/mipsel/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/linux/mipsel/vp8_rtcd.h
@@ -27,44 +27,44 @@
 extern "C" {
 #endif
 
-void vp8_bilinear_predict16x16_c(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_bilinear_predict16x16_c(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
 #define vp8_bilinear_predict16x16 vp8_bilinear_predict16x16_c
 
-void vp8_bilinear_predict4x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict4x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
 #define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_c
 
-void vp8_bilinear_predict8x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
 #define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_c
 
-void vp8_bilinear_predict8x8_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x8_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
 #define vp8_bilinear_predict8x8 vp8_bilinear_predict8x8_c
 
 void vp8_blend_b_c(unsigned char* y,
                    unsigned char* u,
                    unsigned char* v,
-                   int y1,
-                   int u1,
-                   int v1,
+                   int y_1,
+                   int u_1,
+                   int v_1,
                    int alpha,
                    int stride);
 #define vp8_blend_b vp8_blend_b_c
@@ -72,9 +72,9 @@
 void vp8_blend_mb_inner_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_inner vp8_blend_mb_inner_c
@@ -82,9 +82,9 @@
 void vp8_blend_mb_outer_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_outer vp8_blend_mb_outer_c
@@ -93,27 +93,27 @@
 #define vp8_block_error vp8_block_error_c
 
 void vp8_copy_mem16x16_c(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 #define vp8_copy_mem16x16 vp8_copy_mem16x16_c
 
 void vp8_copy_mem8x4_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 #define vp8_copy_mem8x4 vp8_copy_mem8x4_c
 
 void vp8_copy_mem8x8_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 #define vp8_copy_mem8x8 vp8_copy_mem8x8_c
 
-void vp8_dc_only_idct_add_c(short input,
-                            unsigned char* pred,
+void vp8_dc_only_idct_add_c(short input_dc,
+                            unsigned char* pred_ptr,
                             int pred_stride,
-                            unsigned char* dst,
+                            unsigned char* dst_ptr,
                             int dst_stride);
 #define vp8_dc_only_idct_add vp8_dc_only_idct_add_c
 
@@ -139,7 +139,7 @@
 
 void vp8_dequant_idct_add_c(short* input,
                             short* dq,
-                            unsigned char* output,
+                            unsigned char* dest,
                             int stride);
 #define vp8_dequant_idct_add vp8_dequant_idct_add_c
 
@@ -158,7 +158,7 @@
                                     char* eobs);
 #define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_c
 
-void vp8_dequantize_b_c(struct blockd*, short* dqc);
+void vp8_dequantize_b_c(struct blockd*, short* DQC);
 #define vp8_dequantize_b vp8_dequantize_b_c
 
 int vp8_diamond_search_sad_c(struct macroblock* x,
@@ -209,55 +209,55 @@
                           union int_mv* center_mv);
 #define vp8_full_search_sad vp8_full_search_sad_c
 
-void vp8_loop_filter_bh_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bh_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
 #define vp8_loop_filter_bh vp8_loop_filter_bh_c
 
-void vp8_loop_filter_bv_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bv_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
 #define vp8_loop_filter_bv vp8_loop_filter_bv_c
 
-void vp8_loop_filter_mbh_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbh_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbh vp8_loop_filter_mbh_c
 
-void vp8_loop_filter_mbv_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbv_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbv vp8_loop_filter_mbv_c
 
-void vp8_loop_filter_bhs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bhs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
 #define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_c
 
-void vp8_loop_filter_bvs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bvs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
 #define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_c
 
-void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y,
-                                              int ystride,
+void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y_ptr,
+                                              int y_stride,
                                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbh vp8_loop_filter_simple_horizontal_edge_c
 
-void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y,
-                                            int ystride,
+void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y_ptr,
+                                            int y_stride,
                                             const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbv vp8_loop_filter_simple_vertical_edge_c
 
@@ -271,8 +271,8 @@
                               struct block* b,
                               struct blockd* d,
                               union int_mv* ref_mv,
-                              int sad_per_bit,
-                              int distance,
+                              int error_per_bit,
+                              int search_range,
                               struct variance_vtable* fn_ptr,
                               int* mvcost[2],
                               union int_mv* center_mv);
@@ -288,50 +288,50 @@
 #define vp8_short_fdct8x4 vp8_short_fdct8x4_c
 
 void vp8_short_idct4x4llm_c(short* input,
-                            unsigned char* pred,
-                            int pitch,
-                            unsigned char* dst,
+                            unsigned char* pred_ptr,
+                            int pred_stride,
+                            unsigned char* dst_ptr,
                             int dst_stride);
 #define vp8_short_idct4x4llm vp8_short_idct4x4llm_c
 
-void vp8_short_inv_walsh4x4_c(short* input, short* output);
+void vp8_short_inv_walsh4x4_c(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_c
 
-void vp8_short_inv_walsh4x4_1_c(short* input, short* output);
+void vp8_short_inv_walsh4x4_1_c(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c
 
 void vp8_short_walsh4x4_c(short* input, short* output, int pitch);
 #define vp8_short_walsh4x4 vp8_short_walsh4x4_c
 
-void vp8_sixtap_predict16x16_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_sixtap_predict16x16_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
 #define vp8_sixtap_predict16x16 vp8_sixtap_predict16x16_c
 
-void vp8_sixtap_predict4x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict4x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
 #define vp8_sixtap_predict4x4 vp8_sixtap_predict4x4_c
 
-void vp8_sixtap_predict8x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
 #define vp8_sixtap_predict8x4 vp8_sixtap_predict8x4_c
 
-void vp8_sixtap_predict8x8_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x8_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
 #define vp8_sixtap_predict8x8 vp8_sixtap_predict8x8_c
 
diff --git a/third_party/libvpx/source/config/linux/mipsel/vp9_rtcd.h b/third_party/libvpx/source/config/linux/mipsel/vp9_rtcd.h
index 1eb9db5..d187b0a 100644
--- a/third_party/libvpx/source/config/linux/mipsel/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/linux/mipsel/vp9_rtcd.h
@@ -115,8 +115,8 @@
 #define vp9_fwht4x4 vp9_fwht4x4_c
 
 void vp9_iht16x16_256_add_c(const tran_low_t* input,
-                            uint8_t* output,
-                            int pitch,
+                            uint8_t* dest,
+                            int stride,
                             int tx_type);
 #define vp9_iht16x16_256_add vp9_iht16x16_256_add_c
 
diff --git a/third_party/libvpx/source/config/linux/mipsel/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/linux/mipsel/vpx_dsp_rtcd.h
index 8703d05..b406c88 100644
--- a/third_party/libvpx/source/config/linux/mipsel/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/linux/mipsel/vpx_dsp_rtcd.h
@@ -139,253 +139,253 @@
 #define vpx_convolve_copy vpx_convolve_copy_c
 
 void vpx_d117_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c
 
 void vpx_d117_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c
 
 void vpx_d117_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c
 
 void vpx_d117_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c
 
 void vpx_d135_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_c
 
 void vpx_d135_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_c
 
 void vpx_d135_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_c
 
 void vpx_d135_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_c
 
 void vpx_d153_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d153_predictor_16x16 vpx_d153_predictor_16x16_c
 
 void vpx_d153_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d153_predictor_32x32 vpx_d153_predictor_32x32_c
 
 void vpx_d153_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d153_predictor_4x4 vpx_d153_predictor_4x4_c
 
 void vpx_d153_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d153_predictor_8x8 vpx_d153_predictor_8x8_c
 
 void vpx_d207_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d207_predictor_16x16 vpx_d207_predictor_16x16_c
 
 void vpx_d207_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d207_predictor_32x32 vpx_d207_predictor_32x32_c
 
 void vpx_d207_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_c
 
 void vpx_d207_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d207_predictor_8x8 vpx_d207_predictor_8x8_c
 
 void vpx_d45_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d45_predictor_16x16 vpx_d45_predictor_16x16_c
 
 void vpx_d45_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d45_predictor_32x32 vpx_d45_predictor_32x32_c
 
 void vpx_d45_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_c
 
 void vpx_d45_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_c
 
 void vpx_d45e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c
 
 void vpx_d63_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d63_predictor_16x16 vpx_d63_predictor_16x16_c
 
 void vpx_d63_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d63_predictor_32x32 vpx_d63_predictor_32x32_c
 
 void vpx_d63_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d63_predictor_4x4 vpx_d63_predictor_4x4_c
 
 void vpx_d63_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d63_predictor_8x8 vpx_d63_predictor_8x8_c
 
 void vpx_d63e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c
 
 void vpx_dc_128_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_c
 
 void vpx_dc_128_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_c
 
 void vpx_dc_128_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_c
 
 void vpx_dc_128_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_c
 
 void vpx_dc_left_predictor_16x16_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_c
 
 void vpx_dc_left_predictor_32x32_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_c
 
 void vpx_dc_left_predictor_4x4_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_c
 
 void vpx_dc_left_predictor_8x8_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_c
 
 void vpx_dc_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_c
 
 void vpx_dc_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_c
 
 void vpx_dc_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_c
 
 void vpx_dc_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_c
 
 void vpx_dc_top_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_c
 
 void vpx_dc_top_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_c
 
 void vpx_dc_top_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_c
 
 void vpx_dc_top_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_c
@@ -418,7 +418,7 @@
 #define vpx_fdct8x8_1 vpx_fdct8x8_1_c
 
 void vpx_get16x16var_c(const uint8_t* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        const uint8_t* ref_ptr,
                        int ref_stride,
                        unsigned int* sse,
@@ -426,13 +426,13 @@
 #define vpx_get16x16var vpx_get16x16var_c
 
 unsigned int vpx_get4x4sse_cs_c(const unsigned char* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const unsigned char* ref_ptr,
                                 int ref_stride);
 #define vpx_get4x4sse_cs vpx_get4x4sse_cs_c
 
 void vpx_get8x8var_c(const uint8_t* src_ptr,
-                     int source_stride,
+                     int src_stride,
                      const uint8_t* ref_ptr,
                      int ref_stride,
                      unsigned int* sse,
@@ -443,25 +443,25 @@
 #define vpx_get_mb_ss vpx_get_mb_ss_c
 
 void vpx_h_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_h_predictor_16x16 vpx_h_predictor_16x16_c
 
 void vpx_h_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_h_predictor_32x32 vpx_h_predictor_32x32_c
 
 void vpx_h_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 #define vpx_h_predictor_4x4 vpx_h_predictor_4x4_c
 
 void vpx_h_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 #define vpx_h_predictor_8x8 vpx_h_predictor_8x8_c
@@ -482,7 +482,7 @@
 #define vpx_hadamard_8x8 vpx_hadamard_8x8_c
 
 void vpx_he_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c
@@ -643,7 +643,7 @@
                                const uint8_t* thresh1);
 #define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_c
 
-void vpx_mbpost_proc_across_ip_c(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_c(unsigned char* src,
                                  int pitch,
                                  int rows,
                                  int cols,
@@ -666,30 +666,30 @@
 #define vpx_minmax_8x8 vpx_minmax_8x8_c
 
 unsigned int vpx_mse16x16_c(const uint8_t* src_ptr,
-                            int source_stride,
+                            int src_stride,
                             const uint8_t* ref_ptr,
-                            int recon_stride,
+                            int ref_stride,
                             unsigned int* sse);
 #define vpx_mse16x16 vpx_mse16x16_c
 
 unsigned int vpx_mse16x8_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 #define vpx_mse16x8 vpx_mse16x8_c
 
 unsigned int vpx_mse8x16_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 #define vpx_mse8x16 vpx_mse8x16_c
 
 unsigned int vpx_mse8x8_c(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
-                          int recon_stride,
+                          int ref_stride,
                           unsigned int* sse);
 #define vpx_mse8x8 vpx_mse8x8_c
 
@@ -764,7 +764,7 @@
 
 void vpx_sad16x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad16x16x4d vpx_sad16x16x4d_c
@@ -791,7 +791,7 @@
 
 void vpx_sad16x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad16x32x4d vpx_sad16x32x4d_c
@@ -818,7 +818,7 @@
 
 void vpx_sad16x8x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 #define vpx_sad16x8x4d vpx_sad16x8x4d_c
@@ -845,7 +845,7 @@
 
 void vpx_sad32x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad32x16x4d vpx_sad32x16x4d_c
@@ -865,7 +865,7 @@
 
 void vpx_sad32x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad32x32x4d vpx_sad32x32x4d_c
@@ -885,7 +885,7 @@
 
 void vpx_sad32x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad32x64x4d vpx_sad32x64x4d_c
@@ -912,7 +912,7 @@
 
 void vpx_sad4x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 #define vpx_sad4x4x4d vpx_sad4x4x4d_c
@@ -939,7 +939,7 @@
 
 void vpx_sad4x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 #define vpx_sad4x8x4d vpx_sad4x8x4d_c
@@ -959,7 +959,7 @@
 
 void vpx_sad64x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad64x32x4d vpx_sad64x32x4d_c
@@ -979,7 +979,7 @@
 
 void vpx_sad64x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad64x64x4d vpx_sad64x64x4d_c
@@ -1006,7 +1006,7 @@
 
 void vpx_sad8x16x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 #define vpx_sad8x16x4d vpx_sad8x16x4d_c
@@ -1033,7 +1033,7 @@
 
 void vpx_sad8x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 #define vpx_sad8x4x4d vpx_sad8x4x4d_c
@@ -1060,7 +1060,7 @@
 
 void vpx_sad8x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 #define vpx_sad8x8x4d vpx_sad8x8x4d_c
@@ -1154,9 +1154,9 @@
 #define vpx_scaled_vert vpx_scaled_vert_c
 
 uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -1164,9 +1164,9 @@
 #define vpx_sub_pixel_avg_variance16x16 vpx_sub_pixel_avg_variance16x16_c
 
 uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -1174,9 +1174,9 @@
 #define vpx_sub_pixel_avg_variance16x32 vpx_sub_pixel_avg_variance16x32_c
 
 uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
@@ -1184,9 +1184,9 @@
 #define vpx_sub_pixel_avg_variance16x8 vpx_sub_pixel_avg_variance16x8_c
 
 uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -1194,9 +1194,9 @@
 #define vpx_sub_pixel_avg_variance32x16 vpx_sub_pixel_avg_variance32x16_c
 
 uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -1204,9 +1204,9 @@
 #define vpx_sub_pixel_avg_variance32x32 vpx_sub_pixel_avg_variance32x32_c
 
 uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -1214,9 +1214,9 @@
 #define vpx_sub_pixel_avg_variance32x64 vpx_sub_pixel_avg_variance32x64_c
 
 uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
@@ -1224,9 +1224,9 @@
 #define vpx_sub_pixel_avg_variance4x4 vpx_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
@@ -1234,9 +1234,9 @@
 #define vpx_sub_pixel_avg_variance4x8 vpx_sub_pixel_avg_variance4x8_c
 
 uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -1244,9 +1244,9 @@
 #define vpx_sub_pixel_avg_variance64x32 vpx_sub_pixel_avg_variance64x32_c
 
 uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -1254,9 +1254,9 @@
 #define vpx_sub_pixel_avg_variance64x64 vpx_sub_pixel_avg_variance64x64_c
 
 uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
@@ -1264,9 +1264,9 @@
 #define vpx_sub_pixel_avg_variance8x16 vpx_sub_pixel_avg_variance8x16_c
 
 uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
@@ -1274,9 +1274,9 @@
 #define vpx_sub_pixel_avg_variance8x4 vpx_sub_pixel_avg_variance8x4_c
 
 uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
@@ -1284,117 +1284,117 @@
 #define vpx_sub_pixel_avg_variance8x8 vpx_sub_pixel_avg_variance8x8_c
 
 uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance16x16 vpx_sub_pixel_variance16x16_c
 
 uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance16x32 vpx_sub_pixel_variance16x32_c
 
 uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 #define vpx_sub_pixel_variance16x8 vpx_sub_pixel_variance16x8_c
 
 uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance32x16 vpx_sub_pixel_variance32x16_c
 
 uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance32x32 vpx_sub_pixel_variance32x32_c
 
 uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance32x64 vpx_sub_pixel_variance32x64_c
 
 uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 #define vpx_sub_pixel_variance4x4 vpx_sub_pixel_variance4x4_c
 
 uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 #define vpx_sub_pixel_variance4x8 vpx_sub_pixel_variance4x8_c
 
 uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance64x32 vpx_sub_pixel_variance64x32_c
 
 uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance64x64 vpx_sub_pixel_variance64x64_c
 
 uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 #define vpx_sub_pixel_variance8x16 vpx_sub_pixel_variance8x16_c
 
 uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 #define vpx_sub_pixel_variance8x4 vpx_sub_pixel_variance8x4_c
 
 uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
@@ -1414,146 +1414,146 @@
 #define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_c
 
 void vpx_tm_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_c
 
 void vpx_tm_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_c
 
 void vpx_tm_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_c
 
 void vpx_tm_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_c
 
 void vpx_v_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_v_predictor_16x16 vpx_v_predictor_16x16_c
 
 void vpx_v_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_v_predictor_32x32 vpx_v_predictor_32x32_c
 
 void vpx_v_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 #define vpx_v_predictor_4x4 vpx_v_predictor_4x4_c
 
 void vpx_v_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 #define vpx_v_predictor_8x8 vpx_v_predictor_8x8_c
 
 unsigned int vpx_variance16x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance16x16 vpx_variance16x16_c
 
 unsigned int vpx_variance16x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance16x32 vpx_variance16x32_c
 
 unsigned int vpx_variance16x8_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 #define vpx_variance16x8 vpx_variance16x8_c
 
 unsigned int vpx_variance32x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance32x16 vpx_variance32x16_c
 
 unsigned int vpx_variance32x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance32x32 vpx_variance32x32_c
 
 unsigned int vpx_variance32x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance32x64 vpx_variance32x64_c
 
 unsigned int vpx_variance4x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 #define vpx_variance4x4 vpx_variance4x4_c
 
 unsigned int vpx_variance4x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 #define vpx_variance4x8 vpx_variance4x8_c
 
 unsigned int vpx_variance64x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance64x32 vpx_variance64x32_c
 
 unsigned int vpx_variance64x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance64x64 vpx_variance64x64_c
 
 unsigned int vpx_variance8x16_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 #define vpx_variance8x16 vpx_variance8x16_c
 
 unsigned int vpx_variance8x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 #define vpx_variance8x4 vpx_variance8x4_c
 
 unsigned int vpx_variance8x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 #define vpx_variance8x8 vpx_variance8x8_c
 
 void vpx_ve_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c
diff --git a/third_party/libvpx/source/config/linux/x64/vp8_rtcd.h b/third_party/libvpx/source/config/linux/x64/vp8_rtcd.h
index 850ca91..c46bfe5 100644
--- a/third_party/libvpx/source/config/linux/x64/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/linux/x64/vp8_rtcd.h
@@ -27,90 +27,90 @@
 extern "C" {
 #endif
 
-void vp8_bilinear_predict16x16_c(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_bilinear_predict16x16_c(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-void vp8_bilinear_predict16x16_sse2(unsigned char* src,
-                                    int src_pitch,
-                                    int xofst,
-                                    int yofst,
-                                    unsigned char* dst,
+void vp8_bilinear_predict16x16_sse2(unsigned char* src_ptr,
+                                    int src_pixels_per_line,
+                                    int xoffset,
+                                    int yoffset,
+                                    unsigned char* dst_ptr,
                                     int dst_pitch);
-void vp8_bilinear_predict16x16_ssse3(unsigned char* src,
-                                     int src_pitch,
-                                     int xofst,
-                                     int yofst,
-                                     unsigned char* dst,
+void vp8_bilinear_predict16x16_ssse3(unsigned char* src_ptr,
+                                     int src_pixels_per_line,
+                                     int xoffset,
+                                     int yoffset,
+                                     unsigned char* dst_ptr,
                                      int dst_pitch);
-RTCD_EXTERN void (*vp8_bilinear_predict16x16)(unsigned char* src,
-                                              int src_pitch,
-                                              int xofst,
-                                              int yofst,
-                                              unsigned char* dst,
+RTCD_EXTERN void (*vp8_bilinear_predict16x16)(unsigned char* src_ptr,
+                                              int src_pixels_per_line,
+                                              int xoffset,
+                                              int yoffset,
+                                              unsigned char* dst_ptr,
                                               int dst_pitch);
 
-void vp8_bilinear_predict4x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict4x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict4x4_sse2(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict4x4_sse2(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_sse2
 
-void vp8_bilinear_predict8x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x4_sse2(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x4_sse2(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_sse2
 
-void vp8_bilinear_predict8x8_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x8_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x8_sse2(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x8_sse2(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
-void vp8_bilinear_predict8x8_ssse3(unsigned char* src,
-                                   int src_pitch,
-                                   int xofst,
-                                   int yofst,
-                                   unsigned char* dst,
+void vp8_bilinear_predict8x8_ssse3(unsigned char* src_ptr,
+                                   int src_pixels_per_line,
+                                   int xoffset,
+                                   int yoffset,
+                                   unsigned char* dst_ptr,
                                    int dst_pitch);
-RTCD_EXTERN void (*vp8_bilinear_predict8x8)(unsigned char* src,
-                                            int src_pitch,
-                                            int xofst,
-                                            int yofst,
-                                            unsigned char* dst,
+RTCD_EXTERN void (*vp8_bilinear_predict8x8)(unsigned char* src_ptr,
+                                            int src_pixels_per_line,
+                                            int xoffset,
+                                            int yoffset,
+                                            unsigned char* dst_ptr,
                                             int dst_pitch);
 
 void vp8_blend_b_c(unsigned char* y,
                    unsigned char* u,
                    unsigned char* v,
-                   int y1,
-                   int u1,
-                   int v1,
+                   int y_1,
+                   int u_1,
+                   int v_1,
                    int alpha,
                    int stride);
 #define vp8_blend_b vp8_blend_b_c
@@ -118,9 +118,9 @@
 void vp8_blend_mb_inner_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_inner vp8_blend_mb_inner_c
@@ -128,9 +128,9 @@
 void vp8_blend_mb_outer_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_outer vp8_blend_mb_outer_c
@@ -140,65 +140,65 @@
 #define vp8_block_error vp8_block_error_sse2
 
 void vp8_copy32xn_c(const unsigned char* src_ptr,
-                    int source_stride,
+                    int src_stride,
                     unsigned char* dst_ptr,
                     int dst_stride,
-                    int n);
+                    int height);
 void vp8_copy32xn_sse2(const unsigned char* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        unsigned char* dst_ptr,
                        int dst_stride,
-                       int n);
+                       int height);
 void vp8_copy32xn_sse3(const unsigned char* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        unsigned char* dst_ptr,
                        int dst_stride,
-                       int n);
+                       int height);
 RTCD_EXTERN void (*vp8_copy32xn)(const unsigned char* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  unsigned char* dst_ptr,
                                  int dst_stride,
-                                 int n);
+                                 int height);
 
 void vp8_copy_mem16x16_c(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 void vp8_copy_mem16x16_sse2(unsigned char* src,
-                            int src_pitch,
+                            int src_stride,
                             unsigned char* dst,
-                            int dst_pitch);
+                            int dst_stride);
 #define vp8_copy_mem16x16 vp8_copy_mem16x16_sse2
 
 void vp8_copy_mem8x4_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 void vp8_copy_mem8x4_mmx(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 #define vp8_copy_mem8x4 vp8_copy_mem8x4_mmx
 
 void vp8_copy_mem8x8_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 void vp8_copy_mem8x8_mmx(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 #define vp8_copy_mem8x8 vp8_copy_mem8x8_mmx
 
-void vp8_dc_only_idct_add_c(short input,
-                            unsigned char* pred,
+void vp8_dc_only_idct_add_c(short input_dc,
+                            unsigned char* pred_ptr,
                             int pred_stride,
-                            unsigned char* dst,
+                            unsigned char* dst_ptr,
                             int dst_stride);
-void vp8_dc_only_idct_add_mmx(short input,
-                              unsigned char* pred,
+void vp8_dc_only_idct_add_mmx(short input_dc,
+                              unsigned char* pred_ptr,
                               int pred_stride,
-                              unsigned char* dst,
+                              unsigned char* dst_ptr,
                               int dst_stride);
 #define vp8_dc_only_idct_add vp8_dc_only_idct_add_mmx
 
@@ -240,11 +240,11 @@
 
 void vp8_dequant_idct_add_c(short* input,
                             short* dq,
-                            unsigned char* output,
+                            unsigned char* dest,
                             int stride);
 void vp8_dequant_idct_add_mmx(short* input,
                               short* dq,
-                              unsigned char* output,
+                              unsigned char* dest,
                               int stride);
 #define vp8_dequant_idct_add vp8_dequant_idct_add_mmx
 
@@ -274,8 +274,8 @@
                                        char* eobs);
 #define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_sse2
 
-void vp8_dequantize_b_c(struct blockd*, short* dqc);
-void vp8_dequantize_b_mmx(struct blockd*, short* dqc);
+void vp8_dequantize_b_c(struct blockd*, short* DQC);
+void vp8_dequantize_b_mmx(struct blockd*, short* DQC);
 #define vp8_dequantize_b vp8_dequantize_b_mmx
 
 int vp8_diamond_search_sad_c(struct macroblock* x,
@@ -375,91 +375,91 @@
                                        int* mvcost[2],
                                        union int_mv* center_mv);
 
-void vp8_loop_filter_bh_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bh_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bh_sse2(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bh_sse2(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
 #define vp8_loop_filter_bh vp8_loop_filter_bh_sse2
 
-void vp8_loop_filter_bv_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bv_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bv_sse2(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bv_sse2(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
 #define vp8_loop_filter_bv vp8_loop_filter_bv_sse2
 
-void vp8_loop_filter_mbh_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbh_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbh_sse2(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbh_sse2(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbh vp8_loop_filter_mbh_sse2
 
-void vp8_loop_filter_mbv_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbv_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbv_sse2(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbv_sse2(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbv vp8_loop_filter_mbv_sse2
 
-void vp8_loop_filter_bhs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bhs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bhs_sse2(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bhs_sse2(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_sse2
 
-void vp8_loop_filter_bvs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bvs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bvs_sse2(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bvs_sse2(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_sse2
 
-void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y,
-                                              int ystride,
+void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y_ptr,
+                                              int y_stride,
                                               const unsigned char* blimit);
-void vp8_loop_filter_simple_horizontal_edge_sse2(unsigned char* y,
-                                                 int ystride,
+void vp8_loop_filter_simple_horizontal_edge_sse2(unsigned char* y_ptr,
+                                                 int y_stride,
                                                  const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbh vp8_loop_filter_simple_horizontal_edge_sse2
 
-void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y,
-                                            int ystride,
+void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y_ptr,
+                                            int y_stride,
                                             const unsigned char* blimit);
-void vp8_loop_filter_simple_vertical_edge_sse2(unsigned char* y,
-                                               int ystride,
+void vp8_loop_filter_simple_vertical_edge_sse2(unsigned char* y_ptr,
+                                               int y_stride,
                                                const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbv vp8_loop_filter_simple_vertical_edge_sse2
 
@@ -475,8 +475,8 @@
                               struct block* b,
                               struct blockd* d,
                               union int_mv* ref_mv,
-                              int sad_per_bit,
-                              int distance,
+                              int error_per_bit,
+                              int search_range,
                               struct variance_vtable* fn_ptr,
                               int* mvcost[2],
                               union int_mv* center_mv);
@@ -484,8 +484,8 @@
                               struct block* b,
                               struct blockd* d,
                               union int_mv* ref_mv,
-                              int sad_per_bit,
-                              int distance,
+                              int error_per_bit,
+                              int search_range,
                               struct variance_vtable* fn_ptr,
                               int* mvcost[2],
                               union int_mv* center_mv);
@@ -505,126 +505,126 @@
 #define vp8_short_fdct8x4 vp8_short_fdct8x4_sse2
 
 void vp8_short_idct4x4llm_c(short* input,
-                            unsigned char* pred,
-                            int pitch,
-                            unsigned char* dst,
+                            unsigned char* pred_ptr,
+                            int pred_stride,
+                            unsigned char* dst_ptr,
                             int dst_stride);
 void vp8_short_idct4x4llm_mmx(short* input,
-                              unsigned char* pred,
-                              int pitch,
-                              unsigned char* dst,
+                              unsigned char* pred_ptr,
+                              int pred_stride,
+                              unsigned char* dst_ptr,
                               int dst_stride);
 #define vp8_short_idct4x4llm vp8_short_idct4x4llm_mmx
 
-void vp8_short_inv_walsh4x4_c(short* input, short* output);
-void vp8_short_inv_walsh4x4_sse2(short* input, short* output);
+void vp8_short_inv_walsh4x4_c(short* input, short* mb_dqcoeff);
+void vp8_short_inv_walsh4x4_sse2(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_sse2
 
-void vp8_short_inv_walsh4x4_1_c(short* input, short* output);
+void vp8_short_inv_walsh4x4_1_c(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c
 
 void vp8_short_walsh4x4_c(short* input, short* output, int pitch);
 void vp8_short_walsh4x4_sse2(short* input, short* output, int pitch);
 #define vp8_short_walsh4x4 vp8_short_walsh4x4_sse2
 
-void vp8_sixtap_predict16x16_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_sixtap_predict16x16_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_sixtap_predict16x16_sse2(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_sixtap_predict16x16_sse2(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
-void vp8_sixtap_predict16x16_ssse3(unsigned char* src,
-                                   int src_pitch,
-                                   int xofst,
-                                   int yofst,
-                                   unsigned char* dst,
+void vp8_sixtap_predict16x16_ssse3(unsigned char* src_ptr,
+                                   int src_pixels_per_line,
+                                   int xoffset,
+                                   int yoffset,
+                                   unsigned char* dst_ptr,
                                    int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict16x16)(unsigned char* src,
-                                            int src_pitch,
-                                            int xofst,
-                                            int yofst,
-                                            unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict16x16)(unsigned char* src_ptr,
+                                            int src_pixels_per_line,
+                                            int xoffset,
+                                            int yoffset,
+                                            unsigned char* dst_ptr,
                                             int dst_pitch);
 
-void vp8_sixtap_predict4x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict4x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict4x4_mmx(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_sixtap_predict4x4_mmx(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_sixtap_predict4x4_ssse3(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_sixtap_predict4x4_ssse3(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict4x4)(unsigned char* src,
-                                          int src_pitch,
-                                          int xofst,
-                                          int yofst,
-                                          unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict4x4)(unsigned char* src_ptr,
+                                          int src_pixels_per_line,
+                                          int xoffset,
+                                          int yoffset,
+                                          unsigned char* dst_ptr,
                                           int dst_pitch);
 
-void vp8_sixtap_predict8x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x4_sse2(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x4_sse2(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
-void vp8_sixtap_predict8x4_ssse3(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_sixtap_predict8x4_ssse3(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict8x4)(unsigned char* src,
-                                          int src_pitch,
-                                          int xofst,
-                                          int yofst,
-                                          unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict8x4)(unsigned char* src_ptr,
+                                          int src_pixels_per_line,
+                                          int xoffset,
+                                          int yoffset,
+                                          unsigned char* dst_ptr,
                                           int dst_pitch);
 
-void vp8_sixtap_predict8x8_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x8_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x8_sse2(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x8_sse2(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
-void vp8_sixtap_predict8x8_ssse3(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_sixtap_predict8x8_ssse3(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict8x8)(unsigned char* src,
-                                          int src_pitch,
-                                          int xofst,
-                                          int yofst,
-                                          unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict8x8)(unsigned char* src_ptr,
+                                          int src_pixels_per_line,
+                                          int xoffset,
+                                          int yoffset,
+                                          unsigned char* dst_ptr,
                                           int dst_pitch);
 
 void vp8_rtcd(void);
diff --git a/third_party/libvpx/source/config/linux/x64/vp9_rtcd.h b/third_party/libvpx/source/config/linux/x64/vp9_rtcd.h
index 6f00c78..28787a8 100644
--- a/third_party/libvpx/source/config/linux/x64/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/linux/x64/vp9_rtcd.h
@@ -242,18 +242,18 @@
 #define vp9_highbd_fwht4x4 vp9_highbd_fwht4x4_c
 
 void vp9_highbd_iht16x16_256_add_c(const tran_low_t* input,
-                                   uint16_t* output,
-                                   int pitch,
+                                   uint16_t* dest,
+                                   int stride,
                                    int tx_type,
                                    int bd);
 void vp9_highbd_iht16x16_256_add_sse4_1(const tran_low_t* input,
-                                        uint16_t* output,
-                                        int pitch,
+                                        uint16_t* dest,
+                                        int stride,
                                         int tx_type,
                                         int bd);
 RTCD_EXTERN void (*vp9_highbd_iht16x16_256_add)(const tran_low_t* input,
-                                                uint16_t* output,
-                                                int pitch,
+                                                uint16_t* dest,
+                                                int stride,
                                                 int tx_type,
                                                 int bd);
 
@@ -351,12 +351,12 @@
 #define vp9_highbd_temporal_filter_apply vp9_highbd_temporal_filter_apply_c
 
 void vp9_iht16x16_256_add_c(const tran_low_t* input,
-                            uint8_t* output,
-                            int pitch,
+                            uint8_t* dest,
+                            int stride,
                             int tx_type);
 void vp9_iht16x16_256_add_sse2(const tran_low_t* input,
-                               uint8_t* output,
-                               int pitch,
+                               uint8_t* dest,
+                               int stride,
                                int tx_type);
 #define vp9_iht16x16_256_add vp9_iht16x16_256_add_sse2
 
diff --git a/third_party/libvpx/source/config/linux/x64/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/linux/x64/vpx_dsp_rtcd.h
index 9970fae1..3b28a11 100644
--- a/third_party/libvpx/source/config/linux/x64/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/linux/x64/vpx_dsp_rtcd.h
@@ -427,420 +427,420 @@
 #define vpx_convolve_copy vpx_convolve_copy_sse2
 
 void vpx_d117_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c
 
 void vpx_d117_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c
 
 void vpx_d117_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c
 
 void vpx_d117_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c
 
 void vpx_d135_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_c
 
 void vpx_d135_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_c
 
 void vpx_d135_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_c
 
 void vpx_d135_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_c
 
 void vpx_d153_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d153_predictor_16x16_ssse3(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_d153_predictor_16x16)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d153_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d153_predictor_32x32_ssse3(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_d153_predictor_32x32)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d153_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d153_predictor_4x4_ssse3(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 RTCD_EXTERN void (*vpx_d153_predictor_4x4)(uint8_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint8_t* above,
                                            const uint8_t* left);
 
 void vpx_d153_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d153_predictor_8x8_ssse3(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 RTCD_EXTERN void (*vpx_d153_predictor_8x8)(uint8_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint8_t* above,
                                            const uint8_t* left);
 
 void vpx_d207_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d207_predictor_16x16_ssse3(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_d207_predictor_16x16)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d207_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d207_predictor_32x32_ssse3(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_d207_predictor_32x32)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d207_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d207_predictor_4x4_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_sse2
 
 void vpx_d207_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d207_predictor_8x8_ssse3(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 RTCD_EXTERN void (*vpx_d207_predictor_8x8)(uint8_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint8_t* above,
                                            const uint8_t* left);
 
 void vpx_d45_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_16x16_ssse3(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d45_predictor_16x16)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d45_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_32x32_ssse3(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d45_predictor_32x32)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d45_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_4x4_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_sse2
 
 void vpx_d45_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_8x8_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_sse2
 
 void vpx_d45e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c
 
 void vpx_d63_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d63_predictor_16x16_ssse3(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d63_predictor_16x16)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d63_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d63_predictor_32x32_ssse3(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d63_predictor_32x32)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d63_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d63_predictor_4x4_ssse3(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 RTCD_EXTERN void (*vpx_d63_predictor_4x4)(uint8_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint8_t* above,
                                           const uint8_t* left);
 
 void vpx_d63_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d63_predictor_8x8_ssse3(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 RTCD_EXTERN void (*vpx_d63_predictor_8x8)(uint8_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint8_t* above,
                                           const uint8_t* left);
 
 void vpx_d63e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c
 
 void vpx_dc_128_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_16x16_sse2(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_sse2
 
 void vpx_dc_128_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_32x32_sse2(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_sse2
 
 void vpx_dc_128_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_4x4_sse2(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_sse2
 
 void vpx_dc_128_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_8x8_sse2(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_sse2
 
 void vpx_dc_left_predictor_16x16_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_16x16_sse2(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 #define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_sse2
 
 void vpx_dc_left_predictor_32x32_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_32x32_sse2(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 #define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_sse2
 
 void vpx_dc_left_predictor_4x4_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_4x4_sse2(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 #define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_sse2
 
 void vpx_dc_left_predictor_8x8_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_8x8_sse2(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 #define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_sse2
 
 void vpx_dc_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_16x16_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_sse2
 
 void vpx_dc_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_32x32_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_sse2
 
 void vpx_dc_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_4x4_sse2(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_sse2
 
 void vpx_dc_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_8x8_sse2(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_sse2
 
 void vpx_dc_top_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_16x16_sse2(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_sse2
 
 void vpx_dc_top_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_32x32_sse2(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_sse2
 
 void vpx_dc_top_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_4x4_sse2(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_sse2
 
 void vpx_dc_top_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_8x8_sse2(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_sse2
@@ -884,44 +884,44 @@
 #define vpx_fdct8x8_1 vpx_fdct8x8_1_sse2
 
 void vpx_get16x16var_c(const uint8_t* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        const uint8_t* ref_ptr,
                        int ref_stride,
                        unsigned int* sse,
                        int* sum);
 void vpx_get16x16var_sse2(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
                           int ref_stride,
                           unsigned int* sse,
                           int* sum);
 void vpx_get16x16var_avx2(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
                           int ref_stride,
                           unsigned int* sse,
                           int* sum);
 RTCD_EXTERN void (*vpx_get16x16var)(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse,
                                     int* sum);
 
 unsigned int vpx_get4x4sse_cs_c(const unsigned char* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const unsigned char* ref_ptr,
                                 int ref_stride);
 #define vpx_get4x4sse_cs vpx_get4x4sse_cs_c
 
 void vpx_get8x8var_c(const uint8_t* src_ptr,
-                     int source_stride,
+                     int src_stride,
                      const uint8_t* ref_ptr,
                      int ref_stride,
                      unsigned int* sse,
                      int* sum);
 void vpx_get8x8var_sse2(const uint8_t* src_ptr,
-                        int source_stride,
+                        int src_stride,
                         const uint8_t* ref_ptr,
                         int ref_stride,
                         unsigned int* sse,
@@ -933,41 +933,41 @@
 #define vpx_get_mb_ss vpx_get_mb_ss_sse2
 
 void vpx_h_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_16x16_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_h_predictor_16x16 vpx_h_predictor_16x16_sse2
 
 void vpx_h_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_32x32_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_h_predictor_32x32 vpx_h_predictor_32x32_sse2
 
 void vpx_h_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_4x4_sse2(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_h_predictor_4x4 vpx_h_predictor_4x4_sse2
 
 void vpx_h_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_8x8_sse2(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_h_predictor_8x8 vpx_h_predictor_8x8_sse2
@@ -1012,13 +1012,13 @@
                                      tran_low_t* coeff);
 
 void vpx_he_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c
 
 void vpx_highbd_10_get16x16var_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse,
@@ -1026,7 +1026,7 @@
 #define vpx_highbd_10_get16x16var vpx_highbd_10_get16x16var_c
 
 void vpx_highbd_10_get8x8var_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse,
@@ -1034,57 +1034,57 @@
 #define vpx_highbd_10_get8x8var vpx_highbd_10_get8x8var_c
 
 unsigned int vpx_highbd_10_mse16x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 unsigned int vpx_highbd_10_mse16x16_sse2(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
-                                         int recon_stride,
+                                         int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_mse16x16 vpx_highbd_10_mse16x16_sse2
 
 unsigned int vpx_highbd_10_mse16x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_10_mse16x8 vpx_highbd_10_mse16x8_c
 
 unsigned int vpx_highbd_10_mse8x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_10_mse8x16 vpx_highbd_10_mse8x16_c
 
 unsigned int vpx_highbd_10_mse8x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_highbd_10_mse8x8_sse2(const uint8_t* src_ptr,
-                                       int source_stride,
+                                       int src_stride,
                                        const uint8_t* ref_ptr,
-                                       int recon_stride,
+                                       int ref_stride,
                                        unsigned int* sse);
 #define vpx_highbd_10_mse8x8 vpx_highbd_10_mse8x8_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1094,18 +1094,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1114,18 +1114,18 @@
   vpx_highbd_10_sub_pixel_avg_variance16x32_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1135,18 +1135,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1156,18 +1156,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1177,18 +1177,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1197,9 +1197,9 @@
   vpx_highbd_10_sub_pixel_avg_variance32x64_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1208,9 +1208,9 @@
   vpx_highbd_10_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1220,18 +1220,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1241,18 +1241,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1261,18 +1261,18 @@
   vpx_highbd_10_sub_pixel_avg_variance64x64_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1281,18 +1281,18 @@
   vpx_highbd_10_sub_pixel_avg_variance8x16_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1301,18 +1301,18 @@
   vpx_highbd_10_sub_pixel_avg_variance8x4_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1321,16 +1321,16 @@
   vpx_highbd_10_sub_pixel_avg_variance8x8_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance16x16_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1338,16 +1338,16 @@
   vpx_highbd_10_sub_pixel_variance16x16_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance16x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1355,16 +1355,16 @@
   vpx_highbd_10_sub_pixel_variance16x32_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance16x8_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -1372,16 +1372,16 @@
   vpx_highbd_10_sub_pixel_variance16x8_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance32x16_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1389,16 +1389,16 @@
   vpx_highbd_10_sub_pixel_variance32x16_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance32x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1406,16 +1406,16 @@
   vpx_highbd_10_sub_pixel_variance32x32_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance32x64_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1423,9 +1423,9 @@
   vpx_highbd_10_sub_pixel_variance32x64_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1433,9 +1433,9 @@
   vpx_highbd_10_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1443,16 +1443,16 @@
   vpx_highbd_10_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance64x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1460,16 +1460,16 @@
   vpx_highbd_10_sub_pixel_variance64x32_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance64x64_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1477,16 +1477,16 @@
   vpx_highbd_10_sub_pixel_variance64x64_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance8x16_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -1494,16 +1494,16 @@
   vpx_highbd_10_sub_pixel_variance8x16_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance8x4_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -1511,16 +1511,16 @@
   vpx_highbd_10_sub_pixel_variance8x4_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance8x8_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -1528,148 +1528,148 @@
   vpx_highbd_10_sub_pixel_variance8x8_sse2
 
 unsigned int vpx_highbd_10_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance16x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance16x16 vpx_highbd_10_variance16x16_sse2
 
 unsigned int vpx_highbd_10_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance16x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance16x32 vpx_highbd_10_variance16x32_sse2
 
 unsigned int vpx_highbd_10_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_10_variance16x8_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_10_variance16x8 vpx_highbd_10_variance16x8_sse2
 
 unsigned int vpx_highbd_10_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance32x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance32x16 vpx_highbd_10_variance32x16_sse2
 
 unsigned int vpx_highbd_10_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance32x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance32x32 vpx_highbd_10_variance32x32_sse2
 
 unsigned int vpx_highbd_10_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance32x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance32x64 vpx_highbd_10_variance32x64_sse2
 
 unsigned int vpx_highbd_10_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance4x4 vpx_highbd_10_variance4x4_c
 
 unsigned int vpx_highbd_10_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance4x8 vpx_highbd_10_variance4x8_c
 
 unsigned int vpx_highbd_10_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance64x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance64x32 vpx_highbd_10_variance64x32_sse2
 
 unsigned int vpx_highbd_10_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance64x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance64x64 vpx_highbd_10_variance64x64_sse2
 
 unsigned int vpx_highbd_10_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_10_variance8x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_10_variance8x16 vpx_highbd_10_variance8x16_sse2
 
 unsigned int vpx_highbd_10_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance8x4 vpx_highbd_10_variance8x4_c
 
 unsigned int vpx_highbd_10_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 unsigned int vpx_highbd_10_variance8x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 #define vpx_highbd_10_variance8x8 vpx_highbd_10_variance8x8_sse2
 
 void vpx_highbd_12_get16x16var_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse,
@@ -1677,7 +1677,7 @@
 #define vpx_highbd_12_get16x16var vpx_highbd_12_get16x16var_c
 
 void vpx_highbd_12_get8x8var_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse,
@@ -1685,57 +1685,57 @@
 #define vpx_highbd_12_get8x8var vpx_highbd_12_get8x8var_c
 
 unsigned int vpx_highbd_12_mse16x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 unsigned int vpx_highbd_12_mse16x16_sse2(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
-                                         int recon_stride,
+                                         int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_mse16x16 vpx_highbd_12_mse16x16_sse2
 
 unsigned int vpx_highbd_12_mse16x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_12_mse16x8 vpx_highbd_12_mse16x8_c
 
 unsigned int vpx_highbd_12_mse8x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_12_mse8x16 vpx_highbd_12_mse8x16_c
 
 unsigned int vpx_highbd_12_mse8x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_highbd_12_mse8x8_sse2(const uint8_t* src_ptr,
-                                       int source_stride,
+                                       int src_stride,
                                        const uint8_t* ref_ptr,
-                                       int recon_stride,
+                                       int ref_stride,
                                        unsigned int* sse);
 #define vpx_highbd_12_mse8x8 vpx_highbd_12_mse8x8_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1745,18 +1745,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1765,18 +1765,18 @@
   vpx_highbd_12_sub_pixel_avg_variance16x32_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1786,18 +1786,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1807,18 +1807,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1828,18 +1828,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1848,9 +1848,9 @@
   vpx_highbd_12_sub_pixel_avg_variance32x64_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1859,9 +1859,9 @@
   vpx_highbd_12_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1871,18 +1871,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1892,18 +1892,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1912,18 +1912,18 @@
   vpx_highbd_12_sub_pixel_avg_variance64x64_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1932,18 +1932,18 @@
   vpx_highbd_12_sub_pixel_avg_variance8x16_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1952,18 +1952,18 @@
   vpx_highbd_12_sub_pixel_avg_variance8x4_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1972,16 +1972,16 @@
   vpx_highbd_12_sub_pixel_avg_variance8x8_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance16x16_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1989,16 +1989,16 @@
   vpx_highbd_12_sub_pixel_variance16x16_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance16x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2006,16 +2006,16 @@
   vpx_highbd_12_sub_pixel_variance16x32_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance16x8_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2023,16 +2023,16 @@
   vpx_highbd_12_sub_pixel_variance16x8_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance32x16_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2040,16 +2040,16 @@
   vpx_highbd_12_sub_pixel_variance32x16_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance32x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2057,16 +2057,16 @@
   vpx_highbd_12_sub_pixel_variance32x32_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance32x64_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2074,9 +2074,9 @@
   vpx_highbd_12_sub_pixel_variance32x64_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -2084,9 +2084,9 @@
   vpx_highbd_12_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -2094,16 +2094,16 @@
   vpx_highbd_12_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance64x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2111,16 +2111,16 @@
   vpx_highbd_12_sub_pixel_variance64x32_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance64x64_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2128,16 +2128,16 @@
   vpx_highbd_12_sub_pixel_variance64x64_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance8x16_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2145,16 +2145,16 @@
   vpx_highbd_12_sub_pixel_variance8x16_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance8x4_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -2162,16 +2162,16 @@
   vpx_highbd_12_sub_pixel_variance8x4_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance8x8_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -2179,148 +2179,148 @@
   vpx_highbd_12_sub_pixel_variance8x8_sse2
 
 unsigned int vpx_highbd_12_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance16x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance16x16 vpx_highbd_12_variance16x16_sse2
 
 unsigned int vpx_highbd_12_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance16x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance16x32 vpx_highbd_12_variance16x32_sse2
 
 unsigned int vpx_highbd_12_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_12_variance16x8_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_12_variance16x8 vpx_highbd_12_variance16x8_sse2
 
 unsigned int vpx_highbd_12_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance32x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance32x16 vpx_highbd_12_variance32x16_sse2
 
 unsigned int vpx_highbd_12_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance32x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance32x32 vpx_highbd_12_variance32x32_sse2
 
 unsigned int vpx_highbd_12_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance32x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance32x64 vpx_highbd_12_variance32x64_sse2
 
 unsigned int vpx_highbd_12_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance4x4 vpx_highbd_12_variance4x4_c
 
 unsigned int vpx_highbd_12_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance4x8 vpx_highbd_12_variance4x8_c
 
 unsigned int vpx_highbd_12_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance64x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance64x32 vpx_highbd_12_variance64x32_sse2
 
 unsigned int vpx_highbd_12_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance64x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance64x64 vpx_highbd_12_variance64x64_sse2
 
 unsigned int vpx_highbd_12_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_12_variance8x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_12_variance8x16 vpx_highbd_12_variance8x16_sse2
 
 unsigned int vpx_highbd_12_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance8x4 vpx_highbd_12_variance8x4_c
 
 unsigned int vpx_highbd_12_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 unsigned int vpx_highbd_12_variance8x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 #define vpx_highbd_12_variance8x8 vpx_highbd_12_variance8x8_sse2
 
 void vpx_highbd_8_get16x16var_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse,
@@ -2328,7 +2328,7 @@
 #define vpx_highbd_8_get16x16var vpx_highbd_8_get16x16var_c
 
 void vpx_highbd_8_get8x8var_c(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
                               int ref_stride,
                               unsigned int* sse,
@@ -2336,56 +2336,56 @@
 #define vpx_highbd_8_get8x8var vpx_highbd_8_get8x8var_c
 
 unsigned int vpx_highbd_8_mse16x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 unsigned int vpx_highbd_8_mse16x16_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
-                                        int recon_stride,
+                                        int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_mse16x16 vpx_highbd_8_mse16x16_sse2
 
 unsigned int vpx_highbd_8_mse16x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_8_mse16x8 vpx_highbd_8_mse16x8_c
 
 unsigned int vpx_highbd_8_mse8x16_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_8_mse8x16 vpx_highbd_8_mse8x16_c
 
 unsigned int vpx_highbd_8_mse8x8_c(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
-                                   int recon_stride,
+                                   int ref_stride,
                                    unsigned int* sse);
 unsigned int vpx_highbd_8_mse8x8_sse2(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 #define vpx_highbd_8_mse8x8 vpx_highbd_8_mse8x8_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2394,18 +2394,18 @@
   vpx_highbd_8_sub_pixel_avg_variance16x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2414,18 +2414,18 @@
   vpx_highbd_8_sub_pixel_avg_variance16x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2434,18 +2434,18 @@
   vpx_highbd_8_sub_pixel_avg_variance16x8_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2454,18 +2454,18 @@
   vpx_highbd_8_sub_pixel_avg_variance32x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2474,18 +2474,18 @@
   vpx_highbd_8_sub_pixel_avg_variance32x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2494,9 +2494,9 @@
   vpx_highbd_8_sub_pixel_avg_variance32x64_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -2505,9 +2505,9 @@
   vpx_highbd_8_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -2516,18 +2516,18 @@
   vpx_highbd_8_sub_pixel_avg_variance4x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2536,18 +2536,18 @@
   vpx_highbd_8_sub_pixel_avg_variance64x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2556,18 +2556,18 @@
   vpx_highbd_8_sub_pixel_avg_variance64x64_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2576,18 +2576,18 @@
   vpx_highbd_8_sub_pixel_avg_variance8x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
                                                   const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2596,18 +2596,18 @@
   vpx_highbd_8_sub_pixel_avg_variance8x4_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
                                                   const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2616,16 +2616,16 @@
   vpx_highbd_8_sub_pixel_avg_variance8x8_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance16x16_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2633,16 +2633,16 @@
   vpx_highbd_8_sub_pixel_variance16x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance16x32_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2650,16 +2650,16 @@
   vpx_highbd_8_sub_pixel_variance16x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance16x8_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -2667,16 +2667,16 @@
   vpx_highbd_8_sub_pixel_variance16x8_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance32x16_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2684,16 +2684,16 @@
   vpx_highbd_8_sub_pixel_variance32x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance32x32_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2701,16 +2701,16 @@
   vpx_highbd_8_sub_pixel_variance32x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance32x64_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2718,34 +2718,34 @@
   vpx_highbd_8_sub_pixel_variance32x64_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance4x4 vpx_highbd_8_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance4x8 vpx_highbd_8_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance64x32_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2753,16 +2753,16 @@
   vpx_highbd_8_sub_pixel_variance64x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance64x64_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2770,16 +2770,16 @@
   vpx_highbd_8_sub_pixel_variance64x64_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance8x16_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -2787,16 +2787,16 @@
   vpx_highbd_8_sub_pixel_variance8x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance8x4_sse2(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -2804,16 +2804,16 @@
   vpx_highbd_8_sub_pixel_variance8x4_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance8x8_sse2(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -2821,152 +2821,152 @@
   vpx_highbd_8_sub_pixel_variance8x8_sse2
 
 unsigned int vpx_highbd_8_variance16x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance16x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance16x16 vpx_highbd_8_variance16x16_sse2
 
 unsigned int vpx_highbd_8_variance16x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance16x32_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance16x32 vpx_highbd_8_variance16x32_sse2
 
 unsigned int vpx_highbd_8_variance16x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 unsigned int vpx_highbd_8_variance16x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 #define vpx_highbd_8_variance16x8 vpx_highbd_8_variance16x8_sse2
 
 unsigned int vpx_highbd_8_variance32x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance32x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance32x16 vpx_highbd_8_variance32x16_sse2
 
 unsigned int vpx_highbd_8_variance32x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance32x32_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance32x32 vpx_highbd_8_variance32x32_sse2
 
 unsigned int vpx_highbd_8_variance32x64_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance32x64_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance32x64 vpx_highbd_8_variance32x64_sse2
 
 unsigned int vpx_highbd_8_variance4x4_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance4x4 vpx_highbd_8_variance4x4_c
 
 unsigned int vpx_highbd_8_variance4x8_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance4x8 vpx_highbd_8_variance4x8_c
 
 unsigned int vpx_highbd_8_variance64x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance64x32_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance64x32 vpx_highbd_8_variance64x32_sse2
 
 unsigned int vpx_highbd_8_variance64x64_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance64x64_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance64x64 vpx_highbd_8_variance64x64_sse2
 
 unsigned int vpx_highbd_8_variance8x16_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 unsigned int vpx_highbd_8_variance8x16_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 #define vpx_highbd_8_variance8x16 vpx_highbd_8_variance8x16_sse2
 
 unsigned int vpx_highbd_8_variance8x4_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance8x4 vpx_highbd_8_variance8x4_c
 
 unsigned int vpx_highbd_8_variance8x8_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 unsigned int vpx_highbd_8_variance8x8_sse2(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_8_variance8x8 vpx_highbd_8_variance8x8_sse2
 
-unsigned int vpx_highbd_avg_4x4_c(const uint8_t*, int p);
-unsigned int vpx_highbd_avg_4x4_sse2(const uint8_t*, int p);
+unsigned int vpx_highbd_avg_4x4_c(const uint8_t* s8, int p);
+unsigned int vpx_highbd_avg_4x4_sse2(const uint8_t* s8, int p);
 #define vpx_highbd_avg_4x4 vpx_highbd_avg_4x4_sse2
 
-unsigned int vpx_highbd_avg_8x8_c(const uint8_t*, int p);
-unsigned int vpx_highbd_avg_8x8_sse2(const uint8_t*, int p);
+unsigned int vpx_highbd_avg_8x8_c(const uint8_t* s8, int p);
+unsigned int vpx_highbd_avg_8x8_sse2(const uint8_t* s8, int p);
 #define vpx_highbd_avg_8x8 vpx_highbd_avg_8x8_sse2
 
 void vpx_highbd_comp_avg_pred_c(uint16_t* comp_pred,
@@ -2988,7 +2988,7 @@
                             int y_step_q4,
                             int w,
                             int h,
-                            int bps);
+                            int bd);
 void vpx_highbd_convolve8_sse2(const uint16_t* src,
                                ptrdiff_t src_stride,
                                uint16_t* dst,
@@ -3000,7 +3000,7 @@
                                int y_step_q4,
                                int w,
                                int h,
-                               int bps);
+                               int bd);
 void vpx_highbd_convolve8_avx2(const uint16_t* src,
                                ptrdiff_t src_stride,
                                uint16_t* dst,
@@ -3012,7 +3012,7 @@
                                int y_step_q4,
                                int w,
                                int h,
-                               int bps);
+                               int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8)(const uint16_t* src,
                                          ptrdiff_t src_stride,
                                          uint16_t* dst,
@@ -3024,7 +3024,7 @@
                                          int y_step_q4,
                                          int w,
                                          int h,
-                                         int bps);
+                                         int bd);
 
 void vpx_highbd_convolve8_avg_c(const uint16_t* src,
                                 ptrdiff_t src_stride,
@@ -3037,7 +3037,7 @@
                                 int y_step_q4,
                                 int w,
                                 int h,
-                                int bps);
+                                int bd);
 void vpx_highbd_convolve8_avg_sse2(const uint16_t* src,
                                    ptrdiff_t src_stride,
                                    uint16_t* dst,
@@ -3049,7 +3049,7 @@
                                    int y_step_q4,
                                    int w,
                                    int h,
-                                   int bps);
+                                   int bd);
 void vpx_highbd_convolve8_avg_avx2(const uint16_t* src,
                                    ptrdiff_t src_stride,
                                    uint16_t* dst,
@@ -3061,7 +3061,7 @@
                                    int y_step_q4,
                                    int w,
                                    int h,
-                                   int bps);
+                                   int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_avg)(const uint16_t* src,
                                              ptrdiff_t src_stride,
                                              uint16_t* dst,
@@ -3073,7 +3073,7 @@
                                              int y_step_q4,
                                              int w,
                                              int h,
-                                             int bps);
+                                             int bd);
 
 void vpx_highbd_convolve8_avg_horiz_c(const uint16_t* src,
                                       ptrdiff_t src_stride,
@@ -3086,7 +3086,7 @@
                                       int y_step_q4,
                                       int w,
                                       int h,
-                                      int bps);
+                                      int bd);
 void vpx_highbd_convolve8_avg_horiz_sse2(const uint16_t* src,
                                          ptrdiff_t src_stride,
                                          uint16_t* dst,
@@ -3098,7 +3098,7 @@
                                          int y_step_q4,
                                          int w,
                                          int h,
-                                         int bps);
+                                         int bd);
 void vpx_highbd_convolve8_avg_horiz_avx2(const uint16_t* src,
                                          ptrdiff_t src_stride,
                                          uint16_t* dst,
@@ -3110,7 +3110,7 @@
                                          int y_step_q4,
                                          int w,
                                          int h,
-                                         int bps);
+                                         int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_avg_horiz)(const uint16_t* src,
                                                    ptrdiff_t src_stride,
                                                    uint16_t* dst,
@@ -3122,7 +3122,7 @@
                                                    int y_step_q4,
                                                    int w,
                                                    int h,
-                                                   int bps);
+                                                   int bd);
 
 void vpx_highbd_convolve8_avg_vert_c(const uint16_t* src,
                                      ptrdiff_t src_stride,
@@ -3135,7 +3135,7 @@
                                      int y_step_q4,
                                      int w,
                                      int h,
-                                     int bps);
+                                     int bd);
 void vpx_highbd_convolve8_avg_vert_sse2(const uint16_t* src,
                                         ptrdiff_t src_stride,
                                         uint16_t* dst,
@@ -3147,7 +3147,7 @@
                                         int y_step_q4,
                                         int w,
                                         int h,
-                                        int bps);
+                                        int bd);
 void vpx_highbd_convolve8_avg_vert_avx2(const uint16_t* src,
                                         ptrdiff_t src_stride,
                                         uint16_t* dst,
@@ -3159,7 +3159,7 @@
                                         int y_step_q4,
                                         int w,
                                         int h,
-                                        int bps);
+                                        int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_avg_vert)(const uint16_t* src,
                                                   ptrdiff_t src_stride,
                                                   uint16_t* dst,
@@ -3171,7 +3171,7 @@
                                                   int y_step_q4,
                                                   int w,
                                                   int h,
-                                                  int bps);
+                                                  int bd);
 
 void vpx_highbd_convolve8_horiz_c(const uint16_t* src,
                                   ptrdiff_t src_stride,
@@ -3184,7 +3184,7 @@
                                   int y_step_q4,
                                   int w,
                                   int h,
-                                  int bps);
+                                  int bd);
 void vpx_highbd_convolve8_horiz_sse2(const uint16_t* src,
                                      ptrdiff_t src_stride,
                                      uint16_t* dst,
@@ -3196,7 +3196,7 @@
                                      int y_step_q4,
                                      int w,
                                      int h,
-                                     int bps);
+                                     int bd);
 void vpx_highbd_convolve8_horiz_avx2(const uint16_t* src,
                                      ptrdiff_t src_stride,
                                      uint16_t* dst,
@@ -3208,7 +3208,7 @@
                                      int y_step_q4,
                                      int w,
                                      int h,
-                                     int bps);
+                                     int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_horiz)(const uint16_t* src,
                                                ptrdiff_t src_stride,
                                                uint16_t* dst,
@@ -3220,7 +3220,7 @@
                                                int y_step_q4,
                                                int w,
                                                int h,
-                                               int bps);
+                                               int bd);
 
 void vpx_highbd_convolve8_vert_c(const uint16_t* src,
                                  ptrdiff_t src_stride,
@@ -3233,7 +3233,7 @@
                                  int y_step_q4,
                                  int w,
                                  int h,
-                                 int bps);
+                                 int bd);
 void vpx_highbd_convolve8_vert_sse2(const uint16_t* src,
                                     ptrdiff_t src_stride,
                                     uint16_t* dst,
@@ -3245,7 +3245,7 @@
                                     int y_step_q4,
                                     int w,
                                     int h,
-                                    int bps);
+                                    int bd);
 void vpx_highbd_convolve8_vert_avx2(const uint16_t* src,
                                     ptrdiff_t src_stride,
                                     uint16_t* dst,
@@ -3257,7 +3257,7 @@
                                     int y_step_q4,
                                     int w,
                                     int h,
-                                    int bps);
+                                    int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_vert)(const uint16_t* src,
                                               ptrdiff_t src_stride,
                                               uint16_t* dst,
@@ -3269,7 +3269,7 @@
                                               int y_step_q4,
                                               int w,
                                               int h,
-                                              int bps);
+                                              int bd);
 
 void vpx_highbd_convolve_avg_c(const uint16_t* src,
                                ptrdiff_t src_stride,
@@ -3282,7 +3282,7 @@
                                int y_step_q4,
                                int w,
                                int h,
-                               int bps);
+                               int bd);
 void vpx_highbd_convolve_avg_sse2(const uint16_t* src,
                                   ptrdiff_t src_stride,
                                   uint16_t* dst,
@@ -3294,7 +3294,7 @@
                                   int y_step_q4,
                                   int w,
                                   int h,
-                                  int bps);
+                                  int bd);
 void vpx_highbd_convolve_avg_avx2(const uint16_t* src,
                                   ptrdiff_t src_stride,
                                   uint16_t* dst,
@@ -3306,7 +3306,7 @@
                                   int y_step_q4,
                                   int w,
                                   int h,
-                                  int bps);
+                                  int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve_avg)(const uint16_t* src,
                                             ptrdiff_t src_stride,
                                             uint16_t* dst,
@@ -3318,7 +3318,7 @@
                                             int y_step_q4,
                                             int w,
                                             int h,
-                                            int bps);
+                                            int bd);
 
 void vpx_highbd_convolve_copy_c(const uint16_t* src,
                                 ptrdiff_t src_stride,
@@ -3331,7 +3331,7 @@
                                 int y_step_q4,
                                 int w,
                                 int h,
-                                int bps);
+                                int bd);
 void vpx_highbd_convolve_copy_sse2(const uint16_t* src,
                                    ptrdiff_t src_stride,
                                    uint16_t* dst,
@@ -3343,7 +3343,7 @@
                                    int y_step_q4,
                                    int w,
                                    int h,
-                                   int bps);
+                                   int bd);
 void vpx_highbd_convolve_copy_avx2(const uint16_t* src,
                                    ptrdiff_t src_stride,
                                    uint16_t* dst,
@@ -3355,7 +3355,7 @@
                                    int y_step_q4,
                                    int w,
                                    int h,
-                                   int bps);
+                                   int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve_copy)(const uint16_t* src,
                                              ptrdiff_t src_stride,
                                              uint16_t* dst,
@@ -3367,427 +3367,427 @@
                                              int y_step_q4,
                                              int w,
                                              int h,
-                                             int bps);
+                                             int bd);
 
 void vpx_highbd_d117_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d117_predictor_16x16_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d117_predictor_16x16)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d117_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d117_predictor_32x32_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d117_predictor_32x32)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d117_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d117_predictor_4x4_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d117_predictor_4x4 vpx_highbd_d117_predictor_4x4_sse2
 
 void vpx_highbd_d117_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d117_predictor_8x8_ssse3(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 RTCD_EXTERN void (*vpx_highbd_d117_predictor_8x8)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
+                                                  ptrdiff_t stride,
                                                   const uint16_t* above,
                                                   const uint16_t* left,
                                                   int bd);
 
 void vpx_highbd_d135_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d135_predictor_16x16_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d135_predictor_16x16)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d135_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d135_predictor_32x32_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d135_predictor_32x32)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d135_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d135_predictor_4x4_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d135_predictor_4x4 vpx_highbd_d135_predictor_4x4_sse2
 
 void vpx_highbd_d135_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d135_predictor_8x8_ssse3(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 RTCD_EXTERN void (*vpx_highbd_d135_predictor_8x8)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
+                                                  ptrdiff_t stride,
                                                   const uint16_t* above,
                                                   const uint16_t* left,
                                                   int bd);
 
 void vpx_highbd_d153_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d153_predictor_16x16_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d153_predictor_16x16)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d153_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d153_predictor_32x32_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d153_predictor_32x32)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d153_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d153_predictor_4x4_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d153_predictor_4x4 vpx_highbd_d153_predictor_4x4_sse2
 
 void vpx_highbd_d153_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d153_predictor_8x8_ssse3(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 RTCD_EXTERN void (*vpx_highbd_d153_predictor_8x8)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
+                                                  ptrdiff_t stride,
                                                   const uint16_t* above,
                                                   const uint16_t* left,
                                                   int bd);
 
 void vpx_highbd_d207_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d207_predictor_16x16_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d207_predictor_16x16)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d207_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d207_predictor_32x32_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d207_predictor_32x32)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d207_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d207_predictor_4x4_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d207_predictor_4x4 vpx_highbd_d207_predictor_4x4_sse2
 
 void vpx_highbd_d207_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d207_predictor_8x8_ssse3(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 RTCD_EXTERN void (*vpx_highbd_d207_predictor_8x8)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
+                                                  ptrdiff_t stride,
                                                   const uint16_t* above,
                                                   const uint16_t* left,
                                                   int bd);
 
 void vpx_highbd_d45_predictor_16x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d45_predictor_16x16_ssse3(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 RTCD_EXTERN void (*vpx_highbd_d45_predictor_16x16)(uint16_t* dst,
-                                                   ptrdiff_t y_stride,
+                                                   ptrdiff_t stride,
                                                    const uint16_t* above,
                                                    const uint16_t* left,
                                                    int bd);
 
 void vpx_highbd_d45_predictor_32x32_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d45_predictor_32x32_ssse3(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 RTCD_EXTERN void (*vpx_highbd_d45_predictor_32x32)(uint16_t* dst,
-                                                   ptrdiff_t y_stride,
+                                                   ptrdiff_t stride,
                                                    const uint16_t* above,
                                                    const uint16_t* left,
                                                    int bd);
 
 void vpx_highbd_d45_predictor_4x4_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d45_predictor_4x4_ssse3(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 RTCD_EXTERN void (*vpx_highbd_d45_predictor_4x4)(uint16_t* dst,
-                                                 ptrdiff_t y_stride,
+                                                 ptrdiff_t stride,
                                                  const uint16_t* above,
                                                  const uint16_t* left,
                                                  int bd);
 
 void vpx_highbd_d45_predictor_8x8_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d45_predictor_8x8_ssse3(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 RTCD_EXTERN void (*vpx_highbd_d45_predictor_8x8)(uint16_t* dst,
-                                                 ptrdiff_t y_stride,
+                                                 ptrdiff_t stride,
                                                  const uint16_t* above,
                                                  const uint16_t* left,
                                                  int bd);
 
 void vpx_highbd_d63_predictor_16x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d63_predictor_16x16_ssse3(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 RTCD_EXTERN void (*vpx_highbd_d63_predictor_16x16)(uint16_t* dst,
-                                                   ptrdiff_t y_stride,
+                                                   ptrdiff_t stride,
                                                    const uint16_t* above,
                                                    const uint16_t* left,
                                                    int bd);
 
 void vpx_highbd_d63_predictor_32x32_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d63_predictor_32x32_ssse3(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 RTCD_EXTERN void (*vpx_highbd_d63_predictor_32x32)(uint16_t* dst,
-                                                   ptrdiff_t y_stride,
+                                                   ptrdiff_t stride,
                                                    const uint16_t* above,
                                                    const uint16_t* left,
                                                    int bd);
 
 void vpx_highbd_d63_predictor_4x4_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d63_predictor_4x4_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d63_predictor_4x4 vpx_highbd_d63_predictor_4x4_sse2
 
 void vpx_highbd_d63_predictor_8x8_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d63_predictor_8x8_ssse3(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 RTCD_EXTERN void (*vpx_highbd_d63_predictor_8x8)(uint16_t* dst,
-                                                 ptrdiff_t y_stride,
+                                                 ptrdiff_t stride,
                                                  const uint16_t* above,
                                                  const uint16_t* left,
                                                  int bd);
 
 void vpx_highbd_dc_128_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_128_predictor_16x16_sse2(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_128_predictor_16x16 vpx_highbd_dc_128_predictor_16x16_sse2
 
 void vpx_highbd_dc_128_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_128_predictor_32x32_sse2(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_128_predictor_32x32 vpx_highbd_dc_128_predictor_32x32_sse2
 
 void vpx_highbd_dc_128_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_128_predictor_4x4_sse2(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_128_predictor_4x4 vpx_highbd_dc_128_predictor_4x4_sse2
 
 void vpx_highbd_dc_128_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_128_predictor_8x8_sse2(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_128_predictor_8x8 vpx_highbd_dc_128_predictor_8x8_sse2
 
 void vpx_highbd_dc_left_predictor_16x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 void vpx_highbd_dc_left_predictor_16x16_sse2(uint16_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint16_t* above,
                                              const uint16_t* left,
                                              int bd);
@@ -3795,12 +3795,12 @@
   vpx_highbd_dc_left_predictor_16x16_sse2
 
 void vpx_highbd_dc_left_predictor_32x32_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 void vpx_highbd_dc_left_predictor_32x32_sse2(uint16_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint16_t* above,
                                              const uint16_t* left,
                                              int bd);
@@ -3808,120 +3808,120 @@
   vpx_highbd_dc_left_predictor_32x32_sse2
 
 void vpx_highbd_dc_left_predictor_4x4_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 void vpx_highbd_dc_left_predictor_4x4_sse2(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 #define vpx_highbd_dc_left_predictor_4x4 vpx_highbd_dc_left_predictor_4x4_sse2
 
 void vpx_highbd_dc_left_predictor_8x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 void vpx_highbd_dc_left_predictor_8x8_sse2(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 #define vpx_highbd_dc_left_predictor_8x8 vpx_highbd_dc_left_predictor_8x8_sse2
 
 void vpx_highbd_dc_predictor_16x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_dc_predictor_16x16_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_dc_predictor_16x16 vpx_highbd_dc_predictor_16x16_sse2
 
 void vpx_highbd_dc_predictor_32x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_dc_predictor_32x32_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_dc_predictor_32x32 vpx_highbd_dc_predictor_32x32_sse2
 
 void vpx_highbd_dc_predictor_4x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_dc_predictor_4x4_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_dc_predictor_4x4 vpx_highbd_dc_predictor_4x4_sse2
 
 void vpx_highbd_dc_predictor_8x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_dc_predictor_8x8_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_dc_predictor_8x8 vpx_highbd_dc_predictor_8x8_sse2
 
 void vpx_highbd_dc_top_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_top_predictor_16x16_sse2(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_top_predictor_16x16 vpx_highbd_dc_top_predictor_16x16_sse2
 
 void vpx_highbd_dc_top_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_top_predictor_32x32_sse2(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_top_predictor_32x32 vpx_highbd_dc_top_predictor_32x32_sse2
 
 void vpx_highbd_dc_top_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_top_predictor_4x4_sse2(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_top_predictor_4x4 vpx_highbd_dc_top_predictor_4x4_sse2
 
 void vpx_highbd_dc_top_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_top_predictor_8x8_sse2(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
@@ -3979,53 +3979,68 @@
 #define vpx_highbd_fdct8x8_1 vpx_highbd_fdct8x8_1_c
 
 void vpx_highbd_h_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_h_predictor_16x16_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_h_predictor_16x16 vpx_highbd_h_predictor_16x16_sse2
 
 void vpx_highbd_h_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_h_predictor_32x32_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_h_predictor_32x32 vpx_highbd_h_predictor_32x32_sse2
 
 void vpx_highbd_h_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_h_predictor_4x4_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_h_predictor_4x4 vpx_highbd_h_predictor_4x4_sse2
 
 void vpx_highbd_h_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_h_predictor_8x8_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_h_predictor_8x8 vpx_highbd_h_predictor_8x8_sse2
 
+void vpx_highbd_hadamard_16x16_c(const int16_t* src_diff,
+                                 ptrdiff_t src_stride,
+                                 tran_low_t* coeff);
+#define vpx_highbd_hadamard_16x16 vpx_highbd_hadamard_16x16_c
+
+void vpx_highbd_hadamard_32x32_c(const int16_t* src_diff,
+                                 ptrdiff_t src_stride,
+                                 tran_low_t* coeff);
+#define vpx_highbd_hadamard_32x32 vpx_highbd_hadamard_32x32_c
+
+void vpx_highbd_hadamard_8x8_c(const int16_t* src_diff,
+                               ptrdiff_t src_stride,
+                               tran_low_t* coeff);
+#define vpx_highbd_hadamard_8x8 vpx_highbd_hadamard_8x8_c
+
 void vpx_highbd_idct16x16_10_add_c(const tran_low_t* input,
                                    uint16_t* dest,
                                    int stride,
@@ -4423,9 +4438,9 @@
                                          int bd);
 #define vpx_highbd_lpf_vertical_8_dual vpx_highbd_lpf_vertical_8_dual_sse2
 
-void vpx_highbd_minmax_8x8_c(const uint8_t* s,
+void vpx_highbd_minmax_8x8_c(const uint8_t* s8,
                              int p,
-                             const uint8_t* d,
+                             const uint8_t* d8,
                              int dp,
                              int* min,
                              int* max);
@@ -4511,12 +4526,12 @@
 
 void vpx_highbd_sad16x16x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad16x16x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad16x16x4d vpx_highbd_sad16x16x4d_sse2
@@ -4545,12 +4560,12 @@
 
 void vpx_highbd_sad16x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad16x32x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad16x32x4d vpx_highbd_sad16x32x4d_sse2
@@ -4579,12 +4594,12 @@
 
 void vpx_highbd_sad16x8x4d_c(const uint8_t* src_ptr,
                              int src_stride,
-                             const uint8_t* const ref_ptr[],
+                             const uint8_t* const ref_array[],
                              int ref_stride,
                              uint32_t* sad_array);
 void vpx_highbd_sad16x8x4d_sse2(const uint8_t* src_ptr,
                                 int src_stride,
-                                const uint8_t* const ref_ptr[],
+                                const uint8_t* const ref_array[],
                                 int ref_stride,
                                 uint32_t* sad_array);
 #define vpx_highbd_sad16x8x4d vpx_highbd_sad16x8x4d_sse2
@@ -4613,12 +4628,12 @@
 
 void vpx_highbd_sad32x16x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad32x16x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad32x16x4d vpx_highbd_sad32x16x4d_sse2
@@ -4647,12 +4662,12 @@
 
 void vpx_highbd_sad32x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad32x32x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad32x32x4d vpx_highbd_sad32x32x4d_sse2
@@ -4681,12 +4696,12 @@
 
 void vpx_highbd_sad32x64x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad32x64x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad32x64x4d vpx_highbd_sad32x64x4d_sse2
@@ -4706,12 +4721,12 @@
 
 void vpx_highbd_sad4x4x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 void vpx_highbd_sad4x4x4d_sse2(const uint8_t* src_ptr,
                                int src_stride,
-                               const uint8_t* const ref_ptr[],
+                               const uint8_t* const ref_array[],
                                int ref_stride,
                                uint32_t* sad_array);
 #define vpx_highbd_sad4x4x4d vpx_highbd_sad4x4x4d_sse2
@@ -4731,12 +4746,12 @@
 
 void vpx_highbd_sad4x8x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 void vpx_highbd_sad4x8x4d_sse2(const uint8_t* src_ptr,
                                int src_stride,
-                               const uint8_t* const ref_ptr[],
+                               const uint8_t* const ref_array[],
                                int ref_stride,
                                uint32_t* sad_array);
 #define vpx_highbd_sad4x8x4d vpx_highbd_sad4x8x4d_sse2
@@ -4765,12 +4780,12 @@
 
 void vpx_highbd_sad64x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad64x32x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad64x32x4d vpx_highbd_sad64x32x4d_sse2
@@ -4799,12 +4814,12 @@
 
 void vpx_highbd_sad64x64x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad64x64x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad64x64x4d vpx_highbd_sad64x64x4d_sse2
@@ -4833,12 +4848,12 @@
 
 void vpx_highbd_sad8x16x4d_c(const uint8_t* src_ptr,
                              int src_stride,
-                             const uint8_t* const ref_ptr[],
+                             const uint8_t* const ref_array[],
                              int ref_stride,
                              uint32_t* sad_array);
 void vpx_highbd_sad8x16x4d_sse2(const uint8_t* src_ptr,
                                 int src_stride,
-                                const uint8_t* const ref_ptr[],
+                                const uint8_t* const ref_array[],
                                 int ref_stride,
                                 uint32_t* sad_array);
 #define vpx_highbd_sad8x16x4d vpx_highbd_sad8x16x4d_sse2
@@ -4867,12 +4882,12 @@
 
 void vpx_highbd_sad8x4x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 void vpx_highbd_sad8x4x4d_sse2(const uint8_t* src_ptr,
                                int src_stride,
-                               const uint8_t* const ref_ptr[],
+                               const uint8_t* const ref_array[],
                                int ref_stride,
                                uint32_t* sad_array);
 #define vpx_highbd_sad8x4x4d vpx_highbd_sad8x4x4d_sse2
@@ -4901,12 +4916,12 @@
 
 void vpx_highbd_sad8x8x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 void vpx_highbd_sad8x8x4d_sse2(const uint8_t* src_ptr,
                                int src_stride,
-                               const uint8_t* const ref_ptr[],
+                               const uint8_t* const ref_array[],
                                int ref_stride,
                                uint32_t* sad_array);
 #define vpx_highbd_sad8x8x4d vpx_highbd_sad8x8x4d_sse2
@@ -4915,104 +4930,104 @@
                                  int cols,
                                  int16_t* diff_ptr,
                                  ptrdiff_t diff_stride,
-                                 const uint8_t* src_ptr,
+                                 const uint8_t* src8_ptr,
                                  ptrdiff_t src_stride,
-                                 const uint8_t* pred_ptr,
+                                 const uint8_t* pred8_ptr,
                                  ptrdiff_t pred_stride,
                                  int bd);
 #define vpx_highbd_subtract_block vpx_highbd_subtract_block_c
 
 void vpx_highbd_tm_predictor_16x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_tm_predictor_16x16_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_tm_predictor_16x16 vpx_highbd_tm_predictor_16x16_sse2
 
 void vpx_highbd_tm_predictor_32x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_tm_predictor_32x32_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_tm_predictor_32x32 vpx_highbd_tm_predictor_32x32_sse2
 
 void vpx_highbd_tm_predictor_4x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_tm_predictor_4x4_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_tm_predictor_4x4 vpx_highbd_tm_predictor_4x4_sse2
 
 void vpx_highbd_tm_predictor_8x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_tm_predictor_8x8_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_tm_predictor_8x8 vpx_highbd_tm_predictor_8x8_sse2
 
 void vpx_highbd_v_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_v_predictor_16x16_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_v_predictor_16x16 vpx_highbd_v_predictor_16x16_sse2
 
 void vpx_highbd_v_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_v_predictor_32x32_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_v_predictor_32x32 vpx_highbd_v_predictor_32x32_sse2
 
 void vpx_highbd_v_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_v_predictor_4x4_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_v_predictor_4x4 vpx_highbd_v_predictor_4x4_sse2
 
 void vpx_highbd_v_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_v_predictor_8x8_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
@@ -5322,12 +5337,12 @@
                                   const uint8_t* thresh1);
 #define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_sse2
 
-void vpx_mbpost_proc_across_ip_c(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_c(unsigned char* src,
                                  int pitch,
                                  int rows,
                                  int cols,
                                  int flimit);
-void vpx_mbpost_proc_across_ip_sse2(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_sse2(unsigned char* src,
                                     int pitch,
                                     int rows,
                                     int cols,
@@ -5361,68 +5376,68 @@
 #define vpx_minmax_8x8 vpx_minmax_8x8_sse2
 
 unsigned int vpx_mse16x16_c(const uint8_t* src_ptr,
-                            int source_stride,
+                            int src_stride,
                             const uint8_t* ref_ptr,
-                            int recon_stride,
+                            int ref_stride,
                             unsigned int* sse);
 unsigned int vpx_mse16x16_sse2(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
-                               int recon_stride,
+                               int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_mse16x16_avx2(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
-                               int recon_stride,
+                               int ref_stride,
                                unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_mse16x16)(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
-                                         int recon_stride,
+                                         int ref_stride,
                                          unsigned int* sse);
 
 unsigned int vpx_mse16x8_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 unsigned int vpx_mse16x8_sse2(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
-                              int recon_stride,
+                              int ref_stride,
                               unsigned int* sse);
 unsigned int vpx_mse16x8_avx2(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
-                              int recon_stride,
+                              int ref_stride,
                               unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_mse16x8)(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
-                                        int recon_stride,
+                                        int ref_stride,
                                         unsigned int* sse);
 
 unsigned int vpx_mse8x16_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 unsigned int vpx_mse8x16_sse2(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
-                              int recon_stride,
+                              int ref_stride,
                               unsigned int* sse);
 #define vpx_mse8x16 vpx_mse8x16_sse2
 
 unsigned int vpx_mse8x8_c(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
-                          int recon_stride,
+                          int ref_stride,
                           unsigned int* sse);
 unsigned int vpx_mse8x8_sse2(const uint8_t* src_ptr,
-                             int source_stride,
+                             int src_stride,
                              const uint8_t* ref_ptr,
-                             int recon_stride,
+                             int ref_stride,
                              unsigned int* sse);
 #define vpx_mse8x8 vpx_mse8x8_sse2
 
@@ -5623,12 +5638,12 @@
 
 void vpx_sad16x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x16x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad16x16x4d vpx_sad16x16x4d_sse2
@@ -5673,12 +5688,12 @@
 
 void vpx_sad16x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x32x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad16x32x4d vpx_sad16x32x4d_sse2
@@ -5728,12 +5743,12 @@
 
 void vpx_sad16x8x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad16x8x4d_sse2(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 #define vpx_sad16x8x4d vpx_sad16x8x4d_sse2
@@ -5794,12 +5809,12 @@
 
 void vpx_sad32x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x16x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x16x4d vpx_sad32x16x4d_sse2
@@ -5844,22 +5859,22 @@
 
 void vpx_sad32x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x32x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 void vpx_sad32x32x4d_avx2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 RTCD_EXTERN void (*vpx_sad32x32x4d)(const uint8_t* src_ptr,
                                     int src_stride,
-                                    const uint8_t* const ref_ptr[],
+                                    const uint8_t* const ref_array[],
                                     int ref_stride,
                                     uint32_t* sad_array);
 
@@ -5903,12 +5918,12 @@
 
 void vpx_sad32x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x64x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x64x4d vpx_sad32x64x4d_sse2
@@ -5953,12 +5968,12 @@
 
 void vpx_sad4x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x4x4d_sse2(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad4x4x4d vpx_sad4x4x4d_sse2
@@ -6003,12 +6018,12 @@
 
 void vpx_sad4x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x8x4d_sse2(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad4x8x4d vpx_sad4x8x4d_sse2
@@ -6053,12 +6068,12 @@
 
 void vpx_sad64x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x32x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad64x32x4d vpx_sad64x32x4d_sse2
@@ -6103,22 +6118,22 @@
 
 void vpx_sad64x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x64x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 void vpx_sad64x64x4d_avx2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 RTCD_EXTERN void (*vpx_sad64x64x4d)(const uint8_t* src_ptr,
                                     int src_stride,
-                                    const uint8_t* const ref_ptr[],
+                                    const uint8_t* const ref_array[],
                                     int ref_stride,
                                     uint32_t* sad_array);
 
@@ -6162,12 +6177,12 @@
 
 void vpx_sad8x16x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad8x16x4d_sse2(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 #define vpx_sad8x16x4d vpx_sad8x16x4d_sse2
@@ -6212,12 +6227,12 @@
 
 void vpx_sad8x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x4x4d_sse2(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad8x4x4d vpx_sad8x4x4d_sse2
@@ -6262,12 +6277,12 @@
 
 void vpx_sad8x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x8x4d_sse2(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad8x8x4d vpx_sad8x8x4d_sse2
@@ -6393,850 +6408,850 @@
 #define vpx_scaled_vert vpx_scaled_vert_c
 
 uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x16_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x16)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x32_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x32)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x8_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x8_ssse3(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x8)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x16_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x16)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x32_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x32_avx2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x32)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x64_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x64)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x4_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x4_ssse3(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x4)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x8_ssse3(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x8)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x32_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x32)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x64_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x64_avx2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x64)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x16_ssse3(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x16)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x4_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x4_ssse3(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x4)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x8_ssse3(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x8)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x16_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x16_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x16)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x32_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x32_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x32)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x8_sse2(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x8_ssse3(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x8)(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x16_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x16_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x16)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x32_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x32_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x32_avx2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x32)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x64_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x64_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x64)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x4_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x4_ssse3(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x4)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x8_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x8_ssse3(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x8)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x32_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x32_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x32)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x64_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x64_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x64_avx2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x64)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x16_sse2(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x16_ssse3(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x16)(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x4_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x4_ssse3(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x4)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x8_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x8_ssse3(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x8)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -7264,315 +7279,315 @@
 #define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_sse2
 
 void vpx_tm_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_16x16_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_sse2
 
 void vpx_tm_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_32x32_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_sse2
 
 void vpx_tm_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_4x4_sse2(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_sse2
 
 void vpx_tm_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_8x8_sse2(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_sse2
 
 void vpx_v_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_16x16_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_v_predictor_16x16 vpx_v_predictor_16x16_sse2
 
 void vpx_v_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_32x32_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_v_predictor_32x32 vpx_v_predictor_32x32_sse2
 
 void vpx_v_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_4x4_sse2(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_v_predictor_4x4 vpx_v_predictor_4x4_sse2
 
 void vpx_v_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_8x8_sse2(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_v_predictor_8x8 vpx_v_predictor_8x8_sse2
 
 unsigned int vpx_variance16x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x16_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance16x16_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance16x16)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance16x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x32_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance16x32_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance16x32)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance16x8_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance16x8_sse2(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 unsigned int vpx_variance16x8_avx2(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance16x8)(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 
 unsigned int vpx_variance32x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x16_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance32x16_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance32x16)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance32x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x32_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance32x32_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance32x32)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance32x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x64_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance32x64_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance32x64)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance4x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x4_sse2(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance4x4 vpx_variance4x4_sse2
 
 unsigned int vpx_variance4x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x8_sse2(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance4x8 vpx_variance4x8_sse2
 
 unsigned int vpx_variance64x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x32_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance64x32_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance64x32)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance64x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x64_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance64x64_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance64x64)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance8x16_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance8x16_sse2(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 #define vpx_variance8x16 vpx_variance8x16_sse2
 
 unsigned int vpx_variance8x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x4_sse2(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance8x4 vpx_variance8x4_sse2
 
 unsigned int vpx_variance8x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x8_sse2(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance8x8 vpx_variance8x8_sse2
 
 void vpx_ve_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c
diff --git a/third_party/libvpx/source/config/mac/ia32/vp8_rtcd.h b/third_party/libvpx/source/config/mac/ia32/vp8_rtcd.h
index 850ca91..c46bfe5 100644
--- a/third_party/libvpx/source/config/mac/ia32/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/mac/ia32/vp8_rtcd.h
@@ -27,90 +27,90 @@
 extern "C" {
 #endif
 
-void vp8_bilinear_predict16x16_c(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_bilinear_predict16x16_c(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-void vp8_bilinear_predict16x16_sse2(unsigned char* src,
-                                    int src_pitch,
-                                    int xofst,
-                                    int yofst,
-                                    unsigned char* dst,
+void vp8_bilinear_predict16x16_sse2(unsigned char* src_ptr,
+                                    int src_pixels_per_line,
+                                    int xoffset,
+                                    int yoffset,
+                                    unsigned char* dst_ptr,
                                     int dst_pitch);
-void vp8_bilinear_predict16x16_ssse3(unsigned char* src,
-                                     int src_pitch,
-                                     int xofst,
-                                     int yofst,
-                                     unsigned char* dst,
+void vp8_bilinear_predict16x16_ssse3(unsigned char* src_ptr,
+                                     int src_pixels_per_line,
+                                     int xoffset,
+                                     int yoffset,
+                                     unsigned char* dst_ptr,
                                      int dst_pitch);
-RTCD_EXTERN void (*vp8_bilinear_predict16x16)(unsigned char* src,
-                                              int src_pitch,
-                                              int xofst,
-                                              int yofst,
-                                              unsigned char* dst,
+RTCD_EXTERN void (*vp8_bilinear_predict16x16)(unsigned char* src_ptr,
+                                              int src_pixels_per_line,
+                                              int xoffset,
+                                              int yoffset,
+                                              unsigned char* dst_ptr,
                                               int dst_pitch);
 
-void vp8_bilinear_predict4x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict4x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict4x4_sse2(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict4x4_sse2(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_sse2
 
-void vp8_bilinear_predict8x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x4_sse2(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x4_sse2(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_sse2
 
-void vp8_bilinear_predict8x8_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x8_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x8_sse2(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x8_sse2(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
-void vp8_bilinear_predict8x8_ssse3(unsigned char* src,
-                                   int src_pitch,
-                                   int xofst,
-                                   int yofst,
-                                   unsigned char* dst,
+void vp8_bilinear_predict8x8_ssse3(unsigned char* src_ptr,
+                                   int src_pixels_per_line,
+                                   int xoffset,
+                                   int yoffset,
+                                   unsigned char* dst_ptr,
                                    int dst_pitch);
-RTCD_EXTERN void (*vp8_bilinear_predict8x8)(unsigned char* src,
-                                            int src_pitch,
-                                            int xofst,
-                                            int yofst,
-                                            unsigned char* dst,
+RTCD_EXTERN void (*vp8_bilinear_predict8x8)(unsigned char* src_ptr,
+                                            int src_pixels_per_line,
+                                            int xoffset,
+                                            int yoffset,
+                                            unsigned char* dst_ptr,
                                             int dst_pitch);
 
 void vp8_blend_b_c(unsigned char* y,
                    unsigned char* u,
                    unsigned char* v,
-                   int y1,
-                   int u1,
-                   int v1,
+                   int y_1,
+                   int u_1,
+                   int v_1,
                    int alpha,
                    int stride);
 #define vp8_blend_b vp8_blend_b_c
@@ -118,9 +118,9 @@
 void vp8_blend_mb_inner_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_inner vp8_blend_mb_inner_c
@@ -128,9 +128,9 @@
 void vp8_blend_mb_outer_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_outer vp8_blend_mb_outer_c
@@ -140,65 +140,65 @@
 #define vp8_block_error vp8_block_error_sse2
 
 void vp8_copy32xn_c(const unsigned char* src_ptr,
-                    int source_stride,
+                    int src_stride,
                     unsigned char* dst_ptr,
                     int dst_stride,
-                    int n);
+                    int height);
 void vp8_copy32xn_sse2(const unsigned char* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        unsigned char* dst_ptr,
                        int dst_stride,
-                       int n);
+                       int height);
 void vp8_copy32xn_sse3(const unsigned char* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        unsigned char* dst_ptr,
                        int dst_stride,
-                       int n);
+                       int height);
 RTCD_EXTERN void (*vp8_copy32xn)(const unsigned char* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  unsigned char* dst_ptr,
                                  int dst_stride,
-                                 int n);
+                                 int height);
 
 void vp8_copy_mem16x16_c(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 void vp8_copy_mem16x16_sse2(unsigned char* src,
-                            int src_pitch,
+                            int src_stride,
                             unsigned char* dst,
-                            int dst_pitch);
+                            int dst_stride);
 #define vp8_copy_mem16x16 vp8_copy_mem16x16_sse2
 
 void vp8_copy_mem8x4_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 void vp8_copy_mem8x4_mmx(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 #define vp8_copy_mem8x4 vp8_copy_mem8x4_mmx
 
 void vp8_copy_mem8x8_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 void vp8_copy_mem8x8_mmx(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 #define vp8_copy_mem8x8 vp8_copy_mem8x8_mmx
 
-void vp8_dc_only_idct_add_c(short input,
-                            unsigned char* pred,
+void vp8_dc_only_idct_add_c(short input_dc,
+                            unsigned char* pred_ptr,
                             int pred_stride,
-                            unsigned char* dst,
+                            unsigned char* dst_ptr,
                             int dst_stride);
-void vp8_dc_only_idct_add_mmx(short input,
-                              unsigned char* pred,
+void vp8_dc_only_idct_add_mmx(short input_dc,
+                              unsigned char* pred_ptr,
                               int pred_stride,
-                              unsigned char* dst,
+                              unsigned char* dst_ptr,
                               int dst_stride);
 #define vp8_dc_only_idct_add vp8_dc_only_idct_add_mmx
 
@@ -240,11 +240,11 @@
 
 void vp8_dequant_idct_add_c(short* input,
                             short* dq,
-                            unsigned char* output,
+                            unsigned char* dest,
                             int stride);
 void vp8_dequant_idct_add_mmx(short* input,
                               short* dq,
-                              unsigned char* output,
+                              unsigned char* dest,
                               int stride);
 #define vp8_dequant_idct_add vp8_dequant_idct_add_mmx
 
@@ -274,8 +274,8 @@
                                        char* eobs);
 #define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_sse2
 
-void vp8_dequantize_b_c(struct blockd*, short* dqc);
-void vp8_dequantize_b_mmx(struct blockd*, short* dqc);
+void vp8_dequantize_b_c(struct blockd*, short* DQC);
+void vp8_dequantize_b_mmx(struct blockd*, short* DQC);
 #define vp8_dequantize_b vp8_dequantize_b_mmx
 
 int vp8_diamond_search_sad_c(struct macroblock* x,
@@ -375,91 +375,91 @@
                                        int* mvcost[2],
                                        union int_mv* center_mv);
 
-void vp8_loop_filter_bh_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bh_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bh_sse2(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bh_sse2(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
 #define vp8_loop_filter_bh vp8_loop_filter_bh_sse2
 
-void vp8_loop_filter_bv_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bv_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bv_sse2(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bv_sse2(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
 #define vp8_loop_filter_bv vp8_loop_filter_bv_sse2
 
-void vp8_loop_filter_mbh_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbh_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbh_sse2(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbh_sse2(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbh vp8_loop_filter_mbh_sse2
 
-void vp8_loop_filter_mbv_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbv_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbv_sse2(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbv_sse2(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbv vp8_loop_filter_mbv_sse2
 
-void vp8_loop_filter_bhs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bhs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bhs_sse2(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bhs_sse2(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_sse2
 
-void vp8_loop_filter_bvs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bvs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bvs_sse2(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bvs_sse2(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_sse2
 
-void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y,
-                                              int ystride,
+void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y_ptr,
+                                              int y_stride,
                                               const unsigned char* blimit);
-void vp8_loop_filter_simple_horizontal_edge_sse2(unsigned char* y,
-                                                 int ystride,
+void vp8_loop_filter_simple_horizontal_edge_sse2(unsigned char* y_ptr,
+                                                 int y_stride,
                                                  const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbh vp8_loop_filter_simple_horizontal_edge_sse2
 
-void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y,
-                                            int ystride,
+void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y_ptr,
+                                            int y_stride,
                                             const unsigned char* blimit);
-void vp8_loop_filter_simple_vertical_edge_sse2(unsigned char* y,
-                                               int ystride,
+void vp8_loop_filter_simple_vertical_edge_sse2(unsigned char* y_ptr,
+                                               int y_stride,
                                                const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbv vp8_loop_filter_simple_vertical_edge_sse2
 
@@ -475,8 +475,8 @@
                               struct block* b,
                               struct blockd* d,
                               union int_mv* ref_mv,
-                              int sad_per_bit,
-                              int distance,
+                              int error_per_bit,
+                              int search_range,
                               struct variance_vtable* fn_ptr,
                               int* mvcost[2],
                               union int_mv* center_mv);
@@ -484,8 +484,8 @@
                               struct block* b,
                               struct blockd* d,
                               union int_mv* ref_mv,
-                              int sad_per_bit,
-                              int distance,
+                              int error_per_bit,
+                              int search_range,
                               struct variance_vtable* fn_ptr,
                               int* mvcost[2],
                               union int_mv* center_mv);
@@ -505,126 +505,126 @@
 #define vp8_short_fdct8x4 vp8_short_fdct8x4_sse2
 
 void vp8_short_idct4x4llm_c(short* input,
-                            unsigned char* pred,
-                            int pitch,
-                            unsigned char* dst,
+                            unsigned char* pred_ptr,
+                            int pred_stride,
+                            unsigned char* dst_ptr,
                             int dst_stride);
 void vp8_short_idct4x4llm_mmx(short* input,
-                              unsigned char* pred,
-                              int pitch,
-                              unsigned char* dst,
+                              unsigned char* pred_ptr,
+                              int pred_stride,
+                              unsigned char* dst_ptr,
                               int dst_stride);
 #define vp8_short_idct4x4llm vp8_short_idct4x4llm_mmx
 
-void vp8_short_inv_walsh4x4_c(short* input, short* output);
-void vp8_short_inv_walsh4x4_sse2(short* input, short* output);
+void vp8_short_inv_walsh4x4_c(short* input, short* mb_dqcoeff);
+void vp8_short_inv_walsh4x4_sse2(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_sse2
 
-void vp8_short_inv_walsh4x4_1_c(short* input, short* output);
+void vp8_short_inv_walsh4x4_1_c(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c
 
 void vp8_short_walsh4x4_c(short* input, short* output, int pitch);
 void vp8_short_walsh4x4_sse2(short* input, short* output, int pitch);
 #define vp8_short_walsh4x4 vp8_short_walsh4x4_sse2
 
-void vp8_sixtap_predict16x16_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_sixtap_predict16x16_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_sixtap_predict16x16_sse2(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_sixtap_predict16x16_sse2(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
-void vp8_sixtap_predict16x16_ssse3(unsigned char* src,
-                                   int src_pitch,
-                                   int xofst,
-                                   int yofst,
-                                   unsigned char* dst,
+void vp8_sixtap_predict16x16_ssse3(unsigned char* src_ptr,
+                                   int src_pixels_per_line,
+                                   int xoffset,
+                                   int yoffset,
+                                   unsigned char* dst_ptr,
                                    int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict16x16)(unsigned char* src,
-                                            int src_pitch,
-                                            int xofst,
-                                            int yofst,
-                                            unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict16x16)(unsigned char* src_ptr,
+                                            int src_pixels_per_line,
+                                            int xoffset,
+                                            int yoffset,
+                                            unsigned char* dst_ptr,
                                             int dst_pitch);
 
-void vp8_sixtap_predict4x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict4x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict4x4_mmx(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_sixtap_predict4x4_mmx(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_sixtap_predict4x4_ssse3(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_sixtap_predict4x4_ssse3(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict4x4)(unsigned char* src,
-                                          int src_pitch,
-                                          int xofst,
-                                          int yofst,
-                                          unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict4x4)(unsigned char* src_ptr,
+                                          int src_pixels_per_line,
+                                          int xoffset,
+                                          int yoffset,
+                                          unsigned char* dst_ptr,
                                           int dst_pitch);
 
-void vp8_sixtap_predict8x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x4_sse2(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x4_sse2(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
-void vp8_sixtap_predict8x4_ssse3(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_sixtap_predict8x4_ssse3(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict8x4)(unsigned char* src,
-                                          int src_pitch,
-                                          int xofst,
-                                          int yofst,
-                                          unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict8x4)(unsigned char* src_ptr,
+                                          int src_pixels_per_line,
+                                          int xoffset,
+                                          int yoffset,
+                                          unsigned char* dst_ptr,
                                           int dst_pitch);
 
-void vp8_sixtap_predict8x8_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x8_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x8_sse2(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x8_sse2(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
-void vp8_sixtap_predict8x8_ssse3(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_sixtap_predict8x8_ssse3(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict8x8)(unsigned char* src,
-                                          int src_pitch,
-                                          int xofst,
-                                          int yofst,
-                                          unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict8x8)(unsigned char* src_ptr,
+                                          int src_pixels_per_line,
+                                          int xoffset,
+                                          int yoffset,
+                                          unsigned char* dst_ptr,
                                           int dst_pitch);
 
 void vp8_rtcd(void);
diff --git a/third_party/libvpx/source/config/mac/ia32/vp9_rtcd.h b/third_party/libvpx/source/config/mac/ia32/vp9_rtcd.h
index 1e1da43..603bd31 100644
--- a/third_party/libvpx/source/config/mac/ia32/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/mac/ia32/vp9_rtcd.h
@@ -242,18 +242,18 @@
 #define vp9_highbd_fwht4x4 vp9_highbd_fwht4x4_c
 
 void vp9_highbd_iht16x16_256_add_c(const tran_low_t* input,
-                                   uint16_t* output,
-                                   int pitch,
+                                   uint16_t* dest,
+                                   int stride,
                                    int tx_type,
                                    int bd);
 void vp9_highbd_iht16x16_256_add_sse4_1(const tran_low_t* input,
-                                        uint16_t* output,
-                                        int pitch,
+                                        uint16_t* dest,
+                                        int stride,
                                         int tx_type,
                                         int bd);
 RTCD_EXTERN void (*vp9_highbd_iht16x16_256_add)(const tran_low_t* input,
-                                                uint16_t* output,
-                                                int pitch,
+                                                uint16_t* dest,
+                                                int stride,
                                                 int tx_type,
                                                 int bd);
 
@@ -351,12 +351,12 @@
 #define vp9_highbd_temporal_filter_apply vp9_highbd_temporal_filter_apply_c
 
 void vp9_iht16x16_256_add_c(const tran_low_t* input,
-                            uint8_t* output,
-                            int pitch,
+                            uint8_t* dest,
+                            int stride,
                             int tx_type);
 void vp9_iht16x16_256_add_sse2(const tran_low_t* input,
-                               uint8_t* output,
-                               int pitch,
+                               uint8_t* dest,
+                               int stride,
                                int tx_type);
 #define vp9_iht16x16_256_add vp9_iht16x16_256_add_sse2
 
diff --git a/third_party/libvpx/source/config/mac/ia32/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/mac/ia32/vpx_dsp_rtcd.h
index 14d1107..b2b02a5 100644
--- a/third_party/libvpx/source/config/mac/ia32/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/mac/ia32/vpx_dsp_rtcd.h
@@ -427,420 +427,420 @@
 #define vpx_convolve_copy vpx_convolve_copy_sse2
 
 void vpx_d117_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c
 
 void vpx_d117_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c
 
 void vpx_d117_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c
 
 void vpx_d117_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c
 
 void vpx_d135_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_c
 
 void vpx_d135_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_c
 
 void vpx_d135_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_c
 
 void vpx_d135_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_c
 
 void vpx_d153_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d153_predictor_16x16_ssse3(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_d153_predictor_16x16)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d153_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d153_predictor_32x32_ssse3(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_d153_predictor_32x32)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d153_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d153_predictor_4x4_ssse3(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 RTCD_EXTERN void (*vpx_d153_predictor_4x4)(uint8_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint8_t* above,
                                            const uint8_t* left);
 
 void vpx_d153_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d153_predictor_8x8_ssse3(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 RTCD_EXTERN void (*vpx_d153_predictor_8x8)(uint8_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint8_t* above,
                                            const uint8_t* left);
 
 void vpx_d207_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d207_predictor_16x16_ssse3(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_d207_predictor_16x16)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d207_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d207_predictor_32x32_ssse3(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_d207_predictor_32x32)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d207_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d207_predictor_4x4_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_sse2
 
 void vpx_d207_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d207_predictor_8x8_ssse3(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 RTCD_EXTERN void (*vpx_d207_predictor_8x8)(uint8_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint8_t* above,
                                            const uint8_t* left);
 
 void vpx_d45_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_16x16_ssse3(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d45_predictor_16x16)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d45_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_32x32_ssse3(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d45_predictor_32x32)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d45_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_4x4_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_sse2
 
 void vpx_d45_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_8x8_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_sse2
 
 void vpx_d45e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c
 
 void vpx_d63_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d63_predictor_16x16_ssse3(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d63_predictor_16x16)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d63_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d63_predictor_32x32_ssse3(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d63_predictor_32x32)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d63_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d63_predictor_4x4_ssse3(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 RTCD_EXTERN void (*vpx_d63_predictor_4x4)(uint8_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint8_t* above,
                                           const uint8_t* left);
 
 void vpx_d63_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d63_predictor_8x8_ssse3(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 RTCD_EXTERN void (*vpx_d63_predictor_8x8)(uint8_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint8_t* above,
                                           const uint8_t* left);
 
 void vpx_d63e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c
 
 void vpx_dc_128_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_16x16_sse2(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_sse2
 
 void vpx_dc_128_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_32x32_sse2(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_sse2
 
 void vpx_dc_128_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_4x4_sse2(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_sse2
 
 void vpx_dc_128_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_8x8_sse2(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_sse2
 
 void vpx_dc_left_predictor_16x16_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_16x16_sse2(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 #define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_sse2
 
 void vpx_dc_left_predictor_32x32_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_32x32_sse2(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 #define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_sse2
 
 void vpx_dc_left_predictor_4x4_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_4x4_sse2(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 #define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_sse2
 
 void vpx_dc_left_predictor_8x8_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_8x8_sse2(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 #define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_sse2
 
 void vpx_dc_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_16x16_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_sse2
 
 void vpx_dc_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_32x32_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_sse2
 
 void vpx_dc_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_4x4_sse2(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_sse2
 
 void vpx_dc_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_8x8_sse2(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_sse2
 
 void vpx_dc_top_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_16x16_sse2(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_sse2
 
 void vpx_dc_top_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_32x32_sse2(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_sse2
 
 void vpx_dc_top_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_4x4_sse2(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_sse2
 
 void vpx_dc_top_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_8x8_sse2(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_sse2
@@ -884,44 +884,44 @@
 #define vpx_fdct8x8_1 vpx_fdct8x8_1_sse2
 
 void vpx_get16x16var_c(const uint8_t* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        const uint8_t* ref_ptr,
                        int ref_stride,
                        unsigned int* sse,
                        int* sum);
 void vpx_get16x16var_sse2(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
                           int ref_stride,
                           unsigned int* sse,
                           int* sum);
 void vpx_get16x16var_avx2(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
                           int ref_stride,
                           unsigned int* sse,
                           int* sum);
 RTCD_EXTERN void (*vpx_get16x16var)(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse,
                                     int* sum);
 
 unsigned int vpx_get4x4sse_cs_c(const unsigned char* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const unsigned char* ref_ptr,
                                 int ref_stride);
 #define vpx_get4x4sse_cs vpx_get4x4sse_cs_c
 
 void vpx_get8x8var_c(const uint8_t* src_ptr,
-                     int source_stride,
+                     int src_stride,
                      const uint8_t* ref_ptr,
                      int ref_stride,
                      unsigned int* sse,
                      int* sum);
 void vpx_get8x8var_sse2(const uint8_t* src_ptr,
-                        int source_stride,
+                        int src_stride,
                         const uint8_t* ref_ptr,
                         int ref_stride,
                         unsigned int* sse,
@@ -933,41 +933,41 @@
 #define vpx_get_mb_ss vpx_get_mb_ss_sse2
 
 void vpx_h_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_16x16_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_h_predictor_16x16 vpx_h_predictor_16x16_sse2
 
 void vpx_h_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_32x32_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_h_predictor_32x32 vpx_h_predictor_32x32_sse2
 
 void vpx_h_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_4x4_sse2(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_h_predictor_4x4 vpx_h_predictor_4x4_sse2
 
 void vpx_h_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_8x8_sse2(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_h_predictor_8x8 vpx_h_predictor_8x8_sse2
@@ -1007,13 +1007,13 @@
 #define vpx_hadamard_8x8 vpx_hadamard_8x8_sse2
 
 void vpx_he_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c
 
 void vpx_highbd_10_get16x16var_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse,
@@ -1021,7 +1021,7 @@
 #define vpx_highbd_10_get16x16var vpx_highbd_10_get16x16var_c
 
 void vpx_highbd_10_get8x8var_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse,
@@ -1029,57 +1029,57 @@
 #define vpx_highbd_10_get8x8var vpx_highbd_10_get8x8var_c
 
 unsigned int vpx_highbd_10_mse16x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 unsigned int vpx_highbd_10_mse16x16_sse2(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
-                                         int recon_stride,
+                                         int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_mse16x16 vpx_highbd_10_mse16x16_sse2
 
 unsigned int vpx_highbd_10_mse16x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_10_mse16x8 vpx_highbd_10_mse16x8_c
 
 unsigned int vpx_highbd_10_mse8x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_10_mse8x16 vpx_highbd_10_mse8x16_c
 
 unsigned int vpx_highbd_10_mse8x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_highbd_10_mse8x8_sse2(const uint8_t* src_ptr,
-                                       int source_stride,
+                                       int src_stride,
                                        const uint8_t* ref_ptr,
-                                       int recon_stride,
+                                       int ref_stride,
                                        unsigned int* sse);
 #define vpx_highbd_10_mse8x8 vpx_highbd_10_mse8x8_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1089,18 +1089,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1109,18 +1109,18 @@
   vpx_highbd_10_sub_pixel_avg_variance16x32_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1130,18 +1130,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1151,18 +1151,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1172,18 +1172,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1192,9 +1192,9 @@
   vpx_highbd_10_sub_pixel_avg_variance32x64_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1203,9 +1203,9 @@
   vpx_highbd_10_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1215,18 +1215,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1236,18 +1236,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1256,18 +1256,18 @@
   vpx_highbd_10_sub_pixel_avg_variance64x64_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1276,18 +1276,18 @@
   vpx_highbd_10_sub_pixel_avg_variance8x16_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1296,18 +1296,18 @@
   vpx_highbd_10_sub_pixel_avg_variance8x4_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1316,16 +1316,16 @@
   vpx_highbd_10_sub_pixel_avg_variance8x8_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance16x16_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1333,16 +1333,16 @@
   vpx_highbd_10_sub_pixel_variance16x16_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance16x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1350,16 +1350,16 @@
   vpx_highbd_10_sub_pixel_variance16x32_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance16x8_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -1367,16 +1367,16 @@
   vpx_highbd_10_sub_pixel_variance16x8_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance32x16_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1384,16 +1384,16 @@
   vpx_highbd_10_sub_pixel_variance32x16_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance32x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1401,16 +1401,16 @@
   vpx_highbd_10_sub_pixel_variance32x32_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance32x64_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1418,9 +1418,9 @@
   vpx_highbd_10_sub_pixel_variance32x64_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1428,9 +1428,9 @@
   vpx_highbd_10_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1438,16 +1438,16 @@
   vpx_highbd_10_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance64x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1455,16 +1455,16 @@
   vpx_highbd_10_sub_pixel_variance64x32_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance64x64_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1472,16 +1472,16 @@
   vpx_highbd_10_sub_pixel_variance64x64_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance8x16_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -1489,16 +1489,16 @@
   vpx_highbd_10_sub_pixel_variance8x16_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance8x4_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -1506,16 +1506,16 @@
   vpx_highbd_10_sub_pixel_variance8x4_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance8x8_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -1523,148 +1523,148 @@
   vpx_highbd_10_sub_pixel_variance8x8_sse2
 
 unsigned int vpx_highbd_10_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance16x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance16x16 vpx_highbd_10_variance16x16_sse2
 
 unsigned int vpx_highbd_10_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance16x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance16x32 vpx_highbd_10_variance16x32_sse2
 
 unsigned int vpx_highbd_10_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_10_variance16x8_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_10_variance16x8 vpx_highbd_10_variance16x8_sse2
 
 unsigned int vpx_highbd_10_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance32x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance32x16 vpx_highbd_10_variance32x16_sse2
 
 unsigned int vpx_highbd_10_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance32x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance32x32 vpx_highbd_10_variance32x32_sse2
 
 unsigned int vpx_highbd_10_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance32x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance32x64 vpx_highbd_10_variance32x64_sse2
 
 unsigned int vpx_highbd_10_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance4x4 vpx_highbd_10_variance4x4_c
 
 unsigned int vpx_highbd_10_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance4x8 vpx_highbd_10_variance4x8_c
 
 unsigned int vpx_highbd_10_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance64x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance64x32 vpx_highbd_10_variance64x32_sse2
 
 unsigned int vpx_highbd_10_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance64x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance64x64 vpx_highbd_10_variance64x64_sse2
 
 unsigned int vpx_highbd_10_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_10_variance8x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_10_variance8x16 vpx_highbd_10_variance8x16_sse2
 
 unsigned int vpx_highbd_10_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance8x4 vpx_highbd_10_variance8x4_c
 
 unsigned int vpx_highbd_10_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 unsigned int vpx_highbd_10_variance8x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 #define vpx_highbd_10_variance8x8 vpx_highbd_10_variance8x8_sse2
 
 void vpx_highbd_12_get16x16var_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse,
@@ -1672,7 +1672,7 @@
 #define vpx_highbd_12_get16x16var vpx_highbd_12_get16x16var_c
 
 void vpx_highbd_12_get8x8var_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse,
@@ -1680,57 +1680,57 @@
 #define vpx_highbd_12_get8x8var vpx_highbd_12_get8x8var_c
 
 unsigned int vpx_highbd_12_mse16x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 unsigned int vpx_highbd_12_mse16x16_sse2(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
-                                         int recon_stride,
+                                         int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_mse16x16 vpx_highbd_12_mse16x16_sse2
 
 unsigned int vpx_highbd_12_mse16x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_12_mse16x8 vpx_highbd_12_mse16x8_c
 
 unsigned int vpx_highbd_12_mse8x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_12_mse8x16 vpx_highbd_12_mse8x16_c
 
 unsigned int vpx_highbd_12_mse8x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_highbd_12_mse8x8_sse2(const uint8_t* src_ptr,
-                                       int source_stride,
+                                       int src_stride,
                                        const uint8_t* ref_ptr,
-                                       int recon_stride,
+                                       int ref_stride,
                                        unsigned int* sse);
 #define vpx_highbd_12_mse8x8 vpx_highbd_12_mse8x8_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1740,18 +1740,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1760,18 +1760,18 @@
   vpx_highbd_12_sub_pixel_avg_variance16x32_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1781,18 +1781,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1802,18 +1802,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1823,18 +1823,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1843,9 +1843,9 @@
   vpx_highbd_12_sub_pixel_avg_variance32x64_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1854,9 +1854,9 @@
   vpx_highbd_12_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1866,18 +1866,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1887,18 +1887,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1907,18 +1907,18 @@
   vpx_highbd_12_sub_pixel_avg_variance64x64_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1927,18 +1927,18 @@
   vpx_highbd_12_sub_pixel_avg_variance8x16_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1947,18 +1947,18 @@
   vpx_highbd_12_sub_pixel_avg_variance8x4_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1967,16 +1967,16 @@
   vpx_highbd_12_sub_pixel_avg_variance8x8_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance16x16_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1984,16 +1984,16 @@
   vpx_highbd_12_sub_pixel_variance16x16_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance16x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2001,16 +2001,16 @@
   vpx_highbd_12_sub_pixel_variance16x32_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance16x8_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2018,16 +2018,16 @@
   vpx_highbd_12_sub_pixel_variance16x8_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance32x16_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2035,16 +2035,16 @@
   vpx_highbd_12_sub_pixel_variance32x16_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance32x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2052,16 +2052,16 @@
   vpx_highbd_12_sub_pixel_variance32x32_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance32x64_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2069,9 +2069,9 @@
   vpx_highbd_12_sub_pixel_variance32x64_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -2079,9 +2079,9 @@
   vpx_highbd_12_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -2089,16 +2089,16 @@
   vpx_highbd_12_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance64x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2106,16 +2106,16 @@
   vpx_highbd_12_sub_pixel_variance64x32_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance64x64_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2123,16 +2123,16 @@
   vpx_highbd_12_sub_pixel_variance64x64_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance8x16_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2140,16 +2140,16 @@
   vpx_highbd_12_sub_pixel_variance8x16_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance8x4_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -2157,16 +2157,16 @@
   vpx_highbd_12_sub_pixel_variance8x4_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance8x8_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -2174,148 +2174,148 @@
   vpx_highbd_12_sub_pixel_variance8x8_sse2
 
 unsigned int vpx_highbd_12_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance16x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance16x16 vpx_highbd_12_variance16x16_sse2
 
 unsigned int vpx_highbd_12_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance16x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance16x32 vpx_highbd_12_variance16x32_sse2
 
 unsigned int vpx_highbd_12_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_12_variance16x8_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_12_variance16x8 vpx_highbd_12_variance16x8_sse2
 
 unsigned int vpx_highbd_12_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance32x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance32x16 vpx_highbd_12_variance32x16_sse2
 
 unsigned int vpx_highbd_12_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance32x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance32x32 vpx_highbd_12_variance32x32_sse2
 
 unsigned int vpx_highbd_12_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance32x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance32x64 vpx_highbd_12_variance32x64_sse2
 
 unsigned int vpx_highbd_12_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance4x4 vpx_highbd_12_variance4x4_c
 
 unsigned int vpx_highbd_12_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance4x8 vpx_highbd_12_variance4x8_c
 
 unsigned int vpx_highbd_12_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance64x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance64x32 vpx_highbd_12_variance64x32_sse2
 
 unsigned int vpx_highbd_12_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance64x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance64x64 vpx_highbd_12_variance64x64_sse2
 
 unsigned int vpx_highbd_12_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_12_variance8x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_12_variance8x16 vpx_highbd_12_variance8x16_sse2
 
 unsigned int vpx_highbd_12_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance8x4 vpx_highbd_12_variance8x4_c
 
 unsigned int vpx_highbd_12_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 unsigned int vpx_highbd_12_variance8x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 #define vpx_highbd_12_variance8x8 vpx_highbd_12_variance8x8_sse2
 
 void vpx_highbd_8_get16x16var_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse,
@@ -2323,7 +2323,7 @@
 #define vpx_highbd_8_get16x16var vpx_highbd_8_get16x16var_c
 
 void vpx_highbd_8_get8x8var_c(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
                               int ref_stride,
                               unsigned int* sse,
@@ -2331,56 +2331,56 @@
 #define vpx_highbd_8_get8x8var vpx_highbd_8_get8x8var_c
 
 unsigned int vpx_highbd_8_mse16x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 unsigned int vpx_highbd_8_mse16x16_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
-                                        int recon_stride,
+                                        int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_mse16x16 vpx_highbd_8_mse16x16_sse2
 
 unsigned int vpx_highbd_8_mse16x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_8_mse16x8 vpx_highbd_8_mse16x8_c
 
 unsigned int vpx_highbd_8_mse8x16_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_8_mse8x16 vpx_highbd_8_mse8x16_c
 
 unsigned int vpx_highbd_8_mse8x8_c(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
-                                   int recon_stride,
+                                   int ref_stride,
                                    unsigned int* sse);
 unsigned int vpx_highbd_8_mse8x8_sse2(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 #define vpx_highbd_8_mse8x8 vpx_highbd_8_mse8x8_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2389,18 +2389,18 @@
   vpx_highbd_8_sub_pixel_avg_variance16x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2409,18 +2409,18 @@
   vpx_highbd_8_sub_pixel_avg_variance16x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2429,18 +2429,18 @@
   vpx_highbd_8_sub_pixel_avg_variance16x8_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2449,18 +2449,18 @@
   vpx_highbd_8_sub_pixel_avg_variance32x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2469,18 +2469,18 @@
   vpx_highbd_8_sub_pixel_avg_variance32x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2489,9 +2489,9 @@
   vpx_highbd_8_sub_pixel_avg_variance32x64_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -2500,9 +2500,9 @@
   vpx_highbd_8_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -2511,18 +2511,18 @@
   vpx_highbd_8_sub_pixel_avg_variance4x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2531,18 +2531,18 @@
   vpx_highbd_8_sub_pixel_avg_variance64x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2551,18 +2551,18 @@
   vpx_highbd_8_sub_pixel_avg_variance64x64_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2571,18 +2571,18 @@
   vpx_highbd_8_sub_pixel_avg_variance8x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
                                                   const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2591,18 +2591,18 @@
   vpx_highbd_8_sub_pixel_avg_variance8x4_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
                                                   const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2611,16 +2611,16 @@
   vpx_highbd_8_sub_pixel_avg_variance8x8_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance16x16_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2628,16 +2628,16 @@
   vpx_highbd_8_sub_pixel_variance16x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance16x32_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2645,16 +2645,16 @@
   vpx_highbd_8_sub_pixel_variance16x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance16x8_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -2662,16 +2662,16 @@
   vpx_highbd_8_sub_pixel_variance16x8_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance32x16_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2679,16 +2679,16 @@
   vpx_highbd_8_sub_pixel_variance32x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance32x32_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2696,16 +2696,16 @@
   vpx_highbd_8_sub_pixel_variance32x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance32x64_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2713,34 +2713,34 @@
   vpx_highbd_8_sub_pixel_variance32x64_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance4x4 vpx_highbd_8_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance4x8 vpx_highbd_8_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance64x32_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2748,16 +2748,16 @@
   vpx_highbd_8_sub_pixel_variance64x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance64x64_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2765,16 +2765,16 @@
   vpx_highbd_8_sub_pixel_variance64x64_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance8x16_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -2782,16 +2782,16 @@
   vpx_highbd_8_sub_pixel_variance8x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance8x4_sse2(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -2799,16 +2799,16 @@
   vpx_highbd_8_sub_pixel_variance8x4_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance8x8_sse2(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -2816,152 +2816,152 @@
   vpx_highbd_8_sub_pixel_variance8x8_sse2
 
 unsigned int vpx_highbd_8_variance16x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance16x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance16x16 vpx_highbd_8_variance16x16_sse2
 
 unsigned int vpx_highbd_8_variance16x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance16x32_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance16x32 vpx_highbd_8_variance16x32_sse2
 
 unsigned int vpx_highbd_8_variance16x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 unsigned int vpx_highbd_8_variance16x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 #define vpx_highbd_8_variance16x8 vpx_highbd_8_variance16x8_sse2
 
 unsigned int vpx_highbd_8_variance32x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance32x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance32x16 vpx_highbd_8_variance32x16_sse2
 
 unsigned int vpx_highbd_8_variance32x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance32x32_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance32x32 vpx_highbd_8_variance32x32_sse2
 
 unsigned int vpx_highbd_8_variance32x64_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance32x64_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance32x64 vpx_highbd_8_variance32x64_sse2
 
 unsigned int vpx_highbd_8_variance4x4_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance4x4 vpx_highbd_8_variance4x4_c
 
 unsigned int vpx_highbd_8_variance4x8_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance4x8 vpx_highbd_8_variance4x8_c
 
 unsigned int vpx_highbd_8_variance64x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance64x32_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance64x32 vpx_highbd_8_variance64x32_sse2
 
 unsigned int vpx_highbd_8_variance64x64_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance64x64_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance64x64 vpx_highbd_8_variance64x64_sse2
 
 unsigned int vpx_highbd_8_variance8x16_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 unsigned int vpx_highbd_8_variance8x16_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 #define vpx_highbd_8_variance8x16 vpx_highbd_8_variance8x16_sse2
 
 unsigned int vpx_highbd_8_variance8x4_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance8x4 vpx_highbd_8_variance8x4_c
 
 unsigned int vpx_highbd_8_variance8x8_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 unsigned int vpx_highbd_8_variance8x8_sse2(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_8_variance8x8 vpx_highbd_8_variance8x8_sse2
 
-unsigned int vpx_highbd_avg_4x4_c(const uint8_t*, int p);
-unsigned int vpx_highbd_avg_4x4_sse2(const uint8_t*, int p);
+unsigned int vpx_highbd_avg_4x4_c(const uint8_t* s8, int p);
+unsigned int vpx_highbd_avg_4x4_sse2(const uint8_t* s8, int p);
 #define vpx_highbd_avg_4x4 vpx_highbd_avg_4x4_sse2
 
-unsigned int vpx_highbd_avg_8x8_c(const uint8_t*, int p);
-unsigned int vpx_highbd_avg_8x8_sse2(const uint8_t*, int p);
+unsigned int vpx_highbd_avg_8x8_c(const uint8_t* s8, int p);
+unsigned int vpx_highbd_avg_8x8_sse2(const uint8_t* s8, int p);
 #define vpx_highbd_avg_8x8 vpx_highbd_avg_8x8_sse2
 
 void vpx_highbd_comp_avg_pred_c(uint16_t* comp_pred,
@@ -2983,7 +2983,7 @@
                             int y_step_q4,
                             int w,
                             int h,
-                            int bps);
+                            int bd);
 void vpx_highbd_convolve8_avx2(const uint16_t* src,
                                ptrdiff_t src_stride,
                                uint16_t* dst,
@@ -2995,7 +2995,7 @@
                                int y_step_q4,
                                int w,
                                int h,
-                               int bps);
+                               int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8)(const uint16_t* src,
                                          ptrdiff_t src_stride,
                                          uint16_t* dst,
@@ -3007,7 +3007,7 @@
                                          int y_step_q4,
                                          int w,
                                          int h,
-                                         int bps);
+                                         int bd);
 
 void vpx_highbd_convolve8_avg_c(const uint16_t* src,
                                 ptrdiff_t src_stride,
@@ -3020,7 +3020,7 @@
                                 int y_step_q4,
                                 int w,
                                 int h,
-                                int bps);
+                                int bd);
 void vpx_highbd_convolve8_avg_avx2(const uint16_t* src,
                                    ptrdiff_t src_stride,
                                    uint16_t* dst,
@@ -3032,7 +3032,7 @@
                                    int y_step_q4,
                                    int w,
                                    int h,
-                                   int bps);
+                                   int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_avg)(const uint16_t* src,
                                              ptrdiff_t src_stride,
                                              uint16_t* dst,
@@ -3044,7 +3044,7 @@
                                              int y_step_q4,
                                              int w,
                                              int h,
-                                             int bps);
+                                             int bd);
 
 void vpx_highbd_convolve8_avg_horiz_c(const uint16_t* src,
                                       ptrdiff_t src_stride,
@@ -3057,7 +3057,7 @@
                                       int y_step_q4,
                                       int w,
                                       int h,
-                                      int bps);
+                                      int bd);
 void vpx_highbd_convolve8_avg_horiz_avx2(const uint16_t* src,
                                          ptrdiff_t src_stride,
                                          uint16_t* dst,
@@ -3069,7 +3069,7 @@
                                          int y_step_q4,
                                          int w,
                                          int h,
-                                         int bps);
+                                         int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_avg_horiz)(const uint16_t* src,
                                                    ptrdiff_t src_stride,
                                                    uint16_t* dst,
@@ -3081,7 +3081,7 @@
                                                    int y_step_q4,
                                                    int w,
                                                    int h,
-                                                   int bps);
+                                                   int bd);
 
 void vpx_highbd_convolve8_avg_vert_c(const uint16_t* src,
                                      ptrdiff_t src_stride,
@@ -3094,7 +3094,7 @@
                                      int y_step_q4,
                                      int w,
                                      int h,
-                                     int bps);
+                                     int bd);
 void vpx_highbd_convolve8_avg_vert_avx2(const uint16_t* src,
                                         ptrdiff_t src_stride,
                                         uint16_t* dst,
@@ -3106,7 +3106,7 @@
                                         int y_step_q4,
                                         int w,
                                         int h,
-                                        int bps);
+                                        int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_avg_vert)(const uint16_t* src,
                                                   ptrdiff_t src_stride,
                                                   uint16_t* dst,
@@ -3118,7 +3118,7 @@
                                                   int y_step_q4,
                                                   int w,
                                                   int h,
-                                                  int bps);
+                                                  int bd);
 
 void vpx_highbd_convolve8_horiz_c(const uint16_t* src,
                                   ptrdiff_t src_stride,
@@ -3131,7 +3131,7 @@
                                   int y_step_q4,
                                   int w,
                                   int h,
-                                  int bps);
+                                  int bd);
 void vpx_highbd_convolve8_horiz_avx2(const uint16_t* src,
                                      ptrdiff_t src_stride,
                                      uint16_t* dst,
@@ -3143,7 +3143,7 @@
                                      int y_step_q4,
                                      int w,
                                      int h,
-                                     int bps);
+                                     int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_horiz)(const uint16_t* src,
                                                ptrdiff_t src_stride,
                                                uint16_t* dst,
@@ -3155,7 +3155,7 @@
                                                int y_step_q4,
                                                int w,
                                                int h,
-                                               int bps);
+                                               int bd);
 
 void vpx_highbd_convolve8_vert_c(const uint16_t* src,
                                  ptrdiff_t src_stride,
@@ -3168,7 +3168,7 @@
                                  int y_step_q4,
                                  int w,
                                  int h,
-                                 int bps);
+                                 int bd);
 void vpx_highbd_convolve8_vert_avx2(const uint16_t* src,
                                     ptrdiff_t src_stride,
                                     uint16_t* dst,
@@ -3180,7 +3180,7 @@
                                     int y_step_q4,
                                     int w,
                                     int h,
-                                    int bps);
+                                    int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_vert)(const uint16_t* src,
                                               ptrdiff_t src_stride,
                                               uint16_t* dst,
@@ -3192,7 +3192,7 @@
                                               int y_step_q4,
                                               int w,
                                               int h,
-                                              int bps);
+                                              int bd);
 
 void vpx_highbd_convolve_avg_c(const uint16_t* src,
                                ptrdiff_t src_stride,
@@ -3205,7 +3205,7 @@
                                int y_step_q4,
                                int w,
                                int h,
-                               int bps);
+                               int bd);
 void vpx_highbd_convolve_avg_sse2(const uint16_t* src,
                                   ptrdiff_t src_stride,
                                   uint16_t* dst,
@@ -3217,7 +3217,7 @@
                                   int y_step_q4,
                                   int w,
                                   int h,
-                                  int bps);
+                                  int bd);
 void vpx_highbd_convolve_avg_avx2(const uint16_t* src,
                                   ptrdiff_t src_stride,
                                   uint16_t* dst,
@@ -3229,7 +3229,7 @@
                                   int y_step_q4,
                                   int w,
                                   int h,
-                                  int bps);
+                                  int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve_avg)(const uint16_t* src,
                                             ptrdiff_t src_stride,
                                             uint16_t* dst,
@@ -3241,7 +3241,7 @@
                                             int y_step_q4,
                                             int w,
                                             int h,
-                                            int bps);
+                                            int bd);
 
 void vpx_highbd_convolve_copy_c(const uint16_t* src,
                                 ptrdiff_t src_stride,
@@ -3254,7 +3254,7 @@
                                 int y_step_q4,
                                 int w,
                                 int h,
-                                int bps);
+                                int bd);
 void vpx_highbd_convolve_copy_sse2(const uint16_t* src,
                                    ptrdiff_t src_stride,
                                    uint16_t* dst,
@@ -3266,7 +3266,7 @@
                                    int y_step_q4,
                                    int w,
                                    int h,
-                                   int bps);
+                                   int bd);
 void vpx_highbd_convolve_copy_avx2(const uint16_t* src,
                                    ptrdiff_t src_stride,
                                    uint16_t* dst,
@@ -3278,7 +3278,7 @@
                                    int y_step_q4,
                                    int w,
                                    int h,
-                                   int bps);
+                                   int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve_copy)(const uint16_t* src,
                                              ptrdiff_t src_stride,
                                              uint16_t* dst,
@@ -3290,427 +3290,427 @@
                                              int y_step_q4,
                                              int w,
                                              int h,
-                                             int bps);
+                                             int bd);
 
 void vpx_highbd_d117_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d117_predictor_16x16_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d117_predictor_16x16)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d117_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d117_predictor_32x32_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d117_predictor_32x32)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d117_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d117_predictor_4x4_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d117_predictor_4x4 vpx_highbd_d117_predictor_4x4_sse2
 
 void vpx_highbd_d117_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d117_predictor_8x8_ssse3(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 RTCD_EXTERN void (*vpx_highbd_d117_predictor_8x8)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
+                                                  ptrdiff_t stride,
                                                   const uint16_t* above,
                                                   const uint16_t* left,
                                                   int bd);
 
 void vpx_highbd_d135_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d135_predictor_16x16_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d135_predictor_16x16)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d135_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d135_predictor_32x32_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d135_predictor_32x32)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d135_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d135_predictor_4x4_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d135_predictor_4x4 vpx_highbd_d135_predictor_4x4_sse2
 
 void vpx_highbd_d135_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d135_predictor_8x8_ssse3(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 RTCD_EXTERN void (*vpx_highbd_d135_predictor_8x8)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
+                                                  ptrdiff_t stride,
                                                   const uint16_t* above,
                                                   const uint16_t* left,
                                                   int bd);
 
 void vpx_highbd_d153_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d153_predictor_16x16_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d153_predictor_16x16)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d153_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d153_predictor_32x32_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d153_predictor_32x32)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d153_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d153_predictor_4x4_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d153_predictor_4x4 vpx_highbd_d153_predictor_4x4_sse2
 
 void vpx_highbd_d153_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d153_predictor_8x8_ssse3(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 RTCD_EXTERN void (*vpx_highbd_d153_predictor_8x8)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
+                                                  ptrdiff_t stride,
                                                   const uint16_t* above,
                                                   const uint16_t* left,
                                                   int bd);
 
 void vpx_highbd_d207_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d207_predictor_16x16_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d207_predictor_16x16)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d207_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d207_predictor_32x32_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d207_predictor_32x32)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d207_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d207_predictor_4x4_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d207_predictor_4x4 vpx_highbd_d207_predictor_4x4_sse2
 
 void vpx_highbd_d207_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d207_predictor_8x8_ssse3(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 RTCD_EXTERN void (*vpx_highbd_d207_predictor_8x8)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
+                                                  ptrdiff_t stride,
                                                   const uint16_t* above,
                                                   const uint16_t* left,
                                                   int bd);
 
 void vpx_highbd_d45_predictor_16x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d45_predictor_16x16_ssse3(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 RTCD_EXTERN void (*vpx_highbd_d45_predictor_16x16)(uint16_t* dst,
-                                                   ptrdiff_t y_stride,
+                                                   ptrdiff_t stride,
                                                    const uint16_t* above,
                                                    const uint16_t* left,
                                                    int bd);
 
 void vpx_highbd_d45_predictor_32x32_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d45_predictor_32x32_ssse3(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 RTCD_EXTERN void (*vpx_highbd_d45_predictor_32x32)(uint16_t* dst,
-                                                   ptrdiff_t y_stride,
+                                                   ptrdiff_t stride,
                                                    const uint16_t* above,
                                                    const uint16_t* left,
                                                    int bd);
 
 void vpx_highbd_d45_predictor_4x4_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d45_predictor_4x4_ssse3(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 RTCD_EXTERN void (*vpx_highbd_d45_predictor_4x4)(uint16_t* dst,
-                                                 ptrdiff_t y_stride,
+                                                 ptrdiff_t stride,
                                                  const uint16_t* above,
                                                  const uint16_t* left,
                                                  int bd);
 
 void vpx_highbd_d45_predictor_8x8_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d45_predictor_8x8_ssse3(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 RTCD_EXTERN void (*vpx_highbd_d45_predictor_8x8)(uint16_t* dst,
-                                                 ptrdiff_t y_stride,
+                                                 ptrdiff_t stride,
                                                  const uint16_t* above,
                                                  const uint16_t* left,
                                                  int bd);
 
 void vpx_highbd_d63_predictor_16x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d63_predictor_16x16_ssse3(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 RTCD_EXTERN void (*vpx_highbd_d63_predictor_16x16)(uint16_t* dst,
-                                                   ptrdiff_t y_stride,
+                                                   ptrdiff_t stride,
                                                    const uint16_t* above,
                                                    const uint16_t* left,
                                                    int bd);
 
 void vpx_highbd_d63_predictor_32x32_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d63_predictor_32x32_ssse3(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 RTCD_EXTERN void (*vpx_highbd_d63_predictor_32x32)(uint16_t* dst,
-                                                   ptrdiff_t y_stride,
+                                                   ptrdiff_t stride,
                                                    const uint16_t* above,
                                                    const uint16_t* left,
                                                    int bd);
 
 void vpx_highbd_d63_predictor_4x4_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d63_predictor_4x4_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d63_predictor_4x4 vpx_highbd_d63_predictor_4x4_sse2
 
 void vpx_highbd_d63_predictor_8x8_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d63_predictor_8x8_ssse3(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 RTCD_EXTERN void (*vpx_highbd_d63_predictor_8x8)(uint16_t* dst,
-                                                 ptrdiff_t y_stride,
+                                                 ptrdiff_t stride,
                                                  const uint16_t* above,
                                                  const uint16_t* left,
                                                  int bd);
 
 void vpx_highbd_dc_128_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_128_predictor_16x16_sse2(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_128_predictor_16x16 vpx_highbd_dc_128_predictor_16x16_sse2
 
 void vpx_highbd_dc_128_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_128_predictor_32x32_sse2(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_128_predictor_32x32 vpx_highbd_dc_128_predictor_32x32_sse2
 
 void vpx_highbd_dc_128_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_128_predictor_4x4_sse2(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_128_predictor_4x4 vpx_highbd_dc_128_predictor_4x4_sse2
 
 void vpx_highbd_dc_128_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_128_predictor_8x8_sse2(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_128_predictor_8x8 vpx_highbd_dc_128_predictor_8x8_sse2
 
 void vpx_highbd_dc_left_predictor_16x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 void vpx_highbd_dc_left_predictor_16x16_sse2(uint16_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint16_t* above,
                                              const uint16_t* left,
                                              int bd);
@@ -3718,12 +3718,12 @@
   vpx_highbd_dc_left_predictor_16x16_sse2
 
 void vpx_highbd_dc_left_predictor_32x32_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 void vpx_highbd_dc_left_predictor_32x32_sse2(uint16_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint16_t* above,
                                              const uint16_t* left,
                                              int bd);
@@ -3731,120 +3731,120 @@
   vpx_highbd_dc_left_predictor_32x32_sse2
 
 void vpx_highbd_dc_left_predictor_4x4_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 void vpx_highbd_dc_left_predictor_4x4_sse2(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 #define vpx_highbd_dc_left_predictor_4x4 vpx_highbd_dc_left_predictor_4x4_sse2
 
 void vpx_highbd_dc_left_predictor_8x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 void vpx_highbd_dc_left_predictor_8x8_sse2(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 #define vpx_highbd_dc_left_predictor_8x8 vpx_highbd_dc_left_predictor_8x8_sse2
 
 void vpx_highbd_dc_predictor_16x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_dc_predictor_16x16_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_dc_predictor_16x16 vpx_highbd_dc_predictor_16x16_sse2
 
 void vpx_highbd_dc_predictor_32x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_dc_predictor_32x32_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_dc_predictor_32x32 vpx_highbd_dc_predictor_32x32_sse2
 
 void vpx_highbd_dc_predictor_4x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_dc_predictor_4x4_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_dc_predictor_4x4 vpx_highbd_dc_predictor_4x4_sse2
 
 void vpx_highbd_dc_predictor_8x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_dc_predictor_8x8_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_dc_predictor_8x8 vpx_highbd_dc_predictor_8x8_sse2
 
 void vpx_highbd_dc_top_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_top_predictor_16x16_sse2(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_top_predictor_16x16 vpx_highbd_dc_top_predictor_16x16_sse2
 
 void vpx_highbd_dc_top_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_top_predictor_32x32_sse2(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_top_predictor_32x32 vpx_highbd_dc_top_predictor_32x32_sse2
 
 void vpx_highbd_dc_top_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_top_predictor_4x4_sse2(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_top_predictor_4x4 vpx_highbd_dc_top_predictor_4x4_sse2
 
 void vpx_highbd_dc_top_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_top_predictor_8x8_sse2(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
@@ -3902,53 +3902,68 @@
 #define vpx_highbd_fdct8x8_1 vpx_highbd_fdct8x8_1_c
 
 void vpx_highbd_h_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_h_predictor_16x16_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_h_predictor_16x16 vpx_highbd_h_predictor_16x16_sse2
 
 void vpx_highbd_h_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_h_predictor_32x32_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_h_predictor_32x32 vpx_highbd_h_predictor_32x32_sse2
 
 void vpx_highbd_h_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_h_predictor_4x4_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_h_predictor_4x4 vpx_highbd_h_predictor_4x4_sse2
 
 void vpx_highbd_h_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_h_predictor_8x8_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_h_predictor_8x8 vpx_highbd_h_predictor_8x8_sse2
 
+void vpx_highbd_hadamard_16x16_c(const int16_t* src_diff,
+                                 ptrdiff_t src_stride,
+                                 tran_low_t* coeff);
+#define vpx_highbd_hadamard_16x16 vpx_highbd_hadamard_16x16_c
+
+void vpx_highbd_hadamard_32x32_c(const int16_t* src_diff,
+                                 ptrdiff_t src_stride,
+                                 tran_low_t* coeff);
+#define vpx_highbd_hadamard_32x32 vpx_highbd_hadamard_32x32_c
+
+void vpx_highbd_hadamard_8x8_c(const int16_t* src_diff,
+                               ptrdiff_t src_stride,
+                               tran_low_t* coeff);
+#define vpx_highbd_hadamard_8x8 vpx_highbd_hadamard_8x8_c
+
 void vpx_highbd_idct16x16_10_add_c(const tran_low_t* input,
                                    uint16_t* dest,
                                    int stride,
@@ -4346,9 +4361,9 @@
                                          int bd);
 #define vpx_highbd_lpf_vertical_8_dual vpx_highbd_lpf_vertical_8_dual_sse2
 
-void vpx_highbd_minmax_8x8_c(const uint8_t* s,
+void vpx_highbd_minmax_8x8_c(const uint8_t* s8,
                              int p,
-                             const uint8_t* d,
+                             const uint8_t* d8,
                              int dp,
                              int* min,
                              int* max);
@@ -4434,12 +4449,12 @@
 
 void vpx_highbd_sad16x16x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad16x16x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad16x16x4d vpx_highbd_sad16x16x4d_sse2
@@ -4468,12 +4483,12 @@
 
 void vpx_highbd_sad16x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad16x32x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad16x32x4d vpx_highbd_sad16x32x4d_sse2
@@ -4502,12 +4517,12 @@
 
 void vpx_highbd_sad16x8x4d_c(const uint8_t* src_ptr,
                              int src_stride,
-                             const uint8_t* const ref_ptr[],
+                             const uint8_t* const ref_array[],
                              int ref_stride,
                              uint32_t* sad_array);
 void vpx_highbd_sad16x8x4d_sse2(const uint8_t* src_ptr,
                                 int src_stride,
-                                const uint8_t* const ref_ptr[],
+                                const uint8_t* const ref_array[],
                                 int ref_stride,
                                 uint32_t* sad_array);
 #define vpx_highbd_sad16x8x4d vpx_highbd_sad16x8x4d_sse2
@@ -4536,12 +4551,12 @@
 
 void vpx_highbd_sad32x16x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad32x16x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad32x16x4d vpx_highbd_sad32x16x4d_sse2
@@ -4570,12 +4585,12 @@
 
 void vpx_highbd_sad32x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad32x32x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad32x32x4d vpx_highbd_sad32x32x4d_sse2
@@ -4604,12 +4619,12 @@
 
 void vpx_highbd_sad32x64x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad32x64x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad32x64x4d vpx_highbd_sad32x64x4d_sse2
@@ -4629,12 +4644,12 @@
 
 void vpx_highbd_sad4x4x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 void vpx_highbd_sad4x4x4d_sse2(const uint8_t* src_ptr,
                                int src_stride,
-                               const uint8_t* const ref_ptr[],
+                               const uint8_t* const ref_array[],
                                int ref_stride,
                                uint32_t* sad_array);
 #define vpx_highbd_sad4x4x4d vpx_highbd_sad4x4x4d_sse2
@@ -4654,12 +4669,12 @@
 
 void vpx_highbd_sad4x8x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 void vpx_highbd_sad4x8x4d_sse2(const uint8_t* src_ptr,
                                int src_stride,
-                               const uint8_t* const ref_ptr[],
+                               const uint8_t* const ref_array[],
                                int ref_stride,
                                uint32_t* sad_array);
 #define vpx_highbd_sad4x8x4d vpx_highbd_sad4x8x4d_sse2
@@ -4688,12 +4703,12 @@
 
 void vpx_highbd_sad64x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad64x32x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad64x32x4d vpx_highbd_sad64x32x4d_sse2
@@ -4722,12 +4737,12 @@
 
 void vpx_highbd_sad64x64x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad64x64x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad64x64x4d vpx_highbd_sad64x64x4d_sse2
@@ -4756,12 +4771,12 @@
 
 void vpx_highbd_sad8x16x4d_c(const uint8_t* src_ptr,
                              int src_stride,
-                             const uint8_t* const ref_ptr[],
+                             const uint8_t* const ref_array[],
                              int ref_stride,
                              uint32_t* sad_array);
 void vpx_highbd_sad8x16x4d_sse2(const uint8_t* src_ptr,
                                 int src_stride,
-                                const uint8_t* const ref_ptr[],
+                                const uint8_t* const ref_array[],
                                 int ref_stride,
                                 uint32_t* sad_array);
 #define vpx_highbd_sad8x16x4d vpx_highbd_sad8x16x4d_sse2
@@ -4790,12 +4805,12 @@
 
 void vpx_highbd_sad8x4x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 void vpx_highbd_sad8x4x4d_sse2(const uint8_t* src_ptr,
                                int src_stride,
-                               const uint8_t* const ref_ptr[],
+                               const uint8_t* const ref_array[],
                                int ref_stride,
                                uint32_t* sad_array);
 #define vpx_highbd_sad8x4x4d vpx_highbd_sad8x4x4d_sse2
@@ -4824,12 +4839,12 @@
 
 void vpx_highbd_sad8x8x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 void vpx_highbd_sad8x8x4d_sse2(const uint8_t* src_ptr,
                                int src_stride,
-                               const uint8_t* const ref_ptr[],
+                               const uint8_t* const ref_array[],
                                int ref_stride,
                                uint32_t* sad_array);
 #define vpx_highbd_sad8x8x4d vpx_highbd_sad8x8x4d_sse2
@@ -4838,104 +4853,104 @@
                                  int cols,
                                  int16_t* diff_ptr,
                                  ptrdiff_t diff_stride,
-                                 const uint8_t* src_ptr,
+                                 const uint8_t* src8_ptr,
                                  ptrdiff_t src_stride,
-                                 const uint8_t* pred_ptr,
+                                 const uint8_t* pred8_ptr,
                                  ptrdiff_t pred_stride,
                                  int bd);
 #define vpx_highbd_subtract_block vpx_highbd_subtract_block_c
 
 void vpx_highbd_tm_predictor_16x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_tm_predictor_16x16_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_tm_predictor_16x16 vpx_highbd_tm_predictor_16x16_sse2
 
 void vpx_highbd_tm_predictor_32x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_tm_predictor_32x32_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_tm_predictor_32x32 vpx_highbd_tm_predictor_32x32_sse2
 
 void vpx_highbd_tm_predictor_4x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_tm_predictor_4x4_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_tm_predictor_4x4 vpx_highbd_tm_predictor_4x4_sse2
 
 void vpx_highbd_tm_predictor_8x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_tm_predictor_8x8_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_tm_predictor_8x8 vpx_highbd_tm_predictor_8x8_sse2
 
 void vpx_highbd_v_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_v_predictor_16x16_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_v_predictor_16x16 vpx_highbd_v_predictor_16x16_sse2
 
 void vpx_highbd_v_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_v_predictor_32x32_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_v_predictor_32x32 vpx_highbd_v_predictor_32x32_sse2
 
 void vpx_highbd_v_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_v_predictor_4x4_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_v_predictor_4x4 vpx_highbd_v_predictor_4x4_sse2
 
 void vpx_highbd_v_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_v_predictor_8x8_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
@@ -5245,12 +5260,12 @@
                                   const uint8_t* thresh1);
 #define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_sse2
 
-void vpx_mbpost_proc_across_ip_c(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_c(unsigned char* src,
                                  int pitch,
                                  int rows,
                                  int cols,
                                  int flimit);
-void vpx_mbpost_proc_across_ip_sse2(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_sse2(unsigned char* src,
                                     int pitch,
                                     int rows,
                                     int cols,
@@ -5284,68 +5299,68 @@
 #define vpx_minmax_8x8 vpx_minmax_8x8_sse2
 
 unsigned int vpx_mse16x16_c(const uint8_t* src_ptr,
-                            int source_stride,
+                            int src_stride,
                             const uint8_t* ref_ptr,
-                            int recon_stride,
+                            int ref_stride,
                             unsigned int* sse);
 unsigned int vpx_mse16x16_sse2(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
-                               int recon_stride,
+                               int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_mse16x16_avx2(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
-                               int recon_stride,
+                               int ref_stride,
                                unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_mse16x16)(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
-                                         int recon_stride,
+                                         int ref_stride,
                                          unsigned int* sse);
 
 unsigned int vpx_mse16x8_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 unsigned int vpx_mse16x8_sse2(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
-                              int recon_stride,
+                              int ref_stride,
                               unsigned int* sse);
 unsigned int vpx_mse16x8_avx2(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
-                              int recon_stride,
+                              int ref_stride,
                               unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_mse16x8)(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
-                                        int recon_stride,
+                                        int ref_stride,
                                         unsigned int* sse);
 
 unsigned int vpx_mse8x16_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 unsigned int vpx_mse8x16_sse2(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
-                              int recon_stride,
+                              int ref_stride,
                               unsigned int* sse);
 #define vpx_mse8x16 vpx_mse8x16_sse2
 
 unsigned int vpx_mse8x8_c(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
-                          int recon_stride,
+                          int ref_stride,
                           unsigned int* sse);
 unsigned int vpx_mse8x8_sse2(const uint8_t* src_ptr,
-                             int source_stride,
+                             int src_stride,
                              const uint8_t* ref_ptr,
-                             int recon_stride,
+                             int ref_stride,
                              unsigned int* sse);
 #define vpx_mse8x8 vpx_mse8x8_sse2
 
@@ -5546,12 +5561,12 @@
 
 void vpx_sad16x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x16x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad16x16x4d vpx_sad16x16x4d_sse2
@@ -5596,12 +5611,12 @@
 
 void vpx_sad16x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x32x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad16x32x4d vpx_sad16x32x4d_sse2
@@ -5651,12 +5666,12 @@
 
 void vpx_sad16x8x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad16x8x4d_sse2(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 #define vpx_sad16x8x4d vpx_sad16x8x4d_sse2
@@ -5717,12 +5732,12 @@
 
 void vpx_sad32x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x16x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x16x4d vpx_sad32x16x4d_sse2
@@ -5767,22 +5782,22 @@
 
 void vpx_sad32x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x32x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 void vpx_sad32x32x4d_avx2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 RTCD_EXTERN void (*vpx_sad32x32x4d)(const uint8_t* src_ptr,
                                     int src_stride,
-                                    const uint8_t* const ref_ptr[],
+                                    const uint8_t* const ref_array[],
                                     int ref_stride,
                                     uint32_t* sad_array);
 
@@ -5826,12 +5841,12 @@
 
 void vpx_sad32x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x64x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x64x4d vpx_sad32x64x4d_sse2
@@ -5876,12 +5891,12 @@
 
 void vpx_sad4x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x4x4d_sse2(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad4x4x4d vpx_sad4x4x4d_sse2
@@ -5926,12 +5941,12 @@
 
 void vpx_sad4x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x8x4d_sse2(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad4x8x4d vpx_sad4x8x4d_sse2
@@ -5976,12 +5991,12 @@
 
 void vpx_sad64x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x32x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad64x32x4d vpx_sad64x32x4d_sse2
@@ -6026,22 +6041,22 @@
 
 void vpx_sad64x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x64x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 void vpx_sad64x64x4d_avx2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 RTCD_EXTERN void (*vpx_sad64x64x4d)(const uint8_t* src_ptr,
                                     int src_stride,
-                                    const uint8_t* const ref_ptr[],
+                                    const uint8_t* const ref_array[],
                                     int ref_stride,
                                     uint32_t* sad_array);
 
@@ -6085,12 +6100,12 @@
 
 void vpx_sad8x16x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad8x16x4d_sse2(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 #define vpx_sad8x16x4d vpx_sad8x16x4d_sse2
@@ -6135,12 +6150,12 @@
 
 void vpx_sad8x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x4x4d_sse2(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad8x4x4d vpx_sad8x4x4d_sse2
@@ -6185,12 +6200,12 @@
 
 void vpx_sad8x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x8x4d_sse2(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad8x8x4d vpx_sad8x8x4d_sse2
@@ -6316,850 +6331,850 @@
 #define vpx_scaled_vert vpx_scaled_vert_c
 
 uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x16_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x16)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x32_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x32)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x8_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x8_ssse3(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x8)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x16_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x16)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x32_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x32_avx2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x32)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x64_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x64)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x4_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x4_ssse3(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x4)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x8_ssse3(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x8)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x32_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x32)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x64_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x64_avx2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x64)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x16_ssse3(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x16)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x4_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x4_ssse3(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x4)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x8_ssse3(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x8)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x16_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x16_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x16)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x32_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x32_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x32)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x8_sse2(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x8_ssse3(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x8)(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x16_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x16_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x16)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x32_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x32_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x32_avx2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x32)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x64_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x64_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x64)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x4_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x4_ssse3(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x4)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x8_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x8_ssse3(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x8)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x32_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x32_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x32)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x64_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x64_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x64_avx2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x64)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x16_sse2(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x16_ssse3(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x16)(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x4_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x4_ssse3(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x4)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x8_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x8_ssse3(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x8)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -7187,315 +7202,315 @@
 #define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_sse2
 
 void vpx_tm_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_16x16_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_sse2
 
 void vpx_tm_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_32x32_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_sse2
 
 void vpx_tm_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_4x4_sse2(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_sse2
 
 void vpx_tm_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_8x8_sse2(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_sse2
 
 void vpx_v_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_16x16_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_v_predictor_16x16 vpx_v_predictor_16x16_sse2
 
 void vpx_v_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_32x32_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_v_predictor_32x32 vpx_v_predictor_32x32_sse2
 
 void vpx_v_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_4x4_sse2(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_v_predictor_4x4 vpx_v_predictor_4x4_sse2
 
 void vpx_v_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_8x8_sse2(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_v_predictor_8x8 vpx_v_predictor_8x8_sse2
 
 unsigned int vpx_variance16x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x16_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance16x16_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance16x16)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance16x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x32_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance16x32_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance16x32)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance16x8_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance16x8_sse2(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 unsigned int vpx_variance16x8_avx2(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance16x8)(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 
 unsigned int vpx_variance32x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x16_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance32x16_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance32x16)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance32x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x32_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance32x32_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance32x32)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance32x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x64_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance32x64_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance32x64)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance4x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x4_sse2(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance4x4 vpx_variance4x4_sse2
 
 unsigned int vpx_variance4x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x8_sse2(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance4x8 vpx_variance4x8_sse2
 
 unsigned int vpx_variance64x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x32_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance64x32_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance64x32)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance64x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x64_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance64x64_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance64x64)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance8x16_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance8x16_sse2(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 #define vpx_variance8x16 vpx_variance8x16_sse2
 
 unsigned int vpx_variance8x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x4_sse2(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance8x4 vpx_variance8x4_sse2
 
 unsigned int vpx_variance8x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x8_sse2(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance8x8 vpx_variance8x8_sse2
 
 void vpx_ve_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c
diff --git a/third_party/libvpx/source/config/mac/x64/vp8_rtcd.h b/third_party/libvpx/source/config/mac/x64/vp8_rtcd.h
index 850ca91..c46bfe5 100644
--- a/third_party/libvpx/source/config/mac/x64/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/mac/x64/vp8_rtcd.h
@@ -27,90 +27,90 @@
 extern "C" {
 #endif
 
-void vp8_bilinear_predict16x16_c(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_bilinear_predict16x16_c(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-void vp8_bilinear_predict16x16_sse2(unsigned char* src,
-                                    int src_pitch,
-                                    int xofst,
-                                    int yofst,
-                                    unsigned char* dst,
+void vp8_bilinear_predict16x16_sse2(unsigned char* src_ptr,
+                                    int src_pixels_per_line,
+                                    int xoffset,
+                                    int yoffset,
+                                    unsigned char* dst_ptr,
                                     int dst_pitch);
-void vp8_bilinear_predict16x16_ssse3(unsigned char* src,
-                                     int src_pitch,
-                                     int xofst,
-                                     int yofst,
-                                     unsigned char* dst,
+void vp8_bilinear_predict16x16_ssse3(unsigned char* src_ptr,
+                                     int src_pixels_per_line,
+                                     int xoffset,
+                                     int yoffset,
+                                     unsigned char* dst_ptr,
                                      int dst_pitch);
-RTCD_EXTERN void (*vp8_bilinear_predict16x16)(unsigned char* src,
-                                              int src_pitch,
-                                              int xofst,
-                                              int yofst,
-                                              unsigned char* dst,
+RTCD_EXTERN void (*vp8_bilinear_predict16x16)(unsigned char* src_ptr,
+                                              int src_pixels_per_line,
+                                              int xoffset,
+                                              int yoffset,
+                                              unsigned char* dst_ptr,
                                               int dst_pitch);
 
-void vp8_bilinear_predict4x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict4x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict4x4_sse2(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict4x4_sse2(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_sse2
 
-void vp8_bilinear_predict8x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x4_sse2(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x4_sse2(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_sse2
 
-void vp8_bilinear_predict8x8_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x8_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x8_sse2(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x8_sse2(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
-void vp8_bilinear_predict8x8_ssse3(unsigned char* src,
-                                   int src_pitch,
-                                   int xofst,
-                                   int yofst,
-                                   unsigned char* dst,
+void vp8_bilinear_predict8x8_ssse3(unsigned char* src_ptr,
+                                   int src_pixels_per_line,
+                                   int xoffset,
+                                   int yoffset,
+                                   unsigned char* dst_ptr,
                                    int dst_pitch);
-RTCD_EXTERN void (*vp8_bilinear_predict8x8)(unsigned char* src,
-                                            int src_pitch,
-                                            int xofst,
-                                            int yofst,
-                                            unsigned char* dst,
+RTCD_EXTERN void (*vp8_bilinear_predict8x8)(unsigned char* src_ptr,
+                                            int src_pixels_per_line,
+                                            int xoffset,
+                                            int yoffset,
+                                            unsigned char* dst_ptr,
                                             int dst_pitch);
 
 void vp8_blend_b_c(unsigned char* y,
                    unsigned char* u,
                    unsigned char* v,
-                   int y1,
-                   int u1,
-                   int v1,
+                   int y_1,
+                   int u_1,
+                   int v_1,
                    int alpha,
                    int stride);
 #define vp8_blend_b vp8_blend_b_c
@@ -118,9 +118,9 @@
 void vp8_blend_mb_inner_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_inner vp8_blend_mb_inner_c
@@ -128,9 +128,9 @@
 void vp8_blend_mb_outer_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_outer vp8_blend_mb_outer_c
@@ -140,65 +140,65 @@
 #define vp8_block_error vp8_block_error_sse2
 
 void vp8_copy32xn_c(const unsigned char* src_ptr,
-                    int source_stride,
+                    int src_stride,
                     unsigned char* dst_ptr,
                     int dst_stride,
-                    int n);
+                    int height);
 void vp8_copy32xn_sse2(const unsigned char* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        unsigned char* dst_ptr,
                        int dst_stride,
-                       int n);
+                       int height);
 void vp8_copy32xn_sse3(const unsigned char* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        unsigned char* dst_ptr,
                        int dst_stride,
-                       int n);
+                       int height);
 RTCD_EXTERN void (*vp8_copy32xn)(const unsigned char* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  unsigned char* dst_ptr,
                                  int dst_stride,
-                                 int n);
+                                 int height);
 
 void vp8_copy_mem16x16_c(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 void vp8_copy_mem16x16_sse2(unsigned char* src,
-                            int src_pitch,
+                            int src_stride,
                             unsigned char* dst,
-                            int dst_pitch);
+                            int dst_stride);
 #define vp8_copy_mem16x16 vp8_copy_mem16x16_sse2
 
 void vp8_copy_mem8x4_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 void vp8_copy_mem8x4_mmx(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 #define vp8_copy_mem8x4 vp8_copy_mem8x4_mmx
 
 void vp8_copy_mem8x8_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 void vp8_copy_mem8x8_mmx(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 #define vp8_copy_mem8x8 vp8_copy_mem8x8_mmx
 
-void vp8_dc_only_idct_add_c(short input,
-                            unsigned char* pred,
+void vp8_dc_only_idct_add_c(short input_dc,
+                            unsigned char* pred_ptr,
                             int pred_stride,
-                            unsigned char* dst,
+                            unsigned char* dst_ptr,
                             int dst_stride);
-void vp8_dc_only_idct_add_mmx(short input,
-                              unsigned char* pred,
+void vp8_dc_only_idct_add_mmx(short input_dc,
+                              unsigned char* pred_ptr,
                               int pred_stride,
-                              unsigned char* dst,
+                              unsigned char* dst_ptr,
                               int dst_stride);
 #define vp8_dc_only_idct_add vp8_dc_only_idct_add_mmx
 
@@ -240,11 +240,11 @@
 
 void vp8_dequant_idct_add_c(short* input,
                             short* dq,
-                            unsigned char* output,
+                            unsigned char* dest,
                             int stride);
 void vp8_dequant_idct_add_mmx(short* input,
                               short* dq,
-                              unsigned char* output,
+                              unsigned char* dest,
                               int stride);
 #define vp8_dequant_idct_add vp8_dequant_idct_add_mmx
 
@@ -274,8 +274,8 @@
                                        char* eobs);
 #define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_sse2
 
-void vp8_dequantize_b_c(struct blockd*, short* dqc);
-void vp8_dequantize_b_mmx(struct blockd*, short* dqc);
+void vp8_dequantize_b_c(struct blockd*, short* DQC);
+void vp8_dequantize_b_mmx(struct blockd*, short* DQC);
 #define vp8_dequantize_b vp8_dequantize_b_mmx
 
 int vp8_diamond_search_sad_c(struct macroblock* x,
@@ -375,91 +375,91 @@
                                        int* mvcost[2],
                                        union int_mv* center_mv);
 
-void vp8_loop_filter_bh_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bh_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bh_sse2(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bh_sse2(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
 #define vp8_loop_filter_bh vp8_loop_filter_bh_sse2
 
-void vp8_loop_filter_bv_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bv_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bv_sse2(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bv_sse2(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
 #define vp8_loop_filter_bv vp8_loop_filter_bv_sse2
 
-void vp8_loop_filter_mbh_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbh_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbh_sse2(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbh_sse2(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbh vp8_loop_filter_mbh_sse2
 
-void vp8_loop_filter_mbv_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbv_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbv_sse2(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbv_sse2(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbv vp8_loop_filter_mbv_sse2
 
-void vp8_loop_filter_bhs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bhs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bhs_sse2(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bhs_sse2(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_sse2
 
-void vp8_loop_filter_bvs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bvs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bvs_sse2(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bvs_sse2(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_sse2
 
-void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y,
-                                              int ystride,
+void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y_ptr,
+                                              int y_stride,
                                               const unsigned char* blimit);
-void vp8_loop_filter_simple_horizontal_edge_sse2(unsigned char* y,
-                                                 int ystride,
+void vp8_loop_filter_simple_horizontal_edge_sse2(unsigned char* y_ptr,
+                                                 int y_stride,
                                                  const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbh vp8_loop_filter_simple_horizontal_edge_sse2
 
-void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y,
-                                            int ystride,
+void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y_ptr,
+                                            int y_stride,
                                             const unsigned char* blimit);
-void vp8_loop_filter_simple_vertical_edge_sse2(unsigned char* y,
-                                               int ystride,
+void vp8_loop_filter_simple_vertical_edge_sse2(unsigned char* y_ptr,
+                                               int y_stride,
                                                const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbv vp8_loop_filter_simple_vertical_edge_sse2
 
@@ -475,8 +475,8 @@
                               struct block* b,
                               struct blockd* d,
                               union int_mv* ref_mv,
-                              int sad_per_bit,
-                              int distance,
+                              int error_per_bit,
+                              int search_range,
                               struct variance_vtable* fn_ptr,
                               int* mvcost[2],
                               union int_mv* center_mv);
@@ -484,8 +484,8 @@
                               struct block* b,
                               struct blockd* d,
                               union int_mv* ref_mv,
-                              int sad_per_bit,
-                              int distance,
+                              int error_per_bit,
+                              int search_range,
                               struct variance_vtable* fn_ptr,
                               int* mvcost[2],
                               union int_mv* center_mv);
@@ -505,126 +505,126 @@
 #define vp8_short_fdct8x4 vp8_short_fdct8x4_sse2
 
 void vp8_short_idct4x4llm_c(short* input,
-                            unsigned char* pred,
-                            int pitch,
-                            unsigned char* dst,
+                            unsigned char* pred_ptr,
+                            int pred_stride,
+                            unsigned char* dst_ptr,
                             int dst_stride);
 void vp8_short_idct4x4llm_mmx(short* input,
-                              unsigned char* pred,
-                              int pitch,
-                              unsigned char* dst,
+                              unsigned char* pred_ptr,
+                              int pred_stride,
+                              unsigned char* dst_ptr,
                               int dst_stride);
 #define vp8_short_idct4x4llm vp8_short_idct4x4llm_mmx
 
-void vp8_short_inv_walsh4x4_c(short* input, short* output);
-void vp8_short_inv_walsh4x4_sse2(short* input, short* output);
+void vp8_short_inv_walsh4x4_c(short* input, short* mb_dqcoeff);
+void vp8_short_inv_walsh4x4_sse2(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_sse2
 
-void vp8_short_inv_walsh4x4_1_c(short* input, short* output);
+void vp8_short_inv_walsh4x4_1_c(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c
 
 void vp8_short_walsh4x4_c(short* input, short* output, int pitch);
 void vp8_short_walsh4x4_sse2(short* input, short* output, int pitch);
 #define vp8_short_walsh4x4 vp8_short_walsh4x4_sse2
 
-void vp8_sixtap_predict16x16_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_sixtap_predict16x16_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_sixtap_predict16x16_sse2(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_sixtap_predict16x16_sse2(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
-void vp8_sixtap_predict16x16_ssse3(unsigned char* src,
-                                   int src_pitch,
-                                   int xofst,
-                                   int yofst,
-                                   unsigned char* dst,
+void vp8_sixtap_predict16x16_ssse3(unsigned char* src_ptr,
+                                   int src_pixels_per_line,
+                                   int xoffset,
+                                   int yoffset,
+                                   unsigned char* dst_ptr,
                                    int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict16x16)(unsigned char* src,
-                                            int src_pitch,
-                                            int xofst,
-                                            int yofst,
-                                            unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict16x16)(unsigned char* src_ptr,
+                                            int src_pixels_per_line,
+                                            int xoffset,
+                                            int yoffset,
+                                            unsigned char* dst_ptr,
                                             int dst_pitch);
 
-void vp8_sixtap_predict4x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict4x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict4x4_mmx(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_sixtap_predict4x4_mmx(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_sixtap_predict4x4_ssse3(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_sixtap_predict4x4_ssse3(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict4x4)(unsigned char* src,
-                                          int src_pitch,
-                                          int xofst,
-                                          int yofst,
-                                          unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict4x4)(unsigned char* src_ptr,
+                                          int src_pixels_per_line,
+                                          int xoffset,
+                                          int yoffset,
+                                          unsigned char* dst_ptr,
                                           int dst_pitch);
 
-void vp8_sixtap_predict8x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x4_sse2(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x4_sse2(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
-void vp8_sixtap_predict8x4_ssse3(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_sixtap_predict8x4_ssse3(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict8x4)(unsigned char* src,
-                                          int src_pitch,
-                                          int xofst,
-                                          int yofst,
-                                          unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict8x4)(unsigned char* src_ptr,
+                                          int src_pixels_per_line,
+                                          int xoffset,
+                                          int yoffset,
+                                          unsigned char* dst_ptr,
                                           int dst_pitch);
 
-void vp8_sixtap_predict8x8_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x8_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x8_sse2(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x8_sse2(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
-void vp8_sixtap_predict8x8_ssse3(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_sixtap_predict8x8_ssse3(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict8x8)(unsigned char* src,
-                                          int src_pitch,
-                                          int xofst,
-                                          int yofst,
-                                          unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict8x8)(unsigned char* src_ptr,
+                                          int src_pixels_per_line,
+                                          int xoffset,
+                                          int yoffset,
+                                          unsigned char* dst_ptr,
                                           int dst_pitch);
 
 void vp8_rtcd(void);
diff --git a/third_party/libvpx/source/config/mac/x64/vp9_rtcd.h b/third_party/libvpx/source/config/mac/x64/vp9_rtcd.h
index 6f00c78..28787a8 100644
--- a/third_party/libvpx/source/config/mac/x64/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/mac/x64/vp9_rtcd.h
@@ -242,18 +242,18 @@
 #define vp9_highbd_fwht4x4 vp9_highbd_fwht4x4_c
 
 void vp9_highbd_iht16x16_256_add_c(const tran_low_t* input,
-                                   uint16_t* output,
-                                   int pitch,
+                                   uint16_t* dest,
+                                   int stride,
                                    int tx_type,
                                    int bd);
 void vp9_highbd_iht16x16_256_add_sse4_1(const tran_low_t* input,
-                                        uint16_t* output,
-                                        int pitch,
+                                        uint16_t* dest,
+                                        int stride,
                                         int tx_type,
                                         int bd);
 RTCD_EXTERN void (*vp9_highbd_iht16x16_256_add)(const tran_low_t* input,
-                                                uint16_t* output,
-                                                int pitch,
+                                                uint16_t* dest,
+                                                int stride,
                                                 int tx_type,
                                                 int bd);
 
@@ -351,12 +351,12 @@
 #define vp9_highbd_temporal_filter_apply vp9_highbd_temporal_filter_apply_c
 
 void vp9_iht16x16_256_add_c(const tran_low_t* input,
-                            uint8_t* output,
-                            int pitch,
+                            uint8_t* dest,
+                            int stride,
                             int tx_type);
 void vp9_iht16x16_256_add_sse2(const tran_low_t* input,
-                               uint8_t* output,
-                               int pitch,
+                               uint8_t* dest,
+                               int stride,
                                int tx_type);
 #define vp9_iht16x16_256_add vp9_iht16x16_256_add_sse2
 
diff --git a/third_party/libvpx/source/config/mac/x64/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/mac/x64/vpx_dsp_rtcd.h
index 9970fae1..3b28a11 100644
--- a/third_party/libvpx/source/config/mac/x64/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/mac/x64/vpx_dsp_rtcd.h
@@ -427,420 +427,420 @@
 #define vpx_convolve_copy vpx_convolve_copy_sse2
 
 void vpx_d117_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c
 
 void vpx_d117_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c
 
 void vpx_d117_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c
 
 void vpx_d117_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c
 
 void vpx_d135_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_c
 
 void vpx_d135_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_c
 
 void vpx_d135_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_c
 
 void vpx_d135_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_c
 
 void vpx_d153_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d153_predictor_16x16_ssse3(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_d153_predictor_16x16)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d153_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d153_predictor_32x32_ssse3(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_d153_predictor_32x32)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d153_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d153_predictor_4x4_ssse3(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 RTCD_EXTERN void (*vpx_d153_predictor_4x4)(uint8_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint8_t* above,
                                            const uint8_t* left);
 
 void vpx_d153_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d153_predictor_8x8_ssse3(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 RTCD_EXTERN void (*vpx_d153_predictor_8x8)(uint8_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint8_t* above,
                                            const uint8_t* left);
 
 void vpx_d207_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d207_predictor_16x16_ssse3(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_d207_predictor_16x16)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d207_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d207_predictor_32x32_ssse3(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_d207_predictor_32x32)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d207_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d207_predictor_4x4_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_sse2
 
 void vpx_d207_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d207_predictor_8x8_ssse3(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 RTCD_EXTERN void (*vpx_d207_predictor_8x8)(uint8_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint8_t* above,
                                            const uint8_t* left);
 
 void vpx_d45_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_16x16_ssse3(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d45_predictor_16x16)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d45_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_32x32_ssse3(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d45_predictor_32x32)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d45_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_4x4_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_sse2
 
 void vpx_d45_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_8x8_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_sse2
 
 void vpx_d45e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c
 
 void vpx_d63_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d63_predictor_16x16_ssse3(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d63_predictor_16x16)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d63_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d63_predictor_32x32_ssse3(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d63_predictor_32x32)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d63_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d63_predictor_4x4_ssse3(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 RTCD_EXTERN void (*vpx_d63_predictor_4x4)(uint8_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint8_t* above,
                                           const uint8_t* left);
 
 void vpx_d63_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d63_predictor_8x8_ssse3(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 RTCD_EXTERN void (*vpx_d63_predictor_8x8)(uint8_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint8_t* above,
                                           const uint8_t* left);
 
 void vpx_d63e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c
 
 void vpx_dc_128_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_16x16_sse2(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_sse2
 
 void vpx_dc_128_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_32x32_sse2(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_sse2
 
 void vpx_dc_128_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_4x4_sse2(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_sse2
 
 void vpx_dc_128_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_8x8_sse2(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_sse2
 
 void vpx_dc_left_predictor_16x16_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_16x16_sse2(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 #define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_sse2
 
 void vpx_dc_left_predictor_32x32_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_32x32_sse2(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 #define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_sse2
 
 void vpx_dc_left_predictor_4x4_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_4x4_sse2(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 #define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_sse2
 
 void vpx_dc_left_predictor_8x8_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_8x8_sse2(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 #define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_sse2
 
 void vpx_dc_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_16x16_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_sse2
 
 void vpx_dc_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_32x32_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_sse2
 
 void vpx_dc_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_4x4_sse2(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_sse2
 
 void vpx_dc_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_8x8_sse2(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_sse2
 
 void vpx_dc_top_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_16x16_sse2(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_sse2
 
 void vpx_dc_top_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_32x32_sse2(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_sse2
 
 void vpx_dc_top_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_4x4_sse2(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_sse2
 
 void vpx_dc_top_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_8x8_sse2(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_sse2
@@ -884,44 +884,44 @@
 #define vpx_fdct8x8_1 vpx_fdct8x8_1_sse2
 
 void vpx_get16x16var_c(const uint8_t* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        const uint8_t* ref_ptr,
                        int ref_stride,
                        unsigned int* sse,
                        int* sum);
 void vpx_get16x16var_sse2(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
                           int ref_stride,
                           unsigned int* sse,
                           int* sum);
 void vpx_get16x16var_avx2(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
                           int ref_stride,
                           unsigned int* sse,
                           int* sum);
 RTCD_EXTERN void (*vpx_get16x16var)(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse,
                                     int* sum);
 
 unsigned int vpx_get4x4sse_cs_c(const unsigned char* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const unsigned char* ref_ptr,
                                 int ref_stride);
 #define vpx_get4x4sse_cs vpx_get4x4sse_cs_c
 
 void vpx_get8x8var_c(const uint8_t* src_ptr,
-                     int source_stride,
+                     int src_stride,
                      const uint8_t* ref_ptr,
                      int ref_stride,
                      unsigned int* sse,
                      int* sum);
 void vpx_get8x8var_sse2(const uint8_t* src_ptr,
-                        int source_stride,
+                        int src_stride,
                         const uint8_t* ref_ptr,
                         int ref_stride,
                         unsigned int* sse,
@@ -933,41 +933,41 @@
 #define vpx_get_mb_ss vpx_get_mb_ss_sse2
 
 void vpx_h_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_16x16_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_h_predictor_16x16 vpx_h_predictor_16x16_sse2
 
 void vpx_h_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_32x32_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_h_predictor_32x32 vpx_h_predictor_32x32_sse2
 
 void vpx_h_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_4x4_sse2(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_h_predictor_4x4 vpx_h_predictor_4x4_sse2
 
 void vpx_h_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_8x8_sse2(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_h_predictor_8x8 vpx_h_predictor_8x8_sse2
@@ -1012,13 +1012,13 @@
                                      tran_low_t* coeff);
 
 void vpx_he_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c
 
 void vpx_highbd_10_get16x16var_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse,
@@ -1026,7 +1026,7 @@
 #define vpx_highbd_10_get16x16var vpx_highbd_10_get16x16var_c
 
 void vpx_highbd_10_get8x8var_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse,
@@ -1034,57 +1034,57 @@
 #define vpx_highbd_10_get8x8var vpx_highbd_10_get8x8var_c
 
 unsigned int vpx_highbd_10_mse16x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 unsigned int vpx_highbd_10_mse16x16_sse2(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
-                                         int recon_stride,
+                                         int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_mse16x16 vpx_highbd_10_mse16x16_sse2
 
 unsigned int vpx_highbd_10_mse16x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_10_mse16x8 vpx_highbd_10_mse16x8_c
 
 unsigned int vpx_highbd_10_mse8x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_10_mse8x16 vpx_highbd_10_mse8x16_c
 
 unsigned int vpx_highbd_10_mse8x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_highbd_10_mse8x8_sse2(const uint8_t* src_ptr,
-                                       int source_stride,
+                                       int src_stride,
                                        const uint8_t* ref_ptr,
-                                       int recon_stride,
+                                       int ref_stride,
                                        unsigned int* sse);
 #define vpx_highbd_10_mse8x8 vpx_highbd_10_mse8x8_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1094,18 +1094,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1114,18 +1114,18 @@
   vpx_highbd_10_sub_pixel_avg_variance16x32_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1135,18 +1135,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1156,18 +1156,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1177,18 +1177,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1197,9 +1197,9 @@
   vpx_highbd_10_sub_pixel_avg_variance32x64_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1208,9 +1208,9 @@
   vpx_highbd_10_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1220,18 +1220,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1241,18 +1241,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1261,18 +1261,18 @@
   vpx_highbd_10_sub_pixel_avg_variance64x64_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1281,18 +1281,18 @@
   vpx_highbd_10_sub_pixel_avg_variance8x16_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1301,18 +1301,18 @@
   vpx_highbd_10_sub_pixel_avg_variance8x4_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1321,16 +1321,16 @@
   vpx_highbd_10_sub_pixel_avg_variance8x8_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance16x16_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1338,16 +1338,16 @@
   vpx_highbd_10_sub_pixel_variance16x16_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance16x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1355,16 +1355,16 @@
   vpx_highbd_10_sub_pixel_variance16x32_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance16x8_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -1372,16 +1372,16 @@
   vpx_highbd_10_sub_pixel_variance16x8_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance32x16_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1389,16 +1389,16 @@
   vpx_highbd_10_sub_pixel_variance32x16_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance32x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1406,16 +1406,16 @@
   vpx_highbd_10_sub_pixel_variance32x32_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance32x64_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1423,9 +1423,9 @@
   vpx_highbd_10_sub_pixel_variance32x64_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1433,9 +1433,9 @@
   vpx_highbd_10_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1443,16 +1443,16 @@
   vpx_highbd_10_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance64x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1460,16 +1460,16 @@
   vpx_highbd_10_sub_pixel_variance64x32_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance64x64_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1477,16 +1477,16 @@
   vpx_highbd_10_sub_pixel_variance64x64_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance8x16_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -1494,16 +1494,16 @@
   vpx_highbd_10_sub_pixel_variance8x16_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance8x4_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -1511,16 +1511,16 @@
   vpx_highbd_10_sub_pixel_variance8x4_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance8x8_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -1528,148 +1528,148 @@
   vpx_highbd_10_sub_pixel_variance8x8_sse2
 
 unsigned int vpx_highbd_10_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance16x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance16x16 vpx_highbd_10_variance16x16_sse2
 
 unsigned int vpx_highbd_10_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance16x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance16x32 vpx_highbd_10_variance16x32_sse2
 
 unsigned int vpx_highbd_10_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_10_variance16x8_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_10_variance16x8 vpx_highbd_10_variance16x8_sse2
 
 unsigned int vpx_highbd_10_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance32x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance32x16 vpx_highbd_10_variance32x16_sse2
 
 unsigned int vpx_highbd_10_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance32x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance32x32 vpx_highbd_10_variance32x32_sse2
 
 unsigned int vpx_highbd_10_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance32x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance32x64 vpx_highbd_10_variance32x64_sse2
 
 unsigned int vpx_highbd_10_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance4x4 vpx_highbd_10_variance4x4_c
 
 unsigned int vpx_highbd_10_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance4x8 vpx_highbd_10_variance4x8_c
 
 unsigned int vpx_highbd_10_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance64x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance64x32 vpx_highbd_10_variance64x32_sse2
 
 unsigned int vpx_highbd_10_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance64x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance64x64 vpx_highbd_10_variance64x64_sse2
 
 unsigned int vpx_highbd_10_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_10_variance8x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_10_variance8x16 vpx_highbd_10_variance8x16_sse2
 
 unsigned int vpx_highbd_10_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance8x4 vpx_highbd_10_variance8x4_c
 
 unsigned int vpx_highbd_10_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 unsigned int vpx_highbd_10_variance8x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 #define vpx_highbd_10_variance8x8 vpx_highbd_10_variance8x8_sse2
 
 void vpx_highbd_12_get16x16var_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse,
@@ -1677,7 +1677,7 @@
 #define vpx_highbd_12_get16x16var vpx_highbd_12_get16x16var_c
 
 void vpx_highbd_12_get8x8var_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse,
@@ -1685,57 +1685,57 @@
 #define vpx_highbd_12_get8x8var vpx_highbd_12_get8x8var_c
 
 unsigned int vpx_highbd_12_mse16x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 unsigned int vpx_highbd_12_mse16x16_sse2(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
-                                         int recon_stride,
+                                         int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_mse16x16 vpx_highbd_12_mse16x16_sse2
 
 unsigned int vpx_highbd_12_mse16x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_12_mse16x8 vpx_highbd_12_mse16x8_c
 
 unsigned int vpx_highbd_12_mse8x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_12_mse8x16 vpx_highbd_12_mse8x16_c
 
 unsigned int vpx_highbd_12_mse8x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_highbd_12_mse8x8_sse2(const uint8_t* src_ptr,
-                                       int source_stride,
+                                       int src_stride,
                                        const uint8_t* ref_ptr,
-                                       int recon_stride,
+                                       int ref_stride,
                                        unsigned int* sse);
 #define vpx_highbd_12_mse8x8 vpx_highbd_12_mse8x8_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1745,18 +1745,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1765,18 +1765,18 @@
   vpx_highbd_12_sub_pixel_avg_variance16x32_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1786,18 +1786,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1807,18 +1807,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1828,18 +1828,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1848,9 +1848,9 @@
   vpx_highbd_12_sub_pixel_avg_variance32x64_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1859,9 +1859,9 @@
   vpx_highbd_12_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1871,18 +1871,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1892,18 +1892,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1912,18 +1912,18 @@
   vpx_highbd_12_sub_pixel_avg_variance64x64_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1932,18 +1932,18 @@
   vpx_highbd_12_sub_pixel_avg_variance8x16_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1952,18 +1952,18 @@
   vpx_highbd_12_sub_pixel_avg_variance8x4_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1972,16 +1972,16 @@
   vpx_highbd_12_sub_pixel_avg_variance8x8_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance16x16_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1989,16 +1989,16 @@
   vpx_highbd_12_sub_pixel_variance16x16_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance16x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2006,16 +2006,16 @@
   vpx_highbd_12_sub_pixel_variance16x32_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance16x8_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2023,16 +2023,16 @@
   vpx_highbd_12_sub_pixel_variance16x8_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance32x16_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2040,16 +2040,16 @@
   vpx_highbd_12_sub_pixel_variance32x16_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance32x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2057,16 +2057,16 @@
   vpx_highbd_12_sub_pixel_variance32x32_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance32x64_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2074,9 +2074,9 @@
   vpx_highbd_12_sub_pixel_variance32x64_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -2084,9 +2084,9 @@
   vpx_highbd_12_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -2094,16 +2094,16 @@
   vpx_highbd_12_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance64x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2111,16 +2111,16 @@
   vpx_highbd_12_sub_pixel_variance64x32_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance64x64_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2128,16 +2128,16 @@
   vpx_highbd_12_sub_pixel_variance64x64_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance8x16_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2145,16 +2145,16 @@
   vpx_highbd_12_sub_pixel_variance8x16_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance8x4_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -2162,16 +2162,16 @@
   vpx_highbd_12_sub_pixel_variance8x4_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance8x8_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -2179,148 +2179,148 @@
   vpx_highbd_12_sub_pixel_variance8x8_sse2
 
 unsigned int vpx_highbd_12_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance16x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance16x16 vpx_highbd_12_variance16x16_sse2
 
 unsigned int vpx_highbd_12_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance16x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance16x32 vpx_highbd_12_variance16x32_sse2
 
 unsigned int vpx_highbd_12_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_12_variance16x8_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_12_variance16x8 vpx_highbd_12_variance16x8_sse2
 
 unsigned int vpx_highbd_12_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance32x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance32x16 vpx_highbd_12_variance32x16_sse2
 
 unsigned int vpx_highbd_12_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance32x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance32x32 vpx_highbd_12_variance32x32_sse2
 
 unsigned int vpx_highbd_12_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance32x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance32x64 vpx_highbd_12_variance32x64_sse2
 
 unsigned int vpx_highbd_12_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance4x4 vpx_highbd_12_variance4x4_c
 
 unsigned int vpx_highbd_12_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance4x8 vpx_highbd_12_variance4x8_c
 
 unsigned int vpx_highbd_12_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance64x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance64x32 vpx_highbd_12_variance64x32_sse2
 
 unsigned int vpx_highbd_12_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance64x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance64x64 vpx_highbd_12_variance64x64_sse2
 
 unsigned int vpx_highbd_12_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_12_variance8x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_12_variance8x16 vpx_highbd_12_variance8x16_sse2
 
 unsigned int vpx_highbd_12_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance8x4 vpx_highbd_12_variance8x4_c
 
 unsigned int vpx_highbd_12_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 unsigned int vpx_highbd_12_variance8x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 #define vpx_highbd_12_variance8x8 vpx_highbd_12_variance8x8_sse2
 
 void vpx_highbd_8_get16x16var_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse,
@@ -2328,7 +2328,7 @@
 #define vpx_highbd_8_get16x16var vpx_highbd_8_get16x16var_c
 
 void vpx_highbd_8_get8x8var_c(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
                               int ref_stride,
                               unsigned int* sse,
@@ -2336,56 +2336,56 @@
 #define vpx_highbd_8_get8x8var vpx_highbd_8_get8x8var_c
 
 unsigned int vpx_highbd_8_mse16x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 unsigned int vpx_highbd_8_mse16x16_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
-                                        int recon_stride,
+                                        int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_mse16x16 vpx_highbd_8_mse16x16_sse2
 
 unsigned int vpx_highbd_8_mse16x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_8_mse16x8 vpx_highbd_8_mse16x8_c
 
 unsigned int vpx_highbd_8_mse8x16_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_8_mse8x16 vpx_highbd_8_mse8x16_c
 
 unsigned int vpx_highbd_8_mse8x8_c(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
-                                   int recon_stride,
+                                   int ref_stride,
                                    unsigned int* sse);
 unsigned int vpx_highbd_8_mse8x8_sse2(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 #define vpx_highbd_8_mse8x8 vpx_highbd_8_mse8x8_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2394,18 +2394,18 @@
   vpx_highbd_8_sub_pixel_avg_variance16x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2414,18 +2414,18 @@
   vpx_highbd_8_sub_pixel_avg_variance16x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2434,18 +2434,18 @@
   vpx_highbd_8_sub_pixel_avg_variance16x8_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2454,18 +2454,18 @@
   vpx_highbd_8_sub_pixel_avg_variance32x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2474,18 +2474,18 @@
   vpx_highbd_8_sub_pixel_avg_variance32x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2494,9 +2494,9 @@
   vpx_highbd_8_sub_pixel_avg_variance32x64_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -2505,9 +2505,9 @@
   vpx_highbd_8_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -2516,18 +2516,18 @@
   vpx_highbd_8_sub_pixel_avg_variance4x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2536,18 +2536,18 @@
   vpx_highbd_8_sub_pixel_avg_variance64x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2556,18 +2556,18 @@
   vpx_highbd_8_sub_pixel_avg_variance64x64_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2576,18 +2576,18 @@
   vpx_highbd_8_sub_pixel_avg_variance8x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
                                                   const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2596,18 +2596,18 @@
   vpx_highbd_8_sub_pixel_avg_variance8x4_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
                                                   const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2616,16 +2616,16 @@
   vpx_highbd_8_sub_pixel_avg_variance8x8_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance16x16_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2633,16 +2633,16 @@
   vpx_highbd_8_sub_pixel_variance16x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance16x32_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2650,16 +2650,16 @@
   vpx_highbd_8_sub_pixel_variance16x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance16x8_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -2667,16 +2667,16 @@
   vpx_highbd_8_sub_pixel_variance16x8_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance32x16_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2684,16 +2684,16 @@
   vpx_highbd_8_sub_pixel_variance32x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance32x32_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2701,16 +2701,16 @@
   vpx_highbd_8_sub_pixel_variance32x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance32x64_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2718,34 +2718,34 @@
   vpx_highbd_8_sub_pixel_variance32x64_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance4x4 vpx_highbd_8_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance4x8 vpx_highbd_8_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance64x32_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2753,16 +2753,16 @@
   vpx_highbd_8_sub_pixel_variance64x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance64x64_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2770,16 +2770,16 @@
   vpx_highbd_8_sub_pixel_variance64x64_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance8x16_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -2787,16 +2787,16 @@
   vpx_highbd_8_sub_pixel_variance8x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance8x4_sse2(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -2804,16 +2804,16 @@
   vpx_highbd_8_sub_pixel_variance8x4_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance8x8_sse2(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -2821,152 +2821,152 @@
   vpx_highbd_8_sub_pixel_variance8x8_sse2
 
 unsigned int vpx_highbd_8_variance16x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance16x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance16x16 vpx_highbd_8_variance16x16_sse2
 
 unsigned int vpx_highbd_8_variance16x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance16x32_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance16x32 vpx_highbd_8_variance16x32_sse2
 
 unsigned int vpx_highbd_8_variance16x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 unsigned int vpx_highbd_8_variance16x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 #define vpx_highbd_8_variance16x8 vpx_highbd_8_variance16x8_sse2
 
 unsigned int vpx_highbd_8_variance32x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance32x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance32x16 vpx_highbd_8_variance32x16_sse2
 
 unsigned int vpx_highbd_8_variance32x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance32x32_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance32x32 vpx_highbd_8_variance32x32_sse2
 
 unsigned int vpx_highbd_8_variance32x64_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance32x64_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance32x64 vpx_highbd_8_variance32x64_sse2
 
 unsigned int vpx_highbd_8_variance4x4_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance4x4 vpx_highbd_8_variance4x4_c
 
 unsigned int vpx_highbd_8_variance4x8_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance4x8 vpx_highbd_8_variance4x8_c
 
 unsigned int vpx_highbd_8_variance64x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance64x32_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance64x32 vpx_highbd_8_variance64x32_sse2
 
 unsigned int vpx_highbd_8_variance64x64_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance64x64_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance64x64 vpx_highbd_8_variance64x64_sse2
 
 unsigned int vpx_highbd_8_variance8x16_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 unsigned int vpx_highbd_8_variance8x16_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 #define vpx_highbd_8_variance8x16 vpx_highbd_8_variance8x16_sse2
 
 unsigned int vpx_highbd_8_variance8x4_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance8x4 vpx_highbd_8_variance8x4_c
 
 unsigned int vpx_highbd_8_variance8x8_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 unsigned int vpx_highbd_8_variance8x8_sse2(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_8_variance8x8 vpx_highbd_8_variance8x8_sse2
 
-unsigned int vpx_highbd_avg_4x4_c(const uint8_t*, int p);
-unsigned int vpx_highbd_avg_4x4_sse2(const uint8_t*, int p);
+unsigned int vpx_highbd_avg_4x4_c(const uint8_t* s8, int p);
+unsigned int vpx_highbd_avg_4x4_sse2(const uint8_t* s8, int p);
 #define vpx_highbd_avg_4x4 vpx_highbd_avg_4x4_sse2
 
-unsigned int vpx_highbd_avg_8x8_c(const uint8_t*, int p);
-unsigned int vpx_highbd_avg_8x8_sse2(const uint8_t*, int p);
+unsigned int vpx_highbd_avg_8x8_c(const uint8_t* s8, int p);
+unsigned int vpx_highbd_avg_8x8_sse2(const uint8_t* s8, int p);
 #define vpx_highbd_avg_8x8 vpx_highbd_avg_8x8_sse2
 
 void vpx_highbd_comp_avg_pred_c(uint16_t* comp_pred,
@@ -2988,7 +2988,7 @@
                             int y_step_q4,
                             int w,
                             int h,
-                            int bps);
+                            int bd);
 void vpx_highbd_convolve8_sse2(const uint16_t* src,
                                ptrdiff_t src_stride,
                                uint16_t* dst,
@@ -3000,7 +3000,7 @@
                                int y_step_q4,
                                int w,
                                int h,
-                               int bps);
+                               int bd);
 void vpx_highbd_convolve8_avx2(const uint16_t* src,
                                ptrdiff_t src_stride,
                                uint16_t* dst,
@@ -3012,7 +3012,7 @@
                                int y_step_q4,
                                int w,
                                int h,
-                               int bps);
+                               int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8)(const uint16_t* src,
                                          ptrdiff_t src_stride,
                                          uint16_t* dst,
@@ -3024,7 +3024,7 @@
                                          int y_step_q4,
                                          int w,
                                          int h,
-                                         int bps);
+                                         int bd);
 
 void vpx_highbd_convolve8_avg_c(const uint16_t* src,
                                 ptrdiff_t src_stride,
@@ -3037,7 +3037,7 @@
                                 int y_step_q4,
                                 int w,
                                 int h,
-                                int bps);
+                                int bd);
 void vpx_highbd_convolve8_avg_sse2(const uint16_t* src,
                                    ptrdiff_t src_stride,
                                    uint16_t* dst,
@@ -3049,7 +3049,7 @@
                                    int y_step_q4,
                                    int w,
                                    int h,
-                                   int bps);
+                                   int bd);
 void vpx_highbd_convolve8_avg_avx2(const uint16_t* src,
                                    ptrdiff_t src_stride,
                                    uint16_t* dst,
@@ -3061,7 +3061,7 @@
                                    int y_step_q4,
                                    int w,
                                    int h,
-                                   int bps);
+                                   int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_avg)(const uint16_t* src,
                                              ptrdiff_t src_stride,
                                              uint16_t* dst,
@@ -3073,7 +3073,7 @@
                                              int y_step_q4,
                                              int w,
                                              int h,
-                                             int bps);
+                                             int bd);
 
 void vpx_highbd_convolve8_avg_horiz_c(const uint16_t* src,
                                       ptrdiff_t src_stride,
@@ -3086,7 +3086,7 @@
                                       int y_step_q4,
                                       int w,
                                       int h,
-                                      int bps);
+                                      int bd);
 void vpx_highbd_convolve8_avg_horiz_sse2(const uint16_t* src,
                                          ptrdiff_t src_stride,
                                          uint16_t* dst,
@@ -3098,7 +3098,7 @@
                                          int y_step_q4,
                                          int w,
                                          int h,
-                                         int bps);
+                                         int bd);
 void vpx_highbd_convolve8_avg_horiz_avx2(const uint16_t* src,
                                          ptrdiff_t src_stride,
                                          uint16_t* dst,
@@ -3110,7 +3110,7 @@
                                          int y_step_q4,
                                          int w,
                                          int h,
-                                         int bps);
+                                         int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_avg_horiz)(const uint16_t* src,
                                                    ptrdiff_t src_stride,
                                                    uint16_t* dst,
@@ -3122,7 +3122,7 @@
                                                    int y_step_q4,
                                                    int w,
                                                    int h,
-                                                   int bps);
+                                                   int bd);
 
 void vpx_highbd_convolve8_avg_vert_c(const uint16_t* src,
                                      ptrdiff_t src_stride,
@@ -3135,7 +3135,7 @@
                                      int y_step_q4,
                                      int w,
                                      int h,
-                                     int bps);
+                                     int bd);
 void vpx_highbd_convolve8_avg_vert_sse2(const uint16_t* src,
                                         ptrdiff_t src_stride,
                                         uint16_t* dst,
@@ -3147,7 +3147,7 @@
                                         int y_step_q4,
                                         int w,
                                         int h,
-                                        int bps);
+                                        int bd);
 void vpx_highbd_convolve8_avg_vert_avx2(const uint16_t* src,
                                         ptrdiff_t src_stride,
                                         uint16_t* dst,
@@ -3159,7 +3159,7 @@
                                         int y_step_q4,
                                         int w,
                                         int h,
-                                        int bps);
+                                        int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_avg_vert)(const uint16_t* src,
                                                   ptrdiff_t src_stride,
                                                   uint16_t* dst,
@@ -3171,7 +3171,7 @@
                                                   int y_step_q4,
                                                   int w,
                                                   int h,
-                                                  int bps);
+                                                  int bd);
 
 void vpx_highbd_convolve8_horiz_c(const uint16_t* src,
                                   ptrdiff_t src_stride,
@@ -3184,7 +3184,7 @@
                                   int y_step_q4,
                                   int w,
                                   int h,
-                                  int bps);
+                                  int bd);
 void vpx_highbd_convolve8_horiz_sse2(const uint16_t* src,
                                      ptrdiff_t src_stride,
                                      uint16_t* dst,
@@ -3196,7 +3196,7 @@
                                      int y_step_q4,
                                      int w,
                                      int h,
-                                     int bps);
+                                     int bd);
 void vpx_highbd_convolve8_horiz_avx2(const uint16_t* src,
                                      ptrdiff_t src_stride,
                                      uint16_t* dst,
@@ -3208,7 +3208,7 @@
                                      int y_step_q4,
                                      int w,
                                      int h,
-                                     int bps);
+                                     int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_horiz)(const uint16_t* src,
                                                ptrdiff_t src_stride,
                                                uint16_t* dst,
@@ -3220,7 +3220,7 @@
                                                int y_step_q4,
                                                int w,
                                                int h,
-                                               int bps);
+                                               int bd);
 
 void vpx_highbd_convolve8_vert_c(const uint16_t* src,
                                  ptrdiff_t src_stride,
@@ -3233,7 +3233,7 @@
                                  int y_step_q4,
                                  int w,
                                  int h,
-                                 int bps);
+                                 int bd);
 void vpx_highbd_convolve8_vert_sse2(const uint16_t* src,
                                     ptrdiff_t src_stride,
                                     uint16_t* dst,
@@ -3245,7 +3245,7 @@
                                     int y_step_q4,
                                     int w,
                                     int h,
-                                    int bps);
+                                    int bd);
 void vpx_highbd_convolve8_vert_avx2(const uint16_t* src,
                                     ptrdiff_t src_stride,
                                     uint16_t* dst,
@@ -3257,7 +3257,7 @@
                                     int y_step_q4,
                                     int w,
                                     int h,
-                                    int bps);
+                                    int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_vert)(const uint16_t* src,
                                               ptrdiff_t src_stride,
                                               uint16_t* dst,
@@ -3269,7 +3269,7 @@
                                               int y_step_q4,
                                               int w,
                                               int h,
-                                              int bps);
+                                              int bd);
 
 void vpx_highbd_convolve_avg_c(const uint16_t* src,
                                ptrdiff_t src_stride,
@@ -3282,7 +3282,7 @@
                                int y_step_q4,
                                int w,
                                int h,
-                               int bps);
+                               int bd);
 void vpx_highbd_convolve_avg_sse2(const uint16_t* src,
                                   ptrdiff_t src_stride,
                                   uint16_t* dst,
@@ -3294,7 +3294,7 @@
                                   int y_step_q4,
                                   int w,
                                   int h,
-                                  int bps);
+                                  int bd);
 void vpx_highbd_convolve_avg_avx2(const uint16_t* src,
                                   ptrdiff_t src_stride,
                                   uint16_t* dst,
@@ -3306,7 +3306,7 @@
                                   int y_step_q4,
                                   int w,
                                   int h,
-                                  int bps);
+                                  int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve_avg)(const uint16_t* src,
                                             ptrdiff_t src_stride,
                                             uint16_t* dst,
@@ -3318,7 +3318,7 @@
                                             int y_step_q4,
                                             int w,
                                             int h,
-                                            int bps);
+                                            int bd);
 
 void vpx_highbd_convolve_copy_c(const uint16_t* src,
                                 ptrdiff_t src_stride,
@@ -3331,7 +3331,7 @@
                                 int y_step_q4,
                                 int w,
                                 int h,
-                                int bps);
+                                int bd);
 void vpx_highbd_convolve_copy_sse2(const uint16_t* src,
                                    ptrdiff_t src_stride,
                                    uint16_t* dst,
@@ -3343,7 +3343,7 @@
                                    int y_step_q4,
                                    int w,
                                    int h,
-                                   int bps);
+                                   int bd);
 void vpx_highbd_convolve_copy_avx2(const uint16_t* src,
                                    ptrdiff_t src_stride,
                                    uint16_t* dst,
@@ -3355,7 +3355,7 @@
                                    int y_step_q4,
                                    int w,
                                    int h,
-                                   int bps);
+                                   int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve_copy)(const uint16_t* src,
                                              ptrdiff_t src_stride,
                                              uint16_t* dst,
@@ -3367,427 +3367,427 @@
                                              int y_step_q4,
                                              int w,
                                              int h,
-                                             int bps);
+                                             int bd);
 
 void vpx_highbd_d117_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d117_predictor_16x16_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d117_predictor_16x16)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d117_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d117_predictor_32x32_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d117_predictor_32x32)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d117_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d117_predictor_4x4_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d117_predictor_4x4 vpx_highbd_d117_predictor_4x4_sse2
 
 void vpx_highbd_d117_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d117_predictor_8x8_ssse3(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 RTCD_EXTERN void (*vpx_highbd_d117_predictor_8x8)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
+                                                  ptrdiff_t stride,
                                                   const uint16_t* above,
                                                   const uint16_t* left,
                                                   int bd);
 
 void vpx_highbd_d135_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d135_predictor_16x16_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d135_predictor_16x16)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d135_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d135_predictor_32x32_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d135_predictor_32x32)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d135_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d135_predictor_4x4_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d135_predictor_4x4 vpx_highbd_d135_predictor_4x4_sse2
 
 void vpx_highbd_d135_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d135_predictor_8x8_ssse3(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 RTCD_EXTERN void (*vpx_highbd_d135_predictor_8x8)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
+                                                  ptrdiff_t stride,
                                                   const uint16_t* above,
                                                   const uint16_t* left,
                                                   int bd);
 
 void vpx_highbd_d153_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d153_predictor_16x16_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d153_predictor_16x16)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d153_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d153_predictor_32x32_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d153_predictor_32x32)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d153_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d153_predictor_4x4_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d153_predictor_4x4 vpx_highbd_d153_predictor_4x4_sse2
 
 void vpx_highbd_d153_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d153_predictor_8x8_ssse3(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 RTCD_EXTERN void (*vpx_highbd_d153_predictor_8x8)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
+                                                  ptrdiff_t stride,
                                                   const uint16_t* above,
                                                   const uint16_t* left,
                                                   int bd);
 
 void vpx_highbd_d207_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d207_predictor_16x16_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d207_predictor_16x16)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d207_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d207_predictor_32x32_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d207_predictor_32x32)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d207_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d207_predictor_4x4_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d207_predictor_4x4 vpx_highbd_d207_predictor_4x4_sse2
 
 void vpx_highbd_d207_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d207_predictor_8x8_ssse3(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 RTCD_EXTERN void (*vpx_highbd_d207_predictor_8x8)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
+                                                  ptrdiff_t stride,
                                                   const uint16_t* above,
                                                   const uint16_t* left,
                                                   int bd);
 
 void vpx_highbd_d45_predictor_16x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d45_predictor_16x16_ssse3(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 RTCD_EXTERN void (*vpx_highbd_d45_predictor_16x16)(uint16_t* dst,
-                                                   ptrdiff_t y_stride,
+                                                   ptrdiff_t stride,
                                                    const uint16_t* above,
                                                    const uint16_t* left,
                                                    int bd);
 
 void vpx_highbd_d45_predictor_32x32_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d45_predictor_32x32_ssse3(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 RTCD_EXTERN void (*vpx_highbd_d45_predictor_32x32)(uint16_t* dst,
-                                                   ptrdiff_t y_stride,
+                                                   ptrdiff_t stride,
                                                    const uint16_t* above,
                                                    const uint16_t* left,
                                                    int bd);
 
 void vpx_highbd_d45_predictor_4x4_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d45_predictor_4x4_ssse3(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 RTCD_EXTERN void (*vpx_highbd_d45_predictor_4x4)(uint16_t* dst,
-                                                 ptrdiff_t y_stride,
+                                                 ptrdiff_t stride,
                                                  const uint16_t* above,
                                                  const uint16_t* left,
                                                  int bd);
 
 void vpx_highbd_d45_predictor_8x8_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d45_predictor_8x8_ssse3(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 RTCD_EXTERN void (*vpx_highbd_d45_predictor_8x8)(uint16_t* dst,
-                                                 ptrdiff_t y_stride,
+                                                 ptrdiff_t stride,
                                                  const uint16_t* above,
                                                  const uint16_t* left,
                                                  int bd);
 
 void vpx_highbd_d63_predictor_16x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d63_predictor_16x16_ssse3(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 RTCD_EXTERN void (*vpx_highbd_d63_predictor_16x16)(uint16_t* dst,
-                                                   ptrdiff_t y_stride,
+                                                   ptrdiff_t stride,
                                                    const uint16_t* above,
                                                    const uint16_t* left,
                                                    int bd);
 
 void vpx_highbd_d63_predictor_32x32_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d63_predictor_32x32_ssse3(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 RTCD_EXTERN void (*vpx_highbd_d63_predictor_32x32)(uint16_t* dst,
-                                                   ptrdiff_t y_stride,
+                                                   ptrdiff_t stride,
                                                    const uint16_t* above,
                                                    const uint16_t* left,
                                                    int bd);
 
 void vpx_highbd_d63_predictor_4x4_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d63_predictor_4x4_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d63_predictor_4x4 vpx_highbd_d63_predictor_4x4_sse2
 
 void vpx_highbd_d63_predictor_8x8_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d63_predictor_8x8_ssse3(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 RTCD_EXTERN void (*vpx_highbd_d63_predictor_8x8)(uint16_t* dst,
-                                                 ptrdiff_t y_stride,
+                                                 ptrdiff_t stride,
                                                  const uint16_t* above,
                                                  const uint16_t* left,
                                                  int bd);
 
 void vpx_highbd_dc_128_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_128_predictor_16x16_sse2(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_128_predictor_16x16 vpx_highbd_dc_128_predictor_16x16_sse2
 
 void vpx_highbd_dc_128_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_128_predictor_32x32_sse2(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_128_predictor_32x32 vpx_highbd_dc_128_predictor_32x32_sse2
 
 void vpx_highbd_dc_128_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_128_predictor_4x4_sse2(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_128_predictor_4x4 vpx_highbd_dc_128_predictor_4x4_sse2
 
 void vpx_highbd_dc_128_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_128_predictor_8x8_sse2(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_128_predictor_8x8 vpx_highbd_dc_128_predictor_8x8_sse2
 
 void vpx_highbd_dc_left_predictor_16x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 void vpx_highbd_dc_left_predictor_16x16_sse2(uint16_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint16_t* above,
                                              const uint16_t* left,
                                              int bd);
@@ -3795,12 +3795,12 @@
   vpx_highbd_dc_left_predictor_16x16_sse2
 
 void vpx_highbd_dc_left_predictor_32x32_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 void vpx_highbd_dc_left_predictor_32x32_sse2(uint16_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint16_t* above,
                                              const uint16_t* left,
                                              int bd);
@@ -3808,120 +3808,120 @@
   vpx_highbd_dc_left_predictor_32x32_sse2
 
 void vpx_highbd_dc_left_predictor_4x4_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 void vpx_highbd_dc_left_predictor_4x4_sse2(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 #define vpx_highbd_dc_left_predictor_4x4 vpx_highbd_dc_left_predictor_4x4_sse2
 
 void vpx_highbd_dc_left_predictor_8x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 void vpx_highbd_dc_left_predictor_8x8_sse2(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 #define vpx_highbd_dc_left_predictor_8x8 vpx_highbd_dc_left_predictor_8x8_sse2
 
 void vpx_highbd_dc_predictor_16x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_dc_predictor_16x16_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_dc_predictor_16x16 vpx_highbd_dc_predictor_16x16_sse2
 
 void vpx_highbd_dc_predictor_32x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_dc_predictor_32x32_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_dc_predictor_32x32 vpx_highbd_dc_predictor_32x32_sse2
 
 void vpx_highbd_dc_predictor_4x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_dc_predictor_4x4_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_dc_predictor_4x4 vpx_highbd_dc_predictor_4x4_sse2
 
 void vpx_highbd_dc_predictor_8x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_dc_predictor_8x8_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_dc_predictor_8x8 vpx_highbd_dc_predictor_8x8_sse2
 
 void vpx_highbd_dc_top_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_top_predictor_16x16_sse2(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_top_predictor_16x16 vpx_highbd_dc_top_predictor_16x16_sse2
 
 void vpx_highbd_dc_top_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_top_predictor_32x32_sse2(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_top_predictor_32x32 vpx_highbd_dc_top_predictor_32x32_sse2
 
 void vpx_highbd_dc_top_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_top_predictor_4x4_sse2(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_top_predictor_4x4 vpx_highbd_dc_top_predictor_4x4_sse2
 
 void vpx_highbd_dc_top_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_top_predictor_8x8_sse2(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
@@ -3979,53 +3979,68 @@
 #define vpx_highbd_fdct8x8_1 vpx_highbd_fdct8x8_1_c
 
 void vpx_highbd_h_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_h_predictor_16x16_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_h_predictor_16x16 vpx_highbd_h_predictor_16x16_sse2
 
 void vpx_highbd_h_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_h_predictor_32x32_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_h_predictor_32x32 vpx_highbd_h_predictor_32x32_sse2
 
 void vpx_highbd_h_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_h_predictor_4x4_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_h_predictor_4x4 vpx_highbd_h_predictor_4x4_sse2
 
 void vpx_highbd_h_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_h_predictor_8x8_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_h_predictor_8x8 vpx_highbd_h_predictor_8x8_sse2
 
+void vpx_highbd_hadamard_16x16_c(const int16_t* src_diff,
+                                 ptrdiff_t src_stride,
+                                 tran_low_t* coeff);
+#define vpx_highbd_hadamard_16x16 vpx_highbd_hadamard_16x16_c
+
+void vpx_highbd_hadamard_32x32_c(const int16_t* src_diff,
+                                 ptrdiff_t src_stride,
+                                 tran_low_t* coeff);
+#define vpx_highbd_hadamard_32x32 vpx_highbd_hadamard_32x32_c
+
+void vpx_highbd_hadamard_8x8_c(const int16_t* src_diff,
+                               ptrdiff_t src_stride,
+                               tran_low_t* coeff);
+#define vpx_highbd_hadamard_8x8 vpx_highbd_hadamard_8x8_c
+
 void vpx_highbd_idct16x16_10_add_c(const tran_low_t* input,
                                    uint16_t* dest,
                                    int stride,
@@ -4423,9 +4438,9 @@
                                          int bd);
 #define vpx_highbd_lpf_vertical_8_dual vpx_highbd_lpf_vertical_8_dual_sse2
 
-void vpx_highbd_minmax_8x8_c(const uint8_t* s,
+void vpx_highbd_minmax_8x8_c(const uint8_t* s8,
                              int p,
-                             const uint8_t* d,
+                             const uint8_t* d8,
                              int dp,
                              int* min,
                              int* max);
@@ -4511,12 +4526,12 @@
 
 void vpx_highbd_sad16x16x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad16x16x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad16x16x4d vpx_highbd_sad16x16x4d_sse2
@@ -4545,12 +4560,12 @@
 
 void vpx_highbd_sad16x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad16x32x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad16x32x4d vpx_highbd_sad16x32x4d_sse2
@@ -4579,12 +4594,12 @@
 
 void vpx_highbd_sad16x8x4d_c(const uint8_t* src_ptr,
                              int src_stride,
-                             const uint8_t* const ref_ptr[],
+                             const uint8_t* const ref_array[],
                              int ref_stride,
                              uint32_t* sad_array);
 void vpx_highbd_sad16x8x4d_sse2(const uint8_t* src_ptr,
                                 int src_stride,
-                                const uint8_t* const ref_ptr[],
+                                const uint8_t* const ref_array[],
                                 int ref_stride,
                                 uint32_t* sad_array);
 #define vpx_highbd_sad16x8x4d vpx_highbd_sad16x8x4d_sse2
@@ -4613,12 +4628,12 @@
 
 void vpx_highbd_sad32x16x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad32x16x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad32x16x4d vpx_highbd_sad32x16x4d_sse2
@@ -4647,12 +4662,12 @@
 
 void vpx_highbd_sad32x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad32x32x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad32x32x4d vpx_highbd_sad32x32x4d_sse2
@@ -4681,12 +4696,12 @@
 
 void vpx_highbd_sad32x64x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad32x64x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad32x64x4d vpx_highbd_sad32x64x4d_sse2
@@ -4706,12 +4721,12 @@
 
 void vpx_highbd_sad4x4x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 void vpx_highbd_sad4x4x4d_sse2(const uint8_t* src_ptr,
                                int src_stride,
-                               const uint8_t* const ref_ptr[],
+                               const uint8_t* const ref_array[],
                                int ref_stride,
                                uint32_t* sad_array);
 #define vpx_highbd_sad4x4x4d vpx_highbd_sad4x4x4d_sse2
@@ -4731,12 +4746,12 @@
 
 void vpx_highbd_sad4x8x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 void vpx_highbd_sad4x8x4d_sse2(const uint8_t* src_ptr,
                                int src_stride,
-                               const uint8_t* const ref_ptr[],
+                               const uint8_t* const ref_array[],
                                int ref_stride,
                                uint32_t* sad_array);
 #define vpx_highbd_sad4x8x4d vpx_highbd_sad4x8x4d_sse2
@@ -4765,12 +4780,12 @@
 
 void vpx_highbd_sad64x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad64x32x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad64x32x4d vpx_highbd_sad64x32x4d_sse2
@@ -4799,12 +4814,12 @@
 
 void vpx_highbd_sad64x64x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad64x64x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad64x64x4d vpx_highbd_sad64x64x4d_sse2
@@ -4833,12 +4848,12 @@
 
 void vpx_highbd_sad8x16x4d_c(const uint8_t* src_ptr,
                              int src_stride,
-                             const uint8_t* const ref_ptr[],
+                             const uint8_t* const ref_array[],
                              int ref_stride,
                              uint32_t* sad_array);
 void vpx_highbd_sad8x16x4d_sse2(const uint8_t* src_ptr,
                                 int src_stride,
-                                const uint8_t* const ref_ptr[],
+                                const uint8_t* const ref_array[],
                                 int ref_stride,
                                 uint32_t* sad_array);
 #define vpx_highbd_sad8x16x4d vpx_highbd_sad8x16x4d_sse2
@@ -4867,12 +4882,12 @@
 
 void vpx_highbd_sad8x4x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 void vpx_highbd_sad8x4x4d_sse2(const uint8_t* src_ptr,
                                int src_stride,
-                               const uint8_t* const ref_ptr[],
+                               const uint8_t* const ref_array[],
                                int ref_stride,
                                uint32_t* sad_array);
 #define vpx_highbd_sad8x4x4d vpx_highbd_sad8x4x4d_sse2
@@ -4901,12 +4916,12 @@
 
 void vpx_highbd_sad8x8x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 void vpx_highbd_sad8x8x4d_sse2(const uint8_t* src_ptr,
                                int src_stride,
-                               const uint8_t* const ref_ptr[],
+                               const uint8_t* const ref_array[],
                                int ref_stride,
                                uint32_t* sad_array);
 #define vpx_highbd_sad8x8x4d vpx_highbd_sad8x8x4d_sse2
@@ -4915,104 +4930,104 @@
                                  int cols,
                                  int16_t* diff_ptr,
                                  ptrdiff_t diff_stride,
-                                 const uint8_t* src_ptr,
+                                 const uint8_t* src8_ptr,
                                  ptrdiff_t src_stride,
-                                 const uint8_t* pred_ptr,
+                                 const uint8_t* pred8_ptr,
                                  ptrdiff_t pred_stride,
                                  int bd);
 #define vpx_highbd_subtract_block vpx_highbd_subtract_block_c
 
 void vpx_highbd_tm_predictor_16x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_tm_predictor_16x16_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_tm_predictor_16x16 vpx_highbd_tm_predictor_16x16_sse2
 
 void vpx_highbd_tm_predictor_32x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_tm_predictor_32x32_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_tm_predictor_32x32 vpx_highbd_tm_predictor_32x32_sse2
 
 void vpx_highbd_tm_predictor_4x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_tm_predictor_4x4_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_tm_predictor_4x4 vpx_highbd_tm_predictor_4x4_sse2
 
 void vpx_highbd_tm_predictor_8x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_tm_predictor_8x8_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_tm_predictor_8x8 vpx_highbd_tm_predictor_8x8_sse2
 
 void vpx_highbd_v_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_v_predictor_16x16_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_v_predictor_16x16 vpx_highbd_v_predictor_16x16_sse2
 
 void vpx_highbd_v_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_v_predictor_32x32_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_v_predictor_32x32 vpx_highbd_v_predictor_32x32_sse2
 
 void vpx_highbd_v_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_v_predictor_4x4_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_v_predictor_4x4 vpx_highbd_v_predictor_4x4_sse2
 
 void vpx_highbd_v_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_v_predictor_8x8_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
@@ -5322,12 +5337,12 @@
                                   const uint8_t* thresh1);
 #define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_sse2
 
-void vpx_mbpost_proc_across_ip_c(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_c(unsigned char* src,
                                  int pitch,
                                  int rows,
                                  int cols,
                                  int flimit);
-void vpx_mbpost_proc_across_ip_sse2(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_sse2(unsigned char* src,
                                     int pitch,
                                     int rows,
                                     int cols,
@@ -5361,68 +5376,68 @@
 #define vpx_minmax_8x8 vpx_minmax_8x8_sse2
 
 unsigned int vpx_mse16x16_c(const uint8_t* src_ptr,
-                            int source_stride,
+                            int src_stride,
                             const uint8_t* ref_ptr,
-                            int recon_stride,
+                            int ref_stride,
                             unsigned int* sse);
 unsigned int vpx_mse16x16_sse2(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
-                               int recon_stride,
+                               int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_mse16x16_avx2(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
-                               int recon_stride,
+                               int ref_stride,
                                unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_mse16x16)(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
-                                         int recon_stride,
+                                         int ref_stride,
                                          unsigned int* sse);
 
 unsigned int vpx_mse16x8_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 unsigned int vpx_mse16x8_sse2(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
-                              int recon_stride,
+                              int ref_stride,
                               unsigned int* sse);
 unsigned int vpx_mse16x8_avx2(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
-                              int recon_stride,
+                              int ref_stride,
                               unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_mse16x8)(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
-                                        int recon_stride,
+                                        int ref_stride,
                                         unsigned int* sse);
 
 unsigned int vpx_mse8x16_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 unsigned int vpx_mse8x16_sse2(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
-                              int recon_stride,
+                              int ref_stride,
                               unsigned int* sse);
 #define vpx_mse8x16 vpx_mse8x16_sse2
 
 unsigned int vpx_mse8x8_c(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
-                          int recon_stride,
+                          int ref_stride,
                           unsigned int* sse);
 unsigned int vpx_mse8x8_sse2(const uint8_t* src_ptr,
-                             int source_stride,
+                             int src_stride,
                              const uint8_t* ref_ptr,
-                             int recon_stride,
+                             int ref_stride,
                              unsigned int* sse);
 #define vpx_mse8x8 vpx_mse8x8_sse2
 
@@ -5623,12 +5638,12 @@
 
 void vpx_sad16x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x16x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad16x16x4d vpx_sad16x16x4d_sse2
@@ -5673,12 +5688,12 @@
 
 void vpx_sad16x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x32x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad16x32x4d vpx_sad16x32x4d_sse2
@@ -5728,12 +5743,12 @@
 
 void vpx_sad16x8x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad16x8x4d_sse2(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 #define vpx_sad16x8x4d vpx_sad16x8x4d_sse2
@@ -5794,12 +5809,12 @@
 
 void vpx_sad32x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x16x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x16x4d vpx_sad32x16x4d_sse2
@@ -5844,22 +5859,22 @@
 
 void vpx_sad32x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x32x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 void vpx_sad32x32x4d_avx2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 RTCD_EXTERN void (*vpx_sad32x32x4d)(const uint8_t* src_ptr,
                                     int src_stride,
-                                    const uint8_t* const ref_ptr[],
+                                    const uint8_t* const ref_array[],
                                     int ref_stride,
                                     uint32_t* sad_array);
 
@@ -5903,12 +5918,12 @@
 
 void vpx_sad32x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x64x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x64x4d vpx_sad32x64x4d_sse2
@@ -5953,12 +5968,12 @@
 
 void vpx_sad4x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x4x4d_sse2(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad4x4x4d vpx_sad4x4x4d_sse2
@@ -6003,12 +6018,12 @@
 
 void vpx_sad4x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x8x4d_sse2(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad4x8x4d vpx_sad4x8x4d_sse2
@@ -6053,12 +6068,12 @@
 
 void vpx_sad64x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x32x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad64x32x4d vpx_sad64x32x4d_sse2
@@ -6103,22 +6118,22 @@
 
 void vpx_sad64x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x64x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 void vpx_sad64x64x4d_avx2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 RTCD_EXTERN void (*vpx_sad64x64x4d)(const uint8_t* src_ptr,
                                     int src_stride,
-                                    const uint8_t* const ref_ptr[],
+                                    const uint8_t* const ref_array[],
                                     int ref_stride,
                                     uint32_t* sad_array);
 
@@ -6162,12 +6177,12 @@
 
 void vpx_sad8x16x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad8x16x4d_sse2(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 #define vpx_sad8x16x4d vpx_sad8x16x4d_sse2
@@ -6212,12 +6227,12 @@
 
 void vpx_sad8x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x4x4d_sse2(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad8x4x4d vpx_sad8x4x4d_sse2
@@ -6262,12 +6277,12 @@
 
 void vpx_sad8x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x8x4d_sse2(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad8x8x4d vpx_sad8x8x4d_sse2
@@ -6393,850 +6408,850 @@
 #define vpx_scaled_vert vpx_scaled_vert_c
 
 uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x16_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x16)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x32_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x32)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x8_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x8_ssse3(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x8)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x16_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x16)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x32_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x32_avx2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x32)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x64_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x64)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x4_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x4_ssse3(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x4)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x8_ssse3(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x8)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x32_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x32)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x64_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x64_avx2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x64)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x16_ssse3(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x16)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x4_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x4_ssse3(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x4)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x8_ssse3(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x8)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x16_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x16_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x16)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x32_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x32_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x32)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x8_sse2(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x8_ssse3(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x8)(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x16_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x16_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x16)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x32_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x32_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x32_avx2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x32)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x64_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x64_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x64)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x4_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x4_ssse3(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x4)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x8_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x8_ssse3(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x8)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x32_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x32_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x32)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x64_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x64_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x64_avx2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x64)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x16_sse2(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x16_ssse3(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x16)(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x4_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x4_ssse3(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x4)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x8_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x8_ssse3(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x8)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -7264,315 +7279,315 @@
 #define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_sse2
 
 void vpx_tm_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_16x16_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_sse2
 
 void vpx_tm_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_32x32_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_sse2
 
 void vpx_tm_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_4x4_sse2(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_sse2
 
 void vpx_tm_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_8x8_sse2(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_sse2
 
 void vpx_v_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_16x16_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_v_predictor_16x16 vpx_v_predictor_16x16_sse2
 
 void vpx_v_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_32x32_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_v_predictor_32x32 vpx_v_predictor_32x32_sse2
 
 void vpx_v_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_4x4_sse2(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_v_predictor_4x4 vpx_v_predictor_4x4_sse2
 
 void vpx_v_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_8x8_sse2(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_v_predictor_8x8 vpx_v_predictor_8x8_sse2
 
 unsigned int vpx_variance16x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x16_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance16x16_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance16x16)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance16x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x32_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance16x32_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance16x32)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance16x8_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance16x8_sse2(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 unsigned int vpx_variance16x8_avx2(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance16x8)(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 
 unsigned int vpx_variance32x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x16_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance32x16_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance32x16)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance32x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x32_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance32x32_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance32x32)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance32x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x64_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance32x64_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance32x64)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance4x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x4_sse2(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance4x4 vpx_variance4x4_sse2
 
 unsigned int vpx_variance4x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x8_sse2(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance4x8 vpx_variance4x8_sse2
 
 unsigned int vpx_variance64x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x32_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance64x32_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance64x32)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance64x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x64_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance64x64_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance64x64)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance8x16_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance8x16_sse2(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 #define vpx_variance8x16 vpx_variance8x16_sse2
 
 unsigned int vpx_variance8x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x4_sse2(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance8x4 vpx_variance8x4_sse2
 
 unsigned int vpx_variance8x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x8_sse2(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance8x8 vpx_variance8x8_sse2
 
 void vpx_ve_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c
diff --git a/third_party/libvpx/source/config/nacl/vp8_rtcd.h b/third_party/libvpx/source/config/nacl/vp8_rtcd.h
index dc054d6..6e6147d3 100644
--- a/third_party/libvpx/source/config/nacl/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/nacl/vp8_rtcd.h
@@ -27,44 +27,44 @@
 extern "C" {
 #endif
 
-void vp8_bilinear_predict16x16_c(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_bilinear_predict16x16_c(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
 #define vp8_bilinear_predict16x16 vp8_bilinear_predict16x16_c
 
-void vp8_bilinear_predict4x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict4x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
 #define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_c
 
-void vp8_bilinear_predict8x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
 #define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_c
 
-void vp8_bilinear_predict8x8_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x8_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
 #define vp8_bilinear_predict8x8 vp8_bilinear_predict8x8_c
 
 void vp8_blend_b_c(unsigned char* y,
                    unsigned char* u,
                    unsigned char* v,
-                   int y1,
-                   int u1,
-                   int v1,
+                   int y_1,
+                   int u_1,
+                   int v_1,
                    int alpha,
                    int stride);
 #define vp8_blend_b vp8_blend_b_c
@@ -72,9 +72,9 @@
 void vp8_blend_mb_inner_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_inner vp8_blend_mb_inner_c
@@ -82,9 +82,9 @@
 void vp8_blend_mb_outer_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_outer vp8_blend_mb_outer_c
@@ -93,27 +93,27 @@
 #define vp8_block_error vp8_block_error_c
 
 void vp8_copy_mem16x16_c(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 #define vp8_copy_mem16x16 vp8_copy_mem16x16_c
 
 void vp8_copy_mem8x4_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 #define vp8_copy_mem8x4 vp8_copy_mem8x4_c
 
 void vp8_copy_mem8x8_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 #define vp8_copy_mem8x8 vp8_copy_mem8x8_c
 
-void vp8_dc_only_idct_add_c(short input,
-                            unsigned char* pred,
+void vp8_dc_only_idct_add_c(short input_dc,
+                            unsigned char* pred_ptr,
                             int pred_stride,
-                            unsigned char* dst,
+                            unsigned char* dst_ptr,
                             int dst_stride);
 #define vp8_dc_only_idct_add vp8_dc_only_idct_add_c
 
@@ -139,7 +139,7 @@
 
 void vp8_dequant_idct_add_c(short* input,
                             short* dq,
-                            unsigned char* output,
+                            unsigned char* dest,
                             int stride);
 #define vp8_dequant_idct_add vp8_dequant_idct_add_c
 
@@ -158,7 +158,7 @@
                                     char* eobs);
 #define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_c
 
-void vp8_dequantize_b_c(struct blockd*, short* dqc);
+void vp8_dequantize_b_c(struct blockd*, short* DQC);
 #define vp8_dequantize_b vp8_dequantize_b_c
 
 int vp8_diamond_search_sad_c(struct macroblock* x,
@@ -209,55 +209,55 @@
                           union int_mv* center_mv);
 #define vp8_full_search_sad vp8_full_search_sad_c
 
-void vp8_loop_filter_bh_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bh_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
 #define vp8_loop_filter_bh vp8_loop_filter_bh_c
 
-void vp8_loop_filter_bv_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bv_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
 #define vp8_loop_filter_bv vp8_loop_filter_bv_c
 
-void vp8_loop_filter_mbh_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbh_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbh vp8_loop_filter_mbh_c
 
-void vp8_loop_filter_mbv_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbv_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbv vp8_loop_filter_mbv_c
 
-void vp8_loop_filter_bhs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bhs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
 #define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_c
 
-void vp8_loop_filter_bvs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bvs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
 #define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_c
 
-void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y,
-                                              int ystride,
+void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y_ptr,
+                                              int y_stride,
                                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbh vp8_loop_filter_simple_horizontal_edge_c
 
-void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y,
-                                            int ystride,
+void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y_ptr,
+                                            int y_stride,
                                             const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbv vp8_loop_filter_simple_vertical_edge_c
 
@@ -271,8 +271,8 @@
                               struct block* b,
                               struct blockd* d,
                               union int_mv* ref_mv,
-                              int sad_per_bit,
-                              int distance,
+                              int error_per_bit,
+                              int search_range,
                               struct variance_vtable* fn_ptr,
                               int* mvcost[2],
                               union int_mv* center_mv);
@@ -288,50 +288,50 @@
 #define vp8_short_fdct8x4 vp8_short_fdct8x4_c
 
 void vp8_short_idct4x4llm_c(short* input,
-                            unsigned char* pred,
-                            int pitch,
-                            unsigned char* dst,
+                            unsigned char* pred_ptr,
+                            int pred_stride,
+                            unsigned char* dst_ptr,
                             int dst_stride);
 #define vp8_short_idct4x4llm vp8_short_idct4x4llm_c
 
-void vp8_short_inv_walsh4x4_c(short* input, short* output);
+void vp8_short_inv_walsh4x4_c(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_c
 
-void vp8_short_inv_walsh4x4_1_c(short* input, short* output);
+void vp8_short_inv_walsh4x4_1_c(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c
 
 void vp8_short_walsh4x4_c(short* input, short* output, int pitch);
 #define vp8_short_walsh4x4 vp8_short_walsh4x4_c
 
-void vp8_sixtap_predict16x16_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_sixtap_predict16x16_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
 #define vp8_sixtap_predict16x16 vp8_sixtap_predict16x16_c
 
-void vp8_sixtap_predict4x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict4x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
 #define vp8_sixtap_predict4x4 vp8_sixtap_predict4x4_c
 
-void vp8_sixtap_predict8x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
 #define vp8_sixtap_predict8x4 vp8_sixtap_predict8x4_c
 
-void vp8_sixtap_predict8x8_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x8_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
 #define vp8_sixtap_predict8x8 vp8_sixtap_predict8x8_c
 
diff --git a/third_party/libvpx/source/config/nacl/vp9_rtcd.h b/third_party/libvpx/source/config/nacl/vp9_rtcd.h
index 289a739..5ee904c 100644
--- a/third_party/libvpx/source/config/nacl/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/nacl/vp9_rtcd.h
@@ -143,8 +143,8 @@
 #define vp9_highbd_fwht4x4 vp9_highbd_fwht4x4_c
 
 void vp9_highbd_iht16x16_256_add_c(const tran_low_t* input,
-                                   uint16_t* output,
-                                   int pitch,
+                                   uint16_t* dest,
+                                   int stride,
                                    int tx_type,
                                    int bd);
 #define vp9_highbd_iht16x16_256_add vp9_highbd_iht16x16_256_add_c
@@ -225,8 +225,8 @@
 #define vp9_highbd_temporal_filter_apply vp9_highbd_temporal_filter_apply_c
 
 void vp9_iht16x16_256_add_c(const tran_low_t* input,
-                            uint8_t* output,
-                            int pitch,
+                            uint8_t* dest,
+                            int stride,
                             int tx_type);
 #define vp9_iht16x16_256_add vp9_iht16x16_256_add_c
 
diff --git a/third_party/libvpx/source/config/nacl/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/nacl/vpx_dsp_rtcd.h
index 29706b5..f8a910d 100644
--- a/third_party/libvpx/source/config/nacl/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/nacl/vpx_dsp_rtcd.h
@@ -139,253 +139,253 @@
 #define vpx_convolve_copy vpx_convolve_copy_c
 
 void vpx_d117_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c
 
 void vpx_d117_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c
 
 void vpx_d117_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c
 
 void vpx_d117_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c
 
 void vpx_d135_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_c
 
 void vpx_d135_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_c
 
 void vpx_d135_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_c
 
 void vpx_d135_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_c
 
 void vpx_d153_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d153_predictor_16x16 vpx_d153_predictor_16x16_c
 
 void vpx_d153_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d153_predictor_32x32 vpx_d153_predictor_32x32_c
 
 void vpx_d153_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d153_predictor_4x4 vpx_d153_predictor_4x4_c
 
 void vpx_d153_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d153_predictor_8x8 vpx_d153_predictor_8x8_c
 
 void vpx_d207_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d207_predictor_16x16 vpx_d207_predictor_16x16_c
 
 void vpx_d207_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d207_predictor_32x32 vpx_d207_predictor_32x32_c
 
 void vpx_d207_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_c
 
 void vpx_d207_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d207_predictor_8x8 vpx_d207_predictor_8x8_c
 
 void vpx_d45_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d45_predictor_16x16 vpx_d45_predictor_16x16_c
 
 void vpx_d45_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d45_predictor_32x32 vpx_d45_predictor_32x32_c
 
 void vpx_d45_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_c
 
 void vpx_d45_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_c
 
 void vpx_d45e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c
 
 void vpx_d63_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d63_predictor_16x16 vpx_d63_predictor_16x16_c
 
 void vpx_d63_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_d63_predictor_32x32 vpx_d63_predictor_32x32_c
 
 void vpx_d63_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d63_predictor_4x4 vpx_d63_predictor_4x4_c
 
 void vpx_d63_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_d63_predictor_8x8 vpx_d63_predictor_8x8_c
 
 void vpx_d63e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c
 
 void vpx_dc_128_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_c
 
 void vpx_dc_128_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_c
 
 void vpx_dc_128_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_c
 
 void vpx_dc_128_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_c
 
 void vpx_dc_left_predictor_16x16_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_c
 
 void vpx_dc_left_predictor_32x32_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_c
 
 void vpx_dc_left_predictor_4x4_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_c
 
 void vpx_dc_left_predictor_8x8_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_c
 
 void vpx_dc_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_c
 
 void vpx_dc_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_c
 
 void vpx_dc_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_c
 
 void vpx_dc_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_c
 
 void vpx_dc_top_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_c
 
 void vpx_dc_top_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 #define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_c
 
 void vpx_dc_top_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_c
 
 void vpx_dc_top_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_c
@@ -418,7 +418,7 @@
 #define vpx_fdct8x8_1 vpx_fdct8x8_1_c
 
 void vpx_get16x16var_c(const uint8_t* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        const uint8_t* ref_ptr,
                        int ref_stride,
                        unsigned int* sse,
@@ -426,13 +426,13 @@
 #define vpx_get16x16var vpx_get16x16var_c
 
 unsigned int vpx_get4x4sse_cs_c(const unsigned char* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const unsigned char* ref_ptr,
                                 int ref_stride);
 #define vpx_get4x4sse_cs vpx_get4x4sse_cs_c
 
 void vpx_get8x8var_c(const uint8_t* src_ptr,
-                     int source_stride,
+                     int src_stride,
                      const uint8_t* ref_ptr,
                      int ref_stride,
                      unsigned int* sse,
@@ -443,25 +443,25 @@
 #define vpx_get_mb_ss vpx_get_mb_ss_c
 
 void vpx_h_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_h_predictor_16x16 vpx_h_predictor_16x16_c
 
 void vpx_h_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_h_predictor_32x32 vpx_h_predictor_32x32_c
 
 void vpx_h_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 #define vpx_h_predictor_4x4 vpx_h_predictor_4x4_c
 
 void vpx_h_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 #define vpx_h_predictor_8x8 vpx_h_predictor_8x8_c
@@ -482,13 +482,13 @@
 #define vpx_hadamard_8x8 vpx_hadamard_8x8_c
 
 void vpx_he_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c
 
 void vpx_highbd_10_get16x16var_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse,
@@ -496,7 +496,7 @@
 #define vpx_highbd_10_get16x16var vpx_highbd_10_get16x16var_c
 
 void vpx_highbd_10_get8x8var_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse,
@@ -504,38 +504,38 @@
 #define vpx_highbd_10_get8x8var vpx_highbd_10_get8x8var_c
 
 unsigned int vpx_highbd_10_mse16x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 #define vpx_highbd_10_mse16x16 vpx_highbd_10_mse16x16_c
 
 unsigned int vpx_highbd_10_mse16x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_10_mse16x8 vpx_highbd_10_mse16x8_c
 
 unsigned int vpx_highbd_10_mse8x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_10_mse8x16 vpx_highbd_10_mse8x16_c
 
 unsigned int vpx_highbd_10_mse8x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_10_mse8x8 vpx_highbd_10_mse8x8_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -545,9 +545,9 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -556,9 +556,9 @@
   vpx_highbd_10_sub_pixel_avg_variance16x32_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -568,9 +568,9 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -580,9 +580,9 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -592,9 +592,9 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -603,9 +603,9 @@
   vpx_highbd_10_sub_pixel_avg_variance32x64_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -614,9 +614,9 @@
   vpx_highbd_10_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -626,9 +626,9 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -638,9 +638,9 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -649,9 +649,9 @@
   vpx_highbd_10_sub_pixel_avg_variance64x64_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -660,9 +660,9 @@
   vpx_highbd_10_sub_pixel_avg_variance8x16_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -671,9 +671,9 @@
   vpx_highbd_10_sub_pixel_avg_variance8x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -682,9 +682,9 @@
   vpx_highbd_10_sub_pixel_avg_variance8x8_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -692,9 +692,9 @@
   vpx_highbd_10_sub_pixel_variance16x16_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -702,9 +702,9 @@
   vpx_highbd_10_sub_pixel_variance16x32_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -712,9 +712,9 @@
   vpx_highbd_10_sub_pixel_variance16x8_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -722,9 +722,9 @@
   vpx_highbd_10_sub_pixel_variance32x16_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -732,9 +732,9 @@
   vpx_highbd_10_sub_pixel_variance32x32_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -742,9 +742,9 @@
   vpx_highbd_10_sub_pixel_variance32x64_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -752,9 +752,9 @@
   vpx_highbd_10_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -762,9 +762,9 @@
   vpx_highbd_10_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -772,9 +772,9 @@
   vpx_highbd_10_sub_pixel_variance64x32_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -782,9 +782,9 @@
   vpx_highbd_10_sub_pixel_variance64x64_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -792,9 +792,9 @@
   vpx_highbd_10_sub_pixel_variance8x16_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -802,9 +802,9 @@
   vpx_highbd_10_sub_pixel_variance8x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -812,98 +812,98 @@
   vpx_highbd_10_sub_pixel_variance8x8_c
 
 unsigned int vpx_highbd_10_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance16x16 vpx_highbd_10_variance16x16_c
 
 unsigned int vpx_highbd_10_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance16x32 vpx_highbd_10_variance16x32_c
 
 unsigned int vpx_highbd_10_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_10_variance16x8 vpx_highbd_10_variance16x8_c
 
 unsigned int vpx_highbd_10_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance32x16 vpx_highbd_10_variance32x16_c
 
 unsigned int vpx_highbd_10_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance32x32 vpx_highbd_10_variance32x32_c
 
 unsigned int vpx_highbd_10_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance32x64 vpx_highbd_10_variance32x64_c
 
 unsigned int vpx_highbd_10_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance4x4 vpx_highbd_10_variance4x4_c
 
 unsigned int vpx_highbd_10_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance4x8 vpx_highbd_10_variance4x8_c
 
 unsigned int vpx_highbd_10_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance64x32 vpx_highbd_10_variance64x32_c
 
 unsigned int vpx_highbd_10_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_10_variance64x64 vpx_highbd_10_variance64x64_c
 
 unsigned int vpx_highbd_10_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_10_variance8x16 vpx_highbd_10_variance8x16_c
 
 unsigned int vpx_highbd_10_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance8x4 vpx_highbd_10_variance8x4_c
 
 unsigned int vpx_highbd_10_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance8x8 vpx_highbd_10_variance8x8_c
 
 void vpx_highbd_12_get16x16var_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse,
@@ -911,7 +911,7 @@
 #define vpx_highbd_12_get16x16var vpx_highbd_12_get16x16var_c
 
 void vpx_highbd_12_get8x8var_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse,
@@ -919,38 +919,38 @@
 #define vpx_highbd_12_get8x8var vpx_highbd_12_get8x8var_c
 
 unsigned int vpx_highbd_12_mse16x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 #define vpx_highbd_12_mse16x16 vpx_highbd_12_mse16x16_c
 
 unsigned int vpx_highbd_12_mse16x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_12_mse16x8 vpx_highbd_12_mse16x8_c
 
 unsigned int vpx_highbd_12_mse8x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_12_mse8x16 vpx_highbd_12_mse8x16_c
 
 unsigned int vpx_highbd_12_mse8x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_12_mse8x8 vpx_highbd_12_mse8x8_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -960,9 +960,9 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -971,9 +971,9 @@
   vpx_highbd_12_sub_pixel_avg_variance16x32_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -983,9 +983,9 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -995,9 +995,9 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1007,9 +1007,9 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1018,9 +1018,9 @@
   vpx_highbd_12_sub_pixel_avg_variance32x64_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1029,9 +1029,9 @@
   vpx_highbd_12_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1041,9 +1041,9 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1053,9 +1053,9 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1064,9 +1064,9 @@
   vpx_highbd_12_sub_pixel_avg_variance64x64_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1075,9 +1075,9 @@
   vpx_highbd_12_sub_pixel_avg_variance8x16_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1086,9 +1086,9 @@
   vpx_highbd_12_sub_pixel_avg_variance8x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1097,9 +1097,9 @@
   vpx_highbd_12_sub_pixel_avg_variance8x8_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1107,9 +1107,9 @@
   vpx_highbd_12_sub_pixel_variance16x16_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1117,9 +1117,9 @@
   vpx_highbd_12_sub_pixel_variance16x32_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1127,9 +1127,9 @@
   vpx_highbd_12_sub_pixel_variance16x8_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1137,9 +1137,9 @@
   vpx_highbd_12_sub_pixel_variance32x16_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1147,9 +1147,9 @@
   vpx_highbd_12_sub_pixel_variance32x32_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1157,9 +1157,9 @@
   vpx_highbd_12_sub_pixel_variance32x64_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1167,9 +1167,9 @@
   vpx_highbd_12_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1177,9 +1177,9 @@
   vpx_highbd_12_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1187,9 +1187,9 @@
   vpx_highbd_12_sub_pixel_variance64x32_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -1197,9 +1197,9 @@
   vpx_highbd_12_sub_pixel_variance64x64_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1207,9 +1207,9 @@
   vpx_highbd_12_sub_pixel_variance8x16_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1217,9 +1217,9 @@
   vpx_highbd_12_sub_pixel_variance8x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1227,98 +1227,98 @@
   vpx_highbd_12_sub_pixel_variance8x8_c
 
 unsigned int vpx_highbd_12_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance16x16 vpx_highbd_12_variance16x16_c
 
 unsigned int vpx_highbd_12_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance16x32 vpx_highbd_12_variance16x32_c
 
 unsigned int vpx_highbd_12_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_12_variance16x8 vpx_highbd_12_variance16x8_c
 
 unsigned int vpx_highbd_12_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance32x16 vpx_highbd_12_variance32x16_c
 
 unsigned int vpx_highbd_12_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance32x32 vpx_highbd_12_variance32x32_c
 
 unsigned int vpx_highbd_12_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance32x64 vpx_highbd_12_variance32x64_c
 
 unsigned int vpx_highbd_12_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance4x4 vpx_highbd_12_variance4x4_c
 
 unsigned int vpx_highbd_12_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance4x8 vpx_highbd_12_variance4x8_c
 
 unsigned int vpx_highbd_12_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance64x32 vpx_highbd_12_variance64x32_c
 
 unsigned int vpx_highbd_12_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_12_variance64x64 vpx_highbd_12_variance64x64_c
 
 unsigned int vpx_highbd_12_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_12_variance8x16 vpx_highbd_12_variance8x16_c
 
 unsigned int vpx_highbd_12_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance8x4 vpx_highbd_12_variance8x4_c
 
 unsigned int vpx_highbd_12_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance8x8 vpx_highbd_12_variance8x8_c
 
 void vpx_highbd_8_get16x16var_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse,
@@ -1326,7 +1326,7 @@
 #define vpx_highbd_8_get16x16var vpx_highbd_8_get16x16var_c
 
 void vpx_highbd_8_get8x8var_c(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
                               int ref_stride,
                               unsigned int* sse,
@@ -1334,37 +1334,37 @@
 #define vpx_highbd_8_get8x8var vpx_highbd_8_get8x8var_c
 
 unsigned int vpx_highbd_8_mse16x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_8_mse16x16 vpx_highbd_8_mse16x16_c
 
 unsigned int vpx_highbd_8_mse16x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_8_mse16x8 vpx_highbd_8_mse16x8_c
 
 unsigned int vpx_highbd_8_mse8x16_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_8_mse8x16 vpx_highbd_8_mse8x16_c
 
 unsigned int vpx_highbd_8_mse8x8_c(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
-                                   int recon_stride,
+                                   int ref_stride,
                                    unsigned int* sse);
 #define vpx_highbd_8_mse8x8 vpx_highbd_8_mse8x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1373,9 +1373,9 @@
   vpx_highbd_8_sub_pixel_avg_variance16x16_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1384,9 +1384,9 @@
   vpx_highbd_8_sub_pixel_avg_variance16x32_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1395,9 +1395,9 @@
   vpx_highbd_8_sub_pixel_avg_variance16x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1406,9 +1406,9 @@
   vpx_highbd_8_sub_pixel_avg_variance32x16_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1417,9 +1417,9 @@
   vpx_highbd_8_sub_pixel_avg_variance32x32_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1428,9 +1428,9 @@
   vpx_highbd_8_sub_pixel_avg_variance32x64_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -1439,9 +1439,9 @@
   vpx_highbd_8_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -1450,9 +1450,9 @@
   vpx_highbd_8_sub_pixel_avg_variance4x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1461,9 +1461,9 @@
   vpx_highbd_8_sub_pixel_avg_variance64x32_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
@@ -1472,9 +1472,9 @@
   vpx_highbd_8_sub_pixel_avg_variance64x64_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1483,9 +1483,9 @@
   vpx_highbd_8_sub_pixel_avg_variance8x16_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -1494,9 +1494,9 @@
   vpx_highbd_8_sub_pixel_avg_variance8x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -1505,9 +1505,9 @@
   vpx_highbd_8_sub_pixel_avg_variance8x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1515,9 +1515,9 @@
   vpx_highbd_8_sub_pixel_variance16x16_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1525,9 +1525,9 @@
   vpx_highbd_8_sub_pixel_variance16x32_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1535,9 +1535,9 @@
   vpx_highbd_8_sub_pixel_variance16x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1545,9 +1545,9 @@
   vpx_highbd_8_sub_pixel_variance32x16_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1555,9 +1555,9 @@
   vpx_highbd_8_sub_pixel_variance32x32_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1565,27 +1565,27 @@
   vpx_highbd_8_sub_pixel_variance32x64_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance4x4 vpx_highbd_8_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance4x8 vpx_highbd_8_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1593,9 +1593,9 @@
   vpx_highbd_8_sub_pixel_variance64x32_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
@@ -1603,9 +1603,9 @@
   vpx_highbd_8_sub_pixel_variance64x64_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1613,118 +1613,118 @@
   vpx_highbd_8_sub_pixel_variance8x16_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance8x4 vpx_highbd_8_sub_pixel_variance8x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance8x8 vpx_highbd_8_sub_pixel_variance8x8_c
 
 unsigned int vpx_highbd_8_variance16x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance16x16 vpx_highbd_8_variance16x16_c
 
 unsigned int vpx_highbd_8_variance16x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance16x32 vpx_highbd_8_variance16x32_c
 
 unsigned int vpx_highbd_8_variance16x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_8_variance16x8 vpx_highbd_8_variance16x8_c
 
 unsigned int vpx_highbd_8_variance32x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance32x16 vpx_highbd_8_variance32x16_c
 
 unsigned int vpx_highbd_8_variance32x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance32x32 vpx_highbd_8_variance32x32_c
 
 unsigned int vpx_highbd_8_variance32x64_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance32x64 vpx_highbd_8_variance32x64_c
 
 unsigned int vpx_highbd_8_variance4x4_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance4x4 vpx_highbd_8_variance4x4_c
 
 unsigned int vpx_highbd_8_variance4x8_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance4x8 vpx_highbd_8_variance4x8_c
 
 unsigned int vpx_highbd_8_variance64x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance64x32 vpx_highbd_8_variance64x32_c
 
 unsigned int vpx_highbd_8_variance64x64_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 #define vpx_highbd_8_variance64x64 vpx_highbd_8_variance64x64_c
 
 unsigned int vpx_highbd_8_variance8x16_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_8_variance8x16 vpx_highbd_8_variance8x16_c
 
 unsigned int vpx_highbd_8_variance8x4_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance8x4 vpx_highbd_8_variance8x4_c
 
 unsigned int vpx_highbd_8_variance8x8_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance8x8 vpx_highbd_8_variance8x8_c
 
-unsigned int vpx_highbd_avg_4x4_c(const uint8_t*, int p);
+unsigned int vpx_highbd_avg_4x4_c(const uint8_t* s8, int p);
 #define vpx_highbd_avg_4x4 vpx_highbd_avg_4x4_c
 
-unsigned int vpx_highbd_avg_8x8_c(const uint8_t*, int p);
+unsigned int vpx_highbd_avg_8x8_c(const uint8_t* s8, int p);
 #define vpx_highbd_avg_8x8 vpx_highbd_avg_8x8_c
 
 void vpx_highbd_comp_avg_pred_c(uint16_t* comp_pred,
@@ -1746,7 +1746,7 @@
                             int y_step_q4,
                             int w,
                             int h,
-                            int bps);
+                            int bd);
 #define vpx_highbd_convolve8 vpx_highbd_convolve8_c
 
 void vpx_highbd_convolve8_avg_c(const uint16_t* src,
@@ -1760,7 +1760,7 @@
                                 int y_step_q4,
                                 int w,
                                 int h,
-                                int bps);
+                                int bd);
 #define vpx_highbd_convolve8_avg vpx_highbd_convolve8_avg_c
 
 void vpx_highbd_convolve8_avg_horiz_c(const uint16_t* src,
@@ -1774,7 +1774,7 @@
                                       int y_step_q4,
                                       int w,
                                       int h,
-                                      int bps);
+                                      int bd);
 #define vpx_highbd_convolve8_avg_horiz vpx_highbd_convolve8_avg_horiz_c
 
 void vpx_highbd_convolve8_avg_vert_c(const uint16_t* src,
@@ -1788,7 +1788,7 @@
                                      int y_step_q4,
                                      int w,
                                      int h,
-                                     int bps);
+                                     int bd);
 #define vpx_highbd_convolve8_avg_vert vpx_highbd_convolve8_avg_vert_c
 
 void vpx_highbd_convolve8_horiz_c(const uint16_t* src,
@@ -1802,7 +1802,7 @@
                                   int y_step_q4,
                                   int w,
                                   int h,
-                                  int bps);
+                                  int bd);
 #define vpx_highbd_convolve8_horiz vpx_highbd_convolve8_horiz_c
 
 void vpx_highbd_convolve8_vert_c(const uint16_t* src,
@@ -1816,7 +1816,7 @@
                                  int y_step_q4,
                                  int w,
                                  int h,
-                                 int bps);
+                                 int bd);
 #define vpx_highbd_convolve8_vert vpx_highbd_convolve8_vert_c
 
 void vpx_highbd_convolve_avg_c(const uint16_t* src,
@@ -1830,7 +1830,7 @@
                                int y_step_q4,
                                int w,
                                int h,
-                               int bps);
+                               int bd);
 #define vpx_highbd_convolve_avg vpx_highbd_convolve_avg_c
 
 void vpx_highbd_convolve_copy_c(const uint16_t* src,
@@ -1844,284 +1844,284 @@
                                 int y_step_q4,
                                 int w,
                                 int h,
-                                int bps);
+                                int bd);
 #define vpx_highbd_convolve_copy vpx_highbd_convolve_copy_c
 
 void vpx_highbd_d117_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d117_predictor_16x16 vpx_highbd_d117_predictor_16x16_c
 
 void vpx_highbd_d117_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d117_predictor_32x32 vpx_highbd_d117_predictor_32x32_c
 
 void vpx_highbd_d117_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d117_predictor_4x4 vpx_highbd_d117_predictor_4x4_c
 
 void vpx_highbd_d117_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d117_predictor_8x8 vpx_highbd_d117_predictor_8x8_c
 
 void vpx_highbd_d135_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d135_predictor_16x16 vpx_highbd_d135_predictor_16x16_c
 
 void vpx_highbd_d135_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d135_predictor_32x32 vpx_highbd_d135_predictor_32x32_c
 
 void vpx_highbd_d135_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d135_predictor_4x4 vpx_highbd_d135_predictor_4x4_c
 
 void vpx_highbd_d135_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d135_predictor_8x8 vpx_highbd_d135_predictor_8x8_c
 
 void vpx_highbd_d153_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d153_predictor_16x16 vpx_highbd_d153_predictor_16x16_c
 
 void vpx_highbd_d153_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d153_predictor_32x32 vpx_highbd_d153_predictor_32x32_c
 
 void vpx_highbd_d153_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d153_predictor_4x4 vpx_highbd_d153_predictor_4x4_c
 
 void vpx_highbd_d153_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d153_predictor_8x8 vpx_highbd_d153_predictor_8x8_c
 
 void vpx_highbd_d207_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d207_predictor_16x16 vpx_highbd_d207_predictor_16x16_c
 
 void vpx_highbd_d207_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d207_predictor_32x32 vpx_highbd_d207_predictor_32x32_c
 
 void vpx_highbd_d207_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d207_predictor_4x4 vpx_highbd_d207_predictor_4x4_c
 
 void vpx_highbd_d207_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_d207_predictor_8x8 vpx_highbd_d207_predictor_8x8_c
 
 void vpx_highbd_d45_predictor_16x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_d45_predictor_16x16 vpx_highbd_d45_predictor_16x16_c
 
 void vpx_highbd_d45_predictor_32x32_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_d45_predictor_32x32 vpx_highbd_d45_predictor_32x32_c
 
 void vpx_highbd_d45_predictor_4x4_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 #define vpx_highbd_d45_predictor_4x4 vpx_highbd_d45_predictor_4x4_c
 
 void vpx_highbd_d45_predictor_8x8_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 #define vpx_highbd_d45_predictor_8x8 vpx_highbd_d45_predictor_8x8_c
 
 void vpx_highbd_d63_predictor_16x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_d63_predictor_16x16 vpx_highbd_d63_predictor_16x16_c
 
 void vpx_highbd_d63_predictor_32x32_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_d63_predictor_32x32 vpx_highbd_d63_predictor_32x32_c
 
 void vpx_highbd_d63_predictor_4x4_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 #define vpx_highbd_d63_predictor_4x4 vpx_highbd_d63_predictor_4x4_c
 
 void vpx_highbd_d63_predictor_8x8_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 #define vpx_highbd_d63_predictor_8x8 vpx_highbd_d63_predictor_8x8_c
 
 void vpx_highbd_dc_128_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 #define vpx_highbd_dc_128_predictor_16x16 vpx_highbd_dc_128_predictor_16x16_c
 
 void vpx_highbd_dc_128_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 #define vpx_highbd_dc_128_predictor_32x32 vpx_highbd_dc_128_predictor_32x32_c
 
 void vpx_highbd_dc_128_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_dc_128_predictor_4x4 vpx_highbd_dc_128_predictor_4x4_c
 
 void vpx_highbd_dc_128_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_dc_128_predictor_8x8 vpx_highbd_dc_128_predictor_8x8_c
 
 void vpx_highbd_dc_left_predictor_16x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_left_predictor_16x16 vpx_highbd_dc_left_predictor_16x16_c
 
 void vpx_highbd_dc_left_predictor_32x32_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_left_predictor_32x32 vpx_highbd_dc_left_predictor_32x32_c
 
 void vpx_highbd_dc_left_predictor_4x4_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_dc_left_predictor_4x4 vpx_highbd_dc_left_predictor_4x4_c
 
 void vpx_highbd_dc_left_predictor_8x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_dc_left_predictor_8x8 vpx_highbd_dc_left_predictor_8x8_c
 
 void vpx_highbd_dc_predictor_16x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_dc_predictor_16x16 vpx_highbd_dc_predictor_16x16_c
 
 void vpx_highbd_dc_predictor_32x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_dc_predictor_32x32 vpx_highbd_dc_predictor_32x32_c
 
 void vpx_highbd_dc_predictor_4x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 #define vpx_highbd_dc_predictor_4x4 vpx_highbd_dc_predictor_4x4_c
 
 void vpx_highbd_dc_predictor_8x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 #define vpx_highbd_dc_predictor_8x8 vpx_highbd_dc_predictor_8x8_c
 
 void vpx_highbd_dc_top_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 #define vpx_highbd_dc_top_predictor_16x16 vpx_highbd_dc_top_predictor_16x16_c
 
 void vpx_highbd_dc_top_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 #define vpx_highbd_dc_top_predictor_32x32 vpx_highbd_dc_top_predictor_32x32_c
 
 void vpx_highbd_dc_top_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_dc_top_predictor_4x4 vpx_highbd_dc_top_predictor_4x4_c
 
 void vpx_highbd_dc_top_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
@@ -2164,33 +2164,48 @@
 #define vpx_highbd_fdct8x8_1 vpx_highbd_fdct8x8_1_c
 
 void vpx_highbd_h_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 #define vpx_highbd_h_predictor_16x16 vpx_highbd_h_predictor_16x16_c
 
 void vpx_highbd_h_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 #define vpx_highbd_h_predictor_32x32 vpx_highbd_h_predictor_32x32_c
 
 void vpx_highbd_h_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 #define vpx_highbd_h_predictor_4x4 vpx_highbd_h_predictor_4x4_c
 
 void vpx_highbd_h_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 #define vpx_highbd_h_predictor_8x8 vpx_highbd_h_predictor_8x8_c
 
+void vpx_highbd_hadamard_16x16_c(const int16_t* src_diff,
+                                 ptrdiff_t src_stride,
+                                 tran_low_t* coeff);
+#define vpx_highbd_hadamard_16x16 vpx_highbd_hadamard_16x16_c
+
+void vpx_highbd_hadamard_32x32_c(const int16_t* src_diff,
+                                 ptrdiff_t src_stride,
+                                 tran_low_t* coeff);
+#define vpx_highbd_hadamard_32x32 vpx_highbd_hadamard_32x32_c
+
+void vpx_highbd_hadamard_8x8_c(const int16_t* src_diff,
+                               ptrdiff_t src_stride,
+                               tran_low_t* coeff);
+#define vpx_highbd_hadamard_8x8 vpx_highbd_hadamard_8x8_c
+
 void vpx_highbd_idct16x16_10_add_c(const tran_low_t* input,
                                    uint16_t* dest,
                                    int stride,
@@ -2389,9 +2404,9 @@
                                       int bd);
 #define vpx_highbd_lpf_vertical_8_dual vpx_highbd_lpf_vertical_8_dual_c
 
-void vpx_highbd_minmax_8x8_c(const uint8_t* s,
+void vpx_highbd_minmax_8x8_c(const uint8_t* s8,
                              int p,
-                             const uint8_t* d,
+                             const uint8_t* d8,
                              int dp,
                              int* min,
                              int* max);
@@ -2442,7 +2457,7 @@
 
 void vpx_highbd_sad16x16x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad16x16x4d vpx_highbd_sad16x16x4d_c
@@ -2462,7 +2477,7 @@
 
 void vpx_highbd_sad16x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad16x32x4d vpx_highbd_sad16x32x4d_c
@@ -2482,7 +2497,7 @@
 
 void vpx_highbd_sad16x8x4d_c(const uint8_t* src_ptr,
                              int src_stride,
-                             const uint8_t* const ref_ptr[],
+                             const uint8_t* const ref_array[],
                              int ref_stride,
                              uint32_t* sad_array);
 #define vpx_highbd_sad16x8x4d vpx_highbd_sad16x8x4d_c
@@ -2502,7 +2517,7 @@
 
 void vpx_highbd_sad32x16x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad32x16x4d vpx_highbd_sad32x16x4d_c
@@ -2522,7 +2537,7 @@
 
 void vpx_highbd_sad32x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad32x32x4d vpx_highbd_sad32x32x4d_c
@@ -2542,7 +2557,7 @@
 
 void vpx_highbd_sad32x64x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad32x64x4d vpx_highbd_sad32x64x4d_c
@@ -2562,7 +2577,7 @@
 
 void vpx_highbd_sad4x4x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 #define vpx_highbd_sad4x4x4d vpx_highbd_sad4x4x4d_c
@@ -2582,7 +2597,7 @@
 
 void vpx_highbd_sad4x8x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 #define vpx_highbd_sad4x8x4d vpx_highbd_sad4x8x4d_c
@@ -2602,7 +2617,7 @@
 
 void vpx_highbd_sad64x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad64x32x4d vpx_highbd_sad64x32x4d_c
@@ -2622,7 +2637,7 @@
 
 void vpx_highbd_sad64x64x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 #define vpx_highbd_sad64x64x4d vpx_highbd_sad64x64x4d_c
@@ -2642,7 +2657,7 @@
 
 void vpx_highbd_sad8x16x4d_c(const uint8_t* src_ptr,
                              int src_stride,
-                             const uint8_t* const ref_ptr[],
+                             const uint8_t* const ref_array[],
                              int ref_stride,
                              uint32_t* sad_array);
 #define vpx_highbd_sad8x16x4d vpx_highbd_sad8x16x4d_c
@@ -2662,7 +2677,7 @@
 
 void vpx_highbd_sad8x4x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 #define vpx_highbd_sad8x4x4d vpx_highbd_sad8x4x4d_c
@@ -2682,7 +2697,7 @@
 
 void vpx_highbd_sad8x8x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 #define vpx_highbd_sad8x8x4d vpx_highbd_sad8x8x4d_c
@@ -2691,64 +2706,64 @@
                                  int cols,
                                  int16_t* diff_ptr,
                                  ptrdiff_t diff_stride,
-                                 const uint8_t* src_ptr,
+                                 const uint8_t* src8_ptr,
                                  ptrdiff_t src_stride,
-                                 const uint8_t* pred_ptr,
+                                 const uint8_t* pred8_ptr,
                                  ptrdiff_t pred_stride,
                                  int bd);
 #define vpx_highbd_subtract_block vpx_highbd_subtract_block_c
 
 void vpx_highbd_tm_predictor_16x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_tm_predictor_16x16 vpx_highbd_tm_predictor_16x16_c
 
 void vpx_highbd_tm_predictor_32x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_tm_predictor_32x32 vpx_highbd_tm_predictor_32x32_c
 
 void vpx_highbd_tm_predictor_4x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 #define vpx_highbd_tm_predictor_4x4 vpx_highbd_tm_predictor_4x4_c
 
 void vpx_highbd_tm_predictor_8x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 #define vpx_highbd_tm_predictor_8x8 vpx_highbd_tm_predictor_8x8_c
 
 void vpx_highbd_v_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 #define vpx_highbd_v_predictor_16x16 vpx_highbd_v_predictor_16x16_c
 
 void vpx_highbd_v_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 #define vpx_highbd_v_predictor_32x32 vpx_highbd_v_predictor_32x32_c
 
 void vpx_highbd_v_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 #define vpx_highbd_v_predictor_4x4 vpx_highbd_v_predictor_4x4_c
 
 void vpx_highbd_v_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
@@ -2910,7 +2925,7 @@
                                const uint8_t* thresh1);
 #define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_c
 
-void vpx_mbpost_proc_across_ip_c(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_c(unsigned char* src,
                                  int pitch,
                                  int rows,
                                  int cols,
@@ -2933,30 +2948,30 @@
 #define vpx_minmax_8x8 vpx_minmax_8x8_c
 
 unsigned int vpx_mse16x16_c(const uint8_t* src_ptr,
-                            int source_stride,
+                            int src_stride,
                             const uint8_t* ref_ptr,
-                            int recon_stride,
+                            int ref_stride,
                             unsigned int* sse);
 #define vpx_mse16x16 vpx_mse16x16_c
 
 unsigned int vpx_mse16x8_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 #define vpx_mse16x8 vpx_mse16x8_c
 
 unsigned int vpx_mse8x16_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 #define vpx_mse8x16 vpx_mse8x16_c
 
 unsigned int vpx_mse8x8_c(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
-                          int recon_stride,
+                          int ref_stride,
                           unsigned int* sse);
 #define vpx_mse8x8 vpx_mse8x8_c
 
@@ -3031,7 +3046,7 @@
 
 void vpx_sad16x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad16x16x4d vpx_sad16x16x4d_c
@@ -3058,7 +3073,7 @@
 
 void vpx_sad16x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad16x32x4d vpx_sad16x32x4d_c
@@ -3085,7 +3100,7 @@
 
 void vpx_sad16x8x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 #define vpx_sad16x8x4d vpx_sad16x8x4d_c
@@ -3112,7 +3127,7 @@
 
 void vpx_sad32x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad32x16x4d vpx_sad32x16x4d_c
@@ -3132,7 +3147,7 @@
 
 void vpx_sad32x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad32x32x4d vpx_sad32x32x4d_c
@@ -3152,7 +3167,7 @@
 
 void vpx_sad32x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad32x64x4d vpx_sad32x64x4d_c
@@ -3179,7 +3194,7 @@
 
 void vpx_sad4x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 #define vpx_sad4x4x4d vpx_sad4x4x4d_c
@@ -3206,7 +3221,7 @@
 
 void vpx_sad4x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 #define vpx_sad4x8x4d vpx_sad4x8x4d_c
@@ -3226,7 +3241,7 @@
 
 void vpx_sad64x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad64x32x4d vpx_sad64x32x4d_c
@@ -3246,7 +3261,7 @@
 
 void vpx_sad64x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 #define vpx_sad64x64x4d vpx_sad64x64x4d_c
@@ -3273,7 +3288,7 @@
 
 void vpx_sad8x16x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 #define vpx_sad8x16x4d vpx_sad8x16x4d_c
@@ -3300,7 +3315,7 @@
 
 void vpx_sad8x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 #define vpx_sad8x4x4d vpx_sad8x4x4d_c
@@ -3327,7 +3342,7 @@
 
 void vpx_sad8x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 #define vpx_sad8x8x4d vpx_sad8x8x4d_c
@@ -3421,9 +3436,9 @@
 #define vpx_scaled_vert vpx_scaled_vert_c
 
 uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -3431,9 +3446,9 @@
 #define vpx_sub_pixel_avg_variance16x16 vpx_sub_pixel_avg_variance16x16_c
 
 uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -3441,9 +3456,9 @@
 #define vpx_sub_pixel_avg_variance16x32 vpx_sub_pixel_avg_variance16x32_c
 
 uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
@@ -3451,9 +3466,9 @@
 #define vpx_sub_pixel_avg_variance16x8 vpx_sub_pixel_avg_variance16x8_c
 
 uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -3461,9 +3476,9 @@
 #define vpx_sub_pixel_avg_variance32x16 vpx_sub_pixel_avg_variance32x16_c
 
 uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -3471,9 +3486,9 @@
 #define vpx_sub_pixel_avg_variance32x32 vpx_sub_pixel_avg_variance32x32_c
 
 uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -3481,9 +3496,9 @@
 #define vpx_sub_pixel_avg_variance32x64 vpx_sub_pixel_avg_variance32x64_c
 
 uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
@@ -3491,9 +3506,9 @@
 #define vpx_sub_pixel_avg_variance4x4 vpx_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
@@ -3501,9 +3516,9 @@
 #define vpx_sub_pixel_avg_variance4x8 vpx_sub_pixel_avg_variance4x8_c
 
 uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -3511,9 +3526,9 @@
 #define vpx_sub_pixel_avg_variance64x32 vpx_sub_pixel_avg_variance64x32_c
 
 uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
@@ -3521,9 +3536,9 @@
 #define vpx_sub_pixel_avg_variance64x64 vpx_sub_pixel_avg_variance64x64_c
 
 uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
@@ -3531,9 +3546,9 @@
 #define vpx_sub_pixel_avg_variance8x16 vpx_sub_pixel_avg_variance8x16_c
 
 uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
@@ -3541,9 +3556,9 @@
 #define vpx_sub_pixel_avg_variance8x4 vpx_sub_pixel_avg_variance8x4_c
 
 uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
@@ -3551,117 +3566,117 @@
 #define vpx_sub_pixel_avg_variance8x8 vpx_sub_pixel_avg_variance8x8_c
 
 uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance16x16 vpx_sub_pixel_variance16x16_c
 
 uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance16x32 vpx_sub_pixel_variance16x32_c
 
 uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 #define vpx_sub_pixel_variance16x8 vpx_sub_pixel_variance16x8_c
 
 uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance32x16 vpx_sub_pixel_variance32x16_c
 
 uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance32x32 vpx_sub_pixel_variance32x32_c
 
 uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance32x64 vpx_sub_pixel_variance32x64_c
 
 uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 #define vpx_sub_pixel_variance4x4 vpx_sub_pixel_variance4x4_c
 
 uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 #define vpx_sub_pixel_variance4x8 vpx_sub_pixel_variance4x8_c
 
 uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance64x32 vpx_sub_pixel_variance64x32_c
 
 uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 #define vpx_sub_pixel_variance64x64 vpx_sub_pixel_variance64x64_c
 
 uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 #define vpx_sub_pixel_variance8x16 vpx_sub_pixel_variance8x16_c
 
 uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 #define vpx_sub_pixel_variance8x4 vpx_sub_pixel_variance8x4_c
 
 uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
@@ -3681,146 +3696,146 @@
 #define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_c
 
 void vpx_tm_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_c
 
 void vpx_tm_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_c
 
 void vpx_tm_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_c
 
 void vpx_tm_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_c
 
 void vpx_v_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_v_predictor_16x16 vpx_v_predictor_16x16_c
 
 void vpx_v_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 #define vpx_v_predictor_32x32 vpx_v_predictor_32x32_c
 
 void vpx_v_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 #define vpx_v_predictor_4x4 vpx_v_predictor_4x4_c
 
 void vpx_v_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 #define vpx_v_predictor_8x8 vpx_v_predictor_8x8_c
 
 unsigned int vpx_variance16x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance16x16 vpx_variance16x16_c
 
 unsigned int vpx_variance16x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance16x32 vpx_variance16x32_c
 
 unsigned int vpx_variance16x8_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 #define vpx_variance16x8 vpx_variance16x8_c
 
 unsigned int vpx_variance32x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance32x16 vpx_variance32x16_c
 
 unsigned int vpx_variance32x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance32x32 vpx_variance32x32_c
 
 unsigned int vpx_variance32x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance32x64 vpx_variance32x64_c
 
 unsigned int vpx_variance4x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 #define vpx_variance4x4 vpx_variance4x4_c
 
 unsigned int vpx_variance4x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 #define vpx_variance4x8 vpx_variance4x8_c
 
 unsigned int vpx_variance64x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance64x32 vpx_variance64x32_c
 
 unsigned int vpx_variance64x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 #define vpx_variance64x64 vpx_variance64x64_c
 
 unsigned int vpx_variance8x16_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 #define vpx_variance8x16 vpx_variance8x16_c
 
 unsigned int vpx_variance8x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 #define vpx_variance8x4 vpx_variance8x4_c
 
 unsigned int vpx_variance8x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 #define vpx_variance8x8 vpx_variance8x8_c
 
 void vpx_ve_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c
diff --git a/third_party/libvpx/source/config/vpx_version.h b/third_party/libvpx/source/config/vpx_version.h
index 3a2e1b4..e8375a3 100644
--- a/third_party/libvpx/source/config/vpx_version.h
+++ b/third_party/libvpx/source/config/vpx_version.h
@@ -2,7 +2,7 @@
 #define VERSION_MAJOR  1
 #define VERSION_MINOR  7
 #define VERSION_PATCH  0
-#define VERSION_EXTRA  "1264-gfa0076282"
+#define VERSION_EXTRA  "1305-g7808cc796"
 #define VERSION_PACKED ((VERSION_MAJOR<<16)|(VERSION_MINOR<<8)|(VERSION_PATCH))
-#define VERSION_STRING_NOSP "v1.7.0-1264-gfa0076282"
-#define VERSION_STRING      " v1.7.0-1264-gfa0076282"
+#define VERSION_STRING_NOSP "v1.7.0-1305-g7808cc796"
+#define VERSION_STRING      " v1.7.0-1305-g7808cc796"
diff --git a/third_party/libvpx/source/config/win/ia32/vp8_rtcd.h b/third_party/libvpx/source/config/win/ia32/vp8_rtcd.h
index 850ca91..c46bfe5 100644
--- a/third_party/libvpx/source/config/win/ia32/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/win/ia32/vp8_rtcd.h
@@ -27,90 +27,90 @@
 extern "C" {
 #endif
 
-void vp8_bilinear_predict16x16_c(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_bilinear_predict16x16_c(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-void vp8_bilinear_predict16x16_sse2(unsigned char* src,
-                                    int src_pitch,
-                                    int xofst,
-                                    int yofst,
-                                    unsigned char* dst,
+void vp8_bilinear_predict16x16_sse2(unsigned char* src_ptr,
+                                    int src_pixels_per_line,
+                                    int xoffset,
+                                    int yoffset,
+                                    unsigned char* dst_ptr,
                                     int dst_pitch);
-void vp8_bilinear_predict16x16_ssse3(unsigned char* src,
-                                     int src_pitch,
-                                     int xofst,
-                                     int yofst,
-                                     unsigned char* dst,
+void vp8_bilinear_predict16x16_ssse3(unsigned char* src_ptr,
+                                     int src_pixels_per_line,
+                                     int xoffset,
+                                     int yoffset,
+                                     unsigned char* dst_ptr,
                                      int dst_pitch);
-RTCD_EXTERN void (*vp8_bilinear_predict16x16)(unsigned char* src,
-                                              int src_pitch,
-                                              int xofst,
-                                              int yofst,
-                                              unsigned char* dst,
+RTCD_EXTERN void (*vp8_bilinear_predict16x16)(unsigned char* src_ptr,
+                                              int src_pixels_per_line,
+                                              int xoffset,
+                                              int yoffset,
+                                              unsigned char* dst_ptr,
                                               int dst_pitch);
 
-void vp8_bilinear_predict4x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict4x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict4x4_sse2(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict4x4_sse2(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_sse2
 
-void vp8_bilinear_predict8x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x4_sse2(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x4_sse2(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_sse2
 
-void vp8_bilinear_predict8x8_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x8_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x8_sse2(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x8_sse2(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
-void vp8_bilinear_predict8x8_ssse3(unsigned char* src,
-                                   int src_pitch,
-                                   int xofst,
-                                   int yofst,
-                                   unsigned char* dst,
+void vp8_bilinear_predict8x8_ssse3(unsigned char* src_ptr,
+                                   int src_pixels_per_line,
+                                   int xoffset,
+                                   int yoffset,
+                                   unsigned char* dst_ptr,
                                    int dst_pitch);
-RTCD_EXTERN void (*vp8_bilinear_predict8x8)(unsigned char* src,
-                                            int src_pitch,
-                                            int xofst,
-                                            int yofst,
-                                            unsigned char* dst,
+RTCD_EXTERN void (*vp8_bilinear_predict8x8)(unsigned char* src_ptr,
+                                            int src_pixels_per_line,
+                                            int xoffset,
+                                            int yoffset,
+                                            unsigned char* dst_ptr,
                                             int dst_pitch);
 
 void vp8_blend_b_c(unsigned char* y,
                    unsigned char* u,
                    unsigned char* v,
-                   int y1,
-                   int u1,
-                   int v1,
+                   int y_1,
+                   int u_1,
+                   int v_1,
                    int alpha,
                    int stride);
 #define vp8_blend_b vp8_blend_b_c
@@ -118,9 +118,9 @@
 void vp8_blend_mb_inner_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_inner vp8_blend_mb_inner_c
@@ -128,9 +128,9 @@
 void vp8_blend_mb_outer_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_outer vp8_blend_mb_outer_c
@@ -140,65 +140,65 @@
 #define vp8_block_error vp8_block_error_sse2
 
 void vp8_copy32xn_c(const unsigned char* src_ptr,
-                    int source_stride,
+                    int src_stride,
                     unsigned char* dst_ptr,
                     int dst_stride,
-                    int n);
+                    int height);
 void vp8_copy32xn_sse2(const unsigned char* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        unsigned char* dst_ptr,
                        int dst_stride,
-                       int n);
+                       int height);
 void vp8_copy32xn_sse3(const unsigned char* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        unsigned char* dst_ptr,
                        int dst_stride,
-                       int n);
+                       int height);
 RTCD_EXTERN void (*vp8_copy32xn)(const unsigned char* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  unsigned char* dst_ptr,
                                  int dst_stride,
-                                 int n);
+                                 int height);
 
 void vp8_copy_mem16x16_c(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 void vp8_copy_mem16x16_sse2(unsigned char* src,
-                            int src_pitch,
+                            int src_stride,
                             unsigned char* dst,
-                            int dst_pitch);
+                            int dst_stride);
 #define vp8_copy_mem16x16 vp8_copy_mem16x16_sse2
 
 void vp8_copy_mem8x4_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 void vp8_copy_mem8x4_mmx(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 #define vp8_copy_mem8x4 vp8_copy_mem8x4_mmx
 
 void vp8_copy_mem8x8_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 void vp8_copy_mem8x8_mmx(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 #define vp8_copy_mem8x8 vp8_copy_mem8x8_mmx
 
-void vp8_dc_only_idct_add_c(short input,
-                            unsigned char* pred,
+void vp8_dc_only_idct_add_c(short input_dc,
+                            unsigned char* pred_ptr,
                             int pred_stride,
-                            unsigned char* dst,
+                            unsigned char* dst_ptr,
                             int dst_stride);
-void vp8_dc_only_idct_add_mmx(short input,
-                              unsigned char* pred,
+void vp8_dc_only_idct_add_mmx(short input_dc,
+                              unsigned char* pred_ptr,
                               int pred_stride,
-                              unsigned char* dst,
+                              unsigned char* dst_ptr,
                               int dst_stride);
 #define vp8_dc_only_idct_add vp8_dc_only_idct_add_mmx
 
@@ -240,11 +240,11 @@
 
 void vp8_dequant_idct_add_c(short* input,
                             short* dq,
-                            unsigned char* output,
+                            unsigned char* dest,
                             int stride);
 void vp8_dequant_idct_add_mmx(short* input,
                               short* dq,
-                              unsigned char* output,
+                              unsigned char* dest,
                               int stride);
 #define vp8_dequant_idct_add vp8_dequant_idct_add_mmx
 
@@ -274,8 +274,8 @@
                                        char* eobs);
 #define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_sse2
 
-void vp8_dequantize_b_c(struct blockd*, short* dqc);
-void vp8_dequantize_b_mmx(struct blockd*, short* dqc);
+void vp8_dequantize_b_c(struct blockd*, short* DQC);
+void vp8_dequantize_b_mmx(struct blockd*, short* DQC);
 #define vp8_dequantize_b vp8_dequantize_b_mmx
 
 int vp8_diamond_search_sad_c(struct macroblock* x,
@@ -375,91 +375,91 @@
                                        int* mvcost[2],
                                        union int_mv* center_mv);
 
-void vp8_loop_filter_bh_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bh_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bh_sse2(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bh_sse2(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
 #define vp8_loop_filter_bh vp8_loop_filter_bh_sse2
 
-void vp8_loop_filter_bv_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bv_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bv_sse2(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bv_sse2(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
 #define vp8_loop_filter_bv vp8_loop_filter_bv_sse2
 
-void vp8_loop_filter_mbh_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbh_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbh_sse2(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbh_sse2(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbh vp8_loop_filter_mbh_sse2
 
-void vp8_loop_filter_mbv_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbv_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbv_sse2(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbv_sse2(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbv vp8_loop_filter_mbv_sse2
 
-void vp8_loop_filter_bhs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bhs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bhs_sse2(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bhs_sse2(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_sse2
 
-void vp8_loop_filter_bvs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bvs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bvs_sse2(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bvs_sse2(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_sse2
 
-void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y,
-                                              int ystride,
+void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y_ptr,
+                                              int y_stride,
                                               const unsigned char* blimit);
-void vp8_loop_filter_simple_horizontal_edge_sse2(unsigned char* y,
-                                                 int ystride,
+void vp8_loop_filter_simple_horizontal_edge_sse2(unsigned char* y_ptr,
+                                                 int y_stride,
                                                  const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbh vp8_loop_filter_simple_horizontal_edge_sse2
 
-void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y,
-                                            int ystride,
+void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y_ptr,
+                                            int y_stride,
                                             const unsigned char* blimit);
-void vp8_loop_filter_simple_vertical_edge_sse2(unsigned char* y,
-                                               int ystride,
+void vp8_loop_filter_simple_vertical_edge_sse2(unsigned char* y_ptr,
+                                               int y_stride,
                                                const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbv vp8_loop_filter_simple_vertical_edge_sse2
 
@@ -475,8 +475,8 @@
                               struct block* b,
                               struct blockd* d,
                               union int_mv* ref_mv,
-                              int sad_per_bit,
-                              int distance,
+                              int error_per_bit,
+                              int search_range,
                               struct variance_vtable* fn_ptr,
                               int* mvcost[2],
                               union int_mv* center_mv);
@@ -484,8 +484,8 @@
                               struct block* b,
                               struct blockd* d,
                               union int_mv* ref_mv,
-                              int sad_per_bit,
-                              int distance,
+                              int error_per_bit,
+                              int search_range,
                               struct variance_vtable* fn_ptr,
                               int* mvcost[2],
                               union int_mv* center_mv);
@@ -505,126 +505,126 @@
 #define vp8_short_fdct8x4 vp8_short_fdct8x4_sse2
 
 void vp8_short_idct4x4llm_c(short* input,
-                            unsigned char* pred,
-                            int pitch,
-                            unsigned char* dst,
+                            unsigned char* pred_ptr,
+                            int pred_stride,
+                            unsigned char* dst_ptr,
                             int dst_stride);
 void vp8_short_idct4x4llm_mmx(short* input,
-                              unsigned char* pred,
-                              int pitch,
-                              unsigned char* dst,
+                              unsigned char* pred_ptr,
+                              int pred_stride,
+                              unsigned char* dst_ptr,
                               int dst_stride);
 #define vp8_short_idct4x4llm vp8_short_idct4x4llm_mmx
 
-void vp8_short_inv_walsh4x4_c(short* input, short* output);
-void vp8_short_inv_walsh4x4_sse2(short* input, short* output);
+void vp8_short_inv_walsh4x4_c(short* input, short* mb_dqcoeff);
+void vp8_short_inv_walsh4x4_sse2(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_sse2
 
-void vp8_short_inv_walsh4x4_1_c(short* input, short* output);
+void vp8_short_inv_walsh4x4_1_c(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c
 
 void vp8_short_walsh4x4_c(short* input, short* output, int pitch);
 void vp8_short_walsh4x4_sse2(short* input, short* output, int pitch);
 #define vp8_short_walsh4x4 vp8_short_walsh4x4_sse2
 
-void vp8_sixtap_predict16x16_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_sixtap_predict16x16_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_sixtap_predict16x16_sse2(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_sixtap_predict16x16_sse2(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
-void vp8_sixtap_predict16x16_ssse3(unsigned char* src,
-                                   int src_pitch,
-                                   int xofst,
-                                   int yofst,
-                                   unsigned char* dst,
+void vp8_sixtap_predict16x16_ssse3(unsigned char* src_ptr,
+                                   int src_pixels_per_line,
+                                   int xoffset,
+                                   int yoffset,
+                                   unsigned char* dst_ptr,
                                    int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict16x16)(unsigned char* src,
-                                            int src_pitch,
-                                            int xofst,
-                                            int yofst,
-                                            unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict16x16)(unsigned char* src_ptr,
+                                            int src_pixels_per_line,
+                                            int xoffset,
+                                            int yoffset,
+                                            unsigned char* dst_ptr,
                                             int dst_pitch);
 
-void vp8_sixtap_predict4x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict4x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict4x4_mmx(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_sixtap_predict4x4_mmx(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_sixtap_predict4x4_ssse3(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_sixtap_predict4x4_ssse3(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict4x4)(unsigned char* src,
-                                          int src_pitch,
-                                          int xofst,
-                                          int yofst,
-                                          unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict4x4)(unsigned char* src_ptr,
+                                          int src_pixels_per_line,
+                                          int xoffset,
+                                          int yoffset,
+                                          unsigned char* dst_ptr,
                                           int dst_pitch);
 
-void vp8_sixtap_predict8x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x4_sse2(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x4_sse2(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
-void vp8_sixtap_predict8x4_ssse3(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_sixtap_predict8x4_ssse3(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict8x4)(unsigned char* src,
-                                          int src_pitch,
-                                          int xofst,
-                                          int yofst,
-                                          unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict8x4)(unsigned char* src_ptr,
+                                          int src_pixels_per_line,
+                                          int xoffset,
+                                          int yoffset,
+                                          unsigned char* dst_ptr,
                                           int dst_pitch);
 
-void vp8_sixtap_predict8x8_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x8_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x8_sse2(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x8_sse2(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
-void vp8_sixtap_predict8x8_ssse3(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_sixtap_predict8x8_ssse3(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict8x8)(unsigned char* src,
-                                          int src_pitch,
-                                          int xofst,
-                                          int yofst,
-                                          unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict8x8)(unsigned char* src_ptr,
+                                          int src_pixels_per_line,
+                                          int xoffset,
+                                          int yoffset,
+                                          unsigned char* dst_ptr,
                                           int dst_pitch);
 
 void vp8_rtcd(void);
diff --git a/third_party/libvpx/source/config/win/ia32/vp9_rtcd.h b/third_party/libvpx/source/config/win/ia32/vp9_rtcd.h
index 1e1da43..603bd31 100644
--- a/third_party/libvpx/source/config/win/ia32/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/win/ia32/vp9_rtcd.h
@@ -242,18 +242,18 @@
 #define vp9_highbd_fwht4x4 vp9_highbd_fwht4x4_c
 
 void vp9_highbd_iht16x16_256_add_c(const tran_low_t* input,
-                                   uint16_t* output,
-                                   int pitch,
+                                   uint16_t* dest,
+                                   int stride,
                                    int tx_type,
                                    int bd);
 void vp9_highbd_iht16x16_256_add_sse4_1(const tran_low_t* input,
-                                        uint16_t* output,
-                                        int pitch,
+                                        uint16_t* dest,
+                                        int stride,
                                         int tx_type,
                                         int bd);
 RTCD_EXTERN void (*vp9_highbd_iht16x16_256_add)(const tran_low_t* input,
-                                                uint16_t* output,
-                                                int pitch,
+                                                uint16_t* dest,
+                                                int stride,
                                                 int tx_type,
                                                 int bd);
 
@@ -351,12 +351,12 @@
 #define vp9_highbd_temporal_filter_apply vp9_highbd_temporal_filter_apply_c
 
 void vp9_iht16x16_256_add_c(const tran_low_t* input,
-                            uint8_t* output,
-                            int pitch,
+                            uint8_t* dest,
+                            int stride,
                             int tx_type);
 void vp9_iht16x16_256_add_sse2(const tran_low_t* input,
-                               uint8_t* output,
-                               int pitch,
+                               uint8_t* dest,
+                               int stride,
                                int tx_type);
 #define vp9_iht16x16_256_add vp9_iht16x16_256_add_sse2
 
diff --git a/third_party/libvpx/source/config/win/ia32/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/win/ia32/vpx_dsp_rtcd.h
index 14d1107..b2b02a5 100644
--- a/third_party/libvpx/source/config/win/ia32/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/win/ia32/vpx_dsp_rtcd.h
@@ -427,420 +427,420 @@
 #define vpx_convolve_copy vpx_convolve_copy_sse2
 
 void vpx_d117_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c
 
 void vpx_d117_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c
 
 void vpx_d117_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c
 
 void vpx_d117_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c
 
 void vpx_d135_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_c
 
 void vpx_d135_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_c
 
 void vpx_d135_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_c
 
 void vpx_d135_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_c
 
 void vpx_d153_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d153_predictor_16x16_ssse3(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_d153_predictor_16x16)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d153_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d153_predictor_32x32_ssse3(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_d153_predictor_32x32)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d153_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d153_predictor_4x4_ssse3(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 RTCD_EXTERN void (*vpx_d153_predictor_4x4)(uint8_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint8_t* above,
                                            const uint8_t* left);
 
 void vpx_d153_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d153_predictor_8x8_ssse3(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 RTCD_EXTERN void (*vpx_d153_predictor_8x8)(uint8_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint8_t* above,
                                            const uint8_t* left);
 
 void vpx_d207_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d207_predictor_16x16_ssse3(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_d207_predictor_16x16)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d207_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d207_predictor_32x32_ssse3(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_d207_predictor_32x32)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d207_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d207_predictor_4x4_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_sse2
 
 void vpx_d207_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d207_predictor_8x8_ssse3(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 RTCD_EXTERN void (*vpx_d207_predictor_8x8)(uint8_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint8_t* above,
                                            const uint8_t* left);
 
 void vpx_d45_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_16x16_ssse3(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d45_predictor_16x16)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d45_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_32x32_ssse3(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d45_predictor_32x32)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d45_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_4x4_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_sse2
 
 void vpx_d45_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_8x8_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_sse2
 
 void vpx_d45e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c
 
 void vpx_d63_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d63_predictor_16x16_ssse3(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d63_predictor_16x16)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d63_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d63_predictor_32x32_ssse3(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d63_predictor_32x32)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d63_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d63_predictor_4x4_ssse3(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 RTCD_EXTERN void (*vpx_d63_predictor_4x4)(uint8_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint8_t* above,
                                           const uint8_t* left);
 
 void vpx_d63_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d63_predictor_8x8_ssse3(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 RTCD_EXTERN void (*vpx_d63_predictor_8x8)(uint8_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint8_t* above,
                                           const uint8_t* left);
 
 void vpx_d63e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c
 
 void vpx_dc_128_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_16x16_sse2(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_sse2
 
 void vpx_dc_128_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_32x32_sse2(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_sse2
 
 void vpx_dc_128_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_4x4_sse2(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_sse2
 
 void vpx_dc_128_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_8x8_sse2(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_sse2
 
 void vpx_dc_left_predictor_16x16_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_16x16_sse2(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 #define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_sse2
 
 void vpx_dc_left_predictor_32x32_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_32x32_sse2(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 #define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_sse2
 
 void vpx_dc_left_predictor_4x4_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_4x4_sse2(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 #define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_sse2
 
 void vpx_dc_left_predictor_8x8_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_8x8_sse2(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 #define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_sse2
 
 void vpx_dc_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_16x16_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_sse2
 
 void vpx_dc_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_32x32_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_sse2
 
 void vpx_dc_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_4x4_sse2(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_sse2
 
 void vpx_dc_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_8x8_sse2(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_sse2
 
 void vpx_dc_top_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_16x16_sse2(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_sse2
 
 void vpx_dc_top_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_32x32_sse2(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_sse2
 
 void vpx_dc_top_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_4x4_sse2(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_sse2
 
 void vpx_dc_top_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_8x8_sse2(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_sse2
@@ -884,44 +884,44 @@
 #define vpx_fdct8x8_1 vpx_fdct8x8_1_sse2
 
 void vpx_get16x16var_c(const uint8_t* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        const uint8_t* ref_ptr,
                        int ref_stride,
                        unsigned int* sse,
                        int* sum);
 void vpx_get16x16var_sse2(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
                           int ref_stride,
                           unsigned int* sse,
                           int* sum);
 void vpx_get16x16var_avx2(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
                           int ref_stride,
                           unsigned int* sse,
                           int* sum);
 RTCD_EXTERN void (*vpx_get16x16var)(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse,
                                     int* sum);
 
 unsigned int vpx_get4x4sse_cs_c(const unsigned char* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const unsigned char* ref_ptr,
                                 int ref_stride);
 #define vpx_get4x4sse_cs vpx_get4x4sse_cs_c
 
 void vpx_get8x8var_c(const uint8_t* src_ptr,
-                     int source_stride,
+                     int src_stride,
                      const uint8_t* ref_ptr,
                      int ref_stride,
                      unsigned int* sse,
                      int* sum);
 void vpx_get8x8var_sse2(const uint8_t* src_ptr,
-                        int source_stride,
+                        int src_stride,
                         const uint8_t* ref_ptr,
                         int ref_stride,
                         unsigned int* sse,
@@ -933,41 +933,41 @@
 #define vpx_get_mb_ss vpx_get_mb_ss_sse2
 
 void vpx_h_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_16x16_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_h_predictor_16x16 vpx_h_predictor_16x16_sse2
 
 void vpx_h_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_32x32_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_h_predictor_32x32 vpx_h_predictor_32x32_sse2
 
 void vpx_h_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_4x4_sse2(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_h_predictor_4x4 vpx_h_predictor_4x4_sse2
 
 void vpx_h_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_8x8_sse2(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_h_predictor_8x8 vpx_h_predictor_8x8_sse2
@@ -1007,13 +1007,13 @@
 #define vpx_hadamard_8x8 vpx_hadamard_8x8_sse2
 
 void vpx_he_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c
 
 void vpx_highbd_10_get16x16var_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse,
@@ -1021,7 +1021,7 @@
 #define vpx_highbd_10_get16x16var vpx_highbd_10_get16x16var_c
 
 void vpx_highbd_10_get8x8var_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse,
@@ -1029,57 +1029,57 @@
 #define vpx_highbd_10_get8x8var vpx_highbd_10_get8x8var_c
 
 unsigned int vpx_highbd_10_mse16x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 unsigned int vpx_highbd_10_mse16x16_sse2(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
-                                         int recon_stride,
+                                         int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_mse16x16 vpx_highbd_10_mse16x16_sse2
 
 unsigned int vpx_highbd_10_mse16x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_10_mse16x8 vpx_highbd_10_mse16x8_c
 
 unsigned int vpx_highbd_10_mse8x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_10_mse8x16 vpx_highbd_10_mse8x16_c
 
 unsigned int vpx_highbd_10_mse8x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_highbd_10_mse8x8_sse2(const uint8_t* src_ptr,
-                                       int source_stride,
+                                       int src_stride,
                                        const uint8_t* ref_ptr,
-                                       int recon_stride,
+                                       int ref_stride,
                                        unsigned int* sse);
 #define vpx_highbd_10_mse8x8 vpx_highbd_10_mse8x8_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1089,18 +1089,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1109,18 +1109,18 @@
   vpx_highbd_10_sub_pixel_avg_variance16x32_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1130,18 +1130,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1151,18 +1151,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1172,18 +1172,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1192,9 +1192,9 @@
   vpx_highbd_10_sub_pixel_avg_variance32x64_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1203,9 +1203,9 @@
   vpx_highbd_10_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1215,18 +1215,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1236,18 +1236,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1256,18 +1256,18 @@
   vpx_highbd_10_sub_pixel_avg_variance64x64_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1276,18 +1276,18 @@
   vpx_highbd_10_sub_pixel_avg_variance8x16_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1296,18 +1296,18 @@
   vpx_highbd_10_sub_pixel_avg_variance8x4_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1316,16 +1316,16 @@
   vpx_highbd_10_sub_pixel_avg_variance8x8_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance16x16_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1333,16 +1333,16 @@
   vpx_highbd_10_sub_pixel_variance16x16_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance16x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1350,16 +1350,16 @@
   vpx_highbd_10_sub_pixel_variance16x32_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance16x8_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -1367,16 +1367,16 @@
   vpx_highbd_10_sub_pixel_variance16x8_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance32x16_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1384,16 +1384,16 @@
   vpx_highbd_10_sub_pixel_variance32x16_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance32x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1401,16 +1401,16 @@
   vpx_highbd_10_sub_pixel_variance32x32_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance32x64_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1418,9 +1418,9 @@
   vpx_highbd_10_sub_pixel_variance32x64_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1428,9 +1428,9 @@
   vpx_highbd_10_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1438,16 +1438,16 @@
   vpx_highbd_10_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance64x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1455,16 +1455,16 @@
   vpx_highbd_10_sub_pixel_variance64x32_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance64x64_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1472,16 +1472,16 @@
   vpx_highbd_10_sub_pixel_variance64x64_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance8x16_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -1489,16 +1489,16 @@
   vpx_highbd_10_sub_pixel_variance8x16_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance8x4_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -1506,16 +1506,16 @@
   vpx_highbd_10_sub_pixel_variance8x4_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance8x8_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -1523,148 +1523,148 @@
   vpx_highbd_10_sub_pixel_variance8x8_sse2
 
 unsigned int vpx_highbd_10_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance16x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance16x16 vpx_highbd_10_variance16x16_sse2
 
 unsigned int vpx_highbd_10_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance16x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance16x32 vpx_highbd_10_variance16x32_sse2
 
 unsigned int vpx_highbd_10_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_10_variance16x8_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_10_variance16x8 vpx_highbd_10_variance16x8_sse2
 
 unsigned int vpx_highbd_10_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance32x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance32x16 vpx_highbd_10_variance32x16_sse2
 
 unsigned int vpx_highbd_10_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance32x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance32x32 vpx_highbd_10_variance32x32_sse2
 
 unsigned int vpx_highbd_10_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance32x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance32x64 vpx_highbd_10_variance32x64_sse2
 
 unsigned int vpx_highbd_10_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance4x4 vpx_highbd_10_variance4x4_c
 
 unsigned int vpx_highbd_10_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance4x8 vpx_highbd_10_variance4x8_c
 
 unsigned int vpx_highbd_10_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance64x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance64x32 vpx_highbd_10_variance64x32_sse2
 
 unsigned int vpx_highbd_10_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance64x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance64x64 vpx_highbd_10_variance64x64_sse2
 
 unsigned int vpx_highbd_10_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_10_variance8x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_10_variance8x16 vpx_highbd_10_variance8x16_sse2
 
 unsigned int vpx_highbd_10_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance8x4 vpx_highbd_10_variance8x4_c
 
 unsigned int vpx_highbd_10_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 unsigned int vpx_highbd_10_variance8x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 #define vpx_highbd_10_variance8x8 vpx_highbd_10_variance8x8_sse2
 
 void vpx_highbd_12_get16x16var_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse,
@@ -1672,7 +1672,7 @@
 #define vpx_highbd_12_get16x16var vpx_highbd_12_get16x16var_c
 
 void vpx_highbd_12_get8x8var_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse,
@@ -1680,57 +1680,57 @@
 #define vpx_highbd_12_get8x8var vpx_highbd_12_get8x8var_c
 
 unsigned int vpx_highbd_12_mse16x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 unsigned int vpx_highbd_12_mse16x16_sse2(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
-                                         int recon_stride,
+                                         int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_mse16x16 vpx_highbd_12_mse16x16_sse2
 
 unsigned int vpx_highbd_12_mse16x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_12_mse16x8 vpx_highbd_12_mse16x8_c
 
 unsigned int vpx_highbd_12_mse8x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_12_mse8x16 vpx_highbd_12_mse8x16_c
 
 unsigned int vpx_highbd_12_mse8x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_highbd_12_mse8x8_sse2(const uint8_t* src_ptr,
-                                       int source_stride,
+                                       int src_stride,
                                        const uint8_t* ref_ptr,
-                                       int recon_stride,
+                                       int ref_stride,
                                        unsigned int* sse);
 #define vpx_highbd_12_mse8x8 vpx_highbd_12_mse8x8_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1740,18 +1740,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1760,18 +1760,18 @@
   vpx_highbd_12_sub_pixel_avg_variance16x32_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1781,18 +1781,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1802,18 +1802,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1823,18 +1823,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1843,9 +1843,9 @@
   vpx_highbd_12_sub_pixel_avg_variance32x64_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1854,9 +1854,9 @@
   vpx_highbd_12_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1866,18 +1866,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1887,18 +1887,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1907,18 +1907,18 @@
   vpx_highbd_12_sub_pixel_avg_variance64x64_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1927,18 +1927,18 @@
   vpx_highbd_12_sub_pixel_avg_variance8x16_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1947,18 +1947,18 @@
   vpx_highbd_12_sub_pixel_avg_variance8x4_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1967,16 +1967,16 @@
   vpx_highbd_12_sub_pixel_avg_variance8x8_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance16x16_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1984,16 +1984,16 @@
   vpx_highbd_12_sub_pixel_variance16x16_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance16x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2001,16 +2001,16 @@
   vpx_highbd_12_sub_pixel_variance16x32_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance16x8_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2018,16 +2018,16 @@
   vpx_highbd_12_sub_pixel_variance16x8_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance32x16_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2035,16 +2035,16 @@
   vpx_highbd_12_sub_pixel_variance32x16_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance32x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2052,16 +2052,16 @@
   vpx_highbd_12_sub_pixel_variance32x32_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance32x64_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2069,9 +2069,9 @@
   vpx_highbd_12_sub_pixel_variance32x64_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -2079,9 +2079,9 @@
   vpx_highbd_12_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -2089,16 +2089,16 @@
   vpx_highbd_12_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance64x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2106,16 +2106,16 @@
   vpx_highbd_12_sub_pixel_variance64x32_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance64x64_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2123,16 +2123,16 @@
   vpx_highbd_12_sub_pixel_variance64x64_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance8x16_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2140,16 +2140,16 @@
   vpx_highbd_12_sub_pixel_variance8x16_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance8x4_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -2157,16 +2157,16 @@
   vpx_highbd_12_sub_pixel_variance8x4_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance8x8_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -2174,148 +2174,148 @@
   vpx_highbd_12_sub_pixel_variance8x8_sse2
 
 unsigned int vpx_highbd_12_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance16x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance16x16 vpx_highbd_12_variance16x16_sse2
 
 unsigned int vpx_highbd_12_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance16x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance16x32 vpx_highbd_12_variance16x32_sse2
 
 unsigned int vpx_highbd_12_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_12_variance16x8_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_12_variance16x8 vpx_highbd_12_variance16x8_sse2
 
 unsigned int vpx_highbd_12_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance32x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance32x16 vpx_highbd_12_variance32x16_sse2
 
 unsigned int vpx_highbd_12_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance32x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance32x32 vpx_highbd_12_variance32x32_sse2
 
 unsigned int vpx_highbd_12_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance32x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance32x64 vpx_highbd_12_variance32x64_sse2
 
 unsigned int vpx_highbd_12_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance4x4 vpx_highbd_12_variance4x4_c
 
 unsigned int vpx_highbd_12_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance4x8 vpx_highbd_12_variance4x8_c
 
 unsigned int vpx_highbd_12_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance64x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance64x32 vpx_highbd_12_variance64x32_sse2
 
 unsigned int vpx_highbd_12_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance64x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance64x64 vpx_highbd_12_variance64x64_sse2
 
 unsigned int vpx_highbd_12_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_12_variance8x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_12_variance8x16 vpx_highbd_12_variance8x16_sse2
 
 unsigned int vpx_highbd_12_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance8x4 vpx_highbd_12_variance8x4_c
 
 unsigned int vpx_highbd_12_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 unsigned int vpx_highbd_12_variance8x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 #define vpx_highbd_12_variance8x8 vpx_highbd_12_variance8x8_sse2
 
 void vpx_highbd_8_get16x16var_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse,
@@ -2323,7 +2323,7 @@
 #define vpx_highbd_8_get16x16var vpx_highbd_8_get16x16var_c
 
 void vpx_highbd_8_get8x8var_c(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
                               int ref_stride,
                               unsigned int* sse,
@@ -2331,56 +2331,56 @@
 #define vpx_highbd_8_get8x8var vpx_highbd_8_get8x8var_c
 
 unsigned int vpx_highbd_8_mse16x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 unsigned int vpx_highbd_8_mse16x16_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
-                                        int recon_stride,
+                                        int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_mse16x16 vpx_highbd_8_mse16x16_sse2
 
 unsigned int vpx_highbd_8_mse16x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_8_mse16x8 vpx_highbd_8_mse16x8_c
 
 unsigned int vpx_highbd_8_mse8x16_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_8_mse8x16 vpx_highbd_8_mse8x16_c
 
 unsigned int vpx_highbd_8_mse8x8_c(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
-                                   int recon_stride,
+                                   int ref_stride,
                                    unsigned int* sse);
 unsigned int vpx_highbd_8_mse8x8_sse2(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 #define vpx_highbd_8_mse8x8 vpx_highbd_8_mse8x8_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2389,18 +2389,18 @@
   vpx_highbd_8_sub_pixel_avg_variance16x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2409,18 +2409,18 @@
   vpx_highbd_8_sub_pixel_avg_variance16x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2429,18 +2429,18 @@
   vpx_highbd_8_sub_pixel_avg_variance16x8_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2449,18 +2449,18 @@
   vpx_highbd_8_sub_pixel_avg_variance32x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2469,18 +2469,18 @@
   vpx_highbd_8_sub_pixel_avg_variance32x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2489,9 +2489,9 @@
   vpx_highbd_8_sub_pixel_avg_variance32x64_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -2500,9 +2500,9 @@
   vpx_highbd_8_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -2511,18 +2511,18 @@
   vpx_highbd_8_sub_pixel_avg_variance4x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2531,18 +2531,18 @@
   vpx_highbd_8_sub_pixel_avg_variance64x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2551,18 +2551,18 @@
   vpx_highbd_8_sub_pixel_avg_variance64x64_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2571,18 +2571,18 @@
   vpx_highbd_8_sub_pixel_avg_variance8x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
                                                   const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2591,18 +2591,18 @@
   vpx_highbd_8_sub_pixel_avg_variance8x4_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
                                                   const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2611,16 +2611,16 @@
   vpx_highbd_8_sub_pixel_avg_variance8x8_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance16x16_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2628,16 +2628,16 @@
   vpx_highbd_8_sub_pixel_variance16x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance16x32_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2645,16 +2645,16 @@
   vpx_highbd_8_sub_pixel_variance16x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance16x8_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -2662,16 +2662,16 @@
   vpx_highbd_8_sub_pixel_variance16x8_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance32x16_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2679,16 +2679,16 @@
   vpx_highbd_8_sub_pixel_variance32x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance32x32_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2696,16 +2696,16 @@
   vpx_highbd_8_sub_pixel_variance32x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance32x64_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2713,34 +2713,34 @@
   vpx_highbd_8_sub_pixel_variance32x64_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance4x4 vpx_highbd_8_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance4x8 vpx_highbd_8_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance64x32_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2748,16 +2748,16 @@
   vpx_highbd_8_sub_pixel_variance64x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance64x64_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2765,16 +2765,16 @@
   vpx_highbd_8_sub_pixel_variance64x64_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance8x16_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -2782,16 +2782,16 @@
   vpx_highbd_8_sub_pixel_variance8x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance8x4_sse2(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -2799,16 +2799,16 @@
   vpx_highbd_8_sub_pixel_variance8x4_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance8x8_sse2(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -2816,152 +2816,152 @@
   vpx_highbd_8_sub_pixel_variance8x8_sse2
 
 unsigned int vpx_highbd_8_variance16x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance16x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance16x16 vpx_highbd_8_variance16x16_sse2
 
 unsigned int vpx_highbd_8_variance16x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance16x32_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance16x32 vpx_highbd_8_variance16x32_sse2
 
 unsigned int vpx_highbd_8_variance16x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 unsigned int vpx_highbd_8_variance16x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 #define vpx_highbd_8_variance16x8 vpx_highbd_8_variance16x8_sse2
 
 unsigned int vpx_highbd_8_variance32x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance32x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance32x16 vpx_highbd_8_variance32x16_sse2
 
 unsigned int vpx_highbd_8_variance32x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance32x32_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance32x32 vpx_highbd_8_variance32x32_sse2
 
 unsigned int vpx_highbd_8_variance32x64_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance32x64_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance32x64 vpx_highbd_8_variance32x64_sse2
 
 unsigned int vpx_highbd_8_variance4x4_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance4x4 vpx_highbd_8_variance4x4_c
 
 unsigned int vpx_highbd_8_variance4x8_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance4x8 vpx_highbd_8_variance4x8_c
 
 unsigned int vpx_highbd_8_variance64x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance64x32_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance64x32 vpx_highbd_8_variance64x32_sse2
 
 unsigned int vpx_highbd_8_variance64x64_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance64x64_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance64x64 vpx_highbd_8_variance64x64_sse2
 
 unsigned int vpx_highbd_8_variance8x16_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 unsigned int vpx_highbd_8_variance8x16_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 #define vpx_highbd_8_variance8x16 vpx_highbd_8_variance8x16_sse2
 
 unsigned int vpx_highbd_8_variance8x4_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance8x4 vpx_highbd_8_variance8x4_c
 
 unsigned int vpx_highbd_8_variance8x8_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 unsigned int vpx_highbd_8_variance8x8_sse2(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_8_variance8x8 vpx_highbd_8_variance8x8_sse2
 
-unsigned int vpx_highbd_avg_4x4_c(const uint8_t*, int p);
-unsigned int vpx_highbd_avg_4x4_sse2(const uint8_t*, int p);
+unsigned int vpx_highbd_avg_4x4_c(const uint8_t* s8, int p);
+unsigned int vpx_highbd_avg_4x4_sse2(const uint8_t* s8, int p);
 #define vpx_highbd_avg_4x4 vpx_highbd_avg_4x4_sse2
 
-unsigned int vpx_highbd_avg_8x8_c(const uint8_t*, int p);
-unsigned int vpx_highbd_avg_8x8_sse2(const uint8_t*, int p);
+unsigned int vpx_highbd_avg_8x8_c(const uint8_t* s8, int p);
+unsigned int vpx_highbd_avg_8x8_sse2(const uint8_t* s8, int p);
 #define vpx_highbd_avg_8x8 vpx_highbd_avg_8x8_sse2
 
 void vpx_highbd_comp_avg_pred_c(uint16_t* comp_pred,
@@ -2983,7 +2983,7 @@
                             int y_step_q4,
                             int w,
                             int h,
-                            int bps);
+                            int bd);
 void vpx_highbd_convolve8_avx2(const uint16_t* src,
                                ptrdiff_t src_stride,
                                uint16_t* dst,
@@ -2995,7 +2995,7 @@
                                int y_step_q4,
                                int w,
                                int h,
-                               int bps);
+                               int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8)(const uint16_t* src,
                                          ptrdiff_t src_stride,
                                          uint16_t* dst,
@@ -3007,7 +3007,7 @@
                                          int y_step_q4,
                                          int w,
                                          int h,
-                                         int bps);
+                                         int bd);
 
 void vpx_highbd_convolve8_avg_c(const uint16_t* src,
                                 ptrdiff_t src_stride,
@@ -3020,7 +3020,7 @@
                                 int y_step_q4,
                                 int w,
                                 int h,
-                                int bps);
+                                int bd);
 void vpx_highbd_convolve8_avg_avx2(const uint16_t* src,
                                    ptrdiff_t src_stride,
                                    uint16_t* dst,
@@ -3032,7 +3032,7 @@
                                    int y_step_q4,
                                    int w,
                                    int h,
-                                   int bps);
+                                   int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_avg)(const uint16_t* src,
                                              ptrdiff_t src_stride,
                                              uint16_t* dst,
@@ -3044,7 +3044,7 @@
                                              int y_step_q4,
                                              int w,
                                              int h,
-                                             int bps);
+                                             int bd);
 
 void vpx_highbd_convolve8_avg_horiz_c(const uint16_t* src,
                                       ptrdiff_t src_stride,
@@ -3057,7 +3057,7 @@
                                       int y_step_q4,
                                       int w,
                                       int h,
-                                      int bps);
+                                      int bd);
 void vpx_highbd_convolve8_avg_horiz_avx2(const uint16_t* src,
                                          ptrdiff_t src_stride,
                                          uint16_t* dst,
@@ -3069,7 +3069,7 @@
                                          int y_step_q4,
                                          int w,
                                          int h,
-                                         int bps);
+                                         int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_avg_horiz)(const uint16_t* src,
                                                    ptrdiff_t src_stride,
                                                    uint16_t* dst,
@@ -3081,7 +3081,7 @@
                                                    int y_step_q4,
                                                    int w,
                                                    int h,
-                                                   int bps);
+                                                   int bd);
 
 void vpx_highbd_convolve8_avg_vert_c(const uint16_t* src,
                                      ptrdiff_t src_stride,
@@ -3094,7 +3094,7 @@
                                      int y_step_q4,
                                      int w,
                                      int h,
-                                     int bps);
+                                     int bd);
 void vpx_highbd_convolve8_avg_vert_avx2(const uint16_t* src,
                                         ptrdiff_t src_stride,
                                         uint16_t* dst,
@@ -3106,7 +3106,7 @@
                                         int y_step_q4,
                                         int w,
                                         int h,
-                                        int bps);
+                                        int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_avg_vert)(const uint16_t* src,
                                                   ptrdiff_t src_stride,
                                                   uint16_t* dst,
@@ -3118,7 +3118,7 @@
                                                   int y_step_q4,
                                                   int w,
                                                   int h,
-                                                  int bps);
+                                                  int bd);
 
 void vpx_highbd_convolve8_horiz_c(const uint16_t* src,
                                   ptrdiff_t src_stride,
@@ -3131,7 +3131,7 @@
                                   int y_step_q4,
                                   int w,
                                   int h,
-                                  int bps);
+                                  int bd);
 void vpx_highbd_convolve8_horiz_avx2(const uint16_t* src,
                                      ptrdiff_t src_stride,
                                      uint16_t* dst,
@@ -3143,7 +3143,7 @@
                                      int y_step_q4,
                                      int w,
                                      int h,
-                                     int bps);
+                                     int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_horiz)(const uint16_t* src,
                                                ptrdiff_t src_stride,
                                                uint16_t* dst,
@@ -3155,7 +3155,7 @@
                                                int y_step_q4,
                                                int w,
                                                int h,
-                                               int bps);
+                                               int bd);
 
 void vpx_highbd_convolve8_vert_c(const uint16_t* src,
                                  ptrdiff_t src_stride,
@@ -3168,7 +3168,7 @@
                                  int y_step_q4,
                                  int w,
                                  int h,
-                                 int bps);
+                                 int bd);
 void vpx_highbd_convolve8_vert_avx2(const uint16_t* src,
                                     ptrdiff_t src_stride,
                                     uint16_t* dst,
@@ -3180,7 +3180,7 @@
                                     int y_step_q4,
                                     int w,
                                     int h,
-                                    int bps);
+                                    int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_vert)(const uint16_t* src,
                                               ptrdiff_t src_stride,
                                               uint16_t* dst,
@@ -3192,7 +3192,7 @@
                                               int y_step_q4,
                                               int w,
                                               int h,
-                                              int bps);
+                                              int bd);
 
 void vpx_highbd_convolve_avg_c(const uint16_t* src,
                                ptrdiff_t src_stride,
@@ -3205,7 +3205,7 @@
                                int y_step_q4,
                                int w,
                                int h,
-                               int bps);
+                               int bd);
 void vpx_highbd_convolve_avg_sse2(const uint16_t* src,
                                   ptrdiff_t src_stride,
                                   uint16_t* dst,
@@ -3217,7 +3217,7 @@
                                   int y_step_q4,
                                   int w,
                                   int h,
-                                  int bps);
+                                  int bd);
 void vpx_highbd_convolve_avg_avx2(const uint16_t* src,
                                   ptrdiff_t src_stride,
                                   uint16_t* dst,
@@ -3229,7 +3229,7 @@
                                   int y_step_q4,
                                   int w,
                                   int h,
-                                  int bps);
+                                  int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve_avg)(const uint16_t* src,
                                             ptrdiff_t src_stride,
                                             uint16_t* dst,
@@ -3241,7 +3241,7 @@
                                             int y_step_q4,
                                             int w,
                                             int h,
-                                            int bps);
+                                            int bd);
 
 void vpx_highbd_convolve_copy_c(const uint16_t* src,
                                 ptrdiff_t src_stride,
@@ -3254,7 +3254,7 @@
                                 int y_step_q4,
                                 int w,
                                 int h,
-                                int bps);
+                                int bd);
 void vpx_highbd_convolve_copy_sse2(const uint16_t* src,
                                    ptrdiff_t src_stride,
                                    uint16_t* dst,
@@ -3266,7 +3266,7 @@
                                    int y_step_q4,
                                    int w,
                                    int h,
-                                   int bps);
+                                   int bd);
 void vpx_highbd_convolve_copy_avx2(const uint16_t* src,
                                    ptrdiff_t src_stride,
                                    uint16_t* dst,
@@ -3278,7 +3278,7 @@
                                    int y_step_q4,
                                    int w,
                                    int h,
-                                   int bps);
+                                   int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve_copy)(const uint16_t* src,
                                              ptrdiff_t src_stride,
                                              uint16_t* dst,
@@ -3290,427 +3290,427 @@
                                              int y_step_q4,
                                              int w,
                                              int h,
-                                             int bps);
+                                             int bd);
 
 void vpx_highbd_d117_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d117_predictor_16x16_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d117_predictor_16x16)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d117_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d117_predictor_32x32_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d117_predictor_32x32)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d117_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d117_predictor_4x4_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d117_predictor_4x4 vpx_highbd_d117_predictor_4x4_sse2
 
 void vpx_highbd_d117_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d117_predictor_8x8_ssse3(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 RTCD_EXTERN void (*vpx_highbd_d117_predictor_8x8)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
+                                                  ptrdiff_t stride,
                                                   const uint16_t* above,
                                                   const uint16_t* left,
                                                   int bd);
 
 void vpx_highbd_d135_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d135_predictor_16x16_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d135_predictor_16x16)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d135_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d135_predictor_32x32_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d135_predictor_32x32)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d135_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d135_predictor_4x4_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d135_predictor_4x4 vpx_highbd_d135_predictor_4x4_sse2
 
 void vpx_highbd_d135_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d135_predictor_8x8_ssse3(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 RTCD_EXTERN void (*vpx_highbd_d135_predictor_8x8)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
+                                                  ptrdiff_t stride,
                                                   const uint16_t* above,
                                                   const uint16_t* left,
                                                   int bd);
 
 void vpx_highbd_d153_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d153_predictor_16x16_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d153_predictor_16x16)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d153_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d153_predictor_32x32_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d153_predictor_32x32)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d153_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d153_predictor_4x4_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d153_predictor_4x4 vpx_highbd_d153_predictor_4x4_sse2
 
 void vpx_highbd_d153_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d153_predictor_8x8_ssse3(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 RTCD_EXTERN void (*vpx_highbd_d153_predictor_8x8)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
+                                                  ptrdiff_t stride,
                                                   const uint16_t* above,
                                                   const uint16_t* left,
                                                   int bd);
 
 void vpx_highbd_d207_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d207_predictor_16x16_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d207_predictor_16x16)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d207_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d207_predictor_32x32_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d207_predictor_32x32)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d207_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d207_predictor_4x4_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d207_predictor_4x4 vpx_highbd_d207_predictor_4x4_sse2
 
 void vpx_highbd_d207_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d207_predictor_8x8_ssse3(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 RTCD_EXTERN void (*vpx_highbd_d207_predictor_8x8)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
+                                                  ptrdiff_t stride,
                                                   const uint16_t* above,
                                                   const uint16_t* left,
                                                   int bd);
 
 void vpx_highbd_d45_predictor_16x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d45_predictor_16x16_ssse3(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 RTCD_EXTERN void (*vpx_highbd_d45_predictor_16x16)(uint16_t* dst,
-                                                   ptrdiff_t y_stride,
+                                                   ptrdiff_t stride,
                                                    const uint16_t* above,
                                                    const uint16_t* left,
                                                    int bd);
 
 void vpx_highbd_d45_predictor_32x32_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d45_predictor_32x32_ssse3(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 RTCD_EXTERN void (*vpx_highbd_d45_predictor_32x32)(uint16_t* dst,
-                                                   ptrdiff_t y_stride,
+                                                   ptrdiff_t stride,
                                                    const uint16_t* above,
                                                    const uint16_t* left,
                                                    int bd);
 
 void vpx_highbd_d45_predictor_4x4_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d45_predictor_4x4_ssse3(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 RTCD_EXTERN void (*vpx_highbd_d45_predictor_4x4)(uint16_t* dst,
-                                                 ptrdiff_t y_stride,
+                                                 ptrdiff_t stride,
                                                  const uint16_t* above,
                                                  const uint16_t* left,
                                                  int bd);
 
 void vpx_highbd_d45_predictor_8x8_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d45_predictor_8x8_ssse3(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 RTCD_EXTERN void (*vpx_highbd_d45_predictor_8x8)(uint16_t* dst,
-                                                 ptrdiff_t y_stride,
+                                                 ptrdiff_t stride,
                                                  const uint16_t* above,
                                                  const uint16_t* left,
                                                  int bd);
 
 void vpx_highbd_d63_predictor_16x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d63_predictor_16x16_ssse3(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 RTCD_EXTERN void (*vpx_highbd_d63_predictor_16x16)(uint16_t* dst,
-                                                   ptrdiff_t y_stride,
+                                                   ptrdiff_t stride,
                                                    const uint16_t* above,
                                                    const uint16_t* left,
                                                    int bd);
 
 void vpx_highbd_d63_predictor_32x32_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d63_predictor_32x32_ssse3(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 RTCD_EXTERN void (*vpx_highbd_d63_predictor_32x32)(uint16_t* dst,
-                                                   ptrdiff_t y_stride,
+                                                   ptrdiff_t stride,
                                                    const uint16_t* above,
                                                    const uint16_t* left,
                                                    int bd);
 
 void vpx_highbd_d63_predictor_4x4_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d63_predictor_4x4_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d63_predictor_4x4 vpx_highbd_d63_predictor_4x4_sse2
 
 void vpx_highbd_d63_predictor_8x8_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d63_predictor_8x8_ssse3(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 RTCD_EXTERN void (*vpx_highbd_d63_predictor_8x8)(uint16_t* dst,
-                                                 ptrdiff_t y_stride,
+                                                 ptrdiff_t stride,
                                                  const uint16_t* above,
                                                  const uint16_t* left,
                                                  int bd);
 
 void vpx_highbd_dc_128_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_128_predictor_16x16_sse2(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_128_predictor_16x16 vpx_highbd_dc_128_predictor_16x16_sse2
 
 void vpx_highbd_dc_128_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_128_predictor_32x32_sse2(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_128_predictor_32x32 vpx_highbd_dc_128_predictor_32x32_sse2
 
 void vpx_highbd_dc_128_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_128_predictor_4x4_sse2(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_128_predictor_4x4 vpx_highbd_dc_128_predictor_4x4_sse2
 
 void vpx_highbd_dc_128_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_128_predictor_8x8_sse2(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_128_predictor_8x8 vpx_highbd_dc_128_predictor_8x8_sse2
 
 void vpx_highbd_dc_left_predictor_16x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 void vpx_highbd_dc_left_predictor_16x16_sse2(uint16_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint16_t* above,
                                              const uint16_t* left,
                                              int bd);
@@ -3718,12 +3718,12 @@
   vpx_highbd_dc_left_predictor_16x16_sse2
 
 void vpx_highbd_dc_left_predictor_32x32_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 void vpx_highbd_dc_left_predictor_32x32_sse2(uint16_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint16_t* above,
                                              const uint16_t* left,
                                              int bd);
@@ -3731,120 +3731,120 @@
   vpx_highbd_dc_left_predictor_32x32_sse2
 
 void vpx_highbd_dc_left_predictor_4x4_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 void vpx_highbd_dc_left_predictor_4x4_sse2(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 #define vpx_highbd_dc_left_predictor_4x4 vpx_highbd_dc_left_predictor_4x4_sse2
 
 void vpx_highbd_dc_left_predictor_8x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 void vpx_highbd_dc_left_predictor_8x8_sse2(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 #define vpx_highbd_dc_left_predictor_8x8 vpx_highbd_dc_left_predictor_8x8_sse2
 
 void vpx_highbd_dc_predictor_16x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_dc_predictor_16x16_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_dc_predictor_16x16 vpx_highbd_dc_predictor_16x16_sse2
 
 void vpx_highbd_dc_predictor_32x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_dc_predictor_32x32_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_dc_predictor_32x32 vpx_highbd_dc_predictor_32x32_sse2
 
 void vpx_highbd_dc_predictor_4x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_dc_predictor_4x4_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_dc_predictor_4x4 vpx_highbd_dc_predictor_4x4_sse2
 
 void vpx_highbd_dc_predictor_8x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_dc_predictor_8x8_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_dc_predictor_8x8 vpx_highbd_dc_predictor_8x8_sse2
 
 void vpx_highbd_dc_top_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_top_predictor_16x16_sse2(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_top_predictor_16x16 vpx_highbd_dc_top_predictor_16x16_sse2
 
 void vpx_highbd_dc_top_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_top_predictor_32x32_sse2(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_top_predictor_32x32 vpx_highbd_dc_top_predictor_32x32_sse2
 
 void vpx_highbd_dc_top_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_top_predictor_4x4_sse2(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_top_predictor_4x4 vpx_highbd_dc_top_predictor_4x4_sse2
 
 void vpx_highbd_dc_top_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_top_predictor_8x8_sse2(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
@@ -3902,53 +3902,68 @@
 #define vpx_highbd_fdct8x8_1 vpx_highbd_fdct8x8_1_c
 
 void vpx_highbd_h_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_h_predictor_16x16_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_h_predictor_16x16 vpx_highbd_h_predictor_16x16_sse2
 
 void vpx_highbd_h_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_h_predictor_32x32_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_h_predictor_32x32 vpx_highbd_h_predictor_32x32_sse2
 
 void vpx_highbd_h_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_h_predictor_4x4_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_h_predictor_4x4 vpx_highbd_h_predictor_4x4_sse2
 
 void vpx_highbd_h_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_h_predictor_8x8_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_h_predictor_8x8 vpx_highbd_h_predictor_8x8_sse2
 
+void vpx_highbd_hadamard_16x16_c(const int16_t* src_diff,
+                                 ptrdiff_t src_stride,
+                                 tran_low_t* coeff);
+#define vpx_highbd_hadamard_16x16 vpx_highbd_hadamard_16x16_c
+
+void vpx_highbd_hadamard_32x32_c(const int16_t* src_diff,
+                                 ptrdiff_t src_stride,
+                                 tran_low_t* coeff);
+#define vpx_highbd_hadamard_32x32 vpx_highbd_hadamard_32x32_c
+
+void vpx_highbd_hadamard_8x8_c(const int16_t* src_diff,
+                               ptrdiff_t src_stride,
+                               tran_low_t* coeff);
+#define vpx_highbd_hadamard_8x8 vpx_highbd_hadamard_8x8_c
+
 void vpx_highbd_idct16x16_10_add_c(const tran_low_t* input,
                                    uint16_t* dest,
                                    int stride,
@@ -4346,9 +4361,9 @@
                                          int bd);
 #define vpx_highbd_lpf_vertical_8_dual vpx_highbd_lpf_vertical_8_dual_sse2
 
-void vpx_highbd_minmax_8x8_c(const uint8_t* s,
+void vpx_highbd_minmax_8x8_c(const uint8_t* s8,
                              int p,
-                             const uint8_t* d,
+                             const uint8_t* d8,
                              int dp,
                              int* min,
                              int* max);
@@ -4434,12 +4449,12 @@
 
 void vpx_highbd_sad16x16x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad16x16x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad16x16x4d vpx_highbd_sad16x16x4d_sse2
@@ -4468,12 +4483,12 @@
 
 void vpx_highbd_sad16x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad16x32x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad16x32x4d vpx_highbd_sad16x32x4d_sse2
@@ -4502,12 +4517,12 @@
 
 void vpx_highbd_sad16x8x4d_c(const uint8_t* src_ptr,
                              int src_stride,
-                             const uint8_t* const ref_ptr[],
+                             const uint8_t* const ref_array[],
                              int ref_stride,
                              uint32_t* sad_array);
 void vpx_highbd_sad16x8x4d_sse2(const uint8_t* src_ptr,
                                 int src_stride,
-                                const uint8_t* const ref_ptr[],
+                                const uint8_t* const ref_array[],
                                 int ref_stride,
                                 uint32_t* sad_array);
 #define vpx_highbd_sad16x8x4d vpx_highbd_sad16x8x4d_sse2
@@ -4536,12 +4551,12 @@
 
 void vpx_highbd_sad32x16x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad32x16x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad32x16x4d vpx_highbd_sad32x16x4d_sse2
@@ -4570,12 +4585,12 @@
 
 void vpx_highbd_sad32x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad32x32x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad32x32x4d vpx_highbd_sad32x32x4d_sse2
@@ -4604,12 +4619,12 @@
 
 void vpx_highbd_sad32x64x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad32x64x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad32x64x4d vpx_highbd_sad32x64x4d_sse2
@@ -4629,12 +4644,12 @@
 
 void vpx_highbd_sad4x4x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 void vpx_highbd_sad4x4x4d_sse2(const uint8_t* src_ptr,
                                int src_stride,
-                               const uint8_t* const ref_ptr[],
+                               const uint8_t* const ref_array[],
                                int ref_stride,
                                uint32_t* sad_array);
 #define vpx_highbd_sad4x4x4d vpx_highbd_sad4x4x4d_sse2
@@ -4654,12 +4669,12 @@
 
 void vpx_highbd_sad4x8x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 void vpx_highbd_sad4x8x4d_sse2(const uint8_t* src_ptr,
                                int src_stride,
-                               const uint8_t* const ref_ptr[],
+                               const uint8_t* const ref_array[],
                                int ref_stride,
                                uint32_t* sad_array);
 #define vpx_highbd_sad4x8x4d vpx_highbd_sad4x8x4d_sse2
@@ -4688,12 +4703,12 @@
 
 void vpx_highbd_sad64x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad64x32x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad64x32x4d vpx_highbd_sad64x32x4d_sse2
@@ -4722,12 +4737,12 @@
 
 void vpx_highbd_sad64x64x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad64x64x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad64x64x4d vpx_highbd_sad64x64x4d_sse2
@@ -4756,12 +4771,12 @@
 
 void vpx_highbd_sad8x16x4d_c(const uint8_t* src_ptr,
                              int src_stride,
-                             const uint8_t* const ref_ptr[],
+                             const uint8_t* const ref_array[],
                              int ref_stride,
                              uint32_t* sad_array);
 void vpx_highbd_sad8x16x4d_sse2(const uint8_t* src_ptr,
                                 int src_stride,
-                                const uint8_t* const ref_ptr[],
+                                const uint8_t* const ref_array[],
                                 int ref_stride,
                                 uint32_t* sad_array);
 #define vpx_highbd_sad8x16x4d vpx_highbd_sad8x16x4d_sse2
@@ -4790,12 +4805,12 @@
 
 void vpx_highbd_sad8x4x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 void vpx_highbd_sad8x4x4d_sse2(const uint8_t* src_ptr,
                                int src_stride,
-                               const uint8_t* const ref_ptr[],
+                               const uint8_t* const ref_array[],
                                int ref_stride,
                                uint32_t* sad_array);
 #define vpx_highbd_sad8x4x4d vpx_highbd_sad8x4x4d_sse2
@@ -4824,12 +4839,12 @@
 
 void vpx_highbd_sad8x8x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 void vpx_highbd_sad8x8x4d_sse2(const uint8_t* src_ptr,
                                int src_stride,
-                               const uint8_t* const ref_ptr[],
+                               const uint8_t* const ref_array[],
                                int ref_stride,
                                uint32_t* sad_array);
 #define vpx_highbd_sad8x8x4d vpx_highbd_sad8x8x4d_sse2
@@ -4838,104 +4853,104 @@
                                  int cols,
                                  int16_t* diff_ptr,
                                  ptrdiff_t diff_stride,
-                                 const uint8_t* src_ptr,
+                                 const uint8_t* src8_ptr,
                                  ptrdiff_t src_stride,
-                                 const uint8_t* pred_ptr,
+                                 const uint8_t* pred8_ptr,
                                  ptrdiff_t pred_stride,
                                  int bd);
 #define vpx_highbd_subtract_block vpx_highbd_subtract_block_c
 
 void vpx_highbd_tm_predictor_16x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_tm_predictor_16x16_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_tm_predictor_16x16 vpx_highbd_tm_predictor_16x16_sse2
 
 void vpx_highbd_tm_predictor_32x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_tm_predictor_32x32_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_tm_predictor_32x32 vpx_highbd_tm_predictor_32x32_sse2
 
 void vpx_highbd_tm_predictor_4x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_tm_predictor_4x4_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_tm_predictor_4x4 vpx_highbd_tm_predictor_4x4_sse2
 
 void vpx_highbd_tm_predictor_8x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_tm_predictor_8x8_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_tm_predictor_8x8 vpx_highbd_tm_predictor_8x8_sse2
 
 void vpx_highbd_v_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_v_predictor_16x16_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_v_predictor_16x16 vpx_highbd_v_predictor_16x16_sse2
 
 void vpx_highbd_v_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_v_predictor_32x32_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_v_predictor_32x32 vpx_highbd_v_predictor_32x32_sse2
 
 void vpx_highbd_v_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_v_predictor_4x4_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_v_predictor_4x4 vpx_highbd_v_predictor_4x4_sse2
 
 void vpx_highbd_v_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_v_predictor_8x8_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
@@ -5245,12 +5260,12 @@
                                   const uint8_t* thresh1);
 #define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_sse2
 
-void vpx_mbpost_proc_across_ip_c(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_c(unsigned char* src,
                                  int pitch,
                                  int rows,
                                  int cols,
                                  int flimit);
-void vpx_mbpost_proc_across_ip_sse2(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_sse2(unsigned char* src,
                                     int pitch,
                                     int rows,
                                     int cols,
@@ -5284,68 +5299,68 @@
 #define vpx_minmax_8x8 vpx_minmax_8x8_sse2
 
 unsigned int vpx_mse16x16_c(const uint8_t* src_ptr,
-                            int source_stride,
+                            int src_stride,
                             const uint8_t* ref_ptr,
-                            int recon_stride,
+                            int ref_stride,
                             unsigned int* sse);
 unsigned int vpx_mse16x16_sse2(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
-                               int recon_stride,
+                               int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_mse16x16_avx2(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
-                               int recon_stride,
+                               int ref_stride,
                                unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_mse16x16)(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
-                                         int recon_stride,
+                                         int ref_stride,
                                          unsigned int* sse);
 
 unsigned int vpx_mse16x8_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 unsigned int vpx_mse16x8_sse2(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
-                              int recon_stride,
+                              int ref_stride,
                               unsigned int* sse);
 unsigned int vpx_mse16x8_avx2(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
-                              int recon_stride,
+                              int ref_stride,
                               unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_mse16x8)(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
-                                        int recon_stride,
+                                        int ref_stride,
                                         unsigned int* sse);
 
 unsigned int vpx_mse8x16_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 unsigned int vpx_mse8x16_sse2(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
-                              int recon_stride,
+                              int ref_stride,
                               unsigned int* sse);
 #define vpx_mse8x16 vpx_mse8x16_sse2
 
 unsigned int vpx_mse8x8_c(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
-                          int recon_stride,
+                          int ref_stride,
                           unsigned int* sse);
 unsigned int vpx_mse8x8_sse2(const uint8_t* src_ptr,
-                             int source_stride,
+                             int src_stride,
                              const uint8_t* ref_ptr,
-                             int recon_stride,
+                             int ref_stride,
                              unsigned int* sse);
 #define vpx_mse8x8 vpx_mse8x8_sse2
 
@@ -5546,12 +5561,12 @@
 
 void vpx_sad16x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x16x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad16x16x4d vpx_sad16x16x4d_sse2
@@ -5596,12 +5611,12 @@
 
 void vpx_sad16x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x32x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad16x32x4d vpx_sad16x32x4d_sse2
@@ -5651,12 +5666,12 @@
 
 void vpx_sad16x8x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad16x8x4d_sse2(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 #define vpx_sad16x8x4d vpx_sad16x8x4d_sse2
@@ -5717,12 +5732,12 @@
 
 void vpx_sad32x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x16x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x16x4d vpx_sad32x16x4d_sse2
@@ -5767,22 +5782,22 @@
 
 void vpx_sad32x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x32x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 void vpx_sad32x32x4d_avx2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 RTCD_EXTERN void (*vpx_sad32x32x4d)(const uint8_t* src_ptr,
                                     int src_stride,
-                                    const uint8_t* const ref_ptr[],
+                                    const uint8_t* const ref_array[],
                                     int ref_stride,
                                     uint32_t* sad_array);
 
@@ -5826,12 +5841,12 @@
 
 void vpx_sad32x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x64x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x64x4d vpx_sad32x64x4d_sse2
@@ -5876,12 +5891,12 @@
 
 void vpx_sad4x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x4x4d_sse2(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad4x4x4d vpx_sad4x4x4d_sse2
@@ -5926,12 +5941,12 @@
 
 void vpx_sad4x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x8x4d_sse2(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad4x8x4d vpx_sad4x8x4d_sse2
@@ -5976,12 +5991,12 @@
 
 void vpx_sad64x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x32x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad64x32x4d vpx_sad64x32x4d_sse2
@@ -6026,22 +6041,22 @@
 
 void vpx_sad64x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x64x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 void vpx_sad64x64x4d_avx2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 RTCD_EXTERN void (*vpx_sad64x64x4d)(const uint8_t* src_ptr,
                                     int src_stride,
-                                    const uint8_t* const ref_ptr[],
+                                    const uint8_t* const ref_array[],
                                     int ref_stride,
                                     uint32_t* sad_array);
 
@@ -6085,12 +6100,12 @@
 
 void vpx_sad8x16x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad8x16x4d_sse2(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 #define vpx_sad8x16x4d vpx_sad8x16x4d_sse2
@@ -6135,12 +6150,12 @@
 
 void vpx_sad8x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x4x4d_sse2(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad8x4x4d vpx_sad8x4x4d_sse2
@@ -6185,12 +6200,12 @@
 
 void vpx_sad8x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x8x4d_sse2(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad8x8x4d vpx_sad8x8x4d_sse2
@@ -6316,850 +6331,850 @@
 #define vpx_scaled_vert vpx_scaled_vert_c
 
 uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x16_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x16)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x32_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x32)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x8_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x8_ssse3(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x8)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x16_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x16)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x32_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x32_avx2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x32)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x64_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x64)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x4_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x4_ssse3(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x4)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x8_ssse3(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x8)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x32_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x32)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x64_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x64_avx2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x64)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x16_ssse3(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x16)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x4_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x4_ssse3(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x4)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x8_ssse3(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x8)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x16_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x16_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x16)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x32_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x32_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x32)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x8_sse2(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x8_ssse3(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x8)(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x16_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x16_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x16)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x32_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x32_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x32_avx2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x32)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x64_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x64_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x64)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x4_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x4_ssse3(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x4)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x8_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x8_ssse3(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x8)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x32_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x32_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x32)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x64_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x64_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x64_avx2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x64)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x16_sse2(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x16_ssse3(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x16)(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x4_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x4_ssse3(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x4)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x8_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x8_ssse3(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x8)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -7187,315 +7202,315 @@
 #define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_sse2
 
 void vpx_tm_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_16x16_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_sse2
 
 void vpx_tm_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_32x32_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_sse2
 
 void vpx_tm_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_4x4_sse2(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_sse2
 
 void vpx_tm_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_8x8_sse2(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_sse2
 
 void vpx_v_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_16x16_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_v_predictor_16x16 vpx_v_predictor_16x16_sse2
 
 void vpx_v_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_32x32_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_v_predictor_32x32 vpx_v_predictor_32x32_sse2
 
 void vpx_v_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_4x4_sse2(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_v_predictor_4x4 vpx_v_predictor_4x4_sse2
 
 void vpx_v_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_8x8_sse2(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_v_predictor_8x8 vpx_v_predictor_8x8_sse2
 
 unsigned int vpx_variance16x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x16_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance16x16_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance16x16)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance16x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x32_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance16x32_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance16x32)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance16x8_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance16x8_sse2(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 unsigned int vpx_variance16x8_avx2(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance16x8)(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 
 unsigned int vpx_variance32x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x16_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance32x16_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance32x16)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance32x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x32_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance32x32_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance32x32)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance32x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x64_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance32x64_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance32x64)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance4x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x4_sse2(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance4x4 vpx_variance4x4_sse2
 
 unsigned int vpx_variance4x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x8_sse2(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance4x8 vpx_variance4x8_sse2
 
 unsigned int vpx_variance64x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x32_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance64x32_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance64x32)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance64x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x64_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance64x64_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance64x64)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance8x16_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance8x16_sse2(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 #define vpx_variance8x16 vpx_variance8x16_sse2
 
 unsigned int vpx_variance8x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x4_sse2(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance8x4 vpx_variance8x4_sse2
 
 unsigned int vpx_variance8x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x8_sse2(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance8x8 vpx_variance8x8_sse2
 
 void vpx_ve_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c
diff --git a/third_party/libvpx/source/config/win/x64/vp8_rtcd.h b/third_party/libvpx/source/config/win/x64/vp8_rtcd.h
index 850ca91..c46bfe5 100644
--- a/third_party/libvpx/source/config/win/x64/vp8_rtcd.h
+++ b/third_party/libvpx/source/config/win/x64/vp8_rtcd.h
@@ -27,90 +27,90 @@
 extern "C" {
 #endif
 
-void vp8_bilinear_predict16x16_c(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_bilinear_predict16x16_c(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-void vp8_bilinear_predict16x16_sse2(unsigned char* src,
-                                    int src_pitch,
-                                    int xofst,
-                                    int yofst,
-                                    unsigned char* dst,
+void vp8_bilinear_predict16x16_sse2(unsigned char* src_ptr,
+                                    int src_pixels_per_line,
+                                    int xoffset,
+                                    int yoffset,
+                                    unsigned char* dst_ptr,
                                     int dst_pitch);
-void vp8_bilinear_predict16x16_ssse3(unsigned char* src,
-                                     int src_pitch,
-                                     int xofst,
-                                     int yofst,
-                                     unsigned char* dst,
+void vp8_bilinear_predict16x16_ssse3(unsigned char* src_ptr,
+                                     int src_pixels_per_line,
+                                     int xoffset,
+                                     int yoffset,
+                                     unsigned char* dst_ptr,
                                      int dst_pitch);
-RTCD_EXTERN void (*vp8_bilinear_predict16x16)(unsigned char* src,
-                                              int src_pitch,
-                                              int xofst,
-                                              int yofst,
-                                              unsigned char* dst,
+RTCD_EXTERN void (*vp8_bilinear_predict16x16)(unsigned char* src_ptr,
+                                              int src_pixels_per_line,
+                                              int xoffset,
+                                              int yoffset,
+                                              unsigned char* dst_ptr,
                                               int dst_pitch);
 
-void vp8_bilinear_predict4x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict4x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict4x4_sse2(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict4x4_sse2(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict4x4 vp8_bilinear_predict4x4_sse2
 
-void vp8_bilinear_predict8x4_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x4_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x4_sse2(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x4_sse2(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
 #define vp8_bilinear_predict8x4 vp8_bilinear_predict8x4_sse2
 
-void vp8_bilinear_predict8x8_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_bilinear_predict8x8_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_bilinear_predict8x8_sse2(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_bilinear_predict8x8_sse2(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
-void vp8_bilinear_predict8x8_ssse3(unsigned char* src,
-                                   int src_pitch,
-                                   int xofst,
-                                   int yofst,
-                                   unsigned char* dst,
+void vp8_bilinear_predict8x8_ssse3(unsigned char* src_ptr,
+                                   int src_pixels_per_line,
+                                   int xoffset,
+                                   int yoffset,
+                                   unsigned char* dst_ptr,
                                    int dst_pitch);
-RTCD_EXTERN void (*vp8_bilinear_predict8x8)(unsigned char* src,
-                                            int src_pitch,
-                                            int xofst,
-                                            int yofst,
-                                            unsigned char* dst,
+RTCD_EXTERN void (*vp8_bilinear_predict8x8)(unsigned char* src_ptr,
+                                            int src_pixels_per_line,
+                                            int xoffset,
+                                            int yoffset,
+                                            unsigned char* dst_ptr,
                                             int dst_pitch);
 
 void vp8_blend_b_c(unsigned char* y,
                    unsigned char* u,
                    unsigned char* v,
-                   int y1,
-                   int u1,
-                   int v1,
+                   int y_1,
+                   int u_1,
+                   int v_1,
                    int alpha,
                    int stride);
 #define vp8_blend_b vp8_blend_b_c
@@ -118,9 +118,9 @@
 void vp8_blend_mb_inner_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_inner vp8_blend_mb_inner_c
@@ -128,9 +128,9 @@
 void vp8_blend_mb_outer_c(unsigned char* y,
                           unsigned char* u,
                           unsigned char* v,
-                          int y1,
-                          int u1,
-                          int v1,
+                          int y_1,
+                          int u_1,
+                          int v_1,
                           int alpha,
                           int stride);
 #define vp8_blend_mb_outer vp8_blend_mb_outer_c
@@ -140,65 +140,65 @@
 #define vp8_block_error vp8_block_error_sse2
 
 void vp8_copy32xn_c(const unsigned char* src_ptr,
-                    int source_stride,
+                    int src_stride,
                     unsigned char* dst_ptr,
                     int dst_stride,
-                    int n);
+                    int height);
 void vp8_copy32xn_sse2(const unsigned char* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        unsigned char* dst_ptr,
                        int dst_stride,
-                       int n);
+                       int height);
 void vp8_copy32xn_sse3(const unsigned char* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        unsigned char* dst_ptr,
                        int dst_stride,
-                       int n);
+                       int height);
 RTCD_EXTERN void (*vp8_copy32xn)(const unsigned char* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  unsigned char* dst_ptr,
                                  int dst_stride,
-                                 int n);
+                                 int height);
 
 void vp8_copy_mem16x16_c(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 void vp8_copy_mem16x16_sse2(unsigned char* src,
-                            int src_pitch,
+                            int src_stride,
                             unsigned char* dst,
-                            int dst_pitch);
+                            int dst_stride);
 #define vp8_copy_mem16x16 vp8_copy_mem16x16_sse2
 
 void vp8_copy_mem8x4_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 void vp8_copy_mem8x4_mmx(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 #define vp8_copy_mem8x4 vp8_copy_mem8x4_mmx
 
 void vp8_copy_mem8x8_c(unsigned char* src,
-                       int src_pitch,
+                       int src_stride,
                        unsigned char* dst,
-                       int dst_pitch);
+                       int dst_stride);
 void vp8_copy_mem8x8_mmx(unsigned char* src,
-                         int src_pitch,
+                         int src_stride,
                          unsigned char* dst,
-                         int dst_pitch);
+                         int dst_stride);
 #define vp8_copy_mem8x8 vp8_copy_mem8x8_mmx
 
-void vp8_dc_only_idct_add_c(short input,
-                            unsigned char* pred,
+void vp8_dc_only_idct_add_c(short input_dc,
+                            unsigned char* pred_ptr,
                             int pred_stride,
-                            unsigned char* dst,
+                            unsigned char* dst_ptr,
                             int dst_stride);
-void vp8_dc_only_idct_add_mmx(short input,
-                              unsigned char* pred,
+void vp8_dc_only_idct_add_mmx(short input_dc,
+                              unsigned char* pred_ptr,
                               int pred_stride,
-                              unsigned char* dst,
+                              unsigned char* dst_ptr,
                               int dst_stride);
 #define vp8_dc_only_idct_add vp8_dc_only_idct_add_mmx
 
@@ -240,11 +240,11 @@
 
 void vp8_dequant_idct_add_c(short* input,
                             short* dq,
-                            unsigned char* output,
+                            unsigned char* dest,
                             int stride);
 void vp8_dequant_idct_add_mmx(short* input,
                               short* dq,
-                              unsigned char* output,
+                              unsigned char* dest,
                               int stride);
 #define vp8_dequant_idct_add vp8_dequant_idct_add_mmx
 
@@ -274,8 +274,8 @@
                                        char* eobs);
 #define vp8_dequant_idct_add_y_block vp8_dequant_idct_add_y_block_sse2
 
-void vp8_dequantize_b_c(struct blockd*, short* dqc);
-void vp8_dequantize_b_mmx(struct blockd*, short* dqc);
+void vp8_dequantize_b_c(struct blockd*, short* DQC);
+void vp8_dequantize_b_mmx(struct blockd*, short* DQC);
 #define vp8_dequantize_b vp8_dequantize_b_mmx
 
 int vp8_diamond_search_sad_c(struct macroblock* x,
@@ -375,91 +375,91 @@
                                        int* mvcost[2],
                                        union int_mv* center_mv);
 
-void vp8_loop_filter_bh_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bh_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bh_sse2(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bh_sse2(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
 #define vp8_loop_filter_bh vp8_loop_filter_bh_sse2
 
-void vp8_loop_filter_bv_c(unsigned char* y,
-                          unsigned char* u,
-                          unsigned char* v,
-                          int ystride,
+void vp8_loop_filter_bv_c(unsigned char* y_ptr,
+                          unsigned char* u_ptr,
+                          unsigned char* v_ptr,
+                          int y_stride,
                           int uv_stride,
                           struct loop_filter_info* lfi);
-void vp8_loop_filter_bv_sse2(unsigned char* y,
-                             unsigned char* u,
-                             unsigned char* v,
-                             int ystride,
+void vp8_loop_filter_bv_sse2(unsigned char* y_ptr,
+                             unsigned char* u_ptr,
+                             unsigned char* v_ptr,
+                             int y_stride,
                              int uv_stride,
                              struct loop_filter_info* lfi);
 #define vp8_loop_filter_bv vp8_loop_filter_bv_sse2
 
-void vp8_loop_filter_mbh_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbh_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbh_sse2(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbh_sse2(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbh vp8_loop_filter_mbh_sse2
 
-void vp8_loop_filter_mbv_c(unsigned char* y,
-                           unsigned char* u,
-                           unsigned char* v,
-                           int ystride,
+void vp8_loop_filter_mbv_c(unsigned char* y_ptr,
+                           unsigned char* u_ptr,
+                           unsigned char* v_ptr,
+                           int y_stride,
                            int uv_stride,
                            struct loop_filter_info* lfi);
-void vp8_loop_filter_mbv_sse2(unsigned char* y,
-                              unsigned char* u,
-                              unsigned char* v,
-                              int ystride,
+void vp8_loop_filter_mbv_sse2(unsigned char* y_ptr,
+                              unsigned char* u_ptr,
+                              unsigned char* v_ptr,
+                              int y_stride,
                               int uv_stride,
                               struct loop_filter_info* lfi);
 #define vp8_loop_filter_mbv vp8_loop_filter_mbv_sse2
 
-void vp8_loop_filter_bhs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bhs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bhs_sse2(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bhs_sse2(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_bh vp8_loop_filter_bhs_sse2
 
-void vp8_loop_filter_bvs_c(unsigned char* y,
-                           int ystride,
+void vp8_loop_filter_bvs_c(unsigned char* y_ptr,
+                           int y_stride,
                            const unsigned char* blimit);
-void vp8_loop_filter_bvs_sse2(unsigned char* y,
-                              int ystride,
+void vp8_loop_filter_bvs_sse2(unsigned char* y_ptr,
+                              int y_stride,
                               const unsigned char* blimit);
 #define vp8_loop_filter_simple_bv vp8_loop_filter_bvs_sse2
 
-void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y,
-                                              int ystride,
+void vp8_loop_filter_simple_horizontal_edge_c(unsigned char* y_ptr,
+                                              int y_stride,
                                               const unsigned char* blimit);
-void vp8_loop_filter_simple_horizontal_edge_sse2(unsigned char* y,
-                                                 int ystride,
+void vp8_loop_filter_simple_horizontal_edge_sse2(unsigned char* y_ptr,
+                                                 int y_stride,
                                                  const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbh vp8_loop_filter_simple_horizontal_edge_sse2
 
-void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y,
-                                            int ystride,
+void vp8_loop_filter_simple_vertical_edge_c(unsigned char* y_ptr,
+                                            int y_stride,
                                             const unsigned char* blimit);
-void vp8_loop_filter_simple_vertical_edge_sse2(unsigned char* y,
-                                               int ystride,
+void vp8_loop_filter_simple_vertical_edge_sse2(unsigned char* y_ptr,
+                                               int y_stride,
                                                const unsigned char* blimit);
 #define vp8_loop_filter_simple_mbv vp8_loop_filter_simple_vertical_edge_sse2
 
@@ -475,8 +475,8 @@
                               struct block* b,
                               struct blockd* d,
                               union int_mv* ref_mv,
-                              int sad_per_bit,
-                              int distance,
+                              int error_per_bit,
+                              int search_range,
                               struct variance_vtable* fn_ptr,
                               int* mvcost[2],
                               union int_mv* center_mv);
@@ -484,8 +484,8 @@
                               struct block* b,
                               struct blockd* d,
                               union int_mv* ref_mv,
-                              int sad_per_bit,
-                              int distance,
+                              int error_per_bit,
+                              int search_range,
                               struct variance_vtable* fn_ptr,
                               int* mvcost[2],
                               union int_mv* center_mv);
@@ -505,126 +505,126 @@
 #define vp8_short_fdct8x4 vp8_short_fdct8x4_sse2
 
 void vp8_short_idct4x4llm_c(short* input,
-                            unsigned char* pred,
-                            int pitch,
-                            unsigned char* dst,
+                            unsigned char* pred_ptr,
+                            int pred_stride,
+                            unsigned char* dst_ptr,
                             int dst_stride);
 void vp8_short_idct4x4llm_mmx(short* input,
-                              unsigned char* pred,
-                              int pitch,
-                              unsigned char* dst,
+                              unsigned char* pred_ptr,
+                              int pred_stride,
+                              unsigned char* dst_ptr,
                               int dst_stride);
 #define vp8_short_idct4x4llm vp8_short_idct4x4llm_mmx
 
-void vp8_short_inv_walsh4x4_c(short* input, short* output);
-void vp8_short_inv_walsh4x4_sse2(short* input, short* output);
+void vp8_short_inv_walsh4x4_c(short* input, short* mb_dqcoeff);
+void vp8_short_inv_walsh4x4_sse2(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4 vp8_short_inv_walsh4x4_sse2
 
-void vp8_short_inv_walsh4x4_1_c(short* input, short* output);
+void vp8_short_inv_walsh4x4_1_c(short* input, short* mb_dqcoeff);
 #define vp8_short_inv_walsh4x4_1 vp8_short_inv_walsh4x4_1_c
 
 void vp8_short_walsh4x4_c(short* input, short* output, int pitch);
 void vp8_short_walsh4x4_sse2(short* input, short* output, int pitch);
 #define vp8_short_walsh4x4 vp8_short_walsh4x4_sse2
 
-void vp8_sixtap_predict16x16_c(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_sixtap_predict16x16_c(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_sixtap_predict16x16_sse2(unsigned char* src,
-                                  int src_pitch,
-                                  int xofst,
-                                  int yofst,
-                                  unsigned char* dst,
+void vp8_sixtap_predict16x16_sse2(unsigned char* src_ptr,
+                                  int src_pixels_per_line,
+                                  int xoffset,
+                                  int yoffset,
+                                  unsigned char* dst_ptr,
                                   int dst_pitch);
-void vp8_sixtap_predict16x16_ssse3(unsigned char* src,
-                                   int src_pitch,
-                                   int xofst,
-                                   int yofst,
-                                   unsigned char* dst,
+void vp8_sixtap_predict16x16_ssse3(unsigned char* src_ptr,
+                                   int src_pixels_per_line,
+                                   int xoffset,
+                                   int yoffset,
+                                   unsigned char* dst_ptr,
                                    int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict16x16)(unsigned char* src,
-                                            int src_pitch,
-                                            int xofst,
-                                            int yofst,
-                                            unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict16x16)(unsigned char* src_ptr,
+                                            int src_pixels_per_line,
+                                            int xoffset,
+                                            int yoffset,
+                                            unsigned char* dst_ptr,
                                             int dst_pitch);
 
-void vp8_sixtap_predict4x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict4x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict4x4_mmx(unsigned char* src,
-                               int src_pitch,
-                               int xofst,
-                               int yofst,
-                               unsigned char* dst,
+void vp8_sixtap_predict4x4_mmx(unsigned char* src_ptr,
+                               int src_pixels_per_line,
+                               int xoffset,
+                               int yoffset,
+                               unsigned char* dst_ptr,
                                int dst_pitch);
-void vp8_sixtap_predict4x4_ssse3(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_sixtap_predict4x4_ssse3(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict4x4)(unsigned char* src,
-                                          int src_pitch,
-                                          int xofst,
-                                          int yofst,
-                                          unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict4x4)(unsigned char* src_ptr,
+                                          int src_pixels_per_line,
+                                          int xoffset,
+                                          int yoffset,
+                                          unsigned char* dst_ptr,
                                           int dst_pitch);
 
-void vp8_sixtap_predict8x4_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x4_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x4_sse2(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x4_sse2(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
-void vp8_sixtap_predict8x4_ssse3(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_sixtap_predict8x4_ssse3(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict8x4)(unsigned char* src,
-                                          int src_pitch,
-                                          int xofst,
-                                          int yofst,
-                                          unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict8x4)(unsigned char* src_ptr,
+                                          int src_pixels_per_line,
+                                          int xoffset,
+                                          int yoffset,
+                                          unsigned char* dst_ptr,
                                           int dst_pitch);
 
-void vp8_sixtap_predict8x8_c(unsigned char* src,
-                             int src_pitch,
-                             int xofst,
-                             int yofst,
-                             unsigned char* dst,
+void vp8_sixtap_predict8x8_c(unsigned char* src_ptr,
+                             int src_pixels_per_line,
+                             int xoffset,
+                             int yoffset,
+                             unsigned char* dst_ptr,
                              int dst_pitch);
-void vp8_sixtap_predict8x8_sse2(unsigned char* src,
-                                int src_pitch,
-                                int xofst,
-                                int yofst,
-                                unsigned char* dst,
+void vp8_sixtap_predict8x8_sse2(unsigned char* src_ptr,
+                                int src_pixels_per_line,
+                                int xoffset,
+                                int yoffset,
+                                unsigned char* dst_ptr,
                                 int dst_pitch);
-void vp8_sixtap_predict8x8_ssse3(unsigned char* src,
-                                 int src_pitch,
-                                 int xofst,
-                                 int yofst,
-                                 unsigned char* dst,
+void vp8_sixtap_predict8x8_ssse3(unsigned char* src_ptr,
+                                 int src_pixels_per_line,
+                                 int xoffset,
+                                 int yoffset,
+                                 unsigned char* dst_ptr,
                                  int dst_pitch);
-RTCD_EXTERN void (*vp8_sixtap_predict8x8)(unsigned char* src,
-                                          int src_pitch,
-                                          int xofst,
-                                          int yofst,
-                                          unsigned char* dst,
+RTCD_EXTERN void (*vp8_sixtap_predict8x8)(unsigned char* src_ptr,
+                                          int src_pixels_per_line,
+                                          int xoffset,
+                                          int yoffset,
+                                          unsigned char* dst_ptr,
                                           int dst_pitch);
 
 void vp8_rtcd(void);
diff --git a/third_party/libvpx/source/config/win/x64/vp9_rtcd.h b/third_party/libvpx/source/config/win/x64/vp9_rtcd.h
index 6f00c78..28787a8 100644
--- a/third_party/libvpx/source/config/win/x64/vp9_rtcd.h
+++ b/third_party/libvpx/source/config/win/x64/vp9_rtcd.h
@@ -242,18 +242,18 @@
 #define vp9_highbd_fwht4x4 vp9_highbd_fwht4x4_c
 
 void vp9_highbd_iht16x16_256_add_c(const tran_low_t* input,
-                                   uint16_t* output,
-                                   int pitch,
+                                   uint16_t* dest,
+                                   int stride,
                                    int tx_type,
                                    int bd);
 void vp9_highbd_iht16x16_256_add_sse4_1(const tran_low_t* input,
-                                        uint16_t* output,
-                                        int pitch,
+                                        uint16_t* dest,
+                                        int stride,
                                         int tx_type,
                                         int bd);
 RTCD_EXTERN void (*vp9_highbd_iht16x16_256_add)(const tran_low_t* input,
-                                                uint16_t* output,
-                                                int pitch,
+                                                uint16_t* dest,
+                                                int stride,
                                                 int tx_type,
                                                 int bd);
 
@@ -351,12 +351,12 @@
 #define vp9_highbd_temporal_filter_apply vp9_highbd_temporal_filter_apply_c
 
 void vp9_iht16x16_256_add_c(const tran_low_t* input,
-                            uint8_t* output,
-                            int pitch,
+                            uint8_t* dest,
+                            int stride,
                             int tx_type);
 void vp9_iht16x16_256_add_sse2(const tran_low_t* input,
-                               uint8_t* output,
-                               int pitch,
+                               uint8_t* dest,
+                               int stride,
                                int tx_type);
 #define vp9_iht16x16_256_add vp9_iht16x16_256_add_sse2
 
diff --git a/third_party/libvpx/source/config/win/x64/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/win/x64/vpx_dsp_rtcd.h
index 9970fae1..3b28a11 100644
--- a/third_party/libvpx/source/config/win/x64/vpx_dsp_rtcd.h
+++ b/third_party/libvpx/source/config/win/x64/vpx_dsp_rtcd.h
@@ -427,420 +427,420 @@
 #define vpx_convolve_copy vpx_convolve_copy_sse2
 
 void vpx_d117_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_16x16 vpx_d117_predictor_16x16_c
 
 void vpx_d117_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d117_predictor_32x32 vpx_d117_predictor_32x32_c
 
 void vpx_d117_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_4x4 vpx_d117_predictor_4x4_c
 
 void vpx_d117_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d117_predictor_8x8 vpx_d117_predictor_8x8_c
 
 void vpx_d135_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d135_predictor_16x16 vpx_d135_predictor_16x16_c
 
 void vpx_d135_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d135_predictor_32x32 vpx_d135_predictor_32x32_c
 
 void vpx_d135_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d135_predictor_4x4 vpx_d135_predictor_4x4_c
 
 void vpx_d135_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d135_predictor_8x8 vpx_d135_predictor_8x8_c
 
 void vpx_d153_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d153_predictor_16x16_ssse3(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_d153_predictor_16x16)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d153_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d153_predictor_32x32_ssse3(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_d153_predictor_32x32)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d153_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d153_predictor_4x4_ssse3(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 RTCD_EXTERN void (*vpx_d153_predictor_4x4)(uint8_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint8_t* above,
                                            const uint8_t* left);
 
 void vpx_d153_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d153_predictor_8x8_ssse3(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 RTCD_EXTERN void (*vpx_d153_predictor_8x8)(uint8_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint8_t* above,
                                            const uint8_t* left);
 
 void vpx_d207_predictor_16x16_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d207_predictor_16x16_ssse3(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_d207_predictor_16x16)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d207_predictor_32x32_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_d207_predictor_32x32_ssse3(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 RTCD_EXTERN void (*vpx_d207_predictor_32x32)(uint8_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint8_t* above,
                                              const uint8_t* left);
 
 void vpx_d207_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d207_predictor_4x4_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_d207_predictor_4x4 vpx_d207_predictor_4x4_sse2
 
 void vpx_d207_predictor_8x8_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_d207_predictor_8x8_ssse3(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 RTCD_EXTERN void (*vpx_d207_predictor_8x8)(uint8_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint8_t* above,
                                            const uint8_t* left);
 
 void vpx_d45_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_16x16_ssse3(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d45_predictor_16x16)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d45_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d45_predictor_32x32_ssse3(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d45_predictor_32x32)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d45_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_4x4_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d45_predictor_4x4 vpx_d45_predictor_4x4_sse2
 
 void vpx_d45_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d45_predictor_8x8_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_d45_predictor_8x8 vpx_d45_predictor_8x8_sse2
 
 void vpx_d45e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d45e_predictor_4x4 vpx_d45e_predictor_4x4_c
 
 void vpx_d63_predictor_16x16_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d63_predictor_16x16_ssse3(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d63_predictor_16x16)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d63_predictor_32x32_c(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 void vpx_d63_predictor_32x32_ssse3(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 RTCD_EXTERN void (*vpx_d63_predictor_32x32)(uint8_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint8_t* above,
                                             const uint8_t* left);
 
 void vpx_d63_predictor_4x4_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d63_predictor_4x4_ssse3(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 RTCD_EXTERN void (*vpx_d63_predictor_4x4)(uint8_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint8_t* above,
                                           const uint8_t* left);
 
 void vpx_d63_predictor_8x8_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_d63_predictor_8x8_ssse3(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 RTCD_EXTERN void (*vpx_d63_predictor_8x8)(uint8_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint8_t* above,
                                           const uint8_t* left);
 
 void vpx_d63e_predictor_4x4_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_d63e_predictor_4x4 vpx_d63e_predictor_4x4_c
 
 void vpx_dc_128_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_16x16_sse2(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_128_predictor_16x16 vpx_dc_128_predictor_16x16_sse2
 
 void vpx_dc_128_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_128_predictor_32x32_sse2(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_128_predictor_32x32 vpx_dc_128_predictor_32x32_sse2
 
 void vpx_dc_128_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_4x4_sse2(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_128_predictor_4x4 vpx_dc_128_predictor_4x4_sse2
 
 void vpx_dc_128_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_128_predictor_8x8_sse2(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_128_predictor_8x8 vpx_dc_128_predictor_8x8_sse2
 
 void vpx_dc_left_predictor_16x16_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_16x16_sse2(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 #define vpx_dc_left_predictor_16x16 vpx_dc_left_predictor_16x16_sse2
 
 void vpx_dc_left_predictor_32x32_c(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 void vpx_dc_left_predictor_32x32_sse2(uint8_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint8_t* above,
                                       const uint8_t* left);
 #define vpx_dc_left_predictor_32x32 vpx_dc_left_predictor_32x32_sse2
 
 void vpx_dc_left_predictor_4x4_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_4x4_sse2(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 #define vpx_dc_left_predictor_4x4 vpx_dc_left_predictor_4x4_sse2
 
 void vpx_dc_left_predictor_8x8_c(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 void vpx_dc_left_predictor_8x8_sse2(uint8_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint8_t* above,
                                     const uint8_t* left);
 #define vpx_dc_left_predictor_8x8 vpx_dc_left_predictor_8x8_sse2
 
 void vpx_dc_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_16x16_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_predictor_16x16 vpx_dc_predictor_16x16_sse2
 
 void vpx_dc_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_dc_predictor_32x32_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_dc_predictor_32x32 vpx_dc_predictor_32x32_sse2
 
 void vpx_dc_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_4x4_sse2(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_dc_predictor_4x4 vpx_dc_predictor_4x4_sse2
 
 void vpx_dc_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_dc_predictor_8x8_sse2(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_dc_predictor_8x8 vpx_dc_predictor_8x8_sse2
 
 void vpx_dc_top_predictor_16x16_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_16x16_sse2(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_top_predictor_16x16 vpx_dc_top_predictor_16x16_sse2
 
 void vpx_dc_top_predictor_32x32_c(uint8_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint8_t* above,
                                   const uint8_t* left);
 void vpx_dc_top_predictor_32x32_sse2(uint8_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint8_t* above,
                                      const uint8_t* left);
 #define vpx_dc_top_predictor_32x32 vpx_dc_top_predictor_32x32_sse2
 
 void vpx_dc_top_predictor_4x4_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_4x4_sse2(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_top_predictor_4x4 vpx_dc_top_predictor_4x4_sse2
 
 void vpx_dc_top_predictor_8x8_c(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 void vpx_dc_top_predictor_8x8_sse2(uint8_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint8_t* above,
                                    const uint8_t* left);
 #define vpx_dc_top_predictor_8x8 vpx_dc_top_predictor_8x8_sse2
@@ -884,44 +884,44 @@
 #define vpx_fdct8x8_1 vpx_fdct8x8_1_sse2
 
 void vpx_get16x16var_c(const uint8_t* src_ptr,
-                       int source_stride,
+                       int src_stride,
                        const uint8_t* ref_ptr,
                        int ref_stride,
                        unsigned int* sse,
                        int* sum);
 void vpx_get16x16var_sse2(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
                           int ref_stride,
                           unsigned int* sse,
                           int* sum);
 void vpx_get16x16var_avx2(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
                           int ref_stride,
                           unsigned int* sse,
                           int* sum);
 RTCD_EXTERN void (*vpx_get16x16var)(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse,
                                     int* sum);
 
 unsigned int vpx_get4x4sse_cs_c(const unsigned char* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const unsigned char* ref_ptr,
                                 int ref_stride);
 #define vpx_get4x4sse_cs vpx_get4x4sse_cs_c
 
 void vpx_get8x8var_c(const uint8_t* src_ptr,
-                     int source_stride,
+                     int src_stride,
                      const uint8_t* ref_ptr,
                      int ref_stride,
                      unsigned int* sse,
                      int* sum);
 void vpx_get8x8var_sse2(const uint8_t* src_ptr,
-                        int source_stride,
+                        int src_stride,
                         const uint8_t* ref_ptr,
                         int ref_stride,
                         unsigned int* sse,
@@ -933,41 +933,41 @@
 #define vpx_get_mb_ss vpx_get_mb_ss_sse2
 
 void vpx_h_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_16x16_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_h_predictor_16x16 vpx_h_predictor_16x16_sse2
 
 void vpx_h_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_h_predictor_32x32_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_h_predictor_32x32 vpx_h_predictor_32x32_sse2
 
 void vpx_h_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_4x4_sse2(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_h_predictor_4x4 vpx_h_predictor_4x4_sse2
 
 void vpx_h_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_h_predictor_8x8_sse2(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_h_predictor_8x8 vpx_h_predictor_8x8_sse2
@@ -1012,13 +1012,13 @@
                                      tran_low_t* coeff);
 
 void vpx_he_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_he_predictor_4x4 vpx_he_predictor_4x4_c
 
 void vpx_highbd_10_get16x16var_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse,
@@ -1026,7 +1026,7 @@
 #define vpx_highbd_10_get16x16var vpx_highbd_10_get16x16var_c
 
 void vpx_highbd_10_get8x8var_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse,
@@ -1034,57 +1034,57 @@
 #define vpx_highbd_10_get8x8var vpx_highbd_10_get8x8var_c
 
 unsigned int vpx_highbd_10_mse16x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 unsigned int vpx_highbd_10_mse16x16_sse2(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
-                                         int recon_stride,
+                                         int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_mse16x16 vpx_highbd_10_mse16x16_sse2
 
 unsigned int vpx_highbd_10_mse16x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_10_mse16x8 vpx_highbd_10_mse16x8_c
 
 unsigned int vpx_highbd_10_mse8x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_10_mse8x16 vpx_highbd_10_mse8x16_c
 
 unsigned int vpx_highbd_10_mse8x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_highbd_10_mse8x8_sse2(const uint8_t* src_ptr,
-                                       int source_stride,
+                                       int src_stride,
                                        const uint8_t* ref_ptr,
-                                       int recon_stride,
+                                       int ref_stride,
                                        unsigned int* sse);
 #define vpx_highbd_10_mse8x8 vpx_highbd_10_mse8x8_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1094,18 +1094,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1114,18 +1114,18 @@
   vpx_highbd_10_sub_pixel_avg_variance16x32_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance16x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1135,18 +1135,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1156,18 +1156,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1177,18 +1177,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance32x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1197,9 +1197,9 @@
   vpx_highbd_10_sub_pixel_avg_variance32x64_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1208,9 +1208,9 @@
   vpx_highbd_10_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1220,18 +1220,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1241,18 +1241,18 @@
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance64x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1261,18 +1261,18 @@
   vpx_highbd_10_sub_pixel_avg_variance64x64_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1281,18 +1281,18 @@
   vpx_highbd_10_sub_pixel_avg_variance8x16_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x4_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1301,18 +1301,18 @@
   vpx_highbd_10_sub_pixel_avg_variance8x4_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_10_sub_pixel_avg_variance8x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1321,16 +1321,16 @@
   vpx_highbd_10_sub_pixel_avg_variance8x8_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance16x16_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1338,16 +1338,16 @@
   vpx_highbd_10_sub_pixel_variance16x16_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance16x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1355,16 +1355,16 @@
   vpx_highbd_10_sub_pixel_variance16x32_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance16x8_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -1372,16 +1372,16 @@
   vpx_highbd_10_sub_pixel_variance16x8_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance32x16_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1389,16 +1389,16 @@
   vpx_highbd_10_sub_pixel_variance32x16_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance32x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1406,16 +1406,16 @@
   vpx_highbd_10_sub_pixel_variance32x32_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance32x64_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1423,9 +1423,9 @@
   vpx_highbd_10_sub_pixel_variance32x64_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1433,9 +1433,9 @@
   vpx_highbd_10_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -1443,16 +1443,16 @@
   vpx_highbd_10_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_10_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance64x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1460,16 +1460,16 @@
   vpx_highbd_10_sub_pixel_variance64x32_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance64x64_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1477,16 +1477,16 @@
   vpx_highbd_10_sub_pixel_variance64x64_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance8x16_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -1494,16 +1494,16 @@
   vpx_highbd_10_sub_pixel_variance8x16_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance8x4_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -1511,16 +1511,16 @@
   vpx_highbd_10_sub_pixel_variance8x4_sse2
 
 uint32_t vpx_highbd_10_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_10_sub_pixel_variance8x8_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -1528,148 +1528,148 @@
   vpx_highbd_10_sub_pixel_variance8x8_sse2
 
 unsigned int vpx_highbd_10_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance16x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance16x16 vpx_highbd_10_variance16x16_sse2
 
 unsigned int vpx_highbd_10_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance16x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance16x32 vpx_highbd_10_variance16x32_sse2
 
 unsigned int vpx_highbd_10_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_10_variance16x8_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_10_variance16x8 vpx_highbd_10_variance16x8_sse2
 
 unsigned int vpx_highbd_10_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance32x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance32x16 vpx_highbd_10_variance32x16_sse2
 
 unsigned int vpx_highbd_10_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance32x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance32x32 vpx_highbd_10_variance32x32_sse2
 
 unsigned int vpx_highbd_10_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance32x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance32x64 vpx_highbd_10_variance32x64_sse2
 
 unsigned int vpx_highbd_10_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance4x4 vpx_highbd_10_variance4x4_c
 
 unsigned int vpx_highbd_10_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance4x8 vpx_highbd_10_variance4x8_c
 
 unsigned int vpx_highbd_10_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance64x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance64x32 vpx_highbd_10_variance64x32_sse2
 
 unsigned int vpx_highbd_10_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_10_variance64x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_10_variance64x64 vpx_highbd_10_variance64x64_sse2
 
 unsigned int vpx_highbd_10_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_10_variance8x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_10_variance8x16 vpx_highbd_10_variance8x16_sse2
 
 unsigned int vpx_highbd_10_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_10_variance8x4 vpx_highbd_10_variance8x4_c
 
 unsigned int vpx_highbd_10_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 unsigned int vpx_highbd_10_variance8x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 #define vpx_highbd_10_variance8x8 vpx_highbd_10_variance8x8_sse2
 
 void vpx_highbd_12_get16x16var_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse,
@@ -1677,7 +1677,7 @@
 #define vpx_highbd_12_get16x16var vpx_highbd_12_get16x16var_c
 
 void vpx_highbd_12_get8x8var_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse,
@@ -1685,57 +1685,57 @@
 #define vpx_highbd_12_get8x8var vpx_highbd_12_get8x8var_c
 
 unsigned int vpx_highbd_12_mse16x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 unsigned int vpx_highbd_12_mse16x16_sse2(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
-                                         int recon_stride,
+                                         int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_mse16x16 vpx_highbd_12_mse16x16_sse2
 
 unsigned int vpx_highbd_12_mse16x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_12_mse16x8 vpx_highbd_12_mse16x8_c
 
 unsigned int vpx_highbd_12_mse8x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 #define vpx_highbd_12_mse8x16 vpx_highbd_12_mse8x16_c
 
 unsigned int vpx_highbd_12_mse8x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_highbd_12_mse8x8_sse2(const uint8_t* src_ptr,
-                                       int source_stride,
+                                       int src_stride,
                                        const uint8_t* ref_ptr,
-                                       int recon_stride,
+                                       int ref_stride,
                                        unsigned int* sse);
 #define vpx_highbd_12_mse8x8 vpx_highbd_12_mse8x8_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1745,18 +1745,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1765,18 +1765,18 @@
   vpx_highbd_12_sub_pixel_avg_variance16x32_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance16x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1786,18 +1786,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1807,18 +1807,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1828,18 +1828,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance32x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1848,9 +1848,9 @@
   vpx_highbd_12_sub_pixel_avg_variance32x64_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1859,9 +1859,9 @@
   vpx_highbd_12_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
@@ -1871,18 +1871,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1892,18 +1892,18 @@
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_c(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance64x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1912,18 +1912,18 @@
   vpx_highbd_12_sub_pixel_avg_variance64x64_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1932,18 +1932,18 @@
   vpx_highbd_12_sub_pixel_avg_variance8x16_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x4_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1952,18 +1952,18 @@
   vpx_highbd_12_sub_pixel_avg_variance8x4_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_12_sub_pixel_avg_variance8x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -1972,16 +1972,16 @@
   vpx_highbd_12_sub_pixel_avg_variance8x8_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance16x16_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -1989,16 +1989,16 @@
   vpx_highbd_12_sub_pixel_variance16x16_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance16x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2006,16 +2006,16 @@
   vpx_highbd_12_sub_pixel_variance16x32_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance16x8_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2023,16 +2023,16 @@
   vpx_highbd_12_sub_pixel_variance16x8_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance32x16_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2040,16 +2040,16 @@
   vpx_highbd_12_sub_pixel_variance32x16_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance32x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2057,16 +2057,16 @@
   vpx_highbd_12_sub_pixel_variance32x32_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance32x64_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2074,9 +2074,9 @@
   vpx_highbd_12_sub_pixel_variance32x64_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -2084,9 +2084,9 @@
   vpx_highbd_12_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
@@ -2094,16 +2094,16 @@
   vpx_highbd_12_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_12_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance64x32_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2111,16 +2111,16 @@
   vpx_highbd_12_sub_pixel_variance64x32_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance64x64_sse2(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
@@ -2128,16 +2128,16 @@
   vpx_highbd_12_sub_pixel_variance64x64_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance8x16_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2145,16 +2145,16 @@
   vpx_highbd_12_sub_pixel_variance8x16_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance8x4_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -2162,16 +2162,16 @@
   vpx_highbd_12_sub_pixel_variance8x4_sse2
 
 uint32_t vpx_highbd_12_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_12_sub_pixel_variance8x8_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -2179,148 +2179,148 @@
   vpx_highbd_12_sub_pixel_variance8x8_sse2
 
 unsigned int vpx_highbd_12_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance16x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance16x16 vpx_highbd_12_variance16x16_sse2
 
 unsigned int vpx_highbd_12_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance16x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance16x32 vpx_highbd_12_variance16x32_sse2
 
 unsigned int vpx_highbd_12_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_12_variance16x8_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_12_variance16x8 vpx_highbd_12_variance16x8_sse2
 
 unsigned int vpx_highbd_12_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance32x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance32x16 vpx_highbd_12_variance32x16_sse2
 
 unsigned int vpx_highbd_12_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance32x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance32x32 vpx_highbd_12_variance32x32_sse2
 
 unsigned int vpx_highbd_12_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance32x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance32x64 vpx_highbd_12_variance32x64_sse2
 
 unsigned int vpx_highbd_12_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance4x4 vpx_highbd_12_variance4x4_c
 
 unsigned int vpx_highbd_12_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance4x8 vpx_highbd_12_variance4x8_c
 
 unsigned int vpx_highbd_12_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance64x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance64x32 vpx_highbd_12_variance64x32_sse2
 
 unsigned int vpx_highbd_12_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 unsigned int vpx_highbd_12_variance64x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 #define vpx_highbd_12_variance64x64 vpx_highbd_12_variance64x64_sse2
 
 unsigned int vpx_highbd_12_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_12_variance8x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_12_variance8x16 vpx_highbd_12_variance8x16_sse2
 
 unsigned int vpx_highbd_12_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 #define vpx_highbd_12_variance8x4 vpx_highbd_12_variance8x4_c
 
 unsigned int vpx_highbd_12_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 unsigned int vpx_highbd_12_variance8x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 #define vpx_highbd_12_variance8x8 vpx_highbd_12_variance8x8_sse2
 
 void vpx_highbd_8_get16x16var_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse,
@@ -2328,7 +2328,7 @@
 #define vpx_highbd_8_get16x16var vpx_highbd_8_get16x16var_c
 
 void vpx_highbd_8_get8x8var_c(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
                               int ref_stride,
                               unsigned int* sse,
@@ -2336,56 +2336,56 @@
 #define vpx_highbd_8_get8x8var vpx_highbd_8_get8x8var_c
 
 unsigned int vpx_highbd_8_mse16x16_c(const uint8_t* src_ptr,
-                                     int source_stride,
+                                     int src_stride,
                                      const uint8_t* ref_ptr,
-                                     int recon_stride,
+                                     int ref_stride,
                                      unsigned int* sse);
 unsigned int vpx_highbd_8_mse16x16_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
-                                        int recon_stride,
+                                        int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_mse16x16 vpx_highbd_8_mse16x16_sse2
 
 unsigned int vpx_highbd_8_mse16x8_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_8_mse16x8 vpx_highbd_8_mse16x8_c
 
 unsigned int vpx_highbd_8_mse8x16_c(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
-                                    int recon_stride,
+                                    int ref_stride,
                                     unsigned int* sse);
 #define vpx_highbd_8_mse8x16 vpx_highbd_8_mse8x16_c
 
 unsigned int vpx_highbd_8_mse8x8_c(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
-                                   int recon_stride,
+                                   int ref_stride,
                                    unsigned int* sse);
 unsigned int vpx_highbd_8_mse8x8_sse2(const uint8_t* src_ptr,
-                                      int source_stride,
+                                      int src_stride,
                                       const uint8_t* ref_ptr,
-                                      int recon_stride,
+                                      int ref_stride,
                                       unsigned int* sse);
 #define vpx_highbd_8_mse8x8 vpx_highbd_8_mse8x8_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2394,18 +2394,18 @@
   vpx_highbd_8_sub_pixel_avg_variance16x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2414,18 +2414,18 @@
   vpx_highbd_8_sub_pixel_avg_variance16x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance16x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2434,18 +2434,18 @@
   vpx_highbd_8_sub_pixel_avg_variance16x8_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2454,18 +2454,18 @@
   vpx_highbd_8_sub_pixel_avg_variance32x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2474,18 +2474,18 @@
   vpx_highbd_8_sub_pixel_avg_variance32x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance32x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2494,9 +2494,9 @@
   vpx_highbd_8_sub_pixel_avg_variance32x64_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -2505,9 +2505,9 @@
   vpx_highbd_8_sub_pixel_avg_variance4x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
@@ -2516,18 +2516,18 @@
   vpx_highbd_8_sub_pixel_avg_variance4x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x32_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2536,18 +2536,18 @@
   vpx_highbd_8_sub_pixel_avg_variance64x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse,
                                                     const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance64x64_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2556,18 +2556,18 @@
   vpx_highbd_8_sub_pixel_avg_variance64x64_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse,
                                                    const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x16_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2576,18 +2576,18 @@
   vpx_highbd_8_sub_pixel_avg_variance8x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
                                                   const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x4_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2596,18 +2596,18 @@
   vpx_highbd_8_sub_pixel_avg_variance8x4_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse,
                                                   const uint8_t* second_pred);
 uint32_t vpx_highbd_8_sub_pixel_avg_variance8x8_sse2(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
@@ -2616,16 +2616,16 @@
   vpx_highbd_8_sub_pixel_avg_variance8x8_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance16x16_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2633,16 +2633,16 @@
   vpx_highbd_8_sub_pixel_variance16x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance16x32_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2650,16 +2650,16 @@
   vpx_highbd_8_sub_pixel_variance16x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance16x8_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -2667,16 +2667,16 @@
   vpx_highbd_8_sub_pixel_variance16x8_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance32x16_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2684,16 +2684,16 @@
   vpx_highbd_8_sub_pixel_variance32x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance32x32_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2701,16 +2701,16 @@
   vpx_highbd_8_sub_pixel_variance32x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance32x64_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2718,34 +2718,34 @@
   vpx_highbd_8_sub_pixel_variance32x64_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance4x4 vpx_highbd_8_sub_pixel_variance4x4_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 #define vpx_highbd_8_sub_pixel_variance4x8 vpx_highbd_8_sub_pixel_variance4x8_c
 
 uint32_t vpx_highbd_8_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance64x32_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2753,16 +2753,16 @@
   vpx_highbd_8_sub_pixel_variance64x32_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                                int source_stride,
-                                                int xoffset,
-                                                int yoffset,
+                                                int src_stride,
+                                                int x_offset,
+                                                int y_offset,
                                                 const uint8_t* ref_ptr,
                                                 int ref_stride,
                                                 uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance64x64_sse2(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
@@ -2770,16 +2770,16 @@
   vpx_highbd_8_sub_pixel_variance64x64_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance8x16_sse2(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -2787,16 +2787,16 @@
   vpx_highbd_8_sub_pixel_variance8x16_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance8x4_sse2(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -2804,16 +2804,16 @@
   vpx_highbd_8_sub_pixel_variance8x4_sse2
 
 uint32_t vpx_highbd_8_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse);
 uint32_t vpx_highbd_8_sub_pixel_variance8x8_sse2(const uint8_t* src_ptr,
-                                                 int source_stride,
-                                                 int xoffset,
-                                                 int yoffset,
+                                                 int src_stride,
+                                                 int x_offset,
+                                                 int y_offset,
                                                  const uint8_t* ref_ptr,
                                                  int ref_stride,
                                                  uint32_t* sse);
@@ -2821,152 +2821,152 @@
   vpx_highbd_8_sub_pixel_variance8x8_sse2
 
 unsigned int vpx_highbd_8_variance16x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance16x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance16x16 vpx_highbd_8_variance16x16_sse2
 
 unsigned int vpx_highbd_8_variance16x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance16x32_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance16x32 vpx_highbd_8_variance16x32_sse2
 
 unsigned int vpx_highbd_8_variance16x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 unsigned int vpx_highbd_8_variance16x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 #define vpx_highbd_8_variance16x8 vpx_highbd_8_variance16x8_sse2
 
 unsigned int vpx_highbd_8_variance32x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance32x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance32x16 vpx_highbd_8_variance32x16_sse2
 
 unsigned int vpx_highbd_8_variance32x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance32x32_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance32x32 vpx_highbd_8_variance32x32_sse2
 
 unsigned int vpx_highbd_8_variance32x64_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance32x64_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance32x64 vpx_highbd_8_variance32x64_sse2
 
 unsigned int vpx_highbd_8_variance4x4_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance4x4 vpx_highbd_8_variance4x4_c
 
 unsigned int vpx_highbd_8_variance4x8_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance4x8 vpx_highbd_8_variance4x8_c
 
 unsigned int vpx_highbd_8_variance64x32_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance64x32_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance64x32 vpx_highbd_8_variance64x32_sse2
 
 unsigned int vpx_highbd_8_variance64x64_c(const uint8_t* src_ptr,
-                                          int source_stride,
+                                          int src_stride,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           unsigned int* sse);
 unsigned int vpx_highbd_8_variance64x64_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 #define vpx_highbd_8_variance64x64 vpx_highbd_8_variance64x64_sse2
 
 unsigned int vpx_highbd_8_variance8x16_c(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          unsigned int* sse);
 unsigned int vpx_highbd_8_variance8x16_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
+                                            int src_stride,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             unsigned int* sse);
 #define vpx_highbd_8_variance8x16 vpx_highbd_8_variance8x16_sse2
 
 unsigned int vpx_highbd_8_variance8x4_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 #define vpx_highbd_8_variance8x4 vpx_highbd_8_variance8x4_c
 
 unsigned int vpx_highbd_8_variance8x8_c(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         unsigned int* sse);
 unsigned int vpx_highbd_8_variance8x8_sse2(const uint8_t* src_ptr,
-                                           int source_stride,
+                                           int src_stride,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            unsigned int* sse);
 #define vpx_highbd_8_variance8x8 vpx_highbd_8_variance8x8_sse2
 
-unsigned int vpx_highbd_avg_4x4_c(const uint8_t*, int p);
-unsigned int vpx_highbd_avg_4x4_sse2(const uint8_t*, int p);
+unsigned int vpx_highbd_avg_4x4_c(const uint8_t* s8, int p);
+unsigned int vpx_highbd_avg_4x4_sse2(const uint8_t* s8, int p);
 #define vpx_highbd_avg_4x4 vpx_highbd_avg_4x4_sse2
 
-unsigned int vpx_highbd_avg_8x8_c(const uint8_t*, int p);
-unsigned int vpx_highbd_avg_8x8_sse2(const uint8_t*, int p);
+unsigned int vpx_highbd_avg_8x8_c(const uint8_t* s8, int p);
+unsigned int vpx_highbd_avg_8x8_sse2(const uint8_t* s8, int p);
 #define vpx_highbd_avg_8x8 vpx_highbd_avg_8x8_sse2
 
 void vpx_highbd_comp_avg_pred_c(uint16_t* comp_pred,
@@ -2988,7 +2988,7 @@
                             int y_step_q4,
                             int w,
                             int h,
-                            int bps);
+                            int bd);
 void vpx_highbd_convolve8_sse2(const uint16_t* src,
                                ptrdiff_t src_stride,
                                uint16_t* dst,
@@ -3000,7 +3000,7 @@
                                int y_step_q4,
                                int w,
                                int h,
-                               int bps);
+                               int bd);
 void vpx_highbd_convolve8_avx2(const uint16_t* src,
                                ptrdiff_t src_stride,
                                uint16_t* dst,
@@ -3012,7 +3012,7 @@
                                int y_step_q4,
                                int w,
                                int h,
-                               int bps);
+                               int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8)(const uint16_t* src,
                                          ptrdiff_t src_stride,
                                          uint16_t* dst,
@@ -3024,7 +3024,7 @@
                                          int y_step_q4,
                                          int w,
                                          int h,
-                                         int bps);
+                                         int bd);
 
 void vpx_highbd_convolve8_avg_c(const uint16_t* src,
                                 ptrdiff_t src_stride,
@@ -3037,7 +3037,7 @@
                                 int y_step_q4,
                                 int w,
                                 int h,
-                                int bps);
+                                int bd);
 void vpx_highbd_convolve8_avg_sse2(const uint16_t* src,
                                    ptrdiff_t src_stride,
                                    uint16_t* dst,
@@ -3049,7 +3049,7 @@
                                    int y_step_q4,
                                    int w,
                                    int h,
-                                   int bps);
+                                   int bd);
 void vpx_highbd_convolve8_avg_avx2(const uint16_t* src,
                                    ptrdiff_t src_stride,
                                    uint16_t* dst,
@@ -3061,7 +3061,7 @@
                                    int y_step_q4,
                                    int w,
                                    int h,
-                                   int bps);
+                                   int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_avg)(const uint16_t* src,
                                              ptrdiff_t src_stride,
                                              uint16_t* dst,
@@ -3073,7 +3073,7 @@
                                              int y_step_q4,
                                              int w,
                                              int h,
-                                             int bps);
+                                             int bd);
 
 void vpx_highbd_convolve8_avg_horiz_c(const uint16_t* src,
                                       ptrdiff_t src_stride,
@@ -3086,7 +3086,7 @@
                                       int y_step_q4,
                                       int w,
                                       int h,
-                                      int bps);
+                                      int bd);
 void vpx_highbd_convolve8_avg_horiz_sse2(const uint16_t* src,
                                          ptrdiff_t src_stride,
                                          uint16_t* dst,
@@ -3098,7 +3098,7 @@
                                          int y_step_q4,
                                          int w,
                                          int h,
-                                         int bps);
+                                         int bd);
 void vpx_highbd_convolve8_avg_horiz_avx2(const uint16_t* src,
                                          ptrdiff_t src_stride,
                                          uint16_t* dst,
@@ -3110,7 +3110,7 @@
                                          int y_step_q4,
                                          int w,
                                          int h,
-                                         int bps);
+                                         int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_avg_horiz)(const uint16_t* src,
                                                    ptrdiff_t src_stride,
                                                    uint16_t* dst,
@@ -3122,7 +3122,7 @@
                                                    int y_step_q4,
                                                    int w,
                                                    int h,
-                                                   int bps);
+                                                   int bd);
 
 void vpx_highbd_convolve8_avg_vert_c(const uint16_t* src,
                                      ptrdiff_t src_stride,
@@ -3135,7 +3135,7 @@
                                      int y_step_q4,
                                      int w,
                                      int h,
-                                     int bps);
+                                     int bd);
 void vpx_highbd_convolve8_avg_vert_sse2(const uint16_t* src,
                                         ptrdiff_t src_stride,
                                         uint16_t* dst,
@@ -3147,7 +3147,7 @@
                                         int y_step_q4,
                                         int w,
                                         int h,
-                                        int bps);
+                                        int bd);
 void vpx_highbd_convolve8_avg_vert_avx2(const uint16_t* src,
                                         ptrdiff_t src_stride,
                                         uint16_t* dst,
@@ -3159,7 +3159,7 @@
                                         int y_step_q4,
                                         int w,
                                         int h,
-                                        int bps);
+                                        int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_avg_vert)(const uint16_t* src,
                                                   ptrdiff_t src_stride,
                                                   uint16_t* dst,
@@ -3171,7 +3171,7 @@
                                                   int y_step_q4,
                                                   int w,
                                                   int h,
-                                                  int bps);
+                                                  int bd);
 
 void vpx_highbd_convolve8_horiz_c(const uint16_t* src,
                                   ptrdiff_t src_stride,
@@ -3184,7 +3184,7 @@
                                   int y_step_q4,
                                   int w,
                                   int h,
-                                  int bps);
+                                  int bd);
 void vpx_highbd_convolve8_horiz_sse2(const uint16_t* src,
                                      ptrdiff_t src_stride,
                                      uint16_t* dst,
@@ -3196,7 +3196,7 @@
                                      int y_step_q4,
                                      int w,
                                      int h,
-                                     int bps);
+                                     int bd);
 void vpx_highbd_convolve8_horiz_avx2(const uint16_t* src,
                                      ptrdiff_t src_stride,
                                      uint16_t* dst,
@@ -3208,7 +3208,7 @@
                                      int y_step_q4,
                                      int w,
                                      int h,
-                                     int bps);
+                                     int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_horiz)(const uint16_t* src,
                                                ptrdiff_t src_stride,
                                                uint16_t* dst,
@@ -3220,7 +3220,7 @@
                                                int y_step_q4,
                                                int w,
                                                int h,
-                                               int bps);
+                                               int bd);
 
 void vpx_highbd_convolve8_vert_c(const uint16_t* src,
                                  ptrdiff_t src_stride,
@@ -3233,7 +3233,7 @@
                                  int y_step_q4,
                                  int w,
                                  int h,
-                                 int bps);
+                                 int bd);
 void vpx_highbd_convolve8_vert_sse2(const uint16_t* src,
                                     ptrdiff_t src_stride,
                                     uint16_t* dst,
@@ -3245,7 +3245,7 @@
                                     int y_step_q4,
                                     int w,
                                     int h,
-                                    int bps);
+                                    int bd);
 void vpx_highbd_convolve8_vert_avx2(const uint16_t* src,
                                     ptrdiff_t src_stride,
                                     uint16_t* dst,
@@ -3257,7 +3257,7 @@
                                     int y_step_q4,
                                     int w,
                                     int h,
-                                    int bps);
+                                    int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve8_vert)(const uint16_t* src,
                                               ptrdiff_t src_stride,
                                               uint16_t* dst,
@@ -3269,7 +3269,7 @@
                                               int y_step_q4,
                                               int w,
                                               int h,
-                                              int bps);
+                                              int bd);
 
 void vpx_highbd_convolve_avg_c(const uint16_t* src,
                                ptrdiff_t src_stride,
@@ -3282,7 +3282,7 @@
                                int y_step_q4,
                                int w,
                                int h,
-                               int bps);
+                               int bd);
 void vpx_highbd_convolve_avg_sse2(const uint16_t* src,
                                   ptrdiff_t src_stride,
                                   uint16_t* dst,
@@ -3294,7 +3294,7 @@
                                   int y_step_q4,
                                   int w,
                                   int h,
-                                  int bps);
+                                  int bd);
 void vpx_highbd_convolve_avg_avx2(const uint16_t* src,
                                   ptrdiff_t src_stride,
                                   uint16_t* dst,
@@ -3306,7 +3306,7 @@
                                   int y_step_q4,
                                   int w,
                                   int h,
-                                  int bps);
+                                  int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve_avg)(const uint16_t* src,
                                             ptrdiff_t src_stride,
                                             uint16_t* dst,
@@ -3318,7 +3318,7 @@
                                             int y_step_q4,
                                             int w,
                                             int h,
-                                            int bps);
+                                            int bd);
 
 void vpx_highbd_convolve_copy_c(const uint16_t* src,
                                 ptrdiff_t src_stride,
@@ -3331,7 +3331,7 @@
                                 int y_step_q4,
                                 int w,
                                 int h,
-                                int bps);
+                                int bd);
 void vpx_highbd_convolve_copy_sse2(const uint16_t* src,
                                    ptrdiff_t src_stride,
                                    uint16_t* dst,
@@ -3343,7 +3343,7 @@
                                    int y_step_q4,
                                    int w,
                                    int h,
-                                   int bps);
+                                   int bd);
 void vpx_highbd_convolve_copy_avx2(const uint16_t* src,
                                    ptrdiff_t src_stride,
                                    uint16_t* dst,
@@ -3355,7 +3355,7 @@
                                    int y_step_q4,
                                    int w,
                                    int h,
-                                   int bps);
+                                   int bd);
 RTCD_EXTERN void (*vpx_highbd_convolve_copy)(const uint16_t* src,
                                              ptrdiff_t src_stride,
                                              uint16_t* dst,
@@ -3367,427 +3367,427 @@
                                              int y_step_q4,
                                              int w,
                                              int h,
-                                             int bps);
+                                             int bd);
 
 void vpx_highbd_d117_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d117_predictor_16x16_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d117_predictor_16x16)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d117_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d117_predictor_32x32_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d117_predictor_32x32)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d117_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d117_predictor_4x4_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d117_predictor_4x4 vpx_highbd_d117_predictor_4x4_sse2
 
 void vpx_highbd_d117_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d117_predictor_8x8_ssse3(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 RTCD_EXTERN void (*vpx_highbd_d117_predictor_8x8)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
+                                                  ptrdiff_t stride,
                                                   const uint16_t* above,
                                                   const uint16_t* left,
                                                   int bd);
 
 void vpx_highbd_d135_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d135_predictor_16x16_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d135_predictor_16x16)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d135_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d135_predictor_32x32_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d135_predictor_32x32)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d135_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d135_predictor_4x4_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d135_predictor_4x4 vpx_highbd_d135_predictor_4x4_sse2
 
 void vpx_highbd_d135_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d135_predictor_8x8_ssse3(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 RTCD_EXTERN void (*vpx_highbd_d135_predictor_8x8)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
+                                                  ptrdiff_t stride,
                                                   const uint16_t* above,
                                                   const uint16_t* left,
                                                   int bd);
 
 void vpx_highbd_d153_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d153_predictor_16x16_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d153_predictor_16x16)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d153_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d153_predictor_32x32_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d153_predictor_32x32)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d153_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d153_predictor_4x4_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d153_predictor_4x4 vpx_highbd_d153_predictor_4x4_sse2
 
 void vpx_highbd_d153_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d153_predictor_8x8_ssse3(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 RTCD_EXTERN void (*vpx_highbd_d153_predictor_8x8)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
+                                                  ptrdiff_t stride,
                                                   const uint16_t* above,
                                                   const uint16_t* left,
                                                   int bd);
 
 void vpx_highbd_d207_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d207_predictor_16x16_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d207_predictor_16x16)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d207_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_d207_predictor_32x32_ssse3(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 RTCD_EXTERN void (*vpx_highbd_d207_predictor_32x32)(uint16_t* dst,
-                                                    ptrdiff_t y_stride,
+                                                    ptrdiff_t stride,
                                                     const uint16_t* above,
                                                     const uint16_t* left,
                                                     int bd);
 
 void vpx_highbd_d207_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d207_predictor_4x4_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_d207_predictor_4x4 vpx_highbd_d207_predictor_4x4_sse2
 
 void vpx_highbd_d207_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_d207_predictor_8x8_ssse3(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 RTCD_EXTERN void (*vpx_highbd_d207_predictor_8x8)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
+                                                  ptrdiff_t stride,
                                                   const uint16_t* above,
                                                   const uint16_t* left,
                                                   int bd);
 
 void vpx_highbd_d45_predictor_16x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d45_predictor_16x16_ssse3(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 RTCD_EXTERN void (*vpx_highbd_d45_predictor_16x16)(uint16_t* dst,
-                                                   ptrdiff_t y_stride,
+                                                   ptrdiff_t stride,
                                                    const uint16_t* above,
                                                    const uint16_t* left,
                                                    int bd);
 
 void vpx_highbd_d45_predictor_32x32_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d45_predictor_32x32_ssse3(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 RTCD_EXTERN void (*vpx_highbd_d45_predictor_32x32)(uint16_t* dst,
-                                                   ptrdiff_t y_stride,
+                                                   ptrdiff_t stride,
                                                    const uint16_t* above,
                                                    const uint16_t* left,
                                                    int bd);
 
 void vpx_highbd_d45_predictor_4x4_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d45_predictor_4x4_ssse3(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 RTCD_EXTERN void (*vpx_highbd_d45_predictor_4x4)(uint16_t* dst,
-                                                 ptrdiff_t y_stride,
+                                                 ptrdiff_t stride,
                                                  const uint16_t* above,
                                                  const uint16_t* left,
                                                  int bd);
 
 void vpx_highbd_d45_predictor_8x8_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d45_predictor_8x8_ssse3(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 RTCD_EXTERN void (*vpx_highbd_d45_predictor_8x8)(uint16_t* dst,
-                                                 ptrdiff_t y_stride,
+                                                 ptrdiff_t stride,
                                                  const uint16_t* above,
                                                  const uint16_t* left,
                                                  int bd);
 
 void vpx_highbd_d63_predictor_16x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d63_predictor_16x16_ssse3(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 RTCD_EXTERN void (*vpx_highbd_d63_predictor_16x16)(uint16_t* dst,
-                                                   ptrdiff_t y_stride,
+                                                   ptrdiff_t stride,
                                                    const uint16_t* above,
                                                    const uint16_t* left,
                                                    int bd);
 
 void vpx_highbd_d63_predictor_32x32_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 void vpx_highbd_d63_predictor_32x32_ssse3(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 RTCD_EXTERN void (*vpx_highbd_d63_predictor_32x32)(uint16_t* dst,
-                                                   ptrdiff_t y_stride,
+                                                   ptrdiff_t stride,
                                                    const uint16_t* above,
                                                    const uint16_t* left,
                                                    int bd);
 
 void vpx_highbd_d63_predictor_4x4_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d63_predictor_4x4_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_d63_predictor_4x4 vpx_highbd_d63_predictor_4x4_sse2
 
 void vpx_highbd_d63_predictor_8x8_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_d63_predictor_8x8_ssse3(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 RTCD_EXTERN void (*vpx_highbd_d63_predictor_8x8)(uint16_t* dst,
-                                                 ptrdiff_t y_stride,
+                                                 ptrdiff_t stride,
                                                  const uint16_t* above,
                                                  const uint16_t* left,
                                                  int bd);
 
 void vpx_highbd_dc_128_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_128_predictor_16x16_sse2(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_128_predictor_16x16 vpx_highbd_dc_128_predictor_16x16_sse2
 
 void vpx_highbd_dc_128_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_128_predictor_32x32_sse2(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_128_predictor_32x32 vpx_highbd_dc_128_predictor_32x32_sse2
 
 void vpx_highbd_dc_128_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_128_predictor_4x4_sse2(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_128_predictor_4x4 vpx_highbd_dc_128_predictor_4x4_sse2
 
 void vpx_highbd_dc_128_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_128_predictor_8x8_sse2(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_128_predictor_8x8 vpx_highbd_dc_128_predictor_8x8_sse2
 
 void vpx_highbd_dc_left_predictor_16x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 void vpx_highbd_dc_left_predictor_16x16_sse2(uint16_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint16_t* above,
                                              const uint16_t* left,
                                              int bd);
@@ -3795,12 +3795,12 @@
   vpx_highbd_dc_left_predictor_16x16_sse2
 
 void vpx_highbd_dc_left_predictor_32x32_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 void vpx_highbd_dc_left_predictor_32x32_sse2(uint16_t* dst,
-                                             ptrdiff_t y_stride,
+                                             ptrdiff_t stride,
                                              const uint16_t* above,
                                              const uint16_t* left,
                                              int bd);
@@ -3808,120 +3808,120 @@
   vpx_highbd_dc_left_predictor_32x32_sse2
 
 void vpx_highbd_dc_left_predictor_4x4_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 void vpx_highbd_dc_left_predictor_4x4_sse2(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 #define vpx_highbd_dc_left_predictor_4x4 vpx_highbd_dc_left_predictor_4x4_sse2
 
 void vpx_highbd_dc_left_predictor_8x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 void vpx_highbd_dc_left_predictor_8x8_sse2(uint16_t* dst,
-                                           ptrdiff_t y_stride,
+                                           ptrdiff_t stride,
                                            const uint16_t* above,
                                            const uint16_t* left,
                                            int bd);
 #define vpx_highbd_dc_left_predictor_8x8 vpx_highbd_dc_left_predictor_8x8_sse2
 
 void vpx_highbd_dc_predictor_16x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_dc_predictor_16x16_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_dc_predictor_16x16 vpx_highbd_dc_predictor_16x16_sse2
 
 void vpx_highbd_dc_predictor_32x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_dc_predictor_32x32_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_dc_predictor_32x32 vpx_highbd_dc_predictor_32x32_sse2
 
 void vpx_highbd_dc_predictor_4x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_dc_predictor_4x4_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_dc_predictor_4x4 vpx_highbd_dc_predictor_4x4_sse2
 
 void vpx_highbd_dc_predictor_8x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_dc_predictor_8x8_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_dc_predictor_8x8 vpx_highbd_dc_predictor_8x8_sse2
 
 void vpx_highbd_dc_top_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_top_predictor_16x16_sse2(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_top_predictor_16x16 vpx_highbd_dc_top_predictor_16x16_sse2
 
 void vpx_highbd_dc_top_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
+                                         ptrdiff_t stride,
                                          const uint16_t* above,
                                          const uint16_t* left,
                                          int bd);
 void vpx_highbd_dc_top_predictor_32x32_sse2(uint16_t* dst,
-                                            ptrdiff_t y_stride,
+                                            ptrdiff_t stride,
                                             const uint16_t* above,
                                             const uint16_t* left,
                                             int bd);
 #define vpx_highbd_dc_top_predictor_32x32 vpx_highbd_dc_top_predictor_32x32_sse2
 
 void vpx_highbd_dc_top_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_top_predictor_4x4_sse2(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
 #define vpx_highbd_dc_top_predictor_4x4 vpx_highbd_dc_top_predictor_4x4_sse2
 
 void vpx_highbd_dc_top_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 void vpx_highbd_dc_top_predictor_8x8_sse2(uint16_t* dst,
-                                          ptrdiff_t y_stride,
+                                          ptrdiff_t stride,
                                           const uint16_t* above,
                                           const uint16_t* left,
                                           int bd);
@@ -3979,53 +3979,68 @@
 #define vpx_highbd_fdct8x8_1 vpx_highbd_fdct8x8_1_c
 
 void vpx_highbd_h_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_h_predictor_16x16_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_h_predictor_16x16 vpx_highbd_h_predictor_16x16_sse2
 
 void vpx_highbd_h_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_h_predictor_32x32_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_h_predictor_32x32 vpx_highbd_h_predictor_32x32_sse2
 
 void vpx_highbd_h_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_h_predictor_4x4_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_h_predictor_4x4 vpx_highbd_h_predictor_4x4_sse2
 
 void vpx_highbd_h_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_h_predictor_8x8_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_h_predictor_8x8 vpx_highbd_h_predictor_8x8_sse2
 
+void vpx_highbd_hadamard_16x16_c(const int16_t* src_diff,
+                                 ptrdiff_t src_stride,
+                                 tran_low_t* coeff);
+#define vpx_highbd_hadamard_16x16 vpx_highbd_hadamard_16x16_c
+
+void vpx_highbd_hadamard_32x32_c(const int16_t* src_diff,
+                                 ptrdiff_t src_stride,
+                                 tran_low_t* coeff);
+#define vpx_highbd_hadamard_32x32 vpx_highbd_hadamard_32x32_c
+
+void vpx_highbd_hadamard_8x8_c(const int16_t* src_diff,
+                               ptrdiff_t src_stride,
+                               tran_low_t* coeff);
+#define vpx_highbd_hadamard_8x8 vpx_highbd_hadamard_8x8_c
+
 void vpx_highbd_idct16x16_10_add_c(const tran_low_t* input,
                                    uint16_t* dest,
                                    int stride,
@@ -4423,9 +4438,9 @@
                                          int bd);
 #define vpx_highbd_lpf_vertical_8_dual vpx_highbd_lpf_vertical_8_dual_sse2
 
-void vpx_highbd_minmax_8x8_c(const uint8_t* s,
+void vpx_highbd_minmax_8x8_c(const uint8_t* s8,
                              int p,
-                             const uint8_t* d,
+                             const uint8_t* d8,
                              int dp,
                              int* min,
                              int* max);
@@ -4511,12 +4526,12 @@
 
 void vpx_highbd_sad16x16x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad16x16x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad16x16x4d vpx_highbd_sad16x16x4d_sse2
@@ -4545,12 +4560,12 @@
 
 void vpx_highbd_sad16x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad16x32x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad16x32x4d vpx_highbd_sad16x32x4d_sse2
@@ -4579,12 +4594,12 @@
 
 void vpx_highbd_sad16x8x4d_c(const uint8_t* src_ptr,
                              int src_stride,
-                             const uint8_t* const ref_ptr[],
+                             const uint8_t* const ref_array[],
                              int ref_stride,
                              uint32_t* sad_array);
 void vpx_highbd_sad16x8x4d_sse2(const uint8_t* src_ptr,
                                 int src_stride,
-                                const uint8_t* const ref_ptr[],
+                                const uint8_t* const ref_array[],
                                 int ref_stride,
                                 uint32_t* sad_array);
 #define vpx_highbd_sad16x8x4d vpx_highbd_sad16x8x4d_sse2
@@ -4613,12 +4628,12 @@
 
 void vpx_highbd_sad32x16x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad32x16x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad32x16x4d vpx_highbd_sad32x16x4d_sse2
@@ -4647,12 +4662,12 @@
 
 void vpx_highbd_sad32x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad32x32x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad32x32x4d vpx_highbd_sad32x32x4d_sse2
@@ -4681,12 +4696,12 @@
 
 void vpx_highbd_sad32x64x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad32x64x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad32x64x4d vpx_highbd_sad32x64x4d_sse2
@@ -4706,12 +4721,12 @@
 
 void vpx_highbd_sad4x4x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 void vpx_highbd_sad4x4x4d_sse2(const uint8_t* src_ptr,
                                int src_stride,
-                               const uint8_t* const ref_ptr[],
+                               const uint8_t* const ref_array[],
                                int ref_stride,
                                uint32_t* sad_array);
 #define vpx_highbd_sad4x4x4d vpx_highbd_sad4x4x4d_sse2
@@ -4731,12 +4746,12 @@
 
 void vpx_highbd_sad4x8x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 void vpx_highbd_sad4x8x4d_sse2(const uint8_t* src_ptr,
                                int src_stride,
-                               const uint8_t* const ref_ptr[],
+                               const uint8_t* const ref_array[],
                                int ref_stride,
                                uint32_t* sad_array);
 #define vpx_highbd_sad4x8x4d vpx_highbd_sad4x8x4d_sse2
@@ -4765,12 +4780,12 @@
 
 void vpx_highbd_sad64x32x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad64x32x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad64x32x4d vpx_highbd_sad64x32x4d_sse2
@@ -4799,12 +4814,12 @@
 
 void vpx_highbd_sad64x64x4d_c(const uint8_t* src_ptr,
                               int src_stride,
-                              const uint8_t* const ref_ptr[],
+                              const uint8_t* const ref_array[],
                               int ref_stride,
                               uint32_t* sad_array);
 void vpx_highbd_sad64x64x4d_sse2(const uint8_t* src_ptr,
                                  int src_stride,
-                                 const uint8_t* const ref_ptr[],
+                                 const uint8_t* const ref_array[],
                                  int ref_stride,
                                  uint32_t* sad_array);
 #define vpx_highbd_sad64x64x4d vpx_highbd_sad64x64x4d_sse2
@@ -4833,12 +4848,12 @@
 
 void vpx_highbd_sad8x16x4d_c(const uint8_t* src_ptr,
                              int src_stride,
-                             const uint8_t* const ref_ptr[],
+                             const uint8_t* const ref_array[],
                              int ref_stride,
                              uint32_t* sad_array);
 void vpx_highbd_sad8x16x4d_sse2(const uint8_t* src_ptr,
                                 int src_stride,
-                                const uint8_t* const ref_ptr[],
+                                const uint8_t* const ref_array[],
                                 int ref_stride,
                                 uint32_t* sad_array);
 #define vpx_highbd_sad8x16x4d vpx_highbd_sad8x16x4d_sse2
@@ -4867,12 +4882,12 @@
 
 void vpx_highbd_sad8x4x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 void vpx_highbd_sad8x4x4d_sse2(const uint8_t* src_ptr,
                                int src_stride,
-                               const uint8_t* const ref_ptr[],
+                               const uint8_t* const ref_array[],
                                int ref_stride,
                                uint32_t* sad_array);
 #define vpx_highbd_sad8x4x4d vpx_highbd_sad8x4x4d_sse2
@@ -4901,12 +4916,12 @@
 
 void vpx_highbd_sad8x8x4d_c(const uint8_t* src_ptr,
                             int src_stride,
-                            const uint8_t* const ref_ptr[],
+                            const uint8_t* const ref_array[],
                             int ref_stride,
                             uint32_t* sad_array);
 void vpx_highbd_sad8x8x4d_sse2(const uint8_t* src_ptr,
                                int src_stride,
-                               const uint8_t* const ref_ptr[],
+                               const uint8_t* const ref_array[],
                                int ref_stride,
                                uint32_t* sad_array);
 #define vpx_highbd_sad8x8x4d vpx_highbd_sad8x8x4d_sse2
@@ -4915,104 +4930,104 @@
                                  int cols,
                                  int16_t* diff_ptr,
                                  ptrdiff_t diff_stride,
-                                 const uint8_t* src_ptr,
+                                 const uint8_t* src8_ptr,
                                  ptrdiff_t src_stride,
-                                 const uint8_t* pred_ptr,
+                                 const uint8_t* pred8_ptr,
                                  ptrdiff_t pred_stride,
                                  int bd);
 #define vpx_highbd_subtract_block vpx_highbd_subtract_block_c
 
 void vpx_highbd_tm_predictor_16x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_tm_predictor_16x16_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_tm_predictor_16x16 vpx_highbd_tm_predictor_16x16_sse2
 
 void vpx_highbd_tm_predictor_32x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 void vpx_highbd_tm_predictor_32x32_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
+                                        ptrdiff_t stride,
                                         const uint16_t* above,
                                         const uint16_t* left,
                                         int bd);
 #define vpx_highbd_tm_predictor_32x32 vpx_highbd_tm_predictor_32x32_sse2
 
 void vpx_highbd_tm_predictor_4x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_tm_predictor_4x4_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_tm_predictor_4x4 vpx_highbd_tm_predictor_4x4_sse2
 
 void vpx_highbd_tm_predictor_8x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
+                                   ptrdiff_t stride,
                                    const uint16_t* above,
                                    const uint16_t* left,
                                    int bd);
 void vpx_highbd_tm_predictor_8x8_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
+                                      ptrdiff_t stride,
                                       const uint16_t* above,
                                       const uint16_t* left,
                                       int bd);
 #define vpx_highbd_tm_predictor_8x8 vpx_highbd_tm_predictor_8x8_sse2
 
 void vpx_highbd_v_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_v_predictor_16x16_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_v_predictor_16x16 vpx_highbd_v_predictor_16x16_sse2
 
 void vpx_highbd_v_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
+                                    ptrdiff_t stride,
                                     const uint16_t* above,
                                     const uint16_t* left,
                                     int bd);
 void vpx_highbd_v_predictor_32x32_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
+                                       ptrdiff_t stride,
                                        const uint16_t* above,
                                        const uint16_t* left,
                                        int bd);
 #define vpx_highbd_v_predictor_32x32 vpx_highbd_v_predictor_32x32_sse2
 
 void vpx_highbd_v_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_v_predictor_4x4_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
 #define vpx_highbd_v_predictor_4x4 vpx_highbd_v_predictor_4x4_sse2
 
 void vpx_highbd_v_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
+                                  ptrdiff_t stride,
                                   const uint16_t* above,
                                   const uint16_t* left,
                                   int bd);
 void vpx_highbd_v_predictor_8x8_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
+                                     ptrdiff_t stride,
                                      const uint16_t* above,
                                      const uint16_t* left,
                                      int bd);
@@ -5322,12 +5337,12 @@
                                   const uint8_t* thresh1);
 #define vpx_lpf_vertical_8_dual vpx_lpf_vertical_8_dual_sse2
 
-void vpx_mbpost_proc_across_ip_c(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_c(unsigned char* src,
                                  int pitch,
                                  int rows,
                                  int cols,
                                  int flimit);
-void vpx_mbpost_proc_across_ip_sse2(unsigned char* dst,
+void vpx_mbpost_proc_across_ip_sse2(unsigned char* src,
                                     int pitch,
                                     int rows,
                                     int cols,
@@ -5361,68 +5376,68 @@
 #define vpx_minmax_8x8 vpx_minmax_8x8_sse2
 
 unsigned int vpx_mse16x16_c(const uint8_t* src_ptr,
-                            int source_stride,
+                            int src_stride,
                             const uint8_t* ref_ptr,
-                            int recon_stride,
+                            int ref_stride,
                             unsigned int* sse);
 unsigned int vpx_mse16x16_sse2(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
-                               int recon_stride,
+                               int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_mse16x16_avx2(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
-                               int recon_stride,
+                               int ref_stride,
                                unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_mse16x16)(const uint8_t* src_ptr,
-                                         int source_stride,
+                                         int src_stride,
                                          const uint8_t* ref_ptr,
-                                         int recon_stride,
+                                         int ref_stride,
                                          unsigned int* sse);
 
 unsigned int vpx_mse16x8_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 unsigned int vpx_mse16x8_sse2(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
-                              int recon_stride,
+                              int ref_stride,
                               unsigned int* sse);
 unsigned int vpx_mse16x8_avx2(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
-                              int recon_stride,
+                              int ref_stride,
                               unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_mse16x8)(const uint8_t* src_ptr,
-                                        int source_stride,
+                                        int src_stride,
                                         const uint8_t* ref_ptr,
-                                        int recon_stride,
+                                        int ref_stride,
                                         unsigned int* sse);
 
 unsigned int vpx_mse8x16_c(const uint8_t* src_ptr,
-                           int source_stride,
+                           int src_stride,
                            const uint8_t* ref_ptr,
-                           int recon_stride,
+                           int ref_stride,
                            unsigned int* sse);
 unsigned int vpx_mse8x16_sse2(const uint8_t* src_ptr,
-                              int source_stride,
+                              int src_stride,
                               const uint8_t* ref_ptr,
-                              int recon_stride,
+                              int ref_stride,
                               unsigned int* sse);
 #define vpx_mse8x16 vpx_mse8x16_sse2
 
 unsigned int vpx_mse8x8_c(const uint8_t* src_ptr,
-                          int source_stride,
+                          int src_stride,
                           const uint8_t* ref_ptr,
-                          int recon_stride,
+                          int ref_stride,
                           unsigned int* sse);
 unsigned int vpx_mse8x8_sse2(const uint8_t* src_ptr,
-                             int source_stride,
+                             int src_stride,
                              const uint8_t* ref_ptr,
-                             int recon_stride,
+                             int ref_stride,
                              unsigned int* sse);
 #define vpx_mse8x8 vpx_mse8x8_sse2
 
@@ -5623,12 +5638,12 @@
 
 void vpx_sad16x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x16x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad16x16x4d vpx_sad16x16x4d_sse2
@@ -5673,12 +5688,12 @@
 
 void vpx_sad16x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad16x32x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad16x32x4d vpx_sad16x32x4d_sse2
@@ -5728,12 +5743,12 @@
 
 void vpx_sad16x8x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad16x8x4d_sse2(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 #define vpx_sad16x8x4d vpx_sad16x8x4d_sse2
@@ -5794,12 +5809,12 @@
 
 void vpx_sad32x16x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x16x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x16x4d vpx_sad32x16x4d_sse2
@@ -5844,22 +5859,22 @@
 
 void vpx_sad32x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x32x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 void vpx_sad32x32x4d_avx2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 RTCD_EXTERN void (*vpx_sad32x32x4d)(const uint8_t* src_ptr,
                                     int src_stride,
-                                    const uint8_t* const ref_ptr[],
+                                    const uint8_t* const ref_array[],
                                     int ref_stride,
                                     uint32_t* sad_array);
 
@@ -5903,12 +5918,12 @@
 
 void vpx_sad32x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad32x64x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad32x64x4d vpx_sad32x64x4d_sse2
@@ -5953,12 +5968,12 @@
 
 void vpx_sad4x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x4x4d_sse2(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad4x4x4d vpx_sad4x4x4d_sse2
@@ -6003,12 +6018,12 @@
 
 void vpx_sad4x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad4x8x4d_sse2(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad4x8x4d vpx_sad4x8x4d_sse2
@@ -6053,12 +6068,12 @@
 
 void vpx_sad64x32x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x32x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 #define vpx_sad64x32x4d vpx_sad64x32x4d_sse2
@@ -6103,22 +6118,22 @@
 
 void vpx_sad64x64x4d_c(const uint8_t* src_ptr,
                        int src_stride,
-                       const uint8_t* const ref_ptr[],
+                       const uint8_t* const ref_array[],
                        int ref_stride,
                        uint32_t* sad_array);
 void vpx_sad64x64x4d_sse2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 void vpx_sad64x64x4d_avx2(const uint8_t* src_ptr,
                           int src_stride,
-                          const uint8_t* const ref_ptr[],
+                          const uint8_t* const ref_array[],
                           int ref_stride,
                           uint32_t* sad_array);
 RTCD_EXTERN void (*vpx_sad64x64x4d)(const uint8_t* src_ptr,
                                     int src_stride,
-                                    const uint8_t* const ref_ptr[],
+                                    const uint8_t* const ref_array[],
                                     int ref_stride,
                                     uint32_t* sad_array);
 
@@ -6162,12 +6177,12 @@
 
 void vpx_sad8x16x4d_c(const uint8_t* src_ptr,
                       int src_stride,
-                      const uint8_t* const ref_ptr[],
+                      const uint8_t* const ref_array[],
                       int ref_stride,
                       uint32_t* sad_array);
 void vpx_sad8x16x4d_sse2(const uint8_t* src_ptr,
                          int src_stride,
-                         const uint8_t* const ref_ptr[],
+                         const uint8_t* const ref_array[],
                          int ref_stride,
                          uint32_t* sad_array);
 #define vpx_sad8x16x4d vpx_sad8x16x4d_sse2
@@ -6212,12 +6227,12 @@
 
 void vpx_sad8x4x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x4x4d_sse2(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad8x4x4d vpx_sad8x4x4d_sse2
@@ -6262,12 +6277,12 @@
 
 void vpx_sad8x8x4d_c(const uint8_t* src_ptr,
                      int src_stride,
-                     const uint8_t* const ref_ptr[],
+                     const uint8_t* const ref_array[],
                      int ref_stride,
                      uint32_t* sad_array);
 void vpx_sad8x8x4d_sse2(const uint8_t* src_ptr,
                         int src_stride,
-                        const uint8_t* const ref_ptr[],
+                        const uint8_t* const ref_array[],
                         int ref_stride,
                         uint32_t* sad_array);
 #define vpx_sad8x8x4d vpx_sad8x8x4d_sse2
@@ -6393,850 +6408,850 @@
 #define vpx_scaled_vert vpx_scaled_vert_c
 
 uint32_t vpx_sub_pixel_avg_variance16x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x16_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x16)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance16x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x32_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x32)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance16x8_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x8_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance16x8_ssse3(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance16x8)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance32x16_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x16_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x16_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x16)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance32x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x32_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x32_avx2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x32)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance32x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance32x64_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance32x64)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance4x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x4_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x4_ssse3(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x4)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance4x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance4x8_ssse3(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance4x8)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance64x32_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x32_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x32_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x32)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance64x64_c(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse,
                                            const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x64_sse2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x64_ssse3(const uint8_t* src_ptr,
-                                               int source_stride,
-                                               int xoffset,
-                                               int yoffset,
+                                               int src_stride,
+                                               int x_offset,
+                                               int y_offset,
                                                const uint8_t* ref_ptr,
                                                int ref_stride,
                                                uint32_t* sse,
                                                const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance64x64_avx2(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance64x64)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance8x16_c(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse,
                                           const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x16_sse2(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x16_ssse3(const uint8_t* src_ptr,
-                                              int source_stride,
-                                              int xoffset,
-                                              int yoffset,
+                                              int src_stride,
+                                              int x_offset,
+                                              int y_offset,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               uint32_t* sse,
                                               const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x16)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance8x4_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x4_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x4_ssse3(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x4)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_avg_variance8x8_c(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse,
                                          const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x8_sse2(const uint8_t* src_ptr,
-                                            int source_stride,
-                                            int xoffset,
-                                            int yoffset,
+                                            int src_stride,
+                                            int x_offset,
+                                            int y_offset,
                                             const uint8_t* ref_ptr,
                                             int ref_stride,
                                             uint32_t* sse,
                                             const uint8_t* second_pred);
 uint32_t vpx_sub_pixel_avg_variance8x8_ssse3(const uint8_t* src_ptr,
-                                             int source_stride,
-                                             int xoffset,
-                                             int yoffset,
+                                             int src_stride,
+                                             int x_offset,
+                                             int y_offset,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              uint32_t* sse,
                                              const uint8_t* second_pred);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_avg_variance8x8)(
     const uint8_t* src_ptr,
-    int source_stride,
-    int xoffset,
-    int yoffset,
+    int src_stride,
+    int x_offset,
+    int y_offset,
     const uint8_t* ref_ptr,
     int ref_stride,
     uint32_t* sse,
     const uint8_t* second_pred);
 
 uint32_t vpx_sub_pixel_variance16x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x16_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x16_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x16)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance16x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x32_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x32_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x32)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance16x8_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x8_sse2(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 uint32_t vpx_sub_pixel_variance16x8_ssse3(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance16x8)(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance32x16_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x16_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x16_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x16)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance32x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x32_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x32_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x32_avx2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x32)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance32x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x64_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance32x64_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance32x64)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance4x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x4_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x4_ssse3(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x4)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance4x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x8_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 uint32_t vpx_sub_pixel_variance4x8_ssse3(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance4x8)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance64x32_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x32_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x32_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x32)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance64x64_c(const uint8_t* src_ptr,
-                                       int source_stride,
-                                       int xoffset,
-                                       int yoffset,
+                                       int src_stride,
+                                       int x_offset,
+                                       int y_offset,
                                        const uint8_t* ref_ptr,
                                        int ref_stride,
                                        uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x64_sse2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x64_ssse3(const uint8_t* src_ptr,
-                                           int source_stride,
-                                           int xoffset,
-                                           int yoffset,
+                                           int src_stride,
+                                           int x_offset,
+                                           int y_offset,
                                            const uint8_t* ref_ptr,
                                            int ref_stride,
                                            uint32_t* sse);
 uint32_t vpx_sub_pixel_variance64x64_avx2(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance64x64)(const uint8_t* src_ptr,
-                                                    int source_stride,
-                                                    int xoffset,
-                                                    int yoffset,
+                                                    int src_stride,
+                                                    int x_offset,
+                                                    int y_offset,
                                                     const uint8_t* ref_ptr,
                                                     int ref_stride,
                                                     uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance8x16_c(const uint8_t* src_ptr,
-                                      int source_stride,
-                                      int xoffset,
-                                      int yoffset,
+                                      int src_stride,
+                                      int x_offset,
+                                      int y_offset,
                                       const uint8_t* ref_ptr,
                                       int ref_stride,
                                       uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x16_sse2(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x16_ssse3(const uint8_t* src_ptr,
-                                          int source_stride,
-                                          int xoffset,
-                                          int yoffset,
+                                          int src_stride,
+                                          int x_offset,
+                                          int y_offset,
                                           const uint8_t* ref_ptr,
                                           int ref_stride,
                                           uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x16)(const uint8_t* src_ptr,
-                                                   int source_stride,
-                                                   int xoffset,
-                                                   int yoffset,
+                                                   int src_stride,
+                                                   int x_offset,
+                                                   int y_offset,
                                                    const uint8_t* ref_ptr,
                                                    int ref_stride,
                                                    uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance8x4_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x4_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x4_ssse3(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x4)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
 
 uint32_t vpx_sub_pixel_variance8x8_c(const uint8_t* src_ptr,
-                                     int source_stride,
-                                     int xoffset,
-                                     int yoffset,
+                                     int src_stride,
+                                     int x_offset,
+                                     int y_offset,
                                      const uint8_t* ref_ptr,
                                      int ref_stride,
                                      uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x8_sse2(const uint8_t* src_ptr,
-                                        int source_stride,
-                                        int xoffset,
-                                        int yoffset,
+                                        int src_stride,
+                                        int x_offset,
+                                        int y_offset,
                                         const uint8_t* ref_ptr,
                                         int ref_stride,
                                         uint32_t* sse);
 uint32_t vpx_sub_pixel_variance8x8_ssse3(const uint8_t* src_ptr,
-                                         int source_stride,
-                                         int xoffset,
-                                         int yoffset,
+                                         int src_stride,
+                                         int x_offset,
+                                         int y_offset,
                                          const uint8_t* ref_ptr,
                                          int ref_stride,
                                          uint32_t* sse);
 RTCD_EXTERN uint32_t (*vpx_sub_pixel_variance8x8)(const uint8_t* src_ptr,
-                                                  int source_stride,
-                                                  int xoffset,
-                                                  int yoffset,
+                                                  int src_stride,
+                                                  int x_offset,
+                                                  int y_offset,
                                                   const uint8_t* ref_ptr,
                                                   int ref_stride,
                                                   uint32_t* sse);
@@ -7264,315 +7279,315 @@
 #define vpx_sum_squares_2d_i16 vpx_sum_squares_2d_i16_sse2
 
 void vpx_tm_predictor_16x16_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_16x16_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_tm_predictor_16x16 vpx_tm_predictor_16x16_sse2
 
 void vpx_tm_predictor_32x32_c(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 void vpx_tm_predictor_32x32_sse2(uint8_t* dst,
-                                 ptrdiff_t y_stride,
+                                 ptrdiff_t stride,
                                  const uint8_t* above,
                                  const uint8_t* left);
 #define vpx_tm_predictor_32x32 vpx_tm_predictor_32x32_sse2
 
 void vpx_tm_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_4x4_sse2(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_tm_predictor_4x4 vpx_tm_predictor_4x4_sse2
 
 void vpx_tm_predictor_8x8_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 void vpx_tm_predictor_8x8_sse2(uint8_t* dst,
-                               ptrdiff_t y_stride,
+                               ptrdiff_t stride,
                                const uint8_t* above,
                                const uint8_t* left);
 #define vpx_tm_predictor_8x8 vpx_tm_predictor_8x8_sse2
 
 void vpx_v_predictor_16x16_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_16x16_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_v_predictor_16x16 vpx_v_predictor_16x16_sse2
 
 void vpx_v_predictor_32x32_c(uint8_t* dst,
-                             ptrdiff_t y_stride,
+                             ptrdiff_t stride,
                              const uint8_t* above,
                              const uint8_t* left);
 void vpx_v_predictor_32x32_sse2(uint8_t* dst,
-                                ptrdiff_t y_stride,
+                                ptrdiff_t stride,
                                 const uint8_t* above,
                                 const uint8_t* left);
 #define vpx_v_predictor_32x32 vpx_v_predictor_32x32_sse2
 
 void vpx_v_predictor_4x4_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_4x4_sse2(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_v_predictor_4x4 vpx_v_predictor_4x4_sse2
 
 void vpx_v_predictor_8x8_c(uint8_t* dst,
-                           ptrdiff_t y_stride,
+                           ptrdiff_t stride,
                            const uint8_t* above,
                            const uint8_t* left);
 void vpx_v_predictor_8x8_sse2(uint8_t* dst,
-                              ptrdiff_t y_stride,
+                              ptrdiff_t stride,
                               const uint8_t* above,
                               const uint8_t* left);
 #define vpx_v_predictor_8x8 vpx_v_predictor_8x8_sse2
 
 unsigned int vpx_variance16x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x16_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance16x16_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance16x16)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance16x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance16x32_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance16x32_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance16x32)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance16x8_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance16x8_sse2(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 unsigned int vpx_variance16x8_avx2(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance16x8)(const uint8_t* src_ptr,
-                                             int source_stride,
+                                             int src_stride,
                                              const uint8_t* ref_ptr,
                                              int ref_stride,
                                              unsigned int* sse);
 
 unsigned int vpx_variance32x16_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x16_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance32x16_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance32x16)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance32x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x32_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance32x32_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance32x32)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance32x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance32x64_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance32x64_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance32x64)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance4x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x4_sse2(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance4x4 vpx_variance4x4_sse2
 
 unsigned int vpx_variance4x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance4x8_sse2(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance4x8 vpx_variance4x8_sse2
 
 unsigned int vpx_variance64x32_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x32_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance64x32_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance64x32)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance64x64_c(const uint8_t* src_ptr,
-                                 int source_stride,
+                                 int src_stride,
                                  const uint8_t* ref_ptr,
                                  int ref_stride,
                                  unsigned int* sse);
 unsigned int vpx_variance64x64_sse2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 unsigned int vpx_variance64x64_avx2(const uint8_t* src_ptr,
-                                    int source_stride,
+                                    int src_stride,
                                     const uint8_t* ref_ptr,
                                     int ref_stride,
                                     unsigned int* sse);
 RTCD_EXTERN unsigned int (*vpx_variance64x64)(const uint8_t* src_ptr,
-                                              int source_stride,
+                                              int src_stride,
                                               const uint8_t* ref_ptr,
                                               int ref_stride,
                                               unsigned int* sse);
 
 unsigned int vpx_variance8x16_c(const uint8_t* src_ptr,
-                                int source_stride,
+                                int src_stride,
                                 const uint8_t* ref_ptr,
                                 int ref_stride,
                                 unsigned int* sse);
 unsigned int vpx_variance8x16_sse2(const uint8_t* src_ptr,
-                                   int source_stride,
+                                   int src_stride,
                                    const uint8_t* ref_ptr,
                                    int ref_stride,
                                    unsigned int* sse);
 #define vpx_variance8x16 vpx_variance8x16_sse2
 
 unsigned int vpx_variance8x4_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x4_sse2(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance8x4 vpx_variance8x4_sse2
 
 unsigned int vpx_variance8x8_c(const uint8_t* src_ptr,
-                               int source_stride,
+                               int src_stride,
                                const uint8_t* ref_ptr,
                                int ref_stride,
                                unsigned int* sse);
 unsigned int vpx_variance8x8_sse2(const uint8_t* src_ptr,
-                                  int source_stride,
+                                  int src_stride,
                                   const uint8_t* ref_ptr,
                                   int ref_stride,
                                   unsigned int* sse);
 #define vpx_variance8x8 vpx_variance8x8_sse2
 
 void vpx_ve_predictor_4x4_c(uint8_t* dst,
-                            ptrdiff_t y_stride,
+                            ptrdiff_t stride,
                             const uint8_t* above,
                             const uint8_t* left);
 #define vpx_ve_predictor_4x4 vpx_ve_predictor_4x4_c
diff --git a/third_party/microsoft_webauthn/.gitignore b/third_party/microsoft_webauthn/.gitignore
new file mode 100644
index 0000000..3e759b7
--- /dev/null
+++ b/third_party/microsoft_webauthn/.gitignore
@@ -0,0 +1,330 @@
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+##
+## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
+
+# User-specific files
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
+
+# Visual Studio 2015/2017 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# Visual Studio 2017 auto generated files
+Generated\ Files/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUNIT
+*.VisualState.xml
+TestResult.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# Benchmark Results
+BenchmarkDotNet.Artifacts/
+
+# .NET Core
+project.lock.json
+project.fragment.lock.json
+artifacts/
+**/Properties/launchSettings.json
+
+# StyleCop
+StyleCopReport.xml
+
+# Files built by Visual Studio
+*_i.c
+*_p.c
+*_i.h
+*.ilk
+*.meta
+*.obj
+*.iobj
+*.pch
+*.pdb
+*.ipdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# Visual Studio Trace Files
+*.e2e
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding add-in
+.JustCode
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# AxoCover is a Code Coverage Tool
+.axoCover/*
+!.axoCover/settings.json
+
+# Visual Studio code coverage results
+*.coverage
+*.coveragexml
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# Note: Comment the next line if you want to checkin your web deploy settings,
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# The packages folder can be ignored because of Package Restore
+**/[Pp]ackages/*
+# except build/, which is used as an MSBuild target.
+!**/[Pp]ackages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/[Pp]ackages/repositories.config
+# NuGet v3's project.json files produces more ignorable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+*.appx
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.jfm
+*.pfx
+*.publishsettings
+orleans.codegen.cs
+
+# Including strong name files can present a security risk 
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
+#*.snk
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+ServiceFabricBackup/
+*.rptproj.bak
+
+# SQL Server files
+*.mdf
+*.ldf
+*.ndf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+*.rptproj.rsuser
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+node_modules/
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
+*.vbw
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# JetBrains Rider
+.idea/
+*.sln.iml
+
+# CodeRush
+.cr/
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
+
+# Cake - Uncomment if you are using it
+# tools/**
+# !tools/packages.config
+
+# Tabs Studio
+*.tss
+
+# Telerik's JustMock configuration file
+*.jmconfig
+
+# BizTalk build output
+*.btp.cs
+*.btm.cs
+*.odx.cs
+*.xsd.cs
+
+# OpenCover UI analysis results
+OpenCover/
+
+# Azure Stream Analytics local run output 
+ASALocalRun/
+
+# MSBuild Binary and Structured Log
+*.binlog
+
+# NVidia Nsight GPU debugger configuration file
+*.nvuser
+
+# MFractors (Xamarin productivity tool) working folder 
+.mfractor/
diff --git a/third_party/microsoft_webauthn/LICENSE b/third_party/microsoft_webauthn/LICENSE
new file mode 100644
index 0000000..2107107
--- /dev/null
+++ b/third_party/microsoft_webauthn/LICENSE
@@ -0,0 +1,21 @@
+    MIT License
+
+    Copyright (c) Microsoft Corporation. All rights reserved.
+
+    Permission is hereby granted, free of charge, to any person obtaining a copy
+    of this software and associated documentation files (the "Software"), to deal
+    in the Software without restriction, including without limitation the rights
+    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+    copies of the Software, and to permit persons to whom the Software is
+    furnished to do so, subject to the following conditions:
+
+    The above copyright notice and this permission notice shall be included in all
+    copies or substantial portions of the Software.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+    SOFTWARE
diff --git a/third_party/microsoft_webauthn/OWNERS b/third_party/microsoft_webauthn/OWNERS
new file mode 100644
index 0000000..dd5ad77
--- /dev/null
+++ b/third_party/microsoft_webauthn/OWNERS
@@ -0,0 +1 @@
+file://device/fido/OWNERS
diff --git a/third_party/microsoft_webauthn/README.chromium b/third_party/microsoft_webauthn/README.chromium
new file mode 100644
index 0000000..25a2d710
--- /dev/null
+++ b/third_party/microsoft_webauthn/README.chromium
@@ -0,0 +1,18 @@
+Name: Headers for the Windows 10 WebAuthn API (webauthn.dll)
+Short Name: Windows webauthn.h
+URL: https://github.com/Microsoft/webauthn/
+Version: 0
+Revision: 72ffeb914cba9fc5363b116f0ce7febc9d81e7d9
+License: MIT
+License File: LICENSE
+Security Critical: no
+
+Description:
+This project contains a header file (webauthn.h) for the native Windows 10
+WebAuthn API (webauthn.dll). While the API is already shipping with Windows 10
+Insider Preview builds (as of November 2018), the corresponding header file has
+not yet been released into a Windows SDK that Chromium can depend on. We
+therefore include the header via this open source repository for the time
+being.
+
+Local Modifications: none
diff --git a/third_party/microsoft_webauthn/README.md b/third_party/microsoft_webauthn/README.md
new file mode 100644
index 0000000..a802c2d
--- /dev/null
+++ b/third_party/microsoft_webauthn/README.md
@@ -0,0 +1,26 @@
+# Description
+
+This project includes Win32 headers for communicating to Windows Hello and external secruity keys as part of WebAuthN and CTAP specification.
+
+For more details about the standards, please follow these links:
+* WebAuthN: https://w3c.github.io/webauthn/
+* CTAP: https://fidoalliance.org/specs/fido-v2.0-id-20180227/fido-client-to-authenticator-protocol-v2.0-id-20180227.html
+
+
+# Having Issues?
+If you have any issues in adopting these APIs or need some clarification, please contact [FIDO OS Security Group](FIDOSEC@microsoft.com)
+
+
+# Contributing
+
+This project welcomes contributions and suggestions.  Most contributions require you to agree to a
+Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
+the rights to use your contribution. For details, visit https://cla.microsoft.com.
+
+When you submit a pull request, a CLA-bot will automatically determine whether you need to provide
+a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions
+provided by the bot. You will only need to do this once across all repos using our CLA.
+
+This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
+For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
+contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
diff --git a/third_party/microsoft_webauthn/webauthn.h b/third_party/microsoft_webauthn/webauthn.h
new file mode 100644
index 0000000..0374f6d
--- /dev/null
+++ b/third_party/microsoft_webauthn/webauthn.h
@@ -0,0 +1,553 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+#pragma once
+
+#include <winapifamily.h>
+
+#pragma region Desktop Family or OneCore Family
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP | WINAPI_PARTITION_SYSTEM)
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef WINAPI
+#define WINAPI __stdcall
+#endif
+
+#ifndef INITGUID
+#define INITGUID
+#include <guiddef.h>
+#undef INITGUID
+#else
+#include <guiddef.h>
+#endif
+
+//+------------------------------------------------------------------------------------------
+// Information about an RP Entity
+//-------------------------------------------------------------------------------------------
+
+#define WEBAUTHN_RP_ENTITY_INFORMATION_CURRENT_VERSION          1
+
+typedef struct _WEBAUTHN_RP_ENTITY_INFORMATION {
+    // Version of this structure, to allow for modifications in the future.
+    // This field is required and should be set to CURRENT_VERSION above.
+    DWORD dwVersion;
+
+    // Identifier for the RP. This field is required.
+    PCWSTR pwszId;
+
+    // Contains the friendly name of the Relying Party, such as "Acme Corporation", "Widgets Inc" or "Awesome Site".
+    // This field is required.
+    PCWSTR pwszName;
+
+    // Optional URL pointing to RP's logo. 
+    PCWSTR pwszIcon;
+} WEBAUTHN_RP_ENTITY_INFORMATION, *PWEBAUTHN_RP_ENTITY_INFORMATION;
+typedef const WEBAUTHN_RP_ENTITY_INFORMATION *PCWEBAUTHN_RP_ENTITY_INFORMATION;
+
+//+------------------------------------------------------------------------------------------
+// Information about an User Entity
+//-------------------------------------------------------------------------------------------
+#define WEBAUTHN_MAX_USER_ID_LENGTH                             64
+
+#define WEBAUTHN_USER_ENTITY_INFORMATION_CURRENT_VERSION        1
+
+typedef struct _WEBAUTHN_USER_ENTITY_INFORMATION {
+    // Version of this structure, to allow for modifications in the future.
+    // This field is required and should be set to CURRENT_VERSION above.
+    DWORD dwVersion;
+
+    // Identifier for the User. This field is required.
+    DWORD cbId;
+    _Field_size_bytes_(cbId)
+    PBYTE pbId;
+
+    // Contains a detailed name for this account, such as "john.p.smith@example.com".
+    PCWSTR pwszName;
+
+    // Optional URL that can be used to retrieve an image containing the user's current avatar,
+    // or a data URI that contains the image data.
+    PCWSTR pwszIcon;
+
+    // For User: Contains the friendly name associated with the user account by the Relying Party, such as "John P. Smith".
+    PCWSTR pwszDisplayName;
+} WEBAUTHN_USER_ENTITY_INFORMATION, *PWEBAUTHN_USER_ENTITY_INFORMATION;
+typedef const WEBAUTHN_USER_ENTITY_INFORMATION *PCWEBAUTHN_USER_ENTITY_INFORMATION;
+
+//+------------------------------------------------------------------------------------------
+// Information about client data.
+//-------------------------------------------------------------------------------------------
+
+#define WEBAUTHN_HASH_ALGORITHM_SHA_256                         L"SHA-256"
+#define WEBAUTHN_HASH_ALGORITHM_SHA_384                         L"SHA-384"
+#define WEBAUTHN_HASH_ALGORITHM_SHA_512                         L"SHA-512"
+
+#define WEBAUTHN_CLIENT_DATA_CURRENT_VERSION                    1
+
+typedef struct _WEBAUTHN_CLIENT_DATA {
+    // Version of this structure, to allow for modifications in the future.
+    // This field is required and should be set to CURRENT_VERSION above.
+    DWORD dwVersion;
+
+    // Size of the pbClientDataJSON field.
+    DWORD cbClientDataJSON;
+    // UTF-8 encoded JSON serialization of the client data.
+    _Field_size_bytes_(cbClientDataJSON)
+    PBYTE pbClientDataJSON;
+
+    // Hash algorithm ID used to hash the pbClientDataJSON field.
+    LPCWSTR pwszHashAlgId;
+} WEBAUTHN_CLIENT_DATA, *PWEBAUTHN_CLIENT_DATA;
+typedef const WEBAUTHN_CLIENT_DATA *PCWEBAUTHN_CLIENT_DATA;
+
+//+------------------------------------------------------------------------------------------
+// Information about credential parameters.
+//-------------------------------------------------------------------------------------------
+
+#define WEBAUTHN_CREDENTIAL_TYPE_PUBLIC_KEY                         L"public-key"
+
+#define WEBAUTHN_COSE_ALGORITHM_ECDSA_P256_WITH_SHA256             -7
+#define WEBAUTHN_COSE_ALGORITHM_ECDSA_P384_WITH_SHA384             -35
+#define WEBAUTHN_COSE_ALGORITHM_ECDSA_P521_WITH_SHA512             -36
+
+#define WEBAUTHN_COSE_ALGORITHM_RSASSA_PKCS1_V1_5_WITH_SHA256      -257
+#define WEBAUTHN_COSE_ALGORITHM_RSASSA_PKCS1_V1_5_WITH_SHA384      -258
+#define WEBAUTHN_COSE_ALGORITHM_RSASSA_PKCS1_V1_5_WITH_SHA512      -259
+
+#define WEBAUTHN_COSE_ALGORITHM_RSA_PSS_WITH_SHA256                -37
+#define WEBAUTHN_COSE_ALGORITHM_RSA_PSS_WITH_SHA384                -38
+#define WEBAUTHN_COSE_ALGORITHM_RSA_PSS_WITH_SHA512                -39
+
+#define WEBAUTHN_COSE_CREDENTIAL_PARAMETER_CURRENT_VERSION          1
+
+typedef struct _WEBAUTHN_COSE_CREDENTIAL_PARAMETER {
+    // Version of this structure, to allow for modifications in the future.
+    DWORD dwVersion;
+
+    // Well-known credential type specifying a credential to create.
+    LPCWSTR pwszCredentialType;
+
+    // Well-known COSE algorithm specifying the algorithm to use for the credential.
+    LONG lAlg;
+} WEBAUTHN_COSE_CREDENTIAL_PARAMETER, *PWEBAUTHN_COSE_CREDENTIAL_PARAMETER;
+typedef const WEBAUTHN_COSE_CREDENTIAL_PARAMETER *PCWEBAUTHN_COSE_CREDENTIAL_PARAMETER;
+
+typedef struct _WEBAUTHN_COSE_CREDENTIAL_PARAMETERS {
+    DWORD cCredentialParameters;
+    _Field_size_(cCredentialParameters)
+    PWEBAUTHN_COSE_CREDENTIAL_PARAMETER pCredentialParameters;
+} WEBAUTHN_COSE_CREDENTIAL_PARAMETERS, *PWEBAUTHN_COSE_CREDENTIAL_PARAMETERS;
+typedef const WEBAUTHN_COSE_CREDENTIAL_PARAMETERS *PCWEBAUTHN_COSE_CREDENTIAL_PARAMETERS;
+
+//+------------------------------------------------------------------------------------------
+// Information about credential.
+//-------------------------------------------------------------------------------------------
+#define WEBAUTHN_CREDENTIAL_CURRENT_VERSION                         1
+
+typedef struct _WEBAUTHN_CREDENTIAL {
+    // Version of this structure, to allow for modifications in the future.
+    DWORD dwVersion;
+
+    // Size of pbID.
+    DWORD cbId;
+    // Unique ID for this particular credential.
+    _Field_size_bytes_(cbId)
+    PBYTE pbId;
+
+    // Well-known credential type specifying what this particular credential is.
+    LPCWSTR pwszCredentialType;
+} WEBAUTHN_CREDENTIAL, *PWEBAUTHN_CREDENTIAL;
+typedef const WEBAUTHN_CREDENTIAL *PCWEBAUTHN_CREDENTIAL;
+
+typedef struct _WEBAUTHN_CREDENTIALS {
+    DWORD cCredentials;
+    _Field_size_(cCredentials)
+    PWEBAUTHN_CREDENTIAL pCredentials;
+} WEBAUTHN_CREDENTIALS, *PWEBAUTHN_CREDENTIALS;
+typedef const WEBAUTHN_CREDENTIALS *PCWEBAUTHN_CREDENTIALS;
+
+//+------------------------------------------------------------------------------------------
+// Hmac-Secret extension
+//-------------------------------------------------------------------------------------------
+
+#define WEBAUTHN_EXTENSIONS_IDENTIFIER_HMAC_SECRET                  L"hmac-secret"
+// Below type definitions is for WEBAUTHN_EXTENSIONS_IDENTIFIER_HMAC_SECRET
+// MakeCredential Input Type:   BOOL.
+//      - pvExtension must point to a BOOL with the value TRUE.
+//      - cbExtension must contain the sizeof(BOOL).
+// MakeCredential Output Type:  BOOL.
+//      - pvExtension will point to a BOOL with the value TRUE if credential
+//        was successfully created with HMAC_SECRET.
+//      - cbExtension will contain the sizeof(BOOL).
+// GetAssertion Input Type:     Not Supported
+// GetAssertion Output Type:    Not Supported
+
+//+------------------------------------------------------------------------------------------
+// Information about Extensions.
+//-------------------------------------------------------------------------------------------
+typedef struct _WEBAUTHN_EXTENSION {
+    LPCWSTR pwszExtensionIdentifier;
+    DWORD cbExtension;
+    PVOID pvExtension;
+} WEBAUTHN_EXTENSION, *PWEBAUTHN_EXTENSION;
+typedef const WEBAUTHN_EXTENSION *PCWEBAUTHN_EXTENSION;
+
+typedef struct _WEBAUTHN_EXTENSIONS {
+    DWORD cExtensions;
+    _Field_size_(cExtensions)
+    PWEBAUTHN_EXTENSION pExtensions;
+} WEBAUTHN_EXTENSIONS, *PWEBAUTHN_EXTENSIONS;
+typedef const WEBAUTHN_EXTENSIONS *PCWEBAUTHN_EXTENSIONS;
+
+//+------------------------------------------------------------------------------------------
+// Options.
+//-------------------------------------------------------------------------------------------
+
+#define WEBAUTHN_AUTHENTICATOR_ATTACHMENT_ANY                               0
+#define WEBAUTHN_AUTHENTICATOR_ATTACHMENT_PLATFORM                          1
+#define WEBAUTHN_AUTHENTICATOR_ATTACHMENT_CROSS_PLATFORM                    2
+#define WEBAUTHN_AUTHENTICATOR_ATTACHMENT_CROSS_PLATFORM_U2F_V2             3
+
+#define WEBAUTHN_USER_VERIFICATION_REQUIREMENT_ANY                          0
+#define WEBAUTHN_USER_VERIFICATION_REQUIREMENT_REQUIRED                     1
+#define WEBAUTHN_USER_VERIFICATION_REQUIREMENT_PREFERRED                    2
+#define WEBAUTHN_USER_VERIFICATION_REQUIREMENT_DISCOURAGED                  3
+
+#define WEBAUTHN_ATTESTATION_CONVEYANCE_PREFERENCE_ANY                      0
+#define WEBAUTHN_ATTESTATION_CONVEYANCE_PREFERENCE_NONE                     1
+#define WEBAUTHN_ATTESTATION_CONVEYANCE_PREFERENCE_INDIRECT                 2
+#define WEBAUTHN_ATTESTATION_CONVEYANCE_PREFERENCE_DIRECT                   3
+
+#define WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS_VERSION_1            1
+#define WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS_VERSION_2            2
+#define WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS_CURRENT_VERSION      WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS_VERSION_2
+
+typedef struct _WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS {
+    // Version of this structure, to allow for modifications in the future.
+    DWORD dwVersion;
+
+    // Time that the operation is expected to complete within.
+    // This is used as guidance, and can be overridden by the platform.
+    DWORD dwTimeoutMilliseconds;
+
+    // Credentials used for exclusion.
+    WEBAUTHN_CREDENTIALS CredentialList;
+
+    // Optional extensions to parse when performing the operation.
+    WEBAUTHN_EXTENSIONS Extensions;
+
+    // Optional. Platform vs Cross-Platform Authenticators.
+    DWORD dwAuthenticatorAttachment;
+
+    // Optional. Require key to be resident or not. Defaulting to FALSE;
+    BOOL bRequireResidentKey;
+
+    // User Verification Requirement.
+    DWORD dwUserVerificationRequirement;
+
+    // Attestation Conveyance Preference.
+    DWORD dwAttestationConveyancePreference;
+
+    // Reserved for future Use
+    DWORD dwFlags;
+
+    //
+    // The following fields have been added in WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS_VERSION_2
+    //
+
+    // Cancellation Id - Optional - See WebAuthNGetCancellationId
+    GUID *pCancellationId;
+
+} WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS, *PWEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS;
+typedef const WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS *PCWEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS;
+
+
+#define WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS_VERSION_1          1
+#define WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS_VERSION_2          2
+#define WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS_VERSION_3          3
+#define WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS_CURRENT_VERSION    WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS_VERSION_3
+
+typedef struct _WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS {
+    // Version of this structure, to allow for modifications in the future.
+    DWORD dwVersion;
+
+    // Time that the operation is expected to complete within.
+    // This is used as guidance, and can be overridden by the platform.
+    DWORD dwTimeoutMilliseconds;
+
+    // Allowed Credentials List.
+    WEBAUTHN_CREDENTIALS CredentialList;
+
+    // Optional extensions to parse when performing the operation.
+    WEBAUTHN_EXTENSIONS Extensions;
+
+    // Optional. Platform vs Cross-Platform Authenticators.
+    DWORD dwAuthenticatorAttachment;
+
+    // User Verification Requirement.
+    DWORD dwUserVerificationRequirement;
+
+    // Reserved for future Use
+    DWORD dwFlags;
+
+    //
+    // The following fields have been added in WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS_VERSION_2
+    //
+
+    // Optional identifier for the U2F AppId. Converted to UTF8 before being hashed. Not lower cased.
+    PCWSTR pwszU2fAppId;
+
+    // If the following is non-NULL, then, set to TRUE if the above pwszU2fAppid was used instead of
+    // PCWSTR pwszRpId;
+    BOOL *pbU2fAppId;
+
+    //
+    // The following fields have been added in WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS_VERSION_3
+    //
+
+    // Cancellation Id - Optional - See WebAuthNGetCancellationId
+    GUID *pCancellationId;
+
+} WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS,  *PWEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS;
+typedef const WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS  *PCWEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS;
+
+
+//+------------------------------------------------------------------------------------------
+// Attestation Info.
+//
+//-------------------------------------------------------------------------------------------
+#define WEBAUTHN_ATTESTATION_DECODE_NONE                                0
+#define WEBAUTHN_ATTESTATION_DECODE_COMMON                              1
+// WEBAUTHN_ATTESTATION_DECODE_COMMON supports format types
+//  L"packed"
+//  L"fido-u2f"
+
+#define WEBAUTHN_ATTESTATION_VER_TPM_2_0   L"2.0"
+
+typedef struct _WEBAUTHN_X5C {
+    // Length of X.509 encoded certificate
+    DWORD cbData;
+    // X.509 encoded certificate bytes
+    _Field_size_bytes_(cbData)
+    PBYTE pbData;
+} WEBAUTHN_X5C, *PWEBAUTHN_X5C;
+
+// Supports either Self or Full Basic Attestation
+
+// Note, new fields will be added to the following data structure to
+// support additional attestation format types, such as, TPM.
+// When fields are added, the dwVersion will be incremented.
+//
+// Therefore, your code must make the following check:
+//  "if (dwVersion >= WEBAUTHN_COMMON_ATTESTATION_CURRENT_VERSION)"
+
+#define WEBAUTHN_COMMON_ATTESTATION_CURRENT_VERSION                     1
+
+typedef struct _WEBAUTHN_COMMON_ATTESTATION {
+    // Version of this structure, to allow for modifications in the future.
+    DWORD dwVersion;
+
+    // Hash and Padding Algorithm
+    //
+    // The following won't be set for "fido-u2f" which assumes "ES256".
+    PCWSTR pwszAlg;
+    LONG lAlg;      // COSE algorithm
+
+    // Signature that was generated for this attestation.
+    DWORD cbSignature;
+    _Field_size_bytes_(cbSignature)
+    PBYTE pbSignature;
+
+    // Following is set for Full Basic Attestation. If not, set then, this is Self Attestation.
+    // Array of X.509 DER encoded certificates. The first certificate is the signer, leaf certificate.
+    DWORD cX5c;
+    _Field_size_(cX5c)
+    PWEBAUTHN_X5C pX5c;
+
+    // Following are also set for tpm
+    PCWSTR pwszVer; // L"2.0"
+    DWORD cbCertInfo;
+    _Field_size_bytes_(cbCertInfo)
+    PBYTE pbCertInfo;
+    DWORD cbPubArea;
+    _Field_size_bytes_(cbPubArea)
+    PBYTE pbPubArea;
+} WEBAUTHN_COMMON_ATTESTATION, *PWEBAUTHN_COMMON_ATTESTATION;
+typedef const WEBAUTHN_COMMON_ATTESTATION *PCWEBAUTHN_COMMON_ATTESTATION;
+
+#define WEBAUTHN_ATTESTATION_TYPE_PACKED                                L"packed"
+#define WEBAUTHN_ATTESTATION_TYPE_U2F                                   L"fido-u2f"
+#define WEBAUTHN_ATTESTATION_TYPE_TPM                                   L"tpm"
+#define WEBAUTHN_ATTESTATION_TYPE_NONE                                  L"none"
+
+#define WEBAUTHN_CREDENTIAL_ATTESTATION_VERSION_1               1
+#define WEBAUTHN_CREDENTIAL_ATTESTATION_VERSION_2               2
+#define WEBAUTHN_CREDENTIAL_ATTESTATION_CURRENT_VERSION         WEBAUTHN_CREDENTIAL_ATTESTATION_VERSION_2
+
+typedef struct _WEBAUTHN_CREDENTIAL_ATTESTATION {
+    // Version of this structure, to allow for modifications in the future.
+    DWORD dwVersion;
+
+    // Attestation format type
+    PCWSTR pwszFormatType;
+
+    // Size of cbAuthenticatorData.
+    DWORD cbAuthenticatorData;
+    // Authenticator data that was created for this credential.
+    _Field_size_bytes_(cbAuthenticatorData)
+    PBYTE pbAuthenticatorData;
+
+    // Size of CBOR encoded attestation information
+    //0 => encoded as CBOR null value.
+    DWORD cbAttestation;
+    //Encoded CBOR attestation information
+    _Field_size_bytes_(cbAttestation)
+    PBYTE pbAttestation;
+
+    DWORD dwAttestationDecodeType;
+    // Following depends on the dwAttestationDecodeType
+    //  WEBAUTHN_ATTESTATION_DECODE_NONE
+    //      NULL - not able to decode the CBOR attestation information
+    //  WEBAUTHN_ATTESTATION_DECODE_COMMON
+    //      PWEBAUTHN_COMMON_ATTESTATION;
+    PVOID pvAttestationDecode;
+
+    // The CBOR encoded Attestation Object to be returned to the RP.
+    DWORD cbAttestationObject;
+    _Field_size_bytes_(cbAttestationObject)
+    PBYTE pbAttestationObject;
+
+    // The CredentialId bytes extracted from the Authenticator Data.
+    // Used by Edge to return to the RP.
+    DWORD cbCredentialId;
+    _Field_size_bytes_(cbCredentialId)
+    PBYTE pbCredentialId;
+
+    //
+    // Following fields have been added in WEBAUTHN_CREDENTIAL_ATTESTATION_VERSION_2
+    //
+
+    WEBAUTHN_EXTENSIONS Extensions;
+
+} WEBAUTHN_CREDENTIAL_ATTESTATION, *PWEBAUTHN_CREDENTIAL_ATTESTATION;
+typedef const WEBAUTHN_CREDENTIAL_ATTESTATION *PCWEBAUTHN_CREDENTIAL_ATTESTATION;
+
+
+//+------------------------------------------------------------------------------------------
+// authenticatorGetAssertion output.
+//-------------------------------------------------------------------------------------------
+
+#define WEBAUTHN_ASSERTION_CURRENT_VERSION                              1
+
+typedef struct _WEBAUTHN_ASSERTION {
+    // Version of this structure, to allow for modifications in the future.
+    DWORD dwVersion;
+
+    // Size of cbAuthenticatorData.
+    DWORD cbAuthenticatorData;
+    // Authenticator data that was created for this assertion.
+    _Field_size_bytes_(cbAuthenticatorData)
+    PBYTE pbAuthenticatorData;
+
+    // Size of pbSignature.
+    DWORD cbSignature;
+    // Signature that was generated for this assertion.
+    _Field_size_bytes_(cbSignature)
+    PBYTE pbSignature;
+
+    // Credential that was used for this assertion.
+    WEBAUTHN_CREDENTIAL Credential;
+
+    // Size of User Id
+    DWORD cbUserId;
+    // UserId
+    _Field_size_bytes_(cbUserId)
+    PBYTE pbUserId;
+} WEBAUTHN_ASSERTION, *PWEBAUTHN_ASSERTION;
+typedef const WEBAUTHN_ASSERTION *PCWEBAUTHN_ASSERTION;
+
+//+------------------------------------------------------------------------------------------
+// APIs.
+//-------------------------------------------------------------------------------------------
+
+HRESULT
+WINAPI
+WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable(
+    _Out_ BOOL *pbIsUserVerifyingPlatformAuthenticatorAvailable);
+
+
+HRESULT
+WINAPI
+WebAuthNAuthenticatorMakeCredential(
+    _In_        HWND                                                hWnd,
+    _In_        PCWEBAUTHN_RP_ENTITY_INFORMATION                    pRpInformation,
+    _In_        PCWEBAUTHN_USER_ENTITY_INFORMATION                  pUserInformation,
+    _In_        PCWEBAUTHN_COSE_CREDENTIAL_PARAMETERS               pPubKeyCredParams,
+    _In_        PCWEBAUTHN_CLIENT_DATA                              pWebAuthNClientData,
+    _In_opt_    PCWEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS    pWebAuthNMakeCredentialOptions,
+    _Outptr_result_maybenull_ PWEBAUTHN_CREDENTIAL_ATTESTATION      *ppWebAuthNCredentialAttestation);
+
+
+HRESULT
+WINAPI
+WebAuthNAuthenticatorGetAssertion(
+    _In_        HWND                                                hWnd,
+    _In_        LPCWSTR                                             pwszRpId,
+    _In_        PCWEBAUTHN_CLIENT_DATA                              pWebAuthNClientData,
+    _In_opt_    PCWEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS      pWebAuthNGetAssertionOptions,
+    _Outptr_result_maybenull_ PWEBAUTHN_ASSERTION                   *ppWebAuthNAssertion);
+
+void
+WINAPI
+WebAuthNFreeCredentialAttestation(
+    _In_opt_ PWEBAUTHN_CREDENTIAL_ATTESTATION pWebAuthNCredentialAttestation);
+
+void
+WINAPI
+WebAuthNFreeAssertion(
+    _In_ PWEBAUTHN_ASSERTION pWebAuthNAssertion);
+
+HRESULT
+WINAPI
+WebAuthNGetCancellationId(
+    _Out_ GUID* pCancellationId);
+
+HRESULT
+WINAPI
+WebAuthNCancelCurrentOperation(
+    _In_ const GUID* pCancellationId);
+
+//
+// Returns the following Error Names:
+//  L"Success"              - S_OK
+//  L"InvalidStateError"    - NTE_EXISTS
+//  L"ConstraintError"      - HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED),
+//                            NTE_NOT_SUPPORTED,
+//                            NTE_TOKEN_KEYSET_STORAGE_FULL
+//  L"NotSupportedError"    - NTE_INVALID_PARAMETER
+//  L"NotAllowedError"      - NTE_DEVICE_NOT_FOUND,
+//                            NTE_NOT_FOUND,
+//                            HRESULT_FROM_WIN32(ERROR_CANCELLED),
+//                            NTE_USER_CANCELLED,
+//                            HRESULT_FROM_WIN32(ERROR_TIMEOUT)
+//  L"UnknownError"         - All other hr values
+//
+PCWSTR
+WINAPI
+WebAuthNGetErrorName(
+    _In_ HRESULT hr);
+
+HRESULT
+WINAPI
+WebAuthNGetW3CExceptionDOMError(
+    _In_ HRESULT hr);
+
+
+#ifdef __cplusplus
+}       // Balance extern "C" above
+#endif
+
+#endif // WINAPI_FAMILY_PARTITION
+#pragma endregion
diff --git a/third_party/sfntly/BUILD.gn b/third_party/sfntly/BUILD.gn
index cdda798..8f312543 100644
--- a/third_party/sfntly/BUILD.gn
+++ b/third_party/sfntly/BUILD.gn
@@ -16,12 +16,6 @@
 config("sfntly_common_config") {
   defines = [ "SFNTLY_NO_EXCEPTION" ]
   include_dirs = [ "src/cpp/src" ]
-
-  if (is_clang) {
-    # TODO(tikuta): Remove this once the PR is merged.
-    # https://github.com/googlei18n/sfntly/pull/104
-    cflags = [ "-Wno-user-defined-warnings" ]
-  }
 }
 
 source_set("sfntly_chromium") {
diff --git a/third_party/sfntly/README.chromium b/third_party/sfntly/README.chromium
index 6f02baa..f1bddea 100644
--- a/third_party/sfntly/README.chromium
+++ b/third_party/sfntly/README.chromium
@@ -1,6 +1,6 @@
 Name: sfntly
 URL: https://github.com/googlei18n/sfntly
-Version: 04740d2600193b14aa3ef24cd9fbb3d5996b9f77
+Version: b55ff303ea2f9e26702b514cf6a3196a2e3e2974
 Security Critical: yes
 License: Apache 2.0
 License File: COPYING.txt
diff --git a/tools/grit/grit/grit_runner.py b/tools/grit/grit/grit_runner.py
index 270cc48..cc094661 100755
--- a/tools/grit/grit/grit_runner.py
+++ b/tools/grit/grit/grit_runner.py
@@ -196,64 +196,65 @@
   """Parses arguments and does the appropriate thing."""
   util.ChangeStdoutEncoding()
 
-  if not args or (len(args) == 1 and args[0] == 'help'):
-    PrintUsage()
-    return 0
-  elif len(args) == 2 and args[0] == 'help':
-    tool = args[1].lower()
-    if not _GetToolInfo(tool):
-      print "No such tool.  Try running 'grit help' for a list of tools."
-      return 2
+  options = Options()
+  try:
+    args = options.ReadOptions(args)  # args may be shorter after this
+  except getopt.GetoptError as e:
+    print "grit:", str(e)
+    print "Try running 'grit help' for valid options."
+    return 1
+  if not args:
+    print "No tool provided.  Try running 'grit help' for a list of tools."
+    return 2
 
-    print ("Help for 'grit %s' (for general help, run 'grit help'):\n"
-           % (tool))
-    print _GetToolInfo(tool)[_FACTORY]().__doc__
-    return 0
-  else:
-    options = Options()
-    try:
-      args = options.ReadOptions(args)  # args may be shorter after this
-    except getopt.GetoptError as e:
-      print "grit:", str(e)
-      print "Try running 'grit help' for valid options."
-      return 1
-    if not args:
-      print "No tool provided.  Try running 'grit help' for a list of tools."
-      return 2
-    tool = args[0]
-    if not _GetToolInfo(tool):
-      print "No such tool.  Try running 'grit help' for a list of tools."
-      return 2
+  tool = args[0]
+  if tool == 'help':
+    if len(args) == 1:
+      PrintUsage()
+      return 0
+    else:
+      tool = args[1]
+      if not _GetToolInfo(tool):
+        print "No such tool.  Try running 'grit help' for a list of tools."
+        return 2
 
-    try:
-      if _GetToolInfo(tool)[_REQUIRES_INPUT]:
-        os.stat(options.input)
-    except OSError:
-      print ('Input file %s not found.\n'
-             'To specify a different input file:\n'
-             '  1. Use the GRIT_INPUT environment variable.\n'
-             '  2. Use the -i command-line option.  This overrides '
-             'GRIT_INPUT.\n'
-             '  3. Specify neither GRIT_INPUT or -i and GRIT will try to load '
-             "'resource.grd'\n"
-             '     from the current directory.' % options.input)
-      return 2
+      print ("Help for 'grit %s' (for general help, run 'grit help'):\n"
+             % (tool))
+      print _GetToolInfo(tool)[_FACTORY]().__doc__
+      return 0
+  if not _GetToolInfo(tool):
+    print "No such tool.  Try running 'grit help' for a list of tools."
+    return 2
 
-    if options.hash:
-      grit.extern.FP.UseUnsignedFingerPrintFromModule(options.hash)
+  try:
+    if _GetToolInfo(tool)[_REQUIRES_INPUT]:
+      os.stat(options.input)
+  except OSError:
+    print ('Input file %s not found.\n'
+           'To specify a different input file:\n'
+           '  1. Use the GRIT_INPUT environment variable.\n'
+           '  2. Use the -i command-line option.  This overrides '
+           'GRIT_INPUT.\n'
+           '  3. Specify neither GRIT_INPUT or -i and GRIT will try to load '
+           "'resource.grd'\n"
+           '     from the current directory.' % options.input)
+    return 2
 
-    try:
-      toolobject = _GetToolInfo(tool)[_FACTORY]()
-      if options.profile_dest:
-        import hotshot
-        prof = hotshot.Profile(options.profile_dest)
-        return prof.runcall(toolobject.Run, options, args[1:])
-      else:
-        return toolobject.Run(options, args[1:])
-    except getopt.GetoptError as e:
-      print "grit: %s: %s" % (tool, str(e))
-      print "Try running 'grit help %s' for valid options." % (tool,)
-      return 1
+  if options.hash:
+    grit.extern.FP.UseUnsignedFingerPrintFromModule(options.hash)
+
+  try:
+    toolobject = _GetToolInfo(tool)[_FACTORY]()
+    if options.profile_dest:
+      import hotshot
+      prof = hotshot.Profile(options.profile_dest)
+      return prof.runcall(toolobject.Run, options, args[1:])
+    else:
+      return toolobject.Run(options, args[1:])
+  except getopt.GetoptError as e:
+    print "grit: %s: %s" % (tool, str(e))
+    print "Try running 'grit help %s' for valid options." % (tool,)
+    return 1
 
 
 if __name__ == '__main__':
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml
index 06309d9..0e9562d 100644
--- a/tools/metrics/histograms/enums.xml
+++ b/tools/metrics/histograms/enums.xml
@@ -29245,6 +29245,7 @@
   <int value="-1533258008" label="CalculateNativeWinOcclusion:enabled"/>
   <int value="-1532035450" label="DragTabsInTabletMode:disabled"/>
   <int value="-1532014193" label="disable-encryption-migration"/>
+  <int value="-1529907580" label="ImeServiceConnectable:disabled"/>
   <int value="-1528455406" label="OmniboxPedalSuggestions:enabled"/>
   <int value="-1520855274" label="PWAFullCodeCache:disabled"/>
   <int value="-1517518406" label="force-update-menu-type"/>
@@ -29678,6 +29679,7 @@
   <int value="-775321548" label="UseNewDoodleApi:disabled"/>
   <int value="-773238824" label="AutoplayWhitelistSettings:disabled"/>
   <int value="-772679248" label="MojoVideoEncodeAccelerator:enabled"/>
+  <int value="-772608284" label="MyFilesVolume:enabled"/>
   <int value="-771080109" label="GrantNotificationsToDSE:disabled"/>
   <int value="-770319039" label="enable-touch-editing"/>
   <int value="-769865314" label="AutofillCacheQueryResponses:disabled"/>
@@ -30353,6 +30355,7 @@
   <int value="588333474" label="OfflineIndicator:disabled"/>
   <int value="592050831" label="disable-slimming-paint"/>
   <int value="593707592" label="disable-network-portal-notification"/>
+  <int value="594756372" label="MyFilesVolume:disabled"/>
   <int value="595168244" label="NotificationExpansionAnimation:enabled"/>
   <int value="595371145" label="OmniboxRichEntitySuggestions:disabled"/>
   <int value="596106994" label="CustomFeedbackUi:enabled"/>
@@ -30454,6 +30457,7 @@
   <int value="738868972" label="GdiTextPrinting:disabled"/>
   <int value="739938466"
       label="WebPaymentsPerMethodCanMakePaymentQuota:disabled"/>
+  <int value="740056959" label="ImeServiceConnectable:enabled"/>
   <int value="745783589" label="translate-force-trigger-on-english"/>
   <int value="745868416" label="disable-system-timezone-automatic-detection"/>
   <int value="746944193" label="enable-automatic-password-saving:disabled"/>
@@ -33289,6 +33293,15 @@
   <int value="1" label="Http Live Stream Type"/>
 </enum>
 
+<enum name="MediaVideoHeight">
+  <int value="0" label="~360 or lower"/>
+  <int value="1" label="~480"/>
+  <int value="2" label="~720"/>
+  <int value="3" label="~1080"/>
+  <int value="4" label="~1440"/>
+  <int value="5" label="~2160 or higher"/>
+</enum>
+
 <enum name="MemCacheWriteResult">
   <int value="0" label="Success"/>
   <int value="1" label="Invalid Argument"/>
@@ -53067,6 +53080,11 @@
   <int value="1" label="Revoked ephemeral permission"/>
 </enum>
 
+<enum name="WebViewClientTypeEnum">
+  <int value="0" label="Regular WebViewClient"/>
+  <int value="1" label="WebViewClientCompat (via AndroidX)"/>
+</enum>
+
 <enum name="WelcomeSignInPromptOutcome">
   <int value="0" label="User navigated away from page"/>
   <int value="1" label="User clicked the No Thanks button"/>
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index ecc0149..f9e840aa5 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -2737,6 +2737,18 @@
   </summary>
 </histogram>
 
+<histogram name="Android.WebView.SupportLibrary.ClientIsCompat"
+    enum="WebViewClientTypeEnum" expires_after="2019-05-05">
+  <owner>ntfschr@chromium.org</owner>
+  <owner>changwan@chromium.org</owner>
+  <summary>
+    Records whether the WebViewClient provided by the app is an instance of
+    WebViewClientCompat (and therefore exposes AndroidX callbacks). This is
+    recorded each time the app sets a new WebViewClient via
+    WebView#setWebViewClient().
+  </summary>
+</histogram>
+
 <histogram name="Android.WebView.TargetSdkVersion" enum="AndroidApiLevel">
   <owner>changwan@chromium.org</owner>
   <summary>
@@ -7640,6 +7652,18 @@
   </summary>
 </histogram>
 
+<histogram name="Autofill.SaveCardReachedPersonalDataManager" enum="Boolean"
+    expires_after="2019-06-30">
+  <owner>jsaul@google.com</owner>
+  <owner>sebsg@chromium.org</owner>
+  <owner>mahmadi@chromium.org</owner>
+<!-- Name completed by histogram_suffixes name="AutofillCreditCardType" -->
+
+  <summary>
+    Records if the PersonalDataManager was notified to attempt saving of a card.
+  </summary>
+</histogram>
+
 <histogram name="Autofill.SaveCardWithFirstAndLastNameComplete" enum="Boolean">
   <owner>sebsg@chromium.org</owner>
 <!-- Name completed by histogram_suffixes name="AutofillCreditCardType" -->
@@ -45802,6 +45826,17 @@
   <summary>Counts of video decode errors reported to plugin.</summary>
 </histogram>
 
+<histogram base="true" name="Media.PepperVideoDecoderOutputPictureCount"
+    enum="MediaVideoHeight" expires_after="2019-11-01">
+  <owner>sandersd@chromium.org</owner>
+  <owner>dalecurtis@chromium.org</owner>
+  <summary>
+    Counts every output picture emitted to a PPAPI client, categorized by size
+    and decoder type. Flash will only use platform decoders, but NaCl clients
+    can use either decoder type.
+  </summary>
+</histogram>
+
 <histogram name="Media.PepperVideoDecoderPictureCount">
   <owner>ihf@chromium.org</owner>
   <owner>posciak@chromium.org</owner>
@@ -55287,6 +55322,33 @@
   </summary>
 </histogram>
 
+<histogram name="Net.DNS.Android.AutoDohPrivate" enum="Boolean">
+  <owner>pauljensen@chromium.org</owner>
+  <summary>
+    For devices using Android private DNS, are their DNS servers known to
+    support DNS-over-HTTPS.
+  </summary>
+</histogram>
+
+<histogram name="Net.DNS.Android.AutoDohPublic" enum="Boolean">
+  <owner>pauljensen@chromium.org</owner>
+  <summary>
+    For devices not using Android private DNS, are their DNS servers known to
+    support DNS-over-HTTPS, thus potential candidates for automatic upgrading
+    from regular DNS to DNS-over-HTTPS.
+  </summary>
+</histogram>
+
+<histogram name="Net.DNS.Android.DotExplicit" enum="Boolean">
+  <owner>pauljensen@chromium.org</owner>
+  <summary>
+    For devices using Android private DNS, was their DNS-over-TLS server
+    specified explicitly in their Android settings. When false, they were
+    automatically upgraded from the standard DNS protocol to DNS-over-TLS via
+    auto-detection.
+  </summary>
+</histogram>
+
 <histogram name="Net.DNS.DnsTask.ErrorBeforeFallback.Fast" enum="NetErrorCodes">
   <owner>pauljensen@chromium.org</owner>
   <owner>mef@chromium.org</owner>
@@ -55450,6 +55512,18 @@
   </summary>
 </histogram>
 
+<histogram base="true" name="Net.DNS.TotalTimeTyped" units="ms">
+<!-- Name completed by histogram_suffixes
+     name="DnsTotalTimeType" -->
+
+  <owner>pauljensen@chromium.org</owner>
+  <summary>
+    Duration of time since a HostResolverImpl::Resolve request to the time a
+    result is posted. Excludes canceled, evicted, and aborted requests. Includes
+    cache hits (recorded as 0). Excludes speculative requests.
+  </summary>
+</histogram>
+
 <histogram name="Net.DNS_Resolution_And_TCP_Connection_Latency">
   <obsolete>
     Deprecated- see Net.DNS_Resolution_And_TCP_Connection_Latency2
@@ -124767,6 +124841,7 @@
   <suffix name="Local" label="Local"/>
   <suffix name="Server" label="Server (Google Payments)"/>
   <affected-histogram name="Autofill.DaysSinceLastUse.StoredCreditCard"/>
+  <affected-histogram name="Autofill.SaveCardReachedPersonalDataManager"/>
   <affected-histogram name="Autofill.SaveCardWithFirstAndLastNameComplete"/>
   <affected-histogram name="Autofill.SaveCardWithFirstAndLastNameOffered"/>
   <affected-histogram name="Autofill.StoredCreditCardCount"/>
@@ -127141,6 +127216,24 @@
   <affected-histogram name="DNS.ResolveSuccess"/>
 </histogram_suffixes>
 
+<histogram_suffixes name="DnsTotalTimeType" separator=".">
+  <suffix name="Async" label="using Chromium's resolver"/>
+  <suffix name="AsyncPrivateSupportsDoh"
+      label="using Chromium's resolver, with a DNS server that supports
+             DNS-over-HTTPS"/>
+  <suffix name="System" label="using the system resolver"/>
+  <suffix name="SystemPrivate"
+      label="using the system resolver using private DNS"/>
+  <suffix name="SystemSupportsDoh"
+      label="using the system resolver, with a DNS server that supports
+             DNS-over-HTTPS. Note that on Android the DNS servers are not
+             passed to native code when private DNS is used so we cannot
+             detect when private DNS is used with servers that support
+             DNS-over-HTTPS, so this bucket will fall into the SystemPrivate
+             bucket."/>
+  <affected-histogram name="Net.DNS.TotalTimeTyped"/>
+</histogram_suffixes>
+
 <histogram_suffixes name="DocsSpecific" separator=".">
   <suffix name="Docs" label="Only for docs.google.com"/>
   <affected-histogram name="appcache.MainResourceResponseRetrieval"/>
@@ -129133,6 +129226,12 @@
   <affected-histogram name="Media.Controls.CTR"/>
 </histogram_suffixes>
 
+<histogram_suffixes name="MediaDecoderType" separator=".">
+  <suffix name="HW" label="Platform decoder"/>
+  <suffix name="SW" label="Software decoder"/>
+  <affected-histogram name="Media.PepperVideoDecoderOutputPictureCount"/>
+</histogram_suffixes>
+
 <histogram_suffixes name="MediaElementConfigurations" separator=".">
   <suffix name="FullscreenLandscape"/>
   <suffix name="FullscreenPortrait"/>
diff --git a/ui/aura/mus/gesture_recognizer_impl_mus.cc b/ui/aura/mus/gesture_recognizer_impl_mus.cc
index 6f1e204..4de5522 100644
--- a/ui/aura/mus/gesture_recognizer_impl_mus.cc
+++ b/ui/aura/mus/gesture_recognizer_impl_mus.cc
@@ -5,12 +5,9 @@
 #include "ui/aura/mus/gesture_recognizer_impl_mus.h"
 
 #include "ui/aura/client/screen_position_client.h"
-#include "ui/aura/env.h"
 #include "ui/aura/mus/window_tree_client.h"
 #include "ui/aura/window.h"
 #include "ui/aura/window_tree_host.h"
-#include "ui/display/display.h"
-#include "ui/display/screen.h"
 
 namespace aura {
 
@@ -42,19 +39,10 @@
   if (source != ws::mojom::MoveLoopSource::TOUCH)
     return;
   moving_window_ = window;
-  last_location_in_screen_ = cursor_location;
-  Env* env = Env::GetInstance();
-  std::set<ui::EventType> types = {
-      ui::ET_TOUCH_RELEASED, ui::ET_TOUCH_PRESSED, ui::ET_TOUCH_MOVED,
-      ui::ET_TOUCH_CANCELLED,
-  };
-  env->AddEventObserver(this, env, types);
+  cursor_offset_ = cursor_location - window->GetBoundsInScreen().origin();
 }
 
 void GestureRecognizerImplMus::OnWindowMoveEnded(bool success) {
-  if (!moving_window_)
-    return;
-  Env::GetInstance()->RemoveEventObserver(this);
   moving_window_ = nullptr;
 }
 
@@ -71,25 +59,15 @@
     aura::client::ScreenPositionClient* client =
         aura::client::GetScreenPositionClient(target_window->GetRootWindow());
     if (client) {
-      gfx::Point location_in_window = last_location_in_screen_;
-      client->ConvertPointFromScreen(target_window, &location_in_window);
-      point->set_x(location_in_window.x());
-      point->set_y(location_in_window.y());
+      // Use the original offset when the window move started. ui::EventObserver
+      // isn't used since its OnEvent may be called slightly later than window
+      // move (bounds change) is conducted. See crbug.com/901540.
+      point->set_x(cursor_offset_.x());
+      point->set_y(cursor_offset_.y());
       return true;
     }
   }
   return GestureRecognizerImpl::GetLastTouchPointForTarget(consumer, point);
 }
 
-void GestureRecognizerImplMus::OnEvent(const ui::Event& event) {
-  DCHECK(moving_window_);
-
-  last_location_in_screen_ = event.AsLocatedEvent()->location();
-  display::Display display;
-  if (display::Screen::GetScreen()->GetDisplayWithDisplayId(
-          moving_window_->GetHost()->GetDisplayId(), &display)) {
-    last_location_in_screen_ += display.bounds().OffsetFromOrigin();
-  }
-}
-
 }  // namespace aura
diff --git a/ui/aura/mus/gesture_recognizer_impl_mus.h b/ui/aura/mus/gesture_recognizer_impl_mus.h
index e0c24d5e0..4c46d3e 100644
--- a/ui/aura/mus/gesture_recognizer_impl_mus.h
+++ b/ui/aura/mus/gesture_recognizer_impl_mus.h
@@ -7,7 +7,6 @@
 
 #include "base/macros.h"
 #include "ui/aura/mus/window_tree_client_observer.h"
-#include "ui/events/event_observer.h"
 #include "ui/events/gestures/gesture_recognizer_impl.h"
 
 namespace ui {
@@ -23,8 +22,7 @@
 // GestureRecognizerImpl, but it handles keeping GetLastTouchPointForTarget in
 // sync with the server when the touch events are handled within the server.
 class GestureRecognizerImplMus : public ui::GestureRecognizerImpl,
-                                 public aura::WindowTreeClientObserver,
-                                 public ui::EventObserver {
+                                 public aura::WindowTreeClientObserver {
  public:
   explicit GestureRecognizerImplMus(aura::WindowTreeClient* client);
   ~GestureRecognizerImplMus() override;
@@ -41,12 +39,9 @@
                            ws::mojom::MoveLoopSource source) override;
   void OnWindowMoveEnded(bool success) override;
 
-  // ui::EventObserver:
-  void OnEvent(const ui::Event& event) override;
-
   aura::WindowTreeClient* client_;
   aura::Window* moving_window_ = nullptr;
-  gfx::Point last_location_in_screen_;
+  gfx::Vector2d cursor_offset_;
 
   DISALLOW_COPY_AND_ASSIGN(GestureRecognizerImplMus);
 };
diff --git a/ui/aura/mus/window_tree_client.cc b/ui/aura/mus/window_tree_client.cc
index ba9c57b..286f3fb 100644
--- a/ui/aura/mus/window_tree_client.cc
+++ b/ui/aura/mus/window_tree_client.cc
@@ -963,6 +963,10 @@
   tree_->SetEventTargetingPolicy(window->server_id(), policy);
 }
 
+void WindowTreeClient::OnClientId(uint32_t client_id) {
+  id_ = client_id;
+}
+
 void WindowTreeClient::OnEmbed(
     ws::mojom::WindowDataPtr root_data,
     ws::mojom::WindowTreePtr tree,
diff --git a/ui/aura/mus/window_tree_client.h b/ui/aura/mus/window_tree_client.h
index 93c54f60..a7b8245 100644
--- a/ui/aura/mus/window_tree_client.h
+++ b/ui/aura/mus/window_tree_client.h
@@ -126,6 +126,8 @@
   // Blocks until the initial screen configuration is received.
   bool WaitForDisplays();
 
+  const base::Optional<uint32_t>& id() const { return id_; }
+
   void SetCanFocus(Window* window, bool can_focus);
   void SetCanAcceptDrops(WindowMus* window, bool can_accept_drops);
   void SetEventTargetingPolicy(WindowMus* window,
@@ -363,6 +365,7 @@
                                   std::unique_ptr<ui::PropertyData> data);
 
   // Overridden from WindowTreeClient:
+  void OnClientId(uint32_t client_id) override;
   void OnEmbed(
       ws::mojom::WindowDataPtr root,
       ws::mojom::WindowTreePtr tree,
@@ -589,6 +592,9 @@
   mojo::AssociatedBinding<ws::mojom::ScreenProviderObserver>
       screen_provider_observer_binding_{this};
 
+  // Id for this connection. The server provides this value in OnClientId().
+  base::Optional<uint32_t> id_;
+
   base::WeakPtrFactory<WindowTreeClient> weak_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(WindowTreeClient);
diff --git a/ui/aura/mus/window_tree_host_mus.cc b/ui/aura/mus/window_tree_host_mus.cc
index 9a3f3e6..b6c7b10 100644
--- a/ui/aura/mus/window_tree_host_mus.cc
+++ b/ui/aura/mus/window_tree_host_mus.cc
@@ -120,9 +120,10 @@
     const gfx::Rect& bounds_in_pixels,
     const viz::LocalSurfaceId& local_surface_id) {
   base::AutoReset<bool> resetter(&in_set_bounds_from_server_, true);
-  // TODO(jonross): Update Mus to pass allocation time for Server allocated
-  // viz::LocalSurfaceIds.
-  SetBoundsInPixels(bounds_in_pixels, local_surface_id);
+  // TODO(jonross): Update Mus to pass the correct allocation time.
+  SetBoundsInPixels(
+      bounds_in_pixels,
+      viz::LocalSurfaceIdAllocation(local_surface_id, base::TimeTicks::Now()));
 }
 
 void WindowTreeHostMus::SetClientArea(
@@ -173,12 +174,11 @@
 
 void WindowTreeHostMus::SetBoundsInPixels(
     const gfx::Rect& bounds,
-    const viz::LocalSurfaceId& local_surface_id,
-    base::TimeTicks allocation_time) {
+    const viz::LocalSurfaceIdAllocation& local_surface_id_allocation) {
   if (!in_set_bounds_from_server_)
     delegate_->OnWindowTreeHostBoundsWillChange(this, bounds);
-  WindowTreeHostPlatform::SetBoundsInPixels(bounds, local_surface_id,
-                                            allocation_time);
+  WindowTreeHostPlatform::SetBoundsInPixels(bounds,
+                                            local_surface_id_allocation);
 }
 
 void WindowTreeHostMus::DispatchEvent(ui::Event* event) {
diff --git a/ui/aura/mus/window_tree_host_mus.h b/ui/aura/mus/window_tree_host_mus.h
index ad0d0e83..c8c9b9f 100644
--- a/ui/aura/mus/window_tree_host_mus.h
+++ b/ui/aura/mus/window_tree_host_mus.h
@@ -87,8 +87,8 @@
   void HideImpl() override;
   void SetBoundsInPixels(
       const gfx::Rect& bounds,
-      const viz::LocalSurfaceId& local_surface_id = viz::LocalSurfaceId(),
-      base::TimeTicks allocation_time = base::TimeTicks()) override;
+      const viz::LocalSurfaceIdAllocation& local_surface_id_allocation =
+          viz::LocalSurfaceIdAllocation()) override;
   void DispatchEvent(ui::Event* event) override;
   void OnClosed() override;
   void OnActivationChanged(bool active) override;
diff --git a/ui/aura/window_tree_host.cc b/ui/aura/window_tree_host.cc
index d8e79f8..89ed4c6 100644
--- a/ui/aura/window_tree_host.cc
+++ b/ui/aura/window_tree_host.cc
@@ -415,10 +415,8 @@
 
 void WindowTreeHost::InitCompositor() {
   DCHECK(!compositor_->root_layer());
-  compositor_->SetScaleAndSize(
-      device_scale_factor_, GetBoundsInPixels().size(),
-      window()->GetLocalSurfaceIdAllocation().local_surface_id(),
-      window()->GetLocalSurfaceIdAllocation().allocation_time());
+  compositor_->SetScaleAndSize(device_scale_factor_, GetBoundsInPixels().size(),
+                               window()->GetLocalSurfaceIdAllocation());
   compositor_->SetRootLayer(window()->layer());
 
   display::Display display =
@@ -443,8 +441,7 @@
 
 void WindowTreeHost::OnHostResizedInPixels(
     const gfx::Size& new_size_in_pixels,
-    const viz::LocalSurfaceId& new_local_surface_id,
-    base::TimeTicks new_allocation_time) {
+    const viz::LocalSurfaceIdAllocation& new_local_surface_id_allocation) {
   // TODO(jonross) Unify all OnHostResizedInPixels to have both
   // viz::LocalSurfaceId and allocation time as optional parameters.
   display::Display display =
@@ -453,18 +450,16 @@
   UpdateRootWindowSizeInPixels();
 
   // Allocate a new LocalSurfaceId for the new state.
-  auto local_surface_id = new_local_surface_id;
-  auto allocation_time = new_allocation_time;
+  viz::LocalSurfaceIdAllocation local_surface_id_allocation(
+      new_local_surface_id_allocation);
   if (ShouldAllocateLocalSurfaceId(window()) &&
-      !new_local_surface_id.is_valid()) {
+      !new_local_surface_id_allocation.IsValid()) {
     window_->AllocateLocalSurfaceId();
-    local_surface_id =
-        window_->GetLocalSurfaceIdAllocation().local_surface_id();
-    allocation_time = window_->GetLocalSurfaceIdAllocation().allocation_time();
+    local_surface_id_allocation = window_->GetLocalSurfaceIdAllocation();
   }
   ScopedLocalSurfaceIdValidator lsi_validator(window());
   compositor_->SetScaleAndSize(device_scale_factor_, new_size_in_pixels,
-                               local_surface_id, allocation_time);
+                               local_surface_id_allocation);
 
   for (WindowTreeHostObserver& observer : observers_)
     observer.OnHostResized(this);
diff --git a/ui/aura/window_tree_host.h b/ui/aura/window_tree_host.h
index 4fd1be6..e89644f9 100644
--- a/ui/aura/window_tree_host.h
+++ b/ui/aura/window_tree_host.h
@@ -202,8 +202,8 @@
   // when the size change takes effect.
   virtual void SetBoundsInPixels(
       const gfx::Rect& bounds_in_pixels,
-      const viz::LocalSurfaceId& local_surface_id = viz::LocalSurfaceId(),
-      base::TimeTicks allocation_time = base::TimeTicks()) = 0;
+      const viz::LocalSurfaceIdAllocation& local_surface_id_allocation =
+          viz::LocalSurfaceIdAllocation()) = 0;
   virtual gfx::Rect GetBoundsInPixels() const = 0;
 
   // Sets the OS capture to the root window.
@@ -275,8 +275,8 @@
   void OnHostMovedInPixels(const gfx::Point& new_location_in_pixels);
   void OnHostResizedInPixels(
       const gfx::Size& new_size_in_pixels,
-      const viz::LocalSurfaceId& local_surface_id = viz::LocalSurfaceId(),
-      base::TimeTicks new_allocation_time = base::TimeTicks());
+      const viz::LocalSurfaceIdAllocation& local_surface_id_allocation =
+          viz::LocalSurfaceIdAllocation());
   void OnHostWorkspaceChanged();
   void OnHostDisplayChanged();
   void OnHostCloseRequested();
diff --git a/ui/aura/window_tree_host_platform.cc b/ui/aura/window_tree_host_platform.cc
index caa6a17..fb11cb1 100644
--- a/ui/aura/window_tree_host_platform.cc
+++ b/ui/aura/window_tree_host_platform.cc
@@ -121,11 +121,9 @@
 
 void WindowTreeHostPlatform::SetBoundsInPixels(
     const gfx::Rect& bounds,
-    const viz::LocalSurfaceId& local_surface_id,
-    base::TimeTicks local_surface_id_allocation_time) {
+    const viz::LocalSurfaceIdAllocation& local_surface_id_allocation) {
   pending_size_ = bounds.size();
-  pending_local_surface_id_ = local_surface_id;
-  pending_local_surface_id_allocation_time_ = local_surface_id_allocation_time;
+  pending_local_surface_id_allocation_ = local_surface_id_allocation;
   platform_window_->SetBounds(bounds);
 }
 
@@ -205,18 +203,14 @@
   bounds_ = new_bounds;
   if (bounds_.origin() != old_bounds.origin())
     OnHostMovedInPixels(bounds_.origin());
-  if (pending_local_surface_id_.is_valid() ||
+  if (pending_local_surface_id_allocation_.IsValid() ||
       bounds_.size() != old_bounds.size() || current_scale != new_scale) {
-    viz::LocalSurfaceId local_surface_id;
-    base::TimeTicks allocation_time;
-    if (bounds_.size() == pending_size_) {
-      local_surface_id = pending_local_surface_id_;
-      allocation_time = pending_local_surface_id_allocation_time_;
-    }
-    pending_local_surface_id_ = viz::LocalSurfaceId();
-    pending_local_surface_id_allocation_time_ = base::TimeTicks();
+    viz::LocalSurfaceIdAllocation local_surface_id_allocation;
+    if (bounds_.size() == pending_size_)
+      local_surface_id_allocation = pending_local_surface_id_allocation_;
+    pending_local_surface_id_allocation_ = viz::LocalSurfaceIdAllocation();
     pending_size_ = gfx::Size();
-    OnHostResizedInPixels(bounds_.size(), local_surface_id, allocation_time);
+    OnHostResizedInPixels(bounds_.size(), local_surface_id_allocation);
   }
 }
 
diff --git a/ui/aura/window_tree_host_platform.h b/ui/aura/window_tree_host_platform.h
index 9f5cac6..354d7be 100644
--- a/ui/aura/window_tree_host_platform.h
+++ b/ui/aura/window_tree_host_platform.h
@@ -42,10 +42,9 @@
   void ShowImpl() override;
   void HideImpl() override;
   gfx::Rect GetBoundsInPixels() const override;
-  void SetBoundsInPixels(
-      const gfx::Rect& bounds,
-      const viz::LocalSurfaceId& local_surface_id,
-      base::TimeTicks local_surface_id_allocation_time) override;
+  void SetBoundsInPixels(const gfx::Rect& bounds,
+                         const viz::LocalSurfaceIdAllocation&
+                             local_surface_id_allocation) override;
   gfx::Point GetLocationOnScreenInPixels() const override;
   void SetCapture() override;
   void ReleaseCapture() override;
@@ -99,13 +98,12 @@
 
   std::unique_ptr<ui::KeyboardHook> keyboard_hook_;
 
-  // |pending_local_surface_id_|, |pending_local_surface_id_allocation_time_|
-  // and |pending_size_| are set when the PlatformWindow instance is requested
-  // to adopt a new size (in SetBoundsInPixels()). When the platform confirms
-  // the new size (by way of OnBoundsChanged() callback), the LocalSurfaceId and
-  // its allocation time is set on the compositor, by WindowTreeHost.
-  viz::LocalSurfaceId pending_local_surface_id_;
-  base::TimeTicks pending_local_surface_id_allocation_time_;
+  // |pending_local_surface_id_allocation_|, and |pending_size_| are set when
+  // the PlatformWindow instance is requested to adopt a new size (in
+  // SetBoundsInPixels()). When the platform confirms the new size (by way of
+  // OnBoundsChanged() callback), the LocalSurfaceIdAllocation is set on the
+  // compositor, by WindowTreeHost.
+  viz::LocalSurfaceIdAllocation pending_local_surface_id_allocation_;
   gfx::Size pending_size_;
 
   DISALLOW_COPY_AND_ASSIGN(WindowTreeHostPlatform);
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 8662b55..c92f11a 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -275,13 +275,6 @@
   child_frame_sinks_.erase(it);
 }
 
-void Compositor::SetLocalSurfaceId(
-    const viz::LocalSurfaceId& local_surface_id,
-    base::TimeTicks local_surface_id_allocation_time) {
-  host_->SetLocalSurfaceIdFromParent(local_surface_id,
-                                     local_surface_id_allocation_time);
-}
-
 void Compositor::SetLayerTreeFrameSink(
     std::unique_ptr<cc::LayerTreeFrameSink> layer_tree_frame_sink) {
   layer_tree_frame_sink_requested_ = false;
@@ -362,22 +355,25 @@
 void Compositor::SetScaleAndSize(
     float scale,
     const gfx::Size& size_in_pixel,
-    const viz::LocalSurfaceId& local_surface_id,
-    base::TimeTicks local_surface_id_allocation_time) {
+    const viz::LocalSurfaceIdAllocation& local_surface_id_allocation) {
   DCHECK_GT(scale, 0);
   bool device_scale_factor_changed = device_scale_factor_ != scale;
   device_scale_factor_ = scale;
 
-  if (size_ != size_in_pixel && local_surface_id.is_valid()) {
+  if (size_ != size_in_pixel && local_surface_id_allocation.IsValid()) {
     // A new LocalSurfaceId must be set when the compositor size changes.
-    DCHECK_NE(local_surface_id, host_->local_surface_id_from_parent());
+    DCHECK_NE(
+        local_surface_id_allocation.local_surface_id(),
+        host_->local_surface_id_allocation_from_parent().local_surface_id());
+    DCHECK_NE(local_surface_id_allocation,
+              host_->local_surface_id_allocation_from_parent());
   }
 
   if (!size_in_pixel.IsEmpty()) {
     bool size_changed = size_ != size_in_pixel;
     size_ = size_in_pixel;
-    host_->SetViewportSizeAndScale(size_in_pixel, scale, local_surface_id,
-                                   local_surface_id_allocation_time);
+    host_->SetViewportSizeAndScale(size_in_pixel, scale,
+                                   local_surface_id_allocation);
     root_web_layer_->SetBounds(size_in_pixel);
     // TODO(fsamuel): Get rid of ContextFactoryPrivate.
     if (context_factory_private_ &&
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index 92021bb..1bd8397 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -68,7 +68,6 @@
 class FrameSinkManagerImpl;
 class ContextProvider;
 class HostFrameSinkManager;
-class LocalSurfaceId;
 }
 
 namespace ui {
@@ -228,9 +227,6 @@
   void AddChildFrameSink(const viz::FrameSinkId& frame_sink_id);
   void RemoveChildFrameSink(const viz::FrameSinkId& frame_sink_id);
 
-  void SetLocalSurfaceId(const viz::LocalSurfaceId& local_surface_id,
-                         base::TimeTicks local_surface_id_allocation_time);
-
   void SetLayerTreeFrameSink(std::unique_ptr<cc::LayerTreeFrameSink> surface);
 
   // Called when a child surface is about to resize.
@@ -283,10 +279,10 @@
   void SetLatencyInfo(const LatencyInfo& latency_info);
 
   // Sets the compositor's device scale factor and size.
-  void SetScaleAndSize(float scale,
-                       const gfx::Size& size_in_pixel,
-                       const viz::LocalSurfaceId& local_surface_id,
-                       base::TimeTicks local_surface_id_allocation_time);
+  void SetScaleAndSize(
+      float scale,
+      const gfx::Size& size_in_pixel,
+      const viz::LocalSurfaceIdAllocation& local_surface_id_allocation);
 
   // Set the output color profile into which this compositor should render.
   void SetDisplayColorSpace(const gfx::ColorSpace& color_space);
diff --git a/ui/compositor/compositor_unittest.cc b/ui/compositor/compositor_unittest.cc
index 6eeafaa4..d393b18 100644
--- a/ui/compositor/compositor_unittest.cc
+++ b/ui/compositor/compositor_unittest.cc
@@ -107,8 +107,8 @@
   auto root_layer = std::make_unique<Layer>(ui::LAYER_SOLID_COLOR);
   root_layer->SetBounds(gfx::Rect(10, 10));
   compositor()->SetRootLayer(root_layer.get());
-  compositor()->SetScaleAndSize(1.0f, gfx::Size(10, 10), viz::LocalSurfaceId(),
-                                base::TimeTicks());
+  compositor()->SetScaleAndSize(1.0f, gfx::Size(10, 10),
+                                viz::LocalSurfaceIdAllocation());
   DCHECK(compositor()->IsVisible());
 
   // Set a non-identity color matrix on the compistor display, and expect it to
@@ -161,8 +161,8 @@
   std::unique_ptr<Layer> root_layer(new Layer(ui::LAYER_SOLID_COLOR));
   root_layer->SetBounds(gfx::Rect(10, 10));
   compositor()->SetRootLayer(root_layer.get());
-  compositor()->SetScaleAndSize(1.0f, gfx::Size(10, 10), viz::LocalSurfaceId(),
-                                base::TimeTicks());
+  compositor()->SetScaleAndSize(1.0f, gfx::Size(10, 10),
+                                viz::LocalSurfaceIdAllocation());
   DCHECK(compositor()->IsVisible());
   compositor()->ScheduleDraw();
   DrawWaiterForTest::WaitForCompositingEnded(compositor());
diff --git a/ui/compositor/layer_unittest.cc b/ui/compositor/layer_unittest.cc
index ed00eaa..de311cb9 100644
--- a/ui/compositor/layer_unittest.cc
+++ b/ui/compositor/layer_unittest.cc
@@ -1511,7 +1511,7 @@
 // Checks that modifying the hierarchy correctly affects final composite.
 TEST_F(LayerWithRealCompositorTest, ModifyHierarchy) {
   GetCompositor()->SetScaleAndSize(1.0f, gfx::Size(50, 50),
-                                   viz::LocalSurfaceId(), base::TimeTicks());
+                                   viz::LocalSurfaceIdAllocation());
 
   // l0
   //  +-l11
@@ -1584,8 +1584,7 @@
 #if defined(OS_WIN)
 TEST_F(LayerWithRealCompositorTest, CanvasDrawFadedString) {
   gfx::Size size(50, 50);
-  GetCompositor()->SetScaleAndSize(1.0f, size, viz::LocalSurfaceId(),
-                                   base::TimeTicks());
+  GetCompositor()->SetScaleAndSize(1.0f, size, viz::LocalSurfaceIdAllocation());
   DrawFadedStringLayerDelegate delegate(SK_ColorBLUE, size);
   std::unique_ptr<Layer> layer(
       CreateDrawFadedStringLayerDelegate(gfx::Rect(size), &delegate));
@@ -1620,7 +1619,7 @@
 // Checks that modifying the hierarchy correctly affects final composite.
 TEST_F(LayerWithRealCompositorTest, Opacity) {
   GetCompositor()->SetScaleAndSize(1.0f, gfx::Size(50, 50),
-                                   viz::LocalSurfaceId(), base::TimeTicks());
+                                   viz::LocalSurfaceIdAllocation());
 
   // l0
   //  +-l11
@@ -1737,7 +1736,7 @@
   l1_delegate.set_layer_bounds(l1->bounds());
 
   GetCompositor()->SetScaleAndSize(1.0f, gfx::Size(500, 500),
-                                   viz::LocalSurfaceId(), base::TimeTicks());
+                                   viz::LocalSurfaceIdAllocation());
   GetCompositor()->SetRootLayer(root.get());
   root->Add(l1.get());
   WaitForDraw();
@@ -1754,7 +1753,7 @@
 
   // Scale up to 2.0. Changing scale doesn't change the bounds in DIP.
   GetCompositor()->SetScaleAndSize(2.0f, gfx::Size(500, 500),
-                                   viz::LocalSurfaceId(), base::TimeTicks());
+                                   viz::LocalSurfaceIdAllocation());
   EXPECT_EQ("10,20 200x220", root->bounds().ToString());
   EXPECT_EQ("10,20 140x180", l1->bounds().ToString());
   // CC layer should still match the UI layer bounds.
@@ -1769,7 +1768,7 @@
 
   // Scale down back to 1.0f.
   GetCompositor()->SetScaleAndSize(1.0f, gfx::Size(500, 500),
-                                   viz::LocalSurfaceId(), base::TimeTicks());
+                                   viz::LocalSurfaceIdAllocation());
   EXPECT_EQ("10,20 200x220", root->bounds().ToString());
   EXPECT_EQ("10,20 140x180", l1->bounds().ToString());
   // CC layer should still match the UI layer bounds.
@@ -1787,7 +1786,7 @@
   // Just changing the size shouldn't notify the scale change nor
   // trigger repaint.
   GetCompositor()->SetScaleAndSize(1.0f, gfx::Size(1000, 1000),
-                                   viz::LocalSurfaceId(), base::TimeTicks());
+                                   viz::LocalSurfaceIdAllocation());
   // No scale change, so no scale notification.
   EXPECT_EQ(0.0f, root_delegate.device_scale_factor());
   EXPECT_EQ(0.0f, l1_delegate.device_scale_factor());
@@ -1804,7 +1803,7 @@
   l1_delegate.set_layer_bounds(l1->bounds());
 
   GetCompositor()->SetScaleAndSize(1.0f, gfx::Size(500, 500),
-                                   viz::LocalSurfaceId(), base::TimeTicks());
+                                   viz::LocalSurfaceIdAllocation());
   GetCompositor()->SetRootLayer(root.get());
 
   root->Add(l1.get());
@@ -1818,7 +1817,7 @@
   EXPECT_EQ(NULL, l1->parent());
   EXPECT_EQ(NULL, l1->GetCompositor());
   GetCompositor()->SetScaleAndSize(2.0f, gfx::Size(500, 500),
-                                   viz::LocalSurfaceId(), base::TimeTicks());
+                                   viz::LocalSurfaceIdAllocation());
   // Sanity check on root and l1.
   EXPECT_EQ("10,20 200x220", root->bounds().ToString());
   cc_bounds_size = l1->cc_layer_for_testing()->bounds();
@@ -2259,7 +2258,7 @@
   std::unique_ptr<Layer> c11(CreateLayer(LAYER_TEXTURED));
 
   GetCompositor()->SetScaleAndSize(1.25f, gfx::Size(100, 100),
-                                   viz::LocalSurfaceId(), base::TimeTicks());
+                                   viz::LocalSurfaceIdAllocation());
   GetCompositor()->SetRootLayer(root.get());
   root->Add(c1.get());
   c1->Add(c11.get());
@@ -2273,7 +2272,7 @@
             Vector2dFTo100thPrecisionString(c11->subpixel_position_offset()));
 
   GetCompositor()->SetScaleAndSize(1.5f, gfx::Size(100, 100),
-                                   viz::LocalSurfaceId(), base::TimeTicks());
+                                   viz::LocalSurfaceIdAllocation());
   SnapLayerToPhysicalPixelBoundary(root.get(), c11.get());
   // c11 must already be aligned at 1.5 scale.
   EXPECT_EQ("0.00 0.00",
@@ -2294,7 +2293,7 @@
   std::unique_ptr<Layer> c111(CreateLayer(LAYER_TEXTURED));
 
   GetCompositor()->SetScaleAndSize(1.0f, gfx::Size(100, 100),
-                                   viz::LocalSurfaceId(), base::TimeTicks());
+                                   viz::LocalSurfaceIdAllocation());
   GetCompositor()->SetRootLayer(root.get());
   root->Add(c1.get());
   c1->Add(c11.get());
diff --git a/ui/compositor/recyclable_compositor_mac.cc b/ui/compositor/recyclable_compositor_mac.cc
index 6257f86..7f47406 100644
--- a/ui/compositor/recyclable_compositor_mac.cc
+++ b/ui/compositor/recyclable_compositor_mac.cc
@@ -74,11 +74,10 @@
     size_pixels_ = size_pixels;
     scale_factor_ = scale_factor;
     local_surface_id_allocator_.GenerateId();
-    viz::LocalSurfaceId local_surface_id =
-        local_surface_id_allocator_.GetCurrentLocalSurfaceId();
-    compositor()->SetScaleAndSize(
-        scale_factor_, size_pixels_, local_surface_id,
-        local_surface_id_allocator_.allocation_time());
+    viz::LocalSurfaceIdAllocation local_surface_id_allocation =
+        local_surface_id_allocator_.GetCurrentLocalSurfaceIdAllocation();
+    compositor()->SetScaleAndSize(scale_factor_, size_pixels_,
+                                  local_surface_id_allocation);
   }
 }
 
@@ -88,8 +87,7 @@
   local_surface_id_allocator_.Invalidate();
   compositor()->SetScaleAndSize(
       scale_factor_, size_pixels_,
-      local_surface_id_allocator_.GetCurrentLocalSurfaceId(),
-      local_surface_id_allocator_.allocation_time());
+      local_surface_id_allocator_.GetCurrentLocalSurfaceIdAllocation());
 }
 
 void RecyclableCompositorMac::OnCompositingDidCommit(
diff --git a/ui/compositor/test/test_compositor_host_android.cc b/ui/compositor/test/test_compositor_host_android.cc
index ca0589a5..14c981d6 100644
--- a/ui/compositor/test/test_compositor_host_android.cc
+++ b/ui/compositor/test/test_compositor_host_android.cc
@@ -31,7 +31,7 @@
     compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget);
     compositor_->SetScaleAndSize(1.0f,
                                  gfx::Size(bounds.width(), bounds.height()),
-                                 viz::LocalSurfaceId(), base::TimeTicks());
+                                 viz::LocalSurfaceIdAllocation());
   }
 
   // Overridden from TestCompositorHost:
diff --git a/ui/compositor/test/test_compositor_host_mac.mm b/ui/compositor/test/test_compositor_host_mac.mm
index 1ed7387..52ad298 100644
--- a/ui/compositor/test/test_compositor_host_mac.mm
+++ b/ui/compositor/test/test_compositor_host_mac.mm
@@ -161,8 +161,8 @@
       std::make_unique<TestAcceleratedWidgetMacNSView>(view);
   accelerated_widget_.SetNSView(test_accelerated_widget_nsview_.get());
   compositor_.SetAcceleratedWidget(accelerated_widget_.accelerated_widget());
-  compositor_.SetScaleAndSize(1.0f, bounds_.size(), viz::LocalSurfaceId(),
-                              base::TimeTicks());
+  compositor_.SetScaleAndSize(1.0f, bounds_.size(),
+                              viz::LocalSurfaceIdAllocation());
   [view setCompositor:&compositor_];
   [window_ setContentView:view];
   [window_ orderFront:nil];
diff --git a/ui/compositor/test/test_compositor_host_ozone.cc b/ui/compositor/test/test_compositor_host_ozone.cc
index 88e4c53..5a97ed9 100644
--- a/ui/compositor/test/test_compositor_host_ozone.cc
+++ b/ui/compositor/test/test_compositor_host_ozone.cc
@@ -104,8 +104,8 @@
   DCHECK_NE(window_delegate_.widget(), gfx::kNullAcceleratedWidget);
 
   compositor_.SetAcceleratedWidget(window_delegate_.widget());
-  compositor_.SetScaleAndSize(1.0f, bounds_.size(), viz::LocalSurfaceId(),
-                              base::TimeTicks());
+  compositor_.SetScaleAndSize(1.0f, bounds_.size(),
+                              viz::LocalSurfaceIdAllocation());
   compositor_.SetVisible(true);
 }
 
diff --git a/ui/compositor/test/test_compositor_host_win.cc b/ui/compositor/test/test_compositor_host_win.cc
index 6a49447..dcba750 100644
--- a/ui/compositor/test/test_compositor_host_win.cc
+++ b/ui/compositor/test/test_compositor_host_win.cc
@@ -30,8 +30,8 @@
         false /* enable_surface_synchronization */,
         false /* enable_pixel_canvas */));
     compositor_->SetAcceleratedWidget(hwnd());
-    compositor_->SetScaleAndSize(1.0f, GetSize(), viz::LocalSurfaceId(),
-                                 base::TimeTicks());
+    compositor_->SetScaleAndSize(1.0f, GetSize(),
+                                 viz::LocalSurfaceIdAllocation());
   }
 
   ~TestCompositorHostWin() override { DestroyWindow(hwnd()); }
diff --git a/ui/compositor/test/test_compositor_host_x11.cc b/ui/compositor/test/test_compositor_host_x11.cc
index e921a4d9..b9f5a62 100644
--- a/ui/compositor/test/test_compositor_host_x11.cc
+++ b/ui/compositor/test/test_compositor_host_x11.cc
@@ -86,8 +86,8 @@
       break;
   }
   compositor_.SetAcceleratedWidget(window_);
-  compositor_.SetScaleAndSize(1.0f, bounds_.size(), viz::LocalSurfaceId(),
-                              base::TimeTicks());
+  compositor_.SetScaleAndSize(1.0f, bounds_.size(),
+                              viz::LocalSurfaceIdAllocation());
   compositor_.SetVisible(true);
 }
 
diff --git a/ui/file_manager/integration_tests/file_manager/create_new_folder.js b/ui/file_manager/integration_tests/file_manager/create_new_folder.js
index 82ed1176..bb86f41 100644
--- a/ui/file_manager/integration_tests/file_manager/create_new_folder.js
+++ b/ui/file_manager/integration_tests/file_manager/create_new_folder.js
@@ -142,7 +142,8 @@
  * @return {Promise} Promise fulfilled on success.
  */
 function expandRoot(appId, selector) {
-  const expandIcon = selector + ' > .tree-row > .expand-icon';
+  const expandIcon =
+      selector + ' > .tree-row[has-children=true] > .expand-icon';
 
   return new Promise(function(resolve) {
     // Wait for the subtree expand icon to appear.
@@ -199,26 +200,20 @@
 testcase.createFolderNestedDownloads = function() {
   let appId;
 
-  const promise =
-      new Promise(function(resolve) {
-        setupAndWaitUntilReady(
-            null, RootPath.DOWNLOADS, resolve, BASIC_LOCAL_ENTRY_SET, []);
-      })
-          .then(function(results) {
-            appId = results.windowId;
-            return expandRoot(appId, TREEITEM_DOWNLOADS);
-          })
-          .then(function() {
-            return remoteCall.navigateWithDirectoryTree(
-                appId, '/photos', 'My files/Downloads');
-          })
-          .then(function() {
-            return remoteCall.waitForFiles(
-                appId, [], {ignoreLastModifiedTime: true});
-          })
-          .then(function() {
-            return createNewFolder(appId, [], TREEITEM_DOWNLOADS);
-          });
+  const promise = new Promise(function(resolve) {
+    setupAndWaitUntilReady(
+        null, RootPath.DOWNLOADS, resolve, BASIC_LOCAL_ENTRY_SET, []);
+  }).then(function(results) {
+    appId = results.windowId;
+    return expandRoot(appId, TREEITEM_DOWNLOADS);
+  }).then(function() {
+    return remoteCall.navigateWithDirectoryTree(
+        appId, '/photos', 'My files/Downloads');
+  }).then(function() {
+    return remoteCall.waitForFiles(appId, [], {ignoreLastModifiedTime: true});
+  }).then(function() {
+    return createNewFolder(appId, [], TREEITEM_DOWNLOADS);
+  });
 
   testPromise(promise);
 };
diff --git a/ui/message_center/cocoa/notification_controller_unittest.mm b/ui/message_center/cocoa/notification_controller_unittest.mm
index 72c3441d..7961ca7 100644
--- a/ui/message_center/cocoa/notification_controller_unittest.mm
+++ b/ui/message_center/cocoa/notification_controller_unittest.mm
@@ -361,7 +361,7 @@
 TEST_F(NotificationControllerTest, MessageSize) {
   message_center::RichNotificationData data;
   std::string id("id");
-  NotifierId notifier_id(NotifierId::APPLICATION, "notifier");
+  NotifierId notifier_id(NotifierType::APPLICATION, "notifier");
   std::unique_ptr<Notification> notification(new Notification(
       NOTIFICATION_TYPE_BASE_FORMAT, id, base::UTF8ToUTF16(""),
       ASCIIToUTF16("And\neven\nthe\nmessage is long.\nThis sure is wordy"),
diff --git a/ui/message_center/message_center_impl_unittest.cc b/ui/message_center/message_center_impl_unittest.cc
index 6d85eb7..80214ba 100644
--- a/ui/message_center/message_center_impl_unittest.cc
+++ b/ui/message_center/message_center_impl_unittest.cc
@@ -199,7 +199,7 @@
     return std::make_unique<Notification>(
         type, id, UTF8ToUTF16("title"), UTF8ToUTF16(id),
         gfx::Image() /* icon */, base::string16() /* display_source */, GURL(),
-        NotifierId(NotifierId::APPLICATION, notifier_id), optional_fields,
+        NotifierId(NotifierType::APPLICATION, notifier_id), optional_fields,
         base::MakeRefCounted<TestDelegate>());
   }
 
@@ -458,7 +458,7 @@
 }
 
 TEST_F(MessageCenterImplTest, NotificationBlocker) {
-  NotifierId notifier_id(NotifierId::APPLICATION, "app1");
+  NotifierId notifier_id(NotifierType::APPLICATION, "app1");
   // Multiple blockers to verify the case that one blocker blocks but another
   // doesn't.
   ToggledNotificationBlocker blocker1(message_center());
@@ -514,7 +514,7 @@
 }
 
 TEST_F(MessageCenterImplTest, NotificationsDuringBlocked) {
-  NotifierId notifier_id(NotifierId::APPLICATION, "app1");
+  NotifierId notifier_id(NotifierType::APPLICATION, "app1");
   ToggledNotificationBlocker blocker(message_center());
 
   message_center()->AddNotification(std::unique_ptr<Notification>(
@@ -550,8 +550,8 @@
 // Similar to other blocker cases but this test case allows |notifier_id2| even
 // in blocked.
 TEST_F(MessageCenterImplTest, NotificationBlockerAllowsPopups) {
-  NotifierId notifier_id1(NotifierId::APPLICATION, "app1");
-  NotifierId notifier_id2(NotifierId::APPLICATION, "app2");
+  NotifierId notifier_id1(NotifierType::APPLICATION, "app1");
+  NotifierId notifier_id2(NotifierType::APPLICATION, "app2");
   PopupNotificationBlocker blocker(message_center(), notifier_id2);
 
   message_center()->AddNotification(std::unique_ptr<Notification>(
@@ -605,8 +605,8 @@
 // This would provide the feature to 'separated' message centers per-profile for
 // ChromeOS multi-login.
 TEST_F(MessageCenterImplTest, TotalNotificationBlocker) {
-  NotifierId notifier_id1(NotifierId::APPLICATION, "app1");
-  NotifierId notifier_id2(NotifierId::APPLICATION, "app2");
+  NotifierId notifier_id1(NotifierType::APPLICATION, "app1");
+  NotifierId notifier_id2(NotifierType::APPLICATION, "app2");
   TotalNotificationBlocker blocker(message_center(), notifier_id2);
 
   message_center()->AddNotification(std::unique_ptr<Notification>(
@@ -674,8 +674,8 @@
 }
 
 TEST_F(MessageCenterImplTest, RemoveAllNotifications) {
-  NotifierId notifier_id1(NotifierId::APPLICATION, "app1");
-  NotifierId notifier_id2(NotifierId::APPLICATION, "app2");
+  NotifierId notifier_id1(NotifierType::APPLICATION, "app1");
+  NotifierId notifier_id2(NotifierType::APPLICATION, "app2");
 
   TotalNotificationBlocker blocker(message_center(), notifier_id1);
   blocker.SetNotificationsEnabled(false);
@@ -712,8 +712,8 @@
 
 #if defined(OS_CHROMEOS)
 TEST_F(MessageCenterImplTest, RemoveAllNotificationsWithPinned) {
-  NotifierId notifier_id1(NotifierId::APPLICATION, "app1");
-  NotifierId notifier_id2(NotifierId::APPLICATION, "app2");
+  NotifierId notifier_id1(NotifierType::APPLICATION, "app1");
+  NotifierId notifier_id2(NotifierType::APPLICATION, "app2");
 
   TotalNotificationBlocker blocker(message_center(), notifier_id1);
   blocker.SetNotificationsEnabled(false);
@@ -793,24 +793,24 @@
 
   // Removing all of app2's notifications should only leave app1's.
   message_center()->RemoveNotificationsForNotifierId(
-      NotifierId(NotifierId::APPLICATION, "app2"));
+      NotifierId(NotifierType::APPLICATION, "app2"));
   ASSERT_EQ(3u, message_center()->NotificationCount());
 
   // Removal operations should be idempotent.
   message_center()->RemoveNotificationsForNotifierId(
-      NotifierId(NotifierId::APPLICATION, "app2"));
+      NotifierId(NotifierType::APPLICATION, "app2"));
   ASSERT_EQ(3u, message_center()->NotificationCount());
 
   // Now we remove the remaining notifications.
   message_center()->RemoveNotificationsForNotifierId(
-      NotifierId(NotifierId::APPLICATION, "app1"));
+      NotifierId(NotifierType::APPLICATION, "app1"));
   ASSERT_EQ(0u, message_center()->NotificationCount());
 }
 
 TEST_F(MessageCenterImplTest, UpdateWhileMessageCenterVisible) {
   std::string id1("id1");
   std::string id2("id2");
-  NotifierId notifier_id1(NotifierId::APPLICATION, "app1");
+  NotifierId notifier_id1(NotifierType::APPLICATION, "app1");
 
   // First, add and update a notification to ensure updates happen
   // normally.
diff --git a/ui/message_center/message_center_stats_collector.cc b/ui/message_center/message_center_stats_collector.cc
index d62f8dd3..ac1be55 100644
--- a/ui/message_center/message_center_stats_collector.cc
+++ b/ui/message_center/message_center_stats_collector.cc
@@ -47,10 +47,8 @@
   }
 }
 
-void MessageCenterStatsCollector::RecordNotifierType(
-    NotifierId::NotifierType type) {
-  UMA_HISTOGRAM_ENUMERATION("Notifications.NotifierType", type,
-                            NotifierId::NotifierType::SIZE);
+void MessageCenterStatsCollector::RecordNotifierType(NotifierType type) {
+  UMA_HISTOGRAM_ENUMERATION("Notifications.NotifierType", type);
 }
 
 MessageCenterStatsCollector::MessageCenterStatsCollector(
diff --git a/ui/message_center/message_center_stats_collector.h b/ui/message_center/message_center_stats_collector.h
index e3992e6..3770c70 100644
--- a/ui/message_center/message_center_stats_collector.h
+++ b/ui/message_center/message_center_stats_collector.h
@@ -63,7 +63,7 @@
   };
 
   // Sends notifier type to UMA. Called when a notification is added.
-  void RecordNotifierType(NotifierId::NotifierType type);
+  void RecordNotifierType(NotifierType type);
 
   // MessageCenterObserver
   void OnNotificationAdded(const std::string& notification_id) override;
diff --git a/ui/message_center/notification_list_unittest.cc b/ui/message_center/notification_list_unittest.cc
index 71432f1..f081832 100644
--- a/ui/message_center/notification_list_unittest.cc
+++ b/ui/message_center/notification_list_unittest.cc
@@ -64,7 +64,7 @@
         UTF8ToUTF16(base::StringPrintf(kTitleFormat, counter_)),
         UTF8ToUTF16(base::StringPrintf(kMessageFormat, counter_)), gfx::Image(),
         UTF8ToUTF16(kDisplaySource), GURL(),
-        NotifierId(NotifierId::APPLICATION, kExtensionId), optional_fields,
+        NotifierId(NotifierType::APPLICATION, kExtensionId), optional_fields,
         NULL));
     return notification;
   }
@@ -175,8 +175,8 @@
   std::unique_ptr<Notification> notification(new Notification(
       NOTIFICATION_TYPE_SIMPLE, replaced, UTF8ToUTF16("newtitle"),
       UTF8ToUTF16("newbody"), gfx::Image(), UTF8ToUTF16(kDisplaySource), GURL(),
-      NotifierId(NotifierId::APPLICATION, kExtensionId), RichNotificationData(),
-      NULL));
+      NotifierId(NotifierType::APPLICATION, kExtensionId),
+      RichNotificationData(), NULL));
   notification_list_->UpdateNotificationMessage(id0, std::move(notification));
   EXPECT_EQ(1u, notification_list_->NotificationCount(blockers_));
   const NotificationList::Notifications notifications =
@@ -225,10 +225,10 @@
 }
 
 TEST_F(NotificationListTest, GetNotificationsByNotifierId) {
-  NotifierId id0(NotifierId::APPLICATION, "ext0");
-  NotifierId id1(NotifierId::APPLICATION, "ext1");
+  NotifierId id0(NotifierType::APPLICATION, "ext0");
+  NotifierId id1(NotifierType::APPLICATION, "ext1");
   NotifierId id2(GURL("http://example.com"));
-  NotifierId id3(NotifierId::SYSTEM_COMPONENT, "system-notifier");
+  NotifierId id3(NotifierType::SYSTEM_COMPONENT, "system-notifier");
   std::unique_ptr<Notification> notification(new Notification(
       NOTIFICATION_TYPE_SIMPLE, "id0", UTF8ToUTF16("title0"),
       UTF8ToUTF16("message0"), gfx::Image(), UTF8ToUTF16("source0"), GURL(),
@@ -366,7 +366,7 @@
   std::unique_ptr<Notification> notification(
       new Notification(NOTIFICATION_TYPE_PROGRESS, id1, UTF8ToUTF16("updated"),
                        UTF8ToUTF16("updated"), gfx::Image(), base::string16(),
-                       GURL(), NotifierId(NotifierId::APPLICATION, app_id1),
+                       GURL(), NotifierId(NotifierType::APPLICATION, app_id1),
                        RichNotificationData(), NULL));
   notification_list_->AddNotification(std::move(notification));
   EXPECT_EQ(1u, notification_list_->GetNotificationsByAppId(app_id1).size());
@@ -387,7 +387,7 @@
   notification.reset(
       new Notification(NOTIFICATION_TYPE_PROGRESS, id1, UTF8ToUTF16("updated"),
                        UTF8ToUTF16("updated"), gfx::Image(), base::string16(),
-                       GURL(), NotifierId(NotifierId::APPLICATION, app_id1),
+                       GURL(), NotifierId(NotifierType::APPLICATION, app_id1),
                        RichNotificationData(), NULL));
   notification_list_->AddNotification(std::move(notification));
 
@@ -395,7 +395,7 @@
   notification.reset(
       new Notification(NOTIFICATION_TYPE_PROGRESS, id2, UTF8ToUTF16("updated"),
                        UTF8ToUTF16("updated"), gfx::Image(), base::string16(),
-                       GURL(), NotifierId(NotifierId::APPLICATION, app_id1),
+                       GURL(), NotifierId(NotifierType::APPLICATION, app_id1),
                        RichNotificationData(), NULL));
   notification_list_->AddNotification(std::move(notification));
   EXPECT_EQ(2u, notification_list_->GetNotificationsByAppId(app_id1).size());
@@ -405,7 +405,7 @@
   notification.reset(
       new Notification(NOTIFICATION_TYPE_PROGRESS, id3, UTF8ToUTF16("updated"),
                        UTF8ToUTF16("updated"), gfx::Image(), base::string16(),
-                       GURL(), NotifierId(NotifierId::APPLICATION, app_id2),
+                       GURL(), NotifierId(NotifierType::APPLICATION, app_id2),
                        RichNotificationData(), NULL));
   notification_list_->AddNotification(std::move(notification));
   EXPECT_EQ(2u, notification_list_->GetNotificationsByAppId(app_id1).size());
@@ -466,7 +466,7 @@
     std::unique_ptr<Notification> notification(new Notification(
         NOTIFICATION_TYPE_SIMPLE, replaced, UTF8ToUTF16("newtitle"),
         UTF8ToUTF16("newbody"), gfx::Image(), UTF8ToUTF16(kDisplaySource),
-        GURL(), NotifierId(NotifierId::APPLICATION, kExtensionId), optional,
+        GURL(), NotifierId(NotifierType::APPLICATION, kExtensionId), optional,
         NULL));
     notification_list_->UpdateNotificationMessage(id0, std::move(notification));
     EXPECT_EQ(1u, notification_list_->NotificationCount(blockers_));
@@ -497,7 +497,7 @@
   std::unique_ptr<Notification> notification(new Notification(
       NOTIFICATION_TYPE_SIMPLE, replaced, UTF8ToUTF16("newtitle"),
       UTF8ToUTF16("newbody"), gfx::Image(), UTF8ToUTF16(kDisplaySource), GURL(),
-      NotifierId(NotifierId::APPLICATION, kExtensionId), optional, NULL));
+      NotifierId(NotifierType::APPLICATION, kExtensionId), optional, NULL));
   notification_list_->UpdateNotificationMessage(id0, std::move(notification));
   EXPECT_EQ(1u, notification_list_->NotificationCount(blockers_));
   EXPECT_EQ(1u, GetPopupCounts());
@@ -521,7 +521,7 @@
   std::unique_ptr<Notification> notification(new Notification(
       NOTIFICATION_TYPE_SIMPLE, id0, UTF8ToUTF16("newtitle"),
       UTF8ToUTF16("newbody"), gfx::Image(), UTF8ToUTF16(kDisplaySource), GURL(),
-      NotifierId(NotifierId::APPLICATION, kExtensionId), priority, NULL));
+      NotifierId(NotifierType::APPLICATION, kExtensionId), priority, NULL));
   notification_list_->UpdateNotificationMessage(id0, std::move(notification));
   EXPECT_EQ(1u, GetPopupCounts());
   notification_list_->MarkSinglePopupAsShown(id0, true);
@@ -531,7 +531,7 @@
   notification.reset(new Notification(
       NOTIFICATION_TYPE_SIMPLE, id0, UTF8ToUTF16("newtitle2"),
       UTF8ToUTF16("newbody2"), gfx::Image(), UTF8ToUTF16(kDisplaySource),
-      GURL(), NotifierId(NotifierId::APPLICATION, kExtensionId), priority,
+      GURL(), NotifierId(NotifierType::APPLICATION, kExtensionId), priority,
       NULL));
   notification_list_->UpdateNotificationMessage(id0, std::move(notification));
   EXPECT_EQ(0u, GetPopupCounts());
@@ -541,7 +541,7 @@
   notification.reset(new Notification(
       NOTIFICATION_TYPE_SIMPLE, id1, UTF8ToUTF16("newtitle"),
       UTF8ToUTF16("newbody"), gfx::Image(), UTF8ToUTF16(kDisplaySource), GURL(),
-      NotifierId(NotifierId::APPLICATION, kExtensionId), priority, NULL));
+      NotifierId(NotifierType::APPLICATION, kExtensionId), priority, NULL));
   notification_list_->UpdateNotificationMessage(id1, std::move(notification));
   EXPECT_EQ(0u, GetPopupCounts());
 
@@ -550,7 +550,7 @@
   notification.reset(new Notification(
       NOTIFICATION_TYPE_SIMPLE, id1, UTF8ToUTF16("newtitle"),
       UTF8ToUTF16("newbody"), gfx::Image(), UTF8ToUTF16(kDisplaySource), GURL(),
-      NotifierId(NotifierId::APPLICATION, kExtensionId), priority, NULL));
+      NotifierId(NotifierType::APPLICATION, kExtensionId), priority, NULL));
   notification_list_->UpdateNotificationMessage(id1, std::move(notification));
   EXPECT_EQ(1u, GetPopupCounts());
   notification_list_->MarkSinglePopupAsShown(id1, true);
@@ -650,8 +650,8 @@
   std::unique_ptr<Notification> notification(new Notification(
       NOTIFICATION_TYPE_SIMPLE, replaced, UTF8ToUTF16("newtitle"),
       UTF8ToUTF16("newbody"), gfx::Image(), UTF8ToUTF16(kDisplaySource), GURL(),
-      NotifierId(NotifierId::APPLICATION, kExtensionId), RichNotificationData(),
-      NULL));
+      NotifierId(NotifierType::APPLICATION, kExtensionId),
+      RichNotificationData(), NULL));
   notification_list_->UpdateNotificationMessage(id1, std::move(notification));
   Notification* n1 = GetNotification(id1);
   EXPECT_TRUE(n1 == NULL);
diff --git a/ui/message_center/popup_timers_controller.cc b/ui/message_center/popup_timers_controller.cc
index 0c5eead..8fa5993 100644
--- a/ui/message_center/popup_timers_controller.cc
+++ b/ui/message_center/popup_timers_controller.cc
@@ -22,7 +22,7 @@
 #else
   const bool use_high_priority_delay =
       notification->priority() > DEFAULT_PRIORITY ||
-      notification->notifier_id().type == NotifierId::WEB_PAGE;
+      notification->notifier_id().type == NotifierType::WEB_PAGE;
 #endif
 
   if (use_high_priority_delay)
diff --git a/ui/message_center/public/cpp/notification.cc b/ui/message_center/public/cpp/notification.cc
index d444352..c9f721d 100644
--- a/ui/message_center/public/cpp/notification.cc
+++ b/ui/message_center/public/cpp/notification.cc
@@ -166,7 +166,7 @@
   std::unique_ptr<Notification> notification = CreateSystemNotification(
       NOTIFICATION_TYPE_SIMPLE, notification_id, title, message,
       base::string16() /* display_source */, GURL(),
-      NotifierId(NotifierId::SYSTEM_COMPONENT, system_component_id),
+      NotifierId(NotifierType::SYSTEM_COMPONENT, system_component_id),
       RichNotificationData(),
       new HandleNotificationClickDelegate(click_callback), gfx::kNoneIcon,
       SystemNotificationWarningLevel::CRITICAL_WARNING);
@@ -187,7 +187,7 @@
     scoped_refptr<NotificationDelegate> delegate,
     const gfx::VectorIcon& small_image,
     SystemNotificationWarningLevel color_type) {
-  DCHECK_EQ(NotifierId::SYSTEM_COMPONENT, notifier_id.type);
+  DCHECK_EQ(NotifierType::SYSTEM_COMPONENT, notifier_id.type);
   SkColor color = kSystemNotificationColorNormal;
   switch (color_type) {
     case SystemNotificationWarningLevel::NORMAL:
diff --git a/ui/message_center/public/cpp/notifier_id.cc b/ui/message_center/public/cpp/notifier_id.cc
index c25aaeb..3549b9ae 100644
--- a/ui/message_center/public/cpp/notifier_id.cc
+++ b/ui/message_center/public/cpp/notifier_id.cc
@@ -8,15 +8,16 @@
 
 namespace message_center {
 
-NotifierId::NotifierId() : type(SYSTEM_COMPONENT) {}
+NotifierId::NotifierId() : type(NotifierType::SYSTEM_COMPONENT) {}
 
 NotifierId::NotifierId(NotifierType type, const std::string& id)
     : type(type), id(id) {
-  DCHECK(type != WEB_PAGE);
+  DCHECK(type != NotifierType::WEB_PAGE);
   DCHECK(!id.empty());
 }
 
-NotifierId::NotifierId(const GURL& url) : type(WEB_PAGE), url(url) {}
+NotifierId::NotifierId(const GURL& url)
+    : type(NotifierType::WEB_PAGE), url(url) {}
 
 NotifierId::NotifierId(const NotifierId& other) = default;
 
@@ -27,7 +28,7 @@
   if (profile_id != other.profile_id)
     return false;
 
-  if (type == WEB_PAGE)
+  if (type == NotifierType::WEB_PAGE)
     return url == other.url;
 
   return id == other.id;
@@ -40,7 +41,7 @@
   if (profile_id != other.profile_id)
     return profile_id < other.profile_id;
 
-  if (type == WEB_PAGE)
+  if (type == NotifierType::WEB_PAGE)
     return url < other.url;
 
   return id < other.id;
diff --git a/ui/message_center/public/cpp/notifier_id.h b/ui/message_center/public/cpp/notifier_id.h
index a4bd22a3..eae94ad 100644
--- a/ui/message_center/public/cpp/notifier_id.h
+++ b/ui/message_center/public/cpp/notifier_id.h
@@ -18,20 +18,20 @@
 
 namespace message_center {
 
+  // This enum is being used for histogram reporting and the elements should not
+  // be re-ordered.
+enum class NotifierType : int {
+  APPLICATION = 0,
+  ARC_APPLICATION = 1,
+  WEB_PAGE = 2,
+  SYSTEM_COMPONENT = 3,
+  CROSTINI_APPLICATION = 4,
+  kMaxValue = CROSTINI_APPLICATION,
+};
+
 // A struct that identifies the source of notifications. For example, a web page
 // might send multiple notifications but they'd all have the same NotifierId.
 struct MESSAGE_CENTER_PUBLIC_EXPORT NotifierId {
-  // This enum is being used for histogram reporting and the elements should not
-  // be re-ordered.
-  enum NotifierType : int {
-    APPLICATION = 0,
-    ARC_APPLICATION = 1,
-    WEB_PAGE = 2,
-    SYSTEM_COMPONENT = 3,
-    CROSTINI_APPLICATION = 4,
-    SIZE,
-  };
-
   // Default constructor needed for generated mojom files and tests.
   NotifierId();
 
diff --git a/ui/message_center/public/mojo/notifier_id.mojom b/ui/message_center/public/mojo/notifier_id.mojom
index 011fc7c..9c2f3133 100644
--- a/ui/message_center/public/mojo/notifier_id.mojom
+++ b/ui/message_center/public/mojo/notifier_id.mojom
@@ -7,7 +7,7 @@
 import "mojo/public/mojom/base/string16.mojom";
 import "url/mojom/url.mojom";
 
-// Equivalent to message_center::NotifierId::NotifierType. Used in UMA, so it
+// Equivalent to message_center::NotifierType. Used in UMA, so it
 // should not be reordered.
 enum NotifierType {
   APPLICATION = 0,
@@ -15,7 +15,6 @@
   WEB_PAGE = 2,
   SYSTEM_COMPONENT = 3,
   CROSTINI_APPLICATION = 4,
-  SIZE,
 };
 
 // Equivalent to message_center::NotifierId.
diff --git a/ui/message_center/public/mojo/notifier_id.typemap b/ui/message_center/public/mojo/notifier_id.typemap
index 743319c..d6a2ff42 100644
--- a/ui/message_center/public/mojo/notifier_id.typemap
+++ b/ui/message_center/public/mojo/notifier_id.typemap
@@ -11,5 +11,5 @@
 ]
 type_mappings = [
   "message_center.mojom.NotifierId=message_center::NotifierId",
-  "message_center.mojom.NotifierType=message_center::NotifierId::NotifierType",
+  "message_center.mojom.NotifierType=message_center::NotifierType",
 ]
diff --git a/ui/message_center/public/mojo/notifier_id_struct_traits.cc b/ui/message_center/public/mojo/notifier_id_struct_traits.cc
index 016424fe..cbdcff3 100644
--- a/ui/message_center/public/mojo/notifier_id_struct_traits.cc
+++ b/ui/message_center/public/mojo/notifier_id_struct_traits.cc
@@ -12,7 +12,7 @@
                  message_center::NotifierId>;
 
 // static
-const message_center::NotifierId::NotifierType& NotifierIdStructTraits::type(
+message_center::NotifierType NotifierIdStructTraits::type(
     const message_center::NotifierId& n) {
   return n.type;
 }
diff --git a/ui/message_center/public/mojo/notifier_id_struct_traits.h b/ui/message_center/public/mojo/notifier_id_struct_traits.h
index f94a7fe9..ba7007f2 100644
--- a/ui/message_center/public/mojo/notifier_id_struct_traits.h
+++ b/ui/message_center/public/mojo/notifier_id_struct_traits.h
@@ -12,47 +12,43 @@
 
 template <>
 struct EnumTraits<message_center::mojom::NotifierType,
-                  message_center::NotifierId::NotifierType> {
+                  message_center::NotifierType> {
   static message_center::mojom::NotifierType ToMojom(
-      message_center::NotifierId::NotifierType input) {
+      message_center::NotifierType input) {
     switch (input) {
-      case message_center::NotifierId::APPLICATION:
+      case message_center::NotifierType::APPLICATION:
         return message_center::mojom::NotifierType::APPLICATION;
-      case message_center::NotifierId::ARC_APPLICATION:
+      case message_center::NotifierType::ARC_APPLICATION:
         return message_center::mojom::NotifierType::ARC_APPLICATION;
-      case message_center::NotifierId::WEB_PAGE:
+      case message_center::NotifierType::WEB_PAGE:
         return message_center::mojom::NotifierType::WEB_PAGE;
-      case message_center::NotifierId::SYSTEM_COMPONENT:
+      case message_center::NotifierType::SYSTEM_COMPONENT:
         return message_center::mojom::NotifierType::SYSTEM_COMPONENT;
-      case message_center::NotifierId::CROSTINI_APPLICATION:
+      case message_center::NotifierType::CROSTINI_APPLICATION:
         return message_center::mojom::NotifierType::CROSTINI_APPLICATION;
-      case message_center::NotifierId::SIZE:
-        break;
     }
     NOTREACHED();
-    return message_center::mojom::NotifierType::SIZE;
+    return message_center::mojom::NotifierType::APPLICATION;
   }
 
   static bool FromMojom(message_center::mojom::NotifierType input,
-                        message_center::NotifierId::NotifierType* out) {
+                        message_center::NotifierType* out) {
     switch (input) {
       case message_center::mojom::NotifierType::APPLICATION:
-        *out = message_center::NotifierId::APPLICATION;
+        *out = message_center::NotifierType::APPLICATION;
         return true;
       case message_center::mojom::NotifierType::ARC_APPLICATION:
-        *out = message_center::NotifierId::ARC_APPLICATION;
+        *out = message_center::NotifierType::ARC_APPLICATION;
         return true;
       case message_center::mojom::NotifierType::WEB_PAGE:
-        *out = message_center::NotifierId::WEB_PAGE;
+        *out = message_center::NotifierType::WEB_PAGE;
         return true;
       case message_center::mojom::NotifierType::SYSTEM_COMPONENT:
-        *out = message_center::NotifierId::SYSTEM_COMPONENT;
+        *out = message_center::NotifierType::SYSTEM_COMPONENT;
         return true;
       case message_center::mojom::NotifierType::CROSTINI_APPLICATION:
-        *out = message_center::NotifierId::CROSTINI_APPLICATION;
+        *out = message_center::NotifierType::CROSTINI_APPLICATION;
         return true;
-      case message_center::mojom::NotifierType::SIZE:
-        break;
     }
     NOTREACHED();
     return false;
@@ -62,8 +58,7 @@
 template <>
 struct StructTraits<message_center::mojom::NotifierIdDataView,
                     message_center::NotifierId> {
-  static const message_center::NotifierId::NotifierType& type(
-      const message_center::NotifierId& n);
+  static message_center::NotifierType type(const message_center::NotifierId& n);
   static const std::string& id(const message_center::NotifierId& n);
   static const GURL& url(const message_center::NotifierId& n);
   static const std::string& profile_id(const message_center::NotifierId& n);
diff --git a/ui/message_center/public/mojo/struct_traits_unittest.cc b/ui/message_center/public/mojo/struct_traits_unittest.cc
index faefc69..138444f 100644
--- a/ui/message_center/public/mojo/struct_traits_unittest.cc
+++ b/ui/message_center/public/mojo/struct_traits_unittest.cc
@@ -81,7 +81,7 @@
   gfx::Image icon(gfx::test::CreateImage(64, 64));
   base::string16 display_source(base::ASCIIToUTF16("display_source"));
   GURL origin_url("www.example.com");
-  NotifierId notifier_id(NotifierId::NotifierType::APPLICATION, id);
+  NotifierId notifier_id(NotifierType::APPLICATION, id);
   notifier_id.profile_id = "profile_id";
   RichNotificationData optional_fields;
   optional_fields.settings_button_handler = SettingsButtonHandler::INLINE;
@@ -114,7 +114,7 @@
       base::ASCIIToUTF16("I'm a notification with no icon!"));
   base::string16 display_source(base::ASCIIToUTF16("display_source"));
   GURL origin_url("www.example.com");
-  NotifierId notifier_id(NotifierId::NotifierType::APPLICATION, id);
+  NotifierId notifier_id(NotifierType::APPLICATION, id);
   Notification input(type, id, title, message, gfx::Image(), display_source,
                      origin_url, notifier_id, RichNotificationData(), nullptr);
   mojom::TraitsTestServicePtr proxy = GetTraitsTestProxy();
diff --git a/ui/message_center/views/notification_menu_model_unittest.cc b/ui/message_center/views/notification_menu_model_unittest.cc
index 7cde296..937ed1c1 100644
--- a/ui/message_center/views/notification_menu_model_unittest.cc
+++ b/ui/message_center/views/notification_menu_model_unittest.cc
@@ -77,7 +77,7 @@
   base::string16 display_source = base::ASCIIToUTF16("www.test.org");
   NotifierId notifier_id = DummyNotifierId();
 
-  NotifierId notifier_id2(NotifierId::APPLICATION, "sample-app");
+  NotifierId notifier_id2(NotifierType::APPLICATION, "sample-app");
   std::unique_ptr<Notification> notification = std::make_unique<Notification>(
       NOTIFICATION_TYPE_SIMPLE, id2,
       base::ASCIIToUTF16("Test Web Notification"),
diff --git a/ui/message_center/views/notification_view_md.cc b/ui/message_center/views/notification_view_md.cc
index 1301c001..04911581 100644
--- a/ui/message_center/views/notification_view_md.cc
+++ b/ui/message_center/views/notification_view_md.cc
@@ -772,8 +772,8 @@
     app_name = url_formatter::FormatUrlForSecurityDisplay(
         notification.origin_url(),
         url_formatter::SchemeDisplay::OMIT_HTTP_AND_HTTPS);
-  } else if (app_name.empty() &&
-             notification.notifier_id().type == NotifierId::SYSTEM_COMPONENT) {
+  } else if (app_name.empty() && notification.notifier_id().type ==
+                                     NotifierType::SYSTEM_COMPONENT) {
     app_name = MessageCenter::Get()->GetSystemNotificationAppName();
   }
   header_row_->SetAppName(app_name);
@@ -1078,21 +1078,20 @@
 
   int block_notifications_message_id = 0;
   switch (notification.notifier_id().type) {
-    case NotifierId::APPLICATION:
-    case NotifierId::ARC_APPLICATION:
+    case NotifierType::APPLICATION:
+    case NotifierType::ARC_APPLICATION:
       block_notifications_message_id =
           IDS_MESSAGE_CENTER_BLOCK_ALL_NOTIFICATIONS_APP;
       break;
-    case NotifierId::WEB_PAGE:
+    case NotifierType::WEB_PAGE:
       block_notifications_message_id =
           IDS_MESSAGE_CENTER_BLOCK_ALL_NOTIFICATIONS_SITE;
       break;
-    case NotifierId::SYSTEM_COMPONENT:
+    case NotifierType::SYSTEM_COMPONENT:
       block_notifications_message_id =
           IDS_MESSAGE_CENTER_BLOCK_ALL_NOTIFICATIONS;
       break;
-    case NotifierId::CROSTINI_APPLICATION:
-    case NotifierId::SIZE:
+    case NotifierType::CROSTINI_APPLICATION:
       NOTREACHED();
       break;
   }
diff --git a/ui/message_center/views/notification_view_md_unittest.cc b/ui/message_center/views/notification_view_md_unittest.cc
index f3dc9c4..a73dfb1 100644
--- a/ui/message_center/views/notification_view_md_unittest.cc
+++ b/ui/message_center/views/notification_view_md_unittest.cc
@@ -158,7 +158,7 @@
       NOTIFICATION_TYPE_BASE_FORMAT, std::string(kDefaultNotificationId),
       base::UTF8ToUTF16("title"), base::UTF8ToUTF16("message"),
       CreateTestImage(80, 80), base::UTF8ToUTF16("display source"), GURL(),
-      NotifierId(NotifierId::APPLICATION, "extension_id"), data, delegate_);
+      NotifierId(NotifierType::APPLICATION, "extension_id"), data, delegate_);
   notification->set_small_image(CreateTestImage(16, 16));
   notification->set_image(CreateTestImage(320, 240));
 
@@ -776,7 +776,7 @@
       message_center::NOTIFICATION_TYPE_CUSTOM, kDefaultNotificationId,
       base::UTF8ToUTF16("title"), base::UTF8ToUTF16("message"), gfx::Image(),
       base::UTF8ToUTF16("display source"), GURL(),
-      message_center::NotifierId(message_center::NotifierId::ARC_APPLICATION,
+      message_center::NotifierId(message_center::NotifierType::ARC_APPLICATION,
                                  "test_app_id"),
       rich_data, nullptr);
 
diff --git a/ui/message_center/views/notification_view_unittest.cc b/ui/message_center/views/notification_view_unittest.cc
index d25b6a8b..a881d3c 100644
--- a/ui/message_center/views/notification_view_unittest.cc
+++ b/ui/message_center/views/notification_view_unittest.cc
@@ -217,8 +217,7 @@
       NOTIFICATION_TYPE_BASE_FORMAT, std::string("notification id"),
       base::UTF8ToUTF16("title"), base::UTF8ToUTF16("message"),
       CreateTestImage(80, 80), base::UTF8ToUTF16("display source"), GURL(),
-      NotifierId(NotifierId::APPLICATION, "extension_id"), *data_,
-      NULL));
+      NotifierId(NotifierType::APPLICATION, "extension_id"), *data_, NULL));
   notification_->set_small_image(CreateTestImage(16, 16));
   notification_->set_image(CreateTestImage(320, 240));
 
@@ -290,7 +289,7 @@
       base::UTF8ToUTF16("title"), base::UTF8ToUTF16("message"),
       CreateTestImage(80, 80), base::UTF8ToUTF16("display source"),
       GURL("https://hello.com"),
-      NotifierId(NotifierId::APPLICATION, "extension_id"), *data(), nullptr);
+      NotifierId(NotifierType::APPLICATION, "extension_id"), *data(), nullptr);
 
   notification_view()->UpdateWithNotification(notification);
   EXPECT_TRUE(NULL != notification_view()->title_view_);
@@ -498,7 +497,7 @@
       base::UTF8ToUTF16("title"), base::UTF8ToUTF16("message"),
       CreateTestImage(80, 80), base::UTF8ToUTF16("display source"),
       GURL("https://hello.com"),
-      NotifierId(NotifierId::APPLICATION, "extension_id"), *data(), nullptr);
+      NotifierId(NotifierType::APPLICATION, "extension_id"), *data(), nullptr);
   notification_view()->UpdateWithNotification(notf);
   widget()->Show();
 
diff --git a/ui/views/animation/square_ink_drop_ripple_unittest.cc b/ui/views/animation/square_ink_drop_ripple_unittest.cc
index 5274c9a..cffabb85 100644
--- a/ui/views/animation/square_ink_drop_ripple_unittest.cc
+++ b/ui/views/animation/square_ink_drop_ripple_unittest.cc
@@ -267,7 +267,7 @@
       SCOPED_TRACE(testing::Message()
                    << "target_size=" << target_size << " dsf=" << dsf);
       host_view->layer()->GetCompositor()->SetScaleAndSize(
-          dsf, gfx::Size(100, 100), viz::LocalSurfaceId(), base::TimeTicks());
+          dsf, gfx::Size(100, 100), viz::LocalSurfaceIdAllocation());
 
       SquareInkDropRippleTestApi::InkDropTransforms transforms;
       test_api.CalculateRectTransforms(gfx::Size(target_size, target_size), 0,
diff --git a/ui/views/mus/desktop_window_tree_host_mus.cc b/ui/views/mus/desktop_window_tree_host_mus.cc
index 24da4f5b..a52979e 100644
--- a/ui/views/mus/desktop_window_tree_host_mus.cc
+++ b/ui/views/mus/desktop_window_tree_host_mus.cc
@@ -392,7 +392,7 @@
   const gfx::Rect rect(
       gfx::ScaleToFlooredPoint(bounds_in_dip.origin(), GetScaleFactor()),
       gfx::ScaleToCeiledSize(bounds_in_dip.size(), GetScaleFactor()));
-  SetBoundsInPixels(rect, viz::LocalSurfaceId(), base::TimeTicks());
+  SetBoundsInPixels(rect, viz::LocalSurfaceIdAllocation());
 }
 
 bool DesktopWindowTreeHostMus::ShouldSendClientAreaToServer() const {
@@ -1043,8 +1043,7 @@
 
 void DesktopWindowTreeHostMus::SetBoundsInPixels(
     const gfx::Rect& bounds_in_pixels,
-    const viz::LocalSurfaceId& local_surface_id,
-    base::TimeTicks local_surface_id_allocation_time) {
+    const viz::LocalSurfaceIdAllocation& local_surface_id_allocation) {
   gfx::Rect final_bounds_in_pixels = bounds_in_pixels;
   if (GetBoundsInPixels().size() != bounds_in_pixels.size()) {
     gfx::Size size = bounds_in_pixels.size();
@@ -1056,8 +1055,8 @@
       size.SetToMin(max_size_in_pixels);
     final_bounds_in_pixels.set_size(size);
   }
-  WindowTreeHostMus::SetBoundsInPixels(final_bounds_in_pixels, local_surface_id,
-                                       local_surface_id_allocation_time);
+  WindowTreeHostMus::SetBoundsInPixels(final_bounds_in_pixels,
+                                       local_surface_id_allocation);
 }
 
 void DesktopWindowTreeHostMus::OnViewBoundsChanged(views::View* observed_view) {
diff --git a/ui/views/mus/desktop_window_tree_host_mus.h b/ui/views/mus/desktop_window_tree_host_mus.h
index 148542e..c133431 100644
--- a/ui/views/mus/desktop_window_tree_host_mus.h
+++ b/ui/views/mus/desktop_window_tree_host_mus.h
@@ -163,10 +163,9 @@
   // aura::WindowTreeHostMus:
   void ShowImpl() override;
   void HideImpl() override;
-  void SetBoundsInPixels(
-      const gfx::Rect& bounds_in_pixels,
-      const viz::LocalSurfaceId& local_surface_id,
-      base::TimeTicks local_surface_id_allocation_time) override;
+  void SetBoundsInPixels(const gfx::Rect& bounds_in_pixels,
+                         const viz::LocalSurfaceIdAllocation&
+                             local_surface_id_allocation) override;
 
   // views::ViewObserver:
   void OnViewBoundsChanged(views::View* observed_view) override;
diff --git a/ui/views/view_unittest.cc b/ui/views/view_unittest.cc
index f0f7060..e34bf29 100644
--- a/ui/views/view_unittest.cc
+++ b/ui/views/view_unittest.cc
@@ -4494,7 +4494,7 @@
 
   const gfx::Size& size = GetRootLayer()->GetCompositor()->size();
   GetRootLayer()->GetCompositor()->SetScaleAndSize(
-      1.25f, size, viz::LocalSurfaceId(), base::TimeTicks());
+      1.25f, size, viz::LocalSurfaceIdAllocation());
 
   v11->SetBoundsRect(gfx::Rect(1, 1, 10, 10));
   v1->SetBoundsRect(gfx::Rect(1, 1, 10, 10));
@@ -4509,7 +4509,7 @@
 
   // DSF change should get propagated and update offsets.
   GetRootLayer()->GetCompositor()->SetScaleAndSize(
-      1.5f, size, viz::LocalSurfaceId(), base::TimeTicks());
+      1.5f, size, viz::LocalSurfaceIdAllocation());
   EXPECT_EQ("0.33 0.33", ToString(v1->layer()->subpixel_position_offset()));
   EXPECT_EQ("0.33 0.33", ToString(v11->layer()->subpixel_position_offset()));
 
@@ -4523,7 +4523,7 @@
 
   // Setting integral DSF should reset the offset.
   GetRootLayer()->GetCompositor()->SetScaleAndSize(
-      2.0f, size, viz::LocalSurfaceId(), base::TimeTicks());
+      2.0f, size, viz::LocalSurfaceIdAllocation());
   EXPECT_EQ("0.00 0.00", ToString(v11->layer()->subpixel_position_offset()));
 }
 
@@ -4593,7 +4593,7 @@
 
   const gfx::Size& size = GetRootLayer()->GetCompositor()->size();
   GetRootLayer()->GetCompositor()->SetScaleAndSize(
-      1.6f, size, viz::LocalSurfaceId(), base::TimeTicks());
+      1.6f, size, viz::LocalSurfaceIdAllocation());
 
   v3->SetBoundsRect(gfx::Rect(14, 13, 13, 5));
   v2->SetBoundsRect(gfx::Rect(7, 7, 50, 50));
@@ -4609,7 +4609,7 @@
 
   // DSF change should get propagated and update offsets.
   GetRootLayer()->GetCompositor()->SetScaleAndSize(
-      1.5f, size, viz::LocalSurfaceId(), base::TimeTicks());
+      1.5f, size, viz::LocalSurfaceIdAllocation());
 
   EXPECT_EQ("0.33 0.33", ToString(v1->layer()->subpixel_position_offset()));
   EXPECT_EQ("0.33 0.67", ToString(v3->layer()->subpixel_position_offset()));
@@ -4619,7 +4619,7 @@
   v1->SetPaintToLayer();
 
   GetRootLayer()->GetCompositor()->SetScaleAndSize(
-      1.33f, size, viz::LocalSurfaceId(), base::TimeTicks());
+      1.33f, size, viz::LocalSurfaceIdAllocation());
 
   EXPECT_EQ("0.02 0.02", ToString(v1->layer()->subpixel_position_offset()));
   EXPECT_EQ("0.05 -0.45", ToString(v3->layer()->subpixel_position_offset()));
@@ -4636,7 +4636,7 @@
 
   // Setting integral DSF should reset the offset.
   GetRootLayer()->GetCompositor()->SetScaleAndSize(
-      2.0f, size, viz::LocalSurfaceId(), base::TimeTicks());
+      2.0f, size, viz::LocalSurfaceIdAllocation());
   EXPECT_EQ("0.00 0.00", ToString(v3->layer()->subpixel_position_offset()));
 }
 
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
index 8aaf011..72d04d0 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
@@ -77,7 +77,7 @@
   DCHECK_NE(0, device_scale_factor());
   SetBoundsInPixels(
       gfx::ConvertRectToPixel(device_scale_factor(), bounds_in_dip),
-      viz::LocalSurfaceId(), base::TimeTicks());
+      viz::LocalSurfaceIdAllocation());
 }
 
 void DesktopWindowTreeHostPlatform::Init(const Widget::InitParams& params) {
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index bb0dfdb..1b289da 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -533,12 +533,11 @@
 
 void DesktopWindowTreeHostWin::SetBoundsInPixels(
     const gfx::Rect& bounds,
-    const viz::LocalSurfaceId& local_surface_id,
-    base::TimeTicks local_surface_id_allocation_time) {
+    const viz::LocalSurfaceIdAllocation& local_surface_id_allocation) {
   // On Windows, the callers of SetBoundsInPixels() shouldn't need to (or be
   // able to) allocate LocalSurfaceId for the compositor. Aura itself should
   // allocate the new ids as needed, instead.
-  DCHECK(!local_surface_id.is_valid());
+  DCHECK(!local_surface_id_allocation.IsValid());
 
   // If the window bounds have to be expanded we need to subtract the
   // window_expansion_top_left_delta_ from the origin and add the
@@ -1005,8 +1004,7 @@
   if (compositor()) {
     compositor()->SetScaleAndSize(
         window_scale_factor, message_handler_->GetClientAreaBounds().size(),
-        window()->GetLocalSurfaceIdAllocation().local_surface_id(),
-        window()->GetLocalSurfaceIdAllocation().allocation_time());
+        window()->GetLocalSurfaceIdAllocation());
   }
 }
 
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
index bd8593d6..4a95810 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
@@ -130,9 +130,8 @@
   gfx::Rect GetBoundsInPixels() const override;
   void SetBoundsInPixels(
       const gfx::Rect& bounds,
-      const viz::LocalSurfaceId& local_surface_id = viz::LocalSurfaceId(),
-      base::TimeTicks local_surface_id_allocation_time =
-          base::TimeTicks()) override;
+      const viz::LocalSurfaceIdAllocation& local_surface_id_allocation =
+          viz::LocalSurfaceIdAllocation()) override;
   gfx::Point GetLocationOnScreenInPixels() const override;
   void SetCapture() override;
   void ReleaseCapture() override;
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
index d98819a1..2c378f14 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
@@ -1208,12 +1208,11 @@
 
 void DesktopWindowTreeHostX11::SetBoundsInPixels(
     const gfx::Rect& requested_bounds_in_pixel,
-    const viz::LocalSurfaceId& local_surface_id,
-    base::TimeTicks local_surface_id_allocation_time) {
+    const viz::LocalSurfaceIdAllocation& local_surface_id_allocation) {
   // On desktop-x11, the callers of SetBoundsInPixels() shouldn't need to (or be
   // able to) allocate LocalSurfaceId for the compositor. Aura itself should
   // allocate the new ids as needed, instead.
-  DCHECK(!local_surface_id.is_valid());
+  DCHECK(!local_surface_id_allocation.IsValid());
 
   gfx::Rect bounds_in_pixels(requested_bounds_in_pixel.origin(),
                              AdjustSize(requested_bounds_in_pixel.size()));
@@ -1266,8 +1265,7 @@
   if (origin_changed)
     native_widget_delegate_->AsWidget()->OnNativeWidgetMove();
   if (size_changed) {
-    OnHostResizedInPixels(bounds_in_pixels.size(), local_surface_id,
-                          local_surface_id_allocation_time);
+    OnHostResizedInPixels(bounds_in_pixels.size(), local_surface_id_allocation);
     ResetWindowRegion();
   }
 }
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
index 00edf45..c547609 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h
@@ -167,9 +167,8 @@
   gfx::Rect GetBoundsInPixels() const override;
   void SetBoundsInPixels(
       const gfx::Rect& requested_bounds_in_pixels,
-      const viz::LocalSurfaceId& local_surface_id = viz::LocalSurfaceId(),
-      base::TimeTicks local_surface_id_allocation_time =
-          base::TimeTicks()) override;
+      const viz::LocalSurfaceIdAllocation& local_surface_id_allocation =
+          viz::LocalSurfaceIdAllocation()) override;
   gfx::Point GetLocationOnScreenInPixels() const override;
   void SetCapture() override;
   void ReleaseCapture() override;
diff --git a/ui/views/widget/native_widget_mac.mm b/ui/views/widget/native_widget_mac.mm
index 9f76453..e47e48c 100644
--- a/ui/views/widget/native_widget_mac.mm
+++ b/ui/views/widget/native_widget_mac.mm
@@ -302,13 +302,11 @@
   if (modal_type == ui::MODAL_TYPE_NONE)
     return;
 
-  // System modal windows not implemented (or used) on Mac.
-  DCHECK_NE(ui::MODAL_TYPE_SYSTEM, modal_type);
-
   // A peculiarity of the constrained window framework is that it permits a
   // dialog of MODAL_TYPE_WINDOW to have a null parent window; falling back to
   // a non-modal window in this case.
-  DCHECK(bridge_host_->parent() || modal_type == ui::MODAL_TYPE_WINDOW);
+  DCHECK(bridge_host_->parent() || modal_type == ui::MODAL_TYPE_WINDOW ||
+         modal_type == ui::MODAL_TYPE_SYSTEM);
 
   // Everything happens upon show.
 }
diff --git a/webrunner/BUILD.gn b/webrunner/BUILD.gn
index dbd11fa6..63749884 100644
--- a/webrunner/BUILD.gn
+++ b/webrunner/BUILD.gn
@@ -338,6 +338,7 @@
 # Puts copies of files at the top level of the CIPD archive's structure.
 copy("restaged_packages") {
   sources = [
+    "$root_gen_dir/webrunner/cast_runner/cast_runner.far",
     "$root_gen_dir/webrunner/chromium/chromium.far",
     "$root_gen_dir/webrunner/net_http/http/http.far",
     "$root_gen_dir/webrunner/web_runner/web_runner.far",
@@ -346,6 +347,7 @@
     "$_artifact_root/{{source_file_part}}",
   ]
   deps = [
+    ":castrunner_pkg",
     ":service_pkg",
     ":webrunner_pkg",
     "net_http:http_pkg",