diff --git a/build/check_gn_headers_whitelist.txt b/build/check_gn_headers_whitelist.txt
index 08f33c4..c268ed1 100644
--- a/build/check_gn_headers_whitelist.txt
+++ b/build/check_gn_headers_whitelist.txt
@@ -200,7 +200,7 @@
 net/dns/notify_watcher_mac.h
 net/http/http_status_code_list.h
 net/http/transport_security_state_static.h
-net/quic/core/stream_notifier_interface.h
+net/quic/core/session_notifier_interface.h
 ppapi/cpp/pass_ref.h
 ppapi/lib/gl/include/GLES2/gl2.h
 ppapi/lib/gl/include/GLES2/gl2ext.h
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index d27de936..731df99a 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -3192,6 +3192,14 @@
      kOsAll,
      FEATURE_VALUE_TYPE(omnibox::kUIExperimentElideSuggestionUrlAfterHost)},
 
+    {"omnibox-ui-hide-steady-state-url-scheme-and-subdomains",
+     flag_descriptions::kOmniboxUIHideSteadyStateUrlSchemeAndSubdomainsName,
+     flag_descriptions::
+         kOmniboxUIHideSteadyStateUrlSchemeAndSubdomainsDescription,
+     kOsAll,
+     FEATURE_VALUE_TYPE(
+         omnibox::kUIExperimentHideSteadyStateUrlSchemeAndSubdomains)},
+
     {"omnibox-ui-hide-suggestion-url-scheme",
      flag_descriptions::kOmniboxUIHideSuggestionUrlSchemeName,
      flag_descriptions::kOmniboxUIHideSuggestionUrlSchemeDescription, kOsAll,
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index d3be5fe..bdfabc4 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -947,6 +947,12 @@
     "Elides the path, query, and ref of suggested URLs in the Omnibox "
     "dropdown.";
 
+const char kOmniboxUIHideSteadyStateUrlSchemeAndSubdomainsName[] =
+    "Omnibox UI Hide Steady-State URL Scheme and Trivial Subdomains";
+const char kOmniboxUIHideSteadyStateUrlSchemeAndSubdomainsDescription[] =
+    "In the Omnibox, hide the scheme and trivial subdomains from steady state "
+    "displayed URLs. Hidden portions are restored during editing.";
+
 const char kOmniboxUIHideSuggestionUrlSchemeName[] =
     "Omnibox UI Hide Suggestion URL Scheme";
 const char kOmniboxUIHideSuggestionUrlSchemeDescription[] =
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
index b0d05c29..410b6fc 100644
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -588,6 +588,9 @@
 extern const char kOmniboxUIElideSuggestionUrlAfterHostName[];
 extern const char kOmniboxUIElideSuggestionUrlAfterHostDescription[];
 
+extern const char kOmniboxUIHideSteadyStateUrlSchemeAndSubdomainsName[];
+extern const char kOmniboxUIHideSteadyStateUrlSchemeAndSubdomainsDescription[];
+
 extern const char kOmniboxUIHideSuggestionUrlSchemeName[];
 extern const char kOmniboxUIHideSuggestionUrlSchemeDescription[];
 
diff --git a/chrome/browser/resources/about_flash.html b/chrome/browser/resources/about_flash.html
index c9d4ad1..fd1f712 100644
--- a/chrome/browser/resources/about_flash.html
+++ b/chrome/browser/resources/about_flash.html
@@ -1,5 +1,5 @@
 <!doctype html>
-<html i18n-values="dir:textdirection;lang:language">
+<html dir="$i18n{textdirection}" lang="$i18n{language}">
 <head>
 <meta charset="utf-8">
 <link rel="stylesheet" href="chrome://resources/css/text_defaults.css">
@@ -14,9 +14,9 @@
 </style>
 </head>
 <body>
-<div id="loading-message" i18n-content="loadingMessage">LOADING_MESSAGE</div>
+<div id="loading-message">$i18n{loadingMessage}</div>
 <div id="body-container" style="visibility:hidden">
-  <div id="header"><h1 i18n-content="flashLongTitle">ABOUT_FLASH</h1></div>
+  <div id="header"><h1>$i18n{flashLongTitle}</h1></div>
 
   <div id="flashInfoTemplate">
     <table cellpadding="2" cellspacing="0" border="0">
diff --git a/chrome/browser/resources/certificate_viewer.html b/chrome/browser/resources/certificate_viewer.html
index e6c3b14..10bb1bb 100644
--- a/chrome/browser/resources/certificate_viewer.html
+++ b/chrome/browser/resources/certificate_viewer.html
@@ -1,5 +1,5 @@
 <!doctype html>
-<html i18n-values="dir:textdirection;lang:language">
+<html dir="$i18n{textdirection}" lang="$i18n{language}">
   <head>
     <meta charset="utf-8">
     <title id="title"></title>
@@ -20,74 +20,74 @@
   <body>
     <tabbox id="tabbox">
       <tabs id="tabs" class="new-style-tabs">
-        <tab i18n-content="general"></tab>
-        <tab i18n-content="details"></tab>
+        <tab>$i18n{general}</tab>
+        <tab>$i18n{details}</tab>
       </tabs>
       <tabpanels id="tabpanels" class="new-style-tabs">
         <!-- General -->
         <tabpanel id="general">
           <!-- Usages -->
-          <h3 id="usages-title" i18n-content="usages"></h3>
+          <h3 id="usages-title">$i18n{usages}</h3>
           <div id="usages"></div>
 
           <div class="groups">
             <!-- Issued to -->
             <div>
-              <h3 i18n-content="issuedTo"></h3>
+              <h3>$i18n{issuedTo}</h3>
             </div>
             <div>
-              <div class="attribute" i18n-content="cn"></div>
+              <div class="attribute">$i18n{cn}</div>
               <div id="issued-cn" class="value"></div>
             </div>
             <div>
-              <div class="attribute" i18n-content="o"></div>
+              <div class="attribute">$i18n{o}</div>
               <div id="issued-o" class="value"></div>
             </div>
             <div>
-              <div class="attribute" i18n-content="ou"></div>
+              <div class="attribute">$i18n{ou}</div>
               <div id="issued-ou" class="value"></div>
             </div>
 
             <!-- Issued by -->
             <div>
-              <h3 i18n-content="issuedBy"></h3>
+              <h3>$i18n{issuedBy}</h3>
             </div>
             <div>
-              <div class="attribute" i18n-content="cn"></div>
+              <div class="attribute">$i18n{cn}</div>
               <div id="issuer-cn" class="value"></div>
             </div>
             <div>
-              <div class="attribute" i18n-content="o"></div>
+              <div class="attribute">$i18n{o}</div>
               <div id="issuer-o" class="value"></div>
             </div>
             <div>
-              <div class="attribute" i18n-content="ou"></div>
+              <div class="attribute">$i18n{ou}</div>
               <div id="issuer-ou" class="value"></div>
             </div>
 
             <!-- Validity -->
             <div>
-              <h3 i18n-content="validity"></h3>
+              <h3>$i18n{validity}</h3>
             </div>
             <div>
-              <div class="attribute" i18n-content="issuedOn"></div>
+              <div class="attribute">$i18n{issuedOn}</div>
               <div id="issue-date" class="value"></div>
             </div>
             <div>
-              <div class="attribute" i18n-content="expiresOn"></div>
+              <div class="attribute">$i18n{expiresOn}</div>
               <div id="expiry-date" class="value"></div>
             </div>
 
             <!-- Fingerprints -->
             <div>
-              <h3 i18n-content="fingerprints"></h3>
+              <h3>$i18n{fingerprints}</h3>
             </div>
             <div>
-              <div class="attribute" i18n-content="sha256"></div>
+              <div class="attribute">$i18n{sha256}</div>
               <div id="sha256" class="value"></div>
             </div>
             <div>
-              <div class="attribute" i18n-content="sha1"></div>
+              <div class="attribute">$i18n{sha1}</div>
               <div id="sha1" class="value"></div>
             </div>
           </div>
@@ -96,20 +96,20 @@
         <!-- Details -->
         <tabpanel>
           <div id="hierarchy-section" class="vertical-box">
-            <h3 i18n-content="hierarchy"></h3>
+            <h3>$i18n{hierarchy}</h3>
             <tree id="hierarchy" class="section-contents"
                 icon-visibility='hidden'></tree>
           </div>
           <div id="cert-fields-section" class="vertical-box">
-            <h3 i18n-content="certFields"></h3>
+            <h3>$i18n{certFields}</h3>
             <tree id="cert-fields" class="section-contents"
                 icon-visibility='hidden'></tree>
           </div>
           <div id="cert-field-value-section" class="vertical-box">
-            <h3 i18n-content="certFieldVal"></h3>
+            <h3>$i18n{certFieldVal}</h3>
             <div id="cert-field-value" class="section-contents"></div>
             <div>
-              <button id="export" i18n-content="export"></button>
+              <button id="export">$i18n{export}</button>
             </div>
           </div>
         </tabpanel>
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js
index e05adba..7fb5a91a 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/automation_predicate.js
@@ -95,7 +95,8 @@
  * @return {boolean}
  */
 AutomationPredicate.editText = function(node) {
-  return node.state.editable && node.parent && !node.parent.state.editable;
+  return node.role == Role.TEXT_FIELD ||
+      (node.state.editable && node.parent && !node.parent.state.editable);
 };
 
 /** @type {AutomationPredicate.Unary} */
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js
index 519ae8c..d8966a2 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors.js
@@ -66,6 +66,7 @@
 var Dir = constants.Dir;
 var Movement = cursors.Movement;
 var RoleType = chrome.automation.RoleType;
+var StateType = chrome.automation.StateType;
 var Unit = cursors.Unit;
 
 /**
@@ -197,8 +198,9 @@
     if (!adjustedNode)
       return null;
 
-    // Make no adjustments if we're within editable content.
-    if (adjustedNode.state.editable)
+    // Make no adjustments if we're within non-rich editable content.
+    if (adjustedNode.state[StateType.EDITABLE] &&
+        !adjustedNode.state[StateType.RICHLY_EDITABLE])
       return adjustedNode;
 
     // Selections over line break nodes are broken.
@@ -236,8 +238,12 @@
     if (!this.node)
       return -1;
 
-    if (this.node.state.editable) {
-      return this.index_ == cursors.NODE_INDEX ? 0 : this.index_;
+    if (this.node.state[StateType.EDITABLE]) {
+      if (!this.node.state[StateType.RICHLY_EDITABLE])
+        return this.index_;
+      return this.index_ == cursors.NODE_INDEX ?
+          (this.node.indexInParent || 0) :
+          this.index_;
     } else if (
         this.node.role == RoleType.INLINE_TEXT_BOX &&
         // Selections under a line break are broken.
@@ -766,6 +772,13 @@
           this.end.selectionIndex_ + 1 :
           this.end.selectionIndex_;
 
+      // Richly editables should always set a caret, but not select. This makes
+      // it possible to navigate through content editables using ChromeVox keys
+      // and not hear selections as you go.
+      if (startNode.state[StateType.RICHLY_EDITABLE] ||
+          endNode.state[StateType.RICHLY_EDITABLE])
+        endIndex = startIndex;
+
       chrome.automation.setDocumentSelection({
         anchorObject: startNode,
         anchorOffset: startIndex,
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs b/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs
index f0b8a9e..20d7dd26 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/cursors_test.extjs
@@ -513,3 +513,86 @@
     assertTrue(text.equals(deep));
   });
 });
+
+TEST_F('CursorsTest', 'SelectionAdjustmentsRichText', function() {
+  this.runWithLoadedTree(function() {/*!
+    <div contenteditable><p>test</p><p>123</p></div>
+  */}, function(root) {
+    var textField = root.firstChild;
+    var paragraph = textField.firstChild;
+    var otherParagraph = textField.lastChild;
+    var staticText = paragraph.firstChild;
+    var otherStaticText = otherParagraph.firstChild;
+
+    // Ranges by default surround a node. Ensure it results in a collapsed
+    // selection.
+    var range = cursors.Range.fromNode(staticText);
+    assertEquals(0, range.start.selectionIndex_);
+    assertEquals(0, range.end.selectionIndex_);
+    assertEquals(paragraph, range.start.selectionNode_);
+    assertEquals(paragraph, range.end.selectionNode_);
+
+    // Text selection.
+    range = new cursors.Range(
+        new cursors.Cursor(staticText, 2),
+        new cursors.Cursor(staticText, 4)
+    );
+    assertEquals(2, range.start.selectionIndex_);
+    assertEquals(4, range.end.selectionIndex_);
+    assertEquals(staticText, range.start.selectionNode_);
+    assertEquals(staticText, range.end.selectionNode_);
+
+    // Tree selection.
+    range = cursors.Range.fromNode(paragraph);
+    assertEquals(0, range.start.selectionIndex_);
+    assertEquals(0, range.end.selectionIndex_);
+    assertEquals(textField, range.start.selectionNode_);
+    assertEquals(textField, range.end.selectionNode_);
+
+    range = cursors.Range.fromNode(otherStaticText);
+    assertEquals(0, range.start.selectionIndex_);
+    assertEquals(0, range.end.selectionIndex_);
+    assertEquals(otherParagraph, range.start.selectionNode_);
+    assertEquals(otherParagraph, range.end.selectionNode_);
+
+    range = cursors.Range.fromNode(otherParagraph);
+    assertEquals(1, range.start.selectionIndex_);
+    assertEquals(1, range.end.selectionIndex_);
+    assertEquals(textField, range.start.selectionNode_);
+    assertEquals(textField, range.end.selectionNode_);
+  });
+});
+
+TEST_F('CursorsTest', 'SelectionAdjustmentsNonRichText', function() {
+  this.runWithLoadedTree(function() {/*!
+    <input type="text"></input>
+    <textarea></textarea>
+  */}, function(root) {
+    var testEditable = function(edit) {
+      // Occurs as part of ordinary (non-text) navigation.
+      var range = cursors.Range.fromNode(edit);
+      assertEquals(-1, range.start.selectionIndex_);
+      assertEquals(-1, range.end.selectionIndex_);
+      assertEquals(edit, range.start.selectionNode_);
+      assertEquals(edit, range.end.selectionNode_);
+
+      // Occurs as a result of explicit text nav e.g. nextCharacter command.
+      range = new cursors.Range(
+          new cursors.Cursor(edit, 2),
+          new cursors.Cursor(edit, 3)
+      );
+      assertEquals(2, range.start.selectionIndex_);
+      assertEquals(3, range.end.selectionIndex_);
+      assertEquals(edit, range.start.selectionNode_);
+      assertEquals(edit, range.end.selectionNode_);
+    };
+
+    var textField = root.firstChild.firstChild;
+    var textArea = root.lastChild.lastChild;
+
+    // Both of these should behave in the same way.
+    testEditable(textField);
+    testEditable(textArea);
+
+  });
+});
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
index eb2ca7af..c64d530 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js
@@ -427,7 +427,7 @@
           $description $state $restriction`
     },
     rootWebArea: {enter: `$name`, speak: `$if($name, $name, $docUrl)`},
-    region: {speak: `$state $nameOrTextContent $description`},
+    region: {speak: `$state $nameOrTextContent $description $roleDescription`},
     row: {enter: `$node(tableRowHeader)`},
     rowHeader: {speak: `$nameOrTextContent $description $state`},
     staticText: {speak: `$name=`},
@@ -452,8 +452,11 @@
           $description`,
     },
     textField: {
-      speak: `$name $value $if($multiline, @tag_textarea,
-          $if($inputType, $inputType, $role)) $description $state $restriction`,
+      speak: `$name $value
+          $if($roleDescription, $roleDescription,
+              $if($multiline, @tag_textarea,
+                  $if($inputType, $inputType, $role)))
+          $description $state $restriction`,
       braille: ``
     },
     timer: {speak: `$nameFromNode $descendants $value $state $description`},
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs
index d8a95353..1797d5e 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output_test.extjs
@@ -883,3 +883,24 @@
                  o.brailleOutputForTest.string_);
   });
 });
+
+TEST_F('OutputE2ETest', 'TextFieldObeysRoleDescription', function() {
+  this.runWithLoadedTree(function(root) {/*!
+    <div role="textbox" aria-roledescription="square"></div>
+    <div role="region" aria-roledescription="circle"></div>
+  */}, function(root) {
+    var text = root.find({role: RoleType.TEXT_FIELD});
+
+    // True even though |text| does not have editable state.
+    assertTrue(AutomationPredicate.editText(text));
+
+    var o = new Output().withRichSpeechAndBraille(cursors.Range.fromNode(text));
+    assertEquals('|square', o.speechOutputForTest.string_);
+    assertEquals('square', o.brailleOutputForTest.string_);
+
+    var region = root.find({role: RoleType.REGION});
+    o = new Output().withRichSpeechAndBraille(cursors.Range.fromNode(region));
+    assertEquals('circle', o.speechOutputForTest.string_);
+    assertEquals('circle', o.brailleOutputForTest.string_);
+  });
+});
diff --git a/chrome/browser/resources/chromeos/network_ui/network_ui.html b/chrome/browser/resources/chromeos/network_ui/network_ui.html
index 44c7630..4d6231e 100644
--- a/chrome/browser/resources/chromeos/network_ui/network_ui.html
+++ b/chrome/browser/resources/chromeos/network_ui/network_ui.html
@@ -1,9 +1,9 @@
 <!doctype html>
-<html i18n-values="dir:textdirection;lang:language">
+<html dir="$i18n{textdirection}" lang="$i18n{language}">
 
 <head>
   <meta charset="utf-8">
-  <title id="network" i18n-content="titleText"></title>
+  <title id="network">$i18n{titleText}</title>
   <link rel="stylesheet" href="chrome://resources/css/text_defaults.css">
   <link rel="stylesheet" href="chrome://network/network_ui.css">
   <link rel="import" href="chrome://resources/cr_elements/chromeos/network/cr_network_icon.html">
@@ -18,10 +18,10 @@
 </head>
 
 <body>
-  <div i18n-content="autoRefreshText"></div>
-  <span i18n-values=".innerHTML:deviceLogLinkText"></span>
+  <div>$i18n{autoRefreshText}</div>
+  <span>$i18nRaw{deviceLogLinkText}</span>
 
-  <h2 i18n-content="globalPolicyLabel"></h2>
+  <h2>$i18n{globalPolicyLabel}</h2>
   <div id="global-policy"></div>
 
   <h2>CrNetworkSelect</h2>
@@ -30,25 +30,25 @@
     </cr-network-select>
   </div>
   <div>
-    <paper-button raised class="colored" id="refresh"
-        i18n-content="networkRefreshText">
+    <paper-button raised class="colored" id="refresh">
+      $i18n{networkRefreshText}
     </paper-button>
   </div>
 
-  <h2 i18n-content="networkListsLabel"></h2>
+  <h2>$i18n{networkListsLabel}</h2>
 
-  <div i18n-content="clickToExpandText"></div>
+  <div>$i18n{clickToExpandText}</div>
   <div>
-    <span i18n-content="propertyFormatText"></span>
+    <span>$i18n{propertyFormatText}</span>
     <select id="get-property-format">
-      <option value="normal" i18n-content="normalFormatOption"></option>
-      <option value="managed" i18n-content="managedFormatOption"></option>
-      <option value="state" i18n-content="stateFormatOption"></option>
-      <option value="shill" i18n-content="shillFormatOption"></option>
+      <option value="normal">$i18n{normalFormatOption}</option>
+      <option value="managed">$i18n{managedFormatOption}</option>
+      <option value="state">$i18n{stateFormatOption}</option>
+      <option value="shill">$i18n{shillFormatOption}</option>
     </select>
   </div>
 
-  <h3 i18n-content="devicesLabel"></h3>
+  <h3>$i18n{devicesLabel}</h3>
   <table id="device-state-table" class="state-table">
     <tr class="state-table-header">
       <td></td>
@@ -58,7 +58,7 @@
     </tr>
   </table>
 
-  <h3 i18n-content="visibleNetworksLabel"></h3>
+  <h3>$i18n{visibleNetworksLabel}</h3>
   <table id="network-state-table" class="state-table">
     <tr class="state-table-header">
       <td></td>
@@ -78,7 +78,7 @@
     </tr>
   </table>
 
-  <h3 i18n-content="favoriteNetworksLabel"></h3>
+  <h3>$i18n{favoriteNetworksLabel}</h3>
   <table id="favorite-state-table" class="state-table">
     <tr class="state-table-header">
       <td></td>
diff --git a/chrome/browser/resources/components.html b/chrome/browser/resources/components.html
index 205945a..cec95199 100644
--- a/chrome/browser/resources/components.html
+++ b/chrome/browser/resources/components.html
@@ -1,15 +1,15 @@
 <!doctype html>
-<html i18n-values="dir:textdirection;lang:language">
+<html dir="$i18n{textdirection}" lang="$i18n{language}">
 <head>
 <meta charset="utf-8">
-<title i18n-content="componentsTitle"></title>
+<title>$i18n{componentsTitle}</title>
 <link rel="stylesheet" href="chrome://resources/css/text_defaults.css">
 <link rel="stylesheet" href="components.css">
 </head>
 <body>
 <div id="body-container" style="visibility:hidden">
 
-  <div id="header"><h1 i18n-content="componentsTitle">TITLE</h1></div>
+  <div id="header"><h1>$i18n{componentsTitle}</h1></div>
   <div id="component-placeholder"></div>
   <div id="component-template" hidden>
 
@@ -17,8 +17,7 @@
     <div id="top" class="wbox">
 
       <div class="section-header">
-        <span class="section-header-title" i18n-content="componentsTitle">
-        </span>
+        <span class="section-header-title">$i18n{componentsTitle}</span>
         <span class="section-header-title"
               jsdisplay="components.length > 0">(<span
               jscontent="components.length"></span>)</span>
@@ -30,7 +29,7 @@
     <div class="content">
       <div class="component-name no-components"
            jsdisplay="components.length === 0">
-        <div i18n-content="noComponents"></div>
+        <div>$i18n{noComponents}</div>
       </div>
 
       <div jsdisplay="components.length > 0">
@@ -43,7 +42,7 @@
                     jscontent="name">
                 </span>
                 <span>
-                  - <span i18n-content="componentVersion"></span>
+                  - <span>$i18n{componentVersion}</span>
                     <span dir="ltr" jscontent="version"
                         jsvalues=".id: 'version-' + id"></span>
                 </span>
@@ -51,14 +50,15 @@
             </div>
           </div>
           <div class="component-text">
-            <span i18n-content="statusLabel"></span>
+            <span>$i18n{statusLabel}</span>
             -
             <span jscontent="status" jsvalues=".id: 'status-' + id">
             <span>
           </div>
           <div class="component-actions">
             <button class="button-check-update" guest-disabled
-                jsvalues=".id:id" i18n-content="checkUpdate">
+                jsvalues=".id:id">
+              $i18n{checkUpdate}
             </button>
           </div>
         </div>
diff --git a/chrome/browser/resources/inline_login/inline_login.html b/chrome/browser/resources/inline_login/inline_login.html
index d7745f7..e7c5f0b 100644
--- a/chrome/browser/resources/inline_login/inline_login.html
+++ b/chrome/browser/resources/inline_login/inline_login.html
@@ -1,7 +1,7 @@
 <!doctype html>
-<html i18n-values="dir:textdirection;lang:language">
+<html dir="$i18n{textdirection}" lang="$i18n{language}">
 <head>
-  <title i18n-content="title"></title>
+  <title>$i18n{title}</title>
   <link rel="import" href="chrome://resources/html/polymer.html">
   <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button.html">
   <link rel="import" href="chrome://resources/polymer/v1_0/iron-icons/iron-icons.html">
diff --git a/chrome/browser/resources/local_discovery/local_discovery.html b/chrome/browser/resources/local_discovery/local_discovery.html
index 9ef41d0..1ba6126 100644
--- a/chrome/browser/resources/local_discovery/local_discovery.html
+++ b/chrome/browser/resources/local_discovery/local_discovery.html
@@ -1,8 +1,8 @@
 <!doctype html>
-<html i18n-values="dir:textdirection;lang:language">
+<html dir="$i18n{textdirection}" lang="$i18n{language}">
 <head>
   <meta charset="utf-8">
-  <title i18n-content="devicesTitle"></title>
+  <title>$i18n{devicesTitle}</title>
   <link rel="stylesheet" href="chrome://resources/css/chrome_shared.css">
   <link rel="stylesheet" href="chrome://resources/css/overlay.css">
   <link rel="stylesheet" href="chrome://resources/css/spinner.css">
@@ -23,7 +23,7 @@
       <div id="register-overlay" class="page">
         <div class="close-button"></div>
         <div id="register-page-confirm" class="register-page">
-          <h1 i18n-content="confirmRegistration"></h1>
+          <h1>$i18n{confirmRegistration}</h1>
           <div class="dialog-contents">
             <div id="register-message">
             </div>
@@ -32,67 +32,68 @@
               <div id="register-overlay-login-promo"
                    class="inline-login-promo"
                    hidden>
-                <span i18n-content="registerNeedLogin"></span>
-                <a is="action-link" id="register-overlay-login-button"
-                    i18n-content="cloudDevicesLogin"></a>
+                <span>$i18n{registerNeedLogin}</span>
+                <a is="action-link" id="register-overlay-login-button">
+                  $i18n{cloudDevicesLogin}
+                </a>
               </div>
-              <button class="register-cancel" i18n-content="cancel"></button>
-              <button id="register-continue-button"
-                      i18n-content="serviceRegister">
+              <button class="register-cancel">$i18n{cancel}</button>
+              <button id="register-continue-button">
+                $i18n{serviceRegister}
               </button>
           </div>
           </div>
         </div>
 
         <div id="register-printer-page-adding1" class="register-page">
-          <h1 i18n-content="addingPrinter"></h1>
+          <h1>$i18n{addingPrinter}</h1>
           <div class="dialog-contents">
-            <div i18n-content="addingPrinterMessage1"></div>
+            <div>$i18n{addingPrinterMessage1}</div>
             <div class="button-list">
-              <button class="register-cancel" i18n-content="cancel"></button>
+              <button class="register-cancel">$i18n{cancel}</button>
             </div>
           </div>
         </div>
 
         <div id="register-printer-page-adding2" class="register-page">
-          <h1 i18n-content="addingPrinter"></h1>
+          <h1>$i18n{addingPrinter}</h1>
           <div class="dialog-contents">
             <div class="inline-spinner"> </div>
-            <span i18n-content="addingPrinterMessage2"></span>
+            <span>$i18n{addingPrinterMessage2}</span>
             <div class="button-list">
-              <button class="register-cancel" i18n-content="cancel"></button>
+              <button class="register-cancel">$i18n{cancel}</button>
             </div>
           </div>
         </div>
 
         <div id="register-device-page-adding1" class="register-page">
-          <h1 i18n-content="addingDevice"></h1>
+          <h1>$i18n{addingDevice}</h1>
           <div class="dialog-contents">
-            <div i18n-content="addingDeviceMessage1"></div>
+            <div>$i18n{addingDeviceMessage1}</div>
             <div class="button-list">
-              <button class="register-cancel" i18n-content="cancel"></button>
+              <button class="register-cancel">$i18n{cancel}</button>
             </div>
           </div>
         </div>
 
         <div id="register-device-page-adding2" class="register-page">
-          <h1 i18n-content="addingDevice"></h1>
+          <h1>$i18n{addingDevice}</h1>
           <div class="dialog-contents">
-            <div i18n-content="addingDeviceConfirmCodeMessage"></div>
+            <div>$i18n{addingDeviceConfirmCodeMessage}</div>
             <h1 id="register-device-page-code"></h1>
             <div class="button-list">
-              <button class="register-cancel" i18n-content="cancel"></button>
-              <button class="confirm-code" i18n-content="confirmCode"></button>
+              <button class="register-cancel">$i18n{cancel}</button>
+              <button class="confirm-code">$i18n{confirmCode}</button>
             </div>
           </div>
         </div>
 
         <div id="register-page-error" class="register-page">
-          <h1 i18n-content="addingError"></h1>
+          <h1>$i18n{addingError}</h1>
           <div class="dialog-contents">
-            <div i18n-content="addingErrorMessage" id="error-message"></div>
+            <div id="error-message">$i18n{addingErrorMessage}</div>
             <div class="button-list">
-              <button id="register-error-exit" i18n-content="ok"></button>
+              <button id="register-error-exit">$i18n{ok}</button>
             </div>
           </div>
         </div>
@@ -101,30 +102,30 @@
 
     <header>
       <a is="action-link" id="back-link" hidden>
-        <span i18n-content="backButton"></span>
+        <span>$i18n{backButton}</span>
       </a>
-      <h1 i18n-content="devicesTitle"></h1>
+      <h1>$i18n{devicesTitle}</h1>
     </header>
 
     <div class="controls" id="printers">
-      <h2 i18n-content="availableDevicesTitle"></h2>
+      <h2>$i18n{availableDevicesTitle}</h2>
 
       <div id="register-login-promo" class="login-promo cloud-print-message"
            hidden>
-        <span i18n-content="registerNeedLogin"></span>
-        <a is="action-link" id="register-login-link"
-            i18n-content="cloudDevicesLogin"></a>
+        <span>$i18n{registerNeedLogin}</span>
+        <a is="action-link" id="register-login-link">
+          $i18n{cloudDevicesLogin}
+        </a>
       </div>
-      <div id="no-printers-message"
-           class="cloud-print-message"
-           i18n-content="noPrintersOnNetworkExplanation">
+      <div id="no-printers-message" class="cloud-print-message">
+        $i18n{noPrintersOnNetworkExplanation}
       </div>
 
       <div class="devices" id="register-device-list"></div>
 
       <if expr="not chromeos">
         <section id="cloud-print-connector-section">
-          <h2 i18n-content="titleConnector"></h2>
+          <h2>$i18n{titleConnector}</h2>
           <div>
             <p id="cloudPrintConnectorLabel" class="settings-row"></p>
 
@@ -137,21 +138,23 @@
     </div>
 
     <div id="my-devices-container">
-    <h2 i18n-content="myDevicesTitle"></h2>
+    <h2>$i18n{myDevicesTitle}</h2>
     <div id="cloud-devices-loading" class="cloud-print-message" hidden>
-      <div class="inline-spinner"> </div> <span i18n-content="loading"></span>
+      <div class="inline-spinner"> </div> <span>$i18n{loading}</span>
     </div>
     <div id="cloud-devices-login-promo" class="login-promo cloud-print-message"
          hidden>
-      <span i18n-content="cloudDevicesNeedLogin"></span>
-      <a is="action-link" id="cloud-devices-login-link"
-          i18n-content="cloudDevicesLogin"></a>
+      <span>$i18n{cloudDevicesNeedLogin}</span>
+      <a is="action-link" id="cloud-devices-login-link">
+        $i18n{cloudDevicesLogin}
+      </a>
     </div>
     <div id="cloud-devices-unavailable"
          class="cloud-print-message" hidden>
-      <span i18n-content="cloudDevicesUnavailable"></span>
-      <a is="action-link" role="button" id="cloud-devices-retry-link"
-          i18n-content="retryLoadCloudDevices"></a>
+      <span>$i18n{cloudDevicesUnavailable}</span>
+      <a is="action-link" role="button" id="cloud-devices-retry-link">
+        $i18n{retryLoadCloudDevices}
+      </a>
     </div>
     <div id="cloud-devices">
 
diff --git a/chrome/browser/resources/media/webrtc_logs.html b/chrome/browser/resources/media/webrtc_logs.html
index 99e54d0..7bd34ac 100644
--- a/chrome/browser/resources/media/webrtc_logs.html
+++ b/chrome/browser/resources/media/webrtc_logs.html
@@ -1,8 +1,8 @@
 <!doctype html>
-<html i18n-values="dir:textdirection;lang:language">
+<html dir="$i18n{textdirection}" lang="$i18n{language}">
 <head>
   <meta charset="utf-8">
-  <title i18n-content="webrtcLogsTitle"></title>
+  <title>$i18n{webrtcLogsTitle}</title>
   <link rel="stylesheet" href="chrome://resources/css/text_defaults.css">
   <link rel="stylesheet" href="webrtc_logs.css">
   <script src="chrome://resources/js/load_time_data.js"></script>
@@ -11,10 +11,10 @@
   <script src="chrome://webrtc-logs/webrtc_logs.js"></script>
 </head>
 <body>
-  <header><h1 i18n-content="webrtcLogsTitle"></h1></header>
+  <header><h1>$i18n{webrtcLogsTitle}</h1></header>
   <h2 id="log-banner"></h2>
   <div id="log-list"></div>
-  <p id="no-logs" i18n-content="noLogsMessage" hidden></p>
+  <p id="no-logs" hidden>$i18n{noLogsMessage}</p>
   <script src="chrome://resources/js/i18n_template.js"></script>
   <script src="chrome://resources/js/jstemplate_compiled.js"></script>
 </body>
diff --git a/chrome/browser/resources/policy.html b/chrome/browser/resources/policy.html
index 804f44a..e03b6758 100644
--- a/chrome/browser/resources/policy.html
+++ b/chrome/browser/resources/policy.html
@@ -1,9 +1,9 @@
 <!doctype html>
-<html i18n-values="dir:textdirection;lang:language">
+<html dir="$i18n{textdirection}" lang="$i18n{language}">
 <head>
 <meta charset="utf-8">
 <meta name="viewport" content="width=device-width, user-scalable=no">
-<title i18n-content="title"></title>
+<title>$i18n{title}</title>
 
 <link rel="stylesheet" href="chrome://resources/css/chrome_shared.css">
 <link rel="stylesheet" href="uber_shared.css">
@@ -21,35 +21,34 @@
   <div id="filter-overlay" class="page">
     <header>
       <input id="filter" class="search-field-container" type="search"
-          i18n-values="placeholder:filterPlaceholder;
-                       aria-label:filterPlaceholder" incremental>
+          placeholder="$i18n{filterPlaceholder}"
+          aria-label="$i18n{filterPlaceholder}" incremental>
     </header>
   </div>
   <div class="page">
     <header>
-      <h1 i18n-content="title"></h1>
+      <h1>$i18n{title}</h1>
     </header>
     <section class="reload-show-unset-section">
       <div class="left-aligned-button">
-        <button id="reload-policies" i18n-content="reloadPolicies"></button>
+        <button id="reload-policies">$i18n{reloadPolicies}</button>
       </div>
       <div class="left-aligned-button">
-        <button id="export-policies" i18n-content="exportPoliciesJSON">
-        </button>
+        <button id="export-policies">$i18n{exportPoliciesJSON}</button>
       </div>
       <div class="chrome-for-work">
          <a href="http://g.co/chromeent/learn" target="_blank">
-           <span i18n-content="chromeForWork"></span></a>
+           <span>$i18n{chromeForWork}</span></a>
       </div>
       <div id="show-unset-container" class="show-unset-checkbox">
         <label>
           <input id="show-unset" type="checkbox">
-          <span i18n-content="showUnset"></span>
+          <span>$i18n{showUnset}</span>
         </label>
       </div>
     </section>
     <section id="status-section" class="status-box-section" hidden>
-      <h3 i18n-content="status"></h3>
+      <h3>$i18n{status}</h3>
       <div id="status-box-container"></div>
     </section>
     <section id="main-section" class="empty">
@@ -60,43 +59,43 @@
     <fieldset id="status-box-template">
       <legend class="legend"></legend>
       <div class="status-entry" hidden>
-        <div class="label" i18n-content="labelEnterpriseEnrollmentDomain"></div>
+        <div class="label">$i18n{labelEnterpriseEnrollmentDomain}</div>
         <div class="enterprise-enrollment-domain"></div>
       </div>
       <div class="status-entry" hidden>
-        <div class="label" i18n-content="labelEnterpriseDisplayDomain"></div>
+        <div class="label">$i18n{labelEnterpriseDisplayDomain}</div>
         <div class="enterprise-display-domain"></div>
       </div>
       <div class="status-entry" hidden>
-        <div class="label" i18n-content="labelUsername"></div>
+        <div class="label">$i18n{labelUsername}</div>
         <div class="username"></div>
       </div>
       <div class="status-entry">
-        <div class="label" i18n-content="labelClientId"></div>
+        <div class="label">$i18n{labelClientId}</div>
         <div class="client-id"></div>
       </div>
       <div class="status-entry" hidden>
-        <div class="label" i18n-content="labelAssetId"></div>
+        <div class="label">$i18n{labelAssetId}</div>
         <div class="asset-id"></div>
       </div>
       <div class="status-entry" hidden>
-        <div class="label" i18n-content="labelLocation"></div>
+        <div class="label">$i18n{labelLocation}</div>
         <div class="location"></div>
       </div>
       <div class="status-entry" hidden>
-        <div class="label" i18n-content="labelDirectoryApiId"></div>
+        <div class="label">$i18n{labelDirectoryApiId}</div>
         <div class="directory-api-id"></div>
       </div>
       <div class="status-entry">
-        <div class="label" i18n-content="labelTimeSinceLastRefresh"></div>
+        <div class="label">$i18n{labelTimeSinceLastRefresh}</div>
         <div class="time-since-last-refresh"></div>
       </div>
       <div class="status-entry">
-        <div class="label" i18n-content="labelRefreshInterval"></div>
+        <div class="label">$i18n{labelRefreshInterval}</div>
         <div class="refresh-interval"></div>
       </div>
       <div class="status-entry">
-        <div class="label" i18n-content="labelStatus"></div>
+        <div class="label">$i18n{labelStatus}</div>
         <div class="status"></div>
       </div>
     </fieldset>
diff --git a/chrome/browser/resources/print_preview/new/app.js b/chrome/browser/resources/print_preview/new/app.js
index 51b7153..089e3aa0 100644
--- a/chrome/browser/resources/print_preview/new/app.js
+++ b/chrome/browser/resources/print_preview/new/app.js
@@ -236,8 +236,8 @@
     [['dpi', 'dpi'], ['mediaSize', 'mediaSize'], ['margins', 'marginsType'],
      ['color', 'isColorEnabled'], ['headerFooter', 'isHeaderFooterEnabled'],
      ['layout', 'isLandscapeEnabled'], ['collate', 'isCollateEnabled'],
-     ['fitToPage', 'isFitToPageEnabled'],
-     ['cssBackground', 'isCssBackgroundEnabled'], ['scaling', 'scaling'],
+     ['scaling', 'scaling'], ['fitToPage', 'isFitToPageEnabled'],
+     ['cssBackground', 'isCssBackgroundEnabled'],
     ].forEach(keys => updateIfDefined(keys[0], keys[1]));
   },
 });
diff --git a/chrome/browser/resources/print_preview/new/model.js b/chrome/browser/resources/print_preview/new/model.js
index 2698161..949dc39 100644
--- a/chrome/browser/resources/print_preview/new/model.js
+++ b/chrome/browser/resources/print_preview/new/model.js
@@ -199,7 +199,6 @@
     const knownSizeToSaveAsPdf = isSaveToPdf &&
         (!this.documentInfo.isModifiable ||
          this.documentInfo.hasCssMediaStyles);
-
     this.set('settings.copies.available', !!caps && !!(caps.copies));
     this.set('settings.collate.available', !!caps && !!(caps.collate));
     this.set('settings.layout.available', this.isLayoutAvailable_(caps));
diff --git a/chrome/browser/resources/print_preview/new/scaling_settings.html b/chrome/browser/resources/print_preview/new/scaling_settings.html
index 6386cd27..fbb0f214 100644
--- a/chrome/browser/resources/print_preview/new/scaling_settings.html
+++ b/chrome/browser/resources/print_preview/new/scaling_settings.html
@@ -14,10 +14,10 @@
         default-value="100" input-label="$i18n{scalingLabel}"
         input-string="{{inputString_}}" input-valid="{{inputValid_}}"
         hint-message="$i18n{scalingInstruction}" class="multirow-controls">
-      <div slot="opt-outside-content" id="fit-to-page-container"
-          class="checkbox" hidden$="[[!settings.fitToPage.available]]">
+      <div slot="opt-outside-content" class="checkbox"
+          hidden$="[[!settings.fitToPage.available]]">
         <label aria-live="polite">
-          <input class="checkbox" type="checkbox"
+          <input type="checkbox" id="fit-to-page-checkbox"
               on-change="onFitToPageChange_">
           <span>$i18n{optionFitToPage}</span>
         </label>
diff --git a/chrome/browser/resources/print_preview/new/scaling_settings.js b/chrome/browser/resources/print_preview/new/scaling_settings.js
index a6495e8..81177719 100644
--- a/chrome/browser/resources/print_preview/new/scaling_settings.js
+++ b/chrome/browser/resources/print_preview/new/scaling_settings.js
@@ -24,57 +24,73 @@
   /** @private {number} */
   fitToPageFlag_: 0,
 
-  /** @private {boolean} */
-  isInitialized_: false,
-
   observers: [
-    'onInputChanged_(inputString_, inputValid_, documentInfo.isModifiable)',
-    'onInitialized_(settings.scaling.value)'
+    'onFitToPageSettingChange_(settings.fitToPage.value, ' +
+        'settings.fitToPage.available, documentInfo.fitToPageScaling)',
+    'onInputChanged_(inputString_, inputValid_)',
+    'onScalingSettingChanged_(settings.scaling.value)',
   ],
 
-  /**
-   * Updates the input string when the setting has been initialized.
-   * @private
-   */
-  onInitialized_: function() {
-    // Avoid loops from setting inputString_ -> onInputChanged_ sets scaling
-    // value -> onInitialized_ sets inputString_
-    if (this.isInitialized_)
+  /** @private */
+  onFitToPageSettingChange_: function() {
+    const fitToPage = this.getSetting('fitToPage');
+    if (!fitToPage.available)
       return;
-    this.isInitialized_ = true;
-    const scaling = this.getSetting('scaling');
-    this.inputString_ = /** @type {string} */ (scaling.value);
+    this.$$('#fit-to-page-checkbox').checked = fitToPage.value;
+    if (!fitToPage.value) {
+      // Fit to page is no longer checked. Update the display.
+      this.inputString_ = this.lastValidScaling_;
+    } else if (fitToPage.value) {
+      // Set flag to number of expected calls to onInputChanged_. If scaling
+      // is valid, 1 call will occur due to the change to |inputString_|. If
+      // not, 2 calls will occur, since |inputValid_| will also change.
+      this.fitToPageFlag_ = this.inputValid_ ? 1 : 2;
+      this.inputString_ = this.documentInfo.fitToPageScaling;
+    }
   },
 
   /**
-   * Updates model.settings.scaling based on the validity and current value of
-   * the scaling input.
+   * Updates the input string when scaling setting is set.
+   * @private
+   */
+  onScalingSettingChanged_: function() {
+    // Update last valid scaling and ensure input string matches.
+    this.lastValidScaling_ =
+        /** @type {string} */ (this.getSetting('scaling').value);
+    this.inputString_ = this.lastValidScaling_;
+  },
+
+  /**
+   * Updates scaling and fit to page settings based on the validity and current
+   * value of the scaling input.
    * @private
    */
   onInputChanged_: function() {
-    if (this.fitToPageFlag_ > 0) {
+    const fitToPage = this.$$('#fit-to-page-checkbox').checked;
+    if (fitToPage && this.fitToPageFlag_ == 0) {
+      // User modified scaling while fit to page was checked. Uncheck fit to
+      // page.
+      if (this.inputValid_)
+        this.setSetting('scaling', this.inputString_);
+      else
+        this.setSettingValid('scaling', false);
+      this.$$('#fit-to-page-checkbox').checked = false;
+      this.setSetting('fitToPage', false);
+    } else if (fitToPage) {
+      // Fit to page was checked and scaling changed as a result.
       this.fitToPageFlag_--;
+      this.setSettingValid('scaling', true);
     } else {
-      const checkbox = this.$$('.checkbox input[type="checkbox"]');
-      if (checkbox.checked && !this.documentInfo.isModifiable) {
-        checkbox.checked = false;
-      } else if (this.inputValid_) {
-        this.lastValidScaling_ = this.inputString_;
-      }
-      this.setSetting('scaling', this.inputString_);
+      // User modified scaling while fit to page was not checked or
+      // scaling setting was set.
+      this.setSettingValid('scaling', this.inputValid_);
+      if (this.inputValid_)
+        this.setSetting('scaling', this.inputString_);
     }
-    this.setSettingValid('scaling', this.inputValid_);
   },
 
-  /**
-   * Updates scaling as needed based on the value of the fit to page checkbox.
-   */
+  /** @private */
   onFitToPageChange_: function() {
-    if (this.$$('.checkbox input[type="checkbox"]').checked) {
-      this.fitToPageFlag_ = 2;
-      this.set('inputString_', this.documentInfo.fitToPageScaling);
-    } else {
-      this.set('inputString_', this.lastValidScaling_);
-    }
+    this.setSetting('fitToPage', this.$$('#fit-to-page-checkbox').checked);
   },
 });
diff --git a/chrome/browser/resources/translate_internals/prefs.html b/chrome/browser/resources/translate_internals/prefs.html
index 5b84ad8..21b2f18 100644
--- a/chrome/browser/resources/translate_internals/prefs.html
+++ b/chrome/browser/resources/translate_internals/prefs.html
@@ -31,7 +31,7 @@
   </section>
   <section id="prefs-cld-version">
     <h2>CLD Version</h2>
-    <p i18n-content="cld-version"></p>
+    <p>$i18n{cld-version}</p>
   </section>
 </div>
 <div>
diff --git a/chrome/browser/ui/webui/policy_tool_ui_browsertest.cc b/chrome/browser/ui/webui/policy_tool_ui_browsertest.cc
index 47504fb..59b0abf 100644
--- a/chrome/browser/ui/webui/policy_tool_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/policy_tool_ui_browsertest.cc
@@ -268,7 +268,8 @@
   EXPECT_EQ(test_policies, *values);
 }
 
-IN_PROC_BROWSER_TEST_F(PolicyToolUITest, Editing) {
+// Flaky on all platforms, see https://crbug.com/797446
+IN_PROC_BROWSER_TEST_F(PolicyToolUITest, DISABLED_Editing) {
   ui_test_utils::NavigateToURL(browser(), GURL("chrome://policy-tool"));
 
   // Change one policy value and get its name.
diff --git a/chrome/test/data/webui/print_preview/new_print_preview_ui_browsertest.js b/chrome/test/data/webui/print_preview/new_print_preview_ui_browsertest.js
index 9099613..5858ebed 100644
--- a/chrome/test/data/webui/print_preview/new_print_preview_ui_browsertest.js
+++ b/chrome/test/data/webui/print_preview/new_print_preview_ui_browsertest.js
@@ -117,6 +117,10 @@
   this.runMochaTest(settings_sections_tests.TestNames.SetMargins);
 });
 
+TEST_F('PrintPreviewSettingsSectionsTest', 'SetScaling', function() {
+  this.runMochaTest(settings_sections_tests.TestNames.SetScaling);
+});
+
 PrintPreviewRestoreStateTest = class extends NewPrintPreviewTest {
   /** @override */
   get browsePreload() {
diff --git a/chrome/test/data/webui/print_preview/settings_section_test.js b/chrome/test/data/webui/print_preview/settings_section_test.js
index 6b1e744..9cf11fdf 100644
--- a/chrome/test/data/webui/print_preview/settings_section_test.js
+++ b/chrome/test/data/webui/print_preview/settings_section_test.js
@@ -19,6 +19,7 @@
     SetMediaSize: 'set media size',
     SetDpi: 'set dpi',
     SetMargins: 'set margins',
+    SetScaling: 'set scaling',
   };
 
   const suiteName = 'SettingsSectionsTests';
@@ -47,6 +48,8 @@
     function setPdfDocument(isPdf) {
       const info = new print_preview.DocumentInfo();
       info.init(!isPdf, 'title', false);
+      if (isPdf)
+        info.fitToPageScaling_ = '98';
       page.set('documentInfo_', info);
     }
 
@@ -223,7 +226,7 @@
 
       // HTML to non-PDF destination -> only input shown
       setPdfDocument(false);
-      const fitToPageContainer = scalingElement.$$('#fit-to-page-container');
+      const fitToPageContainer = scalingElement.$$('.checkbox');
       const scalingInput =
           scalingElement.$$('print-preview-number-settings-section')
               .$$('.user-value');
@@ -430,6 +433,68 @@
           print_preview_new.MarginsTypeValue.MINIMUM,
           page.settings.margins.value);
     });
+
+    test(assert(TestNames.SetScaling), function() {
+      // Set PDF so both scaling and fit to page are active.
+      setPdfDocument(true);
+      const scalingElement = page.$$('print-preview-scaling-settings');
+      expectEquals(false, scalingElement.hidden);
+
+      // Default is 100
+      const scalingInput =
+          scalingElement.$$('print-preview-number-settings-section')
+              .$$('input');
+      const fitToPageCheckbox =
+          scalingElement.$$('#fit-to-page-checkbox');
+
+      const validateScalingState = (scalingValue, scalingValid, fitToPage) => {
+        // Invalid scalings are always set directly in the input, so no need to
+        // verify that the input matches them.
+        if (scalingValid) {
+          const scalingDisplay =
+              fitToPage ? page.documentInfo_.fitToPageScaling : scalingValue;
+          expectEquals(scalingDisplay, scalingInput.value);
+        }
+        expectEquals(scalingValue, page.settings.scaling.value);
+        expectEquals(scalingValid, page.settings.scaling.valid);
+        expectEquals(fitToPage, fitToPageCheckbox.checked);
+        expectEquals(fitToPage, page.settings.fitToPage.value);
+      };
+      validateScalingState('100', true, false);
+
+      // Change to 105
+      scalingInput.value = '105';
+      scalingInput.dispatchEvent(new CustomEvent('input'));
+      validateScalingState('105', true, false);
+
+      // Change to fit to page. Should display fit to page scaling but not
+      // alter the scaling setting.
+      fitToPageCheckbox.checked = true;
+      fitToPageCheckbox.dispatchEvent(new CustomEvent('change'));
+      validateScalingState('105', true, true);
+
+      // Set scaling. Should uncheck fit to page and set the settings for
+      // scaling and fit to page.
+      scalingInput.value = '95';
+      scalingInput.dispatchEvent(new CustomEvent('input'));
+      validateScalingState('95', true, false);
+
+      // Set scaling to something invalid. Should change setting validity but
+      // not value.
+      scalingInput.value = '5';
+      scalingInput.dispatchEvent(new CustomEvent('input'));
+      validateScalingState('95', false, false);
+
+      // Check fit to page. Should set scaling valid.
+      fitToPageCheckbox.checked = true;
+      fitToPageCheckbox.dispatchEvent(new CustomEvent('change'));
+      validateScalingState('95', true, true);
+
+      // Uncheck fit to page. Should reset scaling to last valid.
+      fitToPageCheckbox.checked = false;
+      fitToPageCheckbox.dispatchEvent(new CustomEvent('change'));
+      validateScalingState('95', true, false);
+    });
   });
 
   return {
diff --git a/components/domain_reliability/quic_error_mapping.cc b/components/domain_reliability/quic_error_mapping.cc
index d053504..f322b47 100644
--- a/components/domain_reliability/quic_error_mapping.cc
+++ b/components/domain_reliability/quic_error_mapping.cc
@@ -235,8 +235,9 @@
     // Stream frame overlaps with buffered data.
     {net::QUIC_OVERLAPPING_STREAM_DATA, "quic.overlapping_stream_data"},
     // Stream frames arrived too discontiguously so that stream sequencer buffer
-    // has too many gaps.
-    {net::QUIC_TOO_MANY_FRAME_GAPS, "quic.too_many_frame_gaps"},
+    // maintains too many intervals.
+    {net::QUIC_TOO_MANY_STREAM_DATA_INTERVALS,
+     "quic.too_many_stream_data_intervals"},
     // Sequencer buffer get into weird state where continuing read/write
     // will lead to crash.
     {net::QUIC_STREAM_SEQUENCER_INVALID_STATE,
diff --git a/components/omnibox/browser/omnibox_field_trial.cc b/components/omnibox/browser/omnibox_field_trial.cc
index 1c03cbb..440fa98 100644
--- a/components/omnibox/browser/omnibox_field_trial.cc
+++ b/components/omnibox/browser/omnibox_field_trial.cc
@@ -107,6 +107,12 @@
     "OmniboxUIExperimentElideSuggestionUrlAfterHost",
     base::FEATURE_DISABLED_BY_DEFAULT};
 
+// Feature used to hide the scheme and trivial subdomains from steady state
+// URLs displayed in the Omnibox. Hidden portions are restored during editing.
+const base::Feature kUIExperimentHideSteadyStateUrlSchemeAndSubdomains{
+    "OmniboxUIExperimentHideSteadyStateUrlSchemeAndSubdomains",
+    base::FEATURE_DISABLED_BY_DEFAULT};
+
 // Feature used for hiding the suggestion URL scheme as a UI experiment.
 const base::Feature kUIExperimentHideSuggestionUrlScheme{
     "OmniboxUIExperimentHideSuggestionUrlScheme",
diff --git a/components/omnibox/browser/omnibox_field_trial.h b/components/omnibox/browser/omnibox_field_trial.h
index 2ffeb6a..6965048 100644
--- a/components/omnibox/browser/omnibox_field_trial.h
+++ b/components/omnibox/browser/omnibox_field_trial.h
@@ -44,6 +44,7 @@
 extern const base::Feature kZeroSuggestSwapTitleAndUrl;
 extern const base::Feature kDisplayTitleForCurrentUrl;
 extern const base::Feature kUIExperimentElideSuggestionUrlAfterHost;
+extern const base::Feature kUIExperimentHideSteadyStateUrlSchemeAndSubdomains;
 extern const base::Feature kUIExperimentHideSuggestionUrlScheme;
 extern const base::Feature kUIExperimentHideSuggestionUrlTrivialSubdomains;
 extern const base::Feature kUIExperimentMaxAutocompleteMatches;
diff --git a/content/public/renderer/render_frame.h b/content/public/renderer/render_frame.h
index d7d01b4..a36ff10 100644
--- a/content/public/renderer/render_frame.h
+++ b/content/public/renderer/render_frame.h
@@ -230,8 +230,6 @@
   // Adds |message| to the DevTools console.
   virtual void AddMessageToConsole(ConsoleMessageLevel level,
                                    const std::string& message) = 0;
-  // Forcefully detaches all connected DevTools clients.
-  virtual void DetachDevToolsForTest() = 0;
 
   // Sets the PreviewsState of this frame, a bitmask of potentially several
   // Previews optimizations.
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index c2c5ab4..3c6f2fa 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -2965,10 +2965,6 @@
   frame_->AddMessageToConsole(wcm);
 }
 
-void RenderFrameImpl::DetachDevToolsForTest() {
-  frame_->DetachAllDevToolsSessionsForTesting();
-}
-
 void RenderFrameImpl::SetPreviewsState(PreviewsState previews_state) {
   previews_state_ = previews_state;
 }
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 84679a6a..d7fbee8 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -484,7 +484,6 @@
                        const gfx::Range& range) override;
   void AddMessageToConsole(ConsoleMessageLevel level,
                            const std::string& message) override;
-  void DetachDevToolsForTest() override;
   void SetPreviewsState(PreviewsState previews_state) override;
   PreviewsState GetPreviewsState() const override;
   bool IsPasting() const override;
diff --git a/content/shell/browser/layout_test/blink_test_controller.cc b/content/shell/browser/layout_test/blink_test_controller.cc
index 4819c4d2..616d1075 100644
--- a/content/shell/browser/layout_test/blink_test_controller.cc
+++ b/content/shell/browser/layout_test/blink_test_controller.cc
@@ -478,8 +478,7 @@
   devtools_window_ = main_window_;
   Shell* secondary = SecondaryWindow();
   devtools_bindings_ = std::make_unique<LayoutTestDevToolsBindings>(
-      devtools_window_->web_contents(), secondary->web_contents(), "",
-      test_url_, true);
+      devtools_window_->web_contents(), secondary->web_contents(), test_url_);
 }
 
 bool BlinkTestController::ResetAfterLayoutTest() {
@@ -578,10 +577,6 @@
     IPC_MESSAGE_HANDLER(ShellViewHostMsg_TestFinished, OnTestFinished)
     IPC_MESSAGE_HANDLER(ShellViewHostMsg_NavigateSecondaryWindow,
                         OnNavigateSecondaryWindow)
-    IPC_MESSAGE_HANDLER(ShellViewHostMsg_ShowDevTools, OnShowDevTools)
-    IPC_MESSAGE_HANDLER(ShellViewHostMsg_EvaluateInDevTools,
-                        OnEvaluateInDevTools)
-    IPC_MESSAGE_HANDLER(ShellViewHostMsg_CloseDevTools, OnCloseDevTools)
     IPC_MESSAGE_HANDLER(ShellViewHostMsg_GoToOffset, OnGoToOffset)
     IPC_MESSAGE_HANDLER(ShellViewHostMsg_Reload, OnReload)
     IPC_MESSAGE_HANDLER(ShellViewHostMsg_LoadURLForFrame, OnLoadURLForFrame)
@@ -976,26 +971,6 @@
     devtools_bindings_->Attach();
 }
 
-void BlinkTestController::OnShowDevTools(const std::string& settings,
-                                         const std::string& frontend_url) {
-  devtools_window_ = SecondaryWindow();
-  devtools_bindings_ = std::make_unique<LayoutTestDevToolsBindings>(
-      devtools_window_->web_contents(), main_window_->web_contents(), settings,
-      GURL(frontend_url), false);
-  devtools_window_->web_contents()->GetRenderViewHost()->GetWidget()->Focus();
-  devtools_window_->web_contents()->Focus();
-}
-
-void BlinkTestController::OnEvaluateInDevTools(
-    int call_id, const std::string& script) {
-  if (devtools_bindings_)
-    devtools_bindings_->EvaluateInFrontend(call_id, script);
-}
-
-void BlinkTestController::OnCloseDevTools() {
-  devtools_bindings_.reset();
-}
-
 void BlinkTestController::OnGoToOffset(int offset) {
   main_window_->GoBackOrForward(offset);
 }
diff --git a/content/shell/browser/layout_test/blink_test_controller.h b/content/shell/browser/layout_test/blink_test_controller.h
index c22cdd3b..c927c3c 100644
--- a/content/shell/browser/layout_test/blink_test_controller.h
+++ b/content/shell/browser/layout_test/blink_test_controller.h
@@ -212,10 +212,6 @@
   void OnSetPopupBlockingEnabled(bool block_popups);
   void OnTestFinished();
   void OnNavigateSecondaryWindow(const GURL& url);
-  void OnShowDevTools(const std::string& settings,
-                      const std::string& frontend_url);
-  void OnEvaluateInDevTools(int call_id, const std::string& script);
-  void OnCloseDevTools();
   void OnGoToOffset(int offset);
   void OnReload();
   void OnLoadURLForFrame(const GURL& url, const std::string& frame_name);
diff --git a/content/shell/browser/layout_test/layout_test_browser_main.cc b/content/shell/browser/layout_test/layout_test_browser_main.cc
index 781f88e..289894f 100644
--- a/content/shell/browser/layout_test/layout_test_browser_main.cc
+++ b/content/shell/browser/layout_test/layout_test_browser_main.cc
@@ -42,8 +42,12 @@
 bool RunOneTest(
     const content::TestInfo& test_info,
     bool* ran_at_least_once,
+    content::BlinkTestController* blink_test_controller,
     const std::unique_ptr<content::BrowserMainRunner>& main_runner) {
-  if (!content::BlinkTestController::Get()->PrepareForLayoutTest(
+  DCHECK(ran_at_least_once);
+  DCHECK(blink_test_controller);
+
+  if (!blink_test_controller->PrepareForLayoutTest(
           test_info.url, test_info.current_working_directory,
           test_info.enable_pixel_dumping, test_info.expected_pixel_hash)) {
     return false;
@@ -60,7 +64,7 @@
   main_runner->Run();
 #endif
 
-  if (!content::BlinkTestController::Get()->ResetAfterLayoutTest())
+  if (!blink_test_controller->ResetAfterLayoutTest())
     return false;
 
 #if defined(OS_ANDROID)
@@ -90,8 +94,10 @@
   bool ran_at_least_once = false;
   std::unique_ptr<content::TestInfo> test_info;
   while ((test_info = test_extractor.GetNextTest())) {
-    if (!RunOneTest(*test_info, &ran_at_least_once, main_runner))
+    if (!RunOneTest(*test_info, &ran_at_least_once, &test_controller,
+                    main_runner)) {
       break;
+    }
   }
   if (!ran_at_least_once) {
     base::ThreadTaskRunnerHandle::Get()->PostTask(
diff --git a/content/shell/browser/layout_test/layout_test_content_browser_client.cc b/content/shell/browser/layout_test/layout_test_content_browser_client.cc
index 9c7c931..9f0c4c8b 100644
--- a/content/shell/browser/layout_test/layout_test_content_browser_client.cc
+++ b/content/shell/browser/layout_test/layout_test_content_browser_client.cc
@@ -104,7 +104,8 @@
 void LayoutTestContentBrowserClient::OverrideWebkitPrefs(
     RenderViewHost* render_view_host,
     WebPreferences* prefs) {
-  BlinkTestController::Get()->OverrideWebkitPrefs(prefs);
+  if (BlinkTestController::Get())
+    BlinkTestController::Get()->OverrideWebkitPrefs(prefs);
 }
 
 void LayoutTestContentBrowserClient::ResourceDispatcherHostCreated() {
diff --git a/content/shell/browser/layout_test/layout_test_devtools_bindings.cc b/content/shell/browser/layout_test/layout_test_devtools_bindings.cc
index 112d6b3..8b0be99 100644
--- a/content/shell/browser/layout_test/layout_test_devtools_bindings.cc
+++ b/content/shell/browser/layout_test/layout_test_devtools_bindings.cc
@@ -7,8 +7,6 @@
 #include <memory>
 
 #include "base/command_line.h"
-#include "base/json/json_reader.h"
-#include "base/json/json_writer.h"
 #include "base/path_service.h"
 #include "base/strings/string_util.h"
 #include "base/strings/stringprintf.h"
@@ -59,7 +57,8 @@
 
   // WebContentsObserver implementation.
   void RenderFrameCreated(RenderFrameHost* render_frame_host) override {
-    BlinkTestController::Get()->HandleNewRenderFrameHost(render_frame_host);
+    if (BlinkTestController::Get())
+      BlinkTestController::Get()->HandleNewRenderFrameHost(render_frame_host);
   }
 
  private:
@@ -68,10 +67,13 @@
 };
 
 // static.
-GURL LayoutTestDevToolsBindings::GetDevToolsPathAsURL(
-    const std::string& frontend_url) {
-  if (!frontend_url.empty())
-    return GURL(frontend_url);
+GURL LayoutTestDevToolsBindings::MapTestURLIfNeeded(const GURL& test_url,
+                                                    bool* is_devtools_test) {
+  std::string test_url_string = test_url.spec();
+  *is_devtools_test = test_url_string.find("/devtools/") != std::string::npos;
+  if (!*is_devtools_test)
+    return test_url;
+
   base::FilePath dir_exe;
   if (!PathService::Get(base::DIR_EXE, &dir_exe)) {
     NOTREACHED();
@@ -101,108 +103,56 @@
       base::StringPrintf("%s?experiments=true", result.spec().c_str());
   if (is_debug_dev_tools)
     url_string += "&debugFrontend=true";
-  return GURL(url_string);
-}
-
-// static.
-GURL LayoutTestDevToolsBindings::MapTestURLIfNeeded(const GURL& test_url,
-                                                    bool* is_devtools_js_test) {
-  std::string spec = test_url.spec();
-  bool is_js_test =
-      base::EndsWith(spec, ".js", base::CompareCase::INSENSITIVE_ASCII);
-  *is_devtools_js_test =
-      spec.find("/devtools/") != std::string::npos && is_js_test;
-  if (!*is_devtools_js_test)
-    return test_url;
-  std::string url_string = GetDevToolsPathAsURL(std::string()).spec();
-  url_string += "&test=" + spec;
+  url_string += "&test=" + test_url_string;
   return GURL(url_string);
 }
 
 void LayoutTestDevToolsBindings::NavigateDevToolsFrontend() {
-  GURL devtools_url = GetDevToolsPathAsURL(frontend_url_.spec());
-  NavigationController::LoadURLParams params(devtools_url);
+  NavigationController::LoadURLParams params(frontend_url_);
   params.transition_type = ui::PageTransitionFromInt(
       ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_FROM_ADDRESS_BAR);
   web_contents()->GetController().LoadURLWithParams(params);
   web_contents()->Focus();
 }
 
-void LayoutTestDevToolsBindings::EvaluateInFrontend(int call_id,
-                                                    const std::string& script) {
-  if (!ready_for_test_) {
-    pending_evaluations_.push_back(std::make_pair(call_id, script));
-    return;
-  }
-
-  std::string encoded_script;
-  base::JSONWriter::Write(base::Value(script), &encoded_script);
-  std::string source =
-      base::StringPrintf("DevToolsAPI.evaluateForTestInFrontend(%d, %s);",
-                         call_id, encoded_script.c_str());
-  web_contents()->GetMainFrame()->ExecuteJavaScriptForTests(
-      base::UTF8ToUTF16(source));
-}
-
 void LayoutTestDevToolsBindings::Attach() {
   DCHECK(is_startup_test_);
   ShellDevToolsBindings::Attach();
-  EvaluateInFrontend(0, "TestRunner._startupTestSetupFinished();");
+  web_contents()->GetMainFrame()->ExecuteJavaScriptForTests(
+      base::UTF8ToUTF16("TestRunner._startupTestSetupFinished();\n//# "
+                        "sourceURL=layout_test_devtools_bindings.cc"));
 }
 
 LayoutTestDevToolsBindings::LayoutTestDevToolsBindings(
     WebContents* devtools_contents,
     WebContents* inspected_contents,
-    const std::string& settings,
-    const GURL& frontend_url,
-    bool new_harness)
+    const GURL& frontend_url)
     : ShellDevToolsBindings(devtools_contents, inspected_contents, nullptr),
       frontend_url_(frontend_url) {
-  SetPreferences(settings);
-  if (new_harness) {
-    is_startup_test_ =
-        frontend_url.query().find("/startup/") != std::string::npos;
-    secondary_observer_ =
-        std::make_unique<SecondaryObserver>(this, is_startup_test_);
-    if (!is_startup_test_) {
-      NavigationController::LoadURLParams params(
-          GetInspectedPageURL(frontend_url));
-      params.transition_type = ui::PageTransitionFromInt(
-          ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_FROM_ADDRESS_BAR);
-      inspected_contents->GetController().LoadURLWithParams(params);
-    }
-  } else {
-    NavigateDevToolsFrontend();
-  }
+  is_startup_test_ =
+      frontend_url.query().find("/startup/") != std::string::npos;
+  secondary_observer_ =
+      std::make_unique<SecondaryObserver>(this, is_startup_test_);
+  if (is_startup_test_)
+    return;
+  NavigationController::LoadURLParams params(GetInspectedPageURL(frontend_url));
+  params.transition_type = ui::PageTransitionFromInt(
+      ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_FROM_ADDRESS_BAR);
+  inspected_contents->GetController().LoadURLWithParams(params);
 }
 
 LayoutTestDevToolsBindings::~LayoutTestDevToolsBindings() {}
 
-void LayoutTestDevToolsBindings::HandleMessageFromDevToolsFrontend(
-    const std::string& message) {
-  std::string method;
-  base::DictionaryValue* dict = nullptr;
-  std::unique_ptr<base::Value> parsed_message = base::JSONReader::Read(message);
-  if (parsed_message && parsed_message->GetAsDictionary(&dict) &&
-      dict->GetString("method", &method) && method == "readyForTest") {
-    ready_for_test_ = true;
-    for (const auto& pair : pending_evaluations_)
-      EvaluateInFrontend(pair.first, pair.second);
-    pending_evaluations_.clear();
-    return;
-  }
-
-  ShellDevToolsBindings::HandleMessageFromDevToolsFrontend(message);
-}
-
 void LayoutTestDevToolsBindings::RenderProcessGone(
     base::TerminationStatus status) {
-  BlinkTestController::Get()->DevToolsProcessCrashed();
+  if (BlinkTestController::Get())
+    BlinkTestController::Get()->DevToolsProcessCrashed();
 }
 
 void LayoutTestDevToolsBindings::RenderFrameCreated(
     RenderFrameHost* render_frame_host) {
-  BlinkTestController::Get()->HandleNewRenderFrameHost(render_frame_host);
+  if (BlinkTestController::Get())
+    BlinkTestController::Get()->HandleNewRenderFrameHost(render_frame_host);
 }
 
 void LayoutTestDevToolsBindings::DocumentAvailableInMainFrame() {
diff --git a/content/shell/browser/layout_test/layout_test_devtools_bindings.h b/content/shell/browser/layout_test/layout_test_devtools_bindings.h
index 582fbd01..e06373b 100644
--- a/content/shell/browser/layout_test/layout_test_devtools_bindings.h
+++ b/content/shell/browser/layout_test/layout_test_devtools_bindings.h
@@ -15,18 +15,12 @@
 
 class LayoutTestDevToolsBindings : public ShellDevToolsBindings {
  public:
-  static GURL GetDevToolsPathAsURL(const std::string& frontend_url);
-
-  static GURL MapTestURLIfNeeded(const GURL& test_url,
-                                 bool* is_devtools_js_test);
+  static GURL MapTestURLIfNeeded(const GURL& test_url, bool* is_devtools_test);
 
   LayoutTestDevToolsBindings(WebContents* devtools_contents,
                              WebContents* inspected_contents,
-                             const std::string& settings,
-                             const GURL& frontend_url,
-                             bool new_harness);
+                             const GURL& frontend_url);
 
-  void EvaluateInFrontend(int call_id, const std::string& expression);
   void Attach() override;
 
   ~LayoutTestDevToolsBindings() override;
@@ -34,9 +28,6 @@
  private:
   class SecondaryObserver;
 
-  // ShellDevToolsBindings overrides.
-  void HandleMessageFromDevToolsFrontend(const std::string& message) override;
-
   // WebContentsObserver implementation.
   void RenderProcessGone(base::TerminationStatus status) override;
   void RenderFrameCreated(RenderFrameHost* render_frame_host) override;
@@ -44,10 +35,8 @@
 
   void NavigateDevToolsFrontend();
 
-  bool ready_for_test_ = false;
   bool is_startup_test_ = false;
   GURL frontend_url_;
-  std::vector<std::pair<int, std::string>> pending_evaluations_;
   std::unique_ptr<SecondaryObserver> secondary_observer_;
 
   DISALLOW_COPY_AND_ASSIGN(LayoutTestDevToolsBindings);
diff --git a/content/shell/browser/layout_test/layout_test_message_filter.cc b/content/shell/browser/layout_test/layout_test_message_filter.cc
index bd9146e3..9961608 100644
--- a/content/shell/browser/layout_test/layout_test_message_filter.cc
+++ b/content/shell/browser/layout_test/layout_test_message_filter.cc
@@ -210,18 +210,22 @@
 void LayoutTestMessageFilter::OnLayoutTestRuntimeFlagsChanged(
     const base::DictionaryValue& changed_layout_test_runtime_flags) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  BlinkTestController::Get()->OnLayoutTestRuntimeFlagsChanged(
-      render_process_id_, changed_layout_test_runtime_flags);
+  if (BlinkTestController::Get()) {
+    BlinkTestController::Get()->OnLayoutTestRuntimeFlagsChanged(
+        render_process_id_, changed_layout_test_runtime_flags);
+  }
 }
 
 void LayoutTestMessageFilter::OnTestFinishedInSecondaryRenderer() {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  BlinkTestController::Get()->OnTestFinishedInSecondaryRenderer();
+  if (BlinkTestController::Get())
+    BlinkTestController::Get()->OnTestFinishedInSecondaryRenderer();
 }
 
 void LayoutTestMessageFilter::OnInspectSecondaryWindow() {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  BlinkTestController::Get()->OnInspectSecondaryWindow();
+  if (BlinkTestController::Get())
+    BlinkTestController::Get()->OnInspectSecondaryWindow();
 }
 
 }  // namespace content
diff --git a/content/shell/browser/layout_test/secondary_test_window_observer.cc b/content/shell/browser/layout_test/secondary_test_window_observer.cc
index 726fc18..ee2ce8c 100644
--- a/content/shell/browser/layout_test/secondary_test_window_observer.cc
+++ b/content/shell/browser/layout_test/secondary_test_window_observer.cc
@@ -16,6 +16,8 @@
     WebContents* web_contents)
     : WebContentsObserver(web_contents) {
   BlinkTestController* blink_test_controller = BlinkTestController::Get();
+  if (!blink_test_controller)
+    return;
   DCHECK(!blink_test_controller->IsMainWindow(web_contents));
 
   // Ensure that any preexisting frames (likely just the main frame) are handled
@@ -30,9 +32,12 @@
 
 void SecondaryTestWindowObserver::RenderFrameCreated(
     RenderFrameHost* render_frame_host) {
-  DCHECK(!BlinkTestController::Get()->IsMainWindow(
+  BlinkTestController* blink_test_controller = BlinkTestController::Get();
+  if (!blink_test_controller)
+    return;
+  DCHECK(!blink_test_controller->IsMainWindow(
       WebContents::FromRenderFrameHost(render_frame_host)));
-  BlinkTestController::Get()->HandleNewRenderFrameHost(render_frame_host);
+  blink_test_controller->HandleNewRenderFrameHost(render_frame_host);
 }
 
 }  // namespace content
diff --git a/content/shell/browser/shell.cc b/content/shell/browser/shell.cc
index 65121298..1032716 100644
--- a/content/shell/browser/shell.cc
+++ b/content/shell/browser/shell.cc
@@ -474,10 +474,9 @@
 std::unique_ptr<BluetoothChooser> Shell::RunBluetoothChooser(
     RenderFrameHost* frame,
     const BluetoothChooser::EventHandler& event_handler) {
-  if (switches::IsRunLayoutTestSwitchPresent()) {
-    return BlinkTestController::Get()->RunBluetoothChooser(frame,
-                                                           event_handler);
-  }
+  BlinkTestController* blink_test_controller = BlinkTestController::Get();
+  if (blink_test_controller && switches::IsRunLayoutTestSwitchPresent())
+    return blink_test_controller->RunBluetoothChooser(frame, event_handler);
   return nullptr;
 }
 
@@ -490,8 +489,9 @@
 }
 
 void Shell::RendererUnresponsive(WebContents* source) {
-  if (switches::IsRunLayoutTestSwitchPresent())
-    BlinkTestController::Get()->RendererUnresponsive();
+  BlinkTestController* blink_test_controller = BlinkTestController::Get();
+  if (blink_test_controller && switches::IsRunLayoutTestSwitchPresent())
+    blink_test_controller->RendererUnresponsive();
 }
 
 void Shell::ActivateContents(WebContents* contents) {
@@ -504,11 +504,12 @@
     const url::Origin& origin,
     const GURL& resource_url) {
   bool allowed_by_test = false;
-  if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+  BlinkTestController* blink_test_controller = BlinkTestController::Get();
+  if (blink_test_controller &&
+      base::CommandLine::ForCurrentProcess()->HasSwitch(
           switches::kRunLayoutTest)) {
     const base::DictionaryValue& test_flags =
-        BlinkTestController::Get()
-            ->accumulated_layout_test_runtime_flags_changes();
+        blink_test_controller->accumulated_layout_test_runtime_flags_changes();
     test_flags.GetBoolean("running_insecure_content_allowed", &allowed_by_test);
   }
 
diff --git a/content/shell/browser/shell_devtools_bindings.cc b/content/shell/browser/shell_devtools_bindings.cc
index e2b22223..62d536d9 100644
--- a/content/shell/browser/shell_devtools_bindings.cc
+++ b/content/shell/browser/shell_devtools_bindings.cc
@@ -174,21 +174,6 @@
   }
 }
 
-void ShellDevToolsBindings::SetPreferences(const std::string& json) {
-  preferences_.Clear();
-  if (json.empty())
-    return;
-  base::DictionaryValue* dict = nullptr;
-  std::unique_ptr<base::Value> parsed = base::JSONReader::Read(json);
-  if (!parsed || !parsed->GetAsDictionary(&dict))
-    return;
-  for (base::DictionaryValue::Iterator it(*dict); !it.IsAtEnd(); it.Advance()) {
-    if (!it.value().is_string())
-      continue;
-    preferences_.SetWithoutPathExpansion(it.key(), it.value().CreateDeepCopy());
-  }
-}
-
 void ShellDevToolsBindings::HandleMessageFromDevToolsFrontend(
     const std::string& message) {
   std::string method;
diff --git a/content/shell/browser/shell_devtools_bindings.h b/content/shell/browser/shell_devtools_bindings.h
index b7e1d63..26b0f1f 100644
--- a/content/shell/browser/shell_devtools_bindings.h
+++ b/content/shell/browser/shell_devtools_bindings.h
@@ -56,16 +56,14 @@
 
   WebContents* inspected_contents() { return inspected_contents_; }
 
- protected:
+ private:
   // content::DevToolsAgentHostClient implementation.
   void AgentHostClosed(DevToolsAgentHost* agent_host) override;
   void DispatchProtocolMessage(DevToolsAgentHost* agent_host,
                                const std::string& message) override;
 
-  void SetPreferences(const std::string& json);
-  virtual void HandleMessageFromDevToolsFrontend(const std::string& message);
+  void HandleMessageFromDevToolsFrontend(const std::string& message);
 
- private:
   // WebContentsObserver overrides
   void ReadyToCommitNavigation(NavigationHandle* navigation_handle) override;
   void WebContentsDestroyed() override;
diff --git a/content/shell/renderer/layout_test/blink_test_runner.cc b/content/shell/renderer/layout_test/blink_test_runner.cc
index 2f471903..c2df8fa5 100644
--- a/content/shell/renderer/layout_test/blink_test_runner.cc
+++ b/content/shell/renderer/layout_test/blink_test_runner.cc
@@ -413,23 +413,6 @@
   Send(new LayoutTestHostMsg_InspectSecondaryWindow(routing_id()));
 }
 
-void BlinkTestRunner::ShowDevTools(const std::string& settings,
-                                   const std::string& frontend_url) {
-  Send(new ShellViewHostMsg_ShowDevTools(
-      routing_id(), settings, frontend_url));
-}
-
-void BlinkTestRunner::CloseDevTools() {
-  Send(new ShellViewHostMsg_CloseDevTools(routing_id()));
-  render_view()->GetMainRenderFrame()->DetachDevToolsForTest();
-}
-
-void BlinkTestRunner::EvaluateInWebInspector(int call_id,
-                                             const std::string& script) {
-  Send(new ShellViewHostMsg_EvaluateInDevTools(
-      routing_id(), call_id, script));
-}
-
 void BlinkTestRunner::ClearAllDatabases() {
   Send(new LayoutTestHostMsg_ClearAllDatabases(routing_id()));
 }
diff --git a/content/shell/renderer/layout_test/blink_test_runner.h b/content/shell/renderer/layout_test/blink_test_runner.h
index 66b8d1cc..22cda55 100644
--- a/content/shell/renderer/layout_test/blink_test_runner.h
+++ b/content/shell/renderer/layout_test/blink_test_runner.h
@@ -92,10 +92,6 @@
   void DisableAutoResizeMode(const blink::WebSize& new_size) override;
   void NavigateSecondaryWindow(const GURL& url) override;
   void InspectSecondaryWindow() override;
-  void ShowDevTools(const std::string& settings,
-                    const std::string& frontend_url) override;
-  void CloseDevTools() override;
-  void EvaluateInWebInspector(int call_id, const std::string& script) override;
   void ClearAllDatabases() override;
   void SetDatabaseQuota(int quota) override;
   void SimulateWebNotificationClick(
diff --git a/content/shell/test_runner/test_interfaces.cc b/content/shell/test_runner/test_interfaces.cc
index 3bc75c96..25a283b 100644
--- a/content/shell/test_runner/test_interfaces.cc
+++ b/content/shell/test_runner/test_interfaces.cc
@@ -118,20 +118,6 @@
   // The actions below should only be done *once* per test.
   if (!initial_configuration)
     return;
-
-  bool is_legacy_devtools_test =
-      is_devtools_test &&
-      spec.find("integration_test_runner.html") == std::string::npos;
-  if (is_legacy_devtools_test) {
-    // Subfolder name determines default panel to open.
-    std::string folder = "/devtools/";
-    std::string test_path = spec.substr(spec.find(folder) + folder.length());
-    base::DictionaryValue settings;
-    settings.SetString("testPath", base::GetQuotedJSONString(spec));
-    std::string settings_string;
-    base::JSONWriter::Write(settings, &settings_string);
-    test_runner_->ShowDevTools(settings_string, std::string());
-  }
 }
 
 void TestInterfaces::WindowOpened(WebViewTestProxyBase* proxy) {
diff --git a/content/shell/test_runner/test_runner.cc b/content/shell/test_runner/test_runner.cc
index 3f0bc1f..91e4997 100644
--- a/content/shell/test_runner/test_runner.cc
+++ b/content/shell/test_runner/test_runner.cc
@@ -121,7 +121,6 @@
   void CapturePixelsAsyncThen(v8::Local<v8::Function> callback);
   void ClearAllDatabases();
   void ClearPrinting();
-  void CloseWebInspector();
   void CopyImageAtAndCapturePixelsAsyncThen(int x,
                                             int y,
                                             v8::Local<v8::Function> callback);
@@ -154,7 +153,6 @@
   void DumpTitleChanges();
   void DumpUserGestureInFrameLoadCallbacks();
   void EnableUseZoomForDSF(v8::Local<v8::Function> callback);
-  void EvaluateInWebInspector(int call_id, const std::string& script);
   void EvaluateScriptInIsolatedWorld(int world_id, const std::string& script);
   void ExecCommand(gin::Arguments* args);
   void ForceNextDrawingBufferCreationToFail();
@@ -249,7 +247,6 @@
   void SetWillSendRequestClearHeader(const std::string& header);
   void SetWindowIsKey(bool value);
   void SetXSSAuditorEnabled(bool enabled);
-  void ShowWebInspector(gin::Arguments* args);
   void NavigateSecondaryWindow(const std::string& url);
   void InspectSecondaryWindow();
   void SimulateWebNotificationClick(gin::Arguments* args);
@@ -368,7 +365,6 @@
       .SetMethod("clearAllDatabases", &TestRunnerBindings::ClearAllDatabases)
       .SetMethod("clearBackForwardList", &TestRunnerBindings::NotImplemented)
       .SetMethod("clearPrinting", &TestRunnerBindings::ClearPrinting)
-      .SetMethod("closeWebInspector", &TestRunnerBindings::CloseWebInspector)
       .SetMethod("copyImageAtAndCapturePixelsAsyncThen",
                  &TestRunnerBindings::CopyImageAtAndCapturePixelsAsyncThen)
       .SetMethod("didAcquirePointerLock",
@@ -424,8 +420,6 @@
                  &TestRunnerBindings::EnableAutoResizeMode)
       .SetMethod("enableUseZoomForDSF",
                  &TestRunnerBindings::EnableUseZoomForDSF)
-      .SetMethod("evaluateInWebInspector",
-                 &TestRunnerBindings::EvaluateInWebInspector)
       .SetMethod("evaluateScriptInIsolatedWorld",
                  &TestRunnerBindings::EvaluateScriptInIsolatedWorld)
       .SetMethod(
@@ -583,7 +577,6 @@
       .SetMethod("setWindowIsKey", &TestRunnerBindings::SetWindowIsKey)
       .SetMethod("setXSSAuditorEnabled",
                  &TestRunnerBindings::SetXSSAuditorEnabled)
-      .SetMethod("showWebInspector", &TestRunnerBindings::ShowWebInspector)
       .SetMethod("navigateSecondaryWindow",
                  &TestRunnerBindings::NavigateSecondaryWindow)
       .SetMethod("inspectSecondaryWindow",
@@ -1239,16 +1232,6 @@
     runner_->DumpNavigationPolicy();
 }
 
-void TestRunnerBindings::ShowWebInspector(gin::Arguments* args) {
-  if (runner_) {
-    std::string settings;
-    args->GetNext(&settings);
-    std::string frontend_url;
-    args->GetNext(&frontend_url);
-    runner_->ShowWebInspector(settings, frontend_url);
-  }
-}
-
 void TestRunnerBindings::NavigateSecondaryWindow(const std::string& url) {
   if (runner_)
     runner_->NavigateSecondaryWindow(GURL(url));
@@ -1259,23 +1242,12 @@
     runner_->InspectSecondaryWindow();
 }
 
-void TestRunnerBindings::CloseWebInspector() {
-  if (runner_)
-    runner_->CloseWebInspector();
-}
-
 bool TestRunnerBindings::IsChooserShown() {
   if (runner_)
     return runner_->IsChooserShown();
   return false;
 }
 
-void TestRunnerBindings::EvaluateInWebInspector(int call_id,
-                                                const std::string& script) {
-  if (runner_)
-    runner_->EvaluateInWebInspector(call_id, script);
-}
-
 void TestRunnerBindings::ClearAllDatabases() {
   if (runner_)
     runner_->ClearAllDatabases();
@@ -1968,11 +1940,6 @@
                : blink::WebSettings::kV8CacheOptionsDefault);
 }
 
-void TestRunner::ShowDevTools(const std::string& settings,
-                              const std::string& frontend_url) {
-  delegate_->ShowDevTools(settings, frontend_url);
-}
-
 void TestRunner::NavigateSecondaryWindow(const GURL& url) {
   delegate_->NavigateSecondaryWindow(url);
 }
@@ -2587,11 +2554,6 @@
   blink::SetMockThemeEnabledForTest(use);
 }
 
-void TestRunner::ShowWebInspector(const std::string& str,
-                                  const std::string& frontend_url) {
-  ShowDevTools(str, frontend_url);
-}
-
 void TestRunner::WaitUntilExternalURLLoad() {
   layout_test_runtime_flags_.set_wait_until_external_url_load(true);
   OnLayoutTestRuntimeFlagsChanged();
@@ -2635,19 +2597,10 @@
   return layout_test_runtime_flags_.dump_javascript_dialogs();
 }
 
-void TestRunner::CloseWebInspector() {
-  delegate_->CloseDevTools();
-}
-
 bool TestRunner::IsChooserShown() {
   return 0 < chooser_count_;
 }
 
-void TestRunner::EvaluateInWebInspector(int call_id,
-                                        const std::string& script) {
-  delegate_->EvaluateInWebInspector(call_id, script);
-}
-
 void TestRunner::ClearAllDatabases() {
   delegate_->ClearAllDatabases();
 }
diff --git a/content/shell/test_runner/web_test_delegate.h b/content/shell/test_runner/web_test_delegate.h
index 01be2c0..dfc9333c 100644
--- a/content/shell/test_runner/web_test_delegate.h
+++ b/content/shell/test_runner/web_test_delegate.h
@@ -131,18 +131,9 @@
                                     const blink::WebSize& max_size) = 0;
   virtual void DisableAutoResizeMode(const blink::WebSize& new_size) = 0;
 
-  // Opens and closes the inspector.
-  virtual void ShowDevTools(const std::string& settings,
-                            const std::string& frontend_url) = 0;
-  virtual void CloseDevTools() = 0;
-
   virtual void NavigateSecondaryWindow(const GURL& url) = 0;
   virtual void InspectSecondaryWindow() = 0;
 
-  // Evaluate the given script in the DevTools agent.
-  virtual void EvaluateInWebInspector(int call_id,
-                                      const std::string& script) = 0;
-
   // Controls WebSQL databases.
   virtual void ClearAllDatabases() = 0;
   // Setting quota to kDefaultDatabaseQuota will reset it to the default value.
diff --git a/content/test/gpu/gpu_tests/webgl_conformance_expectations.py b/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
index 88c2779..29e75fd57 100644
--- a/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
+++ b/content/test/gpu/gpu_tests/webgl_conformance_expectations.py
@@ -515,6 +515,15 @@
         ['linux', 'amd', 'no_angle'], bug=479260)
     self.Fail('conformance/glsl/misc/shaders-with-invariance.html',
         ['linux', 'amd', 'no_passthrough'], bug=479952)
+
+    # Linux passthrough AMD
+    self.Fail('conformance/renderbuffers/' +
+        'depth-renderbuffer-initialization.html',
+        ['linux', 'passthrough', 'amd'], bug=794339)
+    self.Fail('conformance/renderbuffers/' +
+        'stencil-renderbuffer-initialization.html',
+        ['linux', 'passthrough', 'amd'], bug=794339)
+
     # Intel
     # See https://bugs.freedesktop.org/show_bug.cgi?id=94477
     self.Skip('conformance/glsl/bugs/temp-expressions-should-not-crash.html',
diff --git a/ios/chrome/app/application_delegate/app_state.mm b/ios/chrome/app/application_delegate/app_state.mm
index 6fba177..f5465e9 100644
--- a/ios/chrome/app/application_delegate/app_state.mm
+++ b/ios/chrome/app/application_delegate/app_state.mm
@@ -407,7 +407,15 @@
   // closing the tabs. Set the BVC to inactive to cancel all the dialogs.
   if ([_browserLauncher browserInitializationStage] >=
       INITIALIZATION_STAGE_FOREGROUND) {
-    [[_browserLauncher browserViewInformation] haltAllTabs];
+    [[_browserLauncher browserViewInformation].mainTabModel haltAllTabs];
+
+    // Application termination flow is only triggered on a shutdown deliberately
+    // triggered by a user. In this case, close all incognito tabs.
+    TabModel* OTRTabModel =
+        [_browserLauncher browserViewInformation].otrTabModel;
+    [OTRTabModel closeAllTabs];
+    [OTRTabModel saveSessionImmediately:YES];
+
     [_browserLauncher browserViewInformation].currentBVC.active = NO;
   }
 
diff --git a/ios/chrome/app/application_delegate/app_state_unittest.mm b/ios/chrome/app/application_delegate/app_state_unittest.mm
index f315ae3..de1df359 100644
--- a/ios/chrome/app/application_delegate/app_state_unittest.mm
+++ b/ios/chrome/app/application_delegate/app_state_unittest.mm
@@ -523,10 +523,14 @@
   id window = [OCMockObject mockForClass:[UIWindow class]];
   id browserViewInformation =
       [OCMockObject mockForProtocol:@protocol(BrowserViewInformation)];
+  id mainTabModel = [OCMockObject mockForClass:[TabModel class]];
+  id OTRTabModel = [OCMockObject mockForClass:[TabModel class]];
   [[[browserLauncher stub] andReturnValue:@(INITIALIZATION_STAGE_FOREGROUND)]
       browserInitializationStage];
   [[[browserLauncher stub] andReturn:browserViewInformation]
       browserViewInformation];
+  [[[browserViewInformation stub] andReturn:mainTabModel] mainTabModel];
+  [[[browserViewInformation stub] andReturn:OTRTabModel] otrTabModel];
   [[[browserViewInformation stub] andReturn:browserViewController] currentBVC];
 
   id settingsNavigationController =
@@ -538,7 +542,11 @@
   [[appNavigation expect] closeSettingsAnimated:NO completion:nil];
 
   [[browserViewInformation expect] cleanDeviceSharingManager];
-  [[browserViewInformation expect] haltAllTabs];
+
+  [[mainTabModel expect] haltAllTabs];
+
+  [[OTRTabModel expect] closeAllTabs];
+  [[OTRTabModel expect] saveSessionImmediately:YES];
 
   id startupInformation =
       [OCMockObject mockForProtocol:@protocol(StartupInformation)];
@@ -559,6 +567,8 @@
                applicationNavigation:appNavigation];
 
   // Test.
+  EXPECT_OCMOCK_VERIFY(OTRTabModel);
+  EXPECT_OCMOCK_VERIFY(mainTabModel);
   EXPECT_OCMOCK_VERIFY(browserViewController);
   EXPECT_OCMOCK_VERIFY(startupInformation);
   EXPECT_OCMOCK_VERIFY(appNavigation);
diff --git a/ios/chrome/app/main_controller.mm b/ios/chrome/app/main_controller.mm
index a8457b6..87d48bee 100644
--- a/ios/chrome/app/main_controller.mm
+++ b/ios/chrome/app/main_controller.mm
@@ -919,10 +919,6 @@
 
 #pragma mark - BrowserViewInformation implementation.
 
-- (void)haltAllTabs {
-  [_browserViewWrangler haltAllTabs];
-}
-
 - (void)cleanDeviceSharingManager {
   [_browserViewWrangler cleanDeviceSharingManager];
 }
diff --git a/ios/chrome/browser/ui/main/browser_view_information.h b/ios/chrome/browser/ui/main/browser_view_information.h
index b8b295d..df7e506b 100644
--- a/ios/chrome/browser/ui/main/browser_view_information.h
+++ b/ios/chrome/browser/ui/main/browser_view_information.h
@@ -29,9 +29,6 @@
 // otrBVC). The other, if present, is in suspended mode.
 @property(nonatomic, assign) BrowserViewController* currentBVC;
 
-// Halts all tabs from all TabModels.
-- (void)haltAllTabs;
-
 // Returns the browser state corresponding to the current browser view.
 - (ios::ChromeBrowserState*)currentBrowserState;
 
diff --git a/ios/chrome/browser/ui/main/browser_view_wrangler.mm b/ios/chrome/browser/ui/main/browser_view_wrangler.mm
index 2d6f5167..6c21791 100644
--- a/ios/chrome/browser/ui/main/browser_view_wrangler.mm
+++ b/ios/chrome/browser/ui/main/browser_view_wrangler.mm
@@ -224,11 +224,6 @@
   return self.currentBVC.browserState;
 }
 
-- (void)haltAllTabs {
-  [self.mainTabModel haltAllTabs];
-  [self.otrTabModel haltAllTabs];
-}
-
 - (void)cleanDeviceSharingManager {
   [self.deviceSharingManager updateBrowserState:NULL];
 }
diff --git a/net/BUILD.gn b/net/BUILD.gn
index f37dc77..2b9378e6 100644
--- a/net/BUILD.gn
+++ b/net/BUILD.gn
@@ -1157,8 +1157,6 @@
       "quic/core/congestion_control/rtt_stats.h",
       "quic/core/congestion_control/send_algorithm_interface.cc",
       "quic/core/congestion_control/send_algorithm_interface.h",
-      "quic/core/congestion_control/tcp_cubic_sender_base.cc",
-      "quic/core/congestion_control/tcp_cubic_sender_base.h",
       "quic/core/congestion_control/tcp_cubic_sender_bytes.cc",
       "quic/core/congestion_control/tcp_cubic_sender_bytes.h",
       "quic/core/congestion_control/windowed_filter.h",
@@ -3251,6 +3249,8 @@
 
   if (is_linux) {
     sources += [
+      "tools/quic/test_tools/bad_packet_writer.cc",
+      "tools/quic/test_tools/bad_packet_writer.h",
       "tools/quic/test_tools/limited_mtu_test_writer.cc",
       "tools/quic/test_tools/limited_mtu_test_writer.h",
       "tools/quic/test_tools/mock_epoll_server.cc",
diff --git a/net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc b/net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc
index f480055c3..1027966 100644
--- a/net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc
+++ b/net/quic/chromium/bidirectional_stream_quic_impl_unittest.cc
@@ -35,6 +35,7 @@
 #include "net/quic/core/crypto/quic_encrypter.h"
 #include "net/quic/core/quic_connection.h"
 #include "net/quic/core/spdy_utils.h"
+#include "net/quic/core/tls_client_handshaker.h"
 #include "net/quic/platform/api/quic_string_piece.h"
 #include "net/quic/platform/api/quic_text_utils.h"
 #include "net/quic/test_tools/crypto_test_utils.h"
@@ -397,7 +398,8 @@
   };
 
   BidirectionalStreamQuicImplTest()
-      : crypto_config_(crypto_test_utils::ProofVerifierForTesting()),
+      : crypto_config_(crypto_test_utils::ProofVerifierForTesting(),
+                       TlsClientHandshaker::CreateSslCtx()),
         read_buffer_(new IOBufferWithSize(4096)),
         connection_id_(2),
         stream_id_(GetNthClientInitiatedStreamId(0)),
diff --git a/net/quic/chromium/quic_chromium_client_session_test.cc b/net/quic/chromium/quic_chromium_client_session_test.cc
index a74031f..89aa5244 100644
--- a/net/quic/chromium/quic_chromium_client_session_test.cc
+++ b/net/quic/chromium/quic_chromium_client_session_test.cc
@@ -34,6 +34,7 @@
 #include "net/quic/core/crypto/quic_encrypter.h"
 #include "net/quic/core/quic_client_promised_info.h"
 #include "net/quic/core/quic_packet_writer.h"
+#include "net/quic/core/tls_client_handshaker.h"
 #include "net/quic/platform/api/quic_flags.h"
 #include "net/quic/platform/impl/quic_test_impl.h"
 #include "net/quic/test_tools/crypto_test_utils.h"
@@ -84,7 +85,8 @@
     : public ::testing::TestWithParam<QuicTransportVersion> {
  public:
   QuicChromiumClientSessionTest()
-      : crypto_config_(crypto_test_utils::ProofVerifierForTesting()),
+      : crypto_config_(crypto_test_utils::ProofVerifierForTesting(),
+                       TlsClientHandshaker::CreateSslCtx()),
         default_read_(new MockRead(SYNCHRONOUS, ERR_IO_PENDING, 0)),
         socket_data_(
             new SequencedSocketData(default_read_.get(), 1, nullptr, 0)),
diff --git a/net/quic/chromium/quic_chromium_client_stream_test.cc b/net/quic/chromium/quic_chromium_client_stream_test.cc
index f31df30..e1f489c 100644
--- a/net/quic/chromium/quic_chromium_client_stream_test.cc
+++ b/net/quic/chromium/quic_chromium_client_stream_test.cc
@@ -16,6 +16,7 @@
 #include "net/quic/core/quic_spdy_client_session_base.h"
 #include "net/quic/core/quic_utils.h"
 #include "net/quic/core/spdy_utils.h"
+#include "net/quic/core/tls_client_handshaker.h"
 #include "net/quic/platform/api/quic_ptr_util.h"
 #include "net/quic/test_tools/crypto_test_utils.h"
 #include "net/quic/test_tools/quic_spdy_session_peer.h"
@@ -154,7 +155,8 @@
     : public ::testing::TestWithParam<QuicTransportVersion> {
  public:
   QuicChromiumClientStreamTest()
-      : crypto_config_(crypto_test_utils::ProofVerifierForTesting()),
+      : crypto_config_(crypto_test_utils::ProofVerifierForTesting(),
+                       TlsClientHandshaker::CreateSslCtx()),
         session_(new MockQuicConnection(
                      &helper_,
                      &alarm_factory_,
diff --git a/net/quic/chromium/quic_connection_logger.cc b/net/quic/chromium/quic_connection_logger.cc
index 6350c1d..86f4d56 100644
--- a/net/quic/chromium/quic_connection_logger.cc
+++ b/net/quic/chromium/quic_connection_logger.cc
@@ -108,7 +108,7 @@
     NetLogCaptureMode /* capture_mode */) {
   auto dict = std::make_unique<base::DictionaryValue>();
   dict->SetString("largest_observed",
-                  base::NumberToString(frame->deprecated_largest_observed));
+                  base::NumberToString(frame->largest_acked));
   dict->SetString("delta_time_largest_observed_us",
                   base::Int64ToString(frame->ack_delay_time.ToMicroseconds()));
 
@@ -117,7 +117,7 @@
     // V34 and above express acked packets, but only print
     // missing packets, because it's typically a shorter list.
     for (QuicPacketNumber packet = frame->packets.Min();
-         packet < frame->deprecated_largest_observed; ++packet) {
+         packet < frame->largest_acked; ++packet) {
       if (!frame->packets.Contains(packet)) {
         missing->AppendString(base::NumberToString(packet));
       }
diff --git a/net/quic/chromium/quic_http_stream_test.cc b/net/quic/chromium/quic_http_stream_test.cc
index 2c34fff1..c01ca99 100644
--- a/net/quic/chromium/quic_http_stream_test.cc
+++ b/net/quic/chromium/quic_http_stream_test.cc
@@ -43,6 +43,7 @@
 #include "net/quic/core/quic_connection.h"
 #include "net/quic/core/quic_write_blocked_list.h"
 #include "net/quic/core/spdy_utils.h"
+#include "net/quic/core/tls_client_handshaker.h"
 #include "net/quic/platform/api/quic_string_piece.h"
 #include "net/quic/test_tools/crypto_test_utils.h"
 #include "net/quic/test_tools/mock_clock.h"
@@ -183,7 +184,8 @@
   };
 
   QuicHttpStreamTest()
-      : crypto_config_(crypto_test_utils::ProofVerifierForTesting()),
+      : crypto_config_(crypto_test_utils::ProofVerifierForTesting(),
+                       TlsClientHandshaker::CreateSslCtx()),
         read_buffer_(new IOBufferWithSize(4096)),
         promise_id_(GetNthServerInitiatedStreamId(0)),
         stream_id_(GetNthClientInitiatedStreamId(0)),
diff --git a/net/quic/chromium/quic_proxy_client_socket_unittest.cc b/net/quic/chromium/quic_proxy_client_socket_unittest.cc
index 6a45816..4edad26 100644
--- a/net/quic/chromium/quic_proxy_client_socket_unittest.cc
+++ b/net/quic/chromium/quic_proxy_client_socket_unittest.cc
@@ -28,6 +28,7 @@
 #include "net/quic/chromium/quic_test_packet_maker.h"
 #include "net/quic/chromium/test_task_runner.h"
 #include "net/quic/core/crypto/null_encrypter.h"
+#include "net/quic/core/tls_client_handshaker.h"
 #include "net/quic/test_tools/crypto_test_utils.h"
 #include "net/quic/test_tools/mock_clock.h"
 #include "net/quic/test_tools/mock_random.h"
@@ -105,7 +106,8 @@
 
   QuicProxyClientSocketTest()
       : version_(GetParam()),
-        crypto_config_(crypto_test_utils::ProofVerifierForTesting()),
+        crypto_config_(crypto_test_utils::ProofVerifierForTesting(),
+                       TlsClientHandshaker::CreateSslCtx()),
         connection_id_(2),
         client_maker_(version_,
                       connection_id_,
diff --git a/net/quic/chromium/quic_stream_factory.cc b/net/quic/chromium/quic_stream_factory.cc
index 31798ed..1f19c16 100644
--- a/net/quic/chromium/quic_stream_factory.cc
+++ b/net/quic/chromium/quic_stream_factory.cc
@@ -49,6 +49,7 @@
 #include "net/quic/core/crypto/quic_random.h"
 #include "net/quic/core/quic_client_promised_info.h"
 #include "net/quic/core/quic_connection.h"
+#include "net/quic/core/tls_client_handshaker.h"
 #include "net/quic/platform/api/quic_clock.h"
 #include "net/quic/platform/api/quic_flags.h"
 #include "net/socket/client_socket_factory.h"
@@ -746,7 +747,8 @@
           std::make_unique<ProofVerifierChromium>(cert_verifier,
                                                   ct_policy_enforcer,
                                                   transport_security_state,
-                                                  cert_transparency_verifier)),
+                                                  cert_transparency_verifier),
+          TlsClientHandshaker::CreateSslCtx()),
       mark_quic_broken_when_network_blackholes_(
           mark_quic_broken_when_network_blackholes),
       store_server_configs_in_properties_(store_server_configs_in_properties),
diff --git a/net/quic/chromium/quic_test_packet_maker.cc b/net/quic/chromium/quic_test_packet_maker.cc
index 8a9ceada..d1ce16f 100644
--- a/net/quic/chromium/quic_test_packet_maker.cc
+++ b/net/quic/chromium/quic_test_packet_maker.cc
@@ -18,7 +18,7 @@
 
 QuicAckFrame MakeAckFrame(QuicPacketNumber largest_observed) {
   QuicAckFrame ack;
-  ack.deprecated_largest_observed = largest_observed;
+  ack.largest_acked = largest_observed;
   return ack;
 }
 
diff --git a/net/quic/core/congestion_control/bbr_sender.cc b/net/quic/core/congestion_control/bbr_sender.cc
index b33cb1c..4da5df3 100644
--- a/net/quic/core/congestion_control/bbr_sender.cc
+++ b/net/quic/core/congestion_control/bbr_sender.cc
@@ -21,7 +21,7 @@
 const QuicByteCount kMaxSegmentSize = kDefaultTCPMSS;
 // The minimum CWND to ensure delayed acks don't reduce bandwidth measurements.
 // Does not inflate the pacing rate.
-const QuicByteCount kMinimumCongestionWindow = 4 * kMaxSegmentSize;
+const QuicByteCount kDefaultMinimumCongestionWindow = 4 * kMaxSegmentSize;
 
 // The gain used for the slow start, equal to 2/ln(2).
 const float kHighGain = 2.885f;
@@ -99,6 +99,7 @@
       initial_congestion_window_(initial_tcp_congestion_window *
                                  kDefaultTCPMSS),
       max_congestion_window_(max_tcp_congestion_window * kDefaultTCPMSS),
+      min_congestion_window_(kDefaultMinimumCongestionWindow),
       pacing_rate_(QuicBandwidth::Zero()),
       pacing_gain_(1),
       congestion_window_gain_(1),
@@ -226,34 +227,19 @@
   if (config.HasClientRequestedIndependentOption(kBBR3, perspective)) {
     fully_drain_queue_ = true;
   }
-  if (GetQuicReloadableFlag(quic_bbr_conservation_in_startup) &&
-      config.HasClientRequestedIndependentOption(kBBS1, perspective)) {
-    QUIC_FLAG_COUNT_N(quic_reloadable_flag_quic_bbr_conservation_in_startup, 1,
-                      3);
+  if (config.HasClientRequestedIndependentOption(kBBS1, perspective)) {
     rate_based_startup_ = true;
   }
-  if (GetQuicReloadableFlag(quic_bbr_conservation_in_startup) &&
-      config.HasClientRequestedIndependentOption(kBBS2, perspective)) {
-    QUIC_FLAG_COUNT_N(quic_reloadable_flag_quic_bbr_conservation_in_startup, 2,
-                      3);
+  if (config.HasClientRequestedIndependentOption(kBBS2, perspective)) {
     initial_conservation_in_startup_ = MEDIUM_GROWTH;
   }
-  if (GetQuicReloadableFlag(quic_bbr_conservation_in_startup) &&
-      config.HasClientRequestedIndependentOption(kBBS3, perspective)) {
-    QUIC_FLAG_COUNT_N(quic_reloadable_flag_quic_bbr_conservation_in_startup, 3,
-                      3);
+  if (config.HasClientRequestedIndependentOption(kBBS3, perspective)) {
     initial_conservation_in_startup_ = GROWTH;
   }
-  if (GetQuicReloadableFlag(quic_bbr_ack_aggregation_window) &&
-      config.HasClientRequestedIndependentOption(kBBR4, perspective)) {
-    QUIC_FLAG_COUNT_N(quic_reloadable_flag_quic_bbr_ack_aggregation_window, 1,
-                      2);
+  if (config.HasClientRequestedIndependentOption(kBBR4, perspective)) {
     max_ack_height_.SetWindowLength(2 * kBandwidthWindowSize);
   }
-  if (GetQuicReloadableFlag(quic_bbr_ack_aggregation_window) &&
-      config.HasClientRequestedIndependentOption(kBBR5, perspective)) {
-    QUIC_FLAG_COUNT_N(quic_reloadable_flag_quic_bbr_ack_aggregation_window, 2,
-                      2);
+  if (config.HasClientRequestedIndependentOption(kBBR5, perspective)) {
     max_ack_height_.SetWindowLength(4 * kBandwidthWindowSize);
   }
   if (GetQuicReloadableFlag(quic_bbr_less_probe_rtt) &&
@@ -271,6 +257,11 @@
     QUIC_FLAG_COUNT_N(quic_reloadable_flag_quic_bbr_less_probe_rtt, 3, 3);
     probe_rtt_disabled_if_app_limited_ = true;
   }
+  if (GetQuicReloadableFlag(quic_one_tlp) &&
+      config.HasClientRequestedIndependentOption(kMIN1, perspective)) {
+    QUIC_FLAG_COUNT_N(quic_reloadable_flag_quic_one_tlp, 2, 2);
+    min_congestion_window_ = kMaxSegmentSize;
+  }
 }
 
 void BbrSender::AdjustNetworkParameters(QuicBandwidth bandwidth,
@@ -368,14 +359,14 @@
     congestion_window = gain * initial_congestion_window_;
   }
 
-  return std::max(congestion_window, kMinimumCongestionWindow);
+  return std::max(congestion_window, min_congestion_window_);
 }
 
 QuicByteCount BbrSender::ProbeRttCongestionWindow() const {
   if (probe_rtt_based_on_bdp_) {
     return GetTargetCongestionWindow(kModerateProbeRttMultiplier);
   }
-  return kMinimumCongestionWindow;
+  return min_congestion_window_;
 }
 
 void BbrSender::EnterStartupMode() {
@@ -744,7 +735,7 @@
   }
 
   // Enforce the limits on the congestion window.
-  congestion_window_ = std::max(congestion_window_, kMinimumCongestionWindow);
+  congestion_window_ = std::max(congestion_window_, min_congestion_window_);
   congestion_window_ = std::min(congestion_window_, max_congestion_window_);
 }
 
@@ -761,7 +752,7 @@
   // Set up the initial recovery window.
   if (recovery_window_ == 0) {
     recovery_window_ = unacked_packets_->bytes_in_flight() + bytes_acked;
-    recovery_window_ = std::max(kMinimumCongestionWindow, recovery_window_);
+    recovery_window_ = std::max(min_congestion_window_, recovery_window_);
     return;
   }
 
@@ -784,7 +775,7 @@
   // |bytes_acked| in response.
   recovery_window_ = std::max(
       recovery_window_, unacked_packets_->bytes_in_flight() + bytes_acked);
-  recovery_window_ = std::max(kMinimumCongestionWindow, recovery_window_);
+  recovery_window_ = std::max(min_congestion_window_, recovery_window_);
 }
 
 std::string BbrSender::GetDebugState() const {
diff --git a/net/quic/core/congestion_control/bbr_sender.h b/net/quic/core/congestion_control/bbr_sender.h
index 149bc06c..122abe3 100644
--- a/net/quic/core/congestion_control/bbr_sender.h
+++ b/net/quic/core/congestion_control/bbr_sender.h
@@ -268,6 +268,9 @@
   // The largest value the |congestion_window_| can achieve.
   QuicByteCount max_congestion_window_;
 
+  // The smallest value the |congestion_window_| can achieve.
+  QuicByteCount min_congestion_window_;
+
   // The current pacing rate of the connection.
   QuicBandwidth pacing_rate_;
 
diff --git a/net/quic/core/congestion_control/bbr_sender_test.cc b/net/quic/core/congestion_control/bbr_sender_test.cc
index a647721..a229e8a 100644
--- a/net/quic/core/congestion_control/bbr_sender_test.cc
+++ b/net/quic/core/congestion_control/bbr_sender_test.cc
@@ -428,7 +428,6 @@
 // Test a simple long data transfer with 2 rtts of aggregation.
 TEST_F(BbrSenderTest, SimpleTransfer2RTTAggregationBytes20RTTWindow) {
   SetQuicReloadableFlag(quic_bbr_add_tso_cwnd, false);
-  SetQuicReloadableFlag(quic_bbr_ack_aggregation_window, true);
   CreateDefaultSetup();
   SetConnectionOption(kBBR4);
   // 2 RTTs of aggregation, with a max of 10kb.
@@ -455,7 +454,6 @@
 // Test a simple long data transfer with 2 rtts of aggregation.
 TEST_F(BbrSenderTest, SimpleTransfer2RTTAggregationBytes40RTTWindow) {
   SetQuicReloadableFlag(quic_bbr_add_tso_cwnd, false);
-  SetQuicReloadableFlag(quic_bbr_ack_aggregation_window, true);
   CreateDefaultSetup();
   SetConnectionOption(kBBR5);
   // 2 RTTs of aggregation, with a max of 10kb.
@@ -552,7 +550,6 @@
   const QuicTime::Delta timeout = QuicTime::Delta::FromSeconds(10);
   bool simulator_result;
   CreateSmallBufferSetup();
-  SetQuicReloadableFlag(quic_bbr_conservation_in_startup, true);
   SetConnectionOption(kBBS2);
 
   bbr_sender_.AddBytesToTransfer(100 * 1024 * 1024);
@@ -603,7 +600,6 @@
   const QuicTime::Delta timeout = QuicTime::Delta::FromSeconds(10);
   bool simulator_result;
   CreateSmallBufferSetup();
-  SetQuicReloadableFlag(quic_bbr_conservation_in_startup, true);
   SetConnectionOption(kBBS3);
 
   bbr_sender_.AddBytesToTransfer(100 * 1024 * 1024);
@@ -1042,7 +1038,6 @@
 TEST_F(BbrSenderTest, SimpleTransferNoConservationInStartup) {
   // Adding TSO CWND causes packet loss before exiting startup.
   SetQuicReloadableFlag(quic_bbr_add_tso_cwnd, false);
-  SetQuicReloadableFlag(quic_bbr_conservation_in_startup, true);
   CreateSmallBufferSetup();
 
   SetConnectionOption(kBBS1);
@@ -1107,5 +1102,36 @@
   DriveOutOfStartup();
 }
 
+// Test with a min CWND of 1 instead of 4 packets.
+TEST_F(BbrSenderTest, ProbeRTTMinCWND1) {
+  SetQuicReloadableFlag(quic_one_tlp, true);
+  CreateDefaultSetup();
+  SetConnectionOption(kMIN1);
+  DriveOutOfStartup();
+
+  // We have no intention of ever finishing this transfer.
+  bbr_sender_.AddBytesToTransfer(100 * 1024 * 1024);
+
+  // Wait until the connection enters PROBE_RTT.
+  const QuicTime::Delta timeout = QuicTime::Delta::FromSeconds(12);
+  bool simulator_result = simulator_.RunUntilOrTimeout(
+      [this]() {
+        return sender_->ExportDebugState().mode == BbrSender::PROBE_RTT;
+      },
+      timeout);
+  ASSERT_TRUE(simulator_result);
+  ASSERT_EQ(BbrSender::PROBE_RTT, sender_->ExportDebugState().mode);
+  // The PROBE_RTT CWND should be 1 if the min CWND is 1.
+  EXPECT_EQ(kDefaultTCPMSS, sender_->GetCongestionWindow());
+
+  // Exit PROBE_RTT.
+  const QuicTime probe_rtt_start = clock_->Now();
+  const QuicTime::Delta time_to_exit_probe_rtt =
+      kTestRtt + QuicTime::Delta::FromMilliseconds(200);
+  simulator_.RunFor(1.5 * time_to_exit_probe_rtt);
+  EXPECT_EQ(BbrSender::PROBE_BW, sender_->ExportDebugState().mode);
+  EXPECT_GE(sender_->ExportDebugState().min_rtt_timestamp, probe_rtt_start);
+}
+
 }  // namespace test
 }  // namespace net
diff --git a/net/quic/core/congestion_control/tcp_cubic_sender_base.cc b/net/quic/core/congestion_control/tcp_cubic_sender_base.cc
deleted file mode 100644
index 1c8cee7a2..0000000
--- a/net/quic/core/congestion_control/tcp_cubic_sender_base.cc
+++ /dev/null
@@ -1,261 +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 "net/quic/core/congestion_control/tcp_cubic_sender_base.h"
-
-#include <algorithm>
-
-#include "net/quic/core/congestion_control/prr_sender.h"
-#include "net/quic/core/congestion_control/rtt_stats.h"
-#include "net/quic/core/crypto/crypto_protocol.h"
-#include "net/quic/platform/api/quic_bug_tracker.h"
-
-namespace net {
-
-namespace {
-// Constants based on TCP defaults.
-// The minimum cwnd based on RFC 3782 (TCP NewReno) for cwnd reductions on a
-// fast retransmission.  The cwnd after a timeout is still 1.
-const QuicByteCount kMaxBurstBytes = 3 * kDefaultTCPMSS;
-const float kRenoBeta = 0.7f;               // Reno backoff factor.
-const uint32_t kDefaultNumConnections = 2;  // N-connection emulation.
-}  // namespace
-
-TcpCubicSenderBase::TcpCubicSenderBase(const QuicClock* clock,
-                                       const RttStats* rtt_stats,
-                                       bool reno,
-                                       QuicConnectionStats* stats)
-    : rtt_stats_(rtt_stats),
-      stats_(stats),
-      reno_(reno),
-      num_connections_(kDefaultNumConnections),
-      largest_sent_packet_number_(0),
-      largest_acked_packet_number_(0),
-      largest_sent_at_last_cutback_(0),
-      min4_mode_(false),
-      last_cutback_exited_slowstart_(false),
-      slow_start_large_reduction_(false),
-      no_prr_(false) {}
-
-TcpCubicSenderBase::~TcpCubicSenderBase() {}
-
-void TcpCubicSenderBase::SetFromConfig(const QuicConfig& config,
-                                       Perspective perspective) {
-  if (perspective == Perspective::IS_SERVER) {
-    if (config.HasReceivedConnectionOptions() &&
-        ContainsQuicTag(config.ReceivedConnectionOptions(), kIW03)) {
-      // Initial window experiment.
-      SetCongestionWindowInPackets(3);
-    }
-    if (config.HasReceivedConnectionOptions() &&
-        ContainsQuicTag(config.ReceivedConnectionOptions(), kIW10)) {
-      // Initial window experiment.
-      SetCongestionWindowInPackets(10);
-    }
-    if (config.HasReceivedConnectionOptions() &&
-        ContainsQuicTag(config.ReceivedConnectionOptions(), kIW20)) {
-      // Initial window experiment.
-      SetCongestionWindowInPackets(20);
-    }
-    if (config.HasReceivedConnectionOptions() &&
-        ContainsQuicTag(config.ReceivedConnectionOptions(), kIW50)) {
-      // Initial window experiment.
-      SetCongestionWindowInPackets(50);
-    }
-    if (config.HasReceivedConnectionOptions() &&
-        ContainsQuicTag(config.ReceivedConnectionOptions(), kMIN1)) {
-      // Min CWND experiment.
-      SetMinCongestionWindowInPackets(1);
-    }
-    if (config.HasReceivedConnectionOptions() &&
-        ContainsQuicTag(config.ReceivedConnectionOptions(), kMIN4)) {
-      // Min CWND of 4 experiment.
-      min4_mode_ = true;
-      SetMinCongestionWindowInPackets(1);
-    }
-    if (config.HasReceivedConnectionOptions() &&
-        ContainsQuicTag(config.ReceivedConnectionOptions(), kSSLR)) {
-      // Slow Start Fast Exit experiment.
-      slow_start_large_reduction_ = true;
-    }
-    if (config.HasReceivedConnectionOptions() &&
-        ContainsQuicTag(config.ReceivedConnectionOptions(), kNPRR)) {
-      // Use unity pacing instead of PRR.
-      no_prr_ = true;
-    }
-  }
-}
-
-void TcpCubicSenderBase::AdjustNetworkParameters(QuicBandwidth bandwidth,
-                                                 QuicTime::Delta rtt) {
-  if (bandwidth.IsZero() || rtt.IsZero()) {
-    return;
-  }
-
-  SetCongestionWindowFromBandwidthAndRtt(bandwidth, rtt);
-}
-
-void TcpCubicSenderBase::SetNumEmulatedConnections(int num_connections) {
-  num_connections_ = std::max(1, num_connections);
-}
-
-float TcpCubicSenderBase::RenoBeta() const {
-  // kNConnectionBeta is the backoff factor after loss for our N-connection
-  // emulation, which emulates the effective backoff of an ensemble of N
-  // TCP-Reno connections on a single loss event. The effective multiplier is
-  // computed as:
-  return (num_connections_ - 1 + kRenoBeta) / num_connections_;
-}
-
-void TcpCubicSenderBase::OnCongestionEvent(
-    bool rtt_updated,
-    QuicByteCount prior_in_flight,
-    QuicTime event_time,
-    const AckedPacketVector& acked_packets,
-    const LostPacketVector& lost_packets) {
-  if (rtt_updated && InSlowStart() &&
-      hybrid_slow_start_.ShouldExitSlowStart(
-          rtt_stats_->latest_rtt(), rtt_stats_->min_rtt(),
-          GetCongestionWindow() / kDefaultTCPMSS)) {
-    ExitSlowstart();
-  }
-  for (const LostPacket& lost_packet : lost_packets) {
-    OnPacketLost(lost_packet.packet_number, lost_packet.bytes_lost,
-                 prior_in_flight);
-  }
-  for (const AckedPacket acked_packet : acked_packets) {
-    OnPacketAcked(acked_packet.packet_number, acked_packet.bytes_acked,
-                  prior_in_flight, event_time);
-  }
-}
-
-void TcpCubicSenderBase::OnPacketAcked(QuicPacketNumber acked_packet_number,
-                                       QuicByteCount acked_bytes,
-                                       QuicByteCount prior_in_flight,
-                                       QuicTime event_time) {
-  largest_acked_packet_number_ =
-      std::max(acked_packet_number, largest_acked_packet_number_);
-  if (InRecovery()) {
-    if (!no_prr_) {
-      // PRR is used when in recovery.
-      prr_.OnPacketAcked(acked_bytes);
-    }
-    return;
-  }
-  MaybeIncreaseCwnd(acked_packet_number, acked_bytes, prior_in_flight,
-                    event_time);
-  if (InSlowStart()) {
-    hybrid_slow_start_.OnPacketAcked(acked_packet_number);
-  }
-}
-
-void TcpCubicSenderBase::OnPacketSent(
-    QuicTime /*sent_time*/,
-    QuicByteCount /*bytes_in_flight*/,
-    QuicPacketNumber packet_number,
-    QuicByteCount bytes,
-    HasRetransmittableData is_retransmittable) {
-  if (InSlowStart()) {
-    ++(stats_->slowstart_packets_sent);
-  }
-
-  if (is_retransmittable != HAS_RETRANSMITTABLE_DATA) {
-    return;
-  }
-  if (InRecovery()) {
-    // PRR is used when in recovery.
-    prr_.OnPacketSent(bytes);
-  }
-  DCHECK_LT(largest_sent_packet_number_, packet_number);
-  largest_sent_packet_number_ = packet_number;
-  hybrid_slow_start_.OnPacketSent(packet_number);
-}
-
-bool TcpCubicSenderBase::CanSend(QuicByteCount bytes_in_flight) {
-  if (!no_prr_ && InRecovery()) {
-    // PRR is used when in recovery.
-    return prr_.CanSend(GetCongestionWindow(), bytes_in_flight,
-                        GetSlowStartThreshold());
-  }
-  if (GetCongestionWindow() > bytes_in_flight) {
-    return true;
-  }
-  if (min4_mode_ && bytes_in_flight < 4 * kDefaultTCPMSS) {
-    return true;
-  }
-  return false;
-}
-
-QuicBandwidth TcpCubicSenderBase::PacingRate(
-    QuicByteCount /* bytes_in_flight */) const {
-  // We pace at twice the rate of the underlying sender's bandwidth estimate
-  // during slow start and 1.25x during congestion avoidance to ensure pacing
-  // doesn't prevent us from filling the window.
-  QuicTime::Delta srtt = rtt_stats_->smoothed_rtt();
-  if (srtt.IsZero()) {
-    srtt = QuicTime::Delta::FromMicroseconds(rtt_stats_->initial_rtt_us());
-  }
-  const QuicBandwidth bandwidth =
-      QuicBandwidth::FromBytesAndTimeDelta(GetCongestionWindow(), srtt);
-  return bandwidth * (InSlowStart() ? 2 : (no_prr_ && InRecovery() ? 1 : 1.25));
-}
-
-QuicBandwidth TcpCubicSenderBase::BandwidthEstimate() const {
-  QuicTime::Delta srtt = rtt_stats_->smoothed_rtt();
-  if (srtt.IsZero()) {
-    // If we haven't measured an rtt, the bandwidth estimate is unknown.
-    return QuicBandwidth::Zero();
-  }
-  return QuicBandwidth::FromBytesAndTimeDelta(GetCongestionWindow(), srtt);
-}
-
-bool TcpCubicSenderBase::InSlowStart() const {
-  return GetCongestionWindow() < GetSlowStartThreshold();
-}
-
-bool TcpCubicSenderBase::IsCwndLimited(QuicByteCount bytes_in_flight) const {
-  const QuicByteCount congestion_window = GetCongestionWindow();
-  if (bytes_in_flight >= congestion_window) {
-    return true;
-  }
-  const QuicByteCount available_bytes = congestion_window - bytes_in_flight;
-  const bool slow_start_limited =
-      InSlowStart() && bytes_in_flight > congestion_window / 2;
-  return slow_start_limited || available_bytes <= kMaxBurstBytes;
-}
-
-bool TcpCubicSenderBase::InRecovery() const {
-  return largest_acked_packet_number_ <= largest_sent_at_last_cutback_ &&
-         largest_acked_packet_number_ != 0;
-}
-
-bool TcpCubicSenderBase::IsProbingForMoreBandwidth() const {
-  return false;
-}
-
-void TcpCubicSenderBase::OnRetransmissionTimeout(bool packets_retransmitted) {
-  largest_sent_at_last_cutback_ = 0;
-  if (!packets_retransmitted) {
-    return;
-  }
-  hybrid_slow_start_.Restart();
-  HandleRetransmissionTimeout();
-}
-
-void TcpCubicSenderBase::OnConnectionMigration() {
-  hybrid_slow_start_.Restart();
-  prr_ = PrrSender();
-  largest_sent_packet_number_ = 0;
-  largest_acked_packet_number_ = 0;
-  largest_sent_at_last_cutback_ = 0;
-  last_cutback_exited_slowstart_ = false;
-}
-
-std::string TcpCubicSenderBase::GetDebugState() const {
-  return "";
-}
-
-void TcpCubicSenderBase::OnApplicationLimited(QuicByteCount bytes_in_flight) {}
-
-}  // namespace net
diff --git a/net/quic/core/congestion_control/tcp_cubic_sender_base.h b/net/quic/core/congestion_control/tcp_cubic_sender_base.h
deleted file mode 100644
index 721662c..0000000
--- a/net/quic/core/congestion_control/tcp_cubic_sender_base.h
+++ /dev/null
@@ -1,158 +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.
-//
-// TCP cubic send side congestion algorithm, emulates the behavior of TCP cubic.
-
-#ifndef NET_QUIC_CORE_CONGESTION_CONTROL_TCP_CUBIC_SENDER_BASE_H_
-#define NET_QUIC_CORE_CONGESTION_CONTROL_TCP_CUBIC_SENDER_BASE_H_
-
-#include <cstdint>
-
-#include "base/compiler_specific.h"
-#include "base/macros.h"
-#include "net/quic/core/congestion_control/hybrid_slow_start.h"
-#include "net/quic/core/congestion_control/prr_sender.h"
-#include "net/quic/core/congestion_control/send_algorithm_interface.h"
-#include "net/quic/core/quic_bandwidth.h"
-#include "net/quic/core/quic_connection_stats.h"
-#include "net/quic/core/quic_packets.h"
-#include "net/quic/core/quic_time.h"
-#include "net/quic/platform/api/quic_export.h"
-
-namespace net {
-
-class RttStats;
-
-// Maximum window to allow when doing bandwidth resumption.
-const QuicPacketCount kMaxResumptionCongestionWindow = 200;
-
-namespace test {
-class TcpCubicSenderBasePeer;
-}  // namespace test
-
-class QUIC_EXPORT_PRIVATE TcpCubicSenderBase : public SendAlgorithmInterface {
- public:
-  // Reno option and max_tcp_congestion_window are provided for testing.
-  TcpCubicSenderBase(const QuicClock* clock,
-                     const RttStats* rtt_stats,
-                     bool reno,
-                     QuicConnectionStats* stats);
-
-  ~TcpCubicSenderBase() override;
-
-  // Start implementation of SendAlgorithmInterface.
-  void SetFromConfig(const QuicConfig& config,
-                     Perspective perspective) override;
-  void AdjustNetworkParameters(QuicBandwidth bandwidth,
-                               QuicTime::Delta rtt) override;
-  void SetNumEmulatedConnections(int num_connections) override;
-  void OnCongestionEvent(bool rtt_updated,
-                         QuicByteCount prior_in_flight,
-                         QuicTime event_time,
-                         const AckedPacketVector& acked_packets,
-                         const LostPacketVector& lost_packets) override;
-  void OnPacketSent(QuicTime sent_time,
-                    QuicByteCount bytes_in_flight,
-                    QuicPacketNumber packet_number,
-                    QuicByteCount bytes,
-                    HasRetransmittableData is_retransmittable) override;
-  void OnRetransmissionTimeout(bool packets_retransmitted) override;
-  void OnConnectionMigration() override;
-  bool CanSend(QuicByteCount bytes_in_flight) override;
-  QuicBandwidth PacingRate(QuicByteCount bytes_in_flight) const override;
-  QuicBandwidth BandwidthEstimate() const override;
-  bool InSlowStart() const override;
-  bool InRecovery() const override;
-  bool IsProbingForMoreBandwidth() const override;
-  std::string GetDebugState() const override;
-  void OnApplicationLimited(QuicByteCount bytes_in_flight) override;
-
- protected:
-  // Called when resuming a previous bandwidth.
-  virtual void SetCongestionWindowFromBandwidthAndRtt(QuicBandwidth bandwidth,
-                                                      QuicTime::Delta rtt) = 0;
-
-  // Called when initializing the congestion window.
-  virtual void SetCongestionWindowInPackets(
-      QuicPacketCount congestion_window) = 0;
-
-  // Called when initializing the minimum congestion window.
-  virtual void SetMinCongestionWindowInPackets(
-      QuicPacketCount congestion_window) = 0;
-
-  // Called when slow start is exited to set SSTHRESH.
-  virtual void ExitSlowstart() = 0;
-
-  // Called when a packet is lost.
-  virtual void OnPacketLost(QuicPacketNumber largest_loss,
-                            QuicByteCount lost_bytes,
-                            QuicByteCount prior_in_flight) = 0;
-
-  // Called when a packet has been acked to possibly increase the congestion
-  // window.
-  virtual void MaybeIncreaseCwnd(QuicPacketNumber acked_packet_number,
-                                 QuicByteCount acked_bytes,
-                                 QuicByteCount prior_in_flight,
-                                 QuicTime event_time) = 0;
-
-  // Called when a retransmission has occured which resulted in packets
-  // being retransmitted.
-  virtual void HandleRetransmissionTimeout() = 0;
-
-  // Compute the TCP Reno beta based on the current number of connections.
-  float RenoBeta() const;
-
-  bool IsCwndLimited(QuicByteCount bytes_in_flight) const;
-
- private:
-  friend class test::TcpCubicSenderBasePeer;
-
-  // TODO(ianswett): Remove these and migrate to OnCongestionEvent.
-  void OnPacketAcked(QuicPacketNumber acked_packet_number,
-                     QuicByteCount acked_bytes,
-                     QuicByteCount prior_in_flight,
-                     QuicTime event_time);
-
- protected:
-  // TODO(rch): Make these private and clean up subclass access to them.
-  HybridSlowStart hybrid_slow_start_;
-  PrrSender prr_;
-  const RttStats* rtt_stats_;
-  QuicConnectionStats* stats_;
-
-  // If true, Reno congestion control is used instead of Cubic.
-  const bool reno_;
-
-  // Number of connections to simulate.
-  uint32_t num_connections_;
-
-  // Track the largest packet that has been sent.
-  QuicPacketNumber largest_sent_packet_number_;
-
-  // Track the largest packet that has been acked.
-  QuicPacketNumber largest_acked_packet_number_;
-
-  // Track the largest packet number outstanding when a CWND cutback occurs.
-  QuicPacketNumber largest_sent_at_last_cutback_;
-
-  // Whether to use 4 packets as the actual min, but pace lower.
-  bool min4_mode_;
-
-  // Whether the last loss event caused us to exit slowstart.
-  // Used for stats collection of slowstart_packets_lost
-  bool last_cutback_exited_slowstart_;
-
-  // When true, exit slow start with large cutback of congestion window.
-  bool slow_start_large_reduction_;
-
-  // When true, use unity pacing instead of PRR.
-  bool no_prr_;
-
- private:
-  DISALLOW_COPY_AND_ASSIGN(TcpCubicSenderBase);
-};
-
-}  // namespace net
-
-#endif  // NET_QUIC_CORE_CONGESTION_CONTROL_TCP_CUBIC_SENDER_BASE_H_
diff --git a/net/quic/core/congestion_control/tcp_cubic_sender_bytes.cc b/net/quic/core/congestion_control/tcp_cubic_sender_bytes.cc
index c4b1d7cd..1cb6e772 100644
--- a/net/quic/core/congestion_control/tcp_cubic_sender_bytes.cc
+++ b/net/quic/core/congestion_control/tcp_cubic_sender_bytes.cc
@@ -18,6 +18,9 @@
 
 namespace {
 // Constants based on TCP defaults.
+const QuicByteCount kMaxBurstBytes = 3 * kDefaultTCPMSS;
+const float kRenoBeta = 0.7f;               // Reno backoff factor.
+const uint32_t kDefaultNumConnections = 2;  // N-connection emulation.
 // The minimum cwnd based on RFC 3782 (TCP NewReno) for cwnd reductions on a
 // fast retransmission.
 const QuicByteCount kDefaultMinimumCongestionWindow = 2 * kDefaultTCPMSS;
@@ -30,7 +33,17 @@
     QuicPacketCount initial_tcp_congestion_window,
     QuicPacketCount max_congestion_window,
     QuicConnectionStats* stats)
-    : TcpCubicSenderBase(clock, rtt_stats, reno, stats),
+    : rtt_stats_(rtt_stats),
+      stats_(stats),
+      reno_(reno),
+      num_connections_(kDefaultNumConnections),
+      largest_sent_packet_number_(0),
+      largest_acked_packet_number_(0),
+      largest_sent_at_last_cutback_(0),
+      min4_mode_(false),
+      last_cutback_exited_slowstart_(false),
+      slow_start_large_reduction_(false),
+      no_prr_(false),
       cubic_(clock),
       num_acked_packets_(0),
       congestion_window_(initial_tcp_congestion_window * kDefaultTCPMSS),
@@ -47,9 +60,209 @@
 
 void TcpCubicSenderBytes::SetFromConfig(const QuicConfig& config,
                                         Perspective perspective) {
-  TcpCubicSenderBase::SetFromConfig(config, perspective);
+  if (perspective == Perspective::IS_SERVER) {
+    if (config.HasReceivedConnectionOptions() &&
+        ContainsQuicTag(config.ReceivedConnectionOptions(), kIW03)) {
+      // Initial window experiment.
+      SetCongestionWindowInPackets(3);
+    }
+    if (config.HasReceivedConnectionOptions() &&
+        ContainsQuicTag(config.ReceivedConnectionOptions(), kIW10)) {
+      // Initial window experiment.
+      SetCongestionWindowInPackets(10);
+    }
+    if (config.HasReceivedConnectionOptions() &&
+        ContainsQuicTag(config.ReceivedConnectionOptions(), kIW20)) {
+      // Initial window experiment.
+      SetCongestionWindowInPackets(20);
+    }
+    if (config.HasReceivedConnectionOptions() &&
+        ContainsQuicTag(config.ReceivedConnectionOptions(), kIW50)) {
+      // Initial window experiment.
+      SetCongestionWindowInPackets(50);
+    }
+    if (config.HasReceivedConnectionOptions() &&
+        ContainsQuicTag(config.ReceivedConnectionOptions(), kMIN1)) {
+      // Min CWND experiment.
+      SetMinCongestionWindowInPackets(1);
+    }
+    if (config.HasReceivedConnectionOptions() &&
+        ContainsQuicTag(config.ReceivedConnectionOptions(), kMIN4)) {
+      // Min CWND of 4 experiment.
+      min4_mode_ = true;
+      SetMinCongestionWindowInPackets(1);
+    }
+    if (config.HasReceivedConnectionOptions() &&
+        ContainsQuicTag(config.ReceivedConnectionOptions(), kSSLR)) {
+      // Slow Start Fast Exit experiment.
+      slow_start_large_reduction_ = true;
+    }
+    if (config.HasReceivedConnectionOptions() &&
+        ContainsQuicTag(config.ReceivedConnectionOptions(), kNPRR)) {
+      // Use unity pacing instead of PRR.
+      no_prr_ = true;
+    }
+  }
 }
 
+void TcpCubicSenderBytes::AdjustNetworkParameters(QuicBandwidth bandwidth,
+                                                  QuicTime::Delta rtt) {
+  if (bandwidth.IsZero() || rtt.IsZero()) {
+    return;
+  }
+
+  SetCongestionWindowFromBandwidthAndRtt(bandwidth, rtt);
+}
+
+float TcpCubicSenderBytes::RenoBeta() const {
+  // kNConnectionBeta is the backoff factor after loss for our N-connection
+  // emulation, which emulates the effective backoff of an ensemble of N
+  // TCP-Reno connections on a single loss event. The effective multiplier is
+  // computed as:
+  return (num_connections_ - 1 + kRenoBeta) / num_connections_;
+}
+
+void TcpCubicSenderBytes::OnCongestionEvent(
+    bool rtt_updated,
+    QuicByteCount prior_in_flight,
+    QuicTime event_time,
+    const AckedPacketVector& acked_packets,
+    const LostPacketVector& lost_packets) {
+  if (rtt_updated && InSlowStart() &&
+      hybrid_slow_start_.ShouldExitSlowStart(
+          rtt_stats_->latest_rtt(), rtt_stats_->min_rtt(),
+          GetCongestionWindow() / kDefaultTCPMSS)) {
+    ExitSlowstart();
+  }
+  for (const LostPacket& lost_packet : lost_packets) {
+    OnPacketLost(lost_packet.packet_number, lost_packet.bytes_lost,
+                 prior_in_flight);
+  }
+  for (const AckedPacket acked_packet : acked_packets) {
+    OnPacketAcked(acked_packet.packet_number, acked_packet.bytes_acked,
+                  prior_in_flight, event_time);
+  }
+}
+
+void TcpCubicSenderBytes::OnPacketAcked(QuicPacketNumber acked_packet_number,
+                                        QuicByteCount acked_bytes,
+                                        QuicByteCount prior_in_flight,
+                                        QuicTime event_time) {
+  largest_acked_packet_number_ =
+      std::max(acked_packet_number, largest_acked_packet_number_);
+  if (InRecovery()) {
+    if (!no_prr_) {
+      // PRR is used when in recovery.
+      prr_.OnPacketAcked(acked_bytes);
+    }
+    return;
+  }
+  MaybeIncreaseCwnd(acked_packet_number, acked_bytes, prior_in_flight,
+                    event_time);
+  if (InSlowStart()) {
+    hybrid_slow_start_.OnPacketAcked(acked_packet_number);
+  }
+}
+
+void TcpCubicSenderBytes::OnPacketSent(
+    QuicTime /*sent_time*/,
+    QuicByteCount /*bytes_in_flight*/,
+    QuicPacketNumber packet_number,
+    QuicByteCount bytes,
+    HasRetransmittableData is_retransmittable) {
+  if (InSlowStart()) {
+    ++(stats_->slowstart_packets_sent);
+  }
+
+  if (is_retransmittable != HAS_RETRANSMITTABLE_DATA) {
+    return;
+  }
+  if (InRecovery()) {
+    // PRR is used when in recovery.
+    prr_.OnPacketSent(bytes);
+  }
+  DCHECK_LT(largest_sent_packet_number_, packet_number);
+  largest_sent_packet_number_ = packet_number;
+  hybrid_slow_start_.OnPacketSent(packet_number);
+}
+
+bool TcpCubicSenderBytes::CanSend(QuicByteCount bytes_in_flight) {
+  if (!no_prr_ && InRecovery()) {
+    // PRR is used when in recovery.
+    return prr_.CanSend(GetCongestionWindow(), bytes_in_flight,
+                        GetSlowStartThreshold());
+  }
+  if (GetCongestionWindow() > bytes_in_flight) {
+    return true;
+  }
+  if (min4_mode_ && bytes_in_flight < 4 * kDefaultTCPMSS) {
+    return true;
+  }
+  return false;
+}
+
+QuicBandwidth TcpCubicSenderBytes::PacingRate(
+    QuicByteCount /* bytes_in_flight */) const {
+  // We pace at twice the rate of the underlying sender's bandwidth estimate
+  // during slow start and 1.25x during congestion avoidance to ensure pacing
+  // doesn't prevent us from filling the window.
+  QuicTime::Delta srtt = rtt_stats_->smoothed_rtt();
+  if (srtt.IsZero()) {
+    srtt = QuicTime::Delta::FromMicroseconds(rtt_stats_->initial_rtt_us());
+  }
+  const QuicBandwidth bandwidth =
+      QuicBandwidth::FromBytesAndTimeDelta(GetCongestionWindow(), srtt);
+  return bandwidth * (InSlowStart() ? 2 : (no_prr_ && InRecovery() ? 1 : 1.25));
+}
+
+QuicBandwidth TcpCubicSenderBytes::BandwidthEstimate() const {
+  QuicTime::Delta srtt = rtt_stats_->smoothed_rtt();
+  if (srtt.IsZero()) {
+    // If we haven't measured an rtt, the bandwidth estimate is unknown.
+    return QuicBandwidth::Zero();
+  }
+  return QuicBandwidth::FromBytesAndTimeDelta(GetCongestionWindow(), srtt);
+}
+
+bool TcpCubicSenderBytes::InSlowStart() const {
+  return GetCongestionWindow() < GetSlowStartThreshold();
+}
+
+bool TcpCubicSenderBytes::IsCwndLimited(QuicByteCount bytes_in_flight) const {
+  const QuicByteCount congestion_window = GetCongestionWindow();
+  if (bytes_in_flight >= congestion_window) {
+    return true;
+  }
+  const QuicByteCount available_bytes = congestion_window - bytes_in_flight;
+  const bool slow_start_limited =
+      InSlowStart() && bytes_in_flight > congestion_window / 2;
+  return slow_start_limited || available_bytes <= kMaxBurstBytes;
+}
+
+bool TcpCubicSenderBytes::InRecovery() const {
+  return largest_acked_packet_number_ <= largest_sent_at_last_cutback_ &&
+         largest_acked_packet_number_ != 0;
+}
+
+bool TcpCubicSenderBytes::IsProbingForMoreBandwidth() const {
+  return false;
+}
+
+void TcpCubicSenderBytes::OnRetransmissionTimeout(bool packets_retransmitted) {
+  largest_sent_at_last_cutback_ = 0;
+  if (!packets_retransmitted) {
+    return;
+  }
+  hybrid_slow_start_.Restart();
+  HandleRetransmissionTimeout();
+}
+
+std::string TcpCubicSenderBytes::GetDebugState() const {
+  return "";
+}
+
+void TcpCubicSenderBytes::OnApplicationLimited(QuicByteCount bytes_in_flight) {}
+
 void TcpCubicSenderBytes::SetCongestionWindowFromBandwidthAndRtt(
     QuicBandwidth bandwidth,
     QuicTime::Delta rtt) {
@@ -72,7 +285,7 @@
 }
 
 void TcpCubicSenderBytes::SetNumEmulatedConnections(int num_connections) {
-  TcpCubicSenderBase::SetNumEmulatedConnections(num_connections);
+  num_connections_ = std::max(1, num_connections);
   cubic_.SetNumConnections(num_connections_);
 }
 
@@ -199,7 +412,12 @@
 }
 
 void TcpCubicSenderBytes::OnConnectionMigration() {
-  TcpCubicSenderBase::OnConnectionMigration();
+  hybrid_slow_start_.Restart();
+  prr_ = PrrSender();
+  largest_sent_packet_number_ = 0;
+  largest_acked_packet_number_ = 0;
+  largest_sent_at_last_cutback_ = 0;
+  last_cutback_exited_slowstart_ = false;
   cubic_.ResetCubicState();
   num_acked_packets_ = 0;
   congestion_window_ = initial_tcp_congestion_window_;
diff --git a/net/quic/core/congestion_control/tcp_cubic_sender_bytes.h b/net/quic/core/congestion_control/tcp_cubic_sender_bytes.h
index d49543f..83189bf 100644
--- a/net/quic/core/congestion_control/tcp_cubic_sender_bytes.h
+++ b/net/quic/core/congestion_control/tcp_cubic_sender_bytes.h
@@ -13,7 +13,7 @@
 #include "net/quic/core/congestion_control/cubic_bytes.h"
 #include "net/quic/core/congestion_control/hybrid_slow_start.h"
 #include "net/quic/core/congestion_control/prr_sender.h"
-#include "net/quic/core/congestion_control/tcp_cubic_sender_base.h"
+#include "net/quic/core/congestion_control/send_algorithm_interface.h"
 #include "net/quic/core/quic_bandwidth.h"
 #include "net/quic/core/quic_connection_stats.h"
 #include "net/quic/core/quic_packets.h"
@@ -24,11 +24,14 @@
 
 class RttStats;
 
+// Maximum window to allow when doing bandwidth resumption.
+const QuicPacketCount kMaxResumptionCongestionWindow = 200;
+
 namespace test {
 class TcpCubicSenderBytesPeer;
 }  // namespace test
 
-class QUIC_EXPORT_PRIVATE TcpCubicSenderBytes : public TcpCubicSenderBase {
+class QUIC_EXPORT_PRIVATE TcpCubicSenderBytes : public SendAlgorithmInterface {
  public:
   TcpCubicSenderBytes(const QuicClock* clock,
                       const RttStats* rtt_stats,
@@ -41,35 +44,97 @@
   // Start implementation of SendAlgorithmInterface.
   void SetFromConfig(const QuicConfig& config,
                      Perspective perspective) override;
+  void AdjustNetworkParameters(QuicBandwidth bandwidth,
+                               QuicTime::Delta rtt) override;
   void SetNumEmulatedConnections(int num_connections) override;
   void OnConnectionMigration() override;
+  void OnCongestionEvent(bool rtt_updated,
+                         QuicByteCount prior_in_flight,
+                         QuicTime event_time,
+                         const AckedPacketVector& acked_packets,
+                         const LostPacketVector& lost_packets) override;
+  void OnPacketSent(QuicTime sent_time,
+                    QuicByteCount bytes_in_flight,
+                    QuicPacketNumber packet_number,
+                    QuicByteCount bytes,
+                    HasRetransmittableData is_retransmittable) override;
+  void OnRetransmissionTimeout(bool packets_retransmitted) override;
+  bool CanSend(QuicByteCount bytes_in_flight) override;
+  QuicBandwidth PacingRate(QuicByteCount bytes_in_flight) const override;
+  QuicBandwidth BandwidthEstimate() const override;
   QuicByteCount GetCongestionWindow() const override;
   QuicByteCount GetSlowStartThreshold() const override;
   CongestionControlType GetCongestionControlType() const override;
+  bool InSlowStart() const override;
+  bool InRecovery() const override;
+  bool IsProbingForMoreBandwidth() const override;
+  std::string GetDebugState() const override;
+  void OnApplicationLimited(QuicByteCount bytes_in_flight) override;
   // End implementation of SendAlgorithmInterface.
 
   QuicByteCount min_congestion_window() const { return min_congestion_window_; }
 
  protected:
-  // TcpCubicSenderBase methods
+  // Compute the TCP Reno beta based on the current number of connections.
+  float RenoBeta() const;
+
+  bool IsCwndLimited(QuicByteCount bytes_in_flight) const;
+
+  // TODO(ianswett): Remove these and migrate to OnCongestionEvent.
+  void OnPacketAcked(QuicPacketNumber acked_packet_number,
+                     QuicByteCount acked_bytes,
+                     QuicByteCount prior_in_flight,
+                     QuicTime event_time);
   void SetCongestionWindowFromBandwidthAndRtt(QuicBandwidth bandwidth,
-                                              QuicTime::Delta rtt) override;
-  void SetCongestionWindowInPackets(QuicPacketCount congestion_window) override;
-  void SetMinCongestionWindowInPackets(
-      QuicPacketCount congestion_window) override;
-  void ExitSlowstart() override;
+                                              QuicTime::Delta rtt);
+  void SetCongestionWindowInPackets(QuicPacketCount congestion_window);
+  void SetMinCongestionWindowInPackets(QuicPacketCount congestion_window);
+  void ExitSlowstart();
   void OnPacketLost(QuicPacketNumber largest_loss,
                     QuicByteCount lost_bytes,
-                    QuicByteCount prior_in_flight) override;
+                    QuicByteCount prior_in_flight);
   void MaybeIncreaseCwnd(QuicPacketNumber acked_packet_number,
                          QuicByteCount acked_bytes,
                          QuicByteCount prior_in_flight,
-                         QuicTime event_time) override;
-  void HandleRetransmissionTimeout() override;
+                         QuicTime event_time);
+  void HandleRetransmissionTimeout();
 
  private:
   friend class test::TcpCubicSenderBytesPeer;
 
+  HybridSlowStart hybrid_slow_start_;
+  PrrSender prr_;
+  const RttStats* rtt_stats_;
+  QuicConnectionStats* stats_;
+
+  // If true, Reno congestion control is used instead of Cubic.
+  const bool reno_;
+
+  // Number of connections to simulate.
+  uint32_t num_connections_;
+
+  // Track the largest packet that has been sent.
+  QuicPacketNumber largest_sent_packet_number_;
+
+  // Track the largest packet that has been acked.
+  QuicPacketNumber largest_acked_packet_number_;
+
+  // Track the largest packet number outstanding when a CWND cutback occurs.
+  QuicPacketNumber largest_sent_at_last_cutback_;
+
+  // Whether to use 4 packets as the actual min, but pace lower.
+  bool min4_mode_;
+
+  // Whether the last loss event caused us to exit slowstart.
+  // Used for stats collection of slowstart_packets_lost
+  bool last_cutback_exited_slowstart_;
+
+  // When true, exit slow start with large cutback of congestion window.
+  bool slow_start_large_reduction_;
+
+  // When true, use unity pacing instead of PRR.
+  bool no_prr_;
+
   CubicBytes cubic_;
 
   // ACK counter for the Reno implementation.
diff --git a/net/quic/core/crypto/crypto_protocol.h b/net/quic/core/crypto/crypto_protocol.h
index 05433ec..cec1e35 100644
--- a/net/quic/core/crypto/crypto_protocol.h
+++ b/net/quic/core/crypto/crypto_protocol.h
@@ -113,6 +113,7 @@
 const QuicTag kIW50 = TAG('I', 'W', '5', '0');   // Force ICWND to 50
 const QuicTag k1CON = TAG('1', 'C', 'O', 'N');   // Emulate a single connection
 const QuicTag kNTLP = TAG('N', 'T', 'L', 'P');   // No tail loss probe
+const QuicTag k1TLP = TAG('1', 'T', 'L', 'P');   // 1 tail loss probe
 const QuicTag kNCON = TAG('N', 'C', 'O', 'N');   // N Connection Congestion Ctrl
 const QuicTag kNRTO = TAG('N', 'R', 'T', 'O');   // CWND reduction on loss
 const QuicTag kTIME = TAG('T', 'I', 'M', 'E');   // Time based loss detection
diff --git a/net/quic/core/crypto/crypto_server_test.cc b/net/quic/core/crypto/crypto_server_test.cc
index 30a8716c..0bf9d04 100644
--- a/net/quic/core/crypto/crypto_server_test.cc
+++ b/net/quic/core/crypto/crypto_server_test.cc
@@ -18,6 +18,7 @@
 #include "net/quic/core/crypto/quic_random.h"
 #include "net/quic/core/quic_socket_address_coder.h"
 #include "net/quic/core/quic_utils.h"
+#include "net/quic/core/tls_server_handshaker.h"
 #include "net/quic/platform/api/quic_arraysize.h"
 #include "net/quic/platform/api/quic_endian.h"
 #include "net/quic/platform/api/quic_flags.h"
@@ -109,7 +110,8 @@
         client_address_(QuicIpAddress::Loopback4(), 1234),
         config_(QuicCryptoServerConfig::TESTING,
                 rand_,
-                crypto_test_utils::ProofSourceForTesting()),
+                crypto_test_utils::ProofSourceForTesting(),
+                TlsServerHandshaker::CreateSslCtx()),
         peer_(&config_),
         compressed_certs_cache_(
             QuicCompressedCertsCache::kQuicCompressedCertsCacheSize),
@@ -1006,9 +1008,11 @@
   MockClock clock;
 
   QuicCryptoServerConfig a(QuicCryptoServerConfig::TESTING, &rand_a,
-                           crypto_test_utils::ProofSourceForTesting());
+                           crypto_test_utils::ProofSourceForTesting(),
+                           TlsServerHandshaker::CreateSslCtx());
   QuicCryptoServerConfig b(QuicCryptoServerConfig::TESTING, &rand_b,
-                           crypto_test_utils::ProofSourceForTesting());
+                           crypto_test_utils::ProofSourceForTesting(),
+                           TlsServerHandshaker::CreateSslCtx());
   std::unique_ptr<CryptoHandshakeMessage> scfg_a(
       a.AddDefaultConfig(&rand_a, &clock, options));
   std::unique_ptr<CryptoHandshakeMessage> scfg_b(
@@ -1027,10 +1031,12 @@
   MockClock clock;
 
   QuicCryptoServerConfig a(QuicCryptoServerConfig::TESTING, &rand_a,
-                           crypto_test_utils::ProofSourceForTesting());
+                           crypto_test_utils::ProofSourceForTesting(),
+                           TlsServerHandshaker::CreateSslCtx());
   rand_b.ChangeValue();
   QuicCryptoServerConfig b(QuicCryptoServerConfig::TESTING, &rand_b,
-                           crypto_test_utils::ProofSourceForTesting());
+                           crypto_test_utils::ProofSourceForTesting(),
+                           TlsServerHandshaker::CreateSslCtx());
   std::unique_ptr<CryptoHandshakeMessage> scfg_a(
       a.AddDefaultConfig(&rand_a, &clock, options));
   std::unique_ptr<CryptoHandshakeMessage> scfg_b(
@@ -1049,7 +1055,8 @@
   MockClock clock;
 
   QuicCryptoServerConfig a(QuicCryptoServerConfig::TESTING, &rand_a,
-                           crypto_test_utils::ProofSourceForTesting());
+                           crypto_test_utils::ProofSourceForTesting(),
+                           TlsServerHandshaker::CreateSslCtx());
   std::unique_ptr<CryptoHandshakeMessage> scfg(
       a.AddDefaultConfig(&rand_a, &clock, options));
 
diff --git a/net/quic/core/crypto/quic_crypto_client_config.cc b/net/quic/core/crypto/quic_crypto_client_config.cc
index 875b42d..8f0f0fc 100644
--- a/net/quic/core/crypto/quic_crypto_client_config.cc
+++ b/net/quic/core/crypto/quic_crypto_client_config.cc
@@ -29,6 +29,7 @@
 #include "net/quic/platform/api/quic_map_util.h"
 #include "net/quic/platform/api/quic_ptr_util.h"
 #include "net/quic/platform/api/quic_text_utils.h"
+#include "third_party/boringssl/src/include/openssl/ssl.h"
 
 using std::string;
 
@@ -56,8 +57,9 @@
 }  // namespace
 
 QuicCryptoClientConfig::QuicCryptoClientConfig(
-    std::unique_ptr<ProofVerifier> proof_verifier)
-    : proof_verifier_(std::move(proof_verifier)) {
+    std::unique_ptr<ProofVerifier> proof_verifier,
+    bssl::UniquePtr<SSL_CTX> ssl_ctx)
+    : proof_verifier_(std::move(proof_verifier)), ssl_ctx_(std::move(ssl_ctx)) {
   DCHECK(proof_verifier_.get());
   SetDefaults();
 }
@@ -924,6 +926,10 @@
   return channel_id_source_.get();
 }
 
+SSL_CTX* QuicCryptoClientConfig::ssl_ctx() const {
+  return ssl_ctx_.get();
+}
+
 void QuicCryptoClientConfig::SetChannelIDSource(ChannelIDSource* source) {
   channel_id_source_.reset(source);
 }
diff --git a/net/quic/core/crypto/quic_crypto_client_config.h b/net/quic/core/crypto/quic_crypto_client_config.h
index e5b413e..db8b23e 100644
--- a/net/quic/core/crypto/quic_crypto_client_config.h
+++ b/net/quic/core/crypto/quic_crypto_client_config.h
@@ -18,6 +18,7 @@
 #include "net/quic/platform/api/quic_export.h"
 #include "net/quic/platform/api/quic_reference_counted.h"
 #include "net/quic/platform/api/quic_string_piece.h"
+#include "third_party/boringssl/src/include/openssl/base.h"
 
 namespace net {
 
@@ -206,8 +207,8 @@
     virtual bool Matches(const QuicServerId& server_id) const = 0;
   };
 
-  explicit QuicCryptoClientConfig(
-      std::unique_ptr<ProofVerifier> proof_verifier);
+  QuicCryptoClientConfig(std::unique_ptr<ProofVerifier> proof_verifier,
+                         bssl::UniquePtr<SSL_CTX> ssl_ctx);
   ~QuicCryptoClientConfig();
 
   // LookupOrCreate returns a CachedState for the given |server_id|. If no such
@@ -313,6 +314,8 @@
 
   ChannelIDSource* channel_id_source() const;
 
+  SSL_CTX* ssl_ctx() const;
+
   // SetChannelIDSource sets a ChannelIDSource that will be called, when the
   // server supports channel IDs, to obtain a channel ID for signing a message
   // proving possession of the channel ID. This object takes ownership of
@@ -385,6 +388,7 @@
 
   std::unique_ptr<ProofVerifier> proof_verifier_;
   std::unique_ptr<ChannelIDSource> channel_id_source_;
+  bssl::UniquePtr<SSL_CTX> ssl_ctx_;
 
   // The |user_agent_id_| passed in QUIC's CHLO message.
   std::string user_agent_id_;
diff --git a/net/quic/core/crypto/quic_crypto_client_config_test.cc b/net/quic/core/crypto/quic_crypto_client_config_test.cc
index 5096cbd..d006c0f9 100644
--- a/net/quic/core/crypto/quic_crypto_client_config_test.cc
+++ b/net/quic/core/crypto/quic_crypto_client_config_test.cc
@@ -7,6 +7,7 @@
 #include "net/quic/core/crypto/proof_verifier.h"
 #include "net/quic/core/quic_server_id.h"
 #include "net/quic/core/quic_utils.h"
+#include "net/quic/core/tls_client_handshaker.h"
 #include "net/quic/platform/api/quic_endian.h"
 #include "net/quic/platform/api/quic_test.h"
 #include "net/quic/test_tools/crypto_test_utils.h"
@@ -173,7 +174,8 @@
 
 TEST_F(QuicCryptoClientConfigTest, InchoateChlo) {
   QuicCryptoClientConfig::CachedState state;
-  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting());
+  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting(),
+                                TlsClientHandshaker::CreateSslCtx());
   config.set_user_agent_id("quic-tester");
   config.set_alpn("hq");
   QuicReferenceCountedPointer<QuicCryptoNegotiatedParameters> params(
@@ -200,7 +202,8 @@
 }
 
 TEST_F(QuicCryptoClientConfigTest, PreferAesGcm) {
-  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting());
+  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting(),
+                                TlsClientHandshaker::CreateSslCtx());
   if (config.aead.size() > 1)
     EXPECT_NE(kAESG, config.aead[0]);
   config.PreferAesGcm();
@@ -209,7 +212,8 @@
 
 TEST_F(QuicCryptoClientConfigTest, InchoateChloSecure) {
   QuicCryptoClientConfig::CachedState state;
-  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting());
+  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting(),
+                                TlsClientHandshaker::CreateSslCtx());
   QuicReferenceCountedPointer<QuicCryptoNegotiatedParameters> params(
       new QuicCryptoNegotiatedParameters);
   CryptoHandshakeMessage msg;
@@ -240,7 +244,8 @@
       scfg.GetSerialized(Perspective::IS_CLIENT).AsStringPiece(), now, expiry,
       &details);
 
-  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting());
+  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting(),
+                                TlsClientHandshaker::CreateSslCtx());
   QuicReferenceCountedPointer<QuicCryptoNegotiatedParameters> params(
       new QuicCryptoNegotiatedParameters);
   CryptoHandshakeMessage msg;
@@ -268,7 +273,8 @@
       QuicWallTime::FromUNIXSeconds(1), QuicWallTime::FromUNIXSeconds(0),
       &details);
 
-  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting());
+  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting(),
+                                TlsClientHandshaker::CreateSslCtx());
   QuicReferenceCountedPointer<QuicCryptoNegotiatedParameters> params(
       new QuicCryptoNegotiatedParameters);
   CryptoHandshakeMessage msg;
@@ -285,7 +291,8 @@
 
 TEST_F(QuicCryptoClientConfigTest, FillClientHello) {
   QuicCryptoClientConfig::CachedState state;
-  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting());
+  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting(),
+                                TlsClientHandshaker::CreateSslCtx());
   QuicReferenceCountedPointer<QuicCryptoNegotiatedParameters> params(
       new QuicCryptoNegotiatedParameters);
   QuicConnectionId kConnectionId = 1234;
@@ -325,7 +332,8 @@
   QuicReferenceCountedPointer<QuicCryptoNegotiatedParameters> out_params(
       new QuicCryptoNegotiatedParameters);
   string error;
-  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting());
+  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting(),
+                                TlsClientHandshaker::CreateSslCtx());
   EXPECT_EQ(QUIC_VERSION_NEGOTIATION_MISMATCH,
             config.ProcessServerHello(msg, 0, supported_versions.front(),
                                       supported_versions, &cached, out_params,
@@ -334,7 +342,8 @@
 }
 
 TEST_F(QuicCryptoClientConfigTest, InitializeFrom) {
-  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting());
+  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting(),
+                                TlsClientHandshaker::CreateSslCtx());
   QuicServerId canonical_server_id("www.google.com", 443,
                                    PRIVACY_MODE_DISABLED);
   QuicCryptoClientConfig::CachedState* state =
@@ -355,7 +364,8 @@
 }
 
 TEST_F(QuicCryptoClientConfigTest, Canonical) {
-  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting());
+  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting(),
+                                TlsClientHandshaker::CreateSslCtx());
   config.AddCanonicalSuffix(".google.com");
   QuicServerId canonical_id1("www.google.com", 443, PRIVACY_MODE_DISABLED);
   QuicServerId canonical_id2("mail.google.com", 443, PRIVACY_MODE_DISABLED);
@@ -379,7 +389,8 @@
 }
 
 TEST_F(QuicCryptoClientConfigTest, CanonicalNotUsedIfNotValid) {
-  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting());
+  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting(),
+                                TlsClientHandshaker::CreateSslCtx());
   config.AddCanonicalSuffix(".google.com");
   QuicServerId canonical_id1("www.google.com", 443, PRIVACY_MODE_DISABLED);
   QuicServerId canonical_id2("mail.google.com", 443, PRIVACY_MODE_DISABLED);
@@ -394,7 +405,8 @@
 }
 
 TEST_F(QuicCryptoClientConfigTest, ClearCachedStates) {
-  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting());
+  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting(),
+                                TlsClientHandshaker::CreateSslCtx());
 
   // Create two states on different origins.
   struct TestCase {
@@ -490,7 +502,8 @@
   QuicReferenceCountedPointer<QuicCryptoNegotiatedParameters> out_params(
       new QuicCryptoNegotiatedParameters);
   string error;
-  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting());
+  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting(),
+                                TlsClientHandshaker::CreateSslCtx());
   EXPECT_EQ(QUIC_NO_ERROR,
             config.ProcessRejection(rej, QuicWallTime::FromUNIXSeconds(0),
                                     AllSupportedTransportVersions().front(), "",
@@ -511,7 +524,8 @@
   QuicReferenceCountedPointer<QuicCryptoNegotiatedParameters> out_params(
       new QuicCryptoNegotiatedParameters);
   string error;
-  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting());
+  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting(),
+                                TlsClientHandshaker::CreateSslCtx());
   EXPECT_EQ(QUIC_NO_ERROR,
             config.ProcessRejection(rej, QuicWallTime::FromUNIXSeconds(0),
                                     AllSupportedTransportVersions().front(), "",
@@ -538,7 +552,8 @@
   QuicReferenceCountedPointer<QuicCryptoNegotiatedParameters> out_params(
       new QuicCryptoNegotiatedParameters);
   string error;
-  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting());
+  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting(),
+                                TlsClientHandshaker::CreateSslCtx());
   EXPECT_EQ(QUIC_NO_ERROR,
             config.ProcessRejection(rej, QuicWallTime::FromUNIXSeconds(0),
                                     AllSupportedTransportVersions().front(), "",
@@ -560,7 +575,8 @@
   QuicReferenceCountedPointer<QuicCryptoNegotiatedParameters> out_params(
       new QuicCryptoNegotiatedParameters);
   string error;
-  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting());
+  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting(),
+                                TlsClientHandshaker::CreateSslCtx());
   EXPECT_EQ(QUIC_CRYPTO_MESSAGE_PARAMETER_NOT_FOUND,
             config.ProcessRejection(rej, QuicWallTime::FromUNIXSeconds(0),
                                     AllSupportedTransportVersions().front(), "",
@@ -579,7 +595,8 @@
   supported_versions.push_back(version);
   msg.SetVersionVector(kVER, supported_versions);
 
-  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting());
+  QuicCryptoClientConfig config(crypto_test_utils::ProofVerifierForTesting(),
+                                TlsClientHandshaker::CreateSslCtx());
   QuicCryptoClientConfig::CachedState cached;
   QuicReferenceCountedPointer<QuicCryptoNegotiatedParameters> out_params(
       new QuicCryptoNegotiatedParameters);
diff --git a/net/quic/core/crypto/quic_crypto_server_config.cc b/net/quic/core/crypto/quic_crypto_server_config.cc
index 4108a83..56c717e1 100644
--- a/net/quic/core/crypto/quic_crypto_server_config.cc
+++ b/net/quic/core/crypto/quic_crypto_server_config.cc
@@ -42,6 +42,7 @@
 #include "net/quic/platform/api/quic_reference_counted.h"
 #include "net/quic/platform/api/quic_text_utils.h"
 #include "third_party/boringssl/src/include/openssl/sha.h"
+#include "third_party/boringssl/src/include/openssl/ssl.h"
 
 using std::string;
 
@@ -152,13 +153,15 @@
 QuicCryptoServerConfig::QuicCryptoServerConfig(
     QuicStringPiece source_address_token_secret,
     QuicRandom* server_nonce_entropy,
-    std::unique_ptr<ProofSource> proof_source)
+    std::unique_ptr<ProofSource> proof_source,
+    bssl::UniquePtr<SSL_CTX> ssl_ctx)
     : replay_protection_(true),
       chlo_multiplier_(kMultiplier),
       configs_lock_(),
       primary_config_(nullptr),
       next_config_promotion_time_(QuicWallTime::Zero()),
       proof_source_(std::move(proof_source)),
+      ssl_ctx_(std::move(ssl_ctx)),
       source_address_token_future_secs_(3600),
       source_address_token_lifetime_secs_(86400),
       enable_serving_sct_(false),
@@ -1803,6 +1806,14 @@
   return configs_.size();
 }
 
+ProofSource* QuicCryptoServerConfig::proof_source() const {
+  return proof_source_.get();
+}
+
+SSL_CTX* QuicCryptoServerConfig::ssl_ctx() const {
+  return ssl_ctx_.get();
+}
+
 HandshakeFailureReason QuicCryptoServerConfig::ParseSourceAddressToken(
     const Config& config,
     QuicStringPiece token,
diff --git a/net/quic/core/crypto/quic_crypto_server_config.h b/net/quic/core/crypto/quic_crypto_server_config.h
index 861eae6..826c98c 100644
--- a/net/quic/core/crypto/quic_crypto_server_config.h
+++ b/net/quic/core/crypto/quic_crypto_server_config.h
@@ -28,6 +28,7 @@
 #include "net/quic/platform/api/quic_reference_counted.h"
 #include "net/quic/platform/api/quic_socket_address.h"
 #include "net/quic/platform/api/quic_string_piece.h"
+#include "third_party/boringssl/src/include/openssl/base.h"
 
 namespace net {
 
@@ -194,9 +195,11 @@
   //     server. Not owned.
   // |proof_source|: provides certificate chains and signatures. This class
   //     takes ownership of |proof_source|.
+  // |ssl_ctx|: The SSL_CTX used for doing TLS handshakes.
   QuicCryptoServerConfig(QuicStringPiece source_address_token_secret,
                          QuicRandom* server_nonce_entropy,
-                         std::unique_ptr<ProofSource> proof_source);
+                         std::unique_ptr<ProofSource> proof_source,
+                         bssl::UniquePtr<SSL_CTX> ssl_ctx);
   ~QuicCryptoServerConfig();
 
   // TESTING is a magic parameter for passing to the constructor in tests.
@@ -392,6 +395,10 @@
     rejection_observer_ = rejection_observer;
   }
 
+  ProofSource* proof_source() const;
+
+  SSL_CTX* ssl_ctx() const;
+
  private:
   friend class test::QuicCryptoServerConfigPeer;
   friend struct QuicSignedServerConfig;
@@ -740,6 +747,9 @@
   // signatures.
   std::unique_ptr<ProofSource> proof_source_;
 
+  // ssl_ctx_ contains the server configuration for doing TLS handshakes.
+  bssl::UniquePtr<SSL_CTX> ssl_ctx_;
+
   // ephemeral_key_source_ contains an object that caches ephemeral keys for a
   // short period of time.
   std::unique_ptr<EphemeralKeySource> ephemeral_key_source_;
diff --git a/net/quic/core/crypto/quic_crypto_server_config_test.cc b/net/quic/core/crypto/quic_crypto_server_config_test.cc
index 381c82b..437904e 100644
--- a/net/quic/core/crypto/quic_crypto_server_config_test.cc
+++ b/net/quic/core/crypto/quic_crypto_server_config_test.cc
@@ -15,6 +15,7 @@
 #include "net/quic/core/crypto/crypto_server_config_protobuf.h"
 #include "net/quic/core/crypto/quic_random.h"
 #include "net/quic/core/quic_time.h"
+#include "net/quic/core/tls_server_handshaker.h"
 #include "net/quic/platform/api/quic_socket_address.h"
 #include "net/quic/platform/api/quic_test.h"
 #include "net/quic/test_tools/crypto_test_utils.h"
@@ -31,7 +32,8 @@
 TEST_F(QuicCryptoServerConfigTest, ServerConfig) {
   QuicRandom* rand = QuicRandom::GetInstance();
   QuicCryptoServerConfig server(QuicCryptoServerConfig::TESTING, rand,
-                                crypto_test_utils::ProofSourceForTesting());
+                                crypto_test_utils::ProofSourceForTesting(),
+                                TlsServerHandshaker::CreateSslCtx());
   MockClock clock;
 
   std::unique_ptr<CryptoHandshakeMessage> message(server.AddDefaultConfig(
@@ -51,7 +53,8 @@
 
   QuicRandom* rand = QuicRandom::GetInstance();
   QuicCryptoServerConfig server(QuicCryptoServerConfig::TESTING, rand,
-                                crypto_test_utils::ProofSourceForTesting());
+                                crypto_test_utils::ProofSourceForTesting(),
+                                TlsServerHandshaker::CreateSslCtx());
   QuicCryptoServerConfigPeer peer(&server);
 
   std::vector<string> certs = {"testcert"};
@@ -70,7 +73,8 @@
 
   QuicRandom* rand = QuicRandom::GetInstance();
   QuicCryptoServerConfig server(QuicCryptoServerConfig::TESTING, rand,
-                                crypto_test_utils::ProofSourceForTesting());
+                                crypto_test_utils::ProofSourceForTesting(),
+                                TlsServerHandshaker::CreateSslCtx());
   QuicCryptoServerConfigPeer peer(&server);
 
   // Compress the certs for the first time.
@@ -99,7 +103,8 @@
 
   QuicRandom* rand = QuicRandom::GetInstance();
   QuicCryptoServerConfig server(QuicCryptoServerConfig::TESTING, rand,
-                                crypto_test_utils::ProofSourceForTesting());
+                                crypto_test_utils::ProofSourceForTesting(),
+                                TlsServerHandshaker::CreateSslCtx());
   QuicCryptoServerConfigPeer peer(&server);
 
   std::vector<string> certs = {"testcert"};
@@ -142,7 +147,8 @@
         rand_(QuicRandom::GetInstance()),
         server_(QuicCryptoServerConfig::TESTING,
                 rand_,
-                crypto_test_utils::ProofSourceForTesting()),
+                crypto_test_utils::ProofSourceForTesting(),
+                TlsServerHandshaker::CreateSslCtx()),
         peer_(&server_) {
     // Advance the clock to some non-zero time.
     clock_.AdvanceTime(QuicTime::Delta::FromSeconds(1000000));
@@ -280,7 +286,8 @@
       : rand_(QuicRandom::GetInstance()),
         config_(QuicCryptoServerConfig::TESTING,
                 rand_,
-                crypto_test_utils::ProofSourceForTesting()),
+                crypto_test_utils::ProofSourceForTesting(),
+                TlsServerHandshaker::CreateSslCtx()),
         test_peer_(&config_) {}
 
   void SetUp() override {
diff --git a/net/quic/core/frames/quic_ack_frame.cc b/net/quic/core/frames/quic_ack_frame.cc
index 7ef8cb88..6e22672 100644
--- a/net/quic/core/frames/quic_ack_frame.cc
+++ b/net/quic/core/frames/quic_ack_frame.cc
@@ -27,8 +27,7 @@
 }
 
 QuicAckFrame::QuicAckFrame()
-    : deprecated_largest_observed(0),
-      ack_delay_time(QuicTime::Delta::Infinite()) {}
+    : largest_acked(0), ack_delay_time(QuicTime::Delta::Infinite()) {}
 
 QuicAckFrame::QuicAckFrame(const QuicAckFrame& other) = default;
 
@@ -47,21 +46,6 @@
   return os;
 }
 
-QuicPacketNumber LargestAcked(const QuicAckFrame& frame) {
-  if (!GetQuicReloadableFlag(quic_deprecate_largest_observed)) {
-    return frame.deprecated_largest_observed;
-  }
-
-  if (!frame.packets.Empty() &&
-      frame.packets.Max() != frame.deprecated_largest_observed) {
-    QUIC_PEER_BUG << "Peer last received packet: " << frame.packets.Max()
-                  << " which is not equal to largest observed: "
-                  << frame.deprecated_largest_observed;
-  }
-
-  return frame.packets.Empty() ? 0 : frame.packets.Max();
-}
-
 PacketNumberQueue::PacketNumberQueue() {}
 PacketNumberQueue::PacketNumberQueue(const PacketNumberQueue& other) = default;
 PacketNumberQueue::PacketNumberQueue(PacketNumberQueue&& other) = default;
diff --git a/net/quic/core/frames/quic_ack_frame.h b/net/quic/core/frames/quic_ack_frame.h
index c714f285..98fe701 100644
--- a/net/quic/core/frames/quic_ack_frame.h
+++ b/net/quic/core/frames/quic_ack_frame.h
@@ -95,9 +95,10 @@
       std::ostream& os,
       const QuicAckFrame& ack_frame);
 
-  // The highest packet number we've observed from the peer.
-  // This is being deprecated.
-  QuicPacketNumber deprecated_largest_observed;
+  // The highest packet number we've observed from the peer. When |packets| is
+  // not empty, it should always be equal to packets.Max(). The |LargestAcked|
+  // function ensures this invariant in debug mode.
+  QuicPacketNumber largest_acked;
 
   // Time elapsed since largest_observed() was received until this Ack frame was
   // sent.
@@ -112,7 +113,11 @@
 
 // The highest acked packet number we've observed from the peer. If no packets
 // have been observed, return 0.
-QUIC_EXPORT_PRIVATE QuicPacketNumber LargestAcked(const QuicAckFrame& frame);
+inline QUIC_EXPORT_PRIVATE QuicPacketNumber
+LargestAcked(const QuicAckFrame& frame) {
+  DCHECK(frame.packets.Empty() || frame.packets.Max() == frame.largest_acked);
+  return frame.largest_acked;
+}
 
 // True if the packet number is greater than largest_observed or is listed
 // as missing.
diff --git a/net/quic/core/frames/quic_frames_test.cc b/net/quic/core/frames/quic_frames_test.cc
index 4463e89a..7e81b98 100644
--- a/net/quic/core/frames/quic_frames_test.cc
+++ b/net/quic/core/frames/quic_frames_test.cc
@@ -25,7 +25,7 @@
 
 TEST_F(QuicFramesTest, AckFrameToString) {
   QuicAckFrame frame;
-  frame.deprecated_largest_observed = 5;
+  frame.largest_acked = 5;
   frame.ack_delay_time = QuicTime::Delta::FromMicroseconds(3);
   frame.packets.Add(4);
   frame.packets.Add(5);
@@ -41,7 +41,7 @@
 
 TEST_F(QuicFramesTest, BigAckFrameToString) {
   QuicAckFrame frame;
-  frame.deprecated_largest_observed = 500;
+  frame.largest_acked = 500;
   frame.ack_delay_time = QuicTime::Delta::FromMicroseconds(3);
   frame.packets.AddRange(4, 501);
   frame.received_packet_times = {
@@ -159,7 +159,7 @@
 
 TEST_F(QuicFramesTest, IsAwaitingPacket) {
   QuicAckFrame ack_frame1;
-  ack_frame1.deprecated_largest_observed = 10u;
+  ack_frame1.largest_acked = 10u;
   ack_frame1.packets.AddRange(1, 11);
   EXPECT_TRUE(IsAwaitingPacket(ack_frame1, 11u, 0u));
   EXPECT_FALSE(IsAwaitingPacket(ack_frame1, 1u, 0u));
@@ -168,7 +168,7 @@
   EXPECT_TRUE(IsAwaitingPacket(ack_frame1, 11u, 0u));
 
   QuicAckFrame ack_frame2;
-  ack_frame2.deprecated_largest_observed = 100u;
+  ack_frame2.largest_acked = 100u;
   ack_frame2.packets.AddRange(21, 100);
   EXPECT_FALSE(IsAwaitingPacket(ack_frame2, 11u, 20u));
   EXPECT_FALSE(IsAwaitingPacket(ack_frame2, 80u, 20u));
@@ -334,7 +334,7 @@
 
 TEST_F(QuicFramesTest, RemoveSmallestInterval) {
   QuicAckFrame ack_frame1;
-  ack_frame1.deprecated_largest_observed = 100u;
+  ack_frame1.largest_acked = 100u;
   ack_frame1.packets.AddRange(51, 60);
   ack_frame1.packets.AddRange(71, 80);
   ack_frame1.packets.AddRange(91, 100);
diff --git a/net/quic/core/quic_client_promised_info_test.cc b/net/quic/core/quic_client_promised_info_test.cc
index 9d5d758..f8bed9ed 100644
--- a/net/quic/core/quic_client_promised_info_test.cc
+++ b/net/quic/core/quic_client_promised_info_test.cc
@@ -8,6 +8,7 @@
 
 #include "base/macros.h"
 #include "net/quic/core/spdy_utils.h"
+#include "net/quic/core/tls_client_handshaker.h"
 #include "net/quic/platform/api/quic_logging.h"
 #include "net/quic/platform/api/quic_socket_address.h"
 #include "net/quic/platform/api/quic_test.h"
@@ -35,7 +36,8 @@
             QuicServerId("example.com", 443, PRIVACY_MODE_DISABLED),
             &crypto_config_,
             push_promise_index),
-        crypto_config_(crypto_test_utils::ProofVerifierForTesting()),
+        crypto_config_(crypto_test_utils::ProofVerifierForTesting(),
+                       TlsClientHandshaker::CreateSslCtx()),
         authorized_(true) {}
   ~MockQuicSpdyClientSession() override {}
 
diff --git a/net/quic/core/quic_client_push_promise_index_test.cc b/net/quic/core/quic_client_push_promise_index_test.cc
index 9f980f14..3ab3a88 100644
--- a/net/quic/core/quic_client_push_promise_index_test.cc
+++ b/net/quic/core/quic_client_push_promise_index_test.cc
@@ -7,6 +7,7 @@
 #include <string>
 
 #include "net/quic/core/spdy_utils.h"
+#include "net/quic/core/tls_client_handshaker.h"
 #include "net/quic/platform/api/quic_test.h"
 #include "net/quic/test_tools/crypto_test_utils.h"
 #include "net/quic/test_tools/mock_quic_client_promised_info.h"
@@ -34,7 +35,8 @@
             QuicServerId("example.com", 443, PRIVACY_MODE_DISABLED),
             &crypto_config_,
             push_promise_index),
-        crypto_config_(crypto_test_utils::ProofVerifierForTesting()) {}
+        crypto_config_(crypto_test_utils::ProofVerifierForTesting(),
+                       TlsClientHandshaker::CreateSslCtx()) {}
   ~MockQuicSpdyClientSession() override {}
 
   MOCK_METHOD1(CloseStream, void(QuicStreamId stream_id));
diff --git a/net/quic/core/quic_connection.cc b/net/quic/core/quic_connection.cc
index b8a568a..6b604745 100644
--- a/net/quic/core/quic_connection.cc
+++ b/net/quic/core/quic_connection.cc
@@ -861,14 +861,12 @@
     return "Largest observed too low.";
   }
 
-  // TODO(wub): Remove this check along with
-  // FLAGS_quic_reloadable_flag_quic_deprecate_largest_observed.
   if (!incoming_ack.packets.Empty() &&
       incoming_ack.packets.Max() != LargestAcked(incoming_ack)) {
     QUIC_BUG << ENDPOINT
              << "Peer last received packet: " << incoming_ack.packets.Max()
              << " which is not equal to largest observed: "
-             << incoming_ack.deprecated_largest_observed;
+             << incoming_ack.largest_acked;
     return "Last received packet not equal to largest observed.";
   }
 
@@ -1221,10 +1219,7 @@
     return;
   }
   // Flush stream frames of reset stream.
-  if (GetQuicReloadableFlag(quic_remove_on_stream_frame_discarded) &&
-      packet_generator_.HasPendingStreamFramesOfStream(id)) {
-    QUIC_FLAG_COUNT_N(
-        quic_reloadable_flag_quic_remove_on_stream_frame_discarded, 2, 2);
+  if (packet_generator_.HasPendingStreamFramesOfStream(id)) {
     packet_generator_.FlushAllQueuedFrames();
   }
 
@@ -2364,9 +2359,6 @@
   // If caller wants us to include an ack, check the delayed-ack timer to see if
   // there's ack info to be sent.
   if (ShouldSendAck(ack_mode)) {
-    DCHECK(ack_mode == SEND_ACK || connection_->ack_frame_updated() ||
-           connection_->stop_waiting_count_ > 1);
-
     if (!GetQuicReloadableFlag(quic_strict_ack_handling) ||
         !connection_->GetUpdatedAckFrame().ack_frame->packets.Empty()) {
       QUIC_DVLOG(1) << "Bundling ack with outgoing packet.";
@@ -2377,6 +2369,9 @@
 
 bool QuicConnection::ScopedPacketFlusher::ShouldSendAck(
     AckBundling ack_mode) const {
+  // If the ack alarm is set, make sure the ack has been updated.
+  DCHECK(!connection_->ack_alarm_->IsSet() || connection_->ack_frame_updated())
+      << "ack_mode:" << ack_mode;
   switch (ack_mode) {
     case SEND_ACK:
       return true;
@@ -2741,9 +2736,9 @@
   current_peer_migration_type_ = NO_CHANGE;
 }
 
-void QuicConnection::SetStreamNotifier(
-    StreamNotifierInterface* stream_notifier) {
-  sent_packet_manager_.SetStreamNotifier(stream_notifier);
+void QuicConnection::SetSessionNotifier(
+    SessionNotifierInterface* session_notifier) {
+  sent_packet_manager_.SetSessionNotifier(session_notifier);
 }
 
 void QuicConnection::SetDataProducer(
diff --git a/net/quic/core/quic_connection.h b/net/quic/core/quic_connection.h
index 31327e3..38aba68 100644
--- a/net/quic/core/quic_connection.h
+++ b/net/quic/core/quic_connection.h
@@ -679,8 +679,8 @@
   // the MTU discovery alarm.
   void DiscoverMtu();
 
-  // Sets the stream notifer on the SentPacketManager.
-  void SetStreamNotifier(StreamNotifierInterface* stream_notifier);
+  // Sets the session notifier on the SentPacketManager.
+  void SetSessionNotifier(SessionNotifierInterface* session_notifier);
 
   // Set data producer in framer.
   void SetDataProducer(QuicStreamFrameDataProducer* data_producer);
diff --git a/net/quic/core/quic_connection_test.cc b/net/quic/core/quic_connection_test.cc
index f800697..adf70273 100644
--- a/net/quic/core/quic_connection_test.cc
+++ b/net/quic/core/quic_connection_test.cc
@@ -3435,11 +3435,11 @@
                                                  mtu_discovery_packets.end());
       ack.packets.AddRange(1, min_packet);
       ack.packets.AddRange(max_packet + 1, creator_->packet_number() + 1);
-      ack.deprecated_largest_observed = creator_->packet_number();
+      ack.largest_acked = creator_->packet_number();
 
     } else {
       ack.packets.AddRange(1, creator_->packet_number() + 1);
-      ack.deprecated_largest_observed = creator_->packet_number();
+      ack.largest_acked = creator_->packet_number();
     }
 
     ProcessAckPacket(&ack);
diff --git a/net/quic/core/quic_crypto_client_handshaker.cc b/net/quic/core/quic_crypto_client_handshaker.cc
index 997e40df..5c59cc8 100644
--- a/net/quic/core/quic_crypto_client_handshaker.cc
+++ b/net/quic/core/quic_crypto_client_handshaker.cc
@@ -436,7 +436,7 @@
 
   // Receipt of a REJ message means that the server received the CHLO
   // so we can cancel and retransmissions.
-  session()->connection()->NeuterUnencryptedPackets();
+  session()->NeuterUnencryptedData();
 
   stateless_reject_received_ = in->tag() == kSREJ;
   string error_details;
diff --git a/net/quic/core/quic_crypto_client_stream.cc b/net/quic/core/quic_crypto_client_stream.cc
index 1599716c..a8167012 100644
--- a/net/quic/core/quic_crypto_client_stream.cc
+++ b/net/quic/core/quic_crypto_client_stream.cc
@@ -15,8 +15,10 @@
 #include "net/quic/core/quic_packets.h"
 #include "net/quic/core/quic_session.h"
 #include "net/quic/core/quic_utils.h"
+#include "net/quic/core/tls_client_handshaker.h"
 #include "net/quic/platform/api/quic_flags.h"
 #include "net/quic/platform/api/quic_logging.h"
+#include "net/quic/platform/api/quic_ptr_util.h"
 #include "net/quic/platform/api/quic_str_cat.h"
 
 using std::string;
@@ -36,8 +38,21 @@
     ProofHandler* proof_handler)
     : QuicCryptoClientStreamBase(session) {
   DCHECK_EQ(Perspective::IS_CLIENT, session->connection()->perspective());
-  handshaker_.reset(new QuicCryptoClientHandshaker(
-      server_id, this, session, verify_context, crypto_config, proof_handler));
+  switch (session->connection()->version().handshake_protocol) {
+    case PROTOCOL_QUIC_CRYPTO:
+      handshaker_ = QuicMakeUnique<QuicCryptoClientHandshaker>(
+          server_id, this, session, verify_context, crypto_config,
+          proof_handler);
+      break;
+    case PROTOCOL_TLS1_3:
+      handshaker_ = QuicMakeUnique<TlsClientHandshaker>(
+          this, session, server_id, crypto_config->proof_verifier(),
+          crypto_config->ssl_ctx(), verify_context);
+      break;
+    case PROTOCOL_UNSUPPORTED:
+      QUIC_BUG << "Attempting to create QuicCryptoClientStream for unknown "
+                  "handshake protocol";
+  }
 }
 
 QuicCryptoClientStream::~QuicCryptoClientStream() {}
diff --git a/net/quic/core/quic_crypto_client_stream_test.cc b/net/quic/core/quic_crypto_client_stream_test.cc
index 57ea9a1..4995206 100644
--- a/net/quic/core/quic_crypto_client_stream_test.cc
+++ b/net/quic/core/quic_crypto_client_stream_test.cc
@@ -12,6 +12,8 @@
 #include "net/quic/core/quic_packets.h"
 #include "net/quic/core/quic_server_id.h"
 #include "net/quic/core/quic_utils.h"
+#include "net/quic/core/tls_client_handshaker.h"
+#include "net/quic/core/tls_server_handshaker.h"
 #include "net/quic/platform/api/quic_arraysize.h"
 #include "net/quic/platform/api/quic_flags.h"
 #include "net/quic/platform/api/quic_test.h"
@@ -35,14 +37,17 @@
 class QuicCryptoClientStreamTest : public QuicTest {
  public:
   QuicCryptoClientStreamTest()
-      : server_id_(kServerHostname, kServerPort, PRIVACY_MODE_DISABLED),
-        crypto_config_(crypto_test_utils::ProofVerifierForTesting()) {
+      : supported_versions_(AllSupportedVersions()),
+        server_id_(kServerHostname, kServerPort, PRIVACY_MODE_DISABLED),
+        crypto_config_(crypto_test_utils::ProofVerifierForTesting(),
+                       TlsClientHandshaker::CreateSslCtx()) {
     CreateConnection();
   }
 
   void CreateConnection() {
-    connection_ = new PacketSavingConnection(&client_helper_, &alarm_factory_,
-                                             Perspective::IS_CLIENT);
+    connection_ =
+        new PacketSavingConnection(&client_helper_, &alarm_factory_,
+                                   Perspective::IS_CLIENT, supported_versions_);
     // Advance the time, because timers do not like uninitialized times.
     connection_->AdvanceTime(QuicTime::Delta::FromSeconds(1));
 
@@ -51,7 +56,9 @@
   }
 
   void CompleteCryptoHandshake() {
-    EXPECT_CALL(*session_, OnProofValid(testing::_));
+    if (stream()->handshake_protocol() != PROTOCOL_TLS1_3) {
+      EXPECT_CALL(*session_, OnProofValid(testing::_));
+    }
     EXPECT_CALL(*session_, OnProofVerifyDetailsAvailable(testing::_))
         .Times(testing::AnyNumber());
     stream()->CryptoConnect();
@@ -69,6 +76,7 @@
   MockQuicConnectionHelper client_helper_;
   MockAlarmFactory alarm_factory_;
   PacketSavingConnection* connection_;
+  ParsedQuicVersionVector supported_versions_;
   std::unique_ptr<TestQuicSpdyClientSession> session_;
   QuicServerId server_id_;
   CryptoHandshakeMessage message_;
@@ -87,6 +95,21 @@
   EXPECT_TRUE(stream()->handshake_confirmed());
 }
 
+TEST_F(QuicCryptoClientStreamTest, ConnectedAfterTlsHandshake) {
+  FLAGS_quic_supports_tls_handshake = true;
+  supported_versions_.clear();
+  for (QuicTransportVersion transport_version :
+       AllSupportedTransportVersions()) {
+    supported_versions_.push_back(
+        ParsedQuicVersion(PROTOCOL_TLS1_3, transport_version));
+  }
+  CreateConnection();
+  CompleteCryptoHandshake();
+  EXPECT_EQ(PROTOCOL_TLS1_3, stream()->handshake_protocol());
+  EXPECT_TRUE(stream()->encryption_established());
+  EXPECT_TRUE(stream()->handshake_confirmed());
+}
+
 TEST_F(QuicCryptoClientStreamTest, MessageAfterHandshake) {
   CompleteCryptoHandshake();
 
@@ -237,7 +260,8 @@
   // Build a server config update message with certificates
   QuicCryptoServerConfig crypto_config(
       QuicCryptoServerConfig::TESTING, QuicRandom::GetInstance(),
-      crypto_test_utils::ProofSourceForTesting());
+      crypto_test_utils::ProofSourceForTesting(),
+      TlsServerHandshaker::CreateSslCtx());
   crypto_test_utils::FakeServerOptions options;
   crypto_test_utils::SetupCryptoServerConfigForTest(
       connection_->clock(), QuicRandom::GetInstance(), &crypto_config, options);
@@ -356,10 +380,12 @@
 class QuicCryptoClientStreamStatelessTest : public QuicTest {
  public:
   QuicCryptoClientStreamStatelessTest()
-      : client_crypto_config_(crypto_test_utils::ProofVerifierForTesting()),
+      : client_crypto_config_(crypto_test_utils::ProofVerifierForTesting(),
+                              TlsClientHandshaker::CreateSslCtx()),
         server_crypto_config_(QuicCryptoServerConfig::TESTING,
                               QuicRandom::GetInstance(),
-                              crypto_test_utils::ProofSourceForTesting()),
+                              crypto_test_utils::ProofSourceForTesting(),
+                              TlsServerHandshaker::CreateSslCtx()),
         server_compressed_certs_cache_(
             QuicCompressedCertsCache::kQuicCompressedCertsCacheSize),
         server_id_(kServerHostname, kServerPort, PRIVACY_MODE_DISABLED) {
diff --git a/net/quic/core/quic_crypto_handshaker.cc b/net/quic/core/quic_crypto_handshaker.cc
index 39a9a4e9c..7455afd6 100644
--- a/net/quic/core/quic_crypto_handshaker.cc
+++ b/net/quic/core/quic_crypto_handshaker.cc
@@ -25,7 +25,7 @@
     const CryptoHandshakeMessage& message) {
   QUIC_DVLOG(1) << ENDPOINT << "Sending "
                 << message.DebugString(session()->perspective());
-  session()->connection()->NeuterUnencryptedPackets();
+  session()->NeuterUnencryptedData();
   session()->OnCryptoHandshakeMessageSent(message);
   const QuicData& data = message.GetSerialized(session()->perspective());
   stream_->WriteOrBufferData(QuicStringPiece(data.data(), data.length()), false,
diff --git a/net/quic/core/quic_crypto_server_stream.cc b/net/quic/core/quic_crypto_server_stream.cc
index d9d2c83c..65b4300 100644
--- a/net/quic/core/quic_crypto_server_stream.cc
+++ b/net/quic/core/quic_crypto_server_stream.cc
@@ -15,8 +15,10 @@
 #include "net/quic/core/quic_crypto_server_handshaker.h"
 #include "net/quic/core/quic_packets.h"
 #include "net/quic/core/quic_session.h"
+#include "net/quic/core/tls_server_handshaker.h"
 #include "net/quic/platform/api/quic_flags.h"
 #include "net/quic/platform/api/quic_logging.h"
+#include "net/quic/platform/api/quic_ptr_util.h"
 #include "net/quic/platform/api/quic_string_piece.h"
 
 using std::string;
@@ -52,9 +54,21 @@
     Helper* helper)
     : QuicCryptoServerStreamBase(session) {
   DCHECK_EQ(Perspective::IS_SERVER, session->connection()->perspective());
-  handshaker_.reset(new QuicCryptoServerHandshaker(
-      crypto_config, this, compressed_certs_cache,
-      use_stateless_rejects_if_peer_supported, session, helper));
+  switch (session->connection()->version().handshake_protocol) {
+    case PROTOCOL_QUIC_CRYPTO:
+      handshaker_ = QuicMakeUnique<QuicCryptoServerHandshaker>(
+          crypto_config, this, compressed_certs_cache,
+          use_stateless_rejects_if_peer_supported, session, helper);
+      break;
+    case PROTOCOL_TLS1_3:
+      handshaker_ = QuicMakeUnique<TlsServerHandshaker>(
+          this, session, crypto_config->ssl_ctx(),
+          crypto_config->proof_source());
+      break;
+    case PROTOCOL_UNSUPPORTED:
+      QUIC_BUG << "Attempting to create QuicCryptoServerStream for unknown "
+                  "handshake protocol";
+  }
 }
 
 QuicCryptoServerStream::~QuicCryptoServerStream() {}
diff --git a/net/quic/core/quic_crypto_server_stream_test.cc b/net/quic/core/quic_crypto_server_stream_test.cc
index 8f55bb3..69cbea31 100644
--- a/net/quic/core/quic_crypto_server_stream_test.cc
+++ b/net/quic/core/quic_crypto_server_stream_test.cc
@@ -20,6 +20,8 @@
 #include "net/quic/core/quic_crypto_client_stream.h"
 #include "net/quic/core/quic_packets.h"
 #include "net/quic/core/quic_session.h"
+#include "net/quic/core/tls_client_handshaker.h"
+#include "net/quic/core/tls_server_handshaker.h"
 #include "net/quic/platform/api/quic_flags.h"
 #include "net/quic/platform/api/quic_logging.h"
 #include "net/quic/platform/api/quic_ptr_util.h"
@@ -66,11 +68,13 @@
   explicit QuicCryptoServerStreamTest(std::unique_ptr<ProofSource> proof_source)
       : server_crypto_config_(QuicCryptoServerConfig::TESTING,
                               QuicRandom::GetInstance(),
-                              std::move(proof_source)),
+                              std::move(proof_source),
+                              TlsServerHandshaker::CreateSslCtx()),
         server_compressed_certs_cache_(
             QuicCompressedCertsCache::kQuicCompressedCertsCacheSize),
         server_id_(kServerHostname, kServerPort, PRIVACY_MODE_DISABLED),
-        client_crypto_config_(crypto_test_utils::ProofVerifierForTesting()) {
+        client_crypto_config_(crypto_test_utils::ProofVerifierForTesting(),
+                              TlsClientHandshaker::CreateSslCtx()) {
     SetQuicReloadableFlag(enable_quic_stateless_reject_support, false);
   }
 
@@ -208,6 +212,22 @@
   EXPECT_TRUE(server_stream()->handshake_confirmed());
 }
 
+TEST_P(QuicCryptoServerStreamTest, ConnectedAfterTlsHandshake) {
+  FLAGS_quic_supports_tls_handshake = true;
+  client_options_.only_tls_versions = true;
+  supported_versions_.clear();
+  for (QuicTransportVersion transport_version :
+       AllSupportedTransportVersions()) {
+    supported_versions_.push_back(
+        ParsedQuicVersion(PROTOCOL_TLS1_3, transport_version));
+  }
+  Initialize();
+  CompleteCryptoHandshake();
+  EXPECT_EQ(PROTOCOL_TLS1_3, server_stream()->handshake_protocol());
+  EXPECT_TRUE(server_stream()->encryption_established());
+  EXPECT_TRUE(server_stream()->handshake_confirmed());
+}
+
 TEST_P(QuicCryptoServerStreamTest, ForwardSecureAfterCHLO) {
   Initialize();
   InitializeFakeClient(/* supports_stateless_rejects= */ false);
diff --git a/net/quic/core/quic_error_codes.cc b/net/quic/core/quic_error_codes.cc
index 265dfc2..3bdd84c 100644
--- a/net/quic/core/quic_error_codes.cc
+++ b/net/quic/core/quic_error_codes.cc
@@ -128,7 +128,7 @@
     RETURN_STRING_LITERAL(QUIC_CRYPTO_CHLO_TOO_LARGE);
     RETURN_STRING_LITERAL(QUIC_MULTIPATH_PATH_DOES_NOT_EXIST);
     RETURN_STRING_LITERAL(QUIC_MULTIPATH_PATH_NOT_ACTIVE);
-    RETURN_STRING_LITERAL(QUIC_TOO_MANY_FRAME_GAPS);
+    RETURN_STRING_LITERAL(QUIC_TOO_MANY_STREAM_DATA_INTERVALS);
     RETURN_STRING_LITERAL(QUIC_STREAM_SEQUENCER_INVALID_STATE);
     RETURN_STRING_LITERAL(QUIC_TOO_MANY_SESSIONS_ON_SERVER);
     RETURN_STRING_LITERAL(QUIC_STREAM_LENGTH_OVERFLOW);
diff --git a/net/quic/core/quic_error_codes.h b/net/quic/core/quic_error_codes.h
index a8181d2..f5d94ee 100644
--- a/net/quic/core/quic_error_codes.h
+++ b/net/quic/core/quic_error_codes.h
@@ -263,8 +263,8 @@
   QUIC_CONNECTION_MIGRATION_NON_MIGRATABLE_STREAM = 84,
 
   // Stream frames arrived too discontiguously so that stream sequencer buffer
-  // maintains too many gaps.
-  QUIC_TOO_MANY_FRAME_GAPS = 93,
+  // maintains too many intervals.
+  QUIC_TOO_MANY_STREAM_DATA_INTERVALS = 93,
 
   // Sequencer buffer get into weird state where continuing read/write will lead
   // to crash.
diff --git a/net/quic/core/quic_flags_list.h b/net/quic/core/quic_flags_list.h
index 71a5d90..c115dd4 100644
--- a/net/quic/core/quic_flags_list.h
+++ b/net/quic/core/quic_flags_list.h
@@ -114,29 +114,6 @@
           FLAGS_quic_reloadable_flag_quic_allow_address_change_for_udp_proxy,
           true)
 
-// Deprecate QuicAckFrame.largest_observed since it is redundant.
-QUIC_FLAG(bool,
-          FLAGS_quic_reloadable_flag_quic_deprecate_largest_observed,
-          true)
-
-// When true, allows connection options to be sent to completely disable packet
-// conservation in QUIC BBR STARTUP or make it more aggressive.
-QUIC_FLAG(bool,
-          FLAGS_quic_reloadable_flag_quic_bbr_conservation_in_startup,
-          true)
-
-// Allows increasing the length of time ack aggregation is windowed for to 20
-// and 40 RTTs.
-QUIC_FLAG(bool,
-          FLAGS_quic_reloadable_flag_quic_bbr_ack_aggregation_window,
-          true)
-
-// If true, OnStreamFrameDiscarded is not called on stream cancellation, and
-// canceled stream is immediately closed.
-QUIC_FLAG(bool,
-          FLAGS_quic_reloadable_flag_quic_remove_on_stream_frame_discarded,
-          true)
-
 // Explicitly send a connection close if the TLP count is greater than 0 when
 // idle timeout occurs.
 QUIC_FLAG(bool, FLAGS_quic_reloadable_flag_quic_explicit_close_after_tlp, true)
@@ -163,7 +140,7 @@
           true)
 
 // If true, use deframer from net/quic/http instead of net/http2.
-QUIC_FLAG(bool, FLAGS_quic_reloadable_flag_quic_enable_hq_deframer, false)
+QUIC_FLAG(bool, FLAGS_quic_reloadable_flag_quic_enable_hq_deframer, true)
 
 // If true, then 1) at sender, avoid sending empty acks, 2) at receiver, close
 // connection when a ack frame\'s first block length is 0, unless the ack is
@@ -178,3 +155,12 @@
 
 // If true, limit quic stream length to be below 2^62.
 QUIC_FLAG(bool, FLAGS_quic_reloadable_flag_quic_stream_too_long, false)
+
+// When true, enables the 1TLP connection option to configure QUIC to send one
+// TLP instead of 2.
+QUIC_FLAG(bool, FLAGS_quic_reloadable_flag_quic_one_tlp, false)
+
+// If true, stream sequencer buffer allows receiving overlapping stream data.
+QUIC_FLAG(bool,
+          FLAGS_quic_reloadable_flag_quic_allow_receiving_overlapping_data,
+          false)
diff --git a/net/quic/core/quic_framer.cc b/net/quic/core/quic_framer.cc
index f70a0e2..624f1f6 100644
--- a/net/quic/core/quic_framer.cc
+++ b/net/quic/core/quic_framer.cc
@@ -1410,7 +1410,7 @@
   }
 
   QuicPacketNumber first_received = largest_acked + 1 - first_block_length;
-  ack_frame->deprecated_largest_observed = largest_acked;
+  ack_frame->largest_acked = largest_acked;
   ack_frame->packets.AddRange(first_received, largest_acked + 1);
 
   if (num_ack_blocks > 0) {
diff --git a/net/quic/core/quic_framer_test.cc b/net/quic/core/quic_framer_test.cc
index 20e71cb..055af341 100644
--- a/net/quic/core/quic_framer_test.cc
+++ b/net/quic/core/quic_framer_test.cc
@@ -4342,7 +4342,7 @@
 
   // Use kSmallLargestObservedto make this test finished in a short time.
   QuicAckFrame ack_frame;
-  ack_frame.deprecated_largest_observed = kSmallLargestObserved;
+  ack_frame.largest_acked = kSmallLargestObserved;
   ack_frame.ack_delay_time = QuicTime::Delta::Zero();
   // 300 ack blocks.
   for (size_t i = 2; i < 2 * 300; i += 2) {
diff --git a/net/quic/core/quic_received_packet_manager.cc b/net/quic/core/quic_received_packet_manager.cc
index b2a6cc1..2f01d30 100644
--- a/net/quic/core/quic_received_packet_manager.cc
+++ b/net/quic/core/quic_received_packet_manager.cc
@@ -55,7 +55,7 @@
         std::max(stats_->max_time_reordering_us, reordering_time_us);
   }
   if (packet_number > LargestAcked(ack_frame_)) {
-    ack_frame_.deprecated_largest_observed = packet_number;
+    ack_frame_.largest_acked = packet_number;
     time_largest_observed_ = receipt_time;
   }
   ack_frame_.packets.Add(packet_number);
diff --git a/net/quic/core/quic_sent_packet_manager.cc b/net/quic/core/quic_sent_packet_manager.cc
index 3c2fbf0..26411993 100644
--- a/net/quic/core/quic_sent_packet_manager.cc
+++ b/net/quic/core/quic_sent_packet_manager.cc
@@ -131,6 +131,11 @@
   if (config.HasClientSentConnectionOption(kNTLP, perspective_)) {
     max_tail_loss_probes_ = 0;
   }
+  if (GetQuicReloadableFlag(quic_one_tlp) &&
+      config.HasClientSentConnectionOption(k1TLP, perspective_)) {
+    QUIC_FLAG_COUNT_N(quic_reloadable_flag_quic_one_tlp, 1, 2);
+    max_tail_loss_probes_ = 1;
+  }
   if (config.HasClientSentConnectionOption(kTLPR, perspective_)) {
     enable_half_rtt_tail_loss_probe_ = true;
   }
@@ -450,7 +455,7 @@
   pending_retransmissions_.erase(newest_transmission);
 
   if (newest_transmission == packet_number) {
-    unacked_packets_.NotifyStreamFramesAcked(*info, ack_delay_time);
+    unacked_packets_.NotifyFramesAcked(*info, ack_delay_time);
   } else {
     RecordSpuriousRetransmissions(*info, packet_number);
     // Remove the most recent packet from flight if it's a crypto handshake
@@ -461,8 +466,8 @@
     // only handle nullptr encrypted packets in a special way.
     const QuicTransmissionInfo& newest_transmission_info =
         unacked_packets_.GetTransmissionInfo(newest_transmission);
-    unacked_packets_.NotifyStreamFramesAcked(newest_transmission_info,
-                                             ack_delay_time);
+    unacked_packets_.NotifyFramesAcked(newest_transmission_info,
+                                       ack_delay_time);
     if (HasCryptoHandshake(newest_transmission_info)) {
       unacked_packets_.RemoveFromInFlight(newest_transmission);
     }
@@ -949,9 +954,9 @@
   return send_algorithm_.get();
 }
 
-void QuicSentPacketManager::SetStreamNotifier(
-    StreamNotifierInterface* stream_notifier) {
-  unacked_packets_.SetStreamNotifier(stream_notifier);
+void QuicSentPacketManager::SetSessionNotifier(
+    SessionNotifierInterface* session_notifier) {
+  unacked_packets_.SetSessionNotifier(session_notifier);
 }
 
 }  // namespace net
diff --git a/net/quic/core/quic_sent_packet_manager.h b/net/quic/core/quic_sent_packet_manager.h
index 6739823..b0c974c 100644
--- a/net/quic/core/quic_sent_packet_manager.h
+++ b/net/quic/core/quic_sent_packet_manager.h
@@ -229,7 +229,7 @@
 
   const SendAlgorithmInterface* GetSendAlgorithm() const;
 
-  void SetStreamNotifier(StreamNotifierInterface* stream_notifier);
+  void SetSessionNotifier(SessionNotifierInterface* session_notifier);
 
   QuicPacketNumber largest_packet_peer_knows_is_acked() const {
     return largest_packet_peer_knows_is_acked_;
diff --git a/net/quic/core/quic_sent_packet_manager_test.cc b/net/quic/core/quic_sent_packet_manager_test.cc
index 9341f38..8b70717 100644
--- a/net/quic/core/quic_sent_packet_manager_test.cc
+++ b/net/quic/core/quic_sent_packet_manager_test.cc
@@ -1471,6 +1471,33 @@
   EXPECT_EQ(0u, QuicSentPacketManagerPeer::GetMaxTailLossProbes(&manager_));
 }
 
+TEST_F(QuicSentPacketManagerTest, Negotiate1TLPFromOptionsAtServer) {
+  SetQuicReloadableFlag(quic_one_tlp, true);
+  QuicConfig config;
+  QuicTagVector options;
+
+  options.push_back(k1TLP);
+  QuicConfigPeer::SetReceivedConnectionOptions(&config, options);
+  EXPECT_CALL(*network_change_visitor_, OnCongestionChange());
+  EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
+  manager_.SetFromConfig(config);
+  EXPECT_EQ(1u, QuicSentPacketManagerPeer::GetMaxTailLossProbes(&manager_));
+}
+
+TEST_F(QuicSentPacketManagerTest, Negotiate1TLPFromOptionsAtClient) {
+  SetQuicReloadableFlag(quic_one_tlp, true);
+  QuicConfig client_config;
+  QuicTagVector options;
+
+  options.push_back(k1TLP);
+  QuicSentPacketManagerPeer::SetPerspective(&manager_, Perspective::IS_CLIENT);
+  client_config.SetConnectionOptionsToSend(options);
+  EXPECT_CALL(*network_change_visitor_, OnCongestionChange());
+  EXPECT_CALL(*send_algorithm_, SetFromConfig(_, _));
+  manager_.SetFromConfig(client_config);
+  EXPECT_EQ(1u, QuicSentPacketManagerPeer::GetMaxTailLossProbes(&manager_));
+}
+
 TEST_F(QuicSentPacketManagerTest, NegotiateTLPRttFromOptionsAtServer) {
   QuicConfig config;
   QuicTagVector options;
diff --git a/net/quic/core/quic_server_session_base_test.cc b/net/quic/core/quic_server_session_base_test.cc
index f0d93160..e91fa77 100644
--- a/net/quic/core/quic_server_session_base_test.cc
+++ b/net/quic/core/quic_server_session_base_test.cc
@@ -14,6 +14,7 @@
 #include "net/quic/core/quic_connection.h"
 #include "net/quic/core/quic_crypto_server_stream.h"
 #include "net/quic/core/quic_utils.h"
+#include "net/quic/core/tls_server_handshaker.h"
 #include "net/quic/platform/api/quic_flags.h"
 #include "net/quic/platform/api/quic_ptr_util.h"
 #include "net/quic/platform/api/quic_socket_address.h"
@@ -124,7 +125,8 @@
   explicit QuicServerSessionBaseTest(std::unique_ptr<ProofSource> proof_source)
       : crypto_config_(QuicCryptoServerConfig::TESTING,
                        QuicRandom::GetInstance(),
-                       std::move(proof_source)),
+                       std::move(proof_source),
+                       TlsServerHandshaker::CreateSslCtx()),
         compressed_certs_cache_(
             QuicCompressedCertsCache::kQuicCompressedCertsCacheSize) {
     config_.SetMaxStreamsPerConnection(kMaxStreamsForTest, kMaxStreamsForTest);
diff --git a/net/quic/core/quic_session.cc b/net/quic/core/quic_session.cc
index 1b74b67..b53709c0 100644
--- a/net/quic/core/quic_session.cc
+++ b/net/quic/core/quic_session.cc
@@ -64,7 +64,7 @@
 
 void QuicSession::Initialize() {
   connection_->set_visitor(this);
-  connection_->SetStreamNotifier(this);
+  connection_->SetSessionNotifier(this);
   connection_->SetDataProducer(this);
   connection_->SetFromConfig(config_);
 
@@ -980,13 +980,17 @@
   return nullptr;
 }
 
-void QuicSession::OnStreamFrameAcked(const QuicStreamFrame& frame,
-                                     QuicTime::Delta ack_delay_time) {
-  QuicStream* stream = GetStream(frame.stream_id);
+void QuicSession::OnFrameAcked(const QuicFrame& frame,
+                               QuicTime::Delta ack_delay_time) {
+  if (frame.type != STREAM_FRAME) {
+    return;
+  }
+  QuicStream* stream = GetStream(frame.stream_frame->stream_id);
   // Stream can already be reset when sent frame gets acked.
   if (stream != nullptr) {
-    stream->OnStreamFrameAcked(frame.offset, frame.data_length, frame.fin,
-                               ack_delay_time);
+    stream->OnStreamFrameAcked(frame.stream_frame->offset,
+                               frame.stream_frame->data_length,
+                               frame.stream_frame->fin, ack_delay_time);
     if (!stream->HasPendingRetransmission()) {
       streams_with_pending_retransmission_.erase(stream->id());
     }
@@ -1007,32 +1011,22 @@
                                      frame.fin);
 }
 
-void QuicSession::OnStreamFrameDiscarded(const QuicStreamFrame& frame) {
-  QuicStream* stream = GetStream(frame.stream_id);
-  if (stream == nullptr) {
-    QUIC_BUG << "Stream: " << frame.stream_id << " is closed when " << frame
-             << " is discarded.";
-    connection()->CloseConnection(
-        QUIC_INTERNAL_ERROR, "Attempt to discard frame of a closed stream",
-        ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
+void QuicSession::OnFrameLost(const QuicFrame& frame) {
+  if (frame.type != STREAM_FRAME) {
     return;
   }
-  stream->OnStreamFrameDiscarded(frame.offset, frame.data_length, frame.fin);
-  if (!stream->HasPendingRetransmission()) {
-    streams_with_pending_retransmission_.erase(stream->id());
-  }
-}
-
-void QuicSession::OnStreamFrameLost(const QuicStreamFrame& frame) {
-  QuicStream* stream = GetStream(frame.stream_id);
+  QuicStream* stream = GetStream(frame.stream_frame->stream_id);
   if (stream == nullptr) {
     return;
   }
-  stream->OnStreamFrameLost(frame.offset, frame.data_length, frame.fin);
+  stream->OnStreamFrameLost(frame.stream_frame->offset,
+                            frame.stream_frame->data_length,
+                            frame.stream_frame->fin);
   if (stream->HasPendingRetransmission() &&
-      !QuicContainsKey(streams_with_pending_retransmission_, frame.stream_id)) {
+      !QuicContainsKey(streams_with_pending_retransmission_,
+                       frame.stream_frame->stream_id)) {
     streams_with_pending_retransmission_.insert(
-        std::make_pair(frame.stream_id, true));
+        std::make_pair(frame.stream_frame->stream_id, true));
   }
 }
 
@@ -1094,4 +1088,8 @@
   return streams_with_pending_retransmission_.empty();
 }
 
+void QuicSession::NeuterUnencryptedData() {
+  connection_->NeuterUnencryptedPackets();
+}
+
 }  // namespace net
diff --git a/net/quic/core/quic_session.h b/net/quic/core/quic_session.h
index 456f315b..35981f0 100644
--- a/net/quic/core/quic_session.h
+++ b/net/quic/core/quic_session.h
@@ -23,7 +23,7 @@
 #include "net/quic/core/quic_stream.h"
 #include "net/quic/core/quic_stream_frame_data_producer.h"
 #include "net/quic/core/quic_write_blocked_list.h"
-#include "net/quic/core/stream_notifier_interface.h"
+#include "net/quic/core/session_notifier_interface.h"
 #include "net/quic/platform/api/quic_containers.h"
 #include "net/quic/platform/api/quic_export.h"
 #include "net/quic/platform/api/quic_socket_address.h"
@@ -39,7 +39,7 @@
 }  // namespace test
 
 class QUIC_EXPORT_PRIVATE QuicSession : public QuicConnectionVisitorInterface,
-                                        public StreamNotifierInterface,
+                                        public SessionNotifierInterface,
                                         public QuicStreamFrameDataProducer {
  public:
   // An interface from the session to the entity owning the session.
@@ -122,14 +122,11 @@
                        QuicByteCount data_length,
                        QuicDataWriter* writer) override;
 
-  // StreamNotifierInterface methods:
-  void OnStreamFrameAcked(const QuicStreamFrame& frame,
-                          QuicTime::Delta ack_delay_time) override;
+  // SessionNotifierInterface methods:
+  void OnFrameAcked(const QuicFrame& frame,
+                    QuicTime::Delta ack_delay_time) override;
   void OnStreamFrameRetransmitted(const QuicStreamFrame& frame) override;
-  void OnStreamFrameDiscarded(const QuicStreamFrame& frame) override;
-
-  // TODO(fayang): Add this function to StreamNotifierInterface.
-  void OnStreamFrameLost(const QuicStreamFrame& frame);
+  void OnFrameLost(const QuicFrame& frame) override;
 
   // Called on every incoming packet. Passes |packet| through to |connection_|.
   virtual void ProcessUdpPacket(const QuicSocketAddress& self_address,
@@ -236,6 +233,9 @@
   // a stream is reset because of an error).
   void OnStreamDoneWaitingForAcks(QuicStreamId id);
 
+  // Called to cancel retransmission of unencypted crypto stream data.
+  void NeuterUnencryptedData();
+
   // Returns true if the session has data to be sent, either queued in the
   // connection, or in a write-blocked stream.
   bool HasDataToWrite() const;
diff --git a/net/quic/core/quic_session_test.cc b/net/quic/core/quic_session_test.cc
index adf17276..734e2a827 100644
--- a/net/quic/core/quic_session_test.cc
+++ b/net/quic/core/quic_session_test.cc
@@ -1447,9 +1447,9 @@
   EXPECT_CALL(*crypto_stream, HasPendingRetransmission())
       .WillOnce(Return(true));
   EXPECT_CALL(*stream2, HasPendingRetransmission()).WillOnce(Return(true));
-  session_.OnStreamFrameLost(frame3);
-  session_.OnStreamFrameLost(frame1);
-  session_.OnStreamFrameLost(frame2);
+  session_.OnFrameLost(QuicFrame(&frame3));
+  session_.OnFrameLost(QuicFrame(&frame1));
+  session_.OnFrameLost(QuicFrame(&frame2));
   EXPECT_TRUE(session_.WillingAndAbleToWrite());
 
   // Mark streams 2 and 4 write blocked.
@@ -1490,9 +1490,6 @@
 }
 
 TEST_P(QuicSessionTestServer, DonotRetransmitDataOfClosedStreams) {
-  if (!FLAGS_quic_reloadable_flag_quic_remove_on_stream_frame_discarded) {
-    return;
-  }
   InSequence s;
 
   TestStream* stream2 = session_.CreateOutgoingDynamicStream();
@@ -1506,9 +1503,9 @@
   EXPECT_CALL(*stream6, HasPendingRetransmission()).WillOnce(Return(true));
   EXPECT_CALL(*stream4, HasPendingRetransmission()).WillOnce(Return(true));
   EXPECT_CALL(*stream2, HasPendingRetransmission()).WillOnce(Return(true));
-  session_.OnStreamFrameLost(frame3);
-  session_.OnStreamFrameLost(frame2);
-  session_.OnStreamFrameLost(frame1);
+  session_.OnFrameLost(QuicFrame(&frame3));
+  session_.OnFrameLost(QuicFrame(&frame2));
+  session_.OnFrameLost(QuicFrame(&frame1));
 
   session_.MarkConnectionLevelWriteBlocked(stream2->id());
   session_.MarkConnectionLevelWriteBlocked(stream4->id());
diff --git a/net/quic/core/quic_spdy_stream_test.cc b/net/quic/core/quic_spdy_stream_test.cc
index 5d8ade01..e89ee63 100644
--- a/net/quic/core/quic_spdy_stream_test.cc
+++ b/net/quic/core/quic_spdy_stream_test.cc
@@ -992,13 +992,13 @@
   session_->OnStreamFrameRetransmitted(frame1);
 
   EXPECT_CALL(*ack_listener1, OnPacketAcked(7, _));
-  session_->OnStreamFrameAcked(frame1, QuicTime::Delta::Zero());
+  session_->OnFrameAcked(QuicFrame(&frame1), QuicTime::Delta::Zero());
   EXPECT_CALL(*ack_listener1, OnPacketAcked(5, _));
-  session_->OnStreamFrameAcked(frame2, QuicTime::Delta::Zero());
+  session_->OnFrameAcked(QuicFrame(&frame2), QuicTime::Delta::Zero());
   EXPECT_CALL(*ack_listener2, OnPacketAcked(7, _));
-  session_->OnStreamFrameAcked(frame3, QuicTime::Delta::Zero());
+  session_->OnFrameAcked(QuicFrame(&frame3), QuicTime::Delta::Zero());
   EXPECT_CALL(*ack_listener2, OnPacketAcked(5, _));
-  session_->OnStreamFrameAcked(frame4, QuicTime::Delta::Zero());
+  session_->OnFrameAcked(QuicFrame(&frame4), QuicTime::Delta::Zero());
 }
 
 TEST_P(QuicSpdyStreamTest, StreamBecomesZombieWithWriteThatCloses) {
diff --git a/net/quic/core/quic_stream.cc b/net/quic/core/quic_stream.cc
index 086ea5b..82a88d88 100644
--- a/net/quic/core/quic_stream.cc
+++ b/net/quic/core/quic_stream.cc
@@ -73,9 +73,8 @@
       send_buffer_(
           session->connection()->helper()->GetStreamSendBufferAllocator(),
           session->allow_multiple_acks_for_data()),
-      buffered_data_threshold_(GetQuicFlag(FLAGS_quic_buffered_data_threshold)),
-      remove_on_stream_frame_discarded_(
-          GetQuicReloadableFlag(quic_remove_on_stream_frame_discarded)) {
+      buffered_data_threshold_(
+          GetQuicFlag(FLAGS_quic_buffered_data_threshold)) {
   SetFromConfig();
 }
 
@@ -466,6 +465,10 @@
   return session_->connection()->transport_version();
 }
 
+HandshakeProtocol QuicStream::handshake_protocol() const {
+  return session_->connection()->version().handshake_protocol;
+}
+
 void QuicStream::StopReading() {
   QUIC_DLOG(INFO) << ENDPOINT << "Stop reading from stream " << id();
   sequencer_.StopReading();
@@ -605,39 +608,6 @@
   }
 }
 
-void QuicStream::OnStreamFrameDiscarded(QuicStreamOffset offset,
-                                        QuicByteCount data_length,
-                                        bool fin_discarded) {
-  if (remove_on_stream_frame_discarded_) {
-    // TODO(fayang): Remove OnStreamFrameDiscarded from StreamNotifierInterface
-    // when deprecating
-    // quic_reloadable_flag_quic_remove_on_stream_frame_discarded.
-    QUIC_FLAG_COUNT_N(
-        quic_reloadable_flag_quic_remove_on_stream_frame_discarded, 1, 2);
-    return;
-  }
-
-  QuicByteCount newly_acked_length = 0;
-  if (!send_buffer_.OnStreamDataAcked(offset, data_length,
-                                      &newly_acked_length)) {
-    CloseConnectionWithDetails(QUIC_INTERNAL_ERROR,
-                               "Trying to discard unsent data.");
-    return;
-  }
-  if (!fin_sent_ && fin_discarded) {
-    CloseConnectionWithDetails(QUIC_INTERNAL_ERROR,
-                               "Trying to discard unsent fin.");
-    return;
-  }
-  if (fin_discarded) {
-    fin_outstanding_ = false;
-    fin_lost_ = false;
-  }
-  if (!IsWaitingForAcks()) {
-    session_->OnStreamDoneWaitingForAcks(id_);
-  }
-}
-
 void QuicStream::OnStreamFrameLost(QuicStreamOffset offset,
                                    QuicByteCount data_length,
                                    bool fin_lost) {
@@ -650,8 +620,7 @@
 }
 
 bool QuicStream::IsWaitingForAcks() const {
-  return (!remove_on_stream_frame_discarded_ || !rst_sent_ ||
-          stream_error_ == QUIC_STREAM_NO_ERROR) &&
+  return (!rst_sent_ || stream_error_ == QUIC_STREAM_NO_ERROR) &&
          (send_buffer_.stream_bytes_outstanding() || fin_outstanding_);
 }
 
diff --git a/net/quic/core/quic_stream.h b/net/quic/core/quic_stream.h
index dc3bfd7..52bd18f7 100644
--- a/net/quic/core/quic_stream.h
+++ b/net/quic/core/quic_stream.h
@@ -29,7 +29,7 @@
 #include "net/quic/core/quic_stream_send_buffer.h"
 #include "net/quic/core/quic_stream_sequencer.h"
 #include "net/quic/core/quic_types.h"
-#include "net/quic/core/stream_notifier_interface.h"
+#include "net/quic/core/session_notifier_interface.h"
 #include "net/quic/platform/api/quic_export.h"
 #include "net/quic/platform/api/quic_mem_slice_span.h"
 #include "net/quic/platform/api/quic_reference_counted.h"
@@ -168,6 +168,10 @@
   // Returns the version of QUIC being used for this stream.
   QuicTransportVersion transport_version() const;
 
+  // Returns the crypto handshake protocol that was used on this stream's
+  // connection.
+  HandshakeProtocol handshake_protocol() const;
+
   bool fin_received() const { return fin_received_; }
 
   // Sets the sequencer to consume all incoming data itself and not call
@@ -211,13 +215,6 @@
                                           QuicByteCount data_length,
                                           bool fin_retransmitted);
 
-  // Called when data [offset, offset + data_length) gets discarded because
-  // stream is cancelled. |fin_discarded| indicates whether the fin is
-  // discarded.
-  void OnStreamFrameDiscarded(QuicStreamOffset offset,
-                              QuicByteCount data_length,
-                              bool fin_discarded);
-
   // Called when data [offset, offset + data_length) is considered as lost.
   // |fin_lost| inidacates whether the fin is considered as lost.
   void OnStreamFrameLost(QuicStreamOffset offset,
@@ -403,10 +400,6 @@
   // Latched value of FLAGS_quic_buffered_data_threshold.
   const QuicByteCount buffered_data_threshold_;
 
-  // Latched value of
-  // FLAGS_quic_reloadable_flag_quic_remove_on_stream_frame_discarded.
-  const bool remove_on_stream_frame_discarded_;
-
   DISALLOW_COPY_AND_ASSIGN(QuicStream);
 };
 
diff --git a/net/quic/core/quic_stream_sequencer_buffer.cc b/net/quic/core/quic_stream_sequencer_buffer.cc
index 45f6fe52..04984afbf 100644
--- a/net/quic/core/quic_stream_sequencer_buffer.cc
+++ b/net/quic/core/quic_stream_sequencer_buffer.cc
@@ -32,6 +32,8 @@
 // Upper limit of how many gaps allowed in buffer, which ensures a reasonable
 // number of iterations needed to find the right gap to fill when a frame
 // arrives.
+// TODO(fayang): Rename kMaxNumGapsAllowed to kMaxNumDataIntervalsAllowed when
+// deprecating quic_reloadable_flag_quic_allow_receiving_overlapping_data.
 const size_t kMaxNumGapsAllowed = 2 * kMaxPacketGap;
 
 }  // namespace
@@ -52,7 +54,12 @@
       blocks_count_(CalculateBlockCount(max_capacity_bytes)),
       total_bytes_read_(0),
       blocks_(nullptr),
-      destruction_indicator_(123456) {
+      destruction_indicator_(123456),
+      allow_overlapping_data_(
+          GetQuicReloadableFlag(quic_allow_receiving_overlapping_data)) {
+  if (allow_overlapping_data_) {
+    QUIC_FLAG_COUNT(quic_reloadable_flag_quic_allow_receiving_overlapping_data);
+  }
   CHECK_GT(blocks_count_, 1u)
       << "blocks_count_ = " << blocks_count_
       << ", max_buffer_capacity_bytes_ = " << max_buffer_capacity_bytes_;
@@ -73,11 +80,18 @@
     }
   }
   num_bytes_buffered_ = 0;
-  // Reset gaps_ so that buffer is in a state as if all data before
-  // total_bytes_read_ has been consumed, and those after total_bytes_read_
-  // has never arrived.
-  gaps_ = std::list<Gap>(
-      1, Gap(total_bytes_read_, std::numeric_limits<QuicStreamOffset>::max()));
+  if (allow_overlapping_data_) {
+    bytes_received_.Clear();
+    bytes_received_.Add(0, total_bytes_read_);
+  } else {
+    // Reset gaps_ so that buffer is in a state as if all data before
+    // total_bytes_read_ has been consumed, and those after total_bytes_read_
+    // has never arrived.
+    gaps_ = std::list<Gap>(
+        1,
+        Gap(total_bytes_read_, std::numeric_limits<QuicStreamOffset>::max()));
+  }
+
   frame_arrival_time_map_.clear();
 }
 
@@ -106,6 +120,45 @@
     *error_details = "Received empty stream frame without FIN.";
     return QUIC_EMPTY_STREAM_FRAME_NO_FIN;
   }
+  if (allow_overlapping_data_) {
+    // Write beyond the current range this buffer is covering.
+    if (starting_offset + size >
+            total_bytes_read_ + max_buffer_capacity_bytes_ ||
+        starting_offset + size < starting_offset) {
+      *error_details = "Received data beyond available range.";
+      return QUIC_INTERNAL_ERROR;
+    }
+
+    QuicIntervalSet<QuicStreamOffset> newly_received(starting_offset,
+                                                     starting_offset + size);
+    newly_received.Difference(bytes_received_);
+    if (newly_received.Empty()) {
+      return QUIC_NO_ERROR;
+    }
+    bytes_received_.Add(starting_offset, starting_offset + size);
+    if (bytes_received_.Size() >= kMaxNumGapsAllowed) {
+      // This frame is going to create more intervals than allowed. Stop
+      // processing.
+      *error_details = "Too many data intervals received for this stream.";
+      return QUIC_TOO_MANY_STREAM_DATA_INTERVALS;
+    }
+    for (const auto& interval : newly_received) {
+      const QuicStreamOffset copy_offset = interval.min();
+      const QuicByteCount copy_length = interval.max() - interval.min();
+      size_t bytes_copy = 0;
+      if (!CopyStreamData(
+              copy_offset,
+              data.substr(copy_offset - starting_offset, copy_length),
+              &bytes_copy, error_details)) {
+        return QUIC_STREAM_SEQUENCER_INVALID_STATE;
+      }
+      *bytes_buffered += bytes_copy;
+      frame_arrival_time_map_.insert(
+          std::make_pair(copy_offset, FrameInfo(copy_length, timestamp)));
+    }
+    num_bytes_buffered_ += *bytes_buffered;
+    return QUIC_NO_ERROR;
+  }
 
   // Find the first gap not ending before |offset|. This gap maybe the gap to
   // fill if the arriving frame doesn't overlaps with previous ones.
@@ -165,7 +218,7 @@
     // This frame is going to create one more gap which exceeds max number of
     // gaps allowed. Stop processing.
     *error_details = "Too many gaps created for this stream.";
-    return QUIC_TOO_MANY_FRAME_GAPS;
+    return QUIC_TOO_MANY_STREAM_DATA_INTERVALS;
   }
 
   if (!CopyStreamData(offset, data, bytes_buffered, error_details)) {
@@ -366,7 +419,7 @@
   }
 
   size_t start_block_idx = NextBlockToRead();
-  QuicStreamOffset readable_offset_end = gaps_.front().begin_offset - 1;
+  QuicStreamOffset readable_offset_end = FirstMissingByte() - 1;
   DCHECK_GE(readable_offset_end + 1, total_bytes_read_);
   size_t end_block_offset = GetInBlockOffset(readable_offset_end);
   size_t end_block_idx = GetBlockIndex(readable_offset_end);
@@ -483,7 +536,7 @@
 
 size_t QuicStreamSequencerBuffer::FlushBufferedFrames() {
   size_t prev_total_bytes_read = total_bytes_read_;
-  total_bytes_read_ = gaps_.back().begin_offset;
+  total_bytes_read_ = NextExpectedByte();
   Clear();
   return total_bytes_read_ - prev_total_bytes_read;
 }
@@ -494,7 +547,7 @@
 }
 
 size_t QuicStreamSequencerBuffer::ReadableBytes() const {
-  return gaps_.front().begin_offset - total_bytes_read_;
+  return FirstMissingByte() - total_bytes_read_;
 }
 
 bool QuicStreamSequencerBuffer::HasBytesToRead() const {
@@ -537,27 +590,46 @@
 
   // Check where the logical end of this buffer is.
   // Not empty if the end of circular buffer has been wrapped to this block.
-  if (GetBlockIndex(gaps_.back().begin_offset - 1) == block_index) {
+  if (GetBlockIndex(NextExpectedByte() - 1) == block_index) {
     return true;
   }
 
   // Read index remains in this block, which means a gap has been reached.
   if (NextBlockToRead() == block_index) {
-    Gap first_gap = gaps_.front();
-    DCHECK(first_gap.begin_offset == total_bytes_read_);
-    // Check where the next piece data is.
-    // Not empty if next piece of data is still in this chunk.
-    bool gap_ends_in_this_block =
-        (GetBlockIndex(first_gap.end_offset) == block_index);
-    if (gap_ends_in_this_block) {
-      return true;
+    if (allow_overlapping_data_) {
+      if (bytes_received_.Size() > 1) {
+        auto it = bytes_received_.begin();
+        ++it;
+        if (GetBlockIndex(it->min()) == block_index) {
+          // Do not retire the block if next data interval is in this block.
+          return true;
+        }
+      } else {
+        QUIC_BUG << "Read stopped at where it shouldn't.";
+        return false;
+      }
+    } else {
+      Gap first_gap = gaps_.front();
+      DCHECK(first_gap.begin_offset == total_bytes_read_);
+      // Check where the next piece data is.
+      // Not empty if next piece of data is still in this chunk.
+      bool gap_ends_in_this_block =
+          (GetBlockIndex(first_gap.end_offset) == block_index);
+      if (gap_ends_in_this_block) {
+        return true;
+      }
     }
   }
   return RetireBlock(block_index);
 }
 
 bool QuicStreamSequencerBuffer::Empty() const {
-  return gaps_.size() == 1 && gaps_.front().begin_offset == total_bytes_read_;
+  if (!allow_overlapping_data_) {
+    return gaps_.size() == 1 && gaps_.front().begin_offset == total_bytes_read_;
+  }
+  return bytes_received_.Empty() ||
+         (bytes_received_.Size() == 1 && total_bytes_read_ > 0 &&
+          bytes_received_.begin()->max() == total_bytes_read_);
 }
 
 size_t QuicStreamSequencerBuffer::GetBlockCapacity(size_t block_index) const {
@@ -596,6 +668,9 @@
 }
 
 string QuicStreamSequencerBuffer::GapsDebugString() {
+  if (allow_overlapping_data_) {
+    return bytes_received_.ToString();
+  }
   string current_gaps_string;
   for (const Gap& gap : gaps_) {
     QuicStreamOffset current_gap_begin = gap.begin_offset;
@@ -619,4 +694,25 @@
   return current_frames_string;
 }
 
+QuicStreamOffset QuicStreamSequencerBuffer::FirstMissingByte() const {
+  if (allow_overlapping_data_) {
+    if (bytes_received_.Empty() || bytes_received_.begin()->min() > 0) {
+      // Offset 0 is not received yet.
+      return 0;
+    }
+    return bytes_received_.begin()->max();
+  }
+  return gaps_.front().begin_offset;
+}
+
+QuicStreamOffset QuicStreamSequencerBuffer::NextExpectedByte() const {
+  if (allow_overlapping_data_) {
+    if (bytes_received_.Empty()) {
+      return 0;
+    }
+    return bytes_received_.rbegin()->max();
+  }
+  return gaps_.back().begin_offset;
+}
+
 }  //  namespace net
diff --git a/net/quic/core/quic_stream_sequencer_buffer.h b/net/quic/core/quic_stream_sequencer_buffer.h
index 439965d..f90f597 100644
--- a/net/quic/core/quic_stream_sequencer_buffer.h
+++ b/net/quic/core/quic_stream_sequencer_buffer.h
@@ -7,8 +7,8 @@
 
 // QuicStreamSequencerBuffer is a circular stream buffer with random write and
 // in-sequence read. It consists of a vector of pointers pointing
-// to memory blocks created as needed and a list of Gaps to indicate
-// the missing data between the data already written into the buffer.
+// to memory blocks created as needed and an interval set recording received
+// data.
 // - Data are written in with offset indicating where it should be in the
 // stream, and the buffer grown as needed (up to the maximum buffer capacity),
 // without expensive copying (extra blocks are allocated).
@@ -184,7 +184,7 @@
   bool RetireBlock(size_t index);
 
   // Should only be called after the indexed block is read till the end of the
-  // block or a gap has been reached.
+  // block or missing data has been reached.
   // If the block at |block_index| contains no buffered data, the block
   // should be retired.
   // Return false on success, or false otherwise.
@@ -192,6 +192,8 @@
 
   // Called within OnStreamData() to update the gap OnStreamData() writes into
   // (remove, split or change begin/end offset).
+  // TODO(fayang): Remove this when deprecating
+  // quic_reloadable_flag_quic_allow_receiving_overlapping_data.
   void UpdateGapList(std::list<Gap>::iterator gap_with_new_data_written,
                      QuicStreamOffset start_offset,
                      size_t bytes_written);
@@ -217,6 +219,12 @@
   // Returns number of bytes available to be read out.
   size_t ReadableBytes() const;
 
+  // Returns offset of first missing byte.
+  QuicStreamOffset FirstMissingByte() const;
+
+  // Returns offset of highest received byte + 1.
+  QuicStreamOffset NextExpectedByte() const;
+
   // Called after Readv() and MarkConsumed() to keep frame_arrival_time_map_
   // up to date.
   // |offset| is the byte next read should start from. All frames before it
@@ -239,6 +247,8 @@
   QuicStreamOffset total_bytes_read_;
 
   // Contains Gaps which represents currently missing data.
+  // TODO(fayang): Remove list of gaps when deprecating
+  // quic_reloadable_flag_quic_allow_receiving_overlapping_data.
   std::list<Gap> gaps_;
 
   // An ordered, variable-length list of blocks, with the length limited
@@ -250,6 +260,8 @@
   size_t num_bytes_buffered_;
 
   // Stores all the buffered frames' start offset, length and arrival time.
+  // TODO(fayang): Remove this when deprecating
+  // quic_reloadable_flag_quic_allow_receiving_overlapping_data.
   std::map<QuicStreamOffset, FrameInfo> frame_arrival_time_map_;
 
   // For debugging use after free, assigned to 123456 in constructor and 654321
@@ -257,6 +269,13 @@
   // or memory corruption.
   int32_t destruction_indicator_;
 
+  // Currently received data.
+  QuicIntervalSet<QuicStreamOffset> bytes_received_;
+
+  // Latched value of
+  // quic_reloadable_flag_quic_allow_receiving_overlapping_data.
+  const bool allow_overlapping_data_;
+
   DISALLOW_COPY_AND_ASSIGN(QuicStreamSequencerBuffer);
 };
 }  // namespace net
diff --git a/net/quic/core/quic_stream_sequencer_buffer_test.cc b/net/quic/core/quic_stream_sequencer_buffer_test.cc
index 407a5287..9ca1e826 100644
--- a/net/quic/core/quic_stream_sequencer_buffer_test.cc
+++ b/net/quic/core/quic_stream_sequencer_buffer_test.cc
@@ -132,9 +132,16 @@
     ASSERT_EQ('a', block_ptr->buffer[helper_->GetInBlockOffset(800) + i]);
   }
   EXPECT_EQ(2, helper_->GapSize());
-  std::list<Gap> gaps = helper_->GetGaps();
-  EXPECT_EQ(800u, gaps.front().end_offset);
-  EXPECT_EQ(1824u, gaps.back().begin_offset);
+  EXPECT_EQ(0u, helper_->ReadableBytes());
+  if (helper_->allow_overlapping_data()) {
+    EXPECT_EQ(1u, helper_->bytes_received().Size());
+    EXPECT_EQ(800u, helper_->bytes_received().begin()->min());
+    EXPECT_EQ(1824u, helper_->bytes_received().begin()->max());
+  } else {
+    std::list<Gap> gaps = helper_->GetGaps();
+    EXPECT_EQ(800u, gaps.front().end_offset);
+    EXPECT_EQ(1824u, gaps.back().begin_offset);
+  }
   auto* frame_map = helper_->frame_arrival_time_map();
   EXPECT_EQ(1u, frame_map->size());
   EXPECT_EQ(800u, frame_map->begin()->first);
@@ -167,14 +174,25 @@
   EXPECT_EQ(QUIC_NO_ERROR,
             buffer_->OnStreamData(800, source, t1, &written, &error_details_));
   // Try to write to [0, 1024) and [1024, 2048).
-  // But no byte will be written since overlap.
   clock_.AdvanceTime(QuicTime::Delta::FromSeconds(1));
   QuicTime t2 = clock_.ApproximateNow();
+  auto* frame_map = helper_->frame_arrival_time_map();
+  if (helper_->allow_overlapping_data()) {
+    EXPECT_EQ(QUIC_NO_ERROR,
+              buffer_->OnStreamData(0, source, t2, &written, &error_details_));
+    EXPECT_EQ(QUIC_NO_ERROR, buffer_->OnStreamData(1024, source, t2, &written,
+                                                   &error_details_));
+    EXPECT_EQ(3u, frame_map->size());
+    EXPECT_EQ(t1, (*frame_map)[800].timestamp);
+    EXPECT_EQ(t2, (*frame_map)[0].timestamp);
+    EXPECT_EQ(t2, (*frame_map)[1824].timestamp);
+    return;
+  }
+  // But no byte will be written since overlap.
   EXPECT_EQ(QUIC_OVERLAPPING_STREAM_DATA,
             buffer_->OnStreamData(0, source, t2, &written, &error_details_));
   EXPECT_EQ(QUIC_OVERLAPPING_STREAM_DATA,
             buffer_->OnStreamData(1024, source, t2, &written, &error_details_));
-  auto* frame_map = helper_->frame_arrival_time_map();
   EXPECT_EQ(1u, frame_map->size());
   EXPECT_EQ(t1, (*frame_map)[800].timestamp);
 }
@@ -187,6 +205,31 @@
   buffer_->OnStreamData(800, source, clock_.ApproximateNow(), &written,
                         &error_details_);
   source = string(800, 'b');
+  string one_byte = "c";
+  auto* frame_map = helper_->frame_arrival_time_map();
+  if (helper_->allow_overlapping_data()) {
+    // Write [1, 801).
+    EXPECT_EQ(QUIC_NO_ERROR,
+              buffer_->OnStreamData(1, source, clock_.ApproximateNow(),
+                                    &written, &error_details_));
+    // Write [0, 800).
+    EXPECT_EQ(QUIC_NO_ERROR,
+              buffer_->OnStreamData(0, source, clock_.ApproximateNow(),
+                                    &written, &error_details_));
+    // Write [1823, 1824).
+    EXPECT_EQ(QUIC_NO_ERROR,
+              buffer_->OnStreamData(1823, one_byte, clock_.ApproximateNow(),
+                                    &written, &error_details_));
+    EXPECT_EQ(0u, written);
+    // write one byte to [1824, 1825)
+    EXPECT_EQ(QUIC_NO_ERROR,
+              buffer_->OnStreamData(1824, one_byte, clock_.ApproximateNow(),
+                                    &written, &error_details_));
+    EXPECT_EQ(4u, frame_map->size());
+    EXPECT_TRUE(helper_->CheckBufferInvariants());
+    return;
+  }
+
   // Try to write to [1, 801), but should fail due to overlapping
   EXPECT_EQ(QUIC_OVERLAPPING_STREAM_DATA,
             buffer_->OnStreamData(1, source, clock_.ApproximateNow(), &written,
@@ -196,7 +239,6 @@
             buffer_->OnStreamData(0, source, clock_.ApproximateNow(), &written,
                                   &error_details_));
   // Try to write one byte to [1823, 1824), but should count as duplicate
-  string one_byte = "c";
   EXPECT_EQ(QUIC_NO_ERROR,
             buffer_->OnStreamData(1823, one_byte, clock_.ApproximateNow(),
                                   &written, &error_details_));
@@ -205,7 +247,6 @@
   EXPECT_EQ(QUIC_NO_ERROR,
             buffer_->OnStreamData(1824, one_byte, clock_.ApproximateNow(),
                                   &written, &error_details_));
-  auto* frame_map = helper_->frame_arrival_time_map();
   EXPECT_EQ(3u, frame_map->size());
   EXPECT_TRUE(helper_->CheckBufferInvariants());
 }
@@ -232,8 +273,13 @@
   // Assume a stream has already buffered almost 4GB.
   uint64_t total_bytes_read = pow(2, 32) - 1;
   helper_->set_total_bytes_read(total_bytes_read);
-  helper_->set_gaps(std::list<Gap>(
-      1, Gap(total_bytes_read, std::numeric_limits<QuicStreamOffset>::max())));
+  if (helper_->allow_overlapping_data()) {
+    helper_->AddBytesReceived(0, total_bytes_read);
+  } else {
+    helper_->set_gaps(std::list<Gap>(
+        1,
+        Gap(total_bytes_read, std::numeric_limits<QuicStreamOffset>::max())));
+  }
 
   // Three new out of order frames arrive.
   const size_t kBytesToWrite = 100;
@@ -817,8 +863,13 @@
 
     QuicStreamOffset last_straw = 2 * kMaxNumGapsAllowed - 1;
     if (begin == last_straw) {
-      EXPECT_EQ(QUIC_TOO_MANY_FRAME_GAPS, rs);
-      EXPECT_EQ("Too many gaps created for this stream.", error_details_);
+      EXPECT_EQ(QUIC_TOO_MANY_STREAM_DATA_INTERVALS, rs);
+      if (GetQuicReloadableFlag(quic_allow_receiving_overlapping_data)) {
+        EXPECT_EQ("Too many data intervals received for this stream.",
+                  error_details_);
+      } else {
+        EXPECT_EQ("Too many gaps created for this stream.", error_details_);
+      }
       break;
     }
   }
diff --git a/net/quic/core/quic_stream_sequencer_test.cc b/net/quic/core/quic_stream_sequencer_test.cc
index 35fa78f..19e852b 100644
--- a/net/quic/core/quic_stream_sequencer_test.cc
+++ b/net/quic/core/quic_stream_sequencer_test.cc
@@ -565,7 +565,7 @@
   sequencer_->MarkConsumed(6);
 }
 
-TEST_F(QuicStreamSequencerTest, DontAcceptOverlappingFrames) {
+TEST_F(QuicStreamSequencerTest, OverlappingFramesReceived) {
   // The peer should never send us non-identical stream frames which contain
   // overlapping byte ranges - if they do, we close the connection.
   QuicStreamId id =
@@ -575,9 +575,15 @@
   sequencer_->OnStreamFrame(frame1);
 
   QuicStreamFrame frame2(id, false, 2, QuicStringPiece("hello"));
-  EXPECT_CALL(stream_,
-              CloseConnectionWithDetails(QUIC_OVERLAPPING_STREAM_DATA, _))
-      .Times(1);
+  if (GetQuicReloadableFlag(quic_allow_receiving_overlapping_data)) {
+    EXPECT_CALL(stream_,
+                CloseConnectionWithDetails(QUIC_OVERLAPPING_STREAM_DATA, _))
+        .Times(0);
+  } else {
+    EXPECT_CALL(stream_,
+                CloseConnectionWithDetails(QUIC_OVERLAPPING_STREAM_DATA, _))
+        .Times(1);
+  }
   sequencer_->OnStreamFrame(frame2);
 }
 
diff --git a/net/quic/core/quic_stream_test.cc b/net/quic/core/quic_stream_test.cc
index f290ad9..6b2c734 100644
--- a/net/quic/core/quic_stream_test.cc
+++ b/net/quic/core/quic_stream_test.cc
@@ -731,12 +731,7 @@
   EXPECT_CALL(*session_,
               SendRstStream(stream_->id(), QUIC_STREAM_CANCELLED, 9));
   stream_->Reset(QUIC_STREAM_CANCELLED);
-  stream_->OnStreamFrameDiscarded(0, 9, false);
-  if (!GetQuicReloadableFlag(quic_remove_on_stream_frame_discarded)) {
-    EXPECT_EQ(0u, QuicStreamPeer::SendBuffer(stream_).size());
-  } else {
-    EXPECT_EQ(1u, QuicStreamPeer::SendBuffer(stream_).size());
-  }
+  EXPECT_EQ(1u, QuicStreamPeer::SendBuffer(stream_).size());
   // Stream stops waiting for acks as data is not going to be retransmitted.
   EXPECT_FALSE(stream_->IsWaitingForAcks());
 }
@@ -758,12 +753,7 @@
   EXPECT_CALL(*session_,
               SendRstStream(stream_->id(), QUIC_RST_ACKNOWLEDGEMENT, 9));
   stream_->OnStreamReset(rst_frame);
-  stream_->OnStreamFrameDiscarded(0, 9, false);
-  if (!GetQuicReloadableFlag(quic_remove_on_stream_frame_discarded)) {
-    EXPECT_EQ(0u, QuicStreamPeer::SendBuffer(stream_).size());
-  } else {
-    EXPECT_EQ(1u, QuicStreamPeer::SendBuffer(stream_).size());
-  }
+  EXPECT_EQ(1u, QuicStreamPeer::SendBuffer(stream_).size());
   // Stream stops waiting for acks as it does not finish sending and rst is
   // sent.
   EXPECT_FALSE(stream_->IsWaitingForAcks());
@@ -803,12 +793,7 @@
               SendRstStream(stream_->id(), QUIC_RST_ACKNOWLEDGEMENT, 9));
   stream_->OnConnectionClosed(QUIC_INTERNAL_ERROR,
                               ConnectionCloseSource::FROM_SELF);
-  stream_->OnStreamFrameDiscarded(0, 9, false);
-  if (!GetQuicReloadableFlag(quic_remove_on_stream_frame_discarded)) {
-    EXPECT_EQ(0u, QuicStreamPeer::SendBuffer(stream_).size());
-  } else {
-    EXPECT_EQ(1u, QuicStreamPeer::SendBuffer(stream_).size());
-  }
+  EXPECT_EQ(1u, QuicStreamPeer::SendBuffer(stream_).size());
   // Stream stops waiting for acks as connection is going to close.
   EXPECT_FALSE(stream_->IsWaitingForAcks());
 }
diff --git a/net/quic/core/quic_unacked_packet_map.cc b/net/quic/core/quic_unacked_packet_map.cc
index 8ff3645f..18be0ba3 100644
--- a/net/quic/core/quic_unacked_packet_map.cc
+++ b/net/quic/core/quic_unacked_packet_map.cc
@@ -17,7 +17,7 @@
       least_unacked_(1),
       bytes_in_flight_(0),
       pending_crypto_packet_count_(0),
-      stream_notifier_(nullptr) {}
+      session_notifier_(nullptr) {}
 
 QuicUnackedPacketMap::~QuicUnackedPacketMap() {
   for (QuicTransmissionInfo& transmission_info : unacked_packets_) {
@@ -102,10 +102,10 @@
   QuicTransmissionInfo* transmission_info =
       &unacked_packets_.at(old_packet_number - least_unacked_);
   QuicFrames* frames = &transmission_info->retransmittable_frames;
-  if (stream_notifier_ != nullptr) {
+  if (session_notifier_ != nullptr) {
     for (const QuicFrame& frame : *frames) {
       if (frame.type == STREAM_FRAME) {
-        stream_notifier_->OnStreamFrameRetransmitted(*frame.stream_frame);
+        session_notifier_->OnStreamFrameRetransmitted(*frame.stream_frame);
       }
     }
   }
@@ -237,15 +237,6 @@
     if (frames->empty()) {
       continue;
     }
-    if (stream_notifier_ != nullptr) {
-      for (const QuicFrame& frame : *frames) {
-        if (frame.type != STREAM_FRAME ||
-            frame.stream_frame->stream_id != stream_id) {
-          continue;
-        }
-        stream_notifier_->OnStreamFrameDiscarded(*frame.stream_frame);
-      }
-    }
     RemoveFramesForStream(frames, stream_id);
     if (frames->empty()) {
       RemoveRetransmittability(packet_number);
@@ -332,22 +323,19 @@
   return least_unacked_;
 }
 
-void QuicUnackedPacketMap::SetStreamNotifier(
-    StreamNotifierInterface* stream_notifier) {
-  stream_notifier_ = stream_notifier;
+void QuicUnackedPacketMap::SetSessionNotifier(
+    SessionNotifierInterface* session_notifier) {
+  session_notifier_ = session_notifier;
 }
 
-void QuicUnackedPacketMap::NotifyStreamFramesAcked(
-    const QuicTransmissionInfo& info,
-    QuicTime::Delta ack_delay) {
-  if (stream_notifier_ == nullptr) {
+void QuicUnackedPacketMap::NotifyFramesAcked(const QuicTransmissionInfo& info,
+                                             QuicTime::Delta ack_delay) {
+  if (session_notifier_ == nullptr) {
     return;
   }
 
   for (const QuicFrame& frame : info.retransmittable_frames) {
-    if (frame.type == STREAM_FRAME) {
-      stream_notifier_->OnStreamFrameAcked(*frame.stream_frame, ack_delay);
-    }
+    session_notifier_->OnFrameAcked(frame, ack_delay);
   }
 }
 
diff --git a/net/quic/core/quic_unacked_packet_map.h b/net/quic/core/quic_unacked_packet_map.h
index 43bc635f2..6e2eb8a 100644
--- a/net/quic/core/quic_unacked_packet_map.h
+++ b/net/quic/core/quic_unacked_packet_map.h
@@ -11,7 +11,7 @@
 #include "base/macros.h"
 #include "net/quic/core/quic_packets.h"
 #include "net/quic/core/quic_transmission_info.h"
-#include "net/quic/core/stream_notifier_interface.h"
+#include "net/quic/core/session_notifier_interface.h"
 #include "net/quic/platform/api/quic_export.h"
 
 namespace net {
@@ -42,9 +42,9 @@
   // Returns true if the packet |packet_number| is unacked.
   bool IsUnacked(QuicPacketNumber packet_number) const;
 
-  // Notifies stream_notifier that stream frames have been acked.
-  void NotifyStreamFramesAcked(const QuicTransmissionInfo& info,
-                               QuicTime::Delta ack_delay);
+  // Notifies session_notifier that frames have been acked.
+  void NotifyFramesAcked(const QuicTransmissionInfo& info,
+                         QuicTime::Delta ack_delay);
 
   // Marks |info| as no longer in flight.
   void RemoveFromInFlight(QuicTransmissionInfo* info);
@@ -141,7 +141,7 @@
   // RTT measurement purposes.
   void RemoveObsoletePackets();
 
-  void SetStreamNotifier(StreamNotifierInterface* stream_notifier);
+  void SetSessionNotifier(SessionNotifierInterface* session_notifier);
 
  private:
   // Called when a packet is retransmitted with a new packet number.
@@ -191,9 +191,8 @@
   // Number of retransmittable crypto handshake packets.
   size_t pending_crypto_packet_count_;
 
-  // Receives notifications of stream frames being retransmitted or
-  // acknowledged.
-  StreamNotifierInterface* stream_notifier_;
+  // Receives notifications of frames being retransmitted or acknowledged.
+  SessionNotifierInterface* session_notifier_;
 
   DISALLOW_COPY_AND_ASSIGN(QuicUnackedPacketMap);
 };
diff --git a/net/quic/core/quic_unacked_packet_map_test.cc b/net/quic/core/quic_unacked_packet_map_test.cc
index 5e2a714..cf81a97 100644
--- a/net/quic/core/quic_unacked_packet_map_test.cc
+++ b/net/quic/core/quic_unacked_packet_map_test.cc
@@ -17,20 +17,12 @@
 // Default packet length.
 const uint32_t kDefaultLength = 1000;
 
-class MockStreamNotifier : public StreamNotifierInterface {
- public:
-  MOCK_METHOD2(OnStreamFrameAcked,
-               void(const QuicStreamFrame&, QuicTime::Delta));
-  MOCK_METHOD1(OnStreamFrameRetransmitted, void(const QuicStreamFrame&));
-  MOCK_METHOD1(OnStreamFrameDiscarded, void(const QuicStreamFrame&));
-};
-
 class QuicUnackedPacketMapTest : public QuicTest {
  protected:
   QuicUnackedPacketMapTest()
       : unacked_packets_(),
         now_(QuicTime::Zero() + QuicTime::Delta::FromMilliseconds(1000)) {
-    unacked_packets_.SetStreamNotifier(&notifier_);
+    unacked_packets_.SetSessionNotifier(&notifier_);
   }
 
   ~QuicUnackedPacketMapTest() override {}
@@ -116,7 +108,7 @@
   }
   QuicUnackedPacketMap unacked_packets_;
   QuicTime now_;
-  MockStreamNotifier notifier_;
+  MockSessionNotifier notifier_;
 };
 
 TEST_F(QuicUnackedPacketMapTest, RttOnly) {
@@ -173,7 +165,6 @@
   VerifyRetransmittablePackets(retransmittable,
                                QUIC_ARRAYSIZE(retransmittable));
 
-  EXPECT_CALL(notifier_, OnStreamFrameDiscarded(_)).Times(1);
   unacked_packets_.CancelRetransmissionsForStream(stream_id);
   VerifyUnackedPackets(unacked, QUIC_ARRAYSIZE(unacked));
   VerifyInFlightPackets(unacked, QUIC_ARRAYSIZE(unacked));
@@ -193,7 +184,6 @@
                                QUIC_ARRAYSIZE(retransmittable));
 
   // Stop retransmissions on another stream and verify the packet is unchanged.
-  EXPECT_CALL(notifier_, OnStreamFrameDiscarded(_)).Times(0);
   unacked_packets_.CancelRetransmissionsForStream(stream_id + 2);
   VerifyUnackedPackets(unacked, QUIC_ARRAYSIZE(unacked));
   VerifyInFlightPackets(unacked, QUIC_ARRAYSIZE(unacked));
@@ -215,7 +205,6 @@
   VerifyRetransmittablePackets(retransmittable,
                                QUIC_ARRAYSIZE(retransmittable));
 
-  EXPECT_CALL(notifier_, OnStreamFrameDiscarded(_)).Times(1);
   unacked_packets_.CancelRetransmissionsForStream(stream_id);
   VerifyUnackedPackets(unacked, QUIC_ARRAYSIZE(unacked));
   VerifyInFlightPackets(unacked, QUIC_ARRAYSIZE(unacked));
diff --git a/net/quic/core/session_notifier_interface.h b/net/quic/core/session_notifier_interface.h
new file mode 100644
index 0000000..9a1e4e3
--- /dev/null
+++ b/net/quic/core/session_notifier_interface.h
@@ -0,0 +1,32 @@
+// Copyright (c) 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.
+
+#ifndef NET_QUIC_CORE_SESSION_NOTIFIER_INTERFACE_H_
+#define NET_QUIC_CORE_SESSION_NOTIFIER_INTERFACE_H_
+
+#include "net/quic/core/frames/quic_frame.h"
+#include "net/quic/core/quic_time.h"
+
+namespace net {
+
+// Pure virtual class to be notified when a packet containing a frame is acked
+// or lost.
+class QUIC_EXPORT_PRIVATE SessionNotifierInterface {
+ public:
+  virtual ~SessionNotifierInterface() {}
+
+  // Called when |frame| is acked.
+  virtual void OnFrameAcked(const QuicFrame& frame,
+                            QuicTime::Delta ack_delay_time) = 0;
+
+  // Called when |frame| is retransmitted.
+  virtual void OnStreamFrameRetransmitted(const QuicStreamFrame& frame) = 0;
+
+  // Called when |frame| is considered as lost.
+  virtual void OnFrameLost(const QuicFrame& frame) = 0;
+};
+
+}  // namespace net
+
+#endif  // NET_QUIC_CORE_SESSION_NOTIFIER_INTERFACE_H_
diff --git a/net/quic/core/stream_notifier_interface.h b/net/quic/core/stream_notifier_interface.h
deleted file mode 100644
index 1237e5c5..0000000
--- a/net/quic/core/stream_notifier_interface.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) 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.
-
-#ifndef NET_QUIC_CORE_STREAM_NOTIFIER_INTERFACE_H_
-#define NET_QUIC_CORE_STREAM_NOTIFIER_INTERFACE_H_
-
-#include "net/quic/core/frames/quic_stream_frame.h"
-#include "net/quic/core/quic_time.h"
-
-namespace net {
-
-// Pure virtual class to be notified when a packet containing a stream frame is
-// acked or lost.
-class QUIC_EXPORT_PRIVATE StreamNotifierInterface {
- public:
-  virtual ~StreamNotifierInterface() {}
-
-  // Called when |frame| is acked.
-  virtual void OnStreamFrameAcked(const QuicStreamFrame& frame,
-                                  QuicTime::Delta ack_delay_time) = 0;
-
-  // Called when |frame| is retransmitted.
-  virtual void OnStreamFrameRetransmitted(const QuicStreamFrame& frame) = 0;
-
-  // Called when |frame| is discarded from unacked packet map because stream is
-  // reset.
-  virtual void OnStreamFrameDiscarded(const QuicStreamFrame& frame) = 0;
-};
-
-}  // namespace net
-
-#endif  // NET_QUIC_CORE_STREAM_NOTIFIER_INTERFACE_H_
diff --git a/net/quic/core/tls_client_handshaker.cc b/net/quic/core/tls_client_handshaker.cc
index 1bf59c4..9f64a86 100644
--- a/net/quic/core/tls_client_handshaker.cc
+++ b/net/quic/core/tls_client_handshaker.cc
@@ -46,7 +46,8 @@
     : TlsHandshaker(stream, session, ssl_ctx),
       server_id_(server_id),
       proof_verifier_(proof_verifier),
-      verify_context_(verify_context) {}
+      verify_context_(verify_context),
+      crypto_negotiated_params_(new QuicCryptoNegotiatedParameters) {}
 
 TlsClientHandshaker::~TlsClientHandshaker() {
   if (proof_verify_callback_) {
@@ -179,15 +180,21 @@
     return;
   }
 
+  QUIC_LOG(INFO) << "Client: setting crypters";
+  QuicEncrypter* initial_encrypter = CreateEncrypter(client_secret);
+  session()->connection()->SetEncrypter(ENCRYPTION_INITIAL, initial_encrypter);
   QuicEncrypter* encrypter = CreateEncrypter(client_secret);
   session()->connection()->SetEncrypter(ENCRYPTION_FORWARD_SECURE, encrypter);
 
+  QuicDecrypter* initial_decrypter = CreateDecrypter(server_secret);
+  session()->connection()->SetDecrypter(ENCRYPTION_INITIAL, initial_decrypter);
   QuicDecrypter* decrypter = CreateDecrypter(server_secret);
-  session()->connection()->SetDecrypter(ENCRYPTION_FORWARD_SECURE, decrypter);
+  session()->connection()->SetAlternativeDecrypter(ENCRYPTION_FORWARD_SECURE,
+                                                   decrypter, true);
 
   session()->connection()->SetDefaultEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
 
-  session()->connection()->NeuterUnencryptedPackets();
+  session()->NeuterUnencryptedData();
   encryption_established_ = true;
   handshake_confirmed_ = true;
 }
diff --git a/net/quic/core/tls_server_handshaker.cc b/net/quic/core/tls_server_handshaker.cc
index 21939f69..31734e0e 100644
--- a/net/quic/core/tls_server_handshaker.cc
+++ b/net/quic/core/tls_server_handshaker.cc
@@ -57,7 +57,9 @@
                                          QuicSession* session,
                                          SSL_CTX* ssl_ctx,
                                          ProofSource* proof_source)
-    : TlsHandshaker(stream, session, ssl_ctx), proof_source_(proof_source) {
+    : TlsHandshaker(stream, session, ssl_ctx),
+      proof_source_(proof_source),
+      crypto_negotiated_params_(new QuicCryptoNegotiatedParameters) {
   // Set callback to provide SNI.
   // SSL_CTX_set_tlsext_servername_callback(ssl_ctx, SelectCertificateCallback);
 
@@ -179,6 +181,7 @@
   if (should_close) {
     QUIC_LOG(WARNING) << "SSL_do_handshake failed; SSL_get_error returns "
                       << ssl_error << ", state_ = " << state_;
+    ERR_print_errors_fp(stderr);
     CloseConnection();
   }
 }
@@ -201,15 +204,21 @@
     return;
   }
 
+  QUIC_LOG(INFO) << "Server: setting crypters";
+  QuicEncrypter* initial_encrypter = CreateEncrypter(server_secret);
+  session()->connection()->SetEncrypter(ENCRYPTION_INITIAL, initial_encrypter);
   QuicEncrypter* encrypter = CreateEncrypter(server_secret);
   session()->connection()->SetEncrypter(ENCRYPTION_FORWARD_SECURE, encrypter);
 
+  QuicDecrypter* initial_decrypter = CreateDecrypter(client_secret);
+  session()->connection()->SetDecrypter(ENCRYPTION_INITIAL, initial_decrypter);
   QuicDecrypter* decrypter = CreateDecrypter(client_secret);
-  session()->connection()->SetDecrypter(ENCRYPTION_FORWARD_SECURE, decrypter);
+  session()->connection()->SetAlternativeDecrypter(ENCRYPTION_FORWARD_SECURE,
+                                                   decrypter, true);
 
   session()->connection()->SetDefaultEncryptionLevel(ENCRYPTION_FORWARD_SECURE);
 
-  session()->connection()->NeuterUnencryptedPackets();
+  session()->NeuterUnencryptedData();
   encryption_established_ = true;
   handshake_confirmed_ = true;
 }
diff --git a/net/quic/platform/api/quic_reference_counted.h b/net/quic/platform/api/quic_reference_counted.h
index 296fe48..16e7936a 100644
--- a/net/quic/platform/api/quic_reference_counted.h
+++ b/net/quic/platform/api/quic_reference_counted.h
@@ -114,8 +114,8 @@
   explicit operator bool() const { return static_cast<bool>(impl_); }
 
   // Assignment operator on raw pointer. Drops a reference to current pointee,
-  // if any and replaces it with |p|. This garantee the reference count of *p is
-  // 1. This should only be used when a new object is created, calling this
+  // if any, and replaces it with |p|. This guarantees the reference count of *p
+  // is 1. This should only be used when a new object is created, calling this
   // on a already existent object is undefined behavior.
   QuicReferenceCountedPointer<T>& operator=(T* p) {
     impl_ = p;
diff --git a/net/quic/quartc/quartc_packet_writer.cc b/net/quic/quartc/quartc_packet_writer.cc
index 73ddbe8..70ff00a 100644
--- a/net/quic/quartc/quartc_packet_writer.cc
+++ b/net/quic/quartc/quartc_packet_writer.cc
@@ -20,6 +20,7 @@
   DCHECK(packet_transport_);
   int bytes_written = packet_transport_->Write(buffer, buf_len);
   if (bytes_written <= 0) {
+    writable_ = false;
     return WriteResult(WRITE_STATUS_BLOCKED, EWOULDBLOCK);
   }
   return WriteResult(WRITE_STATUS_OK, bytes_written);
@@ -30,8 +31,7 @@
 }
 
 bool QuartcPacketWriter::IsWriteBlocked() const {
-  DCHECK(packet_transport_);
-  return !packet_transport_->CanWrite();
+  return !writable_;
 }
 
 QuicByteCount QuartcPacketWriter::GetMaxPacketSize(
@@ -39,6 +39,8 @@
   return max_packet_size_;
 }
 
-void QuartcPacketWriter::SetWritable() {}
+void QuartcPacketWriter::SetWritable() {
+  writable_ = true;
+}
 
 }  // namespace net
diff --git a/net/quic/quartc/quartc_packet_writer.h b/net/quic/quartc/quartc_packet_writer.h
index ab855eb..d50626c 100644
--- a/net/quic/quartc/quartc_packet_writer.h
+++ b/net/quic/quartc/quartc_packet_writer.h
@@ -32,8 +32,8 @@
   bool IsWriteBlockedDataBuffered() const override;
 
   // Whether the underneath |transport_| is blocked. If this returns true,
-  // outgoing QUIC packets are queued by QuicConnection until
-  // Transport::Observer::OnCanWrite() is called.
+  // outgoing QUIC packets are queued by QuicConnection until SetWritable() is
+  // called.
   bool IsWriteBlocked() const override;
 
   // Maximum size of the QUIC packet which can be written. Users such as WebRTC
@@ -42,8 +42,7 @@
   QuicByteCount GetMaxPacketSize(
       const QuicSocketAddress& peer_address) const override;
 
-  // This method is not used because the network layer in WebRTC will determine
-  // the writing states.
+  // Sets the packet writer to a writable (non-blocked) state.
   void SetWritable() override;
 
  private:
@@ -51,6 +50,9 @@
   QuartcSessionInterface::PacketTransport* packet_transport_;
   // The maximum size of the packet can be written by this writer.
   QuicByteCount max_packet_size_;
+
+  // Whether packets can be written.
+  bool writable_ = false;
 };
 
 }  // namespace net
diff --git a/net/quic/quartc/quartc_session.cc b/net/quic/quartc/quartc_session.cc
index a4c74d2..68b0e0a 100644
--- a/net/quic/quartc/quartc_session.cc
+++ b/net/quic/quartc/quartc_session.cc
@@ -4,6 +4,8 @@
 
 #include "net/quic/quartc/quartc_session.h"
 
+#include "net/quic/core/tls_client_handshaker.h"
+#include "net/quic/core/tls_server_handshaker.h"
 #include "net/quic/platform/api/quic_ptr_util.h"
 
 using std::string;
@@ -128,8 +130,8 @@
   // Initialization with default crypto configuration.
   if (perspective_ == Perspective::IS_CLIENT) {
     std::unique_ptr<ProofVerifier> proof_verifier(new InsecureProofVerifier);
-    quic_crypto_client_config_.reset(
-        new QuicCryptoClientConfig(std::move(proof_verifier)));
+    quic_crypto_client_config_.reset(new QuicCryptoClientConfig(
+        std::move(proof_verifier), TlsClientHandshaker::CreateSslCtx()));
   } else {
     std::unique_ptr<ProofSource> proof_source(new DummyProofSource);
     // Generate a random source address token secret. For long-running servers
@@ -140,7 +142,8 @@
                                              kInputKeyingMaterialLength);
     quic_crypto_server_config_.reset(new QuicCryptoServerConfig(
         string(source_address_token_secret, kInputKeyingMaterialLength),
-        helper_->GetRandomGenerator(), std::move(proof_source)));
+        helper_->GetRandomGenerator(), std::move(proof_source),
+        TlsServerHandshaker::CreateSslCtx()));
     // Provide server with serialized config string to prove ownership.
     QuicCryptoServerConfig::ConfigOptions options;
     // The |message| is used to handle the return value of AddDefaultConfig
@@ -282,6 +285,7 @@
 }
 
 void QuartcSession::OnTransportCanWrite() {
+  connection()->writer()->SetWritable();
   if (HasDataToWrite()) {
     connection()->OnCanWrite();
   }
diff --git a/net/quic/quartc/quartc_session_interface.h b/net/quic/quartc/quartc_session_interface.h
index 536079a..5923383 100644
--- a/net/quic/quartc/quartc_session_interface.h
+++ b/net/quic/quartc/quartc_session_interface.h
@@ -95,11 +95,6 @@
    public:
     virtual ~PacketTransport() {}
 
-    // Called by the QuartcPacketWriter to check if the underneath transport is
-    // writable. True if packets written are expected to be sent.  False if
-    // packets will be dropped.
-    virtual bool CanWrite() = 0;
-
     // Called by the QuartcPacketWriter when writing packets to the network.
     // Return the number of written bytes. Return 0 if the write is blocked.
     virtual int Write(const char* buffer, size_t buf_len) = 0;
diff --git a/net/quic/quartc/quartc_session_test.cc b/net/quic/quartc/quartc_session_test.cc
index 118e247..549c8ec 100644
--- a/net/quic/quartc/quartc_session_test.cc
+++ b/net/quic/quartc/quartc_session_test.cc
@@ -7,6 +7,8 @@
 #include "net/quic/core/crypto/crypto_server_config_protobuf.h"
 #include "net/quic/core/quic_simple_buffer_allocator.h"
 #include "net/quic/core/quic_types.h"
+#include "net/quic/core/tls_client_handshaker.h"
+#include "net/quic/core/tls_server_handshaker.h"
 #include "net/quic/quartc/quartc_factory.h"
 #include "net/quic/quartc/quartc_factory_interface.h"
 #include "net/quic/quartc/quartc_packet_writer.h"
@@ -300,8 +302,6 @@
  public:
   explicit FakeTransport(FakeTransportChannel* channel) : channel_(channel) {}
 
-  bool CanWrite() override { return true; }
-
   int Write(const char* buffer, size_t buf_len) override {
     DCHECK(channel_);
     return channel_->SendPacket(buffer, buf_len);
@@ -422,6 +422,9 @@
         new QuartcPacketWriter(client_transport_.get(), kDefaultMaxPacketSize));
     server_writer_.reset(
         new QuartcPacketWriter(server_transport_.get(), kDefaultMaxPacketSize));
+
+    client_writer_->SetWritable();
+    server_writer_->SetWritable();
   }
 
   // The parameters are used to control whether the handshake will success or
@@ -435,14 +438,16 @@
     client_channel_->SetObserver(client_peer_.get());
     server_channel_->SetObserver(server_peer_.get());
 
-    client_peer_->SetClientCryptoConfig(
-        new QuicCryptoClientConfig(std::unique_ptr<ProofVerifier>(
-            new FakeProofVerifier(client_handshake_success))));
+    client_peer_->SetClientCryptoConfig(new QuicCryptoClientConfig(
+        std::unique_ptr<ProofVerifier>(
+            new FakeProofVerifier(client_handshake_success)),
+        TlsClientHandshaker::CreateSslCtx()));
 
     QuicCryptoServerConfig* server_config = new QuicCryptoServerConfig(
         "TESTING", QuicRandom::GetInstance(),
         std::unique_ptr<FakeProofSource>(
-            new FakeProofSource(server_handshake_success)));
+            new FakeProofSource(server_handshake_success)),
+        TlsServerHandshaker::CreateSslCtx());
     // Provide server with serialized config string to prove ownership.
     QuicCryptoServerConfig::ConfigOptions options;
     std::unique_ptr<QuicServerConfigProtobuf> primary_config(
diff --git a/net/quic/test_tools/crypto_test_utils.cc b/net/quic/test_tools/crypto_test_utils.cc
index 2115559a..7f43881c 100644
--- a/net/quic/test_tools/crypto_test_utils.cc
+++ b/net/quic/test_tools/crypto_test_utils.cc
@@ -20,6 +20,8 @@
 #include "net/quic/core/quic_crypto_stream.h"
 #include "net/quic/core/quic_server_id.h"
 #include "net/quic/core/quic_utils.h"
+#include "net/quic/core/tls_client_handshaker.h"
+#include "net/quic/core/tls_server_handshaker.h"
 #include "net/quic/platform/api/quic_bug_tracker.h"
 #include "net/quic/platform/api/quic_clock.h"
 #include "net/quic/platform/api/quic_logging.h"
@@ -390,9 +392,9 @@
       new PacketSavingConnection(helper, alarm_factory, Perspective::IS_SERVER,
                                  client_conn->supported_versions());
 
-  QuicCryptoServerConfig crypto_config(QuicCryptoServerConfig::TESTING,
-                                       QuicRandom::GetInstance(),
-                                       ProofSourceForTesting());
+  QuicCryptoServerConfig crypto_config(
+      QuicCryptoServerConfig::TESTING, QuicRandom::GetInstance(),
+      ProofSourceForTesting(), TlsServerHandshaker::CreateSslCtx());
   QuicCompressedCertsCache compressed_certs_cache(
       QuicCompressedCertsCache::kQuicCompressedCertsCacheSize);
   SetupCryptoServerConfigForTest(server_conn->clock(),
@@ -427,12 +429,22 @@
                             QuicCryptoServerStream* server,
                             const QuicServerId& server_id,
                             const FakeClientOptions& options) {
-  PacketSavingConnection* client_conn =
-      new PacketSavingConnection(helper, alarm_factory, Perspective::IS_CLIENT);
+  ParsedQuicVersionVector supported_versions = AllSupportedVersions();
+  if (options.only_tls_versions) {
+    supported_versions.clear();
+    for (QuicTransportVersion transport_version :
+         AllSupportedTransportVersions()) {
+      supported_versions.push_back(
+          ParsedQuicVersion(PROTOCOL_TLS1_3, transport_version));
+    }
+  }
+  PacketSavingConnection* client_conn = new PacketSavingConnection(
+      helper, alarm_factory, Perspective::IS_CLIENT, supported_versions);
   // Advance the time, because timers do not like uninitialized times.
   client_conn->AdvanceTime(QuicTime::Delta::FromSeconds(1));
 
-  QuicCryptoClientConfig crypto_config(ProofVerifierForTesting());
+  QuicCryptoClientConfig crypto_config(ProofVerifierForTesting(),
+                                       TlsClientHandshaker::CreateSslCtx());
   AsyncTestChannelIDSource* async_channel_id_source = nullptr;
   if (options.channel_id_enabled) {
     ChannelIDSource* source = ChannelIDSourceForTesting();
@@ -515,7 +527,7 @@
     QuicCryptoStream* server,
     CallbackSource* callback_source) {
   size_t client_i = 0, server_i = 0;
-  while (!client->handshake_confirmed()) {
+  while (!client->handshake_confirmed() || !server->handshake_confirmed()) {
     ASSERT_GT(client_conn->encrypted_packets_.size(), client_i);
     QUIC_LOG(INFO) << "Processing "
                    << client_conn->encrypted_packets_.size() - client_i
@@ -897,11 +909,37 @@
   return new TestChannelIDSource();
 }
 
+void MovePacketsForTlsHandshake(PacketSavingConnection* source_conn,
+                                size_t* inout_packet_index,
+                                QuicCryptoStream* dest_stream,
+                                PacketSavingConnection* dest_conn,
+                                Perspective dest_perspective) {
+  SimpleQuicFramer framer(source_conn->supported_versions(), dest_perspective);
+  size_t index = *inout_packet_index;
+  for (; index < source_conn->encrypted_packets_.size(); index++) {
+    if (!framer.ProcessPacket(*source_conn->encrypted_packets_[index])) {
+      // The framer will be unable to decrypt forward-secure packets sent after
+      // the handshake is complete. Don't treat them as handshake packets.
+      break;
+    }
+
+    for (const auto& stream_frame : framer.stream_frames()) {
+      dest_conn->OnStreamFrame(*stream_frame);
+    }
+  }
+  *inout_packet_index = index;
+}
+
 void MovePackets(PacketSavingConnection* source_conn,
                  size_t* inout_packet_index,
                  QuicCryptoStream* dest_stream,
                  PacketSavingConnection* dest_conn,
                  Perspective dest_perspective) {
+  if (dest_stream->handshake_protocol() == PROTOCOL_TLS1_3) {
+    MovePacketsForTlsHandshake(source_conn, inout_packet_index, dest_stream,
+                               dest_conn, dest_perspective);
+    return;
+  }
   SimpleQuicFramer framer(source_conn->supported_versions(), dest_perspective);
   CryptoFramer crypto_framer;
   CryptoFramerVisitor crypto_visitor;
diff --git a/net/quic/test_tools/crypto_test_utils.h b/net/quic/test_tools/crypto_test_utils.h
index 38dc33e..b3baa5c 100644
--- a/net/quic/test_tools/crypto_test_utils.h
+++ b/net/quic/test_tools/crypto_test_utils.h
@@ -112,6 +112,10 @@
 
   // The Token Binding params that the client supports and will negotiate.
   QuicTagVector token_binding_params;
+
+  // If only_tls_versions is set, then the client will only use TLS for the
+  // crypto handshake.
+  bool only_tls_versions = false;
 };
 
 // returns: the number of client hellos that the client sent.
diff --git a/net/quic/test_tools/crypto_test_utils_test.cc b/net/quic/test_tools/crypto_test_utils_test.cc
index b3fcf55..053c468 100644
--- a/net/quic/test_tools/crypto_test_utils_test.cc
+++ b/net/quic/test_tools/crypto_test_utils_test.cc
@@ -6,6 +6,7 @@
 
 #include "net/quic/core/crypto/crypto_server_config_protobuf.h"
 #include "net/quic/core/quic_utils.h"
+#include "net/quic/core/tls_server_handshaker.h"
 #include "net/quic/platform/api/quic_test.h"
 #include "net/quic/platform/api/quic_text_utils.h"
 #include "net/quic/test_tools/mock_clock.h"
@@ -115,7 +116,8 @@
   MockClock clock;
   QuicCryptoServerConfig crypto_config(
       QuicCryptoServerConfig::TESTING, QuicRandom::GetInstance(),
-      crypto_test_utils::ProofSourceForTesting());
+      crypto_test_utils::ProofSourceForTesting(),
+      TlsServerHandshaker::CreateSslCtx());
   QuicSocketAddress server_addr;
   QuicSocketAddress client_addr(QuicIpAddress::Loopback4(), 1);
   QuicReferenceCountedPointer<QuicSignedServerConfig> signed_config(
diff --git a/net/quic/test_tools/quic_stream_sequencer_buffer_peer.cc b/net/quic/test_tools/quic_stream_sequencer_buffer_peer.cc
index da5754a6..c7aa8e9 100644
--- a/net/quic/test_tools/quic_stream_sequencer_buffer_peer.cc
+++ b/net/quic/test_tools/quic_stream_sequencer_buffer_peer.cc
@@ -64,16 +64,16 @@
 
 bool QuicStreamSequencerBufferPeer::CheckBufferInvariants() {
   QuicStreamOffset data_span =
-      buffer_->gaps_.back().begin_offset - buffer_->total_bytes_read_;
+      buffer_->NextExpectedByte() - buffer_->total_bytes_read_;
   bool capacity_sane = data_span <= buffer_->max_buffer_capacity_bytes_ &&
                        data_span >= buffer_->num_bytes_buffered_;
   if (!capacity_sane) {
     QUIC_LOG(ERROR) << "data span is larger than capacity.";
     QUIC_LOG(ERROR) << "total read: " << buffer_->total_bytes_read_
-                    << " last byte: " << buffer_->gaps_.back().begin_offset;
+                    << " last byte: " << buffer_->NextExpectedByte();
   }
   bool total_read_sane =
-      buffer_->gaps_.front().begin_offset >= buffer_->total_bytes_read_;
+      buffer_->FirstMissingByte() >= buffer_->total_bytes_read_;
   if (!total_read_sane) {
     QUIC_LOG(ERROR) << "read across 1st gap.";
   }
@@ -106,7 +106,24 @@
 }
 
 int QuicStreamSequencerBufferPeer::GapSize() {
-  return buffer_->gaps_.size();
+  if (!buffer_->allow_overlapping_data_) {
+    return buffer_->gaps_.size();
+  }
+  if (buffer_->bytes_received_.Empty()) {
+    return 1;
+  }
+  int gap_size = buffer_->bytes_received_.Size() + 1;
+  if (buffer_->bytes_received_.Empty()) {
+    return gap_size;
+  }
+  if (buffer_->bytes_received_.begin()->min() == 0) {
+    --gap_size;
+  }
+  if (buffer_->bytes_received_.rbegin()->max() ==
+      std::numeric_limits<uint64_t>::max()) {
+    --gap_size;
+  }
+  return gap_size;
 }
 
 std::list<Gap> QuicStreamSequencerBufferPeer::GetGaps() {
@@ -135,6 +152,11 @@
   buffer_->gaps_ = gaps;
 }
 
+void QuicStreamSequencerBufferPeer::AddBytesReceived(QuicStreamOffset offset,
+                                                     QuicByteCount length) {
+  buffer_->bytes_received_.Add(offset, offset + length);
+}
+
 bool QuicStreamSequencerBufferPeer::IsBufferAllocated() {
   return buffer_->blocks_ != nullptr;
 }
@@ -142,5 +164,15 @@
 size_t QuicStreamSequencerBufferPeer::block_count() {
   return buffer_->blocks_count_;
 }
+
+const QuicIntervalSet<QuicStreamOffset>&
+QuicStreamSequencerBufferPeer::bytes_received() {
+  return buffer_->bytes_received_;
+}
+
+bool QuicStreamSequencerBufferPeer::allow_overlapping_data() {
+  return buffer_->allow_overlapping_data_;
+}
+
 }  // namespace test
 }  // namespace net
diff --git a/net/quic/test_tools/quic_stream_sequencer_buffer_peer.h b/net/quic/test_tools/quic_stream_sequencer_buffer_peer.h
index 1255d3a7..655e78b 100644
--- a/net/quic/test_tools/quic_stream_sequencer_buffer_peer.h
+++ b/net/quic/test_tools/quic_stream_sequencer_buffer_peer.h
@@ -34,6 +34,8 @@
 
   QuicStreamSequencerBuffer::BufferBlock* GetBlock(size_t index);
 
+  // TODO(fayang): Rename this to IntervalSize when deprecating
+  // quic_reloadable_flag_quic_allow_receiving_overlapping_data.
   int GapSize();
 
   std::list<QuicStreamSequencerBuffer::Gap> GetGaps();
@@ -49,10 +51,16 @@
 
   void set_gaps(const std::list<QuicStreamSequencerBuffer::Gap>& gaps);
 
+  void AddBytesReceived(QuicStreamOffset offset, QuicByteCount length);
+
   bool IsBufferAllocated();
 
   size_t block_count();
 
+  const QuicIntervalSet<QuicStreamOffset>& bytes_received();
+
+  bool allow_overlapping_data();
+
  private:
   QuicStreamSequencerBuffer* buffer_;
   DISALLOW_COPY_AND_ASSIGN(QuicStreamSequencerBufferPeer);
diff --git a/net/quic/test_tools/quic_test_utils.cc b/net/quic/test_tools/quic_test_utils.cc
index 1859654..b207756 100644
--- a/net/quic/test_tools/quic_test_utils.cc
+++ b/net/quic/test_tools/quic_test_utils.cc
@@ -46,7 +46,7 @@
     end_of_previous_block = block.limit;
   }
 
-  ack.deprecated_largest_observed = ack.packets.Max();
+  ack.largest_acked = ack.packets.Max();
 
   return ack;
 }
@@ -58,7 +58,7 @@
 QuicAckFrame MakeAckFrameWithAckBlocks(size_t num_ack_blocks,
                                        QuicPacketNumber least_unacked) {
   QuicAckFrame ack;
-  ack.deprecated_largest_observed = 2 * num_ack_blocks + least_unacked;
+  ack.largest_acked = 2 * num_ack_blocks + least_unacked;
   // Add enough received packets to get num_ack_blocks ack blocks.
   for (QuicPacketNumber i = 2; i < 2 * num_ack_blocks + 1; i += 2) {
     ack.packets.Add(least_unacked + i);
@@ -845,6 +845,9 @@
 MockPacketCreatorDelegate::MockPacketCreatorDelegate() {}
 MockPacketCreatorDelegate::~MockPacketCreatorDelegate() {}
 
+MockSessionNotifier::MockSessionNotifier() {}
+MockSessionNotifier::~MockSessionNotifier() {}
+
 void CreateClientSessionForTest(
     QuicServerId server_id,
     bool supports_stateless_rejects,
diff --git a/net/quic/test_tools/quic_test_utils.h b/net/quic/test_tools/quic_test_utils.h
index aadb9d3..2095527 100644
--- a/net/quic/test_tools/quic_test_utils.h
+++ b/net/quic/test_tools/quic_test_utils.h
@@ -936,6 +936,16 @@
   DISALLOW_COPY_AND_ASSIGN(MockPacketCreatorDelegate);
 };
 
+class MockSessionNotifier : public SessionNotifierInterface {
+ public:
+  MockSessionNotifier();
+  ~MockSessionNotifier() override;
+
+  MOCK_METHOD2(OnFrameAcked, void(const QuicFrame&, QuicTime::Delta));
+  MOCK_METHOD1(OnStreamFrameRetransmitted, void(const QuicStreamFrame&));
+  MOCK_METHOD1(OnFrameLost, void(const QuicFrame&));
+};
+
 // Creates a client session for testing.
 //
 // server_id: The server id associated with this stream.
diff --git a/net/quic/test_tools/simple_data_producer.cc b/net/quic/test_tools/simple_data_producer.cc
index 5b1d024..c5988a7 100644
--- a/net/quic/test_tools/simple_data_producer.cc
+++ b/net/quic/test_tools/simple_data_producer.cc
@@ -38,19 +38,16 @@
   return send_buffer_map_[id]->WriteStreamData(offset, data_length, writer);
 }
 
-void SimpleDataProducer::OnStreamFrameAcked(
-    const QuicStreamFrame& frame,
-    QuicTime::Delta /*ack_delay_time*/) {
-  OnStreamFrameDiscarded(frame);
-}
-
-void SimpleDataProducer::OnStreamFrameDiscarded(const QuicStreamFrame& frame) {
-  if (!QuicContainsKey(send_buffer_map_, frame.stream_id)) {
+void SimpleDataProducer::OnFrameAcked(const QuicFrame& frame,
+                                      QuicTime::Delta /*ack_delay_time*/) {
+  if (frame.type != STREAM_FRAME ||
+      !QuicContainsKey(send_buffer_map_, frame.stream_frame->stream_id)) {
     return;
   }
   QuicByteCount newly_acked_length = 0;
-  send_buffer_map_[frame.stream_id]->OnStreamDataAcked(
-      frame.offset, frame.data_length, &newly_acked_length);
+  send_buffer_map_[frame.stream_frame->stream_id]->OnStreamDataAcked(
+      frame.stream_frame->offset, frame.stream_frame->data_length,
+      &newly_acked_length);
 }
 
 }  // namespace test
diff --git a/net/quic/test_tools/simple_data_producer.h b/net/quic/test_tools/simple_data_producer.h
index 22b6d0b5..6300d28 100644
--- a/net/quic/test_tools/simple_data_producer.h
+++ b/net/quic/test_tools/simple_data_producer.h
@@ -8,7 +8,7 @@
 #include "net/quic/core/quic_simple_buffer_allocator.h"
 #include "net/quic/core/quic_stream_frame_data_producer.h"
 #include "net/quic/core/quic_stream_send_buffer.h"
-#include "net/quic/core/stream_notifier_interface.h"
+#include "net/quic/core/session_notifier_interface.h"
 #include "net/quic/platform/api/quic_containers.h"
 
 namespace net {
@@ -18,7 +18,7 @@
 // A simple data producer which copies stream data into a map from stream
 // id to send buffer.
 class SimpleDataProducer : public QuicStreamFrameDataProducer,
-                           public StreamNotifierInterface {
+                           public SessionNotifierInterface {
  public:
   SimpleDataProducer();
   ~SimpleDataProducer() override;
@@ -36,11 +36,11 @@
                        QuicByteCount data_length,
                        QuicDataWriter* writer) override;
 
-  // StreamNotifierInterface methods:
-  void OnStreamFrameAcked(const QuicStreamFrame& frame,
-                          QuicTime::Delta ack_delay_time) override;
+  // SessionNotifierInterface methods:
+  void OnFrameAcked(const QuicFrame& frame,
+                    QuicTime::Delta ack_delay_time) override;
   void OnStreamFrameRetransmitted(const QuicStreamFrame& frame) override {}
-  void OnStreamFrameDiscarded(const QuicStreamFrame& frame) override;
+  void OnFrameLost(const QuicFrame& frame) override {}
 
  private:
   using SendBufferMap =
diff --git a/net/tools/quic/end_to_end_test.cc b/net/tools/quic/end_to_end_test.cc
index f03048de..053e63f6 100644
--- a/net/tools/quic/end_to_end_test.cc
+++ b/net/tools/quic/end_to_end_test.cc
@@ -56,6 +56,7 @@
 #include "net/tools/quic/quic_server.h"
 #include "net/tools/quic/quic_simple_server_stream.h"
 #include "net/tools/quic/quic_spdy_client_stream.h"
+#include "net/tools/quic/test_tools/bad_packet_writer.h"
 #include "net/tools/quic/test_tools/packet_dropping_test_writer.h"
 #include "net/tools/quic/test_tools/packet_reordering_writer.h"
 #include "net/tools/quic/test_tools/quic_client_peer.h"
@@ -2961,6 +2962,25 @@
   client_->Disconnect();
 }
 
+// Regression test of b/70782529.
+TEST_P(EndToEndTest, DoNotCrashOnPacketWriteError) {
+  ASSERT_TRUE(Initialize());
+  BadPacketWriter* bad_writer =
+      new BadPacketWriter(/*packet_causing_write_error=*/5,
+                          /*error_code=*/90);
+  std::unique_ptr<QuicTestClient> client(CreateQuicClient(bad_writer));
+
+  // 1 MB body.
+  string body(1024 * 1024, 'a');
+  SpdyHeaderBlock headers;
+  headers[":method"] = "POST";
+  headers[":path"] = "/foo";
+  headers[":scheme"] = "https";
+  headers[":authority"] = server_hostname_;
+
+  client->SendCustomSynchronousRequest(headers, body);
+}
+
 class EndToEndBufferedPacketsTest : public EndToEndTest {
  public:
   void CreateClientWithWriter() override {
diff --git a/net/tools/quic/quic_client_base.cc b/net/tools/quic/quic_client_base.cc
index 3ac9be0..310a5c01b 100644
--- a/net/tools/quic/quic_client_base.cc
+++ b/net/tools/quic/quic_client_base.cc
@@ -7,6 +7,7 @@
 #include "net/quic/core/crypto/quic_random.h"
 #include "net/quic/core/quic_server_id.h"
 #include "net/quic/core/spdy_utils.h"
+#include "net/quic/core/tls_client_handshaker.h"
 #include "net/quic/platform/api/quic_flags.h"
 #include "net/quic/platform/api/quic_logging.h"
 #include "net/quic/platform/api/quic_text_utils.h"
@@ -30,7 +31,8 @@
       initialized_(false),
       local_port_(0),
       config_(config),
-      crypto_config_(std::move(proof_verifier)),
+      crypto_config_(std::move(proof_verifier),
+                     TlsClientHandshaker::CreateSslCtx()),
       helper_(helper),
       alarm_factory_(alarm_factory),
       supported_versions_(supported_versions),
diff --git a/net/tools/quic/quic_dispatcher_test.cc b/net/tools/quic/quic_dispatcher_test.cc
index 5601a84..ae7b377 100644
--- a/net/tools/quic/quic_dispatcher_test.cc
+++ b/net/tools/quic/quic_dispatcher_test.cc
@@ -15,6 +15,7 @@
 #include "net/quic/core/crypto/quic_random.h"
 #include "net/quic/core/quic_crypto_stream.h"
 #include "net/quic/core/quic_utils.h"
+#include "net/quic/core/tls_server_handshaker.h"
 #include "net/quic/platform/api/quic_flags.h"
 #include "net/quic/platform/api/quic_logging.h"
 #include "net/quic/platform/api/quic_str_cat.h"
@@ -179,7 +180,8 @@
         version_manager_(AllSupportedVersions()),
         crypto_config_(QuicCryptoServerConfig::TESTING,
                        QuicRandom::GetInstance(),
-                       std::move(proof_source)),
+                       std::move(proof_source),
+                       TlsServerHandshaker::CreateSslCtx()),
         dispatcher_(new TestDispatcher(config_,
                                        &crypto_config_,
                                        &version_manager_,
diff --git a/net/tools/quic/quic_server.cc b/net/tools/quic/quic_server.cc
index 49291a5..42fb23737 100644
--- a/net/tools/quic/quic_server.cc
+++ b/net/tools/quic/quic_server.cc
@@ -18,6 +18,7 @@
 #include "net/quic/core/quic_crypto_stream.h"
 #include "net/quic/core/quic_data_reader.h"
 #include "net/quic/core/quic_packets.h"
+#include "net/quic/core/tls_server_handshaker.h"
 #include "net/quic/platform/api/quic_clock.h"
 #include "net/quic/platform/api/quic_flags.h"
 #include "net/quic/platform/api/quic_logging.h"
@@ -73,7 +74,8 @@
       config_(config),
       crypto_config_(kSourceAddressTokenSecret,
                      QuicRandom::GetInstance(),
-                     std::move(proof_source)),
+                     std::move(proof_source),
+                     TlsServerHandshaker::CreateSslCtx()),
       crypto_config_options_(crypto_config_options),
       version_manager_(supported_versions),
       packet_reader_(new QuicPacketReader()),
diff --git a/net/tools/quic/quic_server_test.cc b/net/tools/quic/quic_server_test.cc
index 8f10b5f..df80fa7 100644
--- a/net/tools/quic/quic_server_test.cc
+++ b/net/tools/quic/quic_server_test.cc
@@ -6,6 +6,7 @@
 
 #include "net/quic/core/crypto/quic_random.h"
 #include "net/quic/core/quic_utils.h"
+#include "net/quic/core/tls_server_handshaker.h"
 #include "net/quic/platform/api/quic_arraysize.h"
 #include "net/quic/platform/api/quic_flags.h"
 #include "net/quic/platform/api/quic_logging.h"
@@ -149,7 +150,8 @@
   QuicServerDispatchPacketTest()
       : crypto_config_("blah",
                        QuicRandom::GetInstance(),
-                       crypto_test_utils::ProofSourceForTesting()),
+                       crypto_test_utils::ProofSourceForTesting(),
+                       TlsServerHandshaker::CreateSslCtx()),
         version_manager_(AllSupportedVersions()),
         dispatcher_(
             config_,
diff --git a/net/tools/quic/quic_simple_server.cc b/net/tools/quic/quic_simple_server.cc
index b8d6687..6526e6c 100644
--- a/net/tools/quic/quic_simple_server.cc
+++ b/net/tools/quic/quic_simple_server.cc
@@ -17,6 +17,7 @@
 #include "net/quic/core/quic_crypto_stream.h"
 #include "net/quic/core/quic_data_reader.h"
 #include "net/quic/core/quic_packets.h"
+#include "net/quic/core/tls_server_handshaker.h"
 #include "net/socket/udp_server_socket.h"
 #include "net/tools/quic/quic_simple_dispatcher.h"
 #include "net/tools/quic/quic_simple_per_connection_packet_writer.h"
@@ -52,7 +53,8 @@
       crypto_config_options_(crypto_config_options),
       crypto_config_(kSourceAddressTokenSecret,
                      QuicRandom::GetInstance(),
-                     std::move(proof_source)),
+                     std::move(proof_source),
+                     TlsServerHandshaker::CreateSslCtx()),
       read_pending_(false),
       synchronous_read_count_(0),
       read_buffer_(new IOBufferWithSize(kReadBufferSize)),
diff --git a/net/tools/quic/quic_simple_server_session_test.cc b/net/tools/quic/quic_simple_server_session_test.cc
index 60c2bfcf..d1189a52 100644
--- a/net/tools/quic/quic_simple_server_session_test.cc
+++ b/net/tools/quic/quic_simple_server_session_test.cc
@@ -14,6 +14,7 @@
 #include "net/quic/core/quic_connection.h"
 #include "net/quic/core/quic_crypto_server_stream.h"
 #include "net/quic/core/quic_utils.h"
+#include "net/quic/core/tls_server_handshaker.h"
 #include "net/quic/platform/api/quic_containers.h"
 #include "net/quic/platform/api/quic_flags.h"
 #include "net/quic/platform/api/quic_socket_address.h"
@@ -176,7 +177,8 @@
   QuicSimpleServerSessionTest()
       : crypto_config_(QuicCryptoServerConfig::TESTING,
                        QuicRandom::GetInstance(),
-                       crypto_test_utils::ProofSourceForTesting()),
+                       crypto_test_utils::ProofSourceForTesting(),
+                       TlsServerHandshaker::CreateSslCtx()),
         compressed_certs_cache_(
             QuicCompressedCertsCache::kQuicCompressedCertsCacheSize) {
     config_.SetMaxStreamsPerConnection(kMaxStreamsForTest, kMaxStreamsForTest);
diff --git a/net/tools/quic/quic_simple_server_stream_test.cc b/net/tools/quic/quic_simple_server_stream_test.cc
index 56810cd1..deb696c 100644
--- a/net/tools/quic/quic_simple_server_stream_test.cc
+++ b/net/tools/quic/quic_simple_server_stream_test.cc
@@ -10,6 +10,7 @@
 
 #include "net/quic/core/quic_utils.h"
 #include "net/quic/core/spdy_utils.h"
+#include "net/quic/core/tls_server_handshaker.h"
 #include "net/quic/platform/api/quic_arraysize.h"
 #include "net/quic/platform/api/quic_ptr_util.h"
 #include "net/quic/platform/api/quic_socket_address.h"
@@ -176,7 +177,8 @@
         crypto_config_(new QuicCryptoServerConfig(
             QuicCryptoServerConfig::TESTING,
             QuicRandom::GetInstance(),
-            crypto_test_utils::ProofSourceForTesting())),
+            crypto_test_utils::ProofSourceForTesting(),
+            TlsServerHandshaker::CreateSslCtx())),
         compressed_certs_cache_(
             QuicCompressedCertsCache::kQuicCompressedCertsCacheSize),
         session_(connection_,
diff --git a/net/tools/quic/quic_simple_server_test.cc b/net/tools/quic/quic_simple_server_test.cc
index 72e82828..66bbd33 100644
--- a/net/tools/quic/quic_simple_server_test.cc
+++ b/net/tools/quic/quic_simple_server_test.cc
@@ -7,6 +7,7 @@
 #include "net/quic/core/crypto/quic_random.h"
 #include "net/quic/core/quic_crypto_stream.h"
 #include "net/quic/core/quic_utils.h"
+#include "net/quic/core/tls_server_handshaker.h"
 #include "net/quic/platform/api/quic_test.h"
 #include "net/quic/test_tools/crypto_test_utils.h"
 #include "net/quic/test_tools/mock_quic_dispatcher.h"
@@ -25,7 +26,8 @@
   QuicChromeServerDispatchPacketTest()
       : crypto_config_("blah",
                        QuicRandom::GetInstance(),
-                       crypto_test_utils::ProofSourceForTesting()),
+                       crypto_test_utils::ProofSourceForTesting(),
+                       TlsServerHandshaker::CreateSslCtx()),
         version_manager_(AllSupportedVersions()),
         dispatcher_(
             config_,
diff --git a/net/tools/quic/quic_spdy_client_session_test.cc b/net/tools/quic/quic_spdy_client_session_test.cc
index 7ccd7a1..a41ebe1 100644
--- a/net/tools/quic/quic_spdy_client_session_test.cc
+++ b/net/tools/quic/quic_spdy_client_session_test.cc
@@ -8,6 +8,7 @@
 
 #include "net/quic/core/crypto/aes_128_gcm_12_encrypter.h"
 #include "net/quic/core/spdy_utils.h"
+#include "net/quic/core/tls_client_handshaker.h"
 #include "net/quic/platform/api/quic_flags.h"
 #include "net/quic/platform/api/quic_ptr_util.h"
 #include "net/quic/platform/api/quic_socket_address.h"
@@ -66,7 +67,8 @@
 class QuicSpdyClientSessionTest : public QuicTestWithParam<ParsedQuicVersion> {
  protected:
   QuicSpdyClientSessionTest()
-      : crypto_config_(crypto_test_utils::ProofVerifierForTesting()),
+      : crypto_config_(crypto_test_utils::ProofVerifierForTesting(),
+                       TlsClientHandshaker::CreateSslCtx()),
         promised_stream_id_(kInvalidStreamId),
         associated_stream_id_(kInvalidStreamId) {
     Initialize();
diff --git a/net/tools/quic/quic_spdy_client_stream_test.cc b/net/tools/quic/quic_spdy_client_stream_test.cc
index 361f87e..c8d035e 100644
--- a/net/tools/quic/quic_spdy_client_stream_test.cc
+++ b/net/tools/quic/quic_spdy_client_stream_test.cc
@@ -9,6 +9,7 @@
 #include "base/macros.h"
 #include "net/quic/core/quic_utils.h"
 #include "net/quic/core/spdy_utils.h"
+#include "net/quic/core/tls_client_handshaker.h"
 #include "net/quic/platform/api/quic_logging.h"
 #include "net/quic/platform/api/quic_socket_address.h"
 #include "net/quic/platform/api/quic_test.h"
@@ -38,7 +39,8 @@
             QuicServerId("example.com", 443, PRIVACY_MODE_DISABLED),
             &crypto_config_,
             push_promise_index),
-        crypto_config_(crypto_test_utils::ProofVerifierForTesting()) {}
+        crypto_config_(crypto_test_utils::ProofVerifierForTesting(),
+                       TlsClientHandshaker::CreateSslCtx()) {}
   ~MockQuicSpdyClientSession() override = default;
 
   MOCK_METHOD1(CloseStream, void(QuicStreamId stream_id));
diff --git a/net/tools/quic/stateless_rejector_test.cc b/net/tools/quic/stateless_rejector_test.cc
index 03a7c0f4..c1e1739 100644
--- a/net/tools/quic/stateless_rejector_test.cc
+++ b/net/tools/quic/stateless_rejector_test.cc
@@ -10,6 +10,7 @@
 #include "net/quic/core/crypto/crypto_handshake_message.h"
 #include "net/quic/core/crypto/proof_source.h"
 #include "net/quic/core/quic_utils.h"
+#include "net/quic/core/tls_server_handshaker.h"
 #include "net/quic/platform/api/quic_flags.h"
 #include "net/quic/platform/api/quic_logging.h"
 #include "net/quic/platform/api/quic_ptr_util.h"
@@ -80,7 +81,8 @@
       : proof_source_(crypto_test_utils::ProofSourceForTesting()),
         config_(QuicCryptoServerConfig::TESTING,
                 QuicRandom::GetInstance(),
-                crypto_test_utils::ProofSourceForTesting()),
+                crypto_test_utils::ProofSourceForTesting(),
+                TlsServerHandshaker::CreateSslCtx()),
         config_peer_(&config_),
         compressed_certs_cache_(
             QuicCompressedCertsCache::kQuicCompressedCertsCacheSize),
diff --git a/net/tools/quic/test_tools/bad_packet_writer.cc b/net/tools/quic/test_tools/bad_packet_writer.cc
new file mode 100644
index 0000000..91d5fe5
--- /dev/null
+++ b/net/tools/quic/test_tools/bad_packet_writer.cc
@@ -0,0 +1,36 @@
+// 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.
+
+#include "net/tools/quic/test_tools/bad_packet_writer.h"
+
+namespace net {
+namespace test {
+
+BadPacketWriter::BadPacketWriter(size_t packet_causing_write_error,
+                                 int error_code)
+    : packet_causing_write_error_(packet_causing_write_error),
+      error_code_(error_code) {}
+
+BadPacketWriter::~BadPacketWriter() {}
+
+WriteResult BadPacketWriter::WritePacket(const char* buffer,
+                                         size_t buf_len,
+                                         const QuicIpAddress& self_address,
+                                         const QuicSocketAddress& peer_address,
+                                         PerPacketOptions* options) {
+  if (error_code_ == 0 || packet_causing_write_error_ > 0) {
+    if (packet_causing_write_error_ > 0) {
+      --packet_causing_write_error_;
+    }
+    return QuicPacketWriterWrapper::WritePacket(buffer, buf_len, self_address,
+                                                peer_address, options);
+  }
+  // It's time to cause write error.
+  int error_code = error_code_;
+  error_code_ = 0;
+  return WriteResult(WRITE_STATUS_ERROR, error_code);
+}
+
+}  // namespace test
+}  // namespace net
diff --git a/net/tools/quic/test_tools/bad_packet_writer.h b/net/tools/quic/test_tools/bad_packet_writer.h
new file mode 100644
index 0000000..e8d6d4e
--- /dev/null
+++ b/net/tools/quic/test_tools/bad_packet_writer.h
@@ -0,0 +1,36 @@
+// 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.
+
+#ifndef NET_TOOLS_QUIC_TEST_TOOLS_BAD_PACKET_WRITER_H_
+#define NET_TOOLS_QUIC_TEST_TOOLS_BAD_PACKET_WRITER_H_
+
+#include "net/tools/quic/quic_packet_writer_wrapper.h"
+
+namespace net {
+
+namespace test {
+// This packet writer allows causing packet write error with specified error
+// code when writing a particular packet.
+class BadPacketWriter : public QuicPacketWriterWrapper {
+ public:
+  BadPacketWriter(size_t packet_causing_write_error, int error_code);
+
+  ~BadPacketWriter() override;
+
+  WriteResult WritePacket(const char* buffer,
+                          size_t buf_len,
+                          const QuicIpAddress& self_address,
+                          const QuicSocketAddress& peer_address,
+                          PerPacketOptions* options) override;
+
+ private:
+  size_t packet_causing_write_error_;
+  int error_code_;
+};
+
+}  // namespace test
+
+}  // namespace net
+
+#endif  // NET_TOOLS_QUIC_TEST_TOOLS_BAD_PACKET_WRITER_H_
diff --git a/third_party/WebKit/Source/core/editing/SurroundingText.cpp b/third_party/WebKit/Source/core/editing/SurroundingText.cpp
index 5eefd01d..aca4921 100644
--- a/third_party/WebKit/Source/core/editing/SurroundingText.cpp
+++ b/third_party/WebKit/Source/core/editing/SurroundingText.cpp
@@ -105,23 +105,19 @@
 
   const TextIteratorBehavior behavior =
       TextIteratorBehavior::NoTrailingSpaceRangeLengthBehavior();
-  start_offset_in_content_ = TextIterator::RangeLength(
-      backwards_iterator.EndPosition(), start_position, behavior);
-  end_offset_in_content_ = TextIterator::RangeLength(
-      backwards_iterator.EndPosition(), end_position, behavior);
-  content_range_ = Range::Create(*document, backwards_iterator.EndPosition(),
-                                 forward_iterator.StartPosition());
-  DCHECK(content_range_);
+  const Position content_start = backwards_iterator.EndPosition();
+  const Position content_end = forward_iterator.StartPosition();
+  start_offset_in_content_ =
+      TextIterator::RangeLength(content_start, start_position, behavior);
+  end_offset_in_content_ =
+      TextIterator::RangeLength(content_start, end_position, behavior);
+  content_ = PlainText(
+      EphemeralRange(content_start, content_end),
+      TextIteratorBehavior::EmitsObjectReplacementCharacterBehavior());
 }
 
 String SurroundingText::Content() const {
-  if (content_range_) {
-    // SurroundingText is created with clean layout and must not be stored
-    // through DOM or style changes, so layout must still be clean here.
-    DCHECK(!content_range_->OwnerDocument().NeedsLayoutTreeUpdate());
-    return content_range_->GetText();
-  }
-  return String();
+  return content_;
 }
 
 unsigned SurroundingText::StartOffsetInContent() const {
diff --git a/third_party/WebKit/Source/core/editing/SurroundingText.h b/third_party/WebKit/Source/core/editing/SurroundingText.h
index 4640c30..3cf06913 100644
--- a/third_party/WebKit/Source/core/editing/SurroundingText.h
+++ b/third_party/WebKit/Source/core/editing/SurroundingText.h
@@ -34,13 +34,10 @@
 #include "base/macros.h"
 #include "core/CoreExport.h"
 #include "core/editing/Forward.h"
-#include "platform/heap/Handle.h"
 #include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
-class Range;
-
 class CORE_EXPORT SurroundingText {
   USING_FAST_MALLOC(SurroundingText);
 
@@ -56,7 +53,7 @@
  private:
   void Initialize(const Position&, const Position&, unsigned max_length);
 
-  Persistent<Range> content_range_;
+  String content_;
   size_t start_offset_in_content_;
   size_t end_offset_in_content_;
 
diff --git a/third_party/WebKit/Source/core/exported/WebDevToolsAgentImpl.cpp b/third_party/WebKit/Source/core/exported/WebDevToolsAgentImpl.cpp
index b06907b3..d720db6 100644
--- a/third_party/WebKit/Source/core/exported/WebDevToolsAgentImpl.cpp
+++ b/third_party/WebKit/Source/core/exported/WebDevToolsAgentImpl.cpp
@@ -610,14 +610,6 @@
   return false;
 }
 
-void WebDevToolsAgentImpl::DetachAllSessionsForTesting() {
-  Vector<int> session_ids;
-  for (auto& it : sessions_)
-    session_ids.push_back(it.key);
-  for (int session_id : session_ids)
-    DestroySession(session_id);
-}
-
 void WebDevToolsAgentImpl::FlushProtocolNotifications() {
   for (auto& it : sessions_)
     it.value->flushProtocolNotifications();
diff --git a/third_party/WebKit/Source/core/exported/WebDevToolsAgentImpl.h b/third_party/WebKit/Source/core/exported/WebDevToolsAgentImpl.h
index 35f3761..1fbddea5 100644
--- a/third_party/WebKit/Source/core/exported/WebDevToolsAgentImpl.h
+++ b/third_party/WebKit/Source/core/exported/WebDevToolsAgentImpl.h
@@ -86,7 +86,6 @@
   void LayerTreeViewChanged(WebLayerTreeView*);
   void RootLayerCleared();
   bool CacheDisabled();
-  void DetachAllSessionsForTesting();
   String EvaluateInOverlayForTesting(const String& script);
 
   // WebDevToolsAgent implementation.
diff --git a/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.cpp
index a2968e87..172a5a0 100644
--- a/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.cpp
@@ -1570,11 +1570,6 @@
              : WebRect();
 }
 
-void WebLocalFrameImpl::DetachAllDevToolsSessionsForTesting() {
-  if (dev_tools_agent_)
-    dev_tools_agent_->DetachAllSessionsForTesting();
-}
-
 WebString WebLocalFrameImpl::GetLayerTreeAsTextForTesting(
     bool show_debug_info) const {
   if (!GetFrame())
diff --git a/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.h b/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.h
index 5e0dd570..ccca4750 100644
--- a/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.h
+++ b/third_party/WebKit/Source/core/frame/WebLocalFrameImpl.h
@@ -234,7 +234,6 @@
       const WebDOMEvent&) override;
 
   WebRect GetSelectionBoundsRectForTesting() const override;
-  void DetachAllDevToolsSessionsForTesting() override;
 
   WebString GetLayerTreeAsTextForTesting(
       bool show_debug_info = false) const override;
diff --git a/third_party/WebKit/Source/core/script/OWNERS b/third_party/WebKit/Source/core/script/OWNERS
new file mode 100644
index 0000000..7488dad
--- /dev/null
+++ b/third_party/WebKit/Source/core/script/OWNERS
@@ -0,0 +1,6 @@
+hiroshige@chromium.org
+jbroman@chromium.org
+kouhei@chromium.org
+
+# TEAM: module-dev@chromium.org
+# COMPONENT: Blink>HTML>Script
diff --git a/third_party/WebKit/Source/core/script/README.md b/third_party/WebKit/Source/core/script/README.md
new file mode 100644
index 0000000..8bbb43a
--- /dev/null
+++ b/third_party/WebKit/Source/core/script/README.md
@@ -0,0 +1,24 @@
+# Scripting
+
+This directory contains classes which manage the `<script>` elements and
+loading and execution of scripts in Blink.
+
+The scripts are loaded by `core/loader` and executed by V8 via `bindings/core/v8`.
+The interaction between `<script>` elements and these components is controlled by `core/script`.
+
+This directory implements the following scripting concepts in the HTML spec:
+
+*   [`<script>` elements](https://html.spec.whatwg.org/#the-script-element)
+*   Interactions between scripts and HTML/XML documents/parsers
+*   A part of [Scripting](https://html.spec.whatwg.org/#scripting)
+    * [scripts](https://html.spec.whatwg.org/#definitions-2)
+        * [classic scripts](https://html.spec.whatwg.org/#classic-script)
+        * [module scripts](https://html.spec.whatwg.org/#module-script)
+    * [Fetching](https://html.spec.whatwg.org/#fetching-scripts) scripts
+    * [creating](https://html.spec.whatwg.org/#creating-scripts) scripts
+    * [calling](https://html.spec.whatwg.org/#calling-scripts) scripts
+    * [Integration with the JavaScript module system](https://html.spec.whatwg.org/#integration-with-the-javascript-module-system)
+
+## See Also
+
+[Slides](https://docs.google.com/presentation/d/1H-1U9LmCghOmviw0nYE_SP_r49-bU42SkViBn539-vg/edit?usp=sharing)
diff --git a/third_party/WebKit/Source/devtools/front_end/devtools_compatibility.js b/third_party/WebKit/Source/devtools/front_end/devtools_compatibility.js
index f48c1126..e666084c 100644
--- a/third_party/WebKit/Source/devtools/front_end/devtools_compatibility.js
+++ b/third_party/WebKit/Source/devtools/front_end/devtools_compatibility.js
@@ -147,14 +147,6 @@
     }
 
     /**
-     * @param {number} callId
-     * @param {string} script
-     */
-    evaluateForTestInFrontend(callId, script) {
-      this._dispatchOnInspectorFrontendAPI('evaluateForTestInFrontend', [callId, script]);
-    }
-
-    /**
      * @param {!{r: number, g: number, b: number, a: number}} color
      */
     eyeDropperPickedColor(color) {
diff --git a/third_party/WebKit/Source/devtools/front_end/host/InspectorFrontendHost.js b/third_party/WebKit/Source/devtools/front_end/host/InspectorFrontendHost.js
index cff0911d..c592ebd 100644
--- a/third_party/WebKit/Source/devtools/front_end/host/InspectorFrontendHost.js
+++ b/third_party/WebKit/Source/devtools/front_end/host/InspectorFrontendHost.js
@@ -554,11 +554,3 @@
     return prefs['isUnderTest'] === 'true';
   return Common.settings && Common.settings.createSetting('isUnderTest', false).get();
 };
-
-/**
- * @return {boolean}
- */
-Host.isStartupTest = function() {
-  var test = Runtime.queryParam('test');
-  return !!(test && test.includes('/startup/'));
-};
diff --git a/third_party/WebKit/Source/devtools/front_end/host/InspectorFrontendHostAPI.js b/third_party/WebKit/Source/devtools/front_end/host/InspectorFrontendHostAPI.js
index 51c880a..38bd8fb 100644
--- a/third_party/WebKit/Source/devtools/front_end/host/InspectorFrontendHostAPI.js
+++ b/third_party/WebKit/Source/devtools/front_end/host/InspectorFrontendHostAPI.js
@@ -37,7 +37,6 @@
   DispatchMessage: Symbol('dispatchMessage'),
   DispatchMessageChunk: Symbol('dispatchMessageChunk'),
   EnterInspectElementMode: Symbol('enterInspectElementMode'),
-  EvaluateForTestInFrontend: Symbol('evaluateForTestInFrontend'),
   EyeDropperPickedColor: Symbol('eyeDropperPickedColor'),
   FileSystemsLoaded: Symbol('fileSystemsLoaded'),
   FileSystemRemoved: Symbol('fileSystemRemoved'),
@@ -71,7 +70,6 @@
   [InspectorFrontendHostAPI.Events.DispatchMessage, 'dispatchMessage', ['messageObject']],
   [InspectorFrontendHostAPI.Events.DispatchMessageChunk, 'dispatchMessageChunk', ['messageChunk', 'messageSize']],
   [InspectorFrontendHostAPI.Events.EnterInspectElementMode, 'enterInspectElementMode', []],
-  [InspectorFrontendHostAPI.Events.EvaluateForTestInFrontend, 'evaluateForTestInFrontend', ['callId', 'script']],
   [InspectorFrontendHostAPI.Events.EyeDropperPickedColor, 'eyeDropperPickedColor', ['color']],
   [InspectorFrontendHostAPI.Events.FileSystemsLoaded, 'fileSystemsLoaded', ['fileSystems']],
   [InspectorFrontendHostAPI.Events.FileSystemRemoved, 'fileSystemRemoved', ['fileSystemPath']],
diff --git a/third_party/WebKit/Source/devtools/front_end/main/Main.js b/third_party/WebKit/Source/devtools/front_end/main/Main.js
index d923a166..27a98eed 100644
--- a/third_party/WebKit/Source/devtools/front_end/main/Main.js
+++ b/third_party/WebKit/Source/devtools/front_end/main/Main.js
@@ -276,12 +276,8 @@
       handler.handleQueryParam(value);
     }
 
-    if (Host.isStartupTest()) {
-      setTimeout(() => InspectorFrontendHost.readyForTest(), 0);
-    } else {
-      // Allow UI cycles to repaint prior to creating connection.
-      setTimeout(this._initializeTarget.bind(this), 0);
-    }
+    // Allow UI cycles to repaint prior to creating connection.
+    setTimeout(this._initializeTarget.bind(this), 0);
     Main.Main.timeEnd('Main._showAppUI');
   }
 
@@ -289,8 +285,9 @@
     Main.Main.time('Main._initializeTarget');
     SDK.targetManager.connectToMainTarget(webSocketConnectionLost);
 
-    if (!Host.isStartupTest())
-      InspectorFrontendHost.readyForTest();
+    // Used for browser tests.
+    InspectorFrontendHost.readyForTest();
+
     // Asynchronously run the extensions.
     setTimeout(this._lateInitialization.bind(this), 100);
     Main.Main.timeEnd('Main._initializeTarget');
diff --git a/third_party/WebKit/Source/devtools/front_end/test_runner/TestRunner.js b/third_party/WebKit/Source/devtools/front_end/test_runner/TestRunner.js
index 96c372b..5fa264f 100644
--- a/third_party/WebKit/Source/devtools/front_end/test_runner/TestRunner.js
+++ b/third_party/WebKit/Source/devtools/front_end/test_runner/TestRunner.js
@@ -23,36 +23,12 @@
   var absoluteURL = TestRunner.url(path);
   self.testRunner.navigateSecondaryWindow(absoluteURL);
   return new Promise(f => TestRunner._startupTestSetupFinished = () => {
-    Main.Main._instanceForTest._initializeTarget();
+    TestRunner._initializeTargetForStartupTest();
     delete TestRunner._startupTestSetupFinished;
     f();
   });
 };
 
-/**
- * @param {!Common.Event} event
- */
-TestRunner._evaluateForTestInFrontend = function(event) {
-  var callId = /** @type {number} */ (event.data['callId']);
-  var script = /** @type {number} */ (event.data['script']);
-
-  function invokeMethod() {
-    try {
-      script = script + '//# sourceURL=TestRunner' + callId + '.js';
-      self.eval(script);
-    } catch (e) {
-      console.error(e.stack);
-    }
-  }
-
-  // For startup tests, the first evaluateForTestInFrontend is called
-  // before target has been initialized.
-  if (Protocol.InspectorBackend.deprecatedRunAfterPendingDispatches)
-    Protocol.InspectorBackend.deprecatedRunAfterPendingDispatches(invokeMethod);
-  else
-    invokeMethod();
-};
-
 TestRunner._executeTestScript = function() {
   var testScriptURL = /** @type {string} */ (Runtime.queryParam('test'));
   fetch(testScriptURL)
@@ -1384,7 +1360,7 @@
       return;
     TestRunner._startedTest = true;
     TestRunner._setupTestHelpers(target);
-    if (Host.isStartupTest())
+    if (TestRunner._isStartupTest())
       return;
     TestRunner
         .loadHTML(`
@@ -1411,24 +1387,42 @@
   return !self.testRunner || !!Runtime.queryParam('debugFrontend');
 };
 
-(function() {
 /**
+ * @return {boolean}
+ */
+TestRunner._isStartupTest = function() {
+  return Runtime.queryParam('test').includes('/startup/');
+};
+
+(async function() {
+  /**
    * @param {string|!Event} message
    * @param {string} source
    * @param {number} lineno
    * @param {number} colno
    * @param {!Error} error
    */
-function completeTestOnError(message, source, lineno, colno, error) {
-  TestRunner.addResult('TEST ENDED IN ERROR: ' + error.stack);
-  TestRunner.completeTest();
-}
+  function completeTestOnError(message, source, lineno, colno, error) {
+    TestRunner.addResult('TEST ENDED IN ERROR: ' + error.stack);
+    TestRunner.completeTest();
+  }
 
-self['onerror'] = completeTestOnError;
-InspectorFrontendHost.events.addEventListener(
-    InspectorFrontendHostAPI.Events.EvaluateForTestInFrontend, TestRunner._evaluateForTestInFrontend, TestRunner);
-TestRunner._printDevToolsConsole();
-if (Host.isStartupTest())
+  self['onerror'] = completeTestOnError;
+  TestRunner._printDevToolsConsole();
+  SDK.targetManager.observeTargets(new TestRunner._TestObserver());
+  if (!TestRunner._isStartupTest())
+    return;
+  /**
+   * Startup test initialization:
+   * 1. Wait for DevTools app UI to load
+   * 2. Execute test script, the first line will be TestRunner.setupStartupTest(...) which:
+   *    A. Navigate secondary window
+   *    B. After preconditions occur, secondary window calls testRunner.inspectSecondaryWindow()
+   * 3. Backend executes TestRunner._startupTestSetupFinished() which calls _initializeTarget()
+   */
+  TestRunner._initializeTargetForStartupTest =
+      TestRunner.override(Main.Main._instanceForTest, '_initializeTarget', () => undefined)
+          .bind(Main.Main._instanceForTest);
+  await TestRunner.addSnifferPromise(Main.Main._instanceForTest, '_showAppUI');
   TestRunner._executeTestScript();
-SDK.targetManager.observeTargets(new TestRunner._TestObserver());
 })();
diff --git a/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.cpp b/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.cpp
index bd47db64..d2c9be17 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/DrawingDisplayItem.cpp
@@ -36,7 +36,6 @@
 #if DCHECK_IS_ON()
 void DrawingDisplayItem::PropertiesAsJSON(JSONObject& json) const {
   DisplayItem::PropertiesAsJSON(json);
-  json.SetString("rect", VisualRect().ToString());
   json.SetBoolean("opaque", known_to_be_opaque_);
 }
 #endif
diff --git a/third_party/WebKit/public/web/WebLocalFrame.h b/third_party/WebKit/public/web/WebLocalFrame.h
index c546f58..7d4cede 100644
--- a/third_party/WebKit/public/web/WebLocalFrame.h
+++ b/third_party/WebKit/public/web/WebLocalFrame.h
@@ -846,11 +846,6 @@
   // empty ((0,0), (0,0)).
   virtual WebRect GetSelectionBoundsRectForTesting() const = 0;
 
-  // Detaches all attached sessions.
-  // TODO(dgozman): this should be removed together with
-  // old inspector testing harness.
-  virtual void DetachAllDevToolsSessionsForTesting() = 0;
-
  protected:
   explicit WebLocalFrame(WebTreeScopeType scope) : WebFrame(scope) {}
 
diff --git a/third_party/libaom/libaom_srcs.gni b/third_party/libaom/libaom_srcs.gni
index 10b6abd..e8b8f41f 100644
--- a/third_party/libaom/libaom_srcs.gni
+++ b/third_party/libaom/libaom_srcs.gni
@@ -181,13 +181,10 @@
 ]
 libaom_srcs_x86_assembly = [
   "//third_party/libaom/source/libaom/aom_dsp/x86/aom_convolve_copy_sse2.asm",
-  "//third_party/libaom/source/libaom/aom_dsp/x86/aom_high_subpixel_8t_sse2.asm",
-  "//third_party/libaom/source/libaom/aom_dsp/x86/aom_high_subpixel_bilinear_sse2.asm",
   "//third_party/libaom/source/libaom/aom_dsp/x86/aom_subpixel_8t_sse2.asm",
   "//third_party/libaom/source/libaom/aom_dsp/x86/aom_subpixel_8t_ssse3.asm",
   "//third_party/libaom/source/libaom/aom_dsp/x86/aom_subpixel_bilinear_sse2.asm",
   "//third_party/libaom/source/libaom/aom_dsp/x86/aom_subpixel_bilinear_ssse3.asm",
-  "//third_party/libaom/source/libaom/aom_dsp/x86/highbd_intrapred_sse2.asm",
   "//third_party/libaom/source/libaom/aom_dsp/x86/intrapred_sse2.asm",
   "//third_party/libaom/source/libaom/aom_dsp/x86/intrapred_ssse3.asm",
   "//third_party/libaom/source/libaom/aom_dsp/x86/inv_wht_sse2.asm",
@@ -195,7 +192,6 @@
 ]
 libaom_srcs_x86_mmx = []
 libaom_srcs_x86_sse2 = [
-  "//third_party/libaom/source/libaom/aom_dsp/x86/highbd_loopfilter_sse2.c",
   "//third_party/libaom/source/libaom/aom_dsp/x86/inv_txfm_sse2.c",
   "//third_party/libaom/source/libaom/aom_dsp/x86/loopfilter_sse2.c",
   "//third_party/libaom/source/libaom/av1/common/cdef_block_sse2.c",
@@ -211,8 +207,6 @@
   "//third_party/libaom/source/libaom/av1/common/cdef_block_ssse3.c",
   "//third_party/libaom/source/libaom/av1/common/clpf_ssse3.c",
   "//third_party/libaom/source/libaom/av1/common/x86/av1_convolve_ssse3.c",
-  "//third_party/libaom/source/libaom/av1/common/x86/highbd_convolve_2d_ssse3.c",
-  "//third_party/libaom/source/libaom/av1/common/x86/highbd_warp_plane_ssse3.c",
   "//third_party/libaom/source/libaom/av1/common/x86/warp_plane_ssse3.c",
 ]
 libaom_srcs_x86_sse4_1 = [
@@ -221,14 +215,11 @@
   "//third_party/libaom/source/libaom/aom_dsp/x86/blend_a64_vmask_sse4.c",
   "//third_party/libaom/source/libaom/av1/common/cdef_block_sse4.c",
   "//third_party/libaom/source/libaom/av1/common/clpf_sse4.c",
-  "//third_party/libaom/source/libaom/av1/common/x86/av1_highbd_convolve_sse4.c",
   "//third_party/libaom/source/libaom/av1/common/x86/highbd_inv_txfm_sse4.c",
 ]
 libaom_srcs_x86_avx = []
 libaom_srcs_x86_avx2 = [
   "//third_party/libaom/source/libaom/aom_dsp/x86/aom_subpixel_8t_intrin_avx2.c",
-  "//third_party/libaom/source/libaom/aom_dsp/x86/highbd_convolve_avx2.c",
-  "//third_party/libaom/source/libaom/aom_dsp/x86/highbd_loopfilter_avx2.c",
   "//third_party/libaom/source/libaom/aom_dsp/x86/inv_txfm_avx2.c",
   "//third_party/libaom/source/libaom/av1/common/x86/convolve_avx2.c",
   "//third_party/libaom/source/libaom/av1/common/x86/highbd_inv_txfm_avx2.c",
@@ -412,13 +403,10 @@
 ]
 libaom_srcs_x86_64_assembly = [
   "//third_party/libaom/source/libaom/aom_dsp/x86/aom_convolve_copy_sse2.asm",
-  "//third_party/libaom/source/libaom/aom_dsp/x86/aom_high_subpixel_8t_sse2.asm",
-  "//third_party/libaom/source/libaom/aom_dsp/x86/aom_high_subpixel_bilinear_sse2.asm",
   "//third_party/libaom/source/libaom/aom_dsp/x86/aom_subpixel_8t_sse2.asm",
   "//third_party/libaom/source/libaom/aom_dsp/x86/aom_subpixel_8t_ssse3.asm",
   "//third_party/libaom/source/libaom/aom_dsp/x86/aom_subpixel_bilinear_sse2.asm",
   "//third_party/libaom/source/libaom/aom_dsp/x86/aom_subpixel_bilinear_ssse3.asm",
-  "//third_party/libaom/source/libaom/aom_dsp/x86/highbd_intrapred_sse2.asm",
   "//third_party/libaom/source/libaom/aom_dsp/x86/intrapred_sse2.asm",
   "//third_party/libaom/source/libaom/aom_dsp/x86/intrapred_ssse3.asm",
   "//third_party/libaom/source/libaom/aom_dsp/x86/inv_wht_sse2.asm",
@@ -426,7 +414,6 @@
 ]
 libaom_srcs_x86_64_mmx = []
 libaom_srcs_x86_64_sse2 = [
-  "//third_party/libaom/source/libaom/aom_dsp/x86/highbd_loopfilter_sse2.c",
   "//third_party/libaom/source/libaom/aom_dsp/x86/inv_txfm_sse2.c",
   "//third_party/libaom/source/libaom/aom_dsp/x86/loopfilter_sse2.c",
   "//third_party/libaom/source/libaom/av1/common/cdef_block_sse2.c",
@@ -442,8 +429,6 @@
   "//third_party/libaom/source/libaom/av1/common/cdef_block_ssse3.c",
   "//third_party/libaom/source/libaom/av1/common/clpf_ssse3.c",
   "//third_party/libaom/source/libaom/av1/common/x86/av1_convolve_ssse3.c",
-  "//third_party/libaom/source/libaom/av1/common/x86/highbd_convolve_2d_ssse3.c",
-  "//third_party/libaom/source/libaom/av1/common/x86/highbd_warp_plane_ssse3.c",
   "//third_party/libaom/source/libaom/av1/common/x86/warp_plane_ssse3.c",
 ]
 libaom_srcs_x86_64_sse4_1 = [
@@ -452,14 +437,11 @@
   "//third_party/libaom/source/libaom/aom_dsp/x86/blend_a64_vmask_sse4.c",
   "//third_party/libaom/source/libaom/av1/common/cdef_block_sse4.c",
   "//third_party/libaom/source/libaom/av1/common/clpf_sse4.c",
-  "//third_party/libaom/source/libaom/av1/common/x86/av1_highbd_convolve_sse4.c",
   "//third_party/libaom/source/libaom/av1/common/x86/highbd_inv_txfm_sse4.c",
 ]
 libaom_srcs_x86_64_avx = []
 libaom_srcs_x86_64_avx2 = [
   "//third_party/libaom/source/libaom/aom_dsp/x86/aom_subpixel_8t_intrin_avx2.c",
-  "//third_party/libaom/source/libaom/aom_dsp/x86/highbd_convolve_avx2.c",
-  "//third_party/libaom/source/libaom/aom_dsp/x86/highbd_loopfilter_avx2.c",
   "//third_party/libaom/source/libaom/aom_dsp/x86/inv_txfm_avx2.c",
   "//third_party/libaom/source/libaom/av1/common/x86/convolve_avx2.c",
   "//third_party/libaom/source/libaom/av1/common/x86/highbd_inv_txfm_avx2.c",
diff --git a/third_party/libaom/source/config/linux/generic/aom_config.asm b/third_party/libaom/source/config/linux/generic/aom_config.asm
index f874223..244ed501 100644
--- a/third_party/libaom/source/config/linux/generic/aom_config.asm
+++ b/third_party/libaom/source/config/linux/generic/aom_config.asm
@@ -64,7 +64,7 @@
 .equ CONFIG_ENCODE_PERF_TESTS ,  0
 .equ CONFIG_COEFFICIENT_RANGE_CHECKING ,  0
 .equ CONFIG_LOWBITDEPTH ,  1
-.equ CONFIG_HIGHBITDEPTH ,  1
+.equ CONFIG_HIGHBITDEPTH ,  0
 .equ CONFIG_EXPERIMENTAL ,  0
 .equ CONFIG_SIZE_LIMIT ,  1
 .equ CONFIG_FP_MB_STATS ,  0
diff --git a/third_party/libaom/source/config/linux/generic/aom_config.c b/third_party/libaom/source/config/linux/generic/aom_config.c
index 796aaec..1366770 100644
--- a/third_party/libaom/source/config/linux/generic/aom_config.c
+++ b/third_party/libaom/source/config/linux/generic/aom_config.c
@@ -7,5 +7,5 @@
 /* Media Patent License 1.0 was not distributed with this source code in the */
 /* PATENTS file, you can obtain it at www.aomedia.org/license/patent. */
 #include "aom/aom_codec.h"
-static const char* const cfg = "--target=generic-gnu --enable-external-build --enable-postproc --disable-av1-encoder --size-limit=16384x16384 --enable-realtime-only --disable-install-docs";
+static const char* const cfg = "--target=generic-gnu --enable-external-build --enable-postproc --disable-av1-encoder --size-limit=16384x16384 --enable-realtime-only --disable-install-docs --disable-highbitdepth";
 const char *aom_codec_build_config(void) {return cfg;}
diff --git a/third_party/libaom/source/config/linux/generic/aom_config.h b/third_party/libaom/source/config/linux/generic/aom_config.h
index db0a1645..bb233fea 100644
--- a/third_party/libaom/source/config/linux/generic/aom_config.h
+++ b/third_party/libaom/source/config/linux/generic/aom_config.h
@@ -74,7 +74,7 @@
 #define CONFIG_ENCODE_PERF_TESTS 0
 #define CONFIG_COEFFICIENT_RANGE_CHECKING 0
 #define CONFIG_LOWBITDEPTH 1
-#define CONFIG_HIGHBITDEPTH 1
+#define CONFIG_HIGHBITDEPTH 0
 #define CONFIG_EXPERIMENTAL 0
 #define CONFIG_SIZE_LIMIT 1
 #define CONFIG_FP_MB_STATS 0
diff --git a/third_party/libaom/source/config/linux/generic/aom_dsp_rtcd.h b/third_party/libaom/source/config/linux/generic/aom_dsp_rtcd.h
index 2e46aa7..06eff885 100644
--- a/third_party/libaom/source/config/linux/generic/aom_dsp_rtcd.h
+++ b/third_party/libaom/source/config/linux/generic/aom_dsp_rtcd.h
@@ -975,996 +975,6 @@
                            const uint8_t* left);
 #define aom_h_predictor_8x8 aom_h_predictor_8x8_c
 
-void aom_highbd_blend_a64_hmask_c(uint8_t* dst,
-                                  uint32_t dst_stride,
-                                  const uint8_t* src0,
-                                  uint32_t src0_stride,
-                                  const uint8_t* src1,
-                                  uint32_t src1_stride,
-                                  const uint8_t* mask,
-                                  int h,
-                                  int w,
-                                  int bd);
-#define aom_highbd_blend_a64_hmask aom_highbd_blend_a64_hmask_c
-
-void aom_highbd_blend_a64_mask_c(uint8_t* dst,
-                                 uint32_t dst_stride,
-                                 const uint8_t* src0,
-                                 uint32_t src0_stride,
-                                 const uint8_t* src1,
-                                 uint32_t src1_stride,
-                                 const uint8_t* mask,
-                                 uint32_t mask_stride,
-                                 int h,
-                                 int w,
-                                 int suby,
-                                 int subx,
-                                 int bd);
-#define aom_highbd_blend_a64_mask aom_highbd_blend_a64_mask_c
-
-void aom_highbd_blend_a64_vmask_c(uint8_t* dst,
-                                  uint32_t dst_stride,
-                                  const uint8_t* src0,
-                                  uint32_t src0_stride,
-                                  const uint8_t* src1,
-                                  uint32_t src1_stride,
-                                  const uint8_t* mask,
-                                  int h,
-                                  int w,
-                                  int bd);
-#define aom_highbd_blend_a64_vmask aom_highbd_blend_a64_vmask_c
-
-void aom_highbd_convolve8_c(const uint8_t* src,
-                            ptrdiff_t src_stride,
-                            uint8_t* dst,
-                            ptrdiff_t dst_stride,
-                            const int16_t* filter_x,
-                            int x_step_q4,
-                            const int16_t* filter_y,
-                            int y_step_q4,
-                            int w,
-                            int h,
-                            int bps);
-#define aom_highbd_convolve8 aom_highbd_convolve8_c
-
-void aom_highbd_convolve8_avg_c(const uint8_t* src,
-                                ptrdiff_t src_stride,
-                                uint8_t* dst,
-                                ptrdiff_t dst_stride,
-                                const int16_t* filter_x,
-                                int x_step_q4,
-                                const int16_t* filter_y,
-                                int y_step_q4,
-                                int w,
-                                int h,
-                                int bps);
-#define aom_highbd_convolve8_avg aom_highbd_convolve8_avg_c
-
-void aom_highbd_convolve8_avg_horiz_c(const uint8_t* src,
-                                      ptrdiff_t src_stride,
-                                      uint8_t* dst,
-                                      ptrdiff_t dst_stride,
-                                      const int16_t* filter_x,
-                                      int x_step_q4,
-                                      const int16_t* filter_y,
-                                      int y_step_q4,
-                                      int w,
-                                      int h,
-                                      int bps);
-#define aom_highbd_convolve8_avg_horiz aom_highbd_convolve8_avg_horiz_c
-
-void aom_highbd_convolve8_avg_vert_c(const uint8_t* src,
-                                     ptrdiff_t src_stride,
-                                     uint8_t* dst,
-                                     ptrdiff_t dst_stride,
-                                     const int16_t* filter_x,
-                                     int x_step_q4,
-                                     const int16_t* filter_y,
-                                     int y_step_q4,
-                                     int w,
-                                     int h,
-                                     int bps);
-#define aom_highbd_convolve8_avg_vert aom_highbd_convolve8_avg_vert_c
-
-void aom_highbd_convolve8_horiz_c(const uint8_t* src,
-                                  ptrdiff_t src_stride,
-                                  uint8_t* dst,
-                                  ptrdiff_t dst_stride,
-                                  const int16_t* filter_x,
-                                  int x_step_q4,
-                                  const int16_t* filter_y,
-                                  int y_step_q4,
-                                  int w,
-                                  int h,
-                                  int bps);
-#define aom_highbd_convolve8_horiz aom_highbd_convolve8_horiz_c
-
-void aom_highbd_convolve8_vert_c(const uint8_t* src,
-                                 ptrdiff_t src_stride,
-                                 uint8_t* dst,
-                                 ptrdiff_t dst_stride,
-                                 const int16_t* filter_x,
-                                 int x_step_q4,
-                                 const int16_t* filter_y,
-                                 int y_step_q4,
-                                 int w,
-                                 int h,
-                                 int bps);
-#define aom_highbd_convolve8_vert aom_highbd_convolve8_vert_c
-
-void aom_highbd_convolve_avg_c(const uint8_t* src,
-                               ptrdiff_t src_stride,
-                               uint8_t* dst,
-                               ptrdiff_t dst_stride,
-                               const int16_t* filter_x,
-                               int x_step_q4,
-                               const int16_t* filter_y,
-                               int y_step_q4,
-                               int w,
-                               int h,
-                               int bps);
-#define aom_highbd_convolve_avg aom_highbd_convolve_avg_c
-
-void aom_highbd_convolve_copy_c(const uint8_t* src,
-                                ptrdiff_t src_stride,
-                                uint8_t* dst,
-                                ptrdiff_t dst_stride,
-                                const int16_t* filter_x,
-                                int x_step_q4,
-                                const int16_t* filter_y,
-                                int y_step_q4,
-                                int w,
-                                int h,
-                                int bps);
-#define aom_highbd_convolve_copy aom_highbd_convolve_copy_c
-
-void aom_highbd_d117_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d117_predictor_16x16 aom_highbd_d117_predictor_16x16_c
-
-void aom_highbd_d117_predictor_16x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d117_predictor_16x32 aom_highbd_d117_predictor_16x32_c
-
-void aom_highbd_d117_predictor_16x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d117_predictor_16x8 aom_highbd_d117_predictor_16x8_c
-
-void aom_highbd_d117_predictor_2x2_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d117_predictor_2x2 aom_highbd_d117_predictor_2x2_c
-
-void aom_highbd_d117_predictor_32x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d117_predictor_32x16 aom_highbd_d117_predictor_32x16_c
-
-void aom_highbd_d117_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d117_predictor_32x32 aom_highbd_d117_predictor_32x32_c
-
-void aom_highbd_d117_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d117_predictor_4x4 aom_highbd_d117_predictor_4x4_c
-
-void aom_highbd_d117_predictor_4x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d117_predictor_4x8 aom_highbd_d117_predictor_4x8_c
-
-void aom_highbd_d117_predictor_8x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d117_predictor_8x16 aom_highbd_d117_predictor_8x16_c
-
-void aom_highbd_d117_predictor_8x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d117_predictor_8x4 aom_highbd_d117_predictor_8x4_c
-
-void aom_highbd_d117_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d117_predictor_8x8 aom_highbd_d117_predictor_8x8_c
-
-void aom_highbd_d135_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d135_predictor_16x16 aom_highbd_d135_predictor_16x16_c
-
-void aom_highbd_d135_predictor_16x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d135_predictor_16x32 aom_highbd_d135_predictor_16x32_c
-
-void aom_highbd_d135_predictor_16x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d135_predictor_16x8 aom_highbd_d135_predictor_16x8_c
-
-void aom_highbd_d135_predictor_2x2_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d135_predictor_2x2 aom_highbd_d135_predictor_2x2_c
-
-void aom_highbd_d135_predictor_32x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d135_predictor_32x16 aom_highbd_d135_predictor_32x16_c
-
-void aom_highbd_d135_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d135_predictor_32x32 aom_highbd_d135_predictor_32x32_c
-
-void aom_highbd_d135_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d135_predictor_4x4 aom_highbd_d135_predictor_4x4_c
-
-void aom_highbd_d135_predictor_4x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d135_predictor_4x8 aom_highbd_d135_predictor_4x8_c
-
-void aom_highbd_d135_predictor_8x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d135_predictor_8x16 aom_highbd_d135_predictor_8x16_c
-
-void aom_highbd_d135_predictor_8x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d135_predictor_8x4 aom_highbd_d135_predictor_8x4_c
-
-void aom_highbd_d135_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d135_predictor_8x8 aom_highbd_d135_predictor_8x8_c
-
-void aom_highbd_d153_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d153_predictor_16x16 aom_highbd_d153_predictor_16x16_c
-
-void aom_highbd_d153_predictor_16x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d153_predictor_16x32 aom_highbd_d153_predictor_16x32_c
-
-void aom_highbd_d153_predictor_16x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d153_predictor_16x8 aom_highbd_d153_predictor_16x8_c
-
-void aom_highbd_d153_predictor_2x2_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d153_predictor_2x2 aom_highbd_d153_predictor_2x2_c
-
-void aom_highbd_d153_predictor_32x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d153_predictor_32x16 aom_highbd_d153_predictor_32x16_c
-
-void aom_highbd_d153_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d153_predictor_32x32 aom_highbd_d153_predictor_32x32_c
-
-void aom_highbd_d153_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d153_predictor_4x4 aom_highbd_d153_predictor_4x4_c
-
-void aom_highbd_d153_predictor_4x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d153_predictor_4x8 aom_highbd_d153_predictor_4x8_c
-
-void aom_highbd_d153_predictor_8x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d153_predictor_8x16 aom_highbd_d153_predictor_8x16_c
-
-void aom_highbd_d153_predictor_8x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d153_predictor_8x4 aom_highbd_d153_predictor_8x4_c
-
-void aom_highbd_d153_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d153_predictor_8x8 aom_highbd_d153_predictor_8x8_c
-
-void aom_highbd_d207e_predictor_16x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_d207e_predictor_16x16 aom_highbd_d207e_predictor_16x16_c
-
-void aom_highbd_d207e_predictor_16x32_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_d207e_predictor_16x32 aom_highbd_d207e_predictor_16x32_c
-
-void aom_highbd_d207e_predictor_16x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d207e_predictor_16x8 aom_highbd_d207e_predictor_16x8_c
-
-void aom_highbd_d207e_predictor_2x2_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d207e_predictor_2x2 aom_highbd_d207e_predictor_2x2_c
-
-void aom_highbd_d207e_predictor_32x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_d207e_predictor_32x16 aom_highbd_d207e_predictor_32x16_c
-
-void aom_highbd_d207e_predictor_32x32_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_d207e_predictor_32x32 aom_highbd_d207e_predictor_32x32_c
-
-void aom_highbd_d207e_predictor_4x4_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d207e_predictor_4x4 aom_highbd_d207e_predictor_4x4_c
-
-void aom_highbd_d207e_predictor_4x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d207e_predictor_4x8 aom_highbd_d207e_predictor_4x8_c
-
-void aom_highbd_d207e_predictor_8x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d207e_predictor_8x16 aom_highbd_d207e_predictor_8x16_c
-
-void aom_highbd_d207e_predictor_8x4_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d207e_predictor_8x4 aom_highbd_d207e_predictor_8x4_c
-
-void aom_highbd_d207e_predictor_8x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d207e_predictor_8x8 aom_highbd_d207e_predictor_8x8_c
-
-void aom_highbd_d45e_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d45e_predictor_16x16 aom_highbd_d45e_predictor_16x16_c
-
-void aom_highbd_d45e_predictor_16x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d45e_predictor_16x32 aom_highbd_d45e_predictor_16x32_c
-
-void aom_highbd_d45e_predictor_16x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d45e_predictor_16x8 aom_highbd_d45e_predictor_16x8_c
-
-void aom_highbd_d45e_predictor_2x2_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d45e_predictor_2x2 aom_highbd_d45e_predictor_2x2_c
-
-void aom_highbd_d45e_predictor_32x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d45e_predictor_32x16 aom_highbd_d45e_predictor_32x16_c
-
-void aom_highbd_d45e_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d45e_predictor_32x32 aom_highbd_d45e_predictor_32x32_c
-
-void aom_highbd_d45e_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d45e_predictor_4x4 aom_highbd_d45e_predictor_4x4_c
-
-void aom_highbd_d45e_predictor_4x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d45e_predictor_4x8 aom_highbd_d45e_predictor_4x8_c
-
-void aom_highbd_d45e_predictor_8x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d45e_predictor_8x16 aom_highbd_d45e_predictor_8x16_c
-
-void aom_highbd_d45e_predictor_8x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d45e_predictor_8x4 aom_highbd_d45e_predictor_8x4_c
-
-void aom_highbd_d45e_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d45e_predictor_8x8 aom_highbd_d45e_predictor_8x8_c
-
-void aom_highbd_d63e_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d63e_predictor_16x16 aom_highbd_d63e_predictor_16x16_c
-
-void aom_highbd_d63e_predictor_16x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d63e_predictor_16x32 aom_highbd_d63e_predictor_16x32_c
-
-void aom_highbd_d63e_predictor_16x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d63e_predictor_16x8 aom_highbd_d63e_predictor_16x8_c
-
-void aom_highbd_d63e_predictor_2x2_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d63e_predictor_2x2 aom_highbd_d63e_predictor_2x2_c
-
-void aom_highbd_d63e_predictor_32x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d63e_predictor_32x16 aom_highbd_d63e_predictor_32x16_c
-
-void aom_highbd_d63e_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d63e_predictor_32x32 aom_highbd_d63e_predictor_32x32_c
-
-void aom_highbd_d63e_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d63e_predictor_4x4 aom_highbd_d63e_predictor_4x4_c
-
-void aom_highbd_d63e_predictor_4x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d63e_predictor_4x8 aom_highbd_d63e_predictor_4x8_c
-
-void aom_highbd_d63e_predictor_8x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d63e_predictor_8x16 aom_highbd_d63e_predictor_8x16_c
-
-void aom_highbd_d63e_predictor_8x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d63e_predictor_8x4 aom_highbd_d63e_predictor_8x4_c
-
-void aom_highbd_d63e_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d63e_predictor_8x8 aom_highbd_d63e_predictor_8x8_c
-
-void aom_highbd_dc_128_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_128_predictor_16x16 aom_highbd_dc_128_predictor_16x16_c
-
-void aom_highbd_dc_128_predictor_16x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_128_predictor_16x32 aom_highbd_dc_128_predictor_16x32_c
-
-void aom_highbd_dc_128_predictor_16x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_128_predictor_16x8 aom_highbd_dc_128_predictor_16x8_c
-
-void aom_highbd_dc_128_predictor_2x2_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_128_predictor_2x2 aom_highbd_dc_128_predictor_2x2_c
-
-void aom_highbd_dc_128_predictor_32x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_128_predictor_32x16 aom_highbd_dc_128_predictor_32x16_c
-
-void aom_highbd_dc_128_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_128_predictor_32x32 aom_highbd_dc_128_predictor_32x32_c
-
-void aom_highbd_dc_128_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_128_predictor_4x4 aom_highbd_dc_128_predictor_4x4_c
-
-void aom_highbd_dc_128_predictor_4x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_128_predictor_4x8 aom_highbd_dc_128_predictor_4x8_c
-
-void aom_highbd_dc_128_predictor_8x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_128_predictor_8x16 aom_highbd_dc_128_predictor_8x16_c
-
-void aom_highbd_dc_128_predictor_8x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_128_predictor_8x4 aom_highbd_dc_128_predictor_8x4_c
-
-void aom_highbd_dc_128_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_128_predictor_8x8 aom_highbd_dc_128_predictor_8x8_c
-
-void aom_highbd_dc_left_predictor_16x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_dc_left_predictor_16x16 aom_highbd_dc_left_predictor_16x16_c
-
-void aom_highbd_dc_left_predictor_16x32_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_dc_left_predictor_16x32 aom_highbd_dc_left_predictor_16x32_c
-
-void aom_highbd_dc_left_predictor_16x8_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_left_predictor_16x8 aom_highbd_dc_left_predictor_16x8_c
-
-void aom_highbd_dc_left_predictor_2x2_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_left_predictor_2x2 aom_highbd_dc_left_predictor_2x2_c
-
-void aom_highbd_dc_left_predictor_32x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_dc_left_predictor_32x16 aom_highbd_dc_left_predictor_32x16_c
-
-void aom_highbd_dc_left_predictor_32x32_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_dc_left_predictor_32x32 aom_highbd_dc_left_predictor_32x32_c
-
-void aom_highbd_dc_left_predictor_4x4_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_left_predictor_4x4 aom_highbd_dc_left_predictor_4x4_c
-
-void aom_highbd_dc_left_predictor_4x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_left_predictor_4x8 aom_highbd_dc_left_predictor_4x8_c
-
-void aom_highbd_dc_left_predictor_8x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_left_predictor_8x16 aom_highbd_dc_left_predictor_8x16_c
-
-void aom_highbd_dc_left_predictor_8x4_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_left_predictor_8x4 aom_highbd_dc_left_predictor_8x4_c
-
-void aom_highbd_dc_left_predictor_8x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_left_predictor_8x8 aom_highbd_dc_left_predictor_8x8_c
-
-void aom_highbd_dc_predictor_16x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_dc_predictor_16x16 aom_highbd_dc_predictor_16x16_c
-
-void aom_highbd_dc_predictor_16x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_dc_predictor_16x32 aom_highbd_dc_predictor_16x32_c
-
-void aom_highbd_dc_predictor_16x8_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_dc_predictor_16x8 aom_highbd_dc_predictor_16x8_c
-
-void aom_highbd_dc_predictor_2x2_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_dc_predictor_2x2 aom_highbd_dc_predictor_2x2_c
-
-void aom_highbd_dc_predictor_32x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_dc_predictor_32x16 aom_highbd_dc_predictor_32x16_c
-
-void aom_highbd_dc_predictor_32x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_dc_predictor_32x32 aom_highbd_dc_predictor_32x32_c
-
-void aom_highbd_dc_predictor_4x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_dc_predictor_4x4 aom_highbd_dc_predictor_4x4_c
-
-void aom_highbd_dc_predictor_4x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_dc_predictor_4x8 aom_highbd_dc_predictor_4x8_c
-
-void aom_highbd_dc_predictor_8x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_dc_predictor_8x16 aom_highbd_dc_predictor_8x16_c
-
-void aom_highbd_dc_predictor_8x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_dc_predictor_8x4 aom_highbd_dc_predictor_8x4_c
-
-void aom_highbd_dc_predictor_8x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_dc_predictor_8x8 aom_highbd_dc_predictor_8x8_c
-
-void aom_highbd_dc_top_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_top_predictor_16x16 aom_highbd_dc_top_predictor_16x16_c
-
-void aom_highbd_dc_top_predictor_16x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_top_predictor_16x32 aom_highbd_dc_top_predictor_16x32_c
-
-void aom_highbd_dc_top_predictor_16x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_top_predictor_16x8 aom_highbd_dc_top_predictor_16x8_c
-
-void aom_highbd_dc_top_predictor_2x2_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_top_predictor_2x2 aom_highbd_dc_top_predictor_2x2_c
-
-void aom_highbd_dc_top_predictor_32x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_top_predictor_32x16 aom_highbd_dc_top_predictor_32x16_c
-
-void aom_highbd_dc_top_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_top_predictor_32x32 aom_highbd_dc_top_predictor_32x32_c
-
-void aom_highbd_dc_top_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_top_predictor_4x4 aom_highbd_dc_top_predictor_4x4_c
-
-void aom_highbd_dc_top_predictor_4x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_top_predictor_4x8 aom_highbd_dc_top_predictor_4x8_c
-
-void aom_highbd_dc_top_predictor_8x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_top_predictor_8x16 aom_highbd_dc_top_predictor_8x16_c
-
-void aom_highbd_dc_top_predictor_8x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_top_predictor_8x4 aom_highbd_dc_top_predictor_8x4_c
-
-void aom_highbd_dc_top_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_top_predictor_8x8 aom_highbd_dc_top_predictor_8x8_c
-
-void aom_highbd_h_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_h_predictor_16x16 aom_highbd_h_predictor_16x16_c
-
-void aom_highbd_h_predictor_16x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_h_predictor_16x32 aom_highbd_h_predictor_16x32_c
-
-void aom_highbd_h_predictor_16x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_h_predictor_16x8 aom_highbd_h_predictor_16x8_c
-
-void aom_highbd_h_predictor_2x2_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_h_predictor_2x2 aom_highbd_h_predictor_2x2_c
-
-void aom_highbd_h_predictor_32x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_h_predictor_32x16 aom_highbd_h_predictor_32x16_c
-
-void aom_highbd_h_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_h_predictor_32x32 aom_highbd_h_predictor_32x32_c
-
-void aom_highbd_h_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_h_predictor_4x4 aom_highbd_h_predictor_4x4_c
-
-void aom_highbd_h_predictor_4x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_h_predictor_4x8 aom_highbd_h_predictor_4x8_c
-
-void aom_highbd_h_predictor_8x16_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_h_predictor_8x16 aom_highbd_h_predictor_8x16_c
-
-void aom_highbd_h_predictor_8x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_h_predictor_8x4 aom_highbd_h_predictor_8x4_c
-
-void aom_highbd_h_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_h_predictor_8x8 aom_highbd_h_predictor_8x8_c
-
 void aom_highbd_iwht4x4_16_add_c(const tran_low_t* input,
                                  uint8_t* dest,
                                  int dest_stride,
@@ -1977,507 +987,6 @@
                                 int bd);
 #define aom_highbd_iwht4x4_1_add aom_highbd_iwht4x4_1_add_c
 
-void aom_highbd_lpf_horizontal_4_c(uint16_t* s,
-                                   int pitch,
-                                   const uint8_t* blimit,
-                                   const uint8_t* limit,
-                                   const uint8_t* thresh,
-                                   int bd);
-#define aom_highbd_lpf_horizontal_4 aom_highbd_lpf_horizontal_4_c
-
-void aom_highbd_lpf_horizontal_4_dual_c(uint16_t* s,
-                                        int pitch,
-                                        const uint8_t* blimit0,
-                                        const uint8_t* limit0,
-                                        const uint8_t* thresh0,
-                                        const uint8_t* blimit1,
-                                        const uint8_t* limit1,
-                                        const uint8_t* thresh1,
-                                        int bd);
-#define aom_highbd_lpf_horizontal_4_dual aom_highbd_lpf_horizontal_4_dual_c
-
-void aom_highbd_lpf_horizontal_8_c(uint16_t* s,
-                                   int pitch,
-                                   const uint8_t* blimit,
-                                   const uint8_t* limit,
-                                   const uint8_t* thresh,
-                                   int bd);
-#define aom_highbd_lpf_horizontal_8 aom_highbd_lpf_horizontal_8_c
-
-void aom_highbd_lpf_horizontal_8_dual_c(uint16_t* s,
-                                        int pitch,
-                                        const uint8_t* blimit0,
-                                        const uint8_t* limit0,
-                                        const uint8_t* thresh0,
-                                        const uint8_t* blimit1,
-                                        const uint8_t* limit1,
-                                        const uint8_t* thresh1,
-                                        int bd);
-#define aom_highbd_lpf_horizontal_8_dual aom_highbd_lpf_horizontal_8_dual_c
-
-void aom_highbd_lpf_horizontal_edge_16_c(uint16_t* s,
-                                         int pitch,
-                                         const uint8_t* blimit,
-                                         const uint8_t* limit,
-                                         const uint8_t* thresh,
-                                         int bd);
-#define aom_highbd_lpf_horizontal_edge_16 aom_highbd_lpf_horizontal_edge_16_c
-
-void aom_highbd_lpf_horizontal_edge_8_c(uint16_t* s,
-                                        int pitch,
-                                        const uint8_t* blimit,
-                                        const uint8_t* limit,
-                                        const uint8_t* thresh,
-                                        int bd);
-#define aom_highbd_lpf_horizontal_edge_8 aom_highbd_lpf_horizontal_edge_8_c
-
-void aom_highbd_lpf_vertical_16_c(uint16_t* s,
-                                  int pitch,
-                                  const uint8_t* blimit,
-                                  const uint8_t* limit,
-                                  const uint8_t* thresh,
-                                  int bd);
-#define aom_highbd_lpf_vertical_16 aom_highbd_lpf_vertical_16_c
-
-void aom_highbd_lpf_vertical_16_dual_c(uint16_t* s,
-                                       int pitch,
-                                       const uint8_t* blimit,
-                                       const uint8_t* limit,
-                                       const uint8_t* thresh,
-                                       int bd);
-#define aom_highbd_lpf_vertical_16_dual aom_highbd_lpf_vertical_16_dual_c
-
-void aom_highbd_lpf_vertical_4_c(uint16_t* s,
-                                 int pitch,
-                                 const uint8_t* blimit,
-                                 const uint8_t* limit,
-                                 const uint8_t* thresh,
-                                 int bd);
-#define aom_highbd_lpf_vertical_4 aom_highbd_lpf_vertical_4_c
-
-void aom_highbd_lpf_vertical_4_dual_c(uint16_t* s,
-                                      int pitch,
-                                      const uint8_t* blimit0,
-                                      const uint8_t* limit0,
-                                      const uint8_t* thresh0,
-                                      const uint8_t* blimit1,
-                                      const uint8_t* limit1,
-                                      const uint8_t* thresh1,
-                                      int bd);
-#define aom_highbd_lpf_vertical_4_dual aom_highbd_lpf_vertical_4_dual_c
-
-void aom_highbd_lpf_vertical_8_c(uint16_t* s,
-                                 int pitch,
-                                 const uint8_t* blimit,
-                                 const uint8_t* limit,
-                                 const uint8_t* thresh,
-                                 int bd);
-#define aom_highbd_lpf_vertical_8 aom_highbd_lpf_vertical_8_c
-
-void aom_highbd_lpf_vertical_8_dual_c(uint16_t* s,
-                                      int pitch,
-                                      const uint8_t* blimit0,
-                                      const uint8_t* limit0,
-                                      const uint8_t* thresh0,
-                                      const uint8_t* blimit1,
-                                      const uint8_t* limit1,
-                                      const uint8_t* thresh1,
-                                      int bd);
-#define aom_highbd_lpf_vertical_8_dual aom_highbd_lpf_vertical_8_dual_c
-
-void aom_highbd_paeth_predictor_16x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_paeth_predictor_16x16 aom_highbd_paeth_predictor_16x16_c
-
-void aom_highbd_paeth_predictor_16x32_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_paeth_predictor_16x32 aom_highbd_paeth_predictor_16x32_c
-
-void aom_highbd_paeth_predictor_16x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_paeth_predictor_16x8 aom_highbd_paeth_predictor_16x8_c
-
-void aom_highbd_paeth_predictor_2x2_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_paeth_predictor_2x2 aom_highbd_paeth_predictor_2x2_c
-
-void aom_highbd_paeth_predictor_32x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_paeth_predictor_32x16 aom_highbd_paeth_predictor_32x16_c
-
-void aom_highbd_paeth_predictor_32x32_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_paeth_predictor_32x32 aom_highbd_paeth_predictor_32x32_c
-
-void aom_highbd_paeth_predictor_4x4_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_paeth_predictor_4x4 aom_highbd_paeth_predictor_4x4_c
-
-void aom_highbd_paeth_predictor_4x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_paeth_predictor_4x8 aom_highbd_paeth_predictor_4x8_c
-
-void aom_highbd_paeth_predictor_8x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_paeth_predictor_8x16 aom_highbd_paeth_predictor_8x16_c
-
-void aom_highbd_paeth_predictor_8x4_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_paeth_predictor_8x4 aom_highbd_paeth_predictor_8x4_c
-
-void aom_highbd_paeth_predictor_8x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_paeth_predictor_8x8 aom_highbd_paeth_predictor_8x8_c
-
-void aom_highbd_smooth_h_predictor_16x16_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_h_predictor_16x16 \
-  aom_highbd_smooth_h_predictor_16x16_c
-
-void aom_highbd_smooth_h_predictor_16x32_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_h_predictor_16x32 \
-  aom_highbd_smooth_h_predictor_16x32_c
-
-void aom_highbd_smooth_h_predictor_16x8_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_smooth_h_predictor_16x8 aom_highbd_smooth_h_predictor_16x8_c
-
-void aom_highbd_smooth_h_predictor_2x2_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_h_predictor_2x2 aom_highbd_smooth_h_predictor_2x2_c
-
-void aom_highbd_smooth_h_predictor_32x16_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_h_predictor_32x16 \
-  aom_highbd_smooth_h_predictor_32x16_c
-
-void aom_highbd_smooth_h_predictor_32x32_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_h_predictor_32x32 \
-  aom_highbd_smooth_h_predictor_32x32_c
-
-void aom_highbd_smooth_h_predictor_4x4_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_h_predictor_4x4 aom_highbd_smooth_h_predictor_4x4_c
-
-void aom_highbd_smooth_h_predictor_4x8_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_h_predictor_4x8 aom_highbd_smooth_h_predictor_4x8_c
-
-void aom_highbd_smooth_h_predictor_8x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_smooth_h_predictor_8x16 aom_highbd_smooth_h_predictor_8x16_c
-
-void aom_highbd_smooth_h_predictor_8x4_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_h_predictor_8x4 aom_highbd_smooth_h_predictor_8x4_c
-
-void aom_highbd_smooth_h_predictor_8x8_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_h_predictor_8x8 aom_highbd_smooth_h_predictor_8x8_c
-
-void aom_highbd_smooth_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_predictor_16x16 aom_highbd_smooth_predictor_16x16_c
-
-void aom_highbd_smooth_predictor_16x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_predictor_16x32 aom_highbd_smooth_predictor_16x32_c
-
-void aom_highbd_smooth_predictor_16x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_smooth_predictor_16x8 aom_highbd_smooth_predictor_16x8_c
-
-void aom_highbd_smooth_predictor_2x2_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_smooth_predictor_2x2 aom_highbd_smooth_predictor_2x2_c
-
-void aom_highbd_smooth_predictor_32x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_predictor_32x16 aom_highbd_smooth_predictor_32x16_c
-
-void aom_highbd_smooth_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_predictor_32x32 aom_highbd_smooth_predictor_32x32_c
-
-void aom_highbd_smooth_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_smooth_predictor_4x4 aom_highbd_smooth_predictor_4x4_c
-
-void aom_highbd_smooth_predictor_4x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_smooth_predictor_4x8 aom_highbd_smooth_predictor_4x8_c
-
-void aom_highbd_smooth_predictor_8x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_smooth_predictor_8x16 aom_highbd_smooth_predictor_8x16_c
-
-void aom_highbd_smooth_predictor_8x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_smooth_predictor_8x4 aom_highbd_smooth_predictor_8x4_c
-
-void aom_highbd_smooth_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_smooth_predictor_8x8 aom_highbd_smooth_predictor_8x8_c
-
-void aom_highbd_smooth_v_predictor_16x16_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_v_predictor_16x16 \
-  aom_highbd_smooth_v_predictor_16x16_c
-
-void aom_highbd_smooth_v_predictor_16x32_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_v_predictor_16x32 \
-  aom_highbd_smooth_v_predictor_16x32_c
-
-void aom_highbd_smooth_v_predictor_16x8_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_smooth_v_predictor_16x8 aom_highbd_smooth_v_predictor_16x8_c
-
-void aom_highbd_smooth_v_predictor_2x2_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_v_predictor_2x2 aom_highbd_smooth_v_predictor_2x2_c
-
-void aom_highbd_smooth_v_predictor_32x16_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_v_predictor_32x16 \
-  aom_highbd_smooth_v_predictor_32x16_c
-
-void aom_highbd_smooth_v_predictor_32x32_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_v_predictor_32x32 \
-  aom_highbd_smooth_v_predictor_32x32_c
-
-void aom_highbd_smooth_v_predictor_4x4_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_v_predictor_4x4 aom_highbd_smooth_v_predictor_4x4_c
-
-void aom_highbd_smooth_v_predictor_4x8_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_v_predictor_4x8 aom_highbd_smooth_v_predictor_4x8_c
-
-void aom_highbd_smooth_v_predictor_8x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_smooth_v_predictor_8x16 aom_highbd_smooth_v_predictor_8x16_c
-
-void aom_highbd_smooth_v_predictor_8x4_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_v_predictor_8x4 aom_highbd_smooth_v_predictor_8x4_c
-
-void aom_highbd_smooth_v_predictor_8x8_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_v_predictor_8x8 aom_highbd_smooth_v_predictor_8x8_c
-
-void aom_highbd_v_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_v_predictor_16x16 aom_highbd_v_predictor_16x16_c
-
-void aom_highbd_v_predictor_16x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_v_predictor_16x32 aom_highbd_v_predictor_16x32_c
-
-void aom_highbd_v_predictor_16x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_v_predictor_16x8 aom_highbd_v_predictor_16x8_c
-
-void aom_highbd_v_predictor_2x2_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_v_predictor_2x2 aom_highbd_v_predictor_2x2_c
-
-void aom_highbd_v_predictor_32x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_v_predictor_32x16 aom_highbd_v_predictor_32x16_c
-
-void aom_highbd_v_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_v_predictor_32x32 aom_highbd_v_predictor_32x32_c
-
-void aom_highbd_v_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_v_predictor_4x4 aom_highbd_v_predictor_4x4_c
-
-void aom_highbd_v_predictor_4x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_v_predictor_4x8 aom_highbd_v_predictor_4x8_c
-
-void aom_highbd_v_predictor_8x16_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_v_predictor_8x16 aom_highbd_v_predictor_8x16_c
-
-void aom_highbd_v_predictor_8x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_v_predictor_8x4 aom_highbd_v_predictor_8x4_c
-
-void aom_highbd_v_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_v_predictor_8x8 aom_highbd_v_predictor_8x8_c
-
 void aom_idct16x16_10_add_c(const tran_low_t* input,
                             uint8_t* dest,
                             int dest_stride);
diff --git a/third_party/libaom/source/config/linux/generic/av1_rtcd.h b/third_party/libaom/source/config/linux/generic/av1_rtcd.h
index 2ed4295..f5848a98 100644
--- a/third_party/libaom/source/config/linux/generic/av1_rtcd.h
+++ b/third_party/libaom/source/config/linux/generic/av1_rtcd.h
@@ -137,278 +137,6 @@
                          ConvolveParams* conv_params);
 #define av1_convolve_vert av1_convolve_vert_c
 
-void av1_highbd_convolve8_c(const uint8_t* src,
-                            ptrdiff_t src_stride,
-                            uint8_t* dst,
-                            ptrdiff_t dst_stride,
-                            const int16_t* filter_x,
-                            int x_step_q4,
-                            const int16_t* filter_y,
-                            int y_step_q4,
-                            int w,
-                            int h,
-                            int bps);
-#define av1_highbd_convolve8 av1_highbd_convolve8_c
-
-void av1_highbd_convolve8_avg_c(const uint8_t* src,
-                                ptrdiff_t src_stride,
-                                uint8_t* dst,
-                                ptrdiff_t dst_stride,
-                                const int16_t* filter_x,
-                                int x_step_q4,
-                                const int16_t* filter_y,
-                                int y_step_q4,
-                                int w,
-                                int h,
-                                int bps);
-#define av1_highbd_convolve8_avg av1_highbd_convolve8_avg_c
-
-void av1_highbd_convolve8_avg_horiz_c(const uint8_t* src,
-                                      ptrdiff_t src_stride,
-                                      uint8_t* dst,
-                                      ptrdiff_t dst_stride,
-                                      const int16_t* filter_x,
-                                      int x_step_q4,
-                                      const int16_t* filter_y,
-                                      int y_step_q4,
-                                      int w,
-                                      int h,
-                                      int bps);
-#define av1_highbd_convolve8_avg_horiz av1_highbd_convolve8_avg_horiz_c
-
-void av1_highbd_convolve8_avg_vert_c(const uint8_t* src,
-                                     ptrdiff_t src_stride,
-                                     uint8_t* dst,
-                                     ptrdiff_t dst_stride,
-                                     const int16_t* filter_x,
-                                     int x_step_q4,
-                                     const int16_t* filter_y,
-                                     int y_step_q4,
-                                     int w,
-                                     int h,
-                                     int bps);
-#define av1_highbd_convolve8_avg_vert av1_highbd_convolve8_avg_vert_c
-
-void av1_highbd_convolve8_horiz_c(const uint8_t* src,
-                                  ptrdiff_t src_stride,
-                                  uint8_t* dst,
-                                  ptrdiff_t dst_stride,
-                                  const int16_t* filter_x,
-                                  int x_step_q4,
-                                  const int16_t* filter_y,
-                                  int y_step_q4,
-                                  int w,
-                                  int h,
-                                  int bps);
-#define av1_highbd_convolve8_horiz av1_highbd_convolve8_horiz_c
-
-void av1_highbd_convolve8_vert_c(const uint8_t* src,
-                                 ptrdiff_t src_stride,
-                                 uint8_t* dst,
-                                 ptrdiff_t dst_stride,
-                                 const int16_t* filter_x,
-                                 int x_step_q4,
-                                 const int16_t* filter_y,
-                                 int y_step_q4,
-                                 int w,
-                                 int h,
-                                 int bps);
-#define av1_highbd_convolve8_vert av1_highbd_convolve8_vert_c
-
-void av1_highbd_convolve_2d_c(const uint16_t* src,
-                              int src_stride,
-                              CONV_BUF_TYPE* dst,
-                              int dst_stride,
-                              int w,
-                              int h,
-                              InterpFilterParams* filter_params_x,
-                              InterpFilterParams* filter_params_y,
-                              const int subpel_x_q4,
-                              const int subpel_y_q4,
-                              ConvolveParams* conv_params,
-                              int bd);
-#define av1_highbd_convolve_2d av1_highbd_convolve_2d_c
-
-void av1_highbd_convolve_2d_scale_c(const uint16_t* src,
-                                    int src_stride,
-                                    CONV_BUF_TYPE* dst,
-                                    int dst_stride,
-                                    int w,
-                                    int h,
-                                    InterpFilterParams* filter_params_x,
-                                    InterpFilterParams* filter_params_y,
-                                    const int subpel_x_q4,
-                                    const int x_step_qn,
-                                    const int subpel_y_q4,
-                                    const int y_step_qn,
-                                    ConvolveParams* conv_params,
-                                    int bd);
-#define av1_highbd_convolve_2d_scale av1_highbd_convolve_2d_scale_c
-
-void av1_highbd_convolve_avg_c(const uint8_t* src,
-                               ptrdiff_t src_stride,
-                               uint8_t* dst,
-                               ptrdiff_t dst_stride,
-                               const int16_t* filter_x,
-                               int x_step_q4,
-                               const int16_t* filter_y,
-                               int y_step_q4,
-                               int w,
-                               int h,
-                               int bps);
-#define av1_highbd_convolve_avg av1_highbd_convolve_avg_c
-
-void av1_highbd_convolve_copy_c(const uint8_t* src,
-                                ptrdiff_t src_stride,
-                                uint8_t* dst,
-                                ptrdiff_t dst_stride,
-                                const int16_t* filter_x,
-                                int x_step_q4,
-                                const int16_t* filter_y,
-                                int y_step_q4,
-                                int w,
-                                int h,
-                                int bps);
-#define av1_highbd_convolve_copy av1_highbd_convolve_copy_c
-
-void av1_highbd_convolve_horiz_c(const uint16_t* src,
-                                 int src_stride,
-                                 uint16_t* dst,
-                                 int dst_stride,
-                                 int w,
-                                 int h,
-                                 const InterpFilterParams fp,
-                                 const int subpel_x_q4,
-                                 int x_step_q4,
-                                 int avg,
-                                 int bd);
-#define av1_highbd_convolve_horiz av1_highbd_convolve_horiz_c
-
-void av1_highbd_convolve_init_c(void);
-#define av1_highbd_convolve_init av1_highbd_convolve_init_c
-
-void av1_highbd_convolve_rounding_c(const int32_t* src,
-                                    int src_stride,
-                                    uint8_t* dst,
-                                    int dst_stride,
-                                    int w,
-                                    int h,
-                                    int bits,
-                                    int bd);
-#define av1_highbd_convolve_rounding av1_highbd_convolve_rounding_c
-
-void av1_highbd_convolve_vert_c(const uint16_t* src,
-                                int src_stride,
-                                uint16_t* dst,
-                                int dst_stride,
-                                int w,
-                                int h,
-                                const InterpFilterParams fp,
-                                const int subpel_x_q4,
-                                int x_step_q4,
-                                int avg,
-                                int bd);
-#define av1_highbd_convolve_vert av1_highbd_convolve_vert_c
-
-void av1_highbd_iht16x16_256_add_c(const tran_low_t* input,
-                                   uint8_t* output,
-                                   int pitch,
-                                   const struct txfm_param* param);
-#define av1_highbd_iht16x16_256_add av1_highbd_iht16x16_256_add_c
-
-void av1_highbd_iht16x32_512_add_c(const tran_low_t* input,
-                                   uint8_t* dest,
-                                   int dest_stride,
-                                   const struct txfm_param* param);
-#define av1_highbd_iht16x32_512_add av1_highbd_iht16x32_512_add_c
-
-void av1_highbd_iht16x4_64_add_c(const tran_low_t* input,
-                                 uint8_t* dest,
-                                 int dest_stride,
-                                 const struct txfm_param* param);
-#define av1_highbd_iht16x4_64_add av1_highbd_iht16x4_64_add_c
-
-void av1_highbd_iht16x8_128_add_c(const tran_low_t* input,
-                                  uint8_t* dest,
-                                  int dest_stride,
-                                  const struct txfm_param* param);
-#define av1_highbd_iht16x8_128_add av1_highbd_iht16x8_128_add_c
-
-void av1_highbd_iht32x16_512_add_c(const tran_low_t* input,
-                                   uint8_t* dest,
-                                   int dest_stride,
-                                   const struct txfm_param* param);
-#define av1_highbd_iht32x16_512_add av1_highbd_iht32x16_512_add_c
-
-void av1_highbd_iht32x8_256_add_c(const tran_low_t* input,
-                                  uint8_t* dest,
-                                  int dest_stride,
-                                  const struct txfm_param* param);
-#define av1_highbd_iht32x8_256_add av1_highbd_iht32x8_256_add_c
-
-void av1_highbd_iht4x16_64_add_c(const tran_low_t* input,
-                                 uint8_t* dest,
-                                 int dest_stride,
-                                 const struct txfm_param* param);
-#define av1_highbd_iht4x16_64_add av1_highbd_iht4x16_64_add_c
-
-void av1_highbd_iht4x4_16_add_c(const tran_low_t* input,
-                                uint8_t* dest,
-                                int dest_stride,
-                                const struct txfm_param* param);
-#define av1_highbd_iht4x4_16_add av1_highbd_iht4x4_16_add_c
-
-void av1_highbd_iht4x8_32_add_c(const tran_low_t* input,
-                                uint8_t* dest,
-                                int dest_stride,
-                                const struct txfm_param* param);
-#define av1_highbd_iht4x8_32_add av1_highbd_iht4x8_32_add_c
-
-void av1_highbd_iht8x16_128_add_c(const tran_low_t* input,
-                                  uint8_t* dest,
-                                  int dest_stride,
-                                  const struct txfm_param* param);
-#define av1_highbd_iht8x16_128_add av1_highbd_iht8x16_128_add_c
-
-void av1_highbd_iht8x32_256_add_c(const tran_low_t* input,
-                                  uint8_t* dest,
-                                  int dest_stride,
-                                  const struct txfm_param* param);
-#define av1_highbd_iht8x32_256_add av1_highbd_iht8x32_256_add_c
-
-void av1_highbd_iht8x4_32_add_c(const tran_low_t* input,
-                                uint8_t* dest,
-                                int dest_stride,
-                                const struct txfm_param* param);
-#define av1_highbd_iht8x4_32_add av1_highbd_iht8x4_32_add_c
-
-void av1_highbd_iht8x8_64_add_c(const tran_low_t* input,
-                                uint8_t* dest,
-                                int dest_stride,
-                                const struct txfm_param* param);
-#define av1_highbd_iht8x8_64_add av1_highbd_iht8x8_64_add_c
-
-void av1_highbd_warp_affine_c(const int32_t* mat,
-                              const uint16_t* ref,
-                              int width,
-                              int height,
-                              int stride,
-                              uint16_t* pred,
-                              int p_col,
-                              int p_row,
-                              int p_width,
-                              int p_height,
-                              int p_stride,
-                              int subsampling_x,
-                              int subsampling_y,
-                              int bd,
-                              ConvolveParams* conv_params,
-                              int16_t alpha,
-                              int16_t beta,
-                              int16_t gamma,
-                              int16_t delta);
-#define av1_highbd_warp_affine av1_highbd_warp_affine_c
-
 void av1_iht16x16_256_add_c(const tran_low_t* input,
                             uint8_t* output,
                             int pitch,
diff --git a/third_party/libaom/source/config/linux/ia32/aom_config.asm b/third_party/libaom/source/config/linux/ia32/aom_config.asm
index 9f09448..0eb2487 100644
--- a/third_party/libaom/source/config/linux/ia32/aom_config.asm
+++ b/third_party/libaom/source/config/linux/ia32/aom_config.asm
@@ -61,7 +61,7 @@
 %define CONFIG_ENCODE_PERF_TESTS 0
 %define CONFIG_COEFFICIENT_RANGE_CHECKING 0
 %define CONFIG_LOWBITDEPTH 1
-%define CONFIG_HIGHBITDEPTH 1
+%define CONFIG_HIGHBITDEPTH 0
 %define CONFIG_EXPERIMENTAL 0
 %define CONFIG_SIZE_LIMIT 1
 %define CONFIG_FP_MB_STATS 0
diff --git a/third_party/libaom/source/config/linux/ia32/aom_config.c b/third_party/libaom/source/config/linux/ia32/aom_config.c
index 364a42b..1a5b673 100644
--- a/third_party/libaom/source/config/linux/ia32/aom_config.c
+++ b/third_party/libaom/source/config/linux/ia32/aom_config.c
@@ -7,5 +7,5 @@
 /* Media Patent License 1.0 was not distributed with this source code in the */
 /* PATENTS file, you can obtain it at www.aomedia.org/license/patent. */
 #include "aom/aom_codec.h"
-static const char* const cfg = "--target=x86-linux-gcc --enable-external-build --enable-postproc --disable-av1-encoder --size-limit=16384x16384 --enable-realtime-only --disable-install-docs --enable-pic --as=yasm";
+static const char* const cfg = "--target=x86-linux-gcc --enable-external-build --enable-postproc --disable-av1-encoder --size-limit=16384x16384 --enable-realtime-only --disable-install-docs --disable-highbitdepth --enable-pic --as=yasm";
 const char *aom_codec_build_config(void) {return cfg;}
diff --git a/third_party/libaom/source/config/linux/ia32/aom_config.h b/third_party/libaom/source/config/linux/ia32/aom_config.h
index ff9b83f..ad1b686 100644
--- a/third_party/libaom/source/config/linux/ia32/aom_config.h
+++ b/third_party/libaom/source/config/linux/ia32/aom_config.h
@@ -74,7 +74,7 @@
 #define CONFIG_ENCODE_PERF_TESTS 0
 #define CONFIG_COEFFICIENT_RANGE_CHECKING 0
 #define CONFIG_LOWBITDEPTH 1
-#define CONFIG_HIGHBITDEPTH 1
+#define CONFIG_HIGHBITDEPTH 0
 #define CONFIG_EXPERIMENTAL 0
 #define CONFIG_SIZE_LIMIT 1
 #define CONFIG_FP_MB_STATS 0
diff --git a/third_party/libaom/source/config/linux/ia32/aom_dsp_rtcd.h b/third_party/libaom/source/config/linux/ia32/aom_dsp_rtcd.h
index ba767f6..453381bc 100644
--- a/third_party/libaom/source/config/linux/ia32/aom_dsp_rtcd.h
+++ b/third_party/libaom/source/config/linux/ia32/aom_dsp_rtcd.h
@@ -1449,1285 +1449,6 @@
                                         const uint8_t* above,
                                         const uint8_t* left);
 
-void aom_highbd_blend_a64_hmask_c(uint8_t* dst,
-                                  uint32_t dst_stride,
-                                  const uint8_t* src0,
-                                  uint32_t src0_stride,
-                                  const uint8_t* src1,
-                                  uint32_t src1_stride,
-                                  const uint8_t* mask,
-                                  int h,
-                                  int w,
-                                  int bd);
-void aom_highbd_blend_a64_hmask_sse4_1(uint8_t* dst,
-                                       uint32_t dst_stride,
-                                       const uint8_t* src0,
-                                       uint32_t src0_stride,
-                                       const uint8_t* src1,
-                                       uint32_t src1_stride,
-                                       const uint8_t* mask,
-                                       int h,
-                                       int w,
-                                       int bd);
-RTCD_EXTERN void (*aom_highbd_blend_a64_hmask)(uint8_t* dst,
-                                               uint32_t dst_stride,
-                                               const uint8_t* src0,
-                                               uint32_t src0_stride,
-                                               const uint8_t* src1,
-                                               uint32_t src1_stride,
-                                               const uint8_t* mask,
-                                               int h,
-                                               int w,
-                                               int bd);
-
-void aom_highbd_blend_a64_mask_c(uint8_t* dst,
-                                 uint32_t dst_stride,
-                                 const uint8_t* src0,
-                                 uint32_t src0_stride,
-                                 const uint8_t* src1,
-                                 uint32_t src1_stride,
-                                 const uint8_t* mask,
-                                 uint32_t mask_stride,
-                                 int h,
-                                 int w,
-                                 int suby,
-                                 int subx,
-                                 int bd);
-void aom_highbd_blend_a64_mask_sse4_1(uint8_t* dst,
-                                      uint32_t dst_stride,
-                                      const uint8_t* src0,
-                                      uint32_t src0_stride,
-                                      const uint8_t* src1,
-                                      uint32_t src1_stride,
-                                      const uint8_t* mask,
-                                      uint32_t mask_stride,
-                                      int h,
-                                      int w,
-                                      int suby,
-                                      int subx,
-                                      int bd);
-RTCD_EXTERN void (*aom_highbd_blend_a64_mask)(uint8_t* dst,
-                                              uint32_t dst_stride,
-                                              const uint8_t* src0,
-                                              uint32_t src0_stride,
-                                              const uint8_t* src1,
-                                              uint32_t src1_stride,
-                                              const uint8_t* mask,
-                                              uint32_t mask_stride,
-                                              int h,
-                                              int w,
-                                              int suby,
-                                              int subx,
-                                              int bd);
-
-void aom_highbd_blend_a64_vmask_c(uint8_t* dst,
-                                  uint32_t dst_stride,
-                                  const uint8_t* src0,
-                                  uint32_t src0_stride,
-                                  const uint8_t* src1,
-                                  uint32_t src1_stride,
-                                  const uint8_t* mask,
-                                  int h,
-                                  int w,
-                                  int bd);
-void aom_highbd_blend_a64_vmask_sse4_1(uint8_t* dst,
-                                       uint32_t dst_stride,
-                                       const uint8_t* src0,
-                                       uint32_t src0_stride,
-                                       const uint8_t* src1,
-                                       uint32_t src1_stride,
-                                       const uint8_t* mask,
-                                       int h,
-                                       int w,
-                                       int bd);
-RTCD_EXTERN void (*aom_highbd_blend_a64_vmask)(uint8_t* dst,
-                                               uint32_t dst_stride,
-                                               const uint8_t* src0,
-                                               uint32_t src0_stride,
-                                               const uint8_t* src1,
-                                               uint32_t src1_stride,
-                                               const uint8_t* mask,
-                                               int h,
-                                               int w,
-                                               int bd);
-
-void aom_highbd_convolve8_c(const uint8_t* src,
-                            ptrdiff_t src_stride,
-                            uint8_t* dst,
-                            ptrdiff_t dst_stride,
-                            const int16_t* filter_x,
-                            int x_step_q4,
-                            const int16_t* filter_y,
-                            int y_step_q4,
-                            int w,
-                            int h,
-                            int bps);
-void aom_highbd_convolve8_avx2(const uint8_t* src,
-                               ptrdiff_t src_stride,
-                               uint8_t* dst,
-                               ptrdiff_t dst_stride,
-                               const int16_t* filter_x,
-                               int x_step_q4,
-                               const int16_t* filter_y,
-                               int y_step_q4,
-                               int w,
-                               int h,
-                               int bps);
-RTCD_EXTERN void (*aom_highbd_convolve8)(const uint8_t* src,
-                                         ptrdiff_t src_stride,
-                                         uint8_t* dst,
-                                         ptrdiff_t dst_stride,
-                                         const int16_t* filter_x,
-                                         int x_step_q4,
-                                         const int16_t* filter_y,
-                                         int y_step_q4,
-                                         int w,
-                                         int h,
-                                         int bps);
-
-void aom_highbd_convolve8_avg_c(const uint8_t* src,
-                                ptrdiff_t src_stride,
-                                uint8_t* dst,
-                                ptrdiff_t dst_stride,
-                                const int16_t* filter_x,
-                                int x_step_q4,
-                                const int16_t* filter_y,
-                                int y_step_q4,
-                                int w,
-                                int h,
-                                int bps);
-void aom_highbd_convolve8_avg_avx2(const uint8_t* src,
-                                   ptrdiff_t src_stride,
-                                   uint8_t* dst,
-                                   ptrdiff_t dst_stride,
-                                   const int16_t* filter_x,
-                                   int x_step_q4,
-                                   const int16_t* filter_y,
-                                   int y_step_q4,
-                                   int w,
-                                   int h,
-                                   int bps);
-RTCD_EXTERN void (*aom_highbd_convolve8_avg)(const uint8_t* src,
-                                             ptrdiff_t src_stride,
-                                             uint8_t* dst,
-                                             ptrdiff_t dst_stride,
-                                             const int16_t* filter_x,
-                                             int x_step_q4,
-                                             const int16_t* filter_y,
-                                             int y_step_q4,
-                                             int w,
-                                             int h,
-                                             int bps);
-
-void aom_highbd_convolve8_avg_horiz_c(const uint8_t* src,
-                                      ptrdiff_t src_stride,
-                                      uint8_t* dst,
-                                      ptrdiff_t dst_stride,
-                                      const int16_t* filter_x,
-                                      int x_step_q4,
-                                      const int16_t* filter_y,
-                                      int y_step_q4,
-                                      int w,
-                                      int h,
-                                      int bps);
-void aom_highbd_convolve8_avg_horiz_avx2(const uint8_t* src,
-                                         ptrdiff_t src_stride,
-                                         uint8_t* dst,
-                                         ptrdiff_t dst_stride,
-                                         const int16_t* filter_x,
-                                         int x_step_q4,
-                                         const int16_t* filter_y,
-                                         int y_step_q4,
-                                         int w,
-                                         int h,
-                                         int bps);
-RTCD_EXTERN void (*aom_highbd_convolve8_avg_horiz)(const uint8_t* src,
-                                                   ptrdiff_t src_stride,
-                                                   uint8_t* dst,
-                                                   ptrdiff_t dst_stride,
-                                                   const int16_t* filter_x,
-                                                   int x_step_q4,
-                                                   const int16_t* filter_y,
-                                                   int y_step_q4,
-                                                   int w,
-                                                   int h,
-                                                   int bps);
-
-void aom_highbd_convolve8_avg_vert_c(const uint8_t* src,
-                                     ptrdiff_t src_stride,
-                                     uint8_t* dst,
-                                     ptrdiff_t dst_stride,
-                                     const int16_t* filter_x,
-                                     int x_step_q4,
-                                     const int16_t* filter_y,
-                                     int y_step_q4,
-                                     int w,
-                                     int h,
-                                     int bps);
-void aom_highbd_convolve8_avg_vert_avx2(const uint8_t* src,
-                                        ptrdiff_t src_stride,
-                                        uint8_t* dst,
-                                        ptrdiff_t dst_stride,
-                                        const int16_t* filter_x,
-                                        int x_step_q4,
-                                        const int16_t* filter_y,
-                                        int y_step_q4,
-                                        int w,
-                                        int h,
-                                        int bps);
-RTCD_EXTERN void (*aom_highbd_convolve8_avg_vert)(const uint8_t* src,
-                                                  ptrdiff_t src_stride,
-                                                  uint8_t* dst,
-                                                  ptrdiff_t dst_stride,
-                                                  const int16_t* filter_x,
-                                                  int x_step_q4,
-                                                  const int16_t* filter_y,
-                                                  int y_step_q4,
-                                                  int w,
-                                                  int h,
-                                                  int bps);
-
-void aom_highbd_convolve8_horiz_c(const uint8_t* src,
-                                  ptrdiff_t src_stride,
-                                  uint8_t* dst,
-                                  ptrdiff_t dst_stride,
-                                  const int16_t* filter_x,
-                                  int x_step_q4,
-                                  const int16_t* filter_y,
-                                  int y_step_q4,
-                                  int w,
-                                  int h,
-                                  int bps);
-void aom_highbd_convolve8_horiz_avx2(const uint8_t* src,
-                                     ptrdiff_t src_stride,
-                                     uint8_t* dst,
-                                     ptrdiff_t dst_stride,
-                                     const int16_t* filter_x,
-                                     int x_step_q4,
-                                     const int16_t* filter_y,
-                                     int y_step_q4,
-                                     int w,
-                                     int h,
-                                     int bps);
-RTCD_EXTERN void (*aom_highbd_convolve8_horiz)(const uint8_t* src,
-                                               ptrdiff_t src_stride,
-                                               uint8_t* dst,
-                                               ptrdiff_t dst_stride,
-                                               const int16_t* filter_x,
-                                               int x_step_q4,
-                                               const int16_t* filter_y,
-                                               int y_step_q4,
-                                               int w,
-                                               int h,
-                                               int bps);
-
-void aom_highbd_convolve8_vert_c(const uint8_t* src,
-                                 ptrdiff_t src_stride,
-                                 uint8_t* dst,
-                                 ptrdiff_t dst_stride,
-                                 const int16_t* filter_x,
-                                 int x_step_q4,
-                                 const int16_t* filter_y,
-                                 int y_step_q4,
-                                 int w,
-                                 int h,
-                                 int bps);
-void aom_highbd_convolve8_vert_avx2(const uint8_t* src,
-                                    ptrdiff_t src_stride,
-                                    uint8_t* dst,
-                                    ptrdiff_t dst_stride,
-                                    const int16_t* filter_x,
-                                    int x_step_q4,
-                                    const int16_t* filter_y,
-                                    int y_step_q4,
-                                    int w,
-                                    int h,
-                                    int bps);
-RTCD_EXTERN void (*aom_highbd_convolve8_vert)(const uint8_t* src,
-                                              ptrdiff_t src_stride,
-                                              uint8_t* dst,
-                                              ptrdiff_t dst_stride,
-                                              const int16_t* filter_x,
-                                              int x_step_q4,
-                                              const int16_t* filter_y,
-                                              int y_step_q4,
-                                              int w,
-                                              int h,
-                                              int bps);
-
-void aom_highbd_convolve_avg_c(const uint8_t* src,
-                               ptrdiff_t src_stride,
-                               uint8_t* dst,
-                               ptrdiff_t dst_stride,
-                               const int16_t* filter_x,
-                               int x_step_q4,
-                               const int16_t* filter_y,
-                               int y_step_q4,
-                               int w,
-                               int h,
-                               int bps);
-void aom_highbd_convolve_avg_sse2(const uint8_t* src,
-                                  ptrdiff_t src_stride,
-                                  uint8_t* dst,
-                                  ptrdiff_t dst_stride,
-                                  const int16_t* filter_x,
-                                  int x_step_q4,
-                                  const int16_t* filter_y,
-                                  int y_step_q4,
-                                  int w,
-                                  int h,
-                                  int bps);
-void aom_highbd_convolve_avg_avx2(const uint8_t* src,
-                                  ptrdiff_t src_stride,
-                                  uint8_t* dst,
-                                  ptrdiff_t dst_stride,
-                                  const int16_t* filter_x,
-                                  int x_step_q4,
-                                  const int16_t* filter_y,
-                                  int y_step_q4,
-                                  int w,
-                                  int h,
-                                  int bps);
-RTCD_EXTERN void (*aom_highbd_convolve_avg)(const uint8_t* src,
-                                            ptrdiff_t src_stride,
-                                            uint8_t* dst,
-                                            ptrdiff_t dst_stride,
-                                            const int16_t* filter_x,
-                                            int x_step_q4,
-                                            const int16_t* filter_y,
-                                            int y_step_q4,
-                                            int w,
-                                            int h,
-                                            int bps);
-
-void aom_highbd_convolve_copy_c(const uint8_t* src,
-                                ptrdiff_t src_stride,
-                                uint8_t* dst,
-                                ptrdiff_t dst_stride,
-                                const int16_t* filter_x,
-                                int x_step_q4,
-                                const int16_t* filter_y,
-                                int y_step_q4,
-                                int w,
-                                int h,
-                                int bps);
-void aom_highbd_convolve_copy_sse2(const uint8_t* src,
-                                   ptrdiff_t src_stride,
-                                   uint8_t* dst,
-                                   ptrdiff_t dst_stride,
-                                   const int16_t* filter_x,
-                                   int x_step_q4,
-                                   const int16_t* filter_y,
-                                   int y_step_q4,
-                                   int w,
-                                   int h,
-                                   int bps);
-void aom_highbd_convolve_copy_avx2(const uint8_t* src,
-                                   ptrdiff_t src_stride,
-                                   uint8_t* dst,
-                                   ptrdiff_t dst_stride,
-                                   const int16_t* filter_x,
-                                   int x_step_q4,
-                                   const int16_t* filter_y,
-                                   int y_step_q4,
-                                   int w,
-                                   int h,
-                                   int bps);
-RTCD_EXTERN void (*aom_highbd_convolve_copy)(const uint8_t* src,
-                                             ptrdiff_t src_stride,
-                                             uint8_t* dst,
-                                             ptrdiff_t dst_stride,
-                                             const int16_t* filter_x,
-                                             int x_step_q4,
-                                             const int16_t* filter_y,
-                                             int y_step_q4,
-                                             int w,
-                                             int h,
-                                             int bps);
-
-void aom_highbd_d117_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d117_predictor_16x16 aom_highbd_d117_predictor_16x16_c
-
-void aom_highbd_d117_predictor_16x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d117_predictor_16x32 aom_highbd_d117_predictor_16x32_c
-
-void aom_highbd_d117_predictor_16x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d117_predictor_16x8 aom_highbd_d117_predictor_16x8_c
-
-void aom_highbd_d117_predictor_2x2_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d117_predictor_2x2 aom_highbd_d117_predictor_2x2_c
-
-void aom_highbd_d117_predictor_32x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d117_predictor_32x16 aom_highbd_d117_predictor_32x16_c
-
-void aom_highbd_d117_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d117_predictor_32x32 aom_highbd_d117_predictor_32x32_c
-
-void aom_highbd_d117_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d117_predictor_4x4 aom_highbd_d117_predictor_4x4_c
-
-void aom_highbd_d117_predictor_4x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d117_predictor_4x8 aom_highbd_d117_predictor_4x8_c
-
-void aom_highbd_d117_predictor_8x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d117_predictor_8x16 aom_highbd_d117_predictor_8x16_c
-
-void aom_highbd_d117_predictor_8x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d117_predictor_8x4 aom_highbd_d117_predictor_8x4_c
-
-void aom_highbd_d117_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d117_predictor_8x8 aom_highbd_d117_predictor_8x8_c
-
-void aom_highbd_d135_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d135_predictor_16x16 aom_highbd_d135_predictor_16x16_c
-
-void aom_highbd_d135_predictor_16x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d135_predictor_16x32 aom_highbd_d135_predictor_16x32_c
-
-void aom_highbd_d135_predictor_16x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d135_predictor_16x8 aom_highbd_d135_predictor_16x8_c
-
-void aom_highbd_d135_predictor_2x2_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d135_predictor_2x2 aom_highbd_d135_predictor_2x2_c
-
-void aom_highbd_d135_predictor_32x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d135_predictor_32x16 aom_highbd_d135_predictor_32x16_c
-
-void aom_highbd_d135_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d135_predictor_32x32 aom_highbd_d135_predictor_32x32_c
-
-void aom_highbd_d135_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d135_predictor_4x4 aom_highbd_d135_predictor_4x4_c
-
-void aom_highbd_d135_predictor_4x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d135_predictor_4x8 aom_highbd_d135_predictor_4x8_c
-
-void aom_highbd_d135_predictor_8x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d135_predictor_8x16 aom_highbd_d135_predictor_8x16_c
-
-void aom_highbd_d135_predictor_8x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d135_predictor_8x4 aom_highbd_d135_predictor_8x4_c
-
-void aom_highbd_d135_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d135_predictor_8x8 aom_highbd_d135_predictor_8x8_c
-
-void aom_highbd_d153_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d153_predictor_16x16 aom_highbd_d153_predictor_16x16_c
-
-void aom_highbd_d153_predictor_16x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d153_predictor_16x32 aom_highbd_d153_predictor_16x32_c
-
-void aom_highbd_d153_predictor_16x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d153_predictor_16x8 aom_highbd_d153_predictor_16x8_c
-
-void aom_highbd_d153_predictor_2x2_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d153_predictor_2x2 aom_highbd_d153_predictor_2x2_c
-
-void aom_highbd_d153_predictor_32x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d153_predictor_32x16 aom_highbd_d153_predictor_32x16_c
-
-void aom_highbd_d153_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d153_predictor_32x32 aom_highbd_d153_predictor_32x32_c
-
-void aom_highbd_d153_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d153_predictor_4x4 aom_highbd_d153_predictor_4x4_c
-
-void aom_highbd_d153_predictor_4x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d153_predictor_4x8 aom_highbd_d153_predictor_4x8_c
-
-void aom_highbd_d153_predictor_8x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d153_predictor_8x16 aom_highbd_d153_predictor_8x16_c
-
-void aom_highbd_d153_predictor_8x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d153_predictor_8x4 aom_highbd_d153_predictor_8x4_c
-
-void aom_highbd_d153_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d153_predictor_8x8 aom_highbd_d153_predictor_8x8_c
-
-void aom_highbd_d207e_predictor_16x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_d207e_predictor_16x16 aom_highbd_d207e_predictor_16x16_c
-
-void aom_highbd_d207e_predictor_16x32_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_d207e_predictor_16x32 aom_highbd_d207e_predictor_16x32_c
-
-void aom_highbd_d207e_predictor_16x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d207e_predictor_16x8 aom_highbd_d207e_predictor_16x8_c
-
-void aom_highbd_d207e_predictor_2x2_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d207e_predictor_2x2 aom_highbd_d207e_predictor_2x2_c
-
-void aom_highbd_d207e_predictor_32x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_d207e_predictor_32x16 aom_highbd_d207e_predictor_32x16_c
-
-void aom_highbd_d207e_predictor_32x32_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_d207e_predictor_32x32 aom_highbd_d207e_predictor_32x32_c
-
-void aom_highbd_d207e_predictor_4x4_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d207e_predictor_4x4 aom_highbd_d207e_predictor_4x4_c
-
-void aom_highbd_d207e_predictor_4x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d207e_predictor_4x8 aom_highbd_d207e_predictor_4x8_c
-
-void aom_highbd_d207e_predictor_8x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d207e_predictor_8x16 aom_highbd_d207e_predictor_8x16_c
-
-void aom_highbd_d207e_predictor_8x4_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d207e_predictor_8x4 aom_highbd_d207e_predictor_8x4_c
-
-void aom_highbd_d207e_predictor_8x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d207e_predictor_8x8 aom_highbd_d207e_predictor_8x8_c
-
-void aom_highbd_d45e_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d45e_predictor_16x16 aom_highbd_d45e_predictor_16x16_c
-
-void aom_highbd_d45e_predictor_16x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d45e_predictor_16x32 aom_highbd_d45e_predictor_16x32_c
-
-void aom_highbd_d45e_predictor_16x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d45e_predictor_16x8 aom_highbd_d45e_predictor_16x8_c
-
-void aom_highbd_d45e_predictor_2x2_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d45e_predictor_2x2 aom_highbd_d45e_predictor_2x2_c
-
-void aom_highbd_d45e_predictor_32x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d45e_predictor_32x16 aom_highbd_d45e_predictor_32x16_c
-
-void aom_highbd_d45e_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d45e_predictor_32x32 aom_highbd_d45e_predictor_32x32_c
-
-void aom_highbd_d45e_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d45e_predictor_4x4 aom_highbd_d45e_predictor_4x4_c
-
-void aom_highbd_d45e_predictor_4x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d45e_predictor_4x8 aom_highbd_d45e_predictor_4x8_c
-
-void aom_highbd_d45e_predictor_8x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d45e_predictor_8x16 aom_highbd_d45e_predictor_8x16_c
-
-void aom_highbd_d45e_predictor_8x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d45e_predictor_8x4 aom_highbd_d45e_predictor_8x4_c
-
-void aom_highbd_d45e_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d45e_predictor_8x8 aom_highbd_d45e_predictor_8x8_c
-
-void aom_highbd_d63e_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d63e_predictor_16x16 aom_highbd_d63e_predictor_16x16_c
-
-void aom_highbd_d63e_predictor_16x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d63e_predictor_16x32 aom_highbd_d63e_predictor_16x32_c
-
-void aom_highbd_d63e_predictor_16x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d63e_predictor_16x8 aom_highbd_d63e_predictor_16x8_c
-
-void aom_highbd_d63e_predictor_2x2_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d63e_predictor_2x2 aom_highbd_d63e_predictor_2x2_c
-
-void aom_highbd_d63e_predictor_32x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d63e_predictor_32x16 aom_highbd_d63e_predictor_32x16_c
-
-void aom_highbd_d63e_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d63e_predictor_32x32 aom_highbd_d63e_predictor_32x32_c
-
-void aom_highbd_d63e_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d63e_predictor_4x4 aom_highbd_d63e_predictor_4x4_c
-
-void aom_highbd_d63e_predictor_4x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d63e_predictor_4x8 aom_highbd_d63e_predictor_4x8_c
-
-void aom_highbd_d63e_predictor_8x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d63e_predictor_8x16 aom_highbd_d63e_predictor_8x16_c
-
-void aom_highbd_d63e_predictor_8x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d63e_predictor_8x4 aom_highbd_d63e_predictor_8x4_c
-
-void aom_highbd_d63e_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d63e_predictor_8x8 aom_highbd_d63e_predictor_8x8_c
-
-void aom_highbd_dc_128_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_128_predictor_16x16 aom_highbd_dc_128_predictor_16x16_c
-
-void aom_highbd_dc_128_predictor_16x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_128_predictor_16x32 aom_highbd_dc_128_predictor_16x32_c
-
-void aom_highbd_dc_128_predictor_16x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_128_predictor_16x8 aom_highbd_dc_128_predictor_16x8_c
-
-void aom_highbd_dc_128_predictor_2x2_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_128_predictor_2x2 aom_highbd_dc_128_predictor_2x2_c
-
-void aom_highbd_dc_128_predictor_32x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_128_predictor_32x16 aom_highbd_dc_128_predictor_32x16_c
-
-void aom_highbd_dc_128_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_128_predictor_32x32 aom_highbd_dc_128_predictor_32x32_c
-
-void aom_highbd_dc_128_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_128_predictor_4x4 aom_highbd_dc_128_predictor_4x4_c
-
-void aom_highbd_dc_128_predictor_4x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_128_predictor_4x8 aom_highbd_dc_128_predictor_4x8_c
-
-void aom_highbd_dc_128_predictor_8x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_128_predictor_8x16 aom_highbd_dc_128_predictor_8x16_c
-
-void aom_highbd_dc_128_predictor_8x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_128_predictor_8x4 aom_highbd_dc_128_predictor_8x4_c
-
-void aom_highbd_dc_128_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_128_predictor_8x8 aom_highbd_dc_128_predictor_8x8_c
-
-void aom_highbd_dc_left_predictor_16x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_dc_left_predictor_16x16 aom_highbd_dc_left_predictor_16x16_c
-
-void aom_highbd_dc_left_predictor_16x32_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_dc_left_predictor_16x32 aom_highbd_dc_left_predictor_16x32_c
-
-void aom_highbd_dc_left_predictor_16x8_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_left_predictor_16x8 aom_highbd_dc_left_predictor_16x8_c
-
-void aom_highbd_dc_left_predictor_2x2_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_left_predictor_2x2 aom_highbd_dc_left_predictor_2x2_c
-
-void aom_highbd_dc_left_predictor_32x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_dc_left_predictor_32x16 aom_highbd_dc_left_predictor_32x16_c
-
-void aom_highbd_dc_left_predictor_32x32_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_dc_left_predictor_32x32 aom_highbd_dc_left_predictor_32x32_c
-
-void aom_highbd_dc_left_predictor_4x4_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_left_predictor_4x4 aom_highbd_dc_left_predictor_4x4_c
-
-void aom_highbd_dc_left_predictor_4x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_left_predictor_4x8 aom_highbd_dc_left_predictor_4x8_c
-
-void aom_highbd_dc_left_predictor_8x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_left_predictor_8x16 aom_highbd_dc_left_predictor_8x16_c
-
-void aom_highbd_dc_left_predictor_8x4_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_left_predictor_8x4 aom_highbd_dc_left_predictor_8x4_c
-
-void aom_highbd_dc_left_predictor_8x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_left_predictor_8x8 aom_highbd_dc_left_predictor_8x8_c
-
-void aom_highbd_dc_predictor_16x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-void aom_highbd_dc_predictor_16x16_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-RTCD_EXTERN void (*aom_highbd_dc_predictor_16x16)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
-                                                  const uint16_t* above,
-                                                  const uint16_t* left,
-                                                  int bd);
-
-void aom_highbd_dc_predictor_16x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_dc_predictor_16x32 aom_highbd_dc_predictor_16x32_c
-
-void aom_highbd_dc_predictor_16x8_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_dc_predictor_16x8 aom_highbd_dc_predictor_16x8_c
-
-void aom_highbd_dc_predictor_2x2_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_dc_predictor_2x2 aom_highbd_dc_predictor_2x2_c
-
-void aom_highbd_dc_predictor_32x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_dc_predictor_32x16 aom_highbd_dc_predictor_32x16_c
-
-void aom_highbd_dc_predictor_32x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-void aom_highbd_dc_predictor_32x32_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-RTCD_EXTERN void (*aom_highbd_dc_predictor_32x32)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
-                                                  const uint16_t* above,
-                                                  const uint16_t* left,
-                                                  int bd);
-
-void aom_highbd_dc_predictor_4x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-void aom_highbd_dc_predictor_4x4_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-RTCD_EXTERN void (*aom_highbd_dc_predictor_4x4)(uint16_t* dst,
-                                                ptrdiff_t y_stride,
-                                                const uint16_t* above,
-                                                const uint16_t* left,
-                                                int bd);
-
-void aom_highbd_dc_predictor_4x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_dc_predictor_4x8 aom_highbd_dc_predictor_4x8_c
-
-void aom_highbd_dc_predictor_8x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_dc_predictor_8x16 aom_highbd_dc_predictor_8x16_c
-
-void aom_highbd_dc_predictor_8x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_dc_predictor_8x4 aom_highbd_dc_predictor_8x4_c
-
-void aom_highbd_dc_predictor_8x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-void aom_highbd_dc_predictor_8x8_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-RTCD_EXTERN void (*aom_highbd_dc_predictor_8x8)(uint16_t* dst,
-                                                ptrdiff_t y_stride,
-                                                const uint16_t* above,
-                                                const uint16_t* left,
-                                                int bd);
-
-void aom_highbd_dc_top_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_top_predictor_16x16 aom_highbd_dc_top_predictor_16x16_c
-
-void aom_highbd_dc_top_predictor_16x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_top_predictor_16x32 aom_highbd_dc_top_predictor_16x32_c
-
-void aom_highbd_dc_top_predictor_16x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_top_predictor_16x8 aom_highbd_dc_top_predictor_16x8_c
-
-void aom_highbd_dc_top_predictor_2x2_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_top_predictor_2x2 aom_highbd_dc_top_predictor_2x2_c
-
-void aom_highbd_dc_top_predictor_32x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_top_predictor_32x16 aom_highbd_dc_top_predictor_32x16_c
-
-void aom_highbd_dc_top_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_top_predictor_32x32 aom_highbd_dc_top_predictor_32x32_c
-
-void aom_highbd_dc_top_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_top_predictor_4x4 aom_highbd_dc_top_predictor_4x4_c
-
-void aom_highbd_dc_top_predictor_4x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_top_predictor_4x8 aom_highbd_dc_top_predictor_4x8_c
-
-void aom_highbd_dc_top_predictor_8x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_top_predictor_8x16 aom_highbd_dc_top_predictor_8x16_c
-
-void aom_highbd_dc_top_predictor_8x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_top_predictor_8x4 aom_highbd_dc_top_predictor_8x4_c
-
-void aom_highbd_dc_top_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_top_predictor_8x8 aom_highbd_dc_top_predictor_8x8_c
-
-void aom_highbd_h_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_h_predictor_16x16 aom_highbd_h_predictor_16x16_c
-
-void aom_highbd_h_predictor_16x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_h_predictor_16x32 aom_highbd_h_predictor_16x32_c
-
-void aom_highbd_h_predictor_16x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_h_predictor_16x8 aom_highbd_h_predictor_16x8_c
-
-void aom_highbd_h_predictor_2x2_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_h_predictor_2x2 aom_highbd_h_predictor_2x2_c
-
-void aom_highbd_h_predictor_32x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_h_predictor_32x16 aom_highbd_h_predictor_32x16_c
-
-void aom_highbd_h_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_h_predictor_32x32 aom_highbd_h_predictor_32x32_c
-
-void aom_highbd_h_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_h_predictor_4x4 aom_highbd_h_predictor_4x4_c
-
-void aom_highbd_h_predictor_4x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_h_predictor_4x8 aom_highbd_h_predictor_4x8_c
-
-void aom_highbd_h_predictor_8x16_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_h_predictor_8x16 aom_highbd_h_predictor_8x16_c
-
-void aom_highbd_h_predictor_8x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_h_predictor_8x4 aom_highbd_h_predictor_8x4_c
-
-void aom_highbd_h_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_h_predictor_8x8 aom_highbd_h_predictor_8x8_c
-
 void aom_highbd_iwht4x4_16_add_c(const tran_low_t* input,
                                  uint8_t* dest,
                                  int dest_stride,
@@ -2740,747 +1461,6 @@
                                 int bd);
 #define aom_highbd_iwht4x4_1_add aom_highbd_iwht4x4_1_add_c
 
-void aom_highbd_lpf_horizontal_4_c(uint16_t* s,
-                                   int pitch,
-                                   const uint8_t* blimit,
-                                   const uint8_t* limit,
-                                   const uint8_t* thresh,
-                                   int bd);
-void aom_highbd_lpf_horizontal_4_sse2(uint16_t* s,
-                                      int pitch,
-                                      const uint8_t* blimit,
-                                      const uint8_t* limit,
-                                      const uint8_t* thresh,
-                                      int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_horizontal_4)(uint16_t* s,
-                                                int pitch,
-                                                const uint8_t* blimit,
-                                                const uint8_t* limit,
-                                                const uint8_t* thresh,
-                                                int bd);
-
-void aom_highbd_lpf_horizontal_4_dual_c(uint16_t* s,
-                                        int pitch,
-                                        const uint8_t* blimit0,
-                                        const uint8_t* limit0,
-                                        const uint8_t* thresh0,
-                                        const uint8_t* blimit1,
-                                        const uint8_t* limit1,
-                                        const uint8_t* thresh1,
-                                        int bd);
-void aom_highbd_lpf_horizontal_4_dual_sse2(uint16_t* s,
-                                           int pitch,
-                                           const uint8_t* blimit0,
-                                           const uint8_t* limit0,
-                                           const uint8_t* thresh0,
-                                           const uint8_t* blimit1,
-                                           const uint8_t* limit1,
-                                           const uint8_t* thresh1,
-                                           int bd);
-void aom_highbd_lpf_horizontal_4_dual_avx2(uint16_t* s,
-                                           int pitch,
-                                           const uint8_t* blimit0,
-                                           const uint8_t* limit0,
-                                           const uint8_t* thresh0,
-                                           const uint8_t* blimit1,
-                                           const uint8_t* limit1,
-                                           const uint8_t* thresh1,
-                                           int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_horizontal_4_dual)(uint16_t* s,
-                                                     int pitch,
-                                                     const uint8_t* blimit0,
-                                                     const uint8_t* limit0,
-                                                     const uint8_t* thresh0,
-                                                     const uint8_t* blimit1,
-                                                     const uint8_t* limit1,
-                                                     const uint8_t* thresh1,
-                                                     int bd);
-
-void aom_highbd_lpf_horizontal_8_c(uint16_t* s,
-                                   int pitch,
-                                   const uint8_t* blimit,
-                                   const uint8_t* limit,
-                                   const uint8_t* thresh,
-                                   int bd);
-void aom_highbd_lpf_horizontal_8_sse2(uint16_t* s,
-                                      int pitch,
-                                      const uint8_t* blimit,
-                                      const uint8_t* limit,
-                                      const uint8_t* thresh,
-                                      int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_horizontal_8)(uint16_t* s,
-                                                int pitch,
-                                                const uint8_t* blimit,
-                                                const uint8_t* limit,
-                                                const uint8_t* thresh,
-                                                int bd);
-
-void aom_highbd_lpf_horizontal_8_dual_c(uint16_t* s,
-                                        int pitch,
-                                        const uint8_t* blimit0,
-                                        const uint8_t* limit0,
-                                        const uint8_t* thresh0,
-                                        const uint8_t* blimit1,
-                                        const uint8_t* limit1,
-                                        const uint8_t* thresh1,
-                                        int bd);
-void aom_highbd_lpf_horizontal_8_dual_sse2(uint16_t* s,
-                                           int pitch,
-                                           const uint8_t* blimit0,
-                                           const uint8_t* limit0,
-                                           const uint8_t* thresh0,
-                                           const uint8_t* blimit1,
-                                           const uint8_t* limit1,
-                                           const uint8_t* thresh1,
-                                           int bd);
-void aom_highbd_lpf_horizontal_8_dual_avx2(uint16_t* s,
-                                           int pitch,
-                                           const uint8_t* blimit0,
-                                           const uint8_t* limit0,
-                                           const uint8_t* thresh0,
-                                           const uint8_t* blimit1,
-                                           const uint8_t* limit1,
-                                           const uint8_t* thresh1,
-                                           int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_horizontal_8_dual)(uint16_t* s,
-                                                     int pitch,
-                                                     const uint8_t* blimit0,
-                                                     const uint8_t* limit0,
-                                                     const uint8_t* thresh0,
-                                                     const uint8_t* blimit1,
-                                                     const uint8_t* limit1,
-                                                     const uint8_t* thresh1,
-                                                     int bd);
-
-void aom_highbd_lpf_horizontal_edge_16_c(uint16_t* s,
-                                         int pitch,
-                                         const uint8_t* blimit,
-                                         const uint8_t* limit,
-                                         const uint8_t* thresh,
-                                         int bd);
-void aom_highbd_lpf_horizontal_edge_16_sse2(uint16_t* s,
-                                            int pitch,
-                                            const uint8_t* blimit,
-                                            const uint8_t* limit,
-                                            const uint8_t* thresh,
-                                            int bd);
-void aom_highbd_lpf_horizontal_edge_16_avx2(uint16_t* s,
-                                            int pitch,
-                                            const uint8_t* blimit,
-                                            const uint8_t* limit,
-                                            const uint8_t* thresh,
-                                            int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_horizontal_edge_16)(uint16_t* s,
-                                                      int pitch,
-                                                      const uint8_t* blimit,
-                                                      const uint8_t* limit,
-                                                      const uint8_t* thresh,
-                                                      int bd);
-
-void aom_highbd_lpf_horizontal_edge_8_c(uint16_t* s,
-                                        int pitch,
-                                        const uint8_t* blimit,
-                                        const uint8_t* limit,
-                                        const uint8_t* thresh,
-                                        int bd);
-void aom_highbd_lpf_horizontal_edge_8_sse2(uint16_t* s,
-                                           int pitch,
-                                           const uint8_t* blimit,
-                                           const uint8_t* limit,
-                                           const uint8_t* thresh,
-                                           int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_horizontal_edge_8)(uint16_t* s,
-                                                     int pitch,
-                                                     const uint8_t* blimit,
-                                                     const uint8_t* limit,
-                                                     const uint8_t* thresh,
-                                                     int bd);
-
-void aom_highbd_lpf_vertical_16_c(uint16_t* s,
-                                  int pitch,
-                                  const uint8_t* blimit,
-                                  const uint8_t* limit,
-                                  const uint8_t* thresh,
-                                  int bd);
-void aom_highbd_lpf_vertical_16_sse2(uint16_t* s,
-                                     int pitch,
-                                     const uint8_t* blimit,
-                                     const uint8_t* limit,
-                                     const uint8_t* thresh,
-                                     int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_vertical_16)(uint16_t* s,
-                                               int pitch,
-                                               const uint8_t* blimit,
-                                               const uint8_t* limit,
-                                               const uint8_t* thresh,
-                                               int bd);
-
-void aom_highbd_lpf_vertical_16_dual_c(uint16_t* s,
-                                       int pitch,
-                                       const uint8_t* blimit,
-                                       const uint8_t* limit,
-                                       const uint8_t* thresh,
-                                       int bd);
-void aom_highbd_lpf_vertical_16_dual_sse2(uint16_t* s,
-                                          int pitch,
-                                          const uint8_t* blimit,
-                                          const uint8_t* limit,
-                                          const uint8_t* thresh,
-                                          int bd);
-void aom_highbd_lpf_vertical_16_dual_avx2(uint16_t* s,
-                                          int pitch,
-                                          const uint8_t* blimit,
-                                          const uint8_t* limit,
-                                          const uint8_t* thresh,
-                                          int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_vertical_16_dual)(uint16_t* s,
-                                                    int pitch,
-                                                    const uint8_t* blimit,
-                                                    const uint8_t* limit,
-                                                    const uint8_t* thresh,
-                                                    int bd);
-
-void aom_highbd_lpf_vertical_4_c(uint16_t* s,
-                                 int pitch,
-                                 const uint8_t* blimit,
-                                 const uint8_t* limit,
-                                 const uint8_t* thresh,
-                                 int bd);
-void aom_highbd_lpf_vertical_4_sse2(uint16_t* s,
-                                    int pitch,
-                                    const uint8_t* blimit,
-                                    const uint8_t* limit,
-                                    const uint8_t* thresh,
-                                    int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_vertical_4)(uint16_t* s,
-                                              int pitch,
-                                              const uint8_t* blimit,
-                                              const uint8_t* limit,
-                                              const uint8_t* thresh,
-                                              int bd);
-
-void aom_highbd_lpf_vertical_4_dual_c(uint16_t* s,
-                                      int pitch,
-                                      const uint8_t* blimit0,
-                                      const uint8_t* limit0,
-                                      const uint8_t* thresh0,
-                                      const uint8_t* blimit1,
-                                      const uint8_t* limit1,
-                                      const uint8_t* thresh1,
-                                      int bd);
-void aom_highbd_lpf_vertical_4_dual_sse2(uint16_t* s,
-                                         int pitch,
-                                         const uint8_t* blimit0,
-                                         const uint8_t* limit0,
-                                         const uint8_t* thresh0,
-                                         const uint8_t* blimit1,
-                                         const uint8_t* limit1,
-                                         const uint8_t* thresh1,
-                                         int bd);
-void aom_highbd_lpf_vertical_4_dual_avx2(uint16_t* s,
-                                         int pitch,
-                                         const uint8_t* blimit0,
-                                         const uint8_t* limit0,
-                                         const uint8_t* thresh0,
-                                         const uint8_t* blimit1,
-                                         const uint8_t* limit1,
-                                         const uint8_t* thresh1,
-                                         int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_vertical_4_dual)(uint16_t* s,
-                                                   int pitch,
-                                                   const uint8_t* blimit0,
-                                                   const uint8_t* limit0,
-                                                   const uint8_t* thresh0,
-                                                   const uint8_t* blimit1,
-                                                   const uint8_t* limit1,
-                                                   const uint8_t* thresh1,
-                                                   int bd);
-
-void aom_highbd_lpf_vertical_8_c(uint16_t* s,
-                                 int pitch,
-                                 const uint8_t* blimit,
-                                 const uint8_t* limit,
-                                 const uint8_t* thresh,
-                                 int bd);
-void aom_highbd_lpf_vertical_8_sse2(uint16_t* s,
-                                    int pitch,
-                                    const uint8_t* blimit,
-                                    const uint8_t* limit,
-                                    const uint8_t* thresh,
-                                    int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_vertical_8)(uint16_t* s,
-                                              int pitch,
-                                              const uint8_t* blimit,
-                                              const uint8_t* limit,
-                                              const uint8_t* thresh,
-                                              int bd);
-
-void aom_highbd_lpf_vertical_8_dual_c(uint16_t* s,
-                                      int pitch,
-                                      const uint8_t* blimit0,
-                                      const uint8_t* limit0,
-                                      const uint8_t* thresh0,
-                                      const uint8_t* blimit1,
-                                      const uint8_t* limit1,
-                                      const uint8_t* thresh1,
-                                      int bd);
-void aom_highbd_lpf_vertical_8_dual_sse2(uint16_t* s,
-                                         int pitch,
-                                         const uint8_t* blimit0,
-                                         const uint8_t* limit0,
-                                         const uint8_t* thresh0,
-                                         const uint8_t* blimit1,
-                                         const uint8_t* limit1,
-                                         const uint8_t* thresh1,
-                                         int bd);
-void aom_highbd_lpf_vertical_8_dual_avx2(uint16_t* s,
-                                         int pitch,
-                                         const uint8_t* blimit0,
-                                         const uint8_t* limit0,
-                                         const uint8_t* thresh0,
-                                         const uint8_t* blimit1,
-                                         const uint8_t* limit1,
-                                         const uint8_t* thresh1,
-                                         int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_vertical_8_dual)(uint16_t* s,
-                                                   int pitch,
-                                                   const uint8_t* blimit0,
-                                                   const uint8_t* limit0,
-                                                   const uint8_t* thresh0,
-                                                   const uint8_t* blimit1,
-                                                   const uint8_t* limit1,
-                                                   const uint8_t* thresh1,
-                                                   int bd);
-
-void aom_highbd_paeth_predictor_16x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_paeth_predictor_16x16 aom_highbd_paeth_predictor_16x16_c
-
-void aom_highbd_paeth_predictor_16x32_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_paeth_predictor_16x32 aom_highbd_paeth_predictor_16x32_c
-
-void aom_highbd_paeth_predictor_16x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_paeth_predictor_16x8 aom_highbd_paeth_predictor_16x8_c
-
-void aom_highbd_paeth_predictor_2x2_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_paeth_predictor_2x2 aom_highbd_paeth_predictor_2x2_c
-
-void aom_highbd_paeth_predictor_32x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_paeth_predictor_32x16 aom_highbd_paeth_predictor_32x16_c
-
-void aom_highbd_paeth_predictor_32x32_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_paeth_predictor_32x32 aom_highbd_paeth_predictor_32x32_c
-
-void aom_highbd_paeth_predictor_4x4_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_paeth_predictor_4x4 aom_highbd_paeth_predictor_4x4_c
-
-void aom_highbd_paeth_predictor_4x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_paeth_predictor_4x8 aom_highbd_paeth_predictor_4x8_c
-
-void aom_highbd_paeth_predictor_8x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_paeth_predictor_8x16 aom_highbd_paeth_predictor_8x16_c
-
-void aom_highbd_paeth_predictor_8x4_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_paeth_predictor_8x4 aom_highbd_paeth_predictor_8x4_c
-
-void aom_highbd_paeth_predictor_8x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_paeth_predictor_8x8 aom_highbd_paeth_predictor_8x8_c
-
-void aom_highbd_smooth_h_predictor_16x16_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_h_predictor_16x16 \
-  aom_highbd_smooth_h_predictor_16x16_c
-
-void aom_highbd_smooth_h_predictor_16x32_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_h_predictor_16x32 \
-  aom_highbd_smooth_h_predictor_16x32_c
-
-void aom_highbd_smooth_h_predictor_16x8_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_smooth_h_predictor_16x8 aom_highbd_smooth_h_predictor_16x8_c
-
-void aom_highbd_smooth_h_predictor_2x2_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_h_predictor_2x2 aom_highbd_smooth_h_predictor_2x2_c
-
-void aom_highbd_smooth_h_predictor_32x16_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_h_predictor_32x16 \
-  aom_highbd_smooth_h_predictor_32x16_c
-
-void aom_highbd_smooth_h_predictor_32x32_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_h_predictor_32x32 \
-  aom_highbd_smooth_h_predictor_32x32_c
-
-void aom_highbd_smooth_h_predictor_4x4_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_h_predictor_4x4 aom_highbd_smooth_h_predictor_4x4_c
-
-void aom_highbd_smooth_h_predictor_4x8_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_h_predictor_4x8 aom_highbd_smooth_h_predictor_4x8_c
-
-void aom_highbd_smooth_h_predictor_8x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_smooth_h_predictor_8x16 aom_highbd_smooth_h_predictor_8x16_c
-
-void aom_highbd_smooth_h_predictor_8x4_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_h_predictor_8x4 aom_highbd_smooth_h_predictor_8x4_c
-
-void aom_highbd_smooth_h_predictor_8x8_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_h_predictor_8x8 aom_highbd_smooth_h_predictor_8x8_c
-
-void aom_highbd_smooth_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_predictor_16x16 aom_highbd_smooth_predictor_16x16_c
-
-void aom_highbd_smooth_predictor_16x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_predictor_16x32 aom_highbd_smooth_predictor_16x32_c
-
-void aom_highbd_smooth_predictor_16x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_smooth_predictor_16x8 aom_highbd_smooth_predictor_16x8_c
-
-void aom_highbd_smooth_predictor_2x2_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_smooth_predictor_2x2 aom_highbd_smooth_predictor_2x2_c
-
-void aom_highbd_smooth_predictor_32x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_predictor_32x16 aom_highbd_smooth_predictor_32x16_c
-
-void aom_highbd_smooth_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_predictor_32x32 aom_highbd_smooth_predictor_32x32_c
-
-void aom_highbd_smooth_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_smooth_predictor_4x4 aom_highbd_smooth_predictor_4x4_c
-
-void aom_highbd_smooth_predictor_4x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_smooth_predictor_4x8 aom_highbd_smooth_predictor_4x8_c
-
-void aom_highbd_smooth_predictor_8x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_smooth_predictor_8x16 aom_highbd_smooth_predictor_8x16_c
-
-void aom_highbd_smooth_predictor_8x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_smooth_predictor_8x4 aom_highbd_smooth_predictor_8x4_c
-
-void aom_highbd_smooth_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_smooth_predictor_8x8 aom_highbd_smooth_predictor_8x8_c
-
-void aom_highbd_smooth_v_predictor_16x16_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_v_predictor_16x16 \
-  aom_highbd_smooth_v_predictor_16x16_c
-
-void aom_highbd_smooth_v_predictor_16x32_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_v_predictor_16x32 \
-  aom_highbd_smooth_v_predictor_16x32_c
-
-void aom_highbd_smooth_v_predictor_16x8_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_smooth_v_predictor_16x8 aom_highbd_smooth_v_predictor_16x8_c
-
-void aom_highbd_smooth_v_predictor_2x2_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_v_predictor_2x2 aom_highbd_smooth_v_predictor_2x2_c
-
-void aom_highbd_smooth_v_predictor_32x16_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_v_predictor_32x16 \
-  aom_highbd_smooth_v_predictor_32x16_c
-
-void aom_highbd_smooth_v_predictor_32x32_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_v_predictor_32x32 \
-  aom_highbd_smooth_v_predictor_32x32_c
-
-void aom_highbd_smooth_v_predictor_4x4_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_v_predictor_4x4 aom_highbd_smooth_v_predictor_4x4_c
-
-void aom_highbd_smooth_v_predictor_4x8_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_v_predictor_4x8 aom_highbd_smooth_v_predictor_4x8_c
-
-void aom_highbd_smooth_v_predictor_8x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_smooth_v_predictor_8x16 aom_highbd_smooth_v_predictor_8x16_c
-
-void aom_highbd_smooth_v_predictor_8x4_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_v_predictor_8x4 aom_highbd_smooth_v_predictor_8x4_c
-
-void aom_highbd_smooth_v_predictor_8x8_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_v_predictor_8x8 aom_highbd_smooth_v_predictor_8x8_c
-
-void aom_highbd_v_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-void aom_highbd_v_predictor_16x16_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-RTCD_EXTERN void (*aom_highbd_v_predictor_16x16)(uint16_t* dst,
-                                                 ptrdiff_t y_stride,
-                                                 const uint16_t* above,
-                                                 const uint16_t* left,
-                                                 int bd);
-
-void aom_highbd_v_predictor_16x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_v_predictor_16x32 aom_highbd_v_predictor_16x32_c
-
-void aom_highbd_v_predictor_16x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_v_predictor_16x8 aom_highbd_v_predictor_16x8_c
-
-void aom_highbd_v_predictor_2x2_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_v_predictor_2x2 aom_highbd_v_predictor_2x2_c
-
-void aom_highbd_v_predictor_32x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_v_predictor_32x16 aom_highbd_v_predictor_32x16_c
-
-void aom_highbd_v_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-void aom_highbd_v_predictor_32x32_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-RTCD_EXTERN void (*aom_highbd_v_predictor_32x32)(uint16_t* dst,
-                                                 ptrdiff_t y_stride,
-                                                 const uint16_t* above,
-                                                 const uint16_t* left,
-                                                 int bd);
-
-void aom_highbd_v_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-void aom_highbd_v_predictor_4x4_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-RTCD_EXTERN void (*aom_highbd_v_predictor_4x4)(uint16_t* dst,
-                                               ptrdiff_t y_stride,
-                                               const uint16_t* above,
-                                               const uint16_t* left,
-                                               int bd);
-
-void aom_highbd_v_predictor_4x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_v_predictor_4x8 aom_highbd_v_predictor_4x8_c
-
-void aom_highbd_v_predictor_8x16_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_v_predictor_8x16 aom_highbd_v_predictor_8x16_c
-
-void aom_highbd_v_predictor_8x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_v_predictor_8x4 aom_highbd_v_predictor_8x4_c
-
-void aom_highbd_v_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-void aom_highbd_v_predictor_8x8_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-RTCD_EXTERN void (*aom_highbd_v_predictor_8x8)(uint16_t* dst,
-                                               ptrdiff_t y_stride,
-                                               const uint16_t* above,
-                                               const uint16_t* left,
-                                               int bd);
-
 void aom_idct16x16_10_add_c(const tran_low_t* input,
                             uint8_t* dest,
                             int dest_stride);
@@ -4405,115 +2385,6 @@
   aom_h_predictor_8x8 = aom_h_predictor_8x8_c;
   if (flags & HAS_SSE2)
     aom_h_predictor_8x8 = aom_h_predictor_8x8_sse2;
-  aom_highbd_blend_a64_hmask = aom_highbd_blend_a64_hmask_c;
-  if (flags & HAS_SSE4_1)
-    aom_highbd_blend_a64_hmask = aom_highbd_blend_a64_hmask_sse4_1;
-  aom_highbd_blend_a64_mask = aom_highbd_blend_a64_mask_c;
-  if (flags & HAS_SSE4_1)
-    aom_highbd_blend_a64_mask = aom_highbd_blend_a64_mask_sse4_1;
-  aom_highbd_blend_a64_vmask = aom_highbd_blend_a64_vmask_c;
-  if (flags & HAS_SSE4_1)
-    aom_highbd_blend_a64_vmask = aom_highbd_blend_a64_vmask_sse4_1;
-  aom_highbd_convolve8 = aom_highbd_convolve8_c;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve8 = aom_highbd_convolve8_avx2;
-  aom_highbd_convolve8_avg = aom_highbd_convolve8_avg_c;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve8_avg = aom_highbd_convolve8_avg_avx2;
-  aom_highbd_convolve8_avg_horiz = aom_highbd_convolve8_avg_horiz_c;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve8_avg_horiz = aom_highbd_convolve8_avg_horiz_avx2;
-  aom_highbd_convolve8_avg_vert = aom_highbd_convolve8_avg_vert_c;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve8_avg_vert = aom_highbd_convolve8_avg_vert_avx2;
-  aom_highbd_convolve8_horiz = aom_highbd_convolve8_horiz_c;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve8_horiz = aom_highbd_convolve8_horiz_avx2;
-  aom_highbd_convolve8_vert = aom_highbd_convolve8_vert_c;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve8_vert = aom_highbd_convolve8_vert_avx2;
-  aom_highbd_convolve_avg = aom_highbd_convolve_avg_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_convolve_avg = aom_highbd_convolve_avg_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve_avg = aom_highbd_convolve_avg_avx2;
-  aom_highbd_convolve_copy = aom_highbd_convolve_copy_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_convolve_copy = aom_highbd_convolve_copy_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve_copy = aom_highbd_convolve_copy_avx2;
-  aom_highbd_dc_predictor_16x16 = aom_highbd_dc_predictor_16x16_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_dc_predictor_16x16 = aom_highbd_dc_predictor_16x16_sse2;
-  aom_highbd_dc_predictor_32x32 = aom_highbd_dc_predictor_32x32_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_dc_predictor_32x32 = aom_highbd_dc_predictor_32x32_sse2;
-  aom_highbd_dc_predictor_4x4 = aom_highbd_dc_predictor_4x4_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_dc_predictor_4x4 = aom_highbd_dc_predictor_4x4_sse2;
-  aom_highbd_dc_predictor_8x8 = aom_highbd_dc_predictor_8x8_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_dc_predictor_8x8 = aom_highbd_dc_predictor_8x8_sse2;
-  aom_highbd_lpf_horizontal_4 = aom_highbd_lpf_horizontal_4_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_lpf_horizontal_4 = aom_highbd_lpf_horizontal_4_sse2;
-  aom_highbd_lpf_horizontal_4_dual = aom_highbd_lpf_horizontal_4_dual_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_lpf_horizontal_4_dual = aom_highbd_lpf_horizontal_4_dual_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_lpf_horizontal_4_dual = aom_highbd_lpf_horizontal_4_dual_avx2;
-  aom_highbd_lpf_horizontal_8 = aom_highbd_lpf_horizontal_8_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_lpf_horizontal_8 = aom_highbd_lpf_horizontal_8_sse2;
-  aom_highbd_lpf_horizontal_8_dual = aom_highbd_lpf_horizontal_8_dual_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_lpf_horizontal_8_dual = aom_highbd_lpf_horizontal_8_dual_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_lpf_horizontal_8_dual = aom_highbd_lpf_horizontal_8_dual_avx2;
-  aom_highbd_lpf_horizontal_edge_16 = aom_highbd_lpf_horizontal_edge_16_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_lpf_horizontal_edge_16 = aom_highbd_lpf_horizontal_edge_16_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_lpf_horizontal_edge_16 = aom_highbd_lpf_horizontal_edge_16_avx2;
-  aom_highbd_lpf_horizontal_edge_8 = aom_highbd_lpf_horizontal_edge_8_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_lpf_horizontal_edge_8 = aom_highbd_lpf_horizontal_edge_8_sse2;
-  aom_highbd_lpf_vertical_16 = aom_highbd_lpf_vertical_16_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_lpf_vertical_16 = aom_highbd_lpf_vertical_16_sse2;
-  aom_highbd_lpf_vertical_16_dual = aom_highbd_lpf_vertical_16_dual_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_lpf_vertical_16_dual = aom_highbd_lpf_vertical_16_dual_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_lpf_vertical_16_dual = aom_highbd_lpf_vertical_16_dual_avx2;
-  aom_highbd_lpf_vertical_4 = aom_highbd_lpf_vertical_4_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_lpf_vertical_4 = aom_highbd_lpf_vertical_4_sse2;
-  aom_highbd_lpf_vertical_4_dual = aom_highbd_lpf_vertical_4_dual_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_lpf_vertical_4_dual = aom_highbd_lpf_vertical_4_dual_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_lpf_vertical_4_dual = aom_highbd_lpf_vertical_4_dual_avx2;
-  aom_highbd_lpf_vertical_8 = aom_highbd_lpf_vertical_8_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_lpf_vertical_8 = aom_highbd_lpf_vertical_8_sse2;
-  aom_highbd_lpf_vertical_8_dual = aom_highbd_lpf_vertical_8_dual_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_lpf_vertical_8_dual = aom_highbd_lpf_vertical_8_dual_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_lpf_vertical_8_dual = aom_highbd_lpf_vertical_8_dual_avx2;
-  aom_highbd_v_predictor_16x16 = aom_highbd_v_predictor_16x16_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_v_predictor_16x16 = aom_highbd_v_predictor_16x16_sse2;
-  aom_highbd_v_predictor_32x32 = aom_highbd_v_predictor_32x32_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_v_predictor_32x32 = aom_highbd_v_predictor_32x32_sse2;
-  aom_highbd_v_predictor_4x4 = aom_highbd_v_predictor_4x4_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_v_predictor_4x4 = aom_highbd_v_predictor_4x4_sse2;
-  aom_highbd_v_predictor_8x8 = aom_highbd_v_predictor_8x8_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_v_predictor_8x8 = aom_highbd_v_predictor_8x8_sse2;
   aom_idct16x16_10_add = aom_idct16x16_10_add_c;
   if (flags & HAS_SSE2)
     aom_idct16x16_10_add = aom_idct16x16_10_add_sse2;
diff --git a/third_party/libaom/source/config/linux/ia32/av1_rtcd.h b/third_party/libaom/source/config/linux/ia32/av1_rtcd.h
index ba054ca..63d5838 100644
--- a/third_party/libaom/source/config/linux/ia32/av1_rtcd.h
+++ b/third_party/libaom/source/config/linux/ia32/av1_rtcd.h
@@ -333,396 +333,6 @@
                                       int x_step_q4,
                                       ConvolveParams* conv_params);
 
-void av1_highbd_convolve8_c(const uint8_t* src,
-                            ptrdiff_t src_stride,
-                            uint8_t* dst,
-                            ptrdiff_t dst_stride,
-                            const int16_t* filter_x,
-                            int x_step_q4,
-                            const int16_t* filter_y,
-                            int y_step_q4,
-                            int w,
-                            int h,
-                            int bps);
-#define av1_highbd_convolve8 av1_highbd_convolve8_c
-
-void av1_highbd_convolve8_avg_c(const uint8_t* src,
-                                ptrdiff_t src_stride,
-                                uint8_t* dst,
-                                ptrdiff_t dst_stride,
-                                const int16_t* filter_x,
-                                int x_step_q4,
-                                const int16_t* filter_y,
-                                int y_step_q4,
-                                int w,
-                                int h,
-                                int bps);
-#define av1_highbd_convolve8_avg av1_highbd_convolve8_avg_c
-
-void av1_highbd_convolve8_avg_horiz_c(const uint8_t* src,
-                                      ptrdiff_t src_stride,
-                                      uint8_t* dst,
-                                      ptrdiff_t dst_stride,
-                                      const int16_t* filter_x,
-                                      int x_step_q4,
-                                      const int16_t* filter_y,
-                                      int y_step_q4,
-                                      int w,
-                                      int h,
-                                      int bps);
-#define av1_highbd_convolve8_avg_horiz av1_highbd_convolve8_avg_horiz_c
-
-void av1_highbd_convolve8_avg_vert_c(const uint8_t* src,
-                                     ptrdiff_t src_stride,
-                                     uint8_t* dst,
-                                     ptrdiff_t dst_stride,
-                                     const int16_t* filter_x,
-                                     int x_step_q4,
-                                     const int16_t* filter_y,
-                                     int y_step_q4,
-                                     int w,
-                                     int h,
-                                     int bps);
-#define av1_highbd_convolve8_avg_vert av1_highbd_convolve8_avg_vert_c
-
-void av1_highbd_convolve8_horiz_c(const uint8_t* src,
-                                  ptrdiff_t src_stride,
-                                  uint8_t* dst,
-                                  ptrdiff_t dst_stride,
-                                  const int16_t* filter_x,
-                                  int x_step_q4,
-                                  const int16_t* filter_y,
-                                  int y_step_q4,
-                                  int w,
-                                  int h,
-                                  int bps);
-#define av1_highbd_convolve8_horiz av1_highbd_convolve8_horiz_c
-
-void av1_highbd_convolve8_vert_c(const uint8_t* src,
-                                 ptrdiff_t src_stride,
-                                 uint8_t* dst,
-                                 ptrdiff_t dst_stride,
-                                 const int16_t* filter_x,
-                                 int x_step_q4,
-                                 const int16_t* filter_y,
-                                 int y_step_q4,
-                                 int w,
-                                 int h,
-                                 int bps);
-#define av1_highbd_convolve8_vert av1_highbd_convolve8_vert_c
-
-void av1_highbd_convolve_2d_c(const uint16_t* src,
-                              int src_stride,
-                              CONV_BUF_TYPE* dst,
-                              int dst_stride,
-                              int w,
-                              int h,
-                              InterpFilterParams* filter_params_x,
-                              InterpFilterParams* filter_params_y,
-                              const int subpel_x_q4,
-                              const int subpel_y_q4,
-                              ConvolveParams* conv_params,
-                              int bd);
-void av1_highbd_convolve_2d_ssse3(const uint16_t* src,
-                                  int src_stride,
-                                  CONV_BUF_TYPE* dst,
-                                  int dst_stride,
-                                  int w,
-                                  int h,
-                                  InterpFilterParams* filter_params_x,
-                                  InterpFilterParams* filter_params_y,
-                                  const int subpel_x_q4,
-                                  const int subpel_y_q4,
-                                  ConvolveParams* conv_params,
-                                  int bd);
-RTCD_EXTERN void (*av1_highbd_convolve_2d)(const uint16_t* src,
-                                           int src_stride,
-                                           CONV_BUF_TYPE* dst,
-                                           int dst_stride,
-                                           int w,
-                                           int h,
-                                           InterpFilterParams* filter_params_x,
-                                           InterpFilterParams* filter_params_y,
-                                           const int subpel_x_q4,
-                                           const int subpel_y_q4,
-                                           ConvolveParams* conv_params,
-                                           int bd);
-
-void av1_highbd_convolve_2d_scale_c(const uint16_t* src,
-                                    int src_stride,
-                                    CONV_BUF_TYPE* dst,
-                                    int dst_stride,
-                                    int w,
-                                    int h,
-                                    InterpFilterParams* filter_params_x,
-                                    InterpFilterParams* filter_params_y,
-                                    const int subpel_x_q4,
-                                    const int x_step_qn,
-                                    const int subpel_y_q4,
-                                    const int y_step_qn,
-                                    ConvolveParams* conv_params,
-                                    int bd);
-#define av1_highbd_convolve_2d_scale av1_highbd_convolve_2d_scale_c
-
-void av1_highbd_convolve_avg_c(const uint8_t* src,
-                               ptrdiff_t src_stride,
-                               uint8_t* dst,
-                               ptrdiff_t dst_stride,
-                               const int16_t* filter_x,
-                               int x_step_q4,
-                               const int16_t* filter_y,
-                               int y_step_q4,
-                               int w,
-                               int h,
-                               int bps);
-#define av1_highbd_convolve_avg av1_highbd_convolve_avg_c
-
-void av1_highbd_convolve_copy_c(const uint8_t* src,
-                                ptrdiff_t src_stride,
-                                uint8_t* dst,
-                                ptrdiff_t dst_stride,
-                                const int16_t* filter_x,
-                                int x_step_q4,
-                                const int16_t* filter_y,
-                                int y_step_q4,
-                                int w,
-                                int h,
-                                int bps);
-#define av1_highbd_convolve_copy av1_highbd_convolve_copy_c
-
-void av1_highbd_convolve_horiz_c(const uint16_t* src,
-                                 int src_stride,
-                                 uint16_t* dst,
-                                 int dst_stride,
-                                 int w,
-                                 int h,
-                                 const InterpFilterParams fp,
-                                 const int subpel_x_q4,
-                                 int x_step_q4,
-                                 int avg,
-                                 int bd);
-void av1_highbd_convolve_horiz_sse4_1(const uint16_t* src,
-                                      int src_stride,
-                                      uint16_t* dst,
-                                      int dst_stride,
-                                      int w,
-                                      int h,
-                                      const InterpFilterParams fp,
-                                      const int subpel_x_q4,
-                                      int x_step_q4,
-                                      int avg,
-                                      int bd);
-RTCD_EXTERN void (*av1_highbd_convolve_horiz)(const uint16_t* src,
-                                              int src_stride,
-                                              uint16_t* dst,
-                                              int dst_stride,
-                                              int w,
-                                              int h,
-                                              const InterpFilterParams fp,
-                                              const int subpel_x_q4,
-                                              int x_step_q4,
-                                              int avg,
-                                              int bd);
-
-void av1_highbd_convolve_init_c(void);
-void av1_highbd_convolve_init_sse4_1(void);
-RTCD_EXTERN void (*av1_highbd_convolve_init)(void);
-
-void av1_highbd_convolve_rounding_c(const int32_t* src,
-                                    int src_stride,
-                                    uint8_t* dst,
-                                    int dst_stride,
-                                    int w,
-                                    int h,
-                                    int bits,
-                                    int bd);
-void av1_highbd_convolve_rounding_avx2(const int32_t* src,
-                                       int src_stride,
-                                       uint8_t* dst,
-                                       int dst_stride,
-                                       int w,
-                                       int h,
-                                       int bits,
-                                       int bd);
-RTCD_EXTERN void (*av1_highbd_convolve_rounding)(const int32_t* src,
-                                                 int src_stride,
-                                                 uint8_t* dst,
-                                                 int dst_stride,
-                                                 int w,
-                                                 int h,
-                                                 int bits,
-                                                 int bd);
-
-void av1_highbd_convolve_vert_c(const uint16_t* src,
-                                int src_stride,
-                                uint16_t* dst,
-                                int dst_stride,
-                                int w,
-                                int h,
-                                const InterpFilterParams fp,
-                                const int subpel_x_q4,
-                                int x_step_q4,
-                                int avg,
-                                int bd);
-void av1_highbd_convolve_vert_sse4_1(const uint16_t* src,
-                                     int src_stride,
-                                     uint16_t* dst,
-                                     int dst_stride,
-                                     int w,
-                                     int h,
-                                     const InterpFilterParams fp,
-                                     const int subpel_x_q4,
-                                     int x_step_q4,
-                                     int avg,
-                                     int bd);
-RTCD_EXTERN void (*av1_highbd_convolve_vert)(const uint16_t* src,
-                                             int src_stride,
-                                             uint16_t* dst,
-                                             int dst_stride,
-                                             int w,
-                                             int h,
-                                             const InterpFilterParams fp,
-                                             const int subpel_x_q4,
-                                             int x_step_q4,
-                                             int avg,
-                                             int bd);
-
-void av1_highbd_iht16x16_256_add_c(const tran_low_t* input,
-                                   uint8_t* output,
-                                   int pitch,
-                                   const struct txfm_param* param);
-#define av1_highbd_iht16x16_256_add av1_highbd_iht16x16_256_add_c
-
-void av1_highbd_iht16x32_512_add_c(const tran_low_t* input,
-                                   uint8_t* dest,
-                                   int dest_stride,
-                                   const struct txfm_param* param);
-#define av1_highbd_iht16x32_512_add av1_highbd_iht16x32_512_add_c
-
-void av1_highbd_iht16x4_64_add_c(const tran_low_t* input,
-                                 uint8_t* dest,
-                                 int dest_stride,
-                                 const struct txfm_param* param);
-#define av1_highbd_iht16x4_64_add av1_highbd_iht16x4_64_add_c
-
-void av1_highbd_iht16x8_128_add_c(const tran_low_t* input,
-                                  uint8_t* dest,
-                                  int dest_stride,
-                                  const struct txfm_param* param);
-#define av1_highbd_iht16x8_128_add av1_highbd_iht16x8_128_add_c
-
-void av1_highbd_iht32x16_512_add_c(const tran_low_t* input,
-                                   uint8_t* dest,
-                                   int dest_stride,
-                                   const struct txfm_param* param);
-#define av1_highbd_iht32x16_512_add av1_highbd_iht32x16_512_add_c
-
-void av1_highbd_iht32x8_256_add_c(const tran_low_t* input,
-                                  uint8_t* dest,
-                                  int dest_stride,
-                                  const struct txfm_param* param);
-#define av1_highbd_iht32x8_256_add av1_highbd_iht32x8_256_add_c
-
-void av1_highbd_iht4x16_64_add_c(const tran_low_t* input,
-                                 uint8_t* dest,
-                                 int dest_stride,
-                                 const struct txfm_param* param);
-#define av1_highbd_iht4x16_64_add av1_highbd_iht4x16_64_add_c
-
-void av1_highbd_iht4x4_16_add_c(const tran_low_t* input,
-                                uint8_t* dest,
-                                int dest_stride,
-                                const struct txfm_param* param);
-#define av1_highbd_iht4x4_16_add av1_highbd_iht4x4_16_add_c
-
-void av1_highbd_iht4x8_32_add_c(const tran_low_t* input,
-                                uint8_t* dest,
-                                int dest_stride,
-                                const struct txfm_param* param);
-#define av1_highbd_iht4x8_32_add av1_highbd_iht4x8_32_add_c
-
-void av1_highbd_iht8x16_128_add_c(const tran_low_t* input,
-                                  uint8_t* dest,
-                                  int dest_stride,
-                                  const struct txfm_param* param);
-#define av1_highbd_iht8x16_128_add av1_highbd_iht8x16_128_add_c
-
-void av1_highbd_iht8x32_256_add_c(const tran_low_t* input,
-                                  uint8_t* dest,
-                                  int dest_stride,
-                                  const struct txfm_param* param);
-#define av1_highbd_iht8x32_256_add av1_highbd_iht8x32_256_add_c
-
-void av1_highbd_iht8x4_32_add_c(const tran_low_t* input,
-                                uint8_t* dest,
-                                int dest_stride,
-                                const struct txfm_param* param);
-#define av1_highbd_iht8x4_32_add av1_highbd_iht8x4_32_add_c
-
-void av1_highbd_iht8x8_64_add_c(const tran_low_t* input,
-                                uint8_t* dest,
-                                int dest_stride,
-                                const struct txfm_param* param);
-#define av1_highbd_iht8x8_64_add av1_highbd_iht8x8_64_add_c
-
-void av1_highbd_warp_affine_c(const int32_t* mat,
-                              const uint16_t* ref,
-                              int width,
-                              int height,
-                              int stride,
-                              uint16_t* pred,
-                              int p_col,
-                              int p_row,
-                              int p_width,
-                              int p_height,
-                              int p_stride,
-                              int subsampling_x,
-                              int subsampling_y,
-                              int bd,
-                              ConvolveParams* conv_params,
-                              int16_t alpha,
-                              int16_t beta,
-                              int16_t gamma,
-                              int16_t delta);
-void av1_highbd_warp_affine_ssse3(const int32_t* mat,
-                                  const uint16_t* ref,
-                                  int width,
-                                  int height,
-                                  int stride,
-                                  uint16_t* pred,
-                                  int p_col,
-                                  int p_row,
-                                  int p_width,
-                                  int p_height,
-                                  int p_stride,
-                                  int subsampling_x,
-                                  int subsampling_y,
-                                  int bd,
-                                  ConvolveParams* conv_params,
-                                  int16_t alpha,
-                                  int16_t beta,
-                                  int16_t gamma,
-                                  int16_t delta);
-RTCD_EXTERN void (*av1_highbd_warp_affine)(const int32_t* mat,
-                                           const uint16_t* ref,
-                                           int width,
-                                           int height,
-                                           int stride,
-                                           uint16_t* pred,
-                                           int p_col,
-                                           int p_row,
-                                           int p_width,
-                                           int p_height,
-                                           int p_stride,
-                                           int subsampling_x,
-                                           int subsampling_y,
-                                           int bd,
-                                           ConvolveParams* conv_params,
-                                           int16_t alpha,
-                                           int16_t beta,
-                                           int16_t gamma,
-                                           int16_t delta);
-
 void av1_iht16x16_256_add_c(const tran_low_t* input,
                             uint8_t* output,
                             int pitch,
@@ -1342,24 +952,6 @@
   av1_convolve_vert = av1_convolve_vert_c;
   if (flags & HAS_SSSE3)
     av1_convolve_vert = av1_convolve_vert_ssse3;
-  av1_highbd_convolve_2d = av1_highbd_convolve_2d_c;
-  if (flags & HAS_SSSE3)
-    av1_highbd_convolve_2d = av1_highbd_convolve_2d_ssse3;
-  av1_highbd_convolve_horiz = av1_highbd_convolve_horiz_c;
-  if (flags & HAS_SSE4_1)
-    av1_highbd_convolve_horiz = av1_highbd_convolve_horiz_sse4_1;
-  av1_highbd_convolve_init = av1_highbd_convolve_init_c;
-  if (flags & HAS_SSE4_1)
-    av1_highbd_convolve_init = av1_highbd_convolve_init_sse4_1;
-  av1_highbd_convolve_rounding = av1_highbd_convolve_rounding_c;
-  if (flags & HAS_AVX2)
-    av1_highbd_convolve_rounding = av1_highbd_convolve_rounding_avx2;
-  av1_highbd_convolve_vert = av1_highbd_convolve_vert_c;
-  if (flags & HAS_SSE4_1)
-    av1_highbd_convolve_vert = av1_highbd_convolve_vert_sse4_1;
-  av1_highbd_warp_affine = av1_highbd_warp_affine_c;
-  if (flags & HAS_SSSE3)
-    av1_highbd_warp_affine = av1_highbd_warp_affine_ssse3;
   av1_iht16x16_256_add = av1_iht16x16_256_add_c;
   if (flags & HAS_SSE2)
     av1_iht16x16_256_add = av1_iht16x16_256_add_sse2;
diff --git a/third_party/libaom/source/config/linux/x64/aom_config.asm b/third_party/libaom/source/config/linux/x64/aom_config.asm
index 8071592..0c593b5 100644
--- a/third_party/libaom/source/config/linux/x64/aom_config.asm
+++ b/third_party/libaom/source/config/linux/x64/aom_config.asm
@@ -61,7 +61,7 @@
 %define CONFIG_ENCODE_PERF_TESTS 0
 %define CONFIG_COEFFICIENT_RANGE_CHECKING 0
 %define CONFIG_LOWBITDEPTH 1
-%define CONFIG_HIGHBITDEPTH 1
+%define CONFIG_HIGHBITDEPTH 0
 %define CONFIG_EXPERIMENTAL 0
 %define CONFIG_SIZE_LIMIT 1
 %define CONFIG_FP_MB_STATS 0
diff --git a/third_party/libaom/source/config/linux/x64/aom_config.c b/third_party/libaom/source/config/linux/x64/aom_config.c
index 11300dc..0166e5a 100644
--- a/third_party/libaom/source/config/linux/x64/aom_config.c
+++ b/third_party/libaom/source/config/linux/x64/aom_config.c
@@ -7,5 +7,5 @@
 /* Media Patent License 1.0 was not distributed with this source code in the */
 /* PATENTS file, you can obtain it at www.aomedia.org/license/patent. */
 #include "aom/aom_codec.h"
-static const char* const cfg = "--target=x86_64-linux-gcc --enable-external-build --enable-postproc --disable-av1-encoder --size-limit=16384x16384 --enable-realtime-only --disable-install-docs --enable-pic --as=yasm";
+static const char* const cfg = "--target=x86_64-linux-gcc --enable-external-build --enable-postproc --disable-av1-encoder --size-limit=16384x16384 --enable-realtime-only --disable-install-docs --disable-highbitdepth --enable-pic --as=yasm";
 const char *aom_codec_build_config(void) {return cfg;}
diff --git a/third_party/libaom/source/config/linux/x64/aom_config.h b/third_party/libaom/source/config/linux/x64/aom_config.h
index 06f431bd..9429d44 100644
--- a/third_party/libaom/source/config/linux/x64/aom_config.h
+++ b/third_party/libaom/source/config/linux/x64/aom_config.h
@@ -74,7 +74,7 @@
 #define CONFIG_ENCODE_PERF_TESTS 0
 #define CONFIG_COEFFICIENT_RANGE_CHECKING 0
 #define CONFIG_LOWBITDEPTH 1
-#define CONFIG_HIGHBITDEPTH 1
+#define CONFIG_HIGHBITDEPTH 0
 #define CONFIG_EXPERIMENTAL 0
 #define CONFIG_SIZE_LIMIT 1
 #define CONFIG_FP_MB_STATS 0
diff --git a/third_party/libaom/source/config/linux/x64/aom_dsp_rtcd.h b/third_party/libaom/source/config/linux/x64/aom_dsp_rtcd.h
index f94714d0..91e5bf5 100644
--- a/third_party/libaom/source/config/linux/x64/aom_dsp_rtcd.h
+++ b/third_party/libaom/source/config/linux/x64/aom_dsp_rtcd.h
@@ -1371,1335 +1371,6 @@
                               const uint8_t* left);
 #define aom_h_predictor_8x8 aom_h_predictor_8x8_sse2
 
-void aom_highbd_blend_a64_hmask_c(uint8_t* dst,
-                                  uint32_t dst_stride,
-                                  const uint8_t* src0,
-                                  uint32_t src0_stride,
-                                  const uint8_t* src1,
-                                  uint32_t src1_stride,
-                                  const uint8_t* mask,
-                                  int h,
-                                  int w,
-                                  int bd);
-void aom_highbd_blend_a64_hmask_sse4_1(uint8_t* dst,
-                                       uint32_t dst_stride,
-                                       const uint8_t* src0,
-                                       uint32_t src0_stride,
-                                       const uint8_t* src1,
-                                       uint32_t src1_stride,
-                                       const uint8_t* mask,
-                                       int h,
-                                       int w,
-                                       int bd);
-RTCD_EXTERN void (*aom_highbd_blend_a64_hmask)(uint8_t* dst,
-                                               uint32_t dst_stride,
-                                               const uint8_t* src0,
-                                               uint32_t src0_stride,
-                                               const uint8_t* src1,
-                                               uint32_t src1_stride,
-                                               const uint8_t* mask,
-                                               int h,
-                                               int w,
-                                               int bd);
-
-void aom_highbd_blend_a64_mask_c(uint8_t* dst,
-                                 uint32_t dst_stride,
-                                 const uint8_t* src0,
-                                 uint32_t src0_stride,
-                                 const uint8_t* src1,
-                                 uint32_t src1_stride,
-                                 const uint8_t* mask,
-                                 uint32_t mask_stride,
-                                 int h,
-                                 int w,
-                                 int suby,
-                                 int subx,
-                                 int bd);
-void aom_highbd_blend_a64_mask_sse4_1(uint8_t* dst,
-                                      uint32_t dst_stride,
-                                      const uint8_t* src0,
-                                      uint32_t src0_stride,
-                                      const uint8_t* src1,
-                                      uint32_t src1_stride,
-                                      const uint8_t* mask,
-                                      uint32_t mask_stride,
-                                      int h,
-                                      int w,
-                                      int suby,
-                                      int subx,
-                                      int bd);
-RTCD_EXTERN void (*aom_highbd_blend_a64_mask)(uint8_t* dst,
-                                              uint32_t dst_stride,
-                                              const uint8_t* src0,
-                                              uint32_t src0_stride,
-                                              const uint8_t* src1,
-                                              uint32_t src1_stride,
-                                              const uint8_t* mask,
-                                              uint32_t mask_stride,
-                                              int h,
-                                              int w,
-                                              int suby,
-                                              int subx,
-                                              int bd);
-
-void aom_highbd_blend_a64_vmask_c(uint8_t* dst,
-                                  uint32_t dst_stride,
-                                  const uint8_t* src0,
-                                  uint32_t src0_stride,
-                                  const uint8_t* src1,
-                                  uint32_t src1_stride,
-                                  const uint8_t* mask,
-                                  int h,
-                                  int w,
-                                  int bd);
-void aom_highbd_blend_a64_vmask_sse4_1(uint8_t* dst,
-                                       uint32_t dst_stride,
-                                       const uint8_t* src0,
-                                       uint32_t src0_stride,
-                                       const uint8_t* src1,
-                                       uint32_t src1_stride,
-                                       const uint8_t* mask,
-                                       int h,
-                                       int w,
-                                       int bd);
-RTCD_EXTERN void (*aom_highbd_blend_a64_vmask)(uint8_t* dst,
-                                               uint32_t dst_stride,
-                                               const uint8_t* src0,
-                                               uint32_t src0_stride,
-                                               const uint8_t* src1,
-                                               uint32_t src1_stride,
-                                               const uint8_t* mask,
-                                               int h,
-                                               int w,
-                                               int bd);
-
-void aom_highbd_convolve8_c(const uint8_t* src,
-                            ptrdiff_t src_stride,
-                            uint8_t* dst,
-                            ptrdiff_t dst_stride,
-                            const int16_t* filter_x,
-                            int x_step_q4,
-                            const int16_t* filter_y,
-                            int y_step_q4,
-                            int w,
-                            int h,
-                            int bps);
-void aom_highbd_convolve8_sse2(const uint8_t* src,
-                               ptrdiff_t src_stride,
-                               uint8_t* dst,
-                               ptrdiff_t dst_stride,
-                               const int16_t* filter_x,
-                               int x_step_q4,
-                               const int16_t* filter_y,
-                               int y_step_q4,
-                               int w,
-                               int h,
-                               int bps);
-void aom_highbd_convolve8_avx2(const uint8_t* src,
-                               ptrdiff_t src_stride,
-                               uint8_t* dst,
-                               ptrdiff_t dst_stride,
-                               const int16_t* filter_x,
-                               int x_step_q4,
-                               const int16_t* filter_y,
-                               int y_step_q4,
-                               int w,
-                               int h,
-                               int bps);
-RTCD_EXTERN void (*aom_highbd_convolve8)(const uint8_t* src,
-                                         ptrdiff_t src_stride,
-                                         uint8_t* dst,
-                                         ptrdiff_t dst_stride,
-                                         const int16_t* filter_x,
-                                         int x_step_q4,
-                                         const int16_t* filter_y,
-                                         int y_step_q4,
-                                         int w,
-                                         int h,
-                                         int bps);
-
-void aom_highbd_convolve8_avg_c(const uint8_t* src,
-                                ptrdiff_t src_stride,
-                                uint8_t* dst,
-                                ptrdiff_t dst_stride,
-                                const int16_t* filter_x,
-                                int x_step_q4,
-                                const int16_t* filter_y,
-                                int y_step_q4,
-                                int w,
-                                int h,
-                                int bps);
-void aom_highbd_convolve8_avg_sse2(const uint8_t* src,
-                                   ptrdiff_t src_stride,
-                                   uint8_t* dst,
-                                   ptrdiff_t dst_stride,
-                                   const int16_t* filter_x,
-                                   int x_step_q4,
-                                   const int16_t* filter_y,
-                                   int y_step_q4,
-                                   int w,
-                                   int h,
-                                   int bps);
-void aom_highbd_convolve8_avg_avx2(const uint8_t* src,
-                                   ptrdiff_t src_stride,
-                                   uint8_t* dst,
-                                   ptrdiff_t dst_stride,
-                                   const int16_t* filter_x,
-                                   int x_step_q4,
-                                   const int16_t* filter_y,
-                                   int y_step_q4,
-                                   int w,
-                                   int h,
-                                   int bps);
-RTCD_EXTERN void (*aom_highbd_convolve8_avg)(const uint8_t* src,
-                                             ptrdiff_t src_stride,
-                                             uint8_t* dst,
-                                             ptrdiff_t dst_stride,
-                                             const int16_t* filter_x,
-                                             int x_step_q4,
-                                             const int16_t* filter_y,
-                                             int y_step_q4,
-                                             int w,
-                                             int h,
-                                             int bps);
-
-void aom_highbd_convolve8_avg_horiz_c(const uint8_t* src,
-                                      ptrdiff_t src_stride,
-                                      uint8_t* dst,
-                                      ptrdiff_t dst_stride,
-                                      const int16_t* filter_x,
-                                      int x_step_q4,
-                                      const int16_t* filter_y,
-                                      int y_step_q4,
-                                      int w,
-                                      int h,
-                                      int bps);
-void aom_highbd_convolve8_avg_horiz_sse2(const uint8_t* src,
-                                         ptrdiff_t src_stride,
-                                         uint8_t* dst,
-                                         ptrdiff_t dst_stride,
-                                         const int16_t* filter_x,
-                                         int x_step_q4,
-                                         const int16_t* filter_y,
-                                         int y_step_q4,
-                                         int w,
-                                         int h,
-                                         int bps);
-void aom_highbd_convolve8_avg_horiz_avx2(const uint8_t* src,
-                                         ptrdiff_t src_stride,
-                                         uint8_t* dst,
-                                         ptrdiff_t dst_stride,
-                                         const int16_t* filter_x,
-                                         int x_step_q4,
-                                         const int16_t* filter_y,
-                                         int y_step_q4,
-                                         int w,
-                                         int h,
-                                         int bps);
-RTCD_EXTERN void (*aom_highbd_convolve8_avg_horiz)(const uint8_t* src,
-                                                   ptrdiff_t src_stride,
-                                                   uint8_t* dst,
-                                                   ptrdiff_t dst_stride,
-                                                   const int16_t* filter_x,
-                                                   int x_step_q4,
-                                                   const int16_t* filter_y,
-                                                   int y_step_q4,
-                                                   int w,
-                                                   int h,
-                                                   int bps);
-
-void aom_highbd_convolve8_avg_vert_c(const uint8_t* src,
-                                     ptrdiff_t src_stride,
-                                     uint8_t* dst,
-                                     ptrdiff_t dst_stride,
-                                     const int16_t* filter_x,
-                                     int x_step_q4,
-                                     const int16_t* filter_y,
-                                     int y_step_q4,
-                                     int w,
-                                     int h,
-                                     int bps);
-void aom_highbd_convolve8_avg_vert_sse2(const uint8_t* src,
-                                        ptrdiff_t src_stride,
-                                        uint8_t* dst,
-                                        ptrdiff_t dst_stride,
-                                        const int16_t* filter_x,
-                                        int x_step_q4,
-                                        const int16_t* filter_y,
-                                        int y_step_q4,
-                                        int w,
-                                        int h,
-                                        int bps);
-void aom_highbd_convolve8_avg_vert_avx2(const uint8_t* src,
-                                        ptrdiff_t src_stride,
-                                        uint8_t* dst,
-                                        ptrdiff_t dst_stride,
-                                        const int16_t* filter_x,
-                                        int x_step_q4,
-                                        const int16_t* filter_y,
-                                        int y_step_q4,
-                                        int w,
-                                        int h,
-                                        int bps);
-RTCD_EXTERN void (*aom_highbd_convolve8_avg_vert)(const uint8_t* src,
-                                                  ptrdiff_t src_stride,
-                                                  uint8_t* dst,
-                                                  ptrdiff_t dst_stride,
-                                                  const int16_t* filter_x,
-                                                  int x_step_q4,
-                                                  const int16_t* filter_y,
-                                                  int y_step_q4,
-                                                  int w,
-                                                  int h,
-                                                  int bps);
-
-void aom_highbd_convolve8_horiz_c(const uint8_t* src,
-                                  ptrdiff_t src_stride,
-                                  uint8_t* dst,
-                                  ptrdiff_t dst_stride,
-                                  const int16_t* filter_x,
-                                  int x_step_q4,
-                                  const int16_t* filter_y,
-                                  int y_step_q4,
-                                  int w,
-                                  int h,
-                                  int bps);
-void aom_highbd_convolve8_horiz_sse2(const uint8_t* src,
-                                     ptrdiff_t src_stride,
-                                     uint8_t* dst,
-                                     ptrdiff_t dst_stride,
-                                     const int16_t* filter_x,
-                                     int x_step_q4,
-                                     const int16_t* filter_y,
-                                     int y_step_q4,
-                                     int w,
-                                     int h,
-                                     int bps);
-void aom_highbd_convolve8_horiz_avx2(const uint8_t* src,
-                                     ptrdiff_t src_stride,
-                                     uint8_t* dst,
-                                     ptrdiff_t dst_stride,
-                                     const int16_t* filter_x,
-                                     int x_step_q4,
-                                     const int16_t* filter_y,
-                                     int y_step_q4,
-                                     int w,
-                                     int h,
-                                     int bps);
-RTCD_EXTERN void (*aom_highbd_convolve8_horiz)(const uint8_t* src,
-                                               ptrdiff_t src_stride,
-                                               uint8_t* dst,
-                                               ptrdiff_t dst_stride,
-                                               const int16_t* filter_x,
-                                               int x_step_q4,
-                                               const int16_t* filter_y,
-                                               int y_step_q4,
-                                               int w,
-                                               int h,
-                                               int bps);
-
-void aom_highbd_convolve8_vert_c(const uint8_t* src,
-                                 ptrdiff_t src_stride,
-                                 uint8_t* dst,
-                                 ptrdiff_t dst_stride,
-                                 const int16_t* filter_x,
-                                 int x_step_q4,
-                                 const int16_t* filter_y,
-                                 int y_step_q4,
-                                 int w,
-                                 int h,
-                                 int bps);
-void aom_highbd_convolve8_vert_sse2(const uint8_t* src,
-                                    ptrdiff_t src_stride,
-                                    uint8_t* dst,
-                                    ptrdiff_t dst_stride,
-                                    const int16_t* filter_x,
-                                    int x_step_q4,
-                                    const int16_t* filter_y,
-                                    int y_step_q4,
-                                    int w,
-                                    int h,
-                                    int bps);
-void aom_highbd_convolve8_vert_avx2(const uint8_t* src,
-                                    ptrdiff_t src_stride,
-                                    uint8_t* dst,
-                                    ptrdiff_t dst_stride,
-                                    const int16_t* filter_x,
-                                    int x_step_q4,
-                                    const int16_t* filter_y,
-                                    int y_step_q4,
-                                    int w,
-                                    int h,
-                                    int bps);
-RTCD_EXTERN void (*aom_highbd_convolve8_vert)(const uint8_t* src,
-                                              ptrdiff_t src_stride,
-                                              uint8_t* dst,
-                                              ptrdiff_t dst_stride,
-                                              const int16_t* filter_x,
-                                              int x_step_q4,
-                                              const int16_t* filter_y,
-                                              int y_step_q4,
-                                              int w,
-                                              int h,
-                                              int bps);
-
-void aom_highbd_convolve_avg_c(const uint8_t* src,
-                               ptrdiff_t src_stride,
-                               uint8_t* dst,
-                               ptrdiff_t dst_stride,
-                               const int16_t* filter_x,
-                               int x_step_q4,
-                               const int16_t* filter_y,
-                               int y_step_q4,
-                               int w,
-                               int h,
-                               int bps);
-void aom_highbd_convolve_avg_sse2(const uint8_t* src,
-                                  ptrdiff_t src_stride,
-                                  uint8_t* dst,
-                                  ptrdiff_t dst_stride,
-                                  const int16_t* filter_x,
-                                  int x_step_q4,
-                                  const int16_t* filter_y,
-                                  int y_step_q4,
-                                  int w,
-                                  int h,
-                                  int bps);
-void aom_highbd_convolve_avg_avx2(const uint8_t* src,
-                                  ptrdiff_t src_stride,
-                                  uint8_t* dst,
-                                  ptrdiff_t dst_stride,
-                                  const int16_t* filter_x,
-                                  int x_step_q4,
-                                  const int16_t* filter_y,
-                                  int y_step_q4,
-                                  int w,
-                                  int h,
-                                  int bps);
-RTCD_EXTERN void (*aom_highbd_convolve_avg)(const uint8_t* src,
-                                            ptrdiff_t src_stride,
-                                            uint8_t* dst,
-                                            ptrdiff_t dst_stride,
-                                            const int16_t* filter_x,
-                                            int x_step_q4,
-                                            const int16_t* filter_y,
-                                            int y_step_q4,
-                                            int w,
-                                            int h,
-                                            int bps);
-
-void aom_highbd_convolve_copy_c(const uint8_t* src,
-                                ptrdiff_t src_stride,
-                                uint8_t* dst,
-                                ptrdiff_t dst_stride,
-                                const int16_t* filter_x,
-                                int x_step_q4,
-                                const int16_t* filter_y,
-                                int y_step_q4,
-                                int w,
-                                int h,
-                                int bps);
-void aom_highbd_convolve_copy_sse2(const uint8_t* src,
-                                   ptrdiff_t src_stride,
-                                   uint8_t* dst,
-                                   ptrdiff_t dst_stride,
-                                   const int16_t* filter_x,
-                                   int x_step_q4,
-                                   const int16_t* filter_y,
-                                   int y_step_q4,
-                                   int w,
-                                   int h,
-                                   int bps);
-void aom_highbd_convolve_copy_avx2(const uint8_t* src,
-                                   ptrdiff_t src_stride,
-                                   uint8_t* dst,
-                                   ptrdiff_t dst_stride,
-                                   const int16_t* filter_x,
-                                   int x_step_q4,
-                                   const int16_t* filter_y,
-                                   int y_step_q4,
-                                   int w,
-                                   int h,
-                                   int bps);
-RTCD_EXTERN void (*aom_highbd_convolve_copy)(const uint8_t* src,
-                                             ptrdiff_t src_stride,
-                                             uint8_t* dst,
-                                             ptrdiff_t dst_stride,
-                                             const int16_t* filter_x,
-                                             int x_step_q4,
-                                             const int16_t* filter_y,
-                                             int y_step_q4,
-                                             int w,
-                                             int h,
-                                             int bps);
-
-void aom_highbd_d117_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d117_predictor_16x16 aom_highbd_d117_predictor_16x16_c
-
-void aom_highbd_d117_predictor_16x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d117_predictor_16x32 aom_highbd_d117_predictor_16x32_c
-
-void aom_highbd_d117_predictor_16x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d117_predictor_16x8 aom_highbd_d117_predictor_16x8_c
-
-void aom_highbd_d117_predictor_2x2_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d117_predictor_2x2 aom_highbd_d117_predictor_2x2_c
-
-void aom_highbd_d117_predictor_32x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d117_predictor_32x16 aom_highbd_d117_predictor_32x16_c
-
-void aom_highbd_d117_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d117_predictor_32x32 aom_highbd_d117_predictor_32x32_c
-
-void aom_highbd_d117_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d117_predictor_4x4 aom_highbd_d117_predictor_4x4_c
-
-void aom_highbd_d117_predictor_4x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d117_predictor_4x8 aom_highbd_d117_predictor_4x8_c
-
-void aom_highbd_d117_predictor_8x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d117_predictor_8x16 aom_highbd_d117_predictor_8x16_c
-
-void aom_highbd_d117_predictor_8x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d117_predictor_8x4 aom_highbd_d117_predictor_8x4_c
-
-void aom_highbd_d117_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d117_predictor_8x8 aom_highbd_d117_predictor_8x8_c
-
-void aom_highbd_d135_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d135_predictor_16x16 aom_highbd_d135_predictor_16x16_c
-
-void aom_highbd_d135_predictor_16x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d135_predictor_16x32 aom_highbd_d135_predictor_16x32_c
-
-void aom_highbd_d135_predictor_16x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d135_predictor_16x8 aom_highbd_d135_predictor_16x8_c
-
-void aom_highbd_d135_predictor_2x2_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d135_predictor_2x2 aom_highbd_d135_predictor_2x2_c
-
-void aom_highbd_d135_predictor_32x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d135_predictor_32x16 aom_highbd_d135_predictor_32x16_c
-
-void aom_highbd_d135_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d135_predictor_32x32 aom_highbd_d135_predictor_32x32_c
-
-void aom_highbd_d135_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d135_predictor_4x4 aom_highbd_d135_predictor_4x4_c
-
-void aom_highbd_d135_predictor_4x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d135_predictor_4x8 aom_highbd_d135_predictor_4x8_c
-
-void aom_highbd_d135_predictor_8x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d135_predictor_8x16 aom_highbd_d135_predictor_8x16_c
-
-void aom_highbd_d135_predictor_8x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d135_predictor_8x4 aom_highbd_d135_predictor_8x4_c
-
-void aom_highbd_d135_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d135_predictor_8x8 aom_highbd_d135_predictor_8x8_c
-
-void aom_highbd_d153_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d153_predictor_16x16 aom_highbd_d153_predictor_16x16_c
-
-void aom_highbd_d153_predictor_16x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d153_predictor_16x32 aom_highbd_d153_predictor_16x32_c
-
-void aom_highbd_d153_predictor_16x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d153_predictor_16x8 aom_highbd_d153_predictor_16x8_c
-
-void aom_highbd_d153_predictor_2x2_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d153_predictor_2x2 aom_highbd_d153_predictor_2x2_c
-
-void aom_highbd_d153_predictor_32x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d153_predictor_32x16 aom_highbd_d153_predictor_32x16_c
-
-void aom_highbd_d153_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d153_predictor_32x32 aom_highbd_d153_predictor_32x32_c
-
-void aom_highbd_d153_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d153_predictor_4x4 aom_highbd_d153_predictor_4x4_c
-
-void aom_highbd_d153_predictor_4x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d153_predictor_4x8 aom_highbd_d153_predictor_4x8_c
-
-void aom_highbd_d153_predictor_8x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d153_predictor_8x16 aom_highbd_d153_predictor_8x16_c
-
-void aom_highbd_d153_predictor_8x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d153_predictor_8x4 aom_highbd_d153_predictor_8x4_c
-
-void aom_highbd_d153_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d153_predictor_8x8 aom_highbd_d153_predictor_8x8_c
-
-void aom_highbd_d207e_predictor_16x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_d207e_predictor_16x16 aom_highbd_d207e_predictor_16x16_c
-
-void aom_highbd_d207e_predictor_16x32_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_d207e_predictor_16x32 aom_highbd_d207e_predictor_16x32_c
-
-void aom_highbd_d207e_predictor_16x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d207e_predictor_16x8 aom_highbd_d207e_predictor_16x8_c
-
-void aom_highbd_d207e_predictor_2x2_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d207e_predictor_2x2 aom_highbd_d207e_predictor_2x2_c
-
-void aom_highbd_d207e_predictor_32x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_d207e_predictor_32x16 aom_highbd_d207e_predictor_32x16_c
-
-void aom_highbd_d207e_predictor_32x32_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_d207e_predictor_32x32 aom_highbd_d207e_predictor_32x32_c
-
-void aom_highbd_d207e_predictor_4x4_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d207e_predictor_4x4 aom_highbd_d207e_predictor_4x4_c
-
-void aom_highbd_d207e_predictor_4x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d207e_predictor_4x8 aom_highbd_d207e_predictor_4x8_c
-
-void aom_highbd_d207e_predictor_8x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d207e_predictor_8x16 aom_highbd_d207e_predictor_8x16_c
-
-void aom_highbd_d207e_predictor_8x4_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d207e_predictor_8x4 aom_highbd_d207e_predictor_8x4_c
-
-void aom_highbd_d207e_predictor_8x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d207e_predictor_8x8 aom_highbd_d207e_predictor_8x8_c
-
-void aom_highbd_d45e_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d45e_predictor_16x16 aom_highbd_d45e_predictor_16x16_c
-
-void aom_highbd_d45e_predictor_16x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d45e_predictor_16x32 aom_highbd_d45e_predictor_16x32_c
-
-void aom_highbd_d45e_predictor_16x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d45e_predictor_16x8 aom_highbd_d45e_predictor_16x8_c
-
-void aom_highbd_d45e_predictor_2x2_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d45e_predictor_2x2 aom_highbd_d45e_predictor_2x2_c
-
-void aom_highbd_d45e_predictor_32x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d45e_predictor_32x16 aom_highbd_d45e_predictor_32x16_c
-
-void aom_highbd_d45e_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d45e_predictor_32x32 aom_highbd_d45e_predictor_32x32_c
-
-void aom_highbd_d45e_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d45e_predictor_4x4 aom_highbd_d45e_predictor_4x4_c
-
-void aom_highbd_d45e_predictor_4x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d45e_predictor_4x8 aom_highbd_d45e_predictor_4x8_c
-
-void aom_highbd_d45e_predictor_8x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d45e_predictor_8x16 aom_highbd_d45e_predictor_8x16_c
-
-void aom_highbd_d45e_predictor_8x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d45e_predictor_8x4 aom_highbd_d45e_predictor_8x4_c
-
-void aom_highbd_d45e_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d45e_predictor_8x8 aom_highbd_d45e_predictor_8x8_c
-
-void aom_highbd_d63e_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d63e_predictor_16x16 aom_highbd_d63e_predictor_16x16_c
-
-void aom_highbd_d63e_predictor_16x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d63e_predictor_16x32 aom_highbd_d63e_predictor_16x32_c
-
-void aom_highbd_d63e_predictor_16x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d63e_predictor_16x8 aom_highbd_d63e_predictor_16x8_c
-
-void aom_highbd_d63e_predictor_2x2_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d63e_predictor_2x2 aom_highbd_d63e_predictor_2x2_c
-
-void aom_highbd_d63e_predictor_32x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d63e_predictor_32x16 aom_highbd_d63e_predictor_32x16_c
-
-void aom_highbd_d63e_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d63e_predictor_32x32 aom_highbd_d63e_predictor_32x32_c
-
-void aom_highbd_d63e_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d63e_predictor_4x4 aom_highbd_d63e_predictor_4x4_c
-
-void aom_highbd_d63e_predictor_4x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d63e_predictor_4x8 aom_highbd_d63e_predictor_4x8_c
-
-void aom_highbd_d63e_predictor_8x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d63e_predictor_8x16 aom_highbd_d63e_predictor_8x16_c
-
-void aom_highbd_d63e_predictor_8x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d63e_predictor_8x4 aom_highbd_d63e_predictor_8x4_c
-
-void aom_highbd_d63e_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d63e_predictor_8x8 aom_highbd_d63e_predictor_8x8_c
-
-void aom_highbd_dc_128_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_128_predictor_16x16 aom_highbd_dc_128_predictor_16x16_c
-
-void aom_highbd_dc_128_predictor_16x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_128_predictor_16x32 aom_highbd_dc_128_predictor_16x32_c
-
-void aom_highbd_dc_128_predictor_16x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_128_predictor_16x8 aom_highbd_dc_128_predictor_16x8_c
-
-void aom_highbd_dc_128_predictor_2x2_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_128_predictor_2x2 aom_highbd_dc_128_predictor_2x2_c
-
-void aom_highbd_dc_128_predictor_32x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_128_predictor_32x16 aom_highbd_dc_128_predictor_32x16_c
-
-void aom_highbd_dc_128_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_128_predictor_32x32 aom_highbd_dc_128_predictor_32x32_c
-
-void aom_highbd_dc_128_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_128_predictor_4x4 aom_highbd_dc_128_predictor_4x4_c
-
-void aom_highbd_dc_128_predictor_4x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_128_predictor_4x8 aom_highbd_dc_128_predictor_4x8_c
-
-void aom_highbd_dc_128_predictor_8x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_128_predictor_8x16 aom_highbd_dc_128_predictor_8x16_c
-
-void aom_highbd_dc_128_predictor_8x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_128_predictor_8x4 aom_highbd_dc_128_predictor_8x4_c
-
-void aom_highbd_dc_128_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_128_predictor_8x8 aom_highbd_dc_128_predictor_8x8_c
-
-void aom_highbd_dc_left_predictor_16x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_dc_left_predictor_16x16 aom_highbd_dc_left_predictor_16x16_c
-
-void aom_highbd_dc_left_predictor_16x32_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_dc_left_predictor_16x32 aom_highbd_dc_left_predictor_16x32_c
-
-void aom_highbd_dc_left_predictor_16x8_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_left_predictor_16x8 aom_highbd_dc_left_predictor_16x8_c
-
-void aom_highbd_dc_left_predictor_2x2_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_left_predictor_2x2 aom_highbd_dc_left_predictor_2x2_c
-
-void aom_highbd_dc_left_predictor_32x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_dc_left_predictor_32x16 aom_highbd_dc_left_predictor_32x16_c
-
-void aom_highbd_dc_left_predictor_32x32_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_dc_left_predictor_32x32 aom_highbd_dc_left_predictor_32x32_c
-
-void aom_highbd_dc_left_predictor_4x4_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_left_predictor_4x4 aom_highbd_dc_left_predictor_4x4_c
-
-void aom_highbd_dc_left_predictor_4x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_left_predictor_4x8 aom_highbd_dc_left_predictor_4x8_c
-
-void aom_highbd_dc_left_predictor_8x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_left_predictor_8x16 aom_highbd_dc_left_predictor_8x16_c
-
-void aom_highbd_dc_left_predictor_8x4_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_left_predictor_8x4 aom_highbd_dc_left_predictor_8x4_c
-
-void aom_highbd_dc_left_predictor_8x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_left_predictor_8x8 aom_highbd_dc_left_predictor_8x8_c
-
-void aom_highbd_dc_predictor_16x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-void aom_highbd_dc_predictor_16x16_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_predictor_16x16 aom_highbd_dc_predictor_16x16_sse2
-
-void aom_highbd_dc_predictor_16x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_dc_predictor_16x32 aom_highbd_dc_predictor_16x32_c
-
-void aom_highbd_dc_predictor_16x8_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_dc_predictor_16x8 aom_highbd_dc_predictor_16x8_c
-
-void aom_highbd_dc_predictor_2x2_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_dc_predictor_2x2 aom_highbd_dc_predictor_2x2_c
-
-void aom_highbd_dc_predictor_32x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_dc_predictor_32x16 aom_highbd_dc_predictor_32x16_c
-
-void aom_highbd_dc_predictor_32x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-void aom_highbd_dc_predictor_32x32_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_predictor_32x32 aom_highbd_dc_predictor_32x32_sse2
-
-void aom_highbd_dc_predictor_4x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-void aom_highbd_dc_predictor_4x4_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_dc_predictor_4x4 aom_highbd_dc_predictor_4x4_sse2
-
-void aom_highbd_dc_predictor_4x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_dc_predictor_4x8 aom_highbd_dc_predictor_4x8_c
-
-void aom_highbd_dc_predictor_8x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_dc_predictor_8x16 aom_highbd_dc_predictor_8x16_c
-
-void aom_highbd_dc_predictor_8x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_dc_predictor_8x4 aom_highbd_dc_predictor_8x4_c
-
-void aom_highbd_dc_predictor_8x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-void aom_highbd_dc_predictor_8x8_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_dc_predictor_8x8 aom_highbd_dc_predictor_8x8_sse2
-
-void aom_highbd_dc_top_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_top_predictor_16x16 aom_highbd_dc_top_predictor_16x16_c
-
-void aom_highbd_dc_top_predictor_16x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_top_predictor_16x32 aom_highbd_dc_top_predictor_16x32_c
-
-void aom_highbd_dc_top_predictor_16x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_top_predictor_16x8 aom_highbd_dc_top_predictor_16x8_c
-
-void aom_highbd_dc_top_predictor_2x2_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_top_predictor_2x2 aom_highbd_dc_top_predictor_2x2_c
-
-void aom_highbd_dc_top_predictor_32x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_top_predictor_32x16 aom_highbd_dc_top_predictor_32x16_c
-
-void aom_highbd_dc_top_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_top_predictor_32x32 aom_highbd_dc_top_predictor_32x32_c
-
-void aom_highbd_dc_top_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_top_predictor_4x4 aom_highbd_dc_top_predictor_4x4_c
-
-void aom_highbd_dc_top_predictor_4x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_top_predictor_4x8 aom_highbd_dc_top_predictor_4x8_c
-
-void aom_highbd_dc_top_predictor_8x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_top_predictor_8x16 aom_highbd_dc_top_predictor_8x16_c
-
-void aom_highbd_dc_top_predictor_8x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_top_predictor_8x4 aom_highbd_dc_top_predictor_8x4_c
-
-void aom_highbd_dc_top_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_top_predictor_8x8 aom_highbd_dc_top_predictor_8x8_c
-
-void aom_highbd_h_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_h_predictor_16x16 aom_highbd_h_predictor_16x16_c
-
-void aom_highbd_h_predictor_16x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_h_predictor_16x32 aom_highbd_h_predictor_16x32_c
-
-void aom_highbd_h_predictor_16x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_h_predictor_16x8 aom_highbd_h_predictor_16x8_c
-
-void aom_highbd_h_predictor_2x2_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_h_predictor_2x2 aom_highbd_h_predictor_2x2_c
-
-void aom_highbd_h_predictor_32x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_h_predictor_32x16 aom_highbd_h_predictor_32x16_c
-
-void aom_highbd_h_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_h_predictor_32x32 aom_highbd_h_predictor_32x32_c
-
-void aom_highbd_h_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_h_predictor_4x4 aom_highbd_h_predictor_4x4_c
-
-void aom_highbd_h_predictor_4x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_h_predictor_4x8 aom_highbd_h_predictor_4x8_c
-
-void aom_highbd_h_predictor_8x16_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_h_predictor_8x16 aom_highbd_h_predictor_8x16_c
-
-void aom_highbd_h_predictor_8x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_h_predictor_8x4 aom_highbd_h_predictor_8x4_c
-
-void aom_highbd_h_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_h_predictor_8x8 aom_highbd_h_predictor_8x8_c
-
 void aom_highbd_iwht4x4_16_add_c(const tran_low_t* input,
                                  uint8_t* dest,
                                  int dest_stride,
@@ -2712,701 +1383,6 @@
                                 int bd);
 #define aom_highbd_iwht4x4_1_add aom_highbd_iwht4x4_1_add_c
 
-void aom_highbd_lpf_horizontal_4_c(uint16_t* s,
-                                   int pitch,
-                                   const uint8_t* blimit,
-                                   const uint8_t* limit,
-                                   const uint8_t* thresh,
-                                   int bd);
-void aom_highbd_lpf_horizontal_4_sse2(uint16_t* s,
-                                      int pitch,
-                                      const uint8_t* blimit,
-                                      const uint8_t* limit,
-                                      const uint8_t* thresh,
-                                      int bd);
-#define aom_highbd_lpf_horizontal_4 aom_highbd_lpf_horizontal_4_sse2
-
-void aom_highbd_lpf_horizontal_4_dual_c(uint16_t* s,
-                                        int pitch,
-                                        const uint8_t* blimit0,
-                                        const uint8_t* limit0,
-                                        const uint8_t* thresh0,
-                                        const uint8_t* blimit1,
-                                        const uint8_t* limit1,
-                                        const uint8_t* thresh1,
-                                        int bd);
-void aom_highbd_lpf_horizontal_4_dual_sse2(uint16_t* s,
-                                           int pitch,
-                                           const uint8_t* blimit0,
-                                           const uint8_t* limit0,
-                                           const uint8_t* thresh0,
-                                           const uint8_t* blimit1,
-                                           const uint8_t* limit1,
-                                           const uint8_t* thresh1,
-                                           int bd);
-void aom_highbd_lpf_horizontal_4_dual_avx2(uint16_t* s,
-                                           int pitch,
-                                           const uint8_t* blimit0,
-                                           const uint8_t* limit0,
-                                           const uint8_t* thresh0,
-                                           const uint8_t* blimit1,
-                                           const uint8_t* limit1,
-                                           const uint8_t* thresh1,
-                                           int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_horizontal_4_dual)(uint16_t* s,
-                                                     int pitch,
-                                                     const uint8_t* blimit0,
-                                                     const uint8_t* limit0,
-                                                     const uint8_t* thresh0,
-                                                     const uint8_t* blimit1,
-                                                     const uint8_t* limit1,
-                                                     const uint8_t* thresh1,
-                                                     int bd);
-
-void aom_highbd_lpf_horizontal_8_c(uint16_t* s,
-                                   int pitch,
-                                   const uint8_t* blimit,
-                                   const uint8_t* limit,
-                                   const uint8_t* thresh,
-                                   int bd);
-void aom_highbd_lpf_horizontal_8_sse2(uint16_t* s,
-                                      int pitch,
-                                      const uint8_t* blimit,
-                                      const uint8_t* limit,
-                                      const uint8_t* thresh,
-                                      int bd);
-#define aom_highbd_lpf_horizontal_8 aom_highbd_lpf_horizontal_8_sse2
-
-void aom_highbd_lpf_horizontal_8_dual_c(uint16_t* s,
-                                        int pitch,
-                                        const uint8_t* blimit0,
-                                        const uint8_t* limit0,
-                                        const uint8_t* thresh0,
-                                        const uint8_t* blimit1,
-                                        const uint8_t* limit1,
-                                        const uint8_t* thresh1,
-                                        int bd);
-void aom_highbd_lpf_horizontal_8_dual_sse2(uint16_t* s,
-                                           int pitch,
-                                           const uint8_t* blimit0,
-                                           const uint8_t* limit0,
-                                           const uint8_t* thresh0,
-                                           const uint8_t* blimit1,
-                                           const uint8_t* limit1,
-                                           const uint8_t* thresh1,
-                                           int bd);
-void aom_highbd_lpf_horizontal_8_dual_avx2(uint16_t* s,
-                                           int pitch,
-                                           const uint8_t* blimit0,
-                                           const uint8_t* limit0,
-                                           const uint8_t* thresh0,
-                                           const uint8_t* blimit1,
-                                           const uint8_t* limit1,
-                                           const uint8_t* thresh1,
-                                           int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_horizontal_8_dual)(uint16_t* s,
-                                                     int pitch,
-                                                     const uint8_t* blimit0,
-                                                     const uint8_t* limit0,
-                                                     const uint8_t* thresh0,
-                                                     const uint8_t* blimit1,
-                                                     const uint8_t* limit1,
-                                                     const uint8_t* thresh1,
-                                                     int bd);
-
-void aom_highbd_lpf_horizontal_edge_16_c(uint16_t* s,
-                                         int pitch,
-                                         const uint8_t* blimit,
-                                         const uint8_t* limit,
-                                         const uint8_t* thresh,
-                                         int bd);
-void aom_highbd_lpf_horizontal_edge_16_sse2(uint16_t* s,
-                                            int pitch,
-                                            const uint8_t* blimit,
-                                            const uint8_t* limit,
-                                            const uint8_t* thresh,
-                                            int bd);
-void aom_highbd_lpf_horizontal_edge_16_avx2(uint16_t* s,
-                                            int pitch,
-                                            const uint8_t* blimit,
-                                            const uint8_t* limit,
-                                            const uint8_t* thresh,
-                                            int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_horizontal_edge_16)(uint16_t* s,
-                                                      int pitch,
-                                                      const uint8_t* blimit,
-                                                      const uint8_t* limit,
-                                                      const uint8_t* thresh,
-                                                      int bd);
-
-void aom_highbd_lpf_horizontal_edge_8_c(uint16_t* s,
-                                        int pitch,
-                                        const uint8_t* blimit,
-                                        const uint8_t* limit,
-                                        const uint8_t* thresh,
-                                        int bd);
-void aom_highbd_lpf_horizontal_edge_8_sse2(uint16_t* s,
-                                           int pitch,
-                                           const uint8_t* blimit,
-                                           const uint8_t* limit,
-                                           const uint8_t* thresh,
-                                           int bd);
-#define aom_highbd_lpf_horizontal_edge_8 aom_highbd_lpf_horizontal_edge_8_sse2
-
-void aom_highbd_lpf_vertical_16_c(uint16_t* s,
-                                  int pitch,
-                                  const uint8_t* blimit,
-                                  const uint8_t* limit,
-                                  const uint8_t* thresh,
-                                  int bd);
-void aom_highbd_lpf_vertical_16_sse2(uint16_t* s,
-                                     int pitch,
-                                     const uint8_t* blimit,
-                                     const uint8_t* limit,
-                                     const uint8_t* thresh,
-                                     int bd);
-#define aom_highbd_lpf_vertical_16 aom_highbd_lpf_vertical_16_sse2
-
-void aom_highbd_lpf_vertical_16_dual_c(uint16_t* s,
-                                       int pitch,
-                                       const uint8_t* blimit,
-                                       const uint8_t* limit,
-                                       const uint8_t* thresh,
-                                       int bd);
-void aom_highbd_lpf_vertical_16_dual_sse2(uint16_t* s,
-                                          int pitch,
-                                          const uint8_t* blimit,
-                                          const uint8_t* limit,
-                                          const uint8_t* thresh,
-                                          int bd);
-void aom_highbd_lpf_vertical_16_dual_avx2(uint16_t* s,
-                                          int pitch,
-                                          const uint8_t* blimit,
-                                          const uint8_t* limit,
-                                          const uint8_t* thresh,
-                                          int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_vertical_16_dual)(uint16_t* s,
-                                                    int pitch,
-                                                    const uint8_t* blimit,
-                                                    const uint8_t* limit,
-                                                    const uint8_t* thresh,
-                                                    int bd);
-
-void aom_highbd_lpf_vertical_4_c(uint16_t* s,
-                                 int pitch,
-                                 const uint8_t* blimit,
-                                 const uint8_t* limit,
-                                 const uint8_t* thresh,
-                                 int bd);
-void aom_highbd_lpf_vertical_4_sse2(uint16_t* s,
-                                    int pitch,
-                                    const uint8_t* blimit,
-                                    const uint8_t* limit,
-                                    const uint8_t* thresh,
-                                    int bd);
-#define aom_highbd_lpf_vertical_4 aom_highbd_lpf_vertical_4_sse2
-
-void aom_highbd_lpf_vertical_4_dual_c(uint16_t* s,
-                                      int pitch,
-                                      const uint8_t* blimit0,
-                                      const uint8_t* limit0,
-                                      const uint8_t* thresh0,
-                                      const uint8_t* blimit1,
-                                      const uint8_t* limit1,
-                                      const uint8_t* thresh1,
-                                      int bd);
-void aom_highbd_lpf_vertical_4_dual_sse2(uint16_t* s,
-                                         int pitch,
-                                         const uint8_t* blimit0,
-                                         const uint8_t* limit0,
-                                         const uint8_t* thresh0,
-                                         const uint8_t* blimit1,
-                                         const uint8_t* limit1,
-                                         const uint8_t* thresh1,
-                                         int bd);
-void aom_highbd_lpf_vertical_4_dual_avx2(uint16_t* s,
-                                         int pitch,
-                                         const uint8_t* blimit0,
-                                         const uint8_t* limit0,
-                                         const uint8_t* thresh0,
-                                         const uint8_t* blimit1,
-                                         const uint8_t* limit1,
-                                         const uint8_t* thresh1,
-                                         int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_vertical_4_dual)(uint16_t* s,
-                                                   int pitch,
-                                                   const uint8_t* blimit0,
-                                                   const uint8_t* limit0,
-                                                   const uint8_t* thresh0,
-                                                   const uint8_t* blimit1,
-                                                   const uint8_t* limit1,
-                                                   const uint8_t* thresh1,
-                                                   int bd);
-
-void aom_highbd_lpf_vertical_8_c(uint16_t* s,
-                                 int pitch,
-                                 const uint8_t* blimit,
-                                 const uint8_t* limit,
-                                 const uint8_t* thresh,
-                                 int bd);
-void aom_highbd_lpf_vertical_8_sse2(uint16_t* s,
-                                    int pitch,
-                                    const uint8_t* blimit,
-                                    const uint8_t* limit,
-                                    const uint8_t* thresh,
-                                    int bd);
-#define aom_highbd_lpf_vertical_8 aom_highbd_lpf_vertical_8_sse2
-
-void aom_highbd_lpf_vertical_8_dual_c(uint16_t* s,
-                                      int pitch,
-                                      const uint8_t* blimit0,
-                                      const uint8_t* limit0,
-                                      const uint8_t* thresh0,
-                                      const uint8_t* blimit1,
-                                      const uint8_t* limit1,
-                                      const uint8_t* thresh1,
-                                      int bd);
-void aom_highbd_lpf_vertical_8_dual_sse2(uint16_t* s,
-                                         int pitch,
-                                         const uint8_t* blimit0,
-                                         const uint8_t* limit0,
-                                         const uint8_t* thresh0,
-                                         const uint8_t* blimit1,
-                                         const uint8_t* limit1,
-                                         const uint8_t* thresh1,
-                                         int bd);
-void aom_highbd_lpf_vertical_8_dual_avx2(uint16_t* s,
-                                         int pitch,
-                                         const uint8_t* blimit0,
-                                         const uint8_t* limit0,
-                                         const uint8_t* thresh0,
-                                         const uint8_t* blimit1,
-                                         const uint8_t* limit1,
-                                         const uint8_t* thresh1,
-                                         int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_vertical_8_dual)(uint16_t* s,
-                                                   int pitch,
-                                                   const uint8_t* blimit0,
-                                                   const uint8_t* limit0,
-                                                   const uint8_t* thresh0,
-                                                   const uint8_t* blimit1,
-                                                   const uint8_t* limit1,
-                                                   const uint8_t* thresh1,
-                                                   int bd);
-
-void aom_highbd_paeth_predictor_16x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_paeth_predictor_16x16 aom_highbd_paeth_predictor_16x16_c
-
-void aom_highbd_paeth_predictor_16x32_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_paeth_predictor_16x32 aom_highbd_paeth_predictor_16x32_c
-
-void aom_highbd_paeth_predictor_16x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_paeth_predictor_16x8 aom_highbd_paeth_predictor_16x8_c
-
-void aom_highbd_paeth_predictor_2x2_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_paeth_predictor_2x2 aom_highbd_paeth_predictor_2x2_c
-
-void aom_highbd_paeth_predictor_32x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_paeth_predictor_32x16 aom_highbd_paeth_predictor_32x16_c
-
-void aom_highbd_paeth_predictor_32x32_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_paeth_predictor_32x32 aom_highbd_paeth_predictor_32x32_c
-
-void aom_highbd_paeth_predictor_4x4_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_paeth_predictor_4x4 aom_highbd_paeth_predictor_4x4_c
-
-void aom_highbd_paeth_predictor_4x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_paeth_predictor_4x8 aom_highbd_paeth_predictor_4x8_c
-
-void aom_highbd_paeth_predictor_8x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_paeth_predictor_8x16 aom_highbd_paeth_predictor_8x16_c
-
-void aom_highbd_paeth_predictor_8x4_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_paeth_predictor_8x4 aom_highbd_paeth_predictor_8x4_c
-
-void aom_highbd_paeth_predictor_8x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_paeth_predictor_8x8 aom_highbd_paeth_predictor_8x8_c
-
-void aom_highbd_smooth_h_predictor_16x16_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_h_predictor_16x16 \
-  aom_highbd_smooth_h_predictor_16x16_c
-
-void aom_highbd_smooth_h_predictor_16x32_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_h_predictor_16x32 \
-  aom_highbd_smooth_h_predictor_16x32_c
-
-void aom_highbd_smooth_h_predictor_16x8_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_smooth_h_predictor_16x8 aom_highbd_smooth_h_predictor_16x8_c
-
-void aom_highbd_smooth_h_predictor_2x2_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_h_predictor_2x2 aom_highbd_smooth_h_predictor_2x2_c
-
-void aom_highbd_smooth_h_predictor_32x16_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_h_predictor_32x16 \
-  aom_highbd_smooth_h_predictor_32x16_c
-
-void aom_highbd_smooth_h_predictor_32x32_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_h_predictor_32x32 \
-  aom_highbd_smooth_h_predictor_32x32_c
-
-void aom_highbd_smooth_h_predictor_4x4_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_h_predictor_4x4 aom_highbd_smooth_h_predictor_4x4_c
-
-void aom_highbd_smooth_h_predictor_4x8_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_h_predictor_4x8 aom_highbd_smooth_h_predictor_4x8_c
-
-void aom_highbd_smooth_h_predictor_8x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_smooth_h_predictor_8x16 aom_highbd_smooth_h_predictor_8x16_c
-
-void aom_highbd_smooth_h_predictor_8x4_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_h_predictor_8x4 aom_highbd_smooth_h_predictor_8x4_c
-
-void aom_highbd_smooth_h_predictor_8x8_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_h_predictor_8x8 aom_highbd_smooth_h_predictor_8x8_c
-
-void aom_highbd_smooth_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_predictor_16x16 aom_highbd_smooth_predictor_16x16_c
-
-void aom_highbd_smooth_predictor_16x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_predictor_16x32 aom_highbd_smooth_predictor_16x32_c
-
-void aom_highbd_smooth_predictor_16x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_smooth_predictor_16x8 aom_highbd_smooth_predictor_16x8_c
-
-void aom_highbd_smooth_predictor_2x2_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_smooth_predictor_2x2 aom_highbd_smooth_predictor_2x2_c
-
-void aom_highbd_smooth_predictor_32x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_predictor_32x16 aom_highbd_smooth_predictor_32x16_c
-
-void aom_highbd_smooth_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_predictor_32x32 aom_highbd_smooth_predictor_32x32_c
-
-void aom_highbd_smooth_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_smooth_predictor_4x4 aom_highbd_smooth_predictor_4x4_c
-
-void aom_highbd_smooth_predictor_4x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_smooth_predictor_4x8 aom_highbd_smooth_predictor_4x8_c
-
-void aom_highbd_smooth_predictor_8x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_smooth_predictor_8x16 aom_highbd_smooth_predictor_8x16_c
-
-void aom_highbd_smooth_predictor_8x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_smooth_predictor_8x4 aom_highbd_smooth_predictor_8x4_c
-
-void aom_highbd_smooth_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_smooth_predictor_8x8 aom_highbd_smooth_predictor_8x8_c
-
-void aom_highbd_smooth_v_predictor_16x16_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_v_predictor_16x16 \
-  aom_highbd_smooth_v_predictor_16x16_c
-
-void aom_highbd_smooth_v_predictor_16x32_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_v_predictor_16x32 \
-  aom_highbd_smooth_v_predictor_16x32_c
-
-void aom_highbd_smooth_v_predictor_16x8_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_smooth_v_predictor_16x8 aom_highbd_smooth_v_predictor_16x8_c
-
-void aom_highbd_smooth_v_predictor_2x2_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_v_predictor_2x2 aom_highbd_smooth_v_predictor_2x2_c
-
-void aom_highbd_smooth_v_predictor_32x16_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_v_predictor_32x16 \
-  aom_highbd_smooth_v_predictor_32x16_c
-
-void aom_highbd_smooth_v_predictor_32x32_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_v_predictor_32x32 \
-  aom_highbd_smooth_v_predictor_32x32_c
-
-void aom_highbd_smooth_v_predictor_4x4_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_v_predictor_4x4 aom_highbd_smooth_v_predictor_4x4_c
-
-void aom_highbd_smooth_v_predictor_4x8_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_v_predictor_4x8 aom_highbd_smooth_v_predictor_4x8_c
-
-void aom_highbd_smooth_v_predictor_8x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_smooth_v_predictor_8x16 aom_highbd_smooth_v_predictor_8x16_c
-
-void aom_highbd_smooth_v_predictor_8x4_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_v_predictor_8x4 aom_highbd_smooth_v_predictor_8x4_c
-
-void aom_highbd_smooth_v_predictor_8x8_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_v_predictor_8x8 aom_highbd_smooth_v_predictor_8x8_c
-
-void aom_highbd_v_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-void aom_highbd_v_predictor_16x16_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_v_predictor_16x16 aom_highbd_v_predictor_16x16_sse2
-
-void aom_highbd_v_predictor_16x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_v_predictor_16x32 aom_highbd_v_predictor_16x32_c
-
-void aom_highbd_v_predictor_16x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_v_predictor_16x8 aom_highbd_v_predictor_16x8_c
-
-void aom_highbd_v_predictor_2x2_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_v_predictor_2x2 aom_highbd_v_predictor_2x2_c
-
-void aom_highbd_v_predictor_32x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_v_predictor_32x16 aom_highbd_v_predictor_32x16_c
-
-void aom_highbd_v_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-void aom_highbd_v_predictor_32x32_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_v_predictor_32x32 aom_highbd_v_predictor_32x32_sse2
-
-void aom_highbd_v_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-void aom_highbd_v_predictor_4x4_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_v_predictor_4x4 aom_highbd_v_predictor_4x4_sse2
-
-void aom_highbd_v_predictor_4x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_v_predictor_4x8 aom_highbd_v_predictor_4x8_c
-
-void aom_highbd_v_predictor_8x16_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_v_predictor_8x16 aom_highbd_v_predictor_8x16_c
-
-void aom_highbd_v_predictor_8x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_v_predictor_8x4 aom_highbd_v_predictor_8x4_c
-
-void aom_highbd_v_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-void aom_highbd_v_predictor_8x8_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_v_predictor_8x8 aom_highbd_v_predictor_8x8_sse2
-
 void aom_idct16x16_10_add_c(const tran_low_t* input,
                             uint8_t* dest,
                             int dest_stride);
@@ -4205,57 +2181,6 @@
   aom_d63e_predictor_4x4 = aom_d63e_predictor_4x4_c;
   if (flags & HAS_SSSE3)
     aom_d63e_predictor_4x4 = aom_d63e_predictor_4x4_ssse3;
-  aom_highbd_blend_a64_hmask = aom_highbd_blend_a64_hmask_c;
-  if (flags & HAS_SSE4_1)
-    aom_highbd_blend_a64_hmask = aom_highbd_blend_a64_hmask_sse4_1;
-  aom_highbd_blend_a64_mask = aom_highbd_blend_a64_mask_c;
-  if (flags & HAS_SSE4_1)
-    aom_highbd_blend_a64_mask = aom_highbd_blend_a64_mask_sse4_1;
-  aom_highbd_blend_a64_vmask = aom_highbd_blend_a64_vmask_c;
-  if (flags & HAS_SSE4_1)
-    aom_highbd_blend_a64_vmask = aom_highbd_blend_a64_vmask_sse4_1;
-  aom_highbd_convolve8 = aom_highbd_convolve8_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve8 = aom_highbd_convolve8_avx2;
-  aom_highbd_convolve8_avg = aom_highbd_convolve8_avg_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve8_avg = aom_highbd_convolve8_avg_avx2;
-  aom_highbd_convolve8_avg_horiz = aom_highbd_convolve8_avg_horiz_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve8_avg_horiz = aom_highbd_convolve8_avg_horiz_avx2;
-  aom_highbd_convolve8_avg_vert = aom_highbd_convolve8_avg_vert_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve8_avg_vert = aom_highbd_convolve8_avg_vert_avx2;
-  aom_highbd_convolve8_horiz = aom_highbd_convolve8_horiz_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve8_horiz = aom_highbd_convolve8_horiz_avx2;
-  aom_highbd_convolve8_vert = aom_highbd_convolve8_vert_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve8_vert = aom_highbd_convolve8_vert_avx2;
-  aom_highbd_convolve_avg = aom_highbd_convolve_avg_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve_avg = aom_highbd_convolve_avg_avx2;
-  aom_highbd_convolve_copy = aom_highbd_convolve_copy_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve_copy = aom_highbd_convolve_copy_avx2;
-  aom_highbd_lpf_horizontal_4_dual = aom_highbd_lpf_horizontal_4_dual_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_lpf_horizontal_4_dual = aom_highbd_lpf_horizontal_4_dual_avx2;
-  aom_highbd_lpf_horizontal_8_dual = aom_highbd_lpf_horizontal_8_dual_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_lpf_horizontal_8_dual = aom_highbd_lpf_horizontal_8_dual_avx2;
-  aom_highbd_lpf_horizontal_edge_16 = aom_highbd_lpf_horizontal_edge_16_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_lpf_horizontal_edge_16 = aom_highbd_lpf_horizontal_edge_16_avx2;
-  aom_highbd_lpf_vertical_16_dual = aom_highbd_lpf_vertical_16_dual_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_lpf_vertical_16_dual = aom_highbd_lpf_vertical_16_dual_avx2;
-  aom_highbd_lpf_vertical_4_dual = aom_highbd_lpf_vertical_4_dual_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_lpf_vertical_4_dual = aom_highbd_lpf_vertical_4_dual_avx2;
-  aom_highbd_lpf_vertical_8_dual = aom_highbd_lpf_vertical_8_dual_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_lpf_vertical_8_dual = aom_highbd_lpf_vertical_8_dual_avx2;
   aom_idct16x16_10_add = aom_idct16x16_10_add_sse2;
   if (flags & HAS_AVX2)
     aom_idct16x16_10_add = aom_idct16x16_10_add_avx2;
diff --git a/third_party/libaom/source/config/linux/x64/av1_rtcd.h b/third_party/libaom/source/config/linux/x64/av1_rtcd.h
index 66b4756..68f06b3 100644
--- a/third_party/libaom/source/config/linux/x64/av1_rtcd.h
+++ b/third_party/libaom/source/config/linux/x64/av1_rtcd.h
@@ -323,462 +323,6 @@
                                       int x_step_q4,
                                       ConvolveParams* conv_params);
 
-void av1_highbd_convolve8_c(const uint8_t* src,
-                            ptrdiff_t src_stride,
-                            uint8_t* dst,
-                            ptrdiff_t dst_stride,
-                            const int16_t* filter_x,
-                            int x_step_q4,
-                            const int16_t* filter_y,
-                            int y_step_q4,
-                            int w,
-                            int h,
-                            int bps);
-void av1_highbd_convolve8_sse2(const uint8_t* src,
-                               ptrdiff_t src_stride,
-                               uint8_t* dst,
-                               ptrdiff_t dst_stride,
-                               const int16_t* filter_x,
-                               int x_step_q4,
-                               const int16_t* filter_y,
-                               int y_step_q4,
-                               int w,
-                               int h,
-                               int bps);
-#define av1_highbd_convolve8 av1_highbd_convolve8_sse2
-
-void av1_highbd_convolve8_avg_c(const uint8_t* src,
-                                ptrdiff_t src_stride,
-                                uint8_t* dst,
-                                ptrdiff_t dst_stride,
-                                const int16_t* filter_x,
-                                int x_step_q4,
-                                const int16_t* filter_y,
-                                int y_step_q4,
-                                int w,
-                                int h,
-                                int bps);
-void av1_highbd_convolve8_avg_sse2(const uint8_t* src,
-                                   ptrdiff_t src_stride,
-                                   uint8_t* dst,
-                                   ptrdiff_t dst_stride,
-                                   const int16_t* filter_x,
-                                   int x_step_q4,
-                                   const int16_t* filter_y,
-                                   int y_step_q4,
-                                   int w,
-                                   int h,
-                                   int bps);
-#define av1_highbd_convolve8_avg av1_highbd_convolve8_avg_sse2
-
-void av1_highbd_convolve8_avg_horiz_c(const uint8_t* src,
-                                      ptrdiff_t src_stride,
-                                      uint8_t* dst,
-                                      ptrdiff_t dst_stride,
-                                      const int16_t* filter_x,
-                                      int x_step_q4,
-                                      const int16_t* filter_y,
-                                      int y_step_q4,
-                                      int w,
-                                      int h,
-                                      int bps);
-void av1_highbd_convolve8_avg_horiz_sse2(const uint8_t* src,
-                                         ptrdiff_t src_stride,
-                                         uint8_t* dst,
-                                         ptrdiff_t dst_stride,
-                                         const int16_t* filter_x,
-                                         int x_step_q4,
-                                         const int16_t* filter_y,
-                                         int y_step_q4,
-                                         int w,
-                                         int h,
-                                         int bps);
-#define av1_highbd_convolve8_avg_horiz av1_highbd_convolve8_avg_horiz_sse2
-
-void av1_highbd_convolve8_avg_vert_c(const uint8_t* src,
-                                     ptrdiff_t src_stride,
-                                     uint8_t* dst,
-                                     ptrdiff_t dst_stride,
-                                     const int16_t* filter_x,
-                                     int x_step_q4,
-                                     const int16_t* filter_y,
-                                     int y_step_q4,
-                                     int w,
-                                     int h,
-                                     int bps);
-void av1_highbd_convolve8_avg_vert_sse2(const uint8_t* src,
-                                        ptrdiff_t src_stride,
-                                        uint8_t* dst,
-                                        ptrdiff_t dst_stride,
-                                        const int16_t* filter_x,
-                                        int x_step_q4,
-                                        const int16_t* filter_y,
-                                        int y_step_q4,
-                                        int w,
-                                        int h,
-                                        int bps);
-#define av1_highbd_convolve8_avg_vert av1_highbd_convolve8_avg_vert_sse2
-
-void av1_highbd_convolve8_horiz_c(const uint8_t* src,
-                                  ptrdiff_t src_stride,
-                                  uint8_t* dst,
-                                  ptrdiff_t dst_stride,
-                                  const int16_t* filter_x,
-                                  int x_step_q4,
-                                  const int16_t* filter_y,
-                                  int y_step_q4,
-                                  int w,
-                                  int h,
-                                  int bps);
-void av1_highbd_convolve8_horiz_sse2(const uint8_t* src,
-                                     ptrdiff_t src_stride,
-                                     uint8_t* dst,
-                                     ptrdiff_t dst_stride,
-                                     const int16_t* filter_x,
-                                     int x_step_q4,
-                                     const int16_t* filter_y,
-                                     int y_step_q4,
-                                     int w,
-                                     int h,
-                                     int bps);
-#define av1_highbd_convolve8_horiz av1_highbd_convolve8_horiz_sse2
-
-void av1_highbd_convolve8_vert_c(const uint8_t* src,
-                                 ptrdiff_t src_stride,
-                                 uint8_t* dst,
-                                 ptrdiff_t dst_stride,
-                                 const int16_t* filter_x,
-                                 int x_step_q4,
-                                 const int16_t* filter_y,
-                                 int y_step_q4,
-                                 int w,
-                                 int h,
-                                 int bps);
-void av1_highbd_convolve8_vert_sse2(const uint8_t* src,
-                                    ptrdiff_t src_stride,
-                                    uint8_t* dst,
-                                    ptrdiff_t dst_stride,
-                                    const int16_t* filter_x,
-                                    int x_step_q4,
-                                    const int16_t* filter_y,
-                                    int y_step_q4,
-                                    int w,
-                                    int h,
-                                    int bps);
-#define av1_highbd_convolve8_vert av1_highbd_convolve8_vert_sse2
-
-void av1_highbd_convolve_2d_c(const uint16_t* src,
-                              int src_stride,
-                              CONV_BUF_TYPE* dst,
-                              int dst_stride,
-                              int w,
-                              int h,
-                              InterpFilterParams* filter_params_x,
-                              InterpFilterParams* filter_params_y,
-                              const int subpel_x_q4,
-                              const int subpel_y_q4,
-                              ConvolveParams* conv_params,
-                              int bd);
-void av1_highbd_convolve_2d_ssse3(const uint16_t* src,
-                                  int src_stride,
-                                  CONV_BUF_TYPE* dst,
-                                  int dst_stride,
-                                  int w,
-                                  int h,
-                                  InterpFilterParams* filter_params_x,
-                                  InterpFilterParams* filter_params_y,
-                                  const int subpel_x_q4,
-                                  const int subpel_y_q4,
-                                  ConvolveParams* conv_params,
-                                  int bd);
-RTCD_EXTERN void (*av1_highbd_convolve_2d)(const uint16_t* src,
-                                           int src_stride,
-                                           CONV_BUF_TYPE* dst,
-                                           int dst_stride,
-                                           int w,
-                                           int h,
-                                           InterpFilterParams* filter_params_x,
-                                           InterpFilterParams* filter_params_y,
-                                           const int subpel_x_q4,
-                                           const int subpel_y_q4,
-                                           ConvolveParams* conv_params,
-                                           int bd);
-
-void av1_highbd_convolve_2d_scale_c(const uint16_t* src,
-                                    int src_stride,
-                                    CONV_BUF_TYPE* dst,
-                                    int dst_stride,
-                                    int w,
-                                    int h,
-                                    InterpFilterParams* filter_params_x,
-                                    InterpFilterParams* filter_params_y,
-                                    const int subpel_x_q4,
-                                    const int x_step_qn,
-                                    const int subpel_y_q4,
-                                    const int y_step_qn,
-                                    ConvolveParams* conv_params,
-                                    int bd);
-#define av1_highbd_convolve_2d_scale av1_highbd_convolve_2d_scale_c
-
-void av1_highbd_convolve_avg_c(const uint8_t* src,
-                               ptrdiff_t src_stride,
-                               uint8_t* dst,
-                               ptrdiff_t dst_stride,
-                               const int16_t* filter_x,
-                               int x_step_q4,
-                               const int16_t* filter_y,
-                               int y_step_q4,
-                               int w,
-                               int h,
-                               int bps);
-#define av1_highbd_convolve_avg av1_highbd_convolve_avg_c
-
-void av1_highbd_convolve_copy_c(const uint8_t* src,
-                                ptrdiff_t src_stride,
-                                uint8_t* dst,
-                                ptrdiff_t dst_stride,
-                                const int16_t* filter_x,
-                                int x_step_q4,
-                                const int16_t* filter_y,
-                                int y_step_q4,
-                                int w,
-                                int h,
-                                int bps);
-#define av1_highbd_convolve_copy av1_highbd_convolve_copy_c
-
-void av1_highbd_convolve_horiz_c(const uint16_t* src,
-                                 int src_stride,
-                                 uint16_t* dst,
-                                 int dst_stride,
-                                 int w,
-                                 int h,
-                                 const InterpFilterParams fp,
-                                 const int subpel_x_q4,
-                                 int x_step_q4,
-                                 int avg,
-                                 int bd);
-void av1_highbd_convolve_horiz_sse4_1(const uint16_t* src,
-                                      int src_stride,
-                                      uint16_t* dst,
-                                      int dst_stride,
-                                      int w,
-                                      int h,
-                                      const InterpFilterParams fp,
-                                      const int subpel_x_q4,
-                                      int x_step_q4,
-                                      int avg,
-                                      int bd);
-RTCD_EXTERN void (*av1_highbd_convolve_horiz)(const uint16_t* src,
-                                              int src_stride,
-                                              uint16_t* dst,
-                                              int dst_stride,
-                                              int w,
-                                              int h,
-                                              const InterpFilterParams fp,
-                                              const int subpel_x_q4,
-                                              int x_step_q4,
-                                              int avg,
-                                              int bd);
-
-void av1_highbd_convolve_init_c(void);
-void av1_highbd_convolve_init_sse4_1(void);
-RTCD_EXTERN void (*av1_highbd_convolve_init)(void);
-
-void av1_highbd_convolve_rounding_c(const int32_t* src,
-                                    int src_stride,
-                                    uint8_t* dst,
-                                    int dst_stride,
-                                    int w,
-                                    int h,
-                                    int bits,
-                                    int bd);
-void av1_highbd_convolve_rounding_avx2(const int32_t* src,
-                                       int src_stride,
-                                       uint8_t* dst,
-                                       int dst_stride,
-                                       int w,
-                                       int h,
-                                       int bits,
-                                       int bd);
-RTCD_EXTERN void (*av1_highbd_convolve_rounding)(const int32_t* src,
-                                                 int src_stride,
-                                                 uint8_t* dst,
-                                                 int dst_stride,
-                                                 int w,
-                                                 int h,
-                                                 int bits,
-                                                 int bd);
-
-void av1_highbd_convolve_vert_c(const uint16_t* src,
-                                int src_stride,
-                                uint16_t* dst,
-                                int dst_stride,
-                                int w,
-                                int h,
-                                const InterpFilterParams fp,
-                                const int subpel_x_q4,
-                                int x_step_q4,
-                                int avg,
-                                int bd);
-void av1_highbd_convolve_vert_sse4_1(const uint16_t* src,
-                                     int src_stride,
-                                     uint16_t* dst,
-                                     int dst_stride,
-                                     int w,
-                                     int h,
-                                     const InterpFilterParams fp,
-                                     const int subpel_x_q4,
-                                     int x_step_q4,
-                                     int avg,
-                                     int bd);
-RTCD_EXTERN void (*av1_highbd_convolve_vert)(const uint16_t* src,
-                                             int src_stride,
-                                             uint16_t* dst,
-                                             int dst_stride,
-                                             int w,
-                                             int h,
-                                             const InterpFilterParams fp,
-                                             const int subpel_x_q4,
-                                             int x_step_q4,
-                                             int avg,
-                                             int bd);
-
-void av1_highbd_iht16x16_256_add_c(const tran_low_t* input,
-                                   uint8_t* output,
-                                   int pitch,
-                                   const struct txfm_param* param);
-#define av1_highbd_iht16x16_256_add av1_highbd_iht16x16_256_add_c
-
-void av1_highbd_iht16x32_512_add_c(const tran_low_t* input,
-                                   uint8_t* dest,
-                                   int dest_stride,
-                                   const struct txfm_param* param);
-#define av1_highbd_iht16x32_512_add av1_highbd_iht16x32_512_add_c
-
-void av1_highbd_iht16x4_64_add_c(const tran_low_t* input,
-                                 uint8_t* dest,
-                                 int dest_stride,
-                                 const struct txfm_param* param);
-#define av1_highbd_iht16x4_64_add av1_highbd_iht16x4_64_add_c
-
-void av1_highbd_iht16x8_128_add_c(const tran_low_t* input,
-                                  uint8_t* dest,
-                                  int dest_stride,
-                                  const struct txfm_param* param);
-#define av1_highbd_iht16x8_128_add av1_highbd_iht16x8_128_add_c
-
-void av1_highbd_iht32x16_512_add_c(const tran_low_t* input,
-                                   uint8_t* dest,
-                                   int dest_stride,
-                                   const struct txfm_param* param);
-#define av1_highbd_iht32x16_512_add av1_highbd_iht32x16_512_add_c
-
-void av1_highbd_iht32x8_256_add_c(const tran_low_t* input,
-                                  uint8_t* dest,
-                                  int dest_stride,
-                                  const struct txfm_param* param);
-#define av1_highbd_iht32x8_256_add av1_highbd_iht32x8_256_add_c
-
-void av1_highbd_iht4x16_64_add_c(const tran_low_t* input,
-                                 uint8_t* dest,
-                                 int dest_stride,
-                                 const struct txfm_param* param);
-#define av1_highbd_iht4x16_64_add av1_highbd_iht4x16_64_add_c
-
-void av1_highbd_iht4x4_16_add_c(const tran_low_t* input,
-                                uint8_t* dest,
-                                int dest_stride,
-                                const struct txfm_param* param);
-#define av1_highbd_iht4x4_16_add av1_highbd_iht4x4_16_add_c
-
-void av1_highbd_iht4x8_32_add_c(const tran_low_t* input,
-                                uint8_t* dest,
-                                int dest_stride,
-                                const struct txfm_param* param);
-#define av1_highbd_iht4x8_32_add av1_highbd_iht4x8_32_add_c
-
-void av1_highbd_iht8x16_128_add_c(const tran_low_t* input,
-                                  uint8_t* dest,
-                                  int dest_stride,
-                                  const struct txfm_param* param);
-#define av1_highbd_iht8x16_128_add av1_highbd_iht8x16_128_add_c
-
-void av1_highbd_iht8x32_256_add_c(const tran_low_t* input,
-                                  uint8_t* dest,
-                                  int dest_stride,
-                                  const struct txfm_param* param);
-#define av1_highbd_iht8x32_256_add av1_highbd_iht8x32_256_add_c
-
-void av1_highbd_iht8x4_32_add_c(const tran_low_t* input,
-                                uint8_t* dest,
-                                int dest_stride,
-                                const struct txfm_param* param);
-#define av1_highbd_iht8x4_32_add av1_highbd_iht8x4_32_add_c
-
-void av1_highbd_iht8x8_64_add_c(const tran_low_t* input,
-                                uint8_t* dest,
-                                int dest_stride,
-                                const struct txfm_param* param);
-#define av1_highbd_iht8x8_64_add av1_highbd_iht8x8_64_add_c
-
-void av1_highbd_warp_affine_c(const int32_t* mat,
-                              const uint16_t* ref,
-                              int width,
-                              int height,
-                              int stride,
-                              uint16_t* pred,
-                              int p_col,
-                              int p_row,
-                              int p_width,
-                              int p_height,
-                              int p_stride,
-                              int subsampling_x,
-                              int subsampling_y,
-                              int bd,
-                              ConvolveParams* conv_params,
-                              int16_t alpha,
-                              int16_t beta,
-                              int16_t gamma,
-                              int16_t delta);
-void av1_highbd_warp_affine_ssse3(const int32_t* mat,
-                                  const uint16_t* ref,
-                                  int width,
-                                  int height,
-                                  int stride,
-                                  uint16_t* pred,
-                                  int p_col,
-                                  int p_row,
-                                  int p_width,
-                                  int p_height,
-                                  int p_stride,
-                                  int subsampling_x,
-                                  int subsampling_y,
-                                  int bd,
-                                  ConvolveParams* conv_params,
-                                  int16_t alpha,
-                                  int16_t beta,
-                                  int16_t gamma,
-                                  int16_t delta);
-RTCD_EXTERN void (*av1_highbd_warp_affine)(const int32_t* mat,
-                                           const uint16_t* ref,
-                                           int width,
-                                           int height,
-                                           int stride,
-                                           uint16_t* pred,
-                                           int p_col,
-                                           int p_row,
-                                           int p_width,
-                                           int p_height,
-                                           int p_stride,
-                                           int subsampling_x,
-                                           int subsampling_y,
-                                           int bd,
-                                           ConvolveParams* conv_params,
-                                           int16_t alpha,
-                                           int16_t beta,
-                                           int16_t gamma,
-                                           int16_t delta);
-
 void av1_iht16x16_256_add_c(const tran_low_t* input,
                             uint8_t* output,
                             int pitch,
@@ -1363,24 +907,6 @@
   av1_convolve_vert = av1_convolve_vert_c;
   if (flags & HAS_SSSE3)
     av1_convolve_vert = av1_convolve_vert_ssse3;
-  av1_highbd_convolve_2d = av1_highbd_convolve_2d_c;
-  if (flags & HAS_SSSE3)
-    av1_highbd_convolve_2d = av1_highbd_convolve_2d_ssse3;
-  av1_highbd_convolve_horiz = av1_highbd_convolve_horiz_c;
-  if (flags & HAS_SSE4_1)
-    av1_highbd_convolve_horiz = av1_highbd_convolve_horiz_sse4_1;
-  av1_highbd_convolve_init = av1_highbd_convolve_init_c;
-  if (flags & HAS_SSE4_1)
-    av1_highbd_convolve_init = av1_highbd_convolve_init_sse4_1;
-  av1_highbd_convolve_rounding = av1_highbd_convolve_rounding_c;
-  if (flags & HAS_AVX2)
-    av1_highbd_convolve_rounding = av1_highbd_convolve_rounding_avx2;
-  av1_highbd_convolve_vert = av1_highbd_convolve_vert_c;
-  if (flags & HAS_SSE4_1)
-    av1_highbd_convolve_vert = av1_highbd_convolve_vert_sse4_1;
-  av1_highbd_warp_affine = av1_highbd_warp_affine_c;
-  if (flags & HAS_SSSE3)
-    av1_highbd_warp_affine = av1_highbd_warp_affine_ssse3;
   av1_iht16x16_256_add = av1_iht16x16_256_add_sse2;
   if (flags & HAS_AVX2)
     av1_iht16x16_256_add = av1_iht16x16_256_add_avx2;
diff --git a/third_party/libaom/source/config/win/ia32/aom_config.asm b/third_party/libaom/source/config/win/ia32/aom_config.asm
index 1ad7250..f5a2bf89 100644
--- a/third_party/libaom/source/config/win/ia32/aom_config.asm
+++ b/third_party/libaom/source/config/win/ia32/aom_config.asm
@@ -61,7 +61,7 @@
 %define CONFIG_ENCODE_PERF_TESTS 0
 %define CONFIG_COEFFICIENT_RANGE_CHECKING 0
 %define CONFIG_LOWBITDEPTH 1
-%define CONFIG_HIGHBITDEPTH 1
+%define CONFIG_HIGHBITDEPTH 0
 %define CONFIG_EXPERIMENTAL 0
 %define CONFIG_SIZE_LIMIT 1
 %define CONFIG_FP_MB_STATS 0
diff --git a/third_party/libaom/source/config/win/ia32/aom_config.c b/third_party/libaom/source/config/win/ia32/aom_config.c
index 9ee7689d..8287790 100644
--- a/third_party/libaom/source/config/win/ia32/aom_config.c
+++ b/third_party/libaom/source/config/win/ia32/aom_config.c
@@ -7,5 +7,5 @@
 /* Media Patent License 1.0 was not distributed with this source code in the */
 /* PATENTS file, you can obtain it at www.aomedia.org/license/patent. */
 #include "aom/aom_codec.h"
-static const char* const cfg = "--target=x86-win32-vs12 --enable-external-build --enable-postproc --disable-av1-encoder --size-limit=16384x16384 --enable-realtime-only --disable-install-docs --enable-pic --as=yasm";
+static const char* const cfg = "--target=x86-win32-vs12 --enable-external-build --enable-postproc --disable-av1-encoder --size-limit=16384x16384 --enable-realtime-only --disable-install-docs --disable-highbitdepth --enable-pic --as=yasm";
 const char *aom_codec_build_config(void) {return cfg;}
diff --git a/third_party/libaom/source/config/win/ia32/aom_config.h b/third_party/libaom/source/config/win/ia32/aom_config.h
index 4378bf9..d208c35 100644
--- a/third_party/libaom/source/config/win/ia32/aom_config.h
+++ b/third_party/libaom/source/config/win/ia32/aom_config.h
@@ -74,7 +74,7 @@
 #define CONFIG_ENCODE_PERF_TESTS 0
 #define CONFIG_COEFFICIENT_RANGE_CHECKING 0
 #define CONFIG_LOWBITDEPTH 1
-#define CONFIG_HIGHBITDEPTH 1
+#define CONFIG_HIGHBITDEPTH 0
 #define CONFIG_EXPERIMENTAL 0
 #define CONFIG_SIZE_LIMIT 1
 #define CONFIG_FP_MB_STATS 0
diff --git a/third_party/libaom/source/config/win/ia32/aom_dsp_rtcd.h b/third_party/libaom/source/config/win/ia32/aom_dsp_rtcd.h
index ba767f6..453381bc 100644
--- a/third_party/libaom/source/config/win/ia32/aom_dsp_rtcd.h
+++ b/third_party/libaom/source/config/win/ia32/aom_dsp_rtcd.h
@@ -1449,1285 +1449,6 @@
                                         const uint8_t* above,
                                         const uint8_t* left);
 
-void aom_highbd_blend_a64_hmask_c(uint8_t* dst,
-                                  uint32_t dst_stride,
-                                  const uint8_t* src0,
-                                  uint32_t src0_stride,
-                                  const uint8_t* src1,
-                                  uint32_t src1_stride,
-                                  const uint8_t* mask,
-                                  int h,
-                                  int w,
-                                  int bd);
-void aom_highbd_blend_a64_hmask_sse4_1(uint8_t* dst,
-                                       uint32_t dst_stride,
-                                       const uint8_t* src0,
-                                       uint32_t src0_stride,
-                                       const uint8_t* src1,
-                                       uint32_t src1_stride,
-                                       const uint8_t* mask,
-                                       int h,
-                                       int w,
-                                       int bd);
-RTCD_EXTERN void (*aom_highbd_blend_a64_hmask)(uint8_t* dst,
-                                               uint32_t dst_stride,
-                                               const uint8_t* src0,
-                                               uint32_t src0_stride,
-                                               const uint8_t* src1,
-                                               uint32_t src1_stride,
-                                               const uint8_t* mask,
-                                               int h,
-                                               int w,
-                                               int bd);
-
-void aom_highbd_blend_a64_mask_c(uint8_t* dst,
-                                 uint32_t dst_stride,
-                                 const uint8_t* src0,
-                                 uint32_t src0_stride,
-                                 const uint8_t* src1,
-                                 uint32_t src1_stride,
-                                 const uint8_t* mask,
-                                 uint32_t mask_stride,
-                                 int h,
-                                 int w,
-                                 int suby,
-                                 int subx,
-                                 int bd);
-void aom_highbd_blend_a64_mask_sse4_1(uint8_t* dst,
-                                      uint32_t dst_stride,
-                                      const uint8_t* src0,
-                                      uint32_t src0_stride,
-                                      const uint8_t* src1,
-                                      uint32_t src1_stride,
-                                      const uint8_t* mask,
-                                      uint32_t mask_stride,
-                                      int h,
-                                      int w,
-                                      int suby,
-                                      int subx,
-                                      int bd);
-RTCD_EXTERN void (*aom_highbd_blend_a64_mask)(uint8_t* dst,
-                                              uint32_t dst_stride,
-                                              const uint8_t* src0,
-                                              uint32_t src0_stride,
-                                              const uint8_t* src1,
-                                              uint32_t src1_stride,
-                                              const uint8_t* mask,
-                                              uint32_t mask_stride,
-                                              int h,
-                                              int w,
-                                              int suby,
-                                              int subx,
-                                              int bd);
-
-void aom_highbd_blend_a64_vmask_c(uint8_t* dst,
-                                  uint32_t dst_stride,
-                                  const uint8_t* src0,
-                                  uint32_t src0_stride,
-                                  const uint8_t* src1,
-                                  uint32_t src1_stride,
-                                  const uint8_t* mask,
-                                  int h,
-                                  int w,
-                                  int bd);
-void aom_highbd_blend_a64_vmask_sse4_1(uint8_t* dst,
-                                       uint32_t dst_stride,
-                                       const uint8_t* src0,
-                                       uint32_t src0_stride,
-                                       const uint8_t* src1,
-                                       uint32_t src1_stride,
-                                       const uint8_t* mask,
-                                       int h,
-                                       int w,
-                                       int bd);
-RTCD_EXTERN void (*aom_highbd_blend_a64_vmask)(uint8_t* dst,
-                                               uint32_t dst_stride,
-                                               const uint8_t* src0,
-                                               uint32_t src0_stride,
-                                               const uint8_t* src1,
-                                               uint32_t src1_stride,
-                                               const uint8_t* mask,
-                                               int h,
-                                               int w,
-                                               int bd);
-
-void aom_highbd_convolve8_c(const uint8_t* src,
-                            ptrdiff_t src_stride,
-                            uint8_t* dst,
-                            ptrdiff_t dst_stride,
-                            const int16_t* filter_x,
-                            int x_step_q4,
-                            const int16_t* filter_y,
-                            int y_step_q4,
-                            int w,
-                            int h,
-                            int bps);
-void aom_highbd_convolve8_avx2(const uint8_t* src,
-                               ptrdiff_t src_stride,
-                               uint8_t* dst,
-                               ptrdiff_t dst_stride,
-                               const int16_t* filter_x,
-                               int x_step_q4,
-                               const int16_t* filter_y,
-                               int y_step_q4,
-                               int w,
-                               int h,
-                               int bps);
-RTCD_EXTERN void (*aom_highbd_convolve8)(const uint8_t* src,
-                                         ptrdiff_t src_stride,
-                                         uint8_t* dst,
-                                         ptrdiff_t dst_stride,
-                                         const int16_t* filter_x,
-                                         int x_step_q4,
-                                         const int16_t* filter_y,
-                                         int y_step_q4,
-                                         int w,
-                                         int h,
-                                         int bps);
-
-void aom_highbd_convolve8_avg_c(const uint8_t* src,
-                                ptrdiff_t src_stride,
-                                uint8_t* dst,
-                                ptrdiff_t dst_stride,
-                                const int16_t* filter_x,
-                                int x_step_q4,
-                                const int16_t* filter_y,
-                                int y_step_q4,
-                                int w,
-                                int h,
-                                int bps);
-void aom_highbd_convolve8_avg_avx2(const uint8_t* src,
-                                   ptrdiff_t src_stride,
-                                   uint8_t* dst,
-                                   ptrdiff_t dst_stride,
-                                   const int16_t* filter_x,
-                                   int x_step_q4,
-                                   const int16_t* filter_y,
-                                   int y_step_q4,
-                                   int w,
-                                   int h,
-                                   int bps);
-RTCD_EXTERN void (*aom_highbd_convolve8_avg)(const uint8_t* src,
-                                             ptrdiff_t src_stride,
-                                             uint8_t* dst,
-                                             ptrdiff_t dst_stride,
-                                             const int16_t* filter_x,
-                                             int x_step_q4,
-                                             const int16_t* filter_y,
-                                             int y_step_q4,
-                                             int w,
-                                             int h,
-                                             int bps);
-
-void aom_highbd_convolve8_avg_horiz_c(const uint8_t* src,
-                                      ptrdiff_t src_stride,
-                                      uint8_t* dst,
-                                      ptrdiff_t dst_stride,
-                                      const int16_t* filter_x,
-                                      int x_step_q4,
-                                      const int16_t* filter_y,
-                                      int y_step_q4,
-                                      int w,
-                                      int h,
-                                      int bps);
-void aom_highbd_convolve8_avg_horiz_avx2(const uint8_t* src,
-                                         ptrdiff_t src_stride,
-                                         uint8_t* dst,
-                                         ptrdiff_t dst_stride,
-                                         const int16_t* filter_x,
-                                         int x_step_q4,
-                                         const int16_t* filter_y,
-                                         int y_step_q4,
-                                         int w,
-                                         int h,
-                                         int bps);
-RTCD_EXTERN void (*aom_highbd_convolve8_avg_horiz)(const uint8_t* src,
-                                                   ptrdiff_t src_stride,
-                                                   uint8_t* dst,
-                                                   ptrdiff_t dst_stride,
-                                                   const int16_t* filter_x,
-                                                   int x_step_q4,
-                                                   const int16_t* filter_y,
-                                                   int y_step_q4,
-                                                   int w,
-                                                   int h,
-                                                   int bps);
-
-void aom_highbd_convolve8_avg_vert_c(const uint8_t* src,
-                                     ptrdiff_t src_stride,
-                                     uint8_t* dst,
-                                     ptrdiff_t dst_stride,
-                                     const int16_t* filter_x,
-                                     int x_step_q4,
-                                     const int16_t* filter_y,
-                                     int y_step_q4,
-                                     int w,
-                                     int h,
-                                     int bps);
-void aom_highbd_convolve8_avg_vert_avx2(const uint8_t* src,
-                                        ptrdiff_t src_stride,
-                                        uint8_t* dst,
-                                        ptrdiff_t dst_stride,
-                                        const int16_t* filter_x,
-                                        int x_step_q4,
-                                        const int16_t* filter_y,
-                                        int y_step_q4,
-                                        int w,
-                                        int h,
-                                        int bps);
-RTCD_EXTERN void (*aom_highbd_convolve8_avg_vert)(const uint8_t* src,
-                                                  ptrdiff_t src_stride,
-                                                  uint8_t* dst,
-                                                  ptrdiff_t dst_stride,
-                                                  const int16_t* filter_x,
-                                                  int x_step_q4,
-                                                  const int16_t* filter_y,
-                                                  int y_step_q4,
-                                                  int w,
-                                                  int h,
-                                                  int bps);
-
-void aom_highbd_convolve8_horiz_c(const uint8_t* src,
-                                  ptrdiff_t src_stride,
-                                  uint8_t* dst,
-                                  ptrdiff_t dst_stride,
-                                  const int16_t* filter_x,
-                                  int x_step_q4,
-                                  const int16_t* filter_y,
-                                  int y_step_q4,
-                                  int w,
-                                  int h,
-                                  int bps);
-void aom_highbd_convolve8_horiz_avx2(const uint8_t* src,
-                                     ptrdiff_t src_stride,
-                                     uint8_t* dst,
-                                     ptrdiff_t dst_stride,
-                                     const int16_t* filter_x,
-                                     int x_step_q4,
-                                     const int16_t* filter_y,
-                                     int y_step_q4,
-                                     int w,
-                                     int h,
-                                     int bps);
-RTCD_EXTERN void (*aom_highbd_convolve8_horiz)(const uint8_t* src,
-                                               ptrdiff_t src_stride,
-                                               uint8_t* dst,
-                                               ptrdiff_t dst_stride,
-                                               const int16_t* filter_x,
-                                               int x_step_q4,
-                                               const int16_t* filter_y,
-                                               int y_step_q4,
-                                               int w,
-                                               int h,
-                                               int bps);
-
-void aom_highbd_convolve8_vert_c(const uint8_t* src,
-                                 ptrdiff_t src_stride,
-                                 uint8_t* dst,
-                                 ptrdiff_t dst_stride,
-                                 const int16_t* filter_x,
-                                 int x_step_q4,
-                                 const int16_t* filter_y,
-                                 int y_step_q4,
-                                 int w,
-                                 int h,
-                                 int bps);
-void aom_highbd_convolve8_vert_avx2(const uint8_t* src,
-                                    ptrdiff_t src_stride,
-                                    uint8_t* dst,
-                                    ptrdiff_t dst_stride,
-                                    const int16_t* filter_x,
-                                    int x_step_q4,
-                                    const int16_t* filter_y,
-                                    int y_step_q4,
-                                    int w,
-                                    int h,
-                                    int bps);
-RTCD_EXTERN void (*aom_highbd_convolve8_vert)(const uint8_t* src,
-                                              ptrdiff_t src_stride,
-                                              uint8_t* dst,
-                                              ptrdiff_t dst_stride,
-                                              const int16_t* filter_x,
-                                              int x_step_q4,
-                                              const int16_t* filter_y,
-                                              int y_step_q4,
-                                              int w,
-                                              int h,
-                                              int bps);
-
-void aom_highbd_convolve_avg_c(const uint8_t* src,
-                               ptrdiff_t src_stride,
-                               uint8_t* dst,
-                               ptrdiff_t dst_stride,
-                               const int16_t* filter_x,
-                               int x_step_q4,
-                               const int16_t* filter_y,
-                               int y_step_q4,
-                               int w,
-                               int h,
-                               int bps);
-void aom_highbd_convolve_avg_sse2(const uint8_t* src,
-                                  ptrdiff_t src_stride,
-                                  uint8_t* dst,
-                                  ptrdiff_t dst_stride,
-                                  const int16_t* filter_x,
-                                  int x_step_q4,
-                                  const int16_t* filter_y,
-                                  int y_step_q4,
-                                  int w,
-                                  int h,
-                                  int bps);
-void aom_highbd_convolve_avg_avx2(const uint8_t* src,
-                                  ptrdiff_t src_stride,
-                                  uint8_t* dst,
-                                  ptrdiff_t dst_stride,
-                                  const int16_t* filter_x,
-                                  int x_step_q4,
-                                  const int16_t* filter_y,
-                                  int y_step_q4,
-                                  int w,
-                                  int h,
-                                  int bps);
-RTCD_EXTERN void (*aom_highbd_convolve_avg)(const uint8_t* src,
-                                            ptrdiff_t src_stride,
-                                            uint8_t* dst,
-                                            ptrdiff_t dst_stride,
-                                            const int16_t* filter_x,
-                                            int x_step_q4,
-                                            const int16_t* filter_y,
-                                            int y_step_q4,
-                                            int w,
-                                            int h,
-                                            int bps);
-
-void aom_highbd_convolve_copy_c(const uint8_t* src,
-                                ptrdiff_t src_stride,
-                                uint8_t* dst,
-                                ptrdiff_t dst_stride,
-                                const int16_t* filter_x,
-                                int x_step_q4,
-                                const int16_t* filter_y,
-                                int y_step_q4,
-                                int w,
-                                int h,
-                                int bps);
-void aom_highbd_convolve_copy_sse2(const uint8_t* src,
-                                   ptrdiff_t src_stride,
-                                   uint8_t* dst,
-                                   ptrdiff_t dst_stride,
-                                   const int16_t* filter_x,
-                                   int x_step_q4,
-                                   const int16_t* filter_y,
-                                   int y_step_q4,
-                                   int w,
-                                   int h,
-                                   int bps);
-void aom_highbd_convolve_copy_avx2(const uint8_t* src,
-                                   ptrdiff_t src_stride,
-                                   uint8_t* dst,
-                                   ptrdiff_t dst_stride,
-                                   const int16_t* filter_x,
-                                   int x_step_q4,
-                                   const int16_t* filter_y,
-                                   int y_step_q4,
-                                   int w,
-                                   int h,
-                                   int bps);
-RTCD_EXTERN void (*aom_highbd_convolve_copy)(const uint8_t* src,
-                                             ptrdiff_t src_stride,
-                                             uint8_t* dst,
-                                             ptrdiff_t dst_stride,
-                                             const int16_t* filter_x,
-                                             int x_step_q4,
-                                             const int16_t* filter_y,
-                                             int y_step_q4,
-                                             int w,
-                                             int h,
-                                             int bps);
-
-void aom_highbd_d117_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d117_predictor_16x16 aom_highbd_d117_predictor_16x16_c
-
-void aom_highbd_d117_predictor_16x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d117_predictor_16x32 aom_highbd_d117_predictor_16x32_c
-
-void aom_highbd_d117_predictor_16x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d117_predictor_16x8 aom_highbd_d117_predictor_16x8_c
-
-void aom_highbd_d117_predictor_2x2_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d117_predictor_2x2 aom_highbd_d117_predictor_2x2_c
-
-void aom_highbd_d117_predictor_32x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d117_predictor_32x16 aom_highbd_d117_predictor_32x16_c
-
-void aom_highbd_d117_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d117_predictor_32x32 aom_highbd_d117_predictor_32x32_c
-
-void aom_highbd_d117_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d117_predictor_4x4 aom_highbd_d117_predictor_4x4_c
-
-void aom_highbd_d117_predictor_4x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d117_predictor_4x8 aom_highbd_d117_predictor_4x8_c
-
-void aom_highbd_d117_predictor_8x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d117_predictor_8x16 aom_highbd_d117_predictor_8x16_c
-
-void aom_highbd_d117_predictor_8x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d117_predictor_8x4 aom_highbd_d117_predictor_8x4_c
-
-void aom_highbd_d117_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d117_predictor_8x8 aom_highbd_d117_predictor_8x8_c
-
-void aom_highbd_d135_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d135_predictor_16x16 aom_highbd_d135_predictor_16x16_c
-
-void aom_highbd_d135_predictor_16x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d135_predictor_16x32 aom_highbd_d135_predictor_16x32_c
-
-void aom_highbd_d135_predictor_16x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d135_predictor_16x8 aom_highbd_d135_predictor_16x8_c
-
-void aom_highbd_d135_predictor_2x2_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d135_predictor_2x2 aom_highbd_d135_predictor_2x2_c
-
-void aom_highbd_d135_predictor_32x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d135_predictor_32x16 aom_highbd_d135_predictor_32x16_c
-
-void aom_highbd_d135_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d135_predictor_32x32 aom_highbd_d135_predictor_32x32_c
-
-void aom_highbd_d135_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d135_predictor_4x4 aom_highbd_d135_predictor_4x4_c
-
-void aom_highbd_d135_predictor_4x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d135_predictor_4x8 aom_highbd_d135_predictor_4x8_c
-
-void aom_highbd_d135_predictor_8x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d135_predictor_8x16 aom_highbd_d135_predictor_8x16_c
-
-void aom_highbd_d135_predictor_8x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d135_predictor_8x4 aom_highbd_d135_predictor_8x4_c
-
-void aom_highbd_d135_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d135_predictor_8x8 aom_highbd_d135_predictor_8x8_c
-
-void aom_highbd_d153_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d153_predictor_16x16 aom_highbd_d153_predictor_16x16_c
-
-void aom_highbd_d153_predictor_16x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d153_predictor_16x32 aom_highbd_d153_predictor_16x32_c
-
-void aom_highbd_d153_predictor_16x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d153_predictor_16x8 aom_highbd_d153_predictor_16x8_c
-
-void aom_highbd_d153_predictor_2x2_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d153_predictor_2x2 aom_highbd_d153_predictor_2x2_c
-
-void aom_highbd_d153_predictor_32x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d153_predictor_32x16 aom_highbd_d153_predictor_32x16_c
-
-void aom_highbd_d153_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d153_predictor_32x32 aom_highbd_d153_predictor_32x32_c
-
-void aom_highbd_d153_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d153_predictor_4x4 aom_highbd_d153_predictor_4x4_c
-
-void aom_highbd_d153_predictor_4x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d153_predictor_4x8 aom_highbd_d153_predictor_4x8_c
-
-void aom_highbd_d153_predictor_8x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d153_predictor_8x16 aom_highbd_d153_predictor_8x16_c
-
-void aom_highbd_d153_predictor_8x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d153_predictor_8x4 aom_highbd_d153_predictor_8x4_c
-
-void aom_highbd_d153_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d153_predictor_8x8 aom_highbd_d153_predictor_8x8_c
-
-void aom_highbd_d207e_predictor_16x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_d207e_predictor_16x16 aom_highbd_d207e_predictor_16x16_c
-
-void aom_highbd_d207e_predictor_16x32_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_d207e_predictor_16x32 aom_highbd_d207e_predictor_16x32_c
-
-void aom_highbd_d207e_predictor_16x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d207e_predictor_16x8 aom_highbd_d207e_predictor_16x8_c
-
-void aom_highbd_d207e_predictor_2x2_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d207e_predictor_2x2 aom_highbd_d207e_predictor_2x2_c
-
-void aom_highbd_d207e_predictor_32x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_d207e_predictor_32x16 aom_highbd_d207e_predictor_32x16_c
-
-void aom_highbd_d207e_predictor_32x32_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_d207e_predictor_32x32 aom_highbd_d207e_predictor_32x32_c
-
-void aom_highbd_d207e_predictor_4x4_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d207e_predictor_4x4 aom_highbd_d207e_predictor_4x4_c
-
-void aom_highbd_d207e_predictor_4x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d207e_predictor_4x8 aom_highbd_d207e_predictor_4x8_c
-
-void aom_highbd_d207e_predictor_8x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d207e_predictor_8x16 aom_highbd_d207e_predictor_8x16_c
-
-void aom_highbd_d207e_predictor_8x4_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d207e_predictor_8x4 aom_highbd_d207e_predictor_8x4_c
-
-void aom_highbd_d207e_predictor_8x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d207e_predictor_8x8 aom_highbd_d207e_predictor_8x8_c
-
-void aom_highbd_d45e_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d45e_predictor_16x16 aom_highbd_d45e_predictor_16x16_c
-
-void aom_highbd_d45e_predictor_16x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d45e_predictor_16x32 aom_highbd_d45e_predictor_16x32_c
-
-void aom_highbd_d45e_predictor_16x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d45e_predictor_16x8 aom_highbd_d45e_predictor_16x8_c
-
-void aom_highbd_d45e_predictor_2x2_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d45e_predictor_2x2 aom_highbd_d45e_predictor_2x2_c
-
-void aom_highbd_d45e_predictor_32x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d45e_predictor_32x16 aom_highbd_d45e_predictor_32x16_c
-
-void aom_highbd_d45e_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d45e_predictor_32x32 aom_highbd_d45e_predictor_32x32_c
-
-void aom_highbd_d45e_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d45e_predictor_4x4 aom_highbd_d45e_predictor_4x4_c
-
-void aom_highbd_d45e_predictor_4x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d45e_predictor_4x8 aom_highbd_d45e_predictor_4x8_c
-
-void aom_highbd_d45e_predictor_8x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d45e_predictor_8x16 aom_highbd_d45e_predictor_8x16_c
-
-void aom_highbd_d45e_predictor_8x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d45e_predictor_8x4 aom_highbd_d45e_predictor_8x4_c
-
-void aom_highbd_d45e_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d45e_predictor_8x8 aom_highbd_d45e_predictor_8x8_c
-
-void aom_highbd_d63e_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d63e_predictor_16x16 aom_highbd_d63e_predictor_16x16_c
-
-void aom_highbd_d63e_predictor_16x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d63e_predictor_16x32 aom_highbd_d63e_predictor_16x32_c
-
-void aom_highbd_d63e_predictor_16x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d63e_predictor_16x8 aom_highbd_d63e_predictor_16x8_c
-
-void aom_highbd_d63e_predictor_2x2_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d63e_predictor_2x2 aom_highbd_d63e_predictor_2x2_c
-
-void aom_highbd_d63e_predictor_32x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d63e_predictor_32x16 aom_highbd_d63e_predictor_32x16_c
-
-void aom_highbd_d63e_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d63e_predictor_32x32 aom_highbd_d63e_predictor_32x32_c
-
-void aom_highbd_d63e_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d63e_predictor_4x4 aom_highbd_d63e_predictor_4x4_c
-
-void aom_highbd_d63e_predictor_4x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d63e_predictor_4x8 aom_highbd_d63e_predictor_4x8_c
-
-void aom_highbd_d63e_predictor_8x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d63e_predictor_8x16 aom_highbd_d63e_predictor_8x16_c
-
-void aom_highbd_d63e_predictor_8x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d63e_predictor_8x4 aom_highbd_d63e_predictor_8x4_c
-
-void aom_highbd_d63e_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d63e_predictor_8x8 aom_highbd_d63e_predictor_8x8_c
-
-void aom_highbd_dc_128_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_128_predictor_16x16 aom_highbd_dc_128_predictor_16x16_c
-
-void aom_highbd_dc_128_predictor_16x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_128_predictor_16x32 aom_highbd_dc_128_predictor_16x32_c
-
-void aom_highbd_dc_128_predictor_16x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_128_predictor_16x8 aom_highbd_dc_128_predictor_16x8_c
-
-void aom_highbd_dc_128_predictor_2x2_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_128_predictor_2x2 aom_highbd_dc_128_predictor_2x2_c
-
-void aom_highbd_dc_128_predictor_32x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_128_predictor_32x16 aom_highbd_dc_128_predictor_32x16_c
-
-void aom_highbd_dc_128_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_128_predictor_32x32 aom_highbd_dc_128_predictor_32x32_c
-
-void aom_highbd_dc_128_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_128_predictor_4x4 aom_highbd_dc_128_predictor_4x4_c
-
-void aom_highbd_dc_128_predictor_4x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_128_predictor_4x8 aom_highbd_dc_128_predictor_4x8_c
-
-void aom_highbd_dc_128_predictor_8x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_128_predictor_8x16 aom_highbd_dc_128_predictor_8x16_c
-
-void aom_highbd_dc_128_predictor_8x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_128_predictor_8x4 aom_highbd_dc_128_predictor_8x4_c
-
-void aom_highbd_dc_128_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_128_predictor_8x8 aom_highbd_dc_128_predictor_8x8_c
-
-void aom_highbd_dc_left_predictor_16x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_dc_left_predictor_16x16 aom_highbd_dc_left_predictor_16x16_c
-
-void aom_highbd_dc_left_predictor_16x32_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_dc_left_predictor_16x32 aom_highbd_dc_left_predictor_16x32_c
-
-void aom_highbd_dc_left_predictor_16x8_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_left_predictor_16x8 aom_highbd_dc_left_predictor_16x8_c
-
-void aom_highbd_dc_left_predictor_2x2_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_left_predictor_2x2 aom_highbd_dc_left_predictor_2x2_c
-
-void aom_highbd_dc_left_predictor_32x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_dc_left_predictor_32x16 aom_highbd_dc_left_predictor_32x16_c
-
-void aom_highbd_dc_left_predictor_32x32_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_dc_left_predictor_32x32 aom_highbd_dc_left_predictor_32x32_c
-
-void aom_highbd_dc_left_predictor_4x4_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_left_predictor_4x4 aom_highbd_dc_left_predictor_4x4_c
-
-void aom_highbd_dc_left_predictor_4x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_left_predictor_4x8 aom_highbd_dc_left_predictor_4x8_c
-
-void aom_highbd_dc_left_predictor_8x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_left_predictor_8x16 aom_highbd_dc_left_predictor_8x16_c
-
-void aom_highbd_dc_left_predictor_8x4_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_left_predictor_8x4 aom_highbd_dc_left_predictor_8x4_c
-
-void aom_highbd_dc_left_predictor_8x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_left_predictor_8x8 aom_highbd_dc_left_predictor_8x8_c
-
-void aom_highbd_dc_predictor_16x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-void aom_highbd_dc_predictor_16x16_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-RTCD_EXTERN void (*aom_highbd_dc_predictor_16x16)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
-                                                  const uint16_t* above,
-                                                  const uint16_t* left,
-                                                  int bd);
-
-void aom_highbd_dc_predictor_16x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_dc_predictor_16x32 aom_highbd_dc_predictor_16x32_c
-
-void aom_highbd_dc_predictor_16x8_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_dc_predictor_16x8 aom_highbd_dc_predictor_16x8_c
-
-void aom_highbd_dc_predictor_2x2_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_dc_predictor_2x2 aom_highbd_dc_predictor_2x2_c
-
-void aom_highbd_dc_predictor_32x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_dc_predictor_32x16 aom_highbd_dc_predictor_32x16_c
-
-void aom_highbd_dc_predictor_32x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-void aom_highbd_dc_predictor_32x32_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-RTCD_EXTERN void (*aom_highbd_dc_predictor_32x32)(uint16_t* dst,
-                                                  ptrdiff_t y_stride,
-                                                  const uint16_t* above,
-                                                  const uint16_t* left,
-                                                  int bd);
-
-void aom_highbd_dc_predictor_4x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-void aom_highbd_dc_predictor_4x4_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-RTCD_EXTERN void (*aom_highbd_dc_predictor_4x4)(uint16_t* dst,
-                                                ptrdiff_t y_stride,
-                                                const uint16_t* above,
-                                                const uint16_t* left,
-                                                int bd);
-
-void aom_highbd_dc_predictor_4x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_dc_predictor_4x8 aom_highbd_dc_predictor_4x8_c
-
-void aom_highbd_dc_predictor_8x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_dc_predictor_8x16 aom_highbd_dc_predictor_8x16_c
-
-void aom_highbd_dc_predictor_8x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_dc_predictor_8x4 aom_highbd_dc_predictor_8x4_c
-
-void aom_highbd_dc_predictor_8x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-void aom_highbd_dc_predictor_8x8_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-RTCD_EXTERN void (*aom_highbd_dc_predictor_8x8)(uint16_t* dst,
-                                                ptrdiff_t y_stride,
-                                                const uint16_t* above,
-                                                const uint16_t* left,
-                                                int bd);
-
-void aom_highbd_dc_top_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_top_predictor_16x16 aom_highbd_dc_top_predictor_16x16_c
-
-void aom_highbd_dc_top_predictor_16x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_top_predictor_16x32 aom_highbd_dc_top_predictor_16x32_c
-
-void aom_highbd_dc_top_predictor_16x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_top_predictor_16x8 aom_highbd_dc_top_predictor_16x8_c
-
-void aom_highbd_dc_top_predictor_2x2_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_top_predictor_2x2 aom_highbd_dc_top_predictor_2x2_c
-
-void aom_highbd_dc_top_predictor_32x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_top_predictor_32x16 aom_highbd_dc_top_predictor_32x16_c
-
-void aom_highbd_dc_top_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_top_predictor_32x32 aom_highbd_dc_top_predictor_32x32_c
-
-void aom_highbd_dc_top_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_top_predictor_4x4 aom_highbd_dc_top_predictor_4x4_c
-
-void aom_highbd_dc_top_predictor_4x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_top_predictor_4x8 aom_highbd_dc_top_predictor_4x8_c
-
-void aom_highbd_dc_top_predictor_8x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_top_predictor_8x16 aom_highbd_dc_top_predictor_8x16_c
-
-void aom_highbd_dc_top_predictor_8x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_top_predictor_8x4 aom_highbd_dc_top_predictor_8x4_c
-
-void aom_highbd_dc_top_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_top_predictor_8x8 aom_highbd_dc_top_predictor_8x8_c
-
-void aom_highbd_h_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_h_predictor_16x16 aom_highbd_h_predictor_16x16_c
-
-void aom_highbd_h_predictor_16x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_h_predictor_16x32 aom_highbd_h_predictor_16x32_c
-
-void aom_highbd_h_predictor_16x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_h_predictor_16x8 aom_highbd_h_predictor_16x8_c
-
-void aom_highbd_h_predictor_2x2_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_h_predictor_2x2 aom_highbd_h_predictor_2x2_c
-
-void aom_highbd_h_predictor_32x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_h_predictor_32x16 aom_highbd_h_predictor_32x16_c
-
-void aom_highbd_h_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_h_predictor_32x32 aom_highbd_h_predictor_32x32_c
-
-void aom_highbd_h_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_h_predictor_4x4 aom_highbd_h_predictor_4x4_c
-
-void aom_highbd_h_predictor_4x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_h_predictor_4x8 aom_highbd_h_predictor_4x8_c
-
-void aom_highbd_h_predictor_8x16_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_h_predictor_8x16 aom_highbd_h_predictor_8x16_c
-
-void aom_highbd_h_predictor_8x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_h_predictor_8x4 aom_highbd_h_predictor_8x4_c
-
-void aom_highbd_h_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_h_predictor_8x8 aom_highbd_h_predictor_8x8_c
-
 void aom_highbd_iwht4x4_16_add_c(const tran_low_t* input,
                                  uint8_t* dest,
                                  int dest_stride,
@@ -2740,747 +1461,6 @@
                                 int bd);
 #define aom_highbd_iwht4x4_1_add aom_highbd_iwht4x4_1_add_c
 
-void aom_highbd_lpf_horizontal_4_c(uint16_t* s,
-                                   int pitch,
-                                   const uint8_t* blimit,
-                                   const uint8_t* limit,
-                                   const uint8_t* thresh,
-                                   int bd);
-void aom_highbd_lpf_horizontal_4_sse2(uint16_t* s,
-                                      int pitch,
-                                      const uint8_t* blimit,
-                                      const uint8_t* limit,
-                                      const uint8_t* thresh,
-                                      int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_horizontal_4)(uint16_t* s,
-                                                int pitch,
-                                                const uint8_t* blimit,
-                                                const uint8_t* limit,
-                                                const uint8_t* thresh,
-                                                int bd);
-
-void aom_highbd_lpf_horizontal_4_dual_c(uint16_t* s,
-                                        int pitch,
-                                        const uint8_t* blimit0,
-                                        const uint8_t* limit0,
-                                        const uint8_t* thresh0,
-                                        const uint8_t* blimit1,
-                                        const uint8_t* limit1,
-                                        const uint8_t* thresh1,
-                                        int bd);
-void aom_highbd_lpf_horizontal_4_dual_sse2(uint16_t* s,
-                                           int pitch,
-                                           const uint8_t* blimit0,
-                                           const uint8_t* limit0,
-                                           const uint8_t* thresh0,
-                                           const uint8_t* blimit1,
-                                           const uint8_t* limit1,
-                                           const uint8_t* thresh1,
-                                           int bd);
-void aom_highbd_lpf_horizontal_4_dual_avx2(uint16_t* s,
-                                           int pitch,
-                                           const uint8_t* blimit0,
-                                           const uint8_t* limit0,
-                                           const uint8_t* thresh0,
-                                           const uint8_t* blimit1,
-                                           const uint8_t* limit1,
-                                           const uint8_t* thresh1,
-                                           int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_horizontal_4_dual)(uint16_t* s,
-                                                     int pitch,
-                                                     const uint8_t* blimit0,
-                                                     const uint8_t* limit0,
-                                                     const uint8_t* thresh0,
-                                                     const uint8_t* blimit1,
-                                                     const uint8_t* limit1,
-                                                     const uint8_t* thresh1,
-                                                     int bd);
-
-void aom_highbd_lpf_horizontal_8_c(uint16_t* s,
-                                   int pitch,
-                                   const uint8_t* blimit,
-                                   const uint8_t* limit,
-                                   const uint8_t* thresh,
-                                   int bd);
-void aom_highbd_lpf_horizontal_8_sse2(uint16_t* s,
-                                      int pitch,
-                                      const uint8_t* blimit,
-                                      const uint8_t* limit,
-                                      const uint8_t* thresh,
-                                      int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_horizontal_8)(uint16_t* s,
-                                                int pitch,
-                                                const uint8_t* blimit,
-                                                const uint8_t* limit,
-                                                const uint8_t* thresh,
-                                                int bd);
-
-void aom_highbd_lpf_horizontal_8_dual_c(uint16_t* s,
-                                        int pitch,
-                                        const uint8_t* blimit0,
-                                        const uint8_t* limit0,
-                                        const uint8_t* thresh0,
-                                        const uint8_t* blimit1,
-                                        const uint8_t* limit1,
-                                        const uint8_t* thresh1,
-                                        int bd);
-void aom_highbd_lpf_horizontal_8_dual_sse2(uint16_t* s,
-                                           int pitch,
-                                           const uint8_t* blimit0,
-                                           const uint8_t* limit0,
-                                           const uint8_t* thresh0,
-                                           const uint8_t* blimit1,
-                                           const uint8_t* limit1,
-                                           const uint8_t* thresh1,
-                                           int bd);
-void aom_highbd_lpf_horizontal_8_dual_avx2(uint16_t* s,
-                                           int pitch,
-                                           const uint8_t* blimit0,
-                                           const uint8_t* limit0,
-                                           const uint8_t* thresh0,
-                                           const uint8_t* blimit1,
-                                           const uint8_t* limit1,
-                                           const uint8_t* thresh1,
-                                           int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_horizontal_8_dual)(uint16_t* s,
-                                                     int pitch,
-                                                     const uint8_t* blimit0,
-                                                     const uint8_t* limit0,
-                                                     const uint8_t* thresh0,
-                                                     const uint8_t* blimit1,
-                                                     const uint8_t* limit1,
-                                                     const uint8_t* thresh1,
-                                                     int bd);
-
-void aom_highbd_lpf_horizontal_edge_16_c(uint16_t* s,
-                                         int pitch,
-                                         const uint8_t* blimit,
-                                         const uint8_t* limit,
-                                         const uint8_t* thresh,
-                                         int bd);
-void aom_highbd_lpf_horizontal_edge_16_sse2(uint16_t* s,
-                                            int pitch,
-                                            const uint8_t* blimit,
-                                            const uint8_t* limit,
-                                            const uint8_t* thresh,
-                                            int bd);
-void aom_highbd_lpf_horizontal_edge_16_avx2(uint16_t* s,
-                                            int pitch,
-                                            const uint8_t* blimit,
-                                            const uint8_t* limit,
-                                            const uint8_t* thresh,
-                                            int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_horizontal_edge_16)(uint16_t* s,
-                                                      int pitch,
-                                                      const uint8_t* blimit,
-                                                      const uint8_t* limit,
-                                                      const uint8_t* thresh,
-                                                      int bd);
-
-void aom_highbd_lpf_horizontal_edge_8_c(uint16_t* s,
-                                        int pitch,
-                                        const uint8_t* blimit,
-                                        const uint8_t* limit,
-                                        const uint8_t* thresh,
-                                        int bd);
-void aom_highbd_lpf_horizontal_edge_8_sse2(uint16_t* s,
-                                           int pitch,
-                                           const uint8_t* blimit,
-                                           const uint8_t* limit,
-                                           const uint8_t* thresh,
-                                           int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_horizontal_edge_8)(uint16_t* s,
-                                                     int pitch,
-                                                     const uint8_t* blimit,
-                                                     const uint8_t* limit,
-                                                     const uint8_t* thresh,
-                                                     int bd);
-
-void aom_highbd_lpf_vertical_16_c(uint16_t* s,
-                                  int pitch,
-                                  const uint8_t* blimit,
-                                  const uint8_t* limit,
-                                  const uint8_t* thresh,
-                                  int bd);
-void aom_highbd_lpf_vertical_16_sse2(uint16_t* s,
-                                     int pitch,
-                                     const uint8_t* blimit,
-                                     const uint8_t* limit,
-                                     const uint8_t* thresh,
-                                     int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_vertical_16)(uint16_t* s,
-                                               int pitch,
-                                               const uint8_t* blimit,
-                                               const uint8_t* limit,
-                                               const uint8_t* thresh,
-                                               int bd);
-
-void aom_highbd_lpf_vertical_16_dual_c(uint16_t* s,
-                                       int pitch,
-                                       const uint8_t* blimit,
-                                       const uint8_t* limit,
-                                       const uint8_t* thresh,
-                                       int bd);
-void aom_highbd_lpf_vertical_16_dual_sse2(uint16_t* s,
-                                          int pitch,
-                                          const uint8_t* blimit,
-                                          const uint8_t* limit,
-                                          const uint8_t* thresh,
-                                          int bd);
-void aom_highbd_lpf_vertical_16_dual_avx2(uint16_t* s,
-                                          int pitch,
-                                          const uint8_t* blimit,
-                                          const uint8_t* limit,
-                                          const uint8_t* thresh,
-                                          int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_vertical_16_dual)(uint16_t* s,
-                                                    int pitch,
-                                                    const uint8_t* blimit,
-                                                    const uint8_t* limit,
-                                                    const uint8_t* thresh,
-                                                    int bd);
-
-void aom_highbd_lpf_vertical_4_c(uint16_t* s,
-                                 int pitch,
-                                 const uint8_t* blimit,
-                                 const uint8_t* limit,
-                                 const uint8_t* thresh,
-                                 int bd);
-void aom_highbd_lpf_vertical_4_sse2(uint16_t* s,
-                                    int pitch,
-                                    const uint8_t* blimit,
-                                    const uint8_t* limit,
-                                    const uint8_t* thresh,
-                                    int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_vertical_4)(uint16_t* s,
-                                              int pitch,
-                                              const uint8_t* blimit,
-                                              const uint8_t* limit,
-                                              const uint8_t* thresh,
-                                              int bd);
-
-void aom_highbd_lpf_vertical_4_dual_c(uint16_t* s,
-                                      int pitch,
-                                      const uint8_t* blimit0,
-                                      const uint8_t* limit0,
-                                      const uint8_t* thresh0,
-                                      const uint8_t* blimit1,
-                                      const uint8_t* limit1,
-                                      const uint8_t* thresh1,
-                                      int bd);
-void aom_highbd_lpf_vertical_4_dual_sse2(uint16_t* s,
-                                         int pitch,
-                                         const uint8_t* blimit0,
-                                         const uint8_t* limit0,
-                                         const uint8_t* thresh0,
-                                         const uint8_t* blimit1,
-                                         const uint8_t* limit1,
-                                         const uint8_t* thresh1,
-                                         int bd);
-void aom_highbd_lpf_vertical_4_dual_avx2(uint16_t* s,
-                                         int pitch,
-                                         const uint8_t* blimit0,
-                                         const uint8_t* limit0,
-                                         const uint8_t* thresh0,
-                                         const uint8_t* blimit1,
-                                         const uint8_t* limit1,
-                                         const uint8_t* thresh1,
-                                         int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_vertical_4_dual)(uint16_t* s,
-                                                   int pitch,
-                                                   const uint8_t* blimit0,
-                                                   const uint8_t* limit0,
-                                                   const uint8_t* thresh0,
-                                                   const uint8_t* blimit1,
-                                                   const uint8_t* limit1,
-                                                   const uint8_t* thresh1,
-                                                   int bd);
-
-void aom_highbd_lpf_vertical_8_c(uint16_t* s,
-                                 int pitch,
-                                 const uint8_t* blimit,
-                                 const uint8_t* limit,
-                                 const uint8_t* thresh,
-                                 int bd);
-void aom_highbd_lpf_vertical_8_sse2(uint16_t* s,
-                                    int pitch,
-                                    const uint8_t* blimit,
-                                    const uint8_t* limit,
-                                    const uint8_t* thresh,
-                                    int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_vertical_8)(uint16_t* s,
-                                              int pitch,
-                                              const uint8_t* blimit,
-                                              const uint8_t* limit,
-                                              const uint8_t* thresh,
-                                              int bd);
-
-void aom_highbd_lpf_vertical_8_dual_c(uint16_t* s,
-                                      int pitch,
-                                      const uint8_t* blimit0,
-                                      const uint8_t* limit0,
-                                      const uint8_t* thresh0,
-                                      const uint8_t* blimit1,
-                                      const uint8_t* limit1,
-                                      const uint8_t* thresh1,
-                                      int bd);
-void aom_highbd_lpf_vertical_8_dual_sse2(uint16_t* s,
-                                         int pitch,
-                                         const uint8_t* blimit0,
-                                         const uint8_t* limit0,
-                                         const uint8_t* thresh0,
-                                         const uint8_t* blimit1,
-                                         const uint8_t* limit1,
-                                         const uint8_t* thresh1,
-                                         int bd);
-void aom_highbd_lpf_vertical_8_dual_avx2(uint16_t* s,
-                                         int pitch,
-                                         const uint8_t* blimit0,
-                                         const uint8_t* limit0,
-                                         const uint8_t* thresh0,
-                                         const uint8_t* blimit1,
-                                         const uint8_t* limit1,
-                                         const uint8_t* thresh1,
-                                         int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_vertical_8_dual)(uint16_t* s,
-                                                   int pitch,
-                                                   const uint8_t* blimit0,
-                                                   const uint8_t* limit0,
-                                                   const uint8_t* thresh0,
-                                                   const uint8_t* blimit1,
-                                                   const uint8_t* limit1,
-                                                   const uint8_t* thresh1,
-                                                   int bd);
-
-void aom_highbd_paeth_predictor_16x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_paeth_predictor_16x16 aom_highbd_paeth_predictor_16x16_c
-
-void aom_highbd_paeth_predictor_16x32_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_paeth_predictor_16x32 aom_highbd_paeth_predictor_16x32_c
-
-void aom_highbd_paeth_predictor_16x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_paeth_predictor_16x8 aom_highbd_paeth_predictor_16x8_c
-
-void aom_highbd_paeth_predictor_2x2_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_paeth_predictor_2x2 aom_highbd_paeth_predictor_2x2_c
-
-void aom_highbd_paeth_predictor_32x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_paeth_predictor_32x16 aom_highbd_paeth_predictor_32x16_c
-
-void aom_highbd_paeth_predictor_32x32_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_paeth_predictor_32x32 aom_highbd_paeth_predictor_32x32_c
-
-void aom_highbd_paeth_predictor_4x4_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_paeth_predictor_4x4 aom_highbd_paeth_predictor_4x4_c
-
-void aom_highbd_paeth_predictor_4x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_paeth_predictor_4x8 aom_highbd_paeth_predictor_4x8_c
-
-void aom_highbd_paeth_predictor_8x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_paeth_predictor_8x16 aom_highbd_paeth_predictor_8x16_c
-
-void aom_highbd_paeth_predictor_8x4_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_paeth_predictor_8x4 aom_highbd_paeth_predictor_8x4_c
-
-void aom_highbd_paeth_predictor_8x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_paeth_predictor_8x8 aom_highbd_paeth_predictor_8x8_c
-
-void aom_highbd_smooth_h_predictor_16x16_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_h_predictor_16x16 \
-  aom_highbd_smooth_h_predictor_16x16_c
-
-void aom_highbd_smooth_h_predictor_16x32_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_h_predictor_16x32 \
-  aom_highbd_smooth_h_predictor_16x32_c
-
-void aom_highbd_smooth_h_predictor_16x8_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_smooth_h_predictor_16x8 aom_highbd_smooth_h_predictor_16x8_c
-
-void aom_highbd_smooth_h_predictor_2x2_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_h_predictor_2x2 aom_highbd_smooth_h_predictor_2x2_c
-
-void aom_highbd_smooth_h_predictor_32x16_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_h_predictor_32x16 \
-  aom_highbd_smooth_h_predictor_32x16_c
-
-void aom_highbd_smooth_h_predictor_32x32_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_h_predictor_32x32 \
-  aom_highbd_smooth_h_predictor_32x32_c
-
-void aom_highbd_smooth_h_predictor_4x4_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_h_predictor_4x4 aom_highbd_smooth_h_predictor_4x4_c
-
-void aom_highbd_smooth_h_predictor_4x8_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_h_predictor_4x8 aom_highbd_smooth_h_predictor_4x8_c
-
-void aom_highbd_smooth_h_predictor_8x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_smooth_h_predictor_8x16 aom_highbd_smooth_h_predictor_8x16_c
-
-void aom_highbd_smooth_h_predictor_8x4_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_h_predictor_8x4 aom_highbd_smooth_h_predictor_8x4_c
-
-void aom_highbd_smooth_h_predictor_8x8_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_h_predictor_8x8 aom_highbd_smooth_h_predictor_8x8_c
-
-void aom_highbd_smooth_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_predictor_16x16 aom_highbd_smooth_predictor_16x16_c
-
-void aom_highbd_smooth_predictor_16x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_predictor_16x32 aom_highbd_smooth_predictor_16x32_c
-
-void aom_highbd_smooth_predictor_16x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_smooth_predictor_16x8 aom_highbd_smooth_predictor_16x8_c
-
-void aom_highbd_smooth_predictor_2x2_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_smooth_predictor_2x2 aom_highbd_smooth_predictor_2x2_c
-
-void aom_highbd_smooth_predictor_32x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_predictor_32x16 aom_highbd_smooth_predictor_32x16_c
-
-void aom_highbd_smooth_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_predictor_32x32 aom_highbd_smooth_predictor_32x32_c
-
-void aom_highbd_smooth_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_smooth_predictor_4x4 aom_highbd_smooth_predictor_4x4_c
-
-void aom_highbd_smooth_predictor_4x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_smooth_predictor_4x8 aom_highbd_smooth_predictor_4x8_c
-
-void aom_highbd_smooth_predictor_8x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_smooth_predictor_8x16 aom_highbd_smooth_predictor_8x16_c
-
-void aom_highbd_smooth_predictor_8x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_smooth_predictor_8x4 aom_highbd_smooth_predictor_8x4_c
-
-void aom_highbd_smooth_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_smooth_predictor_8x8 aom_highbd_smooth_predictor_8x8_c
-
-void aom_highbd_smooth_v_predictor_16x16_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_v_predictor_16x16 \
-  aom_highbd_smooth_v_predictor_16x16_c
-
-void aom_highbd_smooth_v_predictor_16x32_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_v_predictor_16x32 \
-  aom_highbd_smooth_v_predictor_16x32_c
-
-void aom_highbd_smooth_v_predictor_16x8_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_smooth_v_predictor_16x8 aom_highbd_smooth_v_predictor_16x8_c
-
-void aom_highbd_smooth_v_predictor_2x2_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_v_predictor_2x2 aom_highbd_smooth_v_predictor_2x2_c
-
-void aom_highbd_smooth_v_predictor_32x16_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_v_predictor_32x16 \
-  aom_highbd_smooth_v_predictor_32x16_c
-
-void aom_highbd_smooth_v_predictor_32x32_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_v_predictor_32x32 \
-  aom_highbd_smooth_v_predictor_32x32_c
-
-void aom_highbd_smooth_v_predictor_4x4_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_v_predictor_4x4 aom_highbd_smooth_v_predictor_4x4_c
-
-void aom_highbd_smooth_v_predictor_4x8_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_v_predictor_4x8 aom_highbd_smooth_v_predictor_4x8_c
-
-void aom_highbd_smooth_v_predictor_8x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_smooth_v_predictor_8x16 aom_highbd_smooth_v_predictor_8x16_c
-
-void aom_highbd_smooth_v_predictor_8x4_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_v_predictor_8x4 aom_highbd_smooth_v_predictor_8x4_c
-
-void aom_highbd_smooth_v_predictor_8x8_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_v_predictor_8x8 aom_highbd_smooth_v_predictor_8x8_c
-
-void aom_highbd_v_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-void aom_highbd_v_predictor_16x16_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-RTCD_EXTERN void (*aom_highbd_v_predictor_16x16)(uint16_t* dst,
-                                                 ptrdiff_t y_stride,
-                                                 const uint16_t* above,
-                                                 const uint16_t* left,
-                                                 int bd);
-
-void aom_highbd_v_predictor_16x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_v_predictor_16x32 aom_highbd_v_predictor_16x32_c
-
-void aom_highbd_v_predictor_16x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_v_predictor_16x8 aom_highbd_v_predictor_16x8_c
-
-void aom_highbd_v_predictor_2x2_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_v_predictor_2x2 aom_highbd_v_predictor_2x2_c
-
-void aom_highbd_v_predictor_32x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_v_predictor_32x16 aom_highbd_v_predictor_32x16_c
-
-void aom_highbd_v_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-void aom_highbd_v_predictor_32x32_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-RTCD_EXTERN void (*aom_highbd_v_predictor_32x32)(uint16_t* dst,
-                                                 ptrdiff_t y_stride,
-                                                 const uint16_t* above,
-                                                 const uint16_t* left,
-                                                 int bd);
-
-void aom_highbd_v_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-void aom_highbd_v_predictor_4x4_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-RTCD_EXTERN void (*aom_highbd_v_predictor_4x4)(uint16_t* dst,
-                                               ptrdiff_t y_stride,
-                                               const uint16_t* above,
-                                               const uint16_t* left,
-                                               int bd);
-
-void aom_highbd_v_predictor_4x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_v_predictor_4x8 aom_highbd_v_predictor_4x8_c
-
-void aom_highbd_v_predictor_8x16_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_v_predictor_8x16 aom_highbd_v_predictor_8x16_c
-
-void aom_highbd_v_predictor_8x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_v_predictor_8x4 aom_highbd_v_predictor_8x4_c
-
-void aom_highbd_v_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-void aom_highbd_v_predictor_8x8_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-RTCD_EXTERN void (*aom_highbd_v_predictor_8x8)(uint16_t* dst,
-                                               ptrdiff_t y_stride,
-                                               const uint16_t* above,
-                                               const uint16_t* left,
-                                               int bd);
-
 void aom_idct16x16_10_add_c(const tran_low_t* input,
                             uint8_t* dest,
                             int dest_stride);
@@ -4405,115 +2385,6 @@
   aom_h_predictor_8x8 = aom_h_predictor_8x8_c;
   if (flags & HAS_SSE2)
     aom_h_predictor_8x8 = aom_h_predictor_8x8_sse2;
-  aom_highbd_blend_a64_hmask = aom_highbd_blend_a64_hmask_c;
-  if (flags & HAS_SSE4_1)
-    aom_highbd_blend_a64_hmask = aom_highbd_blend_a64_hmask_sse4_1;
-  aom_highbd_blend_a64_mask = aom_highbd_blend_a64_mask_c;
-  if (flags & HAS_SSE4_1)
-    aom_highbd_blend_a64_mask = aom_highbd_blend_a64_mask_sse4_1;
-  aom_highbd_blend_a64_vmask = aom_highbd_blend_a64_vmask_c;
-  if (flags & HAS_SSE4_1)
-    aom_highbd_blend_a64_vmask = aom_highbd_blend_a64_vmask_sse4_1;
-  aom_highbd_convolve8 = aom_highbd_convolve8_c;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve8 = aom_highbd_convolve8_avx2;
-  aom_highbd_convolve8_avg = aom_highbd_convolve8_avg_c;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve8_avg = aom_highbd_convolve8_avg_avx2;
-  aom_highbd_convolve8_avg_horiz = aom_highbd_convolve8_avg_horiz_c;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve8_avg_horiz = aom_highbd_convolve8_avg_horiz_avx2;
-  aom_highbd_convolve8_avg_vert = aom_highbd_convolve8_avg_vert_c;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve8_avg_vert = aom_highbd_convolve8_avg_vert_avx2;
-  aom_highbd_convolve8_horiz = aom_highbd_convolve8_horiz_c;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve8_horiz = aom_highbd_convolve8_horiz_avx2;
-  aom_highbd_convolve8_vert = aom_highbd_convolve8_vert_c;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve8_vert = aom_highbd_convolve8_vert_avx2;
-  aom_highbd_convolve_avg = aom_highbd_convolve_avg_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_convolve_avg = aom_highbd_convolve_avg_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve_avg = aom_highbd_convolve_avg_avx2;
-  aom_highbd_convolve_copy = aom_highbd_convolve_copy_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_convolve_copy = aom_highbd_convolve_copy_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve_copy = aom_highbd_convolve_copy_avx2;
-  aom_highbd_dc_predictor_16x16 = aom_highbd_dc_predictor_16x16_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_dc_predictor_16x16 = aom_highbd_dc_predictor_16x16_sse2;
-  aom_highbd_dc_predictor_32x32 = aom_highbd_dc_predictor_32x32_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_dc_predictor_32x32 = aom_highbd_dc_predictor_32x32_sse2;
-  aom_highbd_dc_predictor_4x4 = aom_highbd_dc_predictor_4x4_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_dc_predictor_4x4 = aom_highbd_dc_predictor_4x4_sse2;
-  aom_highbd_dc_predictor_8x8 = aom_highbd_dc_predictor_8x8_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_dc_predictor_8x8 = aom_highbd_dc_predictor_8x8_sse2;
-  aom_highbd_lpf_horizontal_4 = aom_highbd_lpf_horizontal_4_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_lpf_horizontal_4 = aom_highbd_lpf_horizontal_4_sse2;
-  aom_highbd_lpf_horizontal_4_dual = aom_highbd_lpf_horizontal_4_dual_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_lpf_horizontal_4_dual = aom_highbd_lpf_horizontal_4_dual_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_lpf_horizontal_4_dual = aom_highbd_lpf_horizontal_4_dual_avx2;
-  aom_highbd_lpf_horizontal_8 = aom_highbd_lpf_horizontal_8_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_lpf_horizontal_8 = aom_highbd_lpf_horizontal_8_sse2;
-  aom_highbd_lpf_horizontal_8_dual = aom_highbd_lpf_horizontal_8_dual_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_lpf_horizontal_8_dual = aom_highbd_lpf_horizontal_8_dual_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_lpf_horizontal_8_dual = aom_highbd_lpf_horizontal_8_dual_avx2;
-  aom_highbd_lpf_horizontal_edge_16 = aom_highbd_lpf_horizontal_edge_16_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_lpf_horizontal_edge_16 = aom_highbd_lpf_horizontal_edge_16_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_lpf_horizontal_edge_16 = aom_highbd_lpf_horizontal_edge_16_avx2;
-  aom_highbd_lpf_horizontal_edge_8 = aom_highbd_lpf_horizontal_edge_8_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_lpf_horizontal_edge_8 = aom_highbd_lpf_horizontal_edge_8_sse2;
-  aom_highbd_lpf_vertical_16 = aom_highbd_lpf_vertical_16_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_lpf_vertical_16 = aom_highbd_lpf_vertical_16_sse2;
-  aom_highbd_lpf_vertical_16_dual = aom_highbd_lpf_vertical_16_dual_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_lpf_vertical_16_dual = aom_highbd_lpf_vertical_16_dual_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_lpf_vertical_16_dual = aom_highbd_lpf_vertical_16_dual_avx2;
-  aom_highbd_lpf_vertical_4 = aom_highbd_lpf_vertical_4_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_lpf_vertical_4 = aom_highbd_lpf_vertical_4_sse2;
-  aom_highbd_lpf_vertical_4_dual = aom_highbd_lpf_vertical_4_dual_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_lpf_vertical_4_dual = aom_highbd_lpf_vertical_4_dual_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_lpf_vertical_4_dual = aom_highbd_lpf_vertical_4_dual_avx2;
-  aom_highbd_lpf_vertical_8 = aom_highbd_lpf_vertical_8_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_lpf_vertical_8 = aom_highbd_lpf_vertical_8_sse2;
-  aom_highbd_lpf_vertical_8_dual = aom_highbd_lpf_vertical_8_dual_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_lpf_vertical_8_dual = aom_highbd_lpf_vertical_8_dual_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_lpf_vertical_8_dual = aom_highbd_lpf_vertical_8_dual_avx2;
-  aom_highbd_v_predictor_16x16 = aom_highbd_v_predictor_16x16_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_v_predictor_16x16 = aom_highbd_v_predictor_16x16_sse2;
-  aom_highbd_v_predictor_32x32 = aom_highbd_v_predictor_32x32_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_v_predictor_32x32 = aom_highbd_v_predictor_32x32_sse2;
-  aom_highbd_v_predictor_4x4 = aom_highbd_v_predictor_4x4_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_v_predictor_4x4 = aom_highbd_v_predictor_4x4_sse2;
-  aom_highbd_v_predictor_8x8 = aom_highbd_v_predictor_8x8_c;
-  if (flags & HAS_SSE2)
-    aom_highbd_v_predictor_8x8 = aom_highbd_v_predictor_8x8_sse2;
   aom_idct16x16_10_add = aom_idct16x16_10_add_c;
   if (flags & HAS_SSE2)
     aom_idct16x16_10_add = aom_idct16x16_10_add_sse2;
diff --git a/third_party/libaom/source/config/win/ia32/av1_rtcd.h b/third_party/libaom/source/config/win/ia32/av1_rtcd.h
index ba054ca..63d5838 100644
--- a/third_party/libaom/source/config/win/ia32/av1_rtcd.h
+++ b/third_party/libaom/source/config/win/ia32/av1_rtcd.h
@@ -333,396 +333,6 @@
                                       int x_step_q4,
                                       ConvolveParams* conv_params);
 
-void av1_highbd_convolve8_c(const uint8_t* src,
-                            ptrdiff_t src_stride,
-                            uint8_t* dst,
-                            ptrdiff_t dst_stride,
-                            const int16_t* filter_x,
-                            int x_step_q4,
-                            const int16_t* filter_y,
-                            int y_step_q4,
-                            int w,
-                            int h,
-                            int bps);
-#define av1_highbd_convolve8 av1_highbd_convolve8_c
-
-void av1_highbd_convolve8_avg_c(const uint8_t* src,
-                                ptrdiff_t src_stride,
-                                uint8_t* dst,
-                                ptrdiff_t dst_stride,
-                                const int16_t* filter_x,
-                                int x_step_q4,
-                                const int16_t* filter_y,
-                                int y_step_q4,
-                                int w,
-                                int h,
-                                int bps);
-#define av1_highbd_convolve8_avg av1_highbd_convolve8_avg_c
-
-void av1_highbd_convolve8_avg_horiz_c(const uint8_t* src,
-                                      ptrdiff_t src_stride,
-                                      uint8_t* dst,
-                                      ptrdiff_t dst_stride,
-                                      const int16_t* filter_x,
-                                      int x_step_q4,
-                                      const int16_t* filter_y,
-                                      int y_step_q4,
-                                      int w,
-                                      int h,
-                                      int bps);
-#define av1_highbd_convolve8_avg_horiz av1_highbd_convolve8_avg_horiz_c
-
-void av1_highbd_convolve8_avg_vert_c(const uint8_t* src,
-                                     ptrdiff_t src_stride,
-                                     uint8_t* dst,
-                                     ptrdiff_t dst_stride,
-                                     const int16_t* filter_x,
-                                     int x_step_q4,
-                                     const int16_t* filter_y,
-                                     int y_step_q4,
-                                     int w,
-                                     int h,
-                                     int bps);
-#define av1_highbd_convolve8_avg_vert av1_highbd_convolve8_avg_vert_c
-
-void av1_highbd_convolve8_horiz_c(const uint8_t* src,
-                                  ptrdiff_t src_stride,
-                                  uint8_t* dst,
-                                  ptrdiff_t dst_stride,
-                                  const int16_t* filter_x,
-                                  int x_step_q4,
-                                  const int16_t* filter_y,
-                                  int y_step_q4,
-                                  int w,
-                                  int h,
-                                  int bps);
-#define av1_highbd_convolve8_horiz av1_highbd_convolve8_horiz_c
-
-void av1_highbd_convolve8_vert_c(const uint8_t* src,
-                                 ptrdiff_t src_stride,
-                                 uint8_t* dst,
-                                 ptrdiff_t dst_stride,
-                                 const int16_t* filter_x,
-                                 int x_step_q4,
-                                 const int16_t* filter_y,
-                                 int y_step_q4,
-                                 int w,
-                                 int h,
-                                 int bps);
-#define av1_highbd_convolve8_vert av1_highbd_convolve8_vert_c
-
-void av1_highbd_convolve_2d_c(const uint16_t* src,
-                              int src_stride,
-                              CONV_BUF_TYPE* dst,
-                              int dst_stride,
-                              int w,
-                              int h,
-                              InterpFilterParams* filter_params_x,
-                              InterpFilterParams* filter_params_y,
-                              const int subpel_x_q4,
-                              const int subpel_y_q4,
-                              ConvolveParams* conv_params,
-                              int bd);
-void av1_highbd_convolve_2d_ssse3(const uint16_t* src,
-                                  int src_stride,
-                                  CONV_BUF_TYPE* dst,
-                                  int dst_stride,
-                                  int w,
-                                  int h,
-                                  InterpFilterParams* filter_params_x,
-                                  InterpFilterParams* filter_params_y,
-                                  const int subpel_x_q4,
-                                  const int subpel_y_q4,
-                                  ConvolveParams* conv_params,
-                                  int bd);
-RTCD_EXTERN void (*av1_highbd_convolve_2d)(const uint16_t* src,
-                                           int src_stride,
-                                           CONV_BUF_TYPE* dst,
-                                           int dst_stride,
-                                           int w,
-                                           int h,
-                                           InterpFilterParams* filter_params_x,
-                                           InterpFilterParams* filter_params_y,
-                                           const int subpel_x_q4,
-                                           const int subpel_y_q4,
-                                           ConvolveParams* conv_params,
-                                           int bd);
-
-void av1_highbd_convolve_2d_scale_c(const uint16_t* src,
-                                    int src_stride,
-                                    CONV_BUF_TYPE* dst,
-                                    int dst_stride,
-                                    int w,
-                                    int h,
-                                    InterpFilterParams* filter_params_x,
-                                    InterpFilterParams* filter_params_y,
-                                    const int subpel_x_q4,
-                                    const int x_step_qn,
-                                    const int subpel_y_q4,
-                                    const int y_step_qn,
-                                    ConvolveParams* conv_params,
-                                    int bd);
-#define av1_highbd_convolve_2d_scale av1_highbd_convolve_2d_scale_c
-
-void av1_highbd_convolve_avg_c(const uint8_t* src,
-                               ptrdiff_t src_stride,
-                               uint8_t* dst,
-                               ptrdiff_t dst_stride,
-                               const int16_t* filter_x,
-                               int x_step_q4,
-                               const int16_t* filter_y,
-                               int y_step_q4,
-                               int w,
-                               int h,
-                               int bps);
-#define av1_highbd_convolve_avg av1_highbd_convolve_avg_c
-
-void av1_highbd_convolve_copy_c(const uint8_t* src,
-                                ptrdiff_t src_stride,
-                                uint8_t* dst,
-                                ptrdiff_t dst_stride,
-                                const int16_t* filter_x,
-                                int x_step_q4,
-                                const int16_t* filter_y,
-                                int y_step_q4,
-                                int w,
-                                int h,
-                                int bps);
-#define av1_highbd_convolve_copy av1_highbd_convolve_copy_c
-
-void av1_highbd_convolve_horiz_c(const uint16_t* src,
-                                 int src_stride,
-                                 uint16_t* dst,
-                                 int dst_stride,
-                                 int w,
-                                 int h,
-                                 const InterpFilterParams fp,
-                                 const int subpel_x_q4,
-                                 int x_step_q4,
-                                 int avg,
-                                 int bd);
-void av1_highbd_convolve_horiz_sse4_1(const uint16_t* src,
-                                      int src_stride,
-                                      uint16_t* dst,
-                                      int dst_stride,
-                                      int w,
-                                      int h,
-                                      const InterpFilterParams fp,
-                                      const int subpel_x_q4,
-                                      int x_step_q4,
-                                      int avg,
-                                      int bd);
-RTCD_EXTERN void (*av1_highbd_convolve_horiz)(const uint16_t* src,
-                                              int src_stride,
-                                              uint16_t* dst,
-                                              int dst_stride,
-                                              int w,
-                                              int h,
-                                              const InterpFilterParams fp,
-                                              const int subpel_x_q4,
-                                              int x_step_q4,
-                                              int avg,
-                                              int bd);
-
-void av1_highbd_convolve_init_c(void);
-void av1_highbd_convolve_init_sse4_1(void);
-RTCD_EXTERN void (*av1_highbd_convolve_init)(void);
-
-void av1_highbd_convolve_rounding_c(const int32_t* src,
-                                    int src_stride,
-                                    uint8_t* dst,
-                                    int dst_stride,
-                                    int w,
-                                    int h,
-                                    int bits,
-                                    int bd);
-void av1_highbd_convolve_rounding_avx2(const int32_t* src,
-                                       int src_stride,
-                                       uint8_t* dst,
-                                       int dst_stride,
-                                       int w,
-                                       int h,
-                                       int bits,
-                                       int bd);
-RTCD_EXTERN void (*av1_highbd_convolve_rounding)(const int32_t* src,
-                                                 int src_stride,
-                                                 uint8_t* dst,
-                                                 int dst_stride,
-                                                 int w,
-                                                 int h,
-                                                 int bits,
-                                                 int bd);
-
-void av1_highbd_convolve_vert_c(const uint16_t* src,
-                                int src_stride,
-                                uint16_t* dst,
-                                int dst_stride,
-                                int w,
-                                int h,
-                                const InterpFilterParams fp,
-                                const int subpel_x_q4,
-                                int x_step_q4,
-                                int avg,
-                                int bd);
-void av1_highbd_convolve_vert_sse4_1(const uint16_t* src,
-                                     int src_stride,
-                                     uint16_t* dst,
-                                     int dst_stride,
-                                     int w,
-                                     int h,
-                                     const InterpFilterParams fp,
-                                     const int subpel_x_q4,
-                                     int x_step_q4,
-                                     int avg,
-                                     int bd);
-RTCD_EXTERN void (*av1_highbd_convolve_vert)(const uint16_t* src,
-                                             int src_stride,
-                                             uint16_t* dst,
-                                             int dst_stride,
-                                             int w,
-                                             int h,
-                                             const InterpFilterParams fp,
-                                             const int subpel_x_q4,
-                                             int x_step_q4,
-                                             int avg,
-                                             int bd);
-
-void av1_highbd_iht16x16_256_add_c(const tran_low_t* input,
-                                   uint8_t* output,
-                                   int pitch,
-                                   const struct txfm_param* param);
-#define av1_highbd_iht16x16_256_add av1_highbd_iht16x16_256_add_c
-
-void av1_highbd_iht16x32_512_add_c(const tran_low_t* input,
-                                   uint8_t* dest,
-                                   int dest_stride,
-                                   const struct txfm_param* param);
-#define av1_highbd_iht16x32_512_add av1_highbd_iht16x32_512_add_c
-
-void av1_highbd_iht16x4_64_add_c(const tran_low_t* input,
-                                 uint8_t* dest,
-                                 int dest_stride,
-                                 const struct txfm_param* param);
-#define av1_highbd_iht16x4_64_add av1_highbd_iht16x4_64_add_c
-
-void av1_highbd_iht16x8_128_add_c(const tran_low_t* input,
-                                  uint8_t* dest,
-                                  int dest_stride,
-                                  const struct txfm_param* param);
-#define av1_highbd_iht16x8_128_add av1_highbd_iht16x8_128_add_c
-
-void av1_highbd_iht32x16_512_add_c(const tran_low_t* input,
-                                   uint8_t* dest,
-                                   int dest_stride,
-                                   const struct txfm_param* param);
-#define av1_highbd_iht32x16_512_add av1_highbd_iht32x16_512_add_c
-
-void av1_highbd_iht32x8_256_add_c(const tran_low_t* input,
-                                  uint8_t* dest,
-                                  int dest_stride,
-                                  const struct txfm_param* param);
-#define av1_highbd_iht32x8_256_add av1_highbd_iht32x8_256_add_c
-
-void av1_highbd_iht4x16_64_add_c(const tran_low_t* input,
-                                 uint8_t* dest,
-                                 int dest_stride,
-                                 const struct txfm_param* param);
-#define av1_highbd_iht4x16_64_add av1_highbd_iht4x16_64_add_c
-
-void av1_highbd_iht4x4_16_add_c(const tran_low_t* input,
-                                uint8_t* dest,
-                                int dest_stride,
-                                const struct txfm_param* param);
-#define av1_highbd_iht4x4_16_add av1_highbd_iht4x4_16_add_c
-
-void av1_highbd_iht4x8_32_add_c(const tran_low_t* input,
-                                uint8_t* dest,
-                                int dest_stride,
-                                const struct txfm_param* param);
-#define av1_highbd_iht4x8_32_add av1_highbd_iht4x8_32_add_c
-
-void av1_highbd_iht8x16_128_add_c(const tran_low_t* input,
-                                  uint8_t* dest,
-                                  int dest_stride,
-                                  const struct txfm_param* param);
-#define av1_highbd_iht8x16_128_add av1_highbd_iht8x16_128_add_c
-
-void av1_highbd_iht8x32_256_add_c(const tran_low_t* input,
-                                  uint8_t* dest,
-                                  int dest_stride,
-                                  const struct txfm_param* param);
-#define av1_highbd_iht8x32_256_add av1_highbd_iht8x32_256_add_c
-
-void av1_highbd_iht8x4_32_add_c(const tran_low_t* input,
-                                uint8_t* dest,
-                                int dest_stride,
-                                const struct txfm_param* param);
-#define av1_highbd_iht8x4_32_add av1_highbd_iht8x4_32_add_c
-
-void av1_highbd_iht8x8_64_add_c(const tran_low_t* input,
-                                uint8_t* dest,
-                                int dest_stride,
-                                const struct txfm_param* param);
-#define av1_highbd_iht8x8_64_add av1_highbd_iht8x8_64_add_c
-
-void av1_highbd_warp_affine_c(const int32_t* mat,
-                              const uint16_t* ref,
-                              int width,
-                              int height,
-                              int stride,
-                              uint16_t* pred,
-                              int p_col,
-                              int p_row,
-                              int p_width,
-                              int p_height,
-                              int p_stride,
-                              int subsampling_x,
-                              int subsampling_y,
-                              int bd,
-                              ConvolveParams* conv_params,
-                              int16_t alpha,
-                              int16_t beta,
-                              int16_t gamma,
-                              int16_t delta);
-void av1_highbd_warp_affine_ssse3(const int32_t* mat,
-                                  const uint16_t* ref,
-                                  int width,
-                                  int height,
-                                  int stride,
-                                  uint16_t* pred,
-                                  int p_col,
-                                  int p_row,
-                                  int p_width,
-                                  int p_height,
-                                  int p_stride,
-                                  int subsampling_x,
-                                  int subsampling_y,
-                                  int bd,
-                                  ConvolveParams* conv_params,
-                                  int16_t alpha,
-                                  int16_t beta,
-                                  int16_t gamma,
-                                  int16_t delta);
-RTCD_EXTERN void (*av1_highbd_warp_affine)(const int32_t* mat,
-                                           const uint16_t* ref,
-                                           int width,
-                                           int height,
-                                           int stride,
-                                           uint16_t* pred,
-                                           int p_col,
-                                           int p_row,
-                                           int p_width,
-                                           int p_height,
-                                           int p_stride,
-                                           int subsampling_x,
-                                           int subsampling_y,
-                                           int bd,
-                                           ConvolveParams* conv_params,
-                                           int16_t alpha,
-                                           int16_t beta,
-                                           int16_t gamma,
-                                           int16_t delta);
-
 void av1_iht16x16_256_add_c(const tran_low_t* input,
                             uint8_t* output,
                             int pitch,
@@ -1342,24 +952,6 @@
   av1_convolve_vert = av1_convolve_vert_c;
   if (flags & HAS_SSSE3)
     av1_convolve_vert = av1_convolve_vert_ssse3;
-  av1_highbd_convolve_2d = av1_highbd_convolve_2d_c;
-  if (flags & HAS_SSSE3)
-    av1_highbd_convolve_2d = av1_highbd_convolve_2d_ssse3;
-  av1_highbd_convolve_horiz = av1_highbd_convolve_horiz_c;
-  if (flags & HAS_SSE4_1)
-    av1_highbd_convolve_horiz = av1_highbd_convolve_horiz_sse4_1;
-  av1_highbd_convolve_init = av1_highbd_convolve_init_c;
-  if (flags & HAS_SSE4_1)
-    av1_highbd_convolve_init = av1_highbd_convolve_init_sse4_1;
-  av1_highbd_convolve_rounding = av1_highbd_convolve_rounding_c;
-  if (flags & HAS_AVX2)
-    av1_highbd_convolve_rounding = av1_highbd_convolve_rounding_avx2;
-  av1_highbd_convolve_vert = av1_highbd_convolve_vert_c;
-  if (flags & HAS_SSE4_1)
-    av1_highbd_convolve_vert = av1_highbd_convolve_vert_sse4_1;
-  av1_highbd_warp_affine = av1_highbd_warp_affine_c;
-  if (flags & HAS_SSSE3)
-    av1_highbd_warp_affine = av1_highbd_warp_affine_ssse3;
   av1_iht16x16_256_add = av1_iht16x16_256_add_c;
   if (flags & HAS_SSE2)
     av1_iht16x16_256_add = av1_iht16x16_256_add_sse2;
diff --git a/third_party/libaom/source/config/win/x64/aom_config.asm b/third_party/libaom/source/config/win/x64/aom_config.asm
index 11daa00..16f31aec 100644
--- a/third_party/libaom/source/config/win/x64/aom_config.asm
+++ b/third_party/libaom/source/config/win/x64/aom_config.asm
@@ -61,7 +61,7 @@
 %define CONFIG_ENCODE_PERF_TESTS 0
 %define CONFIG_COEFFICIENT_RANGE_CHECKING 0
 %define CONFIG_LOWBITDEPTH 1
-%define CONFIG_HIGHBITDEPTH 1
+%define CONFIG_HIGHBITDEPTH 0
 %define CONFIG_EXPERIMENTAL 0
 %define CONFIG_SIZE_LIMIT 1
 %define CONFIG_FP_MB_STATS 0
diff --git a/third_party/libaom/source/config/win/x64/aom_config.c b/third_party/libaom/source/config/win/x64/aom_config.c
index 1a26e05..3f3feb8 100644
--- a/third_party/libaom/source/config/win/x64/aom_config.c
+++ b/third_party/libaom/source/config/win/x64/aom_config.c
@@ -7,5 +7,5 @@
 /* Media Patent License 1.0 was not distributed with this source code in the */
 /* PATENTS file, you can obtain it at www.aomedia.org/license/patent. */
 #include "aom/aom_codec.h"
-static const char* const cfg = "--target=x86_64-win64-vs12 --enable-external-build --enable-postproc --disable-av1-encoder --size-limit=16384x16384 --enable-realtime-only --disable-install-docs --enable-pic --as=yasm";
+static const char* const cfg = "--target=x86_64-win64-vs12 --enable-external-build --enable-postproc --disable-av1-encoder --size-limit=16384x16384 --enable-realtime-only --disable-install-docs --disable-highbitdepth --enable-pic --as=yasm";
 const char *aom_codec_build_config(void) {return cfg;}
diff --git a/third_party/libaom/source/config/win/x64/aom_config.h b/third_party/libaom/source/config/win/x64/aom_config.h
index af81ed7..66dff276 100644
--- a/third_party/libaom/source/config/win/x64/aom_config.h
+++ b/third_party/libaom/source/config/win/x64/aom_config.h
@@ -74,7 +74,7 @@
 #define CONFIG_ENCODE_PERF_TESTS 0
 #define CONFIG_COEFFICIENT_RANGE_CHECKING 0
 #define CONFIG_LOWBITDEPTH 1
-#define CONFIG_HIGHBITDEPTH 1
+#define CONFIG_HIGHBITDEPTH 0
 #define CONFIG_EXPERIMENTAL 0
 #define CONFIG_SIZE_LIMIT 1
 #define CONFIG_FP_MB_STATS 0
diff --git a/third_party/libaom/source/config/win/x64/aom_dsp_rtcd.h b/third_party/libaom/source/config/win/x64/aom_dsp_rtcd.h
index f94714d0..91e5bf5 100644
--- a/third_party/libaom/source/config/win/x64/aom_dsp_rtcd.h
+++ b/third_party/libaom/source/config/win/x64/aom_dsp_rtcd.h
@@ -1371,1335 +1371,6 @@
                               const uint8_t* left);
 #define aom_h_predictor_8x8 aom_h_predictor_8x8_sse2
 
-void aom_highbd_blend_a64_hmask_c(uint8_t* dst,
-                                  uint32_t dst_stride,
-                                  const uint8_t* src0,
-                                  uint32_t src0_stride,
-                                  const uint8_t* src1,
-                                  uint32_t src1_stride,
-                                  const uint8_t* mask,
-                                  int h,
-                                  int w,
-                                  int bd);
-void aom_highbd_blend_a64_hmask_sse4_1(uint8_t* dst,
-                                       uint32_t dst_stride,
-                                       const uint8_t* src0,
-                                       uint32_t src0_stride,
-                                       const uint8_t* src1,
-                                       uint32_t src1_stride,
-                                       const uint8_t* mask,
-                                       int h,
-                                       int w,
-                                       int bd);
-RTCD_EXTERN void (*aom_highbd_blend_a64_hmask)(uint8_t* dst,
-                                               uint32_t dst_stride,
-                                               const uint8_t* src0,
-                                               uint32_t src0_stride,
-                                               const uint8_t* src1,
-                                               uint32_t src1_stride,
-                                               const uint8_t* mask,
-                                               int h,
-                                               int w,
-                                               int bd);
-
-void aom_highbd_blend_a64_mask_c(uint8_t* dst,
-                                 uint32_t dst_stride,
-                                 const uint8_t* src0,
-                                 uint32_t src0_stride,
-                                 const uint8_t* src1,
-                                 uint32_t src1_stride,
-                                 const uint8_t* mask,
-                                 uint32_t mask_stride,
-                                 int h,
-                                 int w,
-                                 int suby,
-                                 int subx,
-                                 int bd);
-void aom_highbd_blend_a64_mask_sse4_1(uint8_t* dst,
-                                      uint32_t dst_stride,
-                                      const uint8_t* src0,
-                                      uint32_t src0_stride,
-                                      const uint8_t* src1,
-                                      uint32_t src1_stride,
-                                      const uint8_t* mask,
-                                      uint32_t mask_stride,
-                                      int h,
-                                      int w,
-                                      int suby,
-                                      int subx,
-                                      int bd);
-RTCD_EXTERN void (*aom_highbd_blend_a64_mask)(uint8_t* dst,
-                                              uint32_t dst_stride,
-                                              const uint8_t* src0,
-                                              uint32_t src0_stride,
-                                              const uint8_t* src1,
-                                              uint32_t src1_stride,
-                                              const uint8_t* mask,
-                                              uint32_t mask_stride,
-                                              int h,
-                                              int w,
-                                              int suby,
-                                              int subx,
-                                              int bd);
-
-void aom_highbd_blend_a64_vmask_c(uint8_t* dst,
-                                  uint32_t dst_stride,
-                                  const uint8_t* src0,
-                                  uint32_t src0_stride,
-                                  const uint8_t* src1,
-                                  uint32_t src1_stride,
-                                  const uint8_t* mask,
-                                  int h,
-                                  int w,
-                                  int bd);
-void aom_highbd_blend_a64_vmask_sse4_1(uint8_t* dst,
-                                       uint32_t dst_stride,
-                                       const uint8_t* src0,
-                                       uint32_t src0_stride,
-                                       const uint8_t* src1,
-                                       uint32_t src1_stride,
-                                       const uint8_t* mask,
-                                       int h,
-                                       int w,
-                                       int bd);
-RTCD_EXTERN void (*aom_highbd_blend_a64_vmask)(uint8_t* dst,
-                                               uint32_t dst_stride,
-                                               const uint8_t* src0,
-                                               uint32_t src0_stride,
-                                               const uint8_t* src1,
-                                               uint32_t src1_stride,
-                                               const uint8_t* mask,
-                                               int h,
-                                               int w,
-                                               int bd);
-
-void aom_highbd_convolve8_c(const uint8_t* src,
-                            ptrdiff_t src_stride,
-                            uint8_t* dst,
-                            ptrdiff_t dst_stride,
-                            const int16_t* filter_x,
-                            int x_step_q4,
-                            const int16_t* filter_y,
-                            int y_step_q4,
-                            int w,
-                            int h,
-                            int bps);
-void aom_highbd_convolve8_sse2(const uint8_t* src,
-                               ptrdiff_t src_stride,
-                               uint8_t* dst,
-                               ptrdiff_t dst_stride,
-                               const int16_t* filter_x,
-                               int x_step_q4,
-                               const int16_t* filter_y,
-                               int y_step_q4,
-                               int w,
-                               int h,
-                               int bps);
-void aom_highbd_convolve8_avx2(const uint8_t* src,
-                               ptrdiff_t src_stride,
-                               uint8_t* dst,
-                               ptrdiff_t dst_stride,
-                               const int16_t* filter_x,
-                               int x_step_q4,
-                               const int16_t* filter_y,
-                               int y_step_q4,
-                               int w,
-                               int h,
-                               int bps);
-RTCD_EXTERN void (*aom_highbd_convolve8)(const uint8_t* src,
-                                         ptrdiff_t src_stride,
-                                         uint8_t* dst,
-                                         ptrdiff_t dst_stride,
-                                         const int16_t* filter_x,
-                                         int x_step_q4,
-                                         const int16_t* filter_y,
-                                         int y_step_q4,
-                                         int w,
-                                         int h,
-                                         int bps);
-
-void aom_highbd_convolve8_avg_c(const uint8_t* src,
-                                ptrdiff_t src_stride,
-                                uint8_t* dst,
-                                ptrdiff_t dst_stride,
-                                const int16_t* filter_x,
-                                int x_step_q4,
-                                const int16_t* filter_y,
-                                int y_step_q4,
-                                int w,
-                                int h,
-                                int bps);
-void aom_highbd_convolve8_avg_sse2(const uint8_t* src,
-                                   ptrdiff_t src_stride,
-                                   uint8_t* dst,
-                                   ptrdiff_t dst_stride,
-                                   const int16_t* filter_x,
-                                   int x_step_q4,
-                                   const int16_t* filter_y,
-                                   int y_step_q4,
-                                   int w,
-                                   int h,
-                                   int bps);
-void aom_highbd_convolve8_avg_avx2(const uint8_t* src,
-                                   ptrdiff_t src_stride,
-                                   uint8_t* dst,
-                                   ptrdiff_t dst_stride,
-                                   const int16_t* filter_x,
-                                   int x_step_q4,
-                                   const int16_t* filter_y,
-                                   int y_step_q4,
-                                   int w,
-                                   int h,
-                                   int bps);
-RTCD_EXTERN void (*aom_highbd_convolve8_avg)(const uint8_t* src,
-                                             ptrdiff_t src_stride,
-                                             uint8_t* dst,
-                                             ptrdiff_t dst_stride,
-                                             const int16_t* filter_x,
-                                             int x_step_q4,
-                                             const int16_t* filter_y,
-                                             int y_step_q4,
-                                             int w,
-                                             int h,
-                                             int bps);
-
-void aom_highbd_convolve8_avg_horiz_c(const uint8_t* src,
-                                      ptrdiff_t src_stride,
-                                      uint8_t* dst,
-                                      ptrdiff_t dst_stride,
-                                      const int16_t* filter_x,
-                                      int x_step_q4,
-                                      const int16_t* filter_y,
-                                      int y_step_q4,
-                                      int w,
-                                      int h,
-                                      int bps);
-void aom_highbd_convolve8_avg_horiz_sse2(const uint8_t* src,
-                                         ptrdiff_t src_stride,
-                                         uint8_t* dst,
-                                         ptrdiff_t dst_stride,
-                                         const int16_t* filter_x,
-                                         int x_step_q4,
-                                         const int16_t* filter_y,
-                                         int y_step_q4,
-                                         int w,
-                                         int h,
-                                         int bps);
-void aom_highbd_convolve8_avg_horiz_avx2(const uint8_t* src,
-                                         ptrdiff_t src_stride,
-                                         uint8_t* dst,
-                                         ptrdiff_t dst_stride,
-                                         const int16_t* filter_x,
-                                         int x_step_q4,
-                                         const int16_t* filter_y,
-                                         int y_step_q4,
-                                         int w,
-                                         int h,
-                                         int bps);
-RTCD_EXTERN void (*aom_highbd_convolve8_avg_horiz)(const uint8_t* src,
-                                                   ptrdiff_t src_stride,
-                                                   uint8_t* dst,
-                                                   ptrdiff_t dst_stride,
-                                                   const int16_t* filter_x,
-                                                   int x_step_q4,
-                                                   const int16_t* filter_y,
-                                                   int y_step_q4,
-                                                   int w,
-                                                   int h,
-                                                   int bps);
-
-void aom_highbd_convolve8_avg_vert_c(const uint8_t* src,
-                                     ptrdiff_t src_stride,
-                                     uint8_t* dst,
-                                     ptrdiff_t dst_stride,
-                                     const int16_t* filter_x,
-                                     int x_step_q4,
-                                     const int16_t* filter_y,
-                                     int y_step_q4,
-                                     int w,
-                                     int h,
-                                     int bps);
-void aom_highbd_convolve8_avg_vert_sse2(const uint8_t* src,
-                                        ptrdiff_t src_stride,
-                                        uint8_t* dst,
-                                        ptrdiff_t dst_stride,
-                                        const int16_t* filter_x,
-                                        int x_step_q4,
-                                        const int16_t* filter_y,
-                                        int y_step_q4,
-                                        int w,
-                                        int h,
-                                        int bps);
-void aom_highbd_convolve8_avg_vert_avx2(const uint8_t* src,
-                                        ptrdiff_t src_stride,
-                                        uint8_t* dst,
-                                        ptrdiff_t dst_stride,
-                                        const int16_t* filter_x,
-                                        int x_step_q4,
-                                        const int16_t* filter_y,
-                                        int y_step_q4,
-                                        int w,
-                                        int h,
-                                        int bps);
-RTCD_EXTERN void (*aom_highbd_convolve8_avg_vert)(const uint8_t* src,
-                                                  ptrdiff_t src_stride,
-                                                  uint8_t* dst,
-                                                  ptrdiff_t dst_stride,
-                                                  const int16_t* filter_x,
-                                                  int x_step_q4,
-                                                  const int16_t* filter_y,
-                                                  int y_step_q4,
-                                                  int w,
-                                                  int h,
-                                                  int bps);
-
-void aom_highbd_convolve8_horiz_c(const uint8_t* src,
-                                  ptrdiff_t src_stride,
-                                  uint8_t* dst,
-                                  ptrdiff_t dst_stride,
-                                  const int16_t* filter_x,
-                                  int x_step_q4,
-                                  const int16_t* filter_y,
-                                  int y_step_q4,
-                                  int w,
-                                  int h,
-                                  int bps);
-void aom_highbd_convolve8_horiz_sse2(const uint8_t* src,
-                                     ptrdiff_t src_stride,
-                                     uint8_t* dst,
-                                     ptrdiff_t dst_stride,
-                                     const int16_t* filter_x,
-                                     int x_step_q4,
-                                     const int16_t* filter_y,
-                                     int y_step_q4,
-                                     int w,
-                                     int h,
-                                     int bps);
-void aom_highbd_convolve8_horiz_avx2(const uint8_t* src,
-                                     ptrdiff_t src_stride,
-                                     uint8_t* dst,
-                                     ptrdiff_t dst_stride,
-                                     const int16_t* filter_x,
-                                     int x_step_q4,
-                                     const int16_t* filter_y,
-                                     int y_step_q4,
-                                     int w,
-                                     int h,
-                                     int bps);
-RTCD_EXTERN void (*aom_highbd_convolve8_horiz)(const uint8_t* src,
-                                               ptrdiff_t src_stride,
-                                               uint8_t* dst,
-                                               ptrdiff_t dst_stride,
-                                               const int16_t* filter_x,
-                                               int x_step_q4,
-                                               const int16_t* filter_y,
-                                               int y_step_q4,
-                                               int w,
-                                               int h,
-                                               int bps);
-
-void aom_highbd_convolve8_vert_c(const uint8_t* src,
-                                 ptrdiff_t src_stride,
-                                 uint8_t* dst,
-                                 ptrdiff_t dst_stride,
-                                 const int16_t* filter_x,
-                                 int x_step_q4,
-                                 const int16_t* filter_y,
-                                 int y_step_q4,
-                                 int w,
-                                 int h,
-                                 int bps);
-void aom_highbd_convolve8_vert_sse2(const uint8_t* src,
-                                    ptrdiff_t src_stride,
-                                    uint8_t* dst,
-                                    ptrdiff_t dst_stride,
-                                    const int16_t* filter_x,
-                                    int x_step_q4,
-                                    const int16_t* filter_y,
-                                    int y_step_q4,
-                                    int w,
-                                    int h,
-                                    int bps);
-void aom_highbd_convolve8_vert_avx2(const uint8_t* src,
-                                    ptrdiff_t src_stride,
-                                    uint8_t* dst,
-                                    ptrdiff_t dst_stride,
-                                    const int16_t* filter_x,
-                                    int x_step_q4,
-                                    const int16_t* filter_y,
-                                    int y_step_q4,
-                                    int w,
-                                    int h,
-                                    int bps);
-RTCD_EXTERN void (*aom_highbd_convolve8_vert)(const uint8_t* src,
-                                              ptrdiff_t src_stride,
-                                              uint8_t* dst,
-                                              ptrdiff_t dst_stride,
-                                              const int16_t* filter_x,
-                                              int x_step_q4,
-                                              const int16_t* filter_y,
-                                              int y_step_q4,
-                                              int w,
-                                              int h,
-                                              int bps);
-
-void aom_highbd_convolve_avg_c(const uint8_t* src,
-                               ptrdiff_t src_stride,
-                               uint8_t* dst,
-                               ptrdiff_t dst_stride,
-                               const int16_t* filter_x,
-                               int x_step_q4,
-                               const int16_t* filter_y,
-                               int y_step_q4,
-                               int w,
-                               int h,
-                               int bps);
-void aom_highbd_convolve_avg_sse2(const uint8_t* src,
-                                  ptrdiff_t src_stride,
-                                  uint8_t* dst,
-                                  ptrdiff_t dst_stride,
-                                  const int16_t* filter_x,
-                                  int x_step_q4,
-                                  const int16_t* filter_y,
-                                  int y_step_q4,
-                                  int w,
-                                  int h,
-                                  int bps);
-void aom_highbd_convolve_avg_avx2(const uint8_t* src,
-                                  ptrdiff_t src_stride,
-                                  uint8_t* dst,
-                                  ptrdiff_t dst_stride,
-                                  const int16_t* filter_x,
-                                  int x_step_q4,
-                                  const int16_t* filter_y,
-                                  int y_step_q4,
-                                  int w,
-                                  int h,
-                                  int bps);
-RTCD_EXTERN void (*aom_highbd_convolve_avg)(const uint8_t* src,
-                                            ptrdiff_t src_stride,
-                                            uint8_t* dst,
-                                            ptrdiff_t dst_stride,
-                                            const int16_t* filter_x,
-                                            int x_step_q4,
-                                            const int16_t* filter_y,
-                                            int y_step_q4,
-                                            int w,
-                                            int h,
-                                            int bps);
-
-void aom_highbd_convolve_copy_c(const uint8_t* src,
-                                ptrdiff_t src_stride,
-                                uint8_t* dst,
-                                ptrdiff_t dst_stride,
-                                const int16_t* filter_x,
-                                int x_step_q4,
-                                const int16_t* filter_y,
-                                int y_step_q4,
-                                int w,
-                                int h,
-                                int bps);
-void aom_highbd_convolve_copy_sse2(const uint8_t* src,
-                                   ptrdiff_t src_stride,
-                                   uint8_t* dst,
-                                   ptrdiff_t dst_stride,
-                                   const int16_t* filter_x,
-                                   int x_step_q4,
-                                   const int16_t* filter_y,
-                                   int y_step_q4,
-                                   int w,
-                                   int h,
-                                   int bps);
-void aom_highbd_convolve_copy_avx2(const uint8_t* src,
-                                   ptrdiff_t src_stride,
-                                   uint8_t* dst,
-                                   ptrdiff_t dst_stride,
-                                   const int16_t* filter_x,
-                                   int x_step_q4,
-                                   const int16_t* filter_y,
-                                   int y_step_q4,
-                                   int w,
-                                   int h,
-                                   int bps);
-RTCD_EXTERN void (*aom_highbd_convolve_copy)(const uint8_t* src,
-                                             ptrdiff_t src_stride,
-                                             uint8_t* dst,
-                                             ptrdiff_t dst_stride,
-                                             const int16_t* filter_x,
-                                             int x_step_q4,
-                                             const int16_t* filter_y,
-                                             int y_step_q4,
-                                             int w,
-                                             int h,
-                                             int bps);
-
-void aom_highbd_d117_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d117_predictor_16x16 aom_highbd_d117_predictor_16x16_c
-
-void aom_highbd_d117_predictor_16x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d117_predictor_16x32 aom_highbd_d117_predictor_16x32_c
-
-void aom_highbd_d117_predictor_16x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d117_predictor_16x8 aom_highbd_d117_predictor_16x8_c
-
-void aom_highbd_d117_predictor_2x2_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d117_predictor_2x2 aom_highbd_d117_predictor_2x2_c
-
-void aom_highbd_d117_predictor_32x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d117_predictor_32x16 aom_highbd_d117_predictor_32x16_c
-
-void aom_highbd_d117_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d117_predictor_32x32 aom_highbd_d117_predictor_32x32_c
-
-void aom_highbd_d117_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d117_predictor_4x4 aom_highbd_d117_predictor_4x4_c
-
-void aom_highbd_d117_predictor_4x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d117_predictor_4x8 aom_highbd_d117_predictor_4x8_c
-
-void aom_highbd_d117_predictor_8x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d117_predictor_8x16 aom_highbd_d117_predictor_8x16_c
-
-void aom_highbd_d117_predictor_8x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d117_predictor_8x4 aom_highbd_d117_predictor_8x4_c
-
-void aom_highbd_d117_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d117_predictor_8x8 aom_highbd_d117_predictor_8x8_c
-
-void aom_highbd_d135_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d135_predictor_16x16 aom_highbd_d135_predictor_16x16_c
-
-void aom_highbd_d135_predictor_16x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d135_predictor_16x32 aom_highbd_d135_predictor_16x32_c
-
-void aom_highbd_d135_predictor_16x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d135_predictor_16x8 aom_highbd_d135_predictor_16x8_c
-
-void aom_highbd_d135_predictor_2x2_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d135_predictor_2x2 aom_highbd_d135_predictor_2x2_c
-
-void aom_highbd_d135_predictor_32x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d135_predictor_32x16 aom_highbd_d135_predictor_32x16_c
-
-void aom_highbd_d135_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d135_predictor_32x32 aom_highbd_d135_predictor_32x32_c
-
-void aom_highbd_d135_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d135_predictor_4x4 aom_highbd_d135_predictor_4x4_c
-
-void aom_highbd_d135_predictor_4x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d135_predictor_4x8 aom_highbd_d135_predictor_4x8_c
-
-void aom_highbd_d135_predictor_8x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d135_predictor_8x16 aom_highbd_d135_predictor_8x16_c
-
-void aom_highbd_d135_predictor_8x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d135_predictor_8x4 aom_highbd_d135_predictor_8x4_c
-
-void aom_highbd_d135_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d135_predictor_8x8 aom_highbd_d135_predictor_8x8_c
-
-void aom_highbd_d153_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d153_predictor_16x16 aom_highbd_d153_predictor_16x16_c
-
-void aom_highbd_d153_predictor_16x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d153_predictor_16x32 aom_highbd_d153_predictor_16x32_c
-
-void aom_highbd_d153_predictor_16x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d153_predictor_16x8 aom_highbd_d153_predictor_16x8_c
-
-void aom_highbd_d153_predictor_2x2_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d153_predictor_2x2 aom_highbd_d153_predictor_2x2_c
-
-void aom_highbd_d153_predictor_32x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d153_predictor_32x16 aom_highbd_d153_predictor_32x16_c
-
-void aom_highbd_d153_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d153_predictor_32x32 aom_highbd_d153_predictor_32x32_c
-
-void aom_highbd_d153_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d153_predictor_4x4 aom_highbd_d153_predictor_4x4_c
-
-void aom_highbd_d153_predictor_4x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d153_predictor_4x8 aom_highbd_d153_predictor_4x8_c
-
-void aom_highbd_d153_predictor_8x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d153_predictor_8x16 aom_highbd_d153_predictor_8x16_c
-
-void aom_highbd_d153_predictor_8x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d153_predictor_8x4 aom_highbd_d153_predictor_8x4_c
-
-void aom_highbd_d153_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d153_predictor_8x8 aom_highbd_d153_predictor_8x8_c
-
-void aom_highbd_d207e_predictor_16x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_d207e_predictor_16x16 aom_highbd_d207e_predictor_16x16_c
-
-void aom_highbd_d207e_predictor_16x32_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_d207e_predictor_16x32 aom_highbd_d207e_predictor_16x32_c
-
-void aom_highbd_d207e_predictor_16x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d207e_predictor_16x8 aom_highbd_d207e_predictor_16x8_c
-
-void aom_highbd_d207e_predictor_2x2_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d207e_predictor_2x2 aom_highbd_d207e_predictor_2x2_c
-
-void aom_highbd_d207e_predictor_32x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_d207e_predictor_32x16 aom_highbd_d207e_predictor_32x16_c
-
-void aom_highbd_d207e_predictor_32x32_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_d207e_predictor_32x32 aom_highbd_d207e_predictor_32x32_c
-
-void aom_highbd_d207e_predictor_4x4_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d207e_predictor_4x4 aom_highbd_d207e_predictor_4x4_c
-
-void aom_highbd_d207e_predictor_4x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d207e_predictor_4x8 aom_highbd_d207e_predictor_4x8_c
-
-void aom_highbd_d207e_predictor_8x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d207e_predictor_8x16 aom_highbd_d207e_predictor_8x16_c
-
-void aom_highbd_d207e_predictor_8x4_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d207e_predictor_8x4 aom_highbd_d207e_predictor_8x4_c
-
-void aom_highbd_d207e_predictor_8x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d207e_predictor_8x8 aom_highbd_d207e_predictor_8x8_c
-
-void aom_highbd_d45e_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d45e_predictor_16x16 aom_highbd_d45e_predictor_16x16_c
-
-void aom_highbd_d45e_predictor_16x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d45e_predictor_16x32 aom_highbd_d45e_predictor_16x32_c
-
-void aom_highbd_d45e_predictor_16x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d45e_predictor_16x8 aom_highbd_d45e_predictor_16x8_c
-
-void aom_highbd_d45e_predictor_2x2_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d45e_predictor_2x2 aom_highbd_d45e_predictor_2x2_c
-
-void aom_highbd_d45e_predictor_32x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d45e_predictor_32x16 aom_highbd_d45e_predictor_32x16_c
-
-void aom_highbd_d45e_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d45e_predictor_32x32 aom_highbd_d45e_predictor_32x32_c
-
-void aom_highbd_d45e_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d45e_predictor_4x4 aom_highbd_d45e_predictor_4x4_c
-
-void aom_highbd_d45e_predictor_4x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d45e_predictor_4x8 aom_highbd_d45e_predictor_4x8_c
-
-void aom_highbd_d45e_predictor_8x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d45e_predictor_8x16 aom_highbd_d45e_predictor_8x16_c
-
-void aom_highbd_d45e_predictor_8x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d45e_predictor_8x4 aom_highbd_d45e_predictor_8x4_c
-
-void aom_highbd_d45e_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d45e_predictor_8x8 aom_highbd_d45e_predictor_8x8_c
-
-void aom_highbd_d63e_predictor_16x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d63e_predictor_16x16 aom_highbd_d63e_predictor_16x16_c
-
-void aom_highbd_d63e_predictor_16x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d63e_predictor_16x32 aom_highbd_d63e_predictor_16x32_c
-
-void aom_highbd_d63e_predictor_16x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d63e_predictor_16x8 aom_highbd_d63e_predictor_16x8_c
-
-void aom_highbd_d63e_predictor_2x2_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d63e_predictor_2x2 aom_highbd_d63e_predictor_2x2_c
-
-void aom_highbd_d63e_predictor_32x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d63e_predictor_32x16 aom_highbd_d63e_predictor_32x16_c
-
-void aom_highbd_d63e_predictor_32x32_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_d63e_predictor_32x32 aom_highbd_d63e_predictor_32x32_c
-
-void aom_highbd_d63e_predictor_4x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d63e_predictor_4x4 aom_highbd_d63e_predictor_4x4_c
-
-void aom_highbd_d63e_predictor_4x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d63e_predictor_4x8 aom_highbd_d63e_predictor_4x8_c
-
-void aom_highbd_d63e_predictor_8x16_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_d63e_predictor_8x16 aom_highbd_d63e_predictor_8x16_c
-
-void aom_highbd_d63e_predictor_8x4_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d63e_predictor_8x4 aom_highbd_d63e_predictor_8x4_c
-
-void aom_highbd_d63e_predictor_8x8_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_d63e_predictor_8x8 aom_highbd_d63e_predictor_8x8_c
-
-void aom_highbd_dc_128_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_128_predictor_16x16 aom_highbd_dc_128_predictor_16x16_c
-
-void aom_highbd_dc_128_predictor_16x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_128_predictor_16x32 aom_highbd_dc_128_predictor_16x32_c
-
-void aom_highbd_dc_128_predictor_16x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_128_predictor_16x8 aom_highbd_dc_128_predictor_16x8_c
-
-void aom_highbd_dc_128_predictor_2x2_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_128_predictor_2x2 aom_highbd_dc_128_predictor_2x2_c
-
-void aom_highbd_dc_128_predictor_32x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_128_predictor_32x16 aom_highbd_dc_128_predictor_32x16_c
-
-void aom_highbd_dc_128_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_128_predictor_32x32 aom_highbd_dc_128_predictor_32x32_c
-
-void aom_highbd_dc_128_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_128_predictor_4x4 aom_highbd_dc_128_predictor_4x4_c
-
-void aom_highbd_dc_128_predictor_4x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_128_predictor_4x8 aom_highbd_dc_128_predictor_4x8_c
-
-void aom_highbd_dc_128_predictor_8x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_128_predictor_8x16 aom_highbd_dc_128_predictor_8x16_c
-
-void aom_highbd_dc_128_predictor_8x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_128_predictor_8x4 aom_highbd_dc_128_predictor_8x4_c
-
-void aom_highbd_dc_128_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_128_predictor_8x8 aom_highbd_dc_128_predictor_8x8_c
-
-void aom_highbd_dc_left_predictor_16x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_dc_left_predictor_16x16 aom_highbd_dc_left_predictor_16x16_c
-
-void aom_highbd_dc_left_predictor_16x32_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_dc_left_predictor_16x32 aom_highbd_dc_left_predictor_16x32_c
-
-void aom_highbd_dc_left_predictor_16x8_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_left_predictor_16x8 aom_highbd_dc_left_predictor_16x8_c
-
-void aom_highbd_dc_left_predictor_2x2_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_left_predictor_2x2 aom_highbd_dc_left_predictor_2x2_c
-
-void aom_highbd_dc_left_predictor_32x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_dc_left_predictor_32x16 aom_highbd_dc_left_predictor_32x16_c
-
-void aom_highbd_dc_left_predictor_32x32_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_dc_left_predictor_32x32 aom_highbd_dc_left_predictor_32x32_c
-
-void aom_highbd_dc_left_predictor_4x4_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_left_predictor_4x4 aom_highbd_dc_left_predictor_4x4_c
-
-void aom_highbd_dc_left_predictor_4x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_left_predictor_4x8 aom_highbd_dc_left_predictor_4x8_c
-
-void aom_highbd_dc_left_predictor_8x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_left_predictor_8x16 aom_highbd_dc_left_predictor_8x16_c
-
-void aom_highbd_dc_left_predictor_8x4_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_left_predictor_8x4 aom_highbd_dc_left_predictor_8x4_c
-
-void aom_highbd_dc_left_predictor_8x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_left_predictor_8x8 aom_highbd_dc_left_predictor_8x8_c
-
-void aom_highbd_dc_predictor_16x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-void aom_highbd_dc_predictor_16x16_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_predictor_16x16 aom_highbd_dc_predictor_16x16_sse2
-
-void aom_highbd_dc_predictor_16x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_dc_predictor_16x32 aom_highbd_dc_predictor_16x32_c
-
-void aom_highbd_dc_predictor_16x8_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_dc_predictor_16x8 aom_highbd_dc_predictor_16x8_c
-
-void aom_highbd_dc_predictor_2x2_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_dc_predictor_2x2 aom_highbd_dc_predictor_2x2_c
-
-void aom_highbd_dc_predictor_32x16_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_dc_predictor_32x16 aom_highbd_dc_predictor_32x16_c
-
-void aom_highbd_dc_predictor_32x32_c(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-void aom_highbd_dc_predictor_32x32_sse2(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_predictor_32x32 aom_highbd_dc_predictor_32x32_sse2
-
-void aom_highbd_dc_predictor_4x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-void aom_highbd_dc_predictor_4x4_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_dc_predictor_4x4 aom_highbd_dc_predictor_4x4_sse2
-
-void aom_highbd_dc_predictor_4x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_dc_predictor_4x8 aom_highbd_dc_predictor_4x8_c
-
-void aom_highbd_dc_predictor_8x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_dc_predictor_8x16 aom_highbd_dc_predictor_8x16_c
-
-void aom_highbd_dc_predictor_8x4_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_dc_predictor_8x4 aom_highbd_dc_predictor_8x4_c
-
-void aom_highbd_dc_predictor_8x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-void aom_highbd_dc_predictor_8x8_sse2(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_dc_predictor_8x8 aom_highbd_dc_predictor_8x8_sse2
-
-void aom_highbd_dc_top_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_top_predictor_16x16 aom_highbd_dc_top_predictor_16x16_c
-
-void aom_highbd_dc_top_predictor_16x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_top_predictor_16x32 aom_highbd_dc_top_predictor_16x32_c
-
-void aom_highbd_dc_top_predictor_16x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_top_predictor_16x8 aom_highbd_dc_top_predictor_16x8_c
-
-void aom_highbd_dc_top_predictor_2x2_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_top_predictor_2x2 aom_highbd_dc_top_predictor_2x2_c
-
-void aom_highbd_dc_top_predictor_32x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_top_predictor_32x16 aom_highbd_dc_top_predictor_32x16_c
-
-void aom_highbd_dc_top_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_dc_top_predictor_32x32 aom_highbd_dc_top_predictor_32x32_c
-
-void aom_highbd_dc_top_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_top_predictor_4x4 aom_highbd_dc_top_predictor_4x4_c
-
-void aom_highbd_dc_top_predictor_4x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_top_predictor_4x8 aom_highbd_dc_top_predictor_4x8_c
-
-void aom_highbd_dc_top_predictor_8x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_dc_top_predictor_8x16 aom_highbd_dc_top_predictor_8x16_c
-
-void aom_highbd_dc_top_predictor_8x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_top_predictor_8x4 aom_highbd_dc_top_predictor_8x4_c
-
-void aom_highbd_dc_top_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_dc_top_predictor_8x8 aom_highbd_dc_top_predictor_8x8_c
-
-void aom_highbd_h_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_h_predictor_16x16 aom_highbd_h_predictor_16x16_c
-
-void aom_highbd_h_predictor_16x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_h_predictor_16x32 aom_highbd_h_predictor_16x32_c
-
-void aom_highbd_h_predictor_16x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_h_predictor_16x8 aom_highbd_h_predictor_16x8_c
-
-void aom_highbd_h_predictor_2x2_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_h_predictor_2x2 aom_highbd_h_predictor_2x2_c
-
-void aom_highbd_h_predictor_32x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_h_predictor_32x16 aom_highbd_h_predictor_32x16_c
-
-void aom_highbd_h_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_h_predictor_32x32 aom_highbd_h_predictor_32x32_c
-
-void aom_highbd_h_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_h_predictor_4x4 aom_highbd_h_predictor_4x4_c
-
-void aom_highbd_h_predictor_4x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_h_predictor_4x8 aom_highbd_h_predictor_4x8_c
-
-void aom_highbd_h_predictor_8x16_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_h_predictor_8x16 aom_highbd_h_predictor_8x16_c
-
-void aom_highbd_h_predictor_8x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_h_predictor_8x4 aom_highbd_h_predictor_8x4_c
-
-void aom_highbd_h_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_h_predictor_8x8 aom_highbd_h_predictor_8x8_c
-
 void aom_highbd_iwht4x4_16_add_c(const tran_low_t* input,
                                  uint8_t* dest,
                                  int dest_stride,
@@ -2712,701 +1383,6 @@
                                 int bd);
 #define aom_highbd_iwht4x4_1_add aom_highbd_iwht4x4_1_add_c
 
-void aom_highbd_lpf_horizontal_4_c(uint16_t* s,
-                                   int pitch,
-                                   const uint8_t* blimit,
-                                   const uint8_t* limit,
-                                   const uint8_t* thresh,
-                                   int bd);
-void aom_highbd_lpf_horizontal_4_sse2(uint16_t* s,
-                                      int pitch,
-                                      const uint8_t* blimit,
-                                      const uint8_t* limit,
-                                      const uint8_t* thresh,
-                                      int bd);
-#define aom_highbd_lpf_horizontal_4 aom_highbd_lpf_horizontal_4_sse2
-
-void aom_highbd_lpf_horizontal_4_dual_c(uint16_t* s,
-                                        int pitch,
-                                        const uint8_t* blimit0,
-                                        const uint8_t* limit0,
-                                        const uint8_t* thresh0,
-                                        const uint8_t* blimit1,
-                                        const uint8_t* limit1,
-                                        const uint8_t* thresh1,
-                                        int bd);
-void aom_highbd_lpf_horizontal_4_dual_sse2(uint16_t* s,
-                                           int pitch,
-                                           const uint8_t* blimit0,
-                                           const uint8_t* limit0,
-                                           const uint8_t* thresh0,
-                                           const uint8_t* blimit1,
-                                           const uint8_t* limit1,
-                                           const uint8_t* thresh1,
-                                           int bd);
-void aom_highbd_lpf_horizontal_4_dual_avx2(uint16_t* s,
-                                           int pitch,
-                                           const uint8_t* blimit0,
-                                           const uint8_t* limit0,
-                                           const uint8_t* thresh0,
-                                           const uint8_t* blimit1,
-                                           const uint8_t* limit1,
-                                           const uint8_t* thresh1,
-                                           int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_horizontal_4_dual)(uint16_t* s,
-                                                     int pitch,
-                                                     const uint8_t* blimit0,
-                                                     const uint8_t* limit0,
-                                                     const uint8_t* thresh0,
-                                                     const uint8_t* blimit1,
-                                                     const uint8_t* limit1,
-                                                     const uint8_t* thresh1,
-                                                     int bd);
-
-void aom_highbd_lpf_horizontal_8_c(uint16_t* s,
-                                   int pitch,
-                                   const uint8_t* blimit,
-                                   const uint8_t* limit,
-                                   const uint8_t* thresh,
-                                   int bd);
-void aom_highbd_lpf_horizontal_8_sse2(uint16_t* s,
-                                      int pitch,
-                                      const uint8_t* blimit,
-                                      const uint8_t* limit,
-                                      const uint8_t* thresh,
-                                      int bd);
-#define aom_highbd_lpf_horizontal_8 aom_highbd_lpf_horizontal_8_sse2
-
-void aom_highbd_lpf_horizontal_8_dual_c(uint16_t* s,
-                                        int pitch,
-                                        const uint8_t* blimit0,
-                                        const uint8_t* limit0,
-                                        const uint8_t* thresh0,
-                                        const uint8_t* blimit1,
-                                        const uint8_t* limit1,
-                                        const uint8_t* thresh1,
-                                        int bd);
-void aom_highbd_lpf_horizontal_8_dual_sse2(uint16_t* s,
-                                           int pitch,
-                                           const uint8_t* blimit0,
-                                           const uint8_t* limit0,
-                                           const uint8_t* thresh0,
-                                           const uint8_t* blimit1,
-                                           const uint8_t* limit1,
-                                           const uint8_t* thresh1,
-                                           int bd);
-void aom_highbd_lpf_horizontal_8_dual_avx2(uint16_t* s,
-                                           int pitch,
-                                           const uint8_t* blimit0,
-                                           const uint8_t* limit0,
-                                           const uint8_t* thresh0,
-                                           const uint8_t* blimit1,
-                                           const uint8_t* limit1,
-                                           const uint8_t* thresh1,
-                                           int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_horizontal_8_dual)(uint16_t* s,
-                                                     int pitch,
-                                                     const uint8_t* blimit0,
-                                                     const uint8_t* limit0,
-                                                     const uint8_t* thresh0,
-                                                     const uint8_t* blimit1,
-                                                     const uint8_t* limit1,
-                                                     const uint8_t* thresh1,
-                                                     int bd);
-
-void aom_highbd_lpf_horizontal_edge_16_c(uint16_t* s,
-                                         int pitch,
-                                         const uint8_t* blimit,
-                                         const uint8_t* limit,
-                                         const uint8_t* thresh,
-                                         int bd);
-void aom_highbd_lpf_horizontal_edge_16_sse2(uint16_t* s,
-                                            int pitch,
-                                            const uint8_t* blimit,
-                                            const uint8_t* limit,
-                                            const uint8_t* thresh,
-                                            int bd);
-void aom_highbd_lpf_horizontal_edge_16_avx2(uint16_t* s,
-                                            int pitch,
-                                            const uint8_t* blimit,
-                                            const uint8_t* limit,
-                                            const uint8_t* thresh,
-                                            int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_horizontal_edge_16)(uint16_t* s,
-                                                      int pitch,
-                                                      const uint8_t* blimit,
-                                                      const uint8_t* limit,
-                                                      const uint8_t* thresh,
-                                                      int bd);
-
-void aom_highbd_lpf_horizontal_edge_8_c(uint16_t* s,
-                                        int pitch,
-                                        const uint8_t* blimit,
-                                        const uint8_t* limit,
-                                        const uint8_t* thresh,
-                                        int bd);
-void aom_highbd_lpf_horizontal_edge_8_sse2(uint16_t* s,
-                                           int pitch,
-                                           const uint8_t* blimit,
-                                           const uint8_t* limit,
-                                           const uint8_t* thresh,
-                                           int bd);
-#define aom_highbd_lpf_horizontal_edge_8 aom_highbd_lpf_horizontal_edge_8_sse2
-
-void aom_highbd_lpf_vertical_16_c(uint16_t* s,
-                                  int pitch,
-                                  const uint8_t* blimit,
-                                  const uint8_t* limit,
-                                  const uint8_t* thresh,
-                                  int bd);
-void aom_highbd_lpf_vertical_16_sse2(uint16_t* s,
-                                     int pitch,
-                                     const uint8_t* blimit,
-                                     const uint8_t* limit,
-                                     const uint8_t* thresh,
-                                     int bd);
-#define aom_highbd_lpf_vertical_16 aom_highbd_lpf_vertical_16_sse2
-
-void aom_highbd_lpf_vertical_16_dual_c(uint16_t* s,
-                                       int pitch,
-                                       const uint8_t* blimit,
-                                       const uint8_t* limit,
-                                       const uint8_t* thresh,
-                                       int bd);
-void aom_highbd_lpf_vertical_16_dual_sse2(uint16_t* s,
-                                          int pitch,
-                                          const uint8_t* blimit,
-                                          const uint8_t* limit,
-                                          const uint8_t* thresh,
-                                          int bd);
-void aom_highbd_lpf_vertical_16_dual_avx2(uint16_t* s,
-                                          int pitch,
-                                          const uint8_t* blimit,
-                                          const uint8_t* limit,
-                                          const uint8_t* thresh,
-                                          int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_vertical_16_dual)(uint16_t* s,
-                                                    int pitch,
-                                                    const uint8_t* blimit,
-                                                    const uint8_t* limit,
-                                                    const uint8_t* thresh,
-                                                    int bd);
-
-void aom_highbd_lpf_vertical_4_c(uint16_t* s,
-                                 int pitch,
-                                 const uint8_t* blimit,
-                                 const uint8_t* limit,
-                                 const uint8_t* thresh,
-                                 int bd);
-void aom_highbd_lpf_vertical_4_sse2(uint16_t* s,
-                                    int pitch,
-                                    const uint8_t* blimit,
-                                    const uint8_t* limit,
-                                    const uint8_t* thresh,
-                                    int bd);
-#define aom_highbd_lpf_vertical_4 aom_highbd_lpf_vertical_4_sse2
-
-void aom_highbd_lpf_vertical_4_dual_c(uint16_t* s,
-                                      int pitch,
-                                      const uint8_t* blimit0,
-                                      const uint8_t* limit0,
-                                      const uint8_t* thresh0,
-                                      const uint8_t* blimit1,
-                                      const uint8_t* limit1,
-                                      const uint8_t* thresh1,
-                                      int bd);
-void aom_highbd_lpf_vertical_4_dual_sse2(uint16_t* s,
-                                         int pitch,
-                                         const uint8_t* blimit0,
-                                         const uint8_t* limit0,
-                                         const uint8_t* thresh0,
-                                         const uint8_t* blimit1,
-                                         const uint8_t* limit1,
-                                         const uint8_t* thresh1,
-                                         int bd);
-void aom_highbd_lpf_vertical_4_dual_avx2(uint16_t* s,
-                                         int pitch,
-                                         const uint8_t* blimit0,
-                                         const uint8_t* limit0,
-                                         const uint8_t* thresh0,
-                                         const uint8_t* blimit1,
-                                         const uint8_t* limit1,
-                                         const uint8_t* thresh1,
-                                         int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_vertical_4_dual)(uint16_t* s,
-                                                   int pitch,
-                                                   const uint8_t* blimit0,
-                                                   const uint8_t* limit0,
-                                                   const uint8_t* thresh0,
-                                                   const uint8_t* blimit1,
-                                                   const uint8_t* limit1,
-                                                   const uint8_t* thresh1,
-                                                   int bd);
-
-void aom_highbd_lpf_vertical_8_c(uint16_t* s,
-                                 int pitch,
-                                 const uint8_t* blimit,
-                                 const uint8_t* limit,
-                                 const uint8_t* thresh,
-                                 int bd);
-void aom_highbd_lpf_vertical_8_sse2(uint16_t* s,
-                                    int pitch,
-                                    const uint8_t* blimit,
-                                    const uint8_t* limit,
-                                    const uint8_t* thresh,
-                                    int bd);
-#define aom_highbd_lpf_vertical_8 aom_highbd_lpf_vertical_8_sse2
-
-void aom_highbd_lpf_vertical_8_dual_c(uint16_t* s,
-                                      int pitch,
-                                      const uint8_t* blimit0,
-                                      const uint8_t* limit0,
-                                      const uint8_t* thresh0,
-                                      const uint8_t* blimit1,
-                                      const uint8_t* limit1,
-                                      const uint8_t* thresh1,
-                                      int bd);
-void aom_highbd_lpf_vertical_8_dual_sse2(uint16_t* s,
-                                         int pitch,
-                                         const uint8_t* blimit0,
-                                         const uint8_t* limit0,
-                                         const uint8_t* thresh0,
-                                         const uint8_t* blimit1,
-                                         const uint8_t* limit1,
-                                         const uint8_t* thresh1,
-                                         int bd);
-void aom_highbd_lpf_vertical_8_dual_avx2(uint16_t* s,
-                                         int pitch,
-                                         const uint8_t* blimit0,
-                                         const uint8_t* limit0,
-                                         const uint8_t* thresh0,
-                                         const uint8_t* blimit1,
-                                         const uint8_t* limit1,
-                                         const uint8_t* thresh1,
-                                         int bd);
-RTCD_EXTERN void (*aom_highbd_lpf_vertical_8_dual)(uint16_t* s,
-                                                   int pitch,
-                                                   const uint8_t* blimit0,
-                                                   const uint8_t* limit0,
-                                                   const uint8_t* thresh0,
-                                                   const uint8_t* blimit1,
-                                                   const uint8_t* limit1,
-                                                   const uint8_t* thresh1,
-                                                   int bd);
-
-void aom_highbd_paeth_predictor_16x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_paeth_predictor_16x16 aom_highbd_paeth_predictor_16x16_c
-
-void aom_highbd_paeth_predictor_16x32_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_paeth_predictor_16x32 aom_highbd_paeth_predictor_16x32_c
-
-void aom_highbd_paeth_predictor_16x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_paeth_predictor_16x8 aom_highbd_paeth_predictor_16x8_c
-
-void aom_highbd_paeth_predictor_2x2_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_paeth_predictor_2x2 aom_highbd_paeth_predictor_2x2_c
-
-void aom_highbd_paeth_predictor_32x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_paeth_predictor_32x16 aom_highbd_paeth_predictor_32x16_c
-
-void aom_highbd_paeth_predictor_32x32_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_paeth_predictor_32x32 aom_highbd_paeth_predictor_32x32_c
-
-void aom_highbd_paeth_predictor_4x4_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_paeth_predictor_4x4 aom_highbd_paeth_predictor_4x4_c
-
-void aom_highbd_paeth_predictor_4x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_paeth_predictor_4x8 aom_highbd_paeth_predictor_4x8_c
-
-void aom_highbd_paeth_predictor_8x16_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_paeth_predictor_8x16 aom_highbd_paeth_predictor_8x16_c
-
-void aom_highbd_paeth_predictor_8x4_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_paeth_predictor_8x4 aom_highbd_paeth_predictor_8x4_c
-
-void aom_highbd_paeth_predictor_8x8_c(uint16_t* dst,
-                                      ptrdiff_t y_stride,
-                                      const uint16_t* above,
-                                      const uint16_t* left,
-                                      int bd);
-#define aom_highbd_paeth_predictor_8x8 aom_highbd_paeth_predictor_8x8_c
-
-void aom_highbd_smooth_h_predictor_16x16_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_h_predictor_16x16 \
-  aom_highbd_smooth_h_predictor_16x16_c
-
-void aom_highbd_smooth_h_predictor_16x32_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_h_predictor_16x32 \
-  aom_highbd_smooth_h_predictor_16x32_c
-
-void aom_highbd_smooth_h_predictor_16x8_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_smooth_h_predictor_16x8 aom_highbd_smooth_h_predictor_16x8_c
-
-void aom_highbd_smooth_h_predictor_2x2_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_h_predictor_2x2 aom_highbd_smooth_h_predictor_2x2_c
-
-void aom_highbd_smooth_h_predictor_32x16_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_h_predictor_32x16 \
-  aom_highbd_smooth_h_predictor_32x16_c
-
-void aom_highbd_smooth_h_predictor_32x32_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_h_predictor_32x32 \
-  aom_highbd_smooth_h_predictor_32x32_c
-
-void aom_highbd_smooth_h_predictor_4x4_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_h_predictor_4x4 aom_highbd_smooth_h_predictor_4x4_c
-
-void aom_highbd_smooth_h_predictor_4x8_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_h_predictor_4x8 aom_highbd_smooth_h_predictor_4x8_c
-
-void aom_highbd_smooth_h_predictor_8x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_smooth_h_predictor_8x16 aom_highbd_smooth_h_predictor_8x16_c
-
-void aom_highbd_smooth_h_predictor_8x4_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_h_predictor_8x4 aom_highbd_smooth_h_predictor_8x4_c
-
-void aom_highbd_smooth_h_predictor_8x8_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_h_predictor_8x8 aom_highbd_smooth_h_predictor_8x8_c
-
-void aom_highbd_smooth_predictor_16x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_predictor_16x16 aom_highbd_smooth_predictor_16x16_c
-
-void aom_highbd_smooth_predictor_16x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_predictor_16x32 aom_highbd_smooth_predictor_16x32_c
-
-void aom_highbd_smooth_predictor_16x8_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_smooth_predictor_16x8 aom_highbd_smooth_predictor_16x8_c
-
-void aom_highbd_smooth_predictor_2x2_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_smooth_predictor_2x2 aom_highbd_smooth_predictor_2x2_c
-
-void aom_highbd_smooth_predictor_32x16_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_predictor_32x16 aom_highbd_smooth_predictor_32x16_c
-
-void aom_highbd_smooth_predictor_32x32_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_predictor_32x32 aom_highbd_smooth_predictor_32x32_c
-
-void aom_highbd_smooth_predictor_4x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_smooth_predictor_4x4 aom_highbd_smooth_predictor_4x4_c
-
-void aom_highbd_smooth_predictor_4x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_smooth_predictor_4x8 aom_highbd_smooth_predictor_4x8_c
-
-void aom_highbd_smooth_predictor_8x16_c(uint16_t* dst,
-                                        ptrdiff_t y_stride,
-                                        const uint16_t* above,
-                                        const uint16_t* left,
-                                        int bd);
-#define aom_highbd_smooth_predictor_8x16 aom_highbd_smooth_predictor_8x16_c
-
-void aom_highbd_smooth_predictor_8x4_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_smooth_predictor_8x4 aom_highbd_smooth_predictor_8x4_c
-
-void aom_highbd_smooth_predictor_8x8_c(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_smooth_predictor_8x8 aom_highbd_smooth_predictor_8x8_c
-
-void aom_highbd_smooth_v_predictor_16x16_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_v_predictor_16x16 \
-  aom_highbd_smooth_v_predictor_16x16_c
-
-void aom_highbd_smooth_v_predictor_16x32_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_v_predictor_16x32 \
-  aom_highbd_smooth_v_predictor_16x32_c
-
-void aom_highbd_smooth_v_predictor_16x8_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_smooth_v_predictor_16x8 aom_highbd_smooth_v_predictor_16x8_c
-
-void aom_highbd_smooth_v_predictor_2x2_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_v_predictor_2x2 aom_highbd_smooth_v_predictor_2x2_c
-
-void aom_highbd_smooth_v_predictor_32x16_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_v_predictor_32x16 \
-  aom_highbd_smooth_v_predictor_32x16_c
-
-void aom_highbd_smooth_v_predictor_32x32_c(uint16_t* dst,
-                                           ptrdiff_t y_stride,
-                                           const uint16_t* above,
-                                           const uint16_t* left,
-                                           int bd);
-#define aom_highbd_smooth_v_predictor_32x32 \
-  aom_highbd_smooth_v_predictor_32x32_c
-
-void aom_highbd_smooth_v_predictor_4x4_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_v_predictor_4x4 aom_highbd_smooth_v_predictor_4x4_c
-
-void aom_highbd_smooth_v_predictor_4x8_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_v_predictor_4x8 aom_highbd_smooth_v_predictor_4x8_c
-
-void aom_highbd_smooth_v_predictor_8x16_c(uint16_t* dst,
-                                          ptrdiff_t y_stride,
-                                          const uint16_t* above,
-                                          const uint16_t* left,
-                                          int bd);
-#define aom_highbd_smooth_v_predictor_8x16 aom_highbd_smooth_v_predictor_8x16_c
-
-void aom_highbd_smooth_v_predictor_8x4_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_v_predictor_8x4 aom_highbd_smooth_v_predictor_8x4_c
-
-void aom_highbd_smooth_v_predictor_8x8_c(uint16_t* dst,
-                                         ptrdiff_t y_stride,
-                                         const uint16_t* above,
-                                         const uint16_t* left,
-                                         int bd);
-#define aom_highbd_smooth_v_predictor_8x8 aom_highbd_smooth_v_predictor_8x8_c
-
-void aom_highbd_v_predictor_16x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-void aom_highbd_v_predictor_16x16_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_v_predictor_16x16 aom_highbd_v_predictor_16x16_sse2
-
-void aom_highbd_v_predictor_16x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_v_predictor_16x32 aom_highbd_v_predictor_16x32_c
-
-void aom_highbd_v_predictor_16x8_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_v_predictor_16x8 aom_highbd_v_predictor_16x8_c
-
-void aom_highbd_v_predictor_2x2_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_v_predictor_2x2 aom_highbd_v_predictor_2x2_c
-
-void aom_highbd_v_predictor_32x16_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-#define aom_highbd_v_predictor_32x16 aom_highbd_v_predictor_32x16_c
-
-void aom_highbd_v_predictor_32x32_c(uint16_t* dst,
-                                    ptrdiff_t y_stride,
-                                    const uint16_t* above,
-                                    const uint16_t* left,
-                                    int bd);
-void aom_highbd_v_predictor_32x32_sse2(uint16_t* dst,
-                                       ptrdiff_t y_stride,
-                                       const uint16_t* above,
-                                       const uint16_t* left,
-                                       int bd);
-#define aom_highbd_v_predictor_32x32 aom_highbd_v_predictor_32x32_sse2
-
-void aom_highbd_v_predictor_4x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-void aom_highbd_v_predictor_4x4_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_v_predictor_4x4 aom_highbd_v_predictor_4x4_sse2
-
-void aom_highbd_v_predictor_4x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_v_predictor_4x8 aom_highbd_v_predictor_4x8_c
-
-void aom_highbd_v_predictor_8x16_c(uint16_t* dst,
-                                   ptrdiff_t y_stride,
-                                   const uint16_t* above,
-                                   const uint16_t* left,
-                                   int bd);
-#define aom_highbd_v_predictor_8x16 aom_highbd_v_predictor_8x16_c
-
-void aom_highbd_v_predictor_8x4_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-#define aom_highbd_v_predictor_8x4 aom_highbd_v_predictor_8x4_c
-
-void aom_highbd_v_predictor_8x8_c(uint16_t* dst,
-                                  ptrdiff_t y_stride,
-                                  const uint16_t* above,
-                                  const uint16_t* left,
-                                  int bd);
-void aom_highbd_v_predictor_8x8_sse2(uint16_t* dst,
-                                     ptrdiff_t y_stride,
-                                     const uint16_t* above,
-                                     const uint16_t* left,
-                                     int bd);
-#define aom_highbd_v_predictor_8x8 aom_highbd_v_predictor_8x8_sse2
-
 void aom_idct16x16_10_add_c(const tran_low_t* input,
                             uint8_t* dest,
                             int dest_stride);
@@ -4205,57 +2181,6 @@
   aom_d63e_predictor_4x4 = aom_d63e_predictor_4x4_c;
   if (flags & HAS_SSSE3)
     aom_d63e_predictor_4x4 = aom_d63e_predictor_4x4_ssse3;
-  aom_highbd_blend_a64_hmask = aom_highbd_blend_a64_hmask_c;
-  if (flags & HAS_SSE4_1)
-    aom_highbd_blend_a64_hmask = aom_highbd_blend_a64_hmask_sse4_1;
-  aom_highbd_blend_a64_mask = aom_highbd_blend_a64_mask_c;
-  if (flags & HAS_SSE4_1)
-    aom_highbd_blend_a64_mask = aom_highbd_blend_a64_mask_sse4_1;
-  aom_highbd_blend_a64_vmask = aom_highbd_blend_a64_vmask_c;
-  if (flags & HAS_SSE4_1)
-    aom_highbd_blend_a64_vmask = aom_highbd_blend_a64_vmask_sse4_1;
-  aom_highbd_convolve8 = aom_highbd_convolve8_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve8 = aom_highbd_convolve8_avx2;
-  aom_highbd_convolve8_avg = aom_highbd_convolve8_avg_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve8_avg = aom_highbd_convolve8_avg_avx2;
-  aom_highbd_convolve8_avg_horiz = aom_highbd_convolve8_avg_horiz_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve8_avg_horiz = aom_highbd_convolve8_avg_horiz_avx2;
-  aom_highbd_convolve8_avg_vert = aom_highbd_convolve8_avg_vert_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve8_avg_vert = aom_highbd_convolve8_avg_vert_avx2;
-  aom_highbd_convolve8_horiz = aom_highbd_convolve8_horiz_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve8_horiz = aom_highbd_convolve8_horiz_avx2;
-  aom_highbd_convolve8_vert = aom_highbd_convolve8_vert_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve8_vert = aom_highbd_convolve8_vert_avx2;
-  aom_highbd_convolve_avg = aom_highbd_convolve_avg_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve_avg = aom_highbd_convolve_avg_avx2;
-  aom_highbd_convolve_copy = aom_highbd_convolve_copy_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_convolve_copy = aom_highbd_convolve_copy_avx2;
-  aom_highbd_lpf_horizontal_4_dual = aom_highbd_lpf_horizontal_4_dual_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_lpf_horizontal_4_dual = aom_highbd_lpf_horizontal_4_dual_avx2;
-  aom_highbd_lpf_horizontal_8_dual = aom_highbd_lpf_horizontal_8_dual_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_lpf_horizontal_8_dual = aom_highbd_lpf_horizontal_8_dual_avx2;
-  aom_highbd_lpf_horizontal_edge_16 = aom_highbd_lpf_horizontal_edge_16_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_lpf_horizontal_edge_16 = aom_highbd_lpf_horizontal_edge_16_avx2;
-  aom_highbd_lpf_vertical_16_dual = aom_highbd_lpf_vertical_16_dual_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_lpf_vertical_16_dual = aom_highbd_lpf_vertical_16_dual_avx2;
-  aom_highbd_lpf_vertical_4_dual = aom_highbd_lpf_vertical_4_dual_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_lpf_vertical_4_dual = aom_highbd_lpf_vertical_4_dual_avx2;
-  aom_highbd_lpf_vertical_8_dual = aom_highbd_lpf_vertical_8_dual_sse2;
-  if (flags & HAS_AVX2)
-    aom_highbd_lpf_vertical_8_dual = aom_highbd_lpf_vertical_8_dual_avx2;
   aom_idct16x16_10_add = aom_idct16x16_10_add_sse2;
   if (flags & HAS_AVX2)
     aom_idct16x16_10_add = aom_idct16x16_10_add_avx2;
diff --git a/third_party/libaom/source/config/win/x64/av1_rtcd.h b/third_party/libaom/source/config/win/x64/av1_rtcd.h
index 66b4756..68f06b3 100644
--- a/third_party/libaom/source/config/win/x64/av1_rtcd.h
+++ b/third_party/libaom/source/config/win/x64/av1_rtcd.h
@@ -323,462 +323,6 @@
                                       int x_step_q4,
                                       ConvolveParams* conv_params);
 
-void av1_highbd_convolve8_c(const uint8_t* src,
-                            ptrdiff_t src_stride,
-                            uint8_t* dst,
-                            ptrdiff_t dst_stride,
-                            const int16_t* filter_x,
-                            int x_step_q4,
-                            const int16_t* filter_y,
-                            int y_step_q4,
-                            int w,
-                            int h,
-                            int bps);
-void av1_highbd_convolve8_sse2(const uint8_t* src,
-                               ptrdiff_t src_stride,
-                               uint8_t* dst,
-                               ptrdiff_t dst_stride,
-                               const int16_t* filter_x,
-                               int x_step_q4,
-                               const int16_t* filter_y,
-                               int y_step_q4,
-                               int w,
-                               int h,
-                               int bps);
-#define av1_highbd_convolve8 av1_highbd_convolve8_sse2
-
-void av1_highbd_convolve8_avg_c(const uint8_t* src,
-                                ptrdiff_t src_stride,
-                                uint8_t* dst,
-                                ptrdiff_t dst_stride,
-                                const int16_t* filter_x,
-                                int x_step_q4,
-                                const int16_t* filter_y,
-                                int y_step_q4,
-                                int w,
-                                int h,
-                                int bps);
-void av1_highbd_convolve8_avg_sse2(const uint8_t* src,
-                                   ptrdiff_t src_stride,
-                                   uint8_t* dst,
-                                   ptrdiff_t dst_stride,
-                                   const int16_t* filter_x,
-                                   int x_step_q4,
-                                   const int16_t* filter_y,
-                                   int y_step_q4,
-                                   int w,
-                                   int h,
-                                   int bps);
-#define av1_highbd_convolve8_avg av1_highbd_convolve8_avg_sse2
-
-void av1_highbd_convolve8_avg_horiz_c(const uint8_t* src,
-                                      ptrdiff_t src_stride,
-                                      uint8_t* dst,
-                                      ptrdiff_t dst_stride,
-                                      const int16_t* filter_x,
-                                      int x_step_q4,
-                                      const int16_t* filter_y,
-                                      int y_step_q4,
-                                      int w,
-                                      int h,
-                                      int bps);
-void av1_highbd_convolve8_avg_horiz_sse2(const uint8_t* src,
-                                         ptrdiff_t src_stride,
-                                         uint8_t* dst,
-                                         ptrdiff_t dst_stride,
-                                         const int16_t* filter_x,
-                                         int x_step_q4,
-                                         const int16_t* filter_y,
-                                         int y_step_q4,
-                                         int w,
-                                         int h,
-                                         int bps);
-#define av1_highbd_convolve8_avg_horiz av1_highbd_convolve8_avg_horiz_sse2
-
-void av1_highbd_convolve8_avg_vert_c(const uint8_t* src,
-                                     ptrdiff_t src_stride,
-                                     uint8_t* dst,
-                                     ptrdiff_t dst_stride,
-                                     const int16_t* filter_x,
-                                     int x_step_q4,
-                                     const int16_t* filter_y,
-                                     int y_step_q4,
-                                     int w,
-                                     int h,
-                                     int bps);
-void av1_highbd_convolve8_avg_vert_sse2(const uint8_t* src,
-                                        ptrdiff_t src_stride,
-                                        uint8_t* dst,
-                                        ptrdiff_t dst_stride,
-                                        const int16_t* filter_x,
-                                        int x_step_q4,
-                                        const int16_t* filter_y,
-                                        int y_step_q4,
-                                        int w,
-                                        int h,
-                                        int bps);
-#define av1_highbd_convolve8_avg_vert av1_highbd_convolve8_avg_vert_sse2
-
-void av1_highbd_convolve8_horiz_c(const uint8_t* src,
-                                  ptrdiff_t src_stride,
-                                  uint8_t* dst,
-                                  ptrdiff_t dst_stride,
-                                  const int16_t* filter_x,
-                                  int x_step_q4,
-                                  const int16_t* filter_y,
-                                  int y_step_q4,
-                                  int w,
-                                  int h,
-                                  int bps);
-void av1_highbd_convolve8_horiz_sse2(const uint8_t* src,
-                                     ptrdiff_t src_stride,
-                                     uint8_t* dst,
-                                     ptrdiff_t dst_stride,
-                                     const int16_t* filter_x,
-                                     int x_step_q4,
-                                     const int16_t* filter_y,
-                                     int y_step_q4,
-                                     int w,
-                                     int h,
-                                     int bps);
-#define av1_highbd_convolve8_horiz av1_highbd_convolve8_horiz_sse2
-
-void av1_highbd_convolve8_vert_c(const uint8_t* src,
-                                 ptrdiff_t src_stride,
-                                 uint8_t* dst,
-                                 ptrdiff_t dst_stride,
-                                 const int16_t* filter_x,
-                                 int x_step_q4,
-                                 const int16_t* filter_y,
-                                 int y_step_q4,
-                                 int w,
-                                 int h,
-                                 int bps);
-void av1_highbd_convolve8_vert_sse2(const uint8_t* src,
-                                    ptrdiff_t src_stride,
-                                    uint8_t* dst,
-                                    ptrdiff_t dst_stride,
-                                    const int16_t* filter_x,
-                                    int x_step_q4,
-                                    const int16_t* filter_y,
-                                    int y_step_q4,
-                                    int w,
-                                    int h,
-                                    int bps);
-#define av1_highbd_convolve8_vert av1_highbd_convolve8_vert_sse2
-
-void av1_highbd_convolve_2d_c(const uint16_t* src,
-                              int src_stride,
-                              CONV_BUF_TYPE* dst,
-                              int dst_stride,
-                              int w,
-                              int h,
-                              InterpFilterParams* filter_params_x,
-                              InterpFilterParams* filter_params_y,
-                              const int subpel_x_q4,
-                              const int subpel_y_q4,
-                              ConvolveParams* conv_params,
-                              int bd);
-void av1_highbd_convolve_2d_ssse3(const uint16_t* src,
-                                  int src_stride,
-                                  CONV_BUF_TYPE* dst,
-                                  int dst_stride,
-                                  int w,
-                                  int h,
-                                  InterpFilterParams* filter_params_x,
-                                  InterpFilterParams* filter_params_y,
-                                  const int subpel_x_q4,
-                                  const int subpel_y_q4,
-                                  ConvolveParams* conv_params,
-                                  int bd);
-RTCD_EXTERN void (*av1_highbd_convolve_2d)(const uint16_t* src,
-                                           int src_stride,
-                                           CONV_BUF_TYPE* dst,
-                                           int dst_stride,
-                                           int w,
-                                           int h,
-                                           InterpFilterParams* filter_params_x,
-                                           InterpFilterParams* filter_params_y,
-                                           const int subpel_x_q4,
-                                           const int subpel_y_q4,
-                                           ConvolveParams* conv_params,
-                                           int bd);
-
-void av1_highbd_convolve_2d_scale_c(const uint16_t* src,
-                                    int src_stride,
-                                    CONV_BUF_TYPE* dst,
-                                    int dst_stride,
-                                    int w,
-                                    int h,
-                                    InterpFilterParams* filter_params_x,
-                                    InterpFilterParams* filter_params_y,
-                                    const int subpel_x_q4,
-                                    const int x_step_qn,
-                                    const int subpel_y_q4,
-                                    const int y_step_qn,
-                                    ConvolveParams* conv_params,
-                                    int bd);
-#define av1_highbd_convolve_2d_scale av1_highbd_convolve_2d_scale_c
-
-void av1_highbd_convolve_avg_c(const uint8_t* src,
-                               ptrdiff_t src_stride,
-                               uint8_t* dst,
-                               ptrdiff_t dst_stride,
-                               const int16_t* filter_x,
-                               int x_step_q4,
-                               const int16_t* filter_y,
-                               int y_step_q4,
-                               int w,
-                               int h,
-                               int bps);
-#define av1_highbd_convolve_avg av1_highbd_convolve_avg_c
-
-void av1_highbd_convolve_copy_c(const uint8_t* src,
-                                ptrdiff_t src_stride,
-                                uint8_t* dst,
-                                ptrdiff_t dst_stride,
-                                const int16_t* filter_x,
-                                int x_step_q4,
-                                const int16_t* filter_y,
-                                int y_step_q4,
-                                int w,
-                                int h,
-                                int bps);
-#define av1_highbd_convolve_copy av1_highbd_convolve_copy_c
-
-void av1_highbd_convolve_horiz_c(const uint16_t* src,
-                                 int src_stride,
-                                 uint16_t* dst,
-                                 int dst_stride,
-                                 int w,
-                                 int h,
-                                 const InterpFilterParams fp,
-                                 const int subpel_x_q4,
-                                 int x_step_q4,
-                                 int avg,
-                                 int bd);
-void av1_highbd_convolve_horiz_sse4_1(const uint16_t* src,
-                                      int src_stride,
-                                      uint16_t* dst,
-                                      int dst_stride,
-                                      int w,
-                                      int h,
-                                      const InterpFilterParams fp,
-                                      const int subpel_x_q4,
-                                      int x_step_q4,
-                                      int avg,
-                                      int bd);
-RTCD_EXTERN void (*av1_highbd_convolve_horiz)(const uint16_t* src,
-                                              int src_stride,
-                                              uint16_t* dst,
-                                              int dst_stride,
-                                              int w,
-                                              int h,
-                                              const InterpFilterParams fp,
-                                              const int subpel_x_q4,
-                                              int x_step_q4,
-                                              int avg,
-                                              int bd);
-
-void av1_highbd_convolve_init_c(void);
-void av1_highbd_convolve_init_sse4_1(void);
-RTCD_EXTERN void (*av1_highbd_convolve_init)(void);
-
-void av1_highbd_convolve_rounding_c(const int32_t* src,
-                                    int src_stride,
-                                    uint8_t* dst,
-                                    int dst_stride,
-                                    int w,
-                                    int h,
-                                    int bits,
-                                    int bd);
-void av1_highbd_convolve_rounding_avx2(const int32_t* src,
-                                       int src_stride,
-                                       uint8_t* dst,
-                                       int dst_stride,
-                                       int w,
-                                       int h,
-                                       int bits,
-                                       int bd);
-RTCD_EXTERN void (*av1_highbd_convolve_rounding)(const int32_t* src,
-                                                 int src_stride,
-                                                 uint8_t* dst,
-                                                 int dst_stride,
-                                                 int w,
-                                                 int h,
-                                                 int bits,
-                                                 int bd);
-
-void av1_highbd_convolve_vert_c(const uint16_t* src,
-                                int src_stride,
-                                uint16_t* dst,
-                                int dst_stride,
-                                int w,
-                                int h,
-                                const InterpFilterParams fp,
-                                const int subpel_x_q4,
-                                int x_step_q4,
-                                int avg,
-                                int bd);
-void av1_highbd_convolve_vert_sse4_1(const uint16_t* src,
-                                     int src_stride,
-                                     uint16_t* dst,
-                                     int dst_stride,
-                                     int w,
-                                     int h,
-                                     const InterpFilterParams fp,
-                                     const int subpel_x_q4,
-                                     int x_step_q4,
-                                     int avg,
-                                     int bd);
-RTCD_EXTERN void (*av1_highbd_convolve_vert)(const uint16_t* src,
-                                             int src_stride,
-                                             uint16_t* dst,
-                                             int dst_stride,
-                                             int w,
-                                             int h,
-                                             const InterpFilterParams fp,
-                                             const int subpel_x_q4,
-                                             int x_step_q4,
-                                             int avg,
-                                             int bd);
-
-void av1_highbd_iht16x16_256_add_c(const tran_low_t* input,
-                                   uint8_t* output,
-                                   int pitch,
-                                   const struct txfm_param* param);
-#define av1_highbd_iht16x16_256_add av1_highbd_iht16x16_256_add_c
-
-void av1_highbd_iht16x32_512_add_c(const tran_low_t* input,
-                                   uint8_t* dest,
-                                   int dest_stride,
-                                   const struct txfm_param* param);
-#define av1_highbd_iht16x32_512_add av1_highbd_iht16x32_512_add_c
-
-void av1_highbd_iht16x4_64_add_c(const tran_low_t* input,
-                                 uint8_t* dest,
-                                 int dest_stride,
-                                 const struct txfm_param* param);
-#define av1_highbd_iht16x4_64_add av1_highbd_iht16x4_64_add_c
-
-void av1_highbd_iht16x8_128_add_c(const tran_low_t* input,
-                                  uint8_t* dest,
-                                  int dest_stride,
-                                  const struct txfm_param* param);
-#define av1_highbd_iht16x8_128_add av1_highbd_iht16x8_128_add_c
-
-void av1_highbd_iht32x16_512_add_c(const tran_low_t* input,
-                                   uint8_t* dest,
-                                   int dest_stride,
-                                   const struct txfm_param* param);
-#define av1_highbd_iht32x16_512_add av1_highbd_iht32x16_512_add_c
-
-void av1_highbd_iht32x8_256_add_c(const tran_low_t* input,
-                                  uint8_t* dest,
-                                  int dest_stride,
-                                  const struct txfm_param* param);
-#define av1_highbd_iht32x8_256_add av1_highbd_iht32x8_256_add_c
-
-void av1_highbd_iht4x16_64_add_c(const tran_low_t* input,
-                                 uint8_t* dest,
-                                 int dest_stride,
-                                 const struct txfm_param* param);
-#define av1_highbd_iht4x16_64_add av1_highbd_iht4x16_64_add_c
-
-void av1_highbd_iht4x4_16_add_c(const tran_low_t* input,
-                                uint8_t* dest,
-                                int dest_stride,
-                                const struct txfm_param* param);
-#define av1_highbd_iht4x4_16_add av1_highbd_iht4x4_16_add_c
-
-void av1_highbd_iht4x8_32_add_c(const tran_low_t* input,
-                                uint8_t* dest,
-                                int dest_stride,
-                                const struct txfm_param* param);
-#define av1_highbd_iht4x8_32_add av1_highbd_iht4x8_32_add_c
-
-void av1_highbd_iht8x16_128_add_c(const tran_low_t* input,
-                                  uint8_t* dest,
-                                  int dest_stride,
-                                  const struct txfm_param* param);
-#define av1_highbd_iht8x16_128_add av1_highbd_iht8x16_128_add_c
-
-void av1_highbd_iht8x32_256_add_c(const tran_low_t* input,
-                                  uint8_t* dest,
-                                  int dest_stride,
-                                  const struct txfm_param* param);
-#define av1_highbd_iht8x32_256_add av1_highbd_iht8x32_256_add_c
-
-void av1_highbd_iht8x4_32_add_c(const tran_low_t* input,
-                                uint8_t* dest,
-                                int dest_stride,
-                                const struct txfm_param* param);
-#define av1_highbd_iht8x4_32_add av1_highbd_iht8x4_32_add_c
-
-void av1_highbd_iht8x8_64_add_c(const tran_low_t* input,
-                                uint8_t* dest,
-                                int dest_stride,
-                                const struct txfm_param* param);
-#define av1_highbd_iht8x8_64_add av1_highbd_iht8x8_64_add_c
-
-void av1_highbd_warp_affine_c(const int32_t* mat,
-                              const uint16_t* ref,
-                              int width,
-                              int height,
-                              int stride,
-                              uint16_t* pred,
-                              int p_col,
-                              int p_row,
-                              int p_width,
-                              int p_height,
-                              int p_stride,
-                              int subsampling_x,
-                              int subsampling_y,
-                              int bd,
-                              ConvolveParams* conv_params,
-                              int16_t alpha,
-                              int16_t beta,
-                              int16_t gamma,
-                              int16_t delta);
-void av1_highbd_warp_affine_ssse3(const int32_t* mat,
-                                  const uint16_t* ref,
-                                  int width,
-                                  int height,
-                                  int stride,
-                                  uint16_t* pred,
-                                  int p_col,
-                                  int p_row,
-                                  int p_width,
-                                  int p_height,
-                                  int p_stride,
-                                  int subsampling_x,
-                                  int subsampling_y,
-                                  int bd,
-                                  ConvolveParams* conv_params,
-                                  int16_t alpha,
-                                  int16_t beta,
-                                  int16_t gamma,
-                                  int16_t delta);
-RTCD_EXTERN void (*av1_highbd_warp_affine)(const int32_t* mat,
-                                           const uint16_t* ref,
-                                           int width,
-                                           int height,
-                                           int stride,
-                                           uint16_t* pred,
-                                           int p_col,
-                                           int p_row,
-                                           int p_width,
-                                           int p_height,
-                                           int p_stride,
-                                           int subsampling_x,
-                                           int subsampling_y,
-                                           int bd,
-                                           ConvolveParams* conv_params,
-                                           int16_t alpha,
-                                           int16_t beta,
-                                           int16_t gamma,
-                                           int16_t delta);
-
 void av1_iht16x16_256_add_c(const tran_low_t* input,
                             uint8_t* output,
                             int pitch,
@@ -1363,24 +907,6 @@
   av1_convolve_vert = av1_convolve_vert_c;
   if (flags & HAS_SSSE3)
     av1_convolve_vert = av1_convolve_vert_ssse3;
-  av1_highbd_convolve_2d = av1_highbd_convolve_2d_c;
-  if (flags & HAS_SSSE3)
-    av1_highbd_convolve_2d = av1_highbd_convolve_2d_ssse3;
-  av1_highbd_convolve_horiz = av1_highbd_convolve_horiz_c;
-  if (flags & HAS_SSE4_1)
-    av1_highbd_convolve_horiz = av1_highbd_convolve_horiz_sse4_1;
-  av1_highbd_convolve_init = av1_highbd_convolve_init_c;
-  if (flags & HAS_SSE4_1)
-    av1_highbd_convolve_init = av1_highbd_convolve_init_sse4_1;
-  av1_highbd_convolve_rounding = av1_highbd_convolve_rounding_c;
-  if (flags & HAS_AVX2)
-    av1_highbd_convolve_rounding = av1_highbd_convolve_rounding_avx2;
-  av1_highbd_convolve_vert = av1_highbd_convolve_vert_c;
-  if (flags & HAS_SSE4_1)
-    av1_highbd_convolve_vert = av1_highbd_convolve_vert_sse4_1;
-  av1_highbd_warp_affine = av1_highbd_warp_affine_c;
-  if (flags & HAS_SSSE3)
-    av1_highbd_warp_affine = av1_highbd_warp_affine_ssse3;
   av1_iht16x16_256_add = av1_iht16x16_256_add_sse2;
   if (flags & HAS_AVX2)
     av1_iht16x16_256_add = av1_iht16x16_256_add_avx2;
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml
index c03be4a5..793e1c8e 100644
--- a/tools/metrics/histograms/enums.xml
+++ b/tools/metrics/histograms/enums.xml
@@ -24684,6 +24684,8 @@
   <int value="-2134333982" label="ShowArcFilesApp:enabled"/>
   <int value="-2134244069" label="HttpFormWarning:enabled"/>
   <int value="-2132591642" label="enable-input-view"/>
+  <int value="-2124839789"
+      label="OmniboxUIExperimentHideSteadyStateUrlSchemeAndSubdomains:enabled"/>
   <int value="-2122048316"
       label="DisplayPersistenceToggleInPermissionPrompts:enabled"/>
   <int value="-2119827860" label="ash-disable-maximize-mode-window-backdrop"/>
@@ -25030,6 +25032,8 @@
   <int value="-1294050129" label="ContentFullscreen:disabled"/>
   <int value="-1289678848" label="SystemDownloadManager:enabled"/>
   <int value="-1288130734" label="OpenVR:disabled"/>
+  <int value="-1287511172"
+      label="OmniboxUIExperimentHideSteadyStateUrlSchemeAndSubdomains:disabled"/>
   <int value="-1285021473" label="save-page-as-mhtml"/>
   <int value="-1284637134" label="pull-to-refresh"/>
   <int value="-1276912933" label="enable-quick-unlock-pin"/>
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml
index 6024588..113722d 100644
--- a/tools/metrics/histograms/histograms.xml
+++ b/tools/metrics/histograms/histograms.xml
@@ -54610,6 +54610,9 @@
 </histogram>
 
 <histogram name="OfflinePages.DeletePage.AccessCount">
+  <obsolete>
+    Deprecated as of 12/2017. Replaced by OfflinePages.AccessCount.
+  </obsolete>
   <owner>jianli@chromium.org</owner>
   <summary>
     Number of accesses to the offline page since its creation. This is reported
diff --git a/ui/accessibility/platform/ax_platform_node_win.cc b/ui/accessibility/platform/ax_platform_node_win.cc
index 85a012a8..f13a6cc 100644
--- a/ui/accessibility/platform/ax_platform_node_win.cc
+++ b/ui/accessibility/platform/ax_platform_node_win.cc
@@ -367,6 +367,11 @@
     g_unique_id_map.Get().erase(unique_id_);
 }
 
+// static
+size_t AXPlatformNodeWin::GetInstanceCountForTesting() {
+  return g_unique_id_map.Get().size();
+}
+
 const base::char16 AXPlatformNodeWin::kEmbeddedCharacter = L'\xfffc';
 
 void AXPlatformNodeWin::CalculateRelationships() {
diff --git a/ui/accessibility/platform/ax_platform_node_win.h b/ui/accessibility/platform/ax_platform_node_win.h
index 9bfdd15..a5af545 100644
--- a/ui/accessibility/platform/ax_platform_node_win.h
+++ b/ui/accessibility/platform/ax_platform_node_win.h
@@ -292,6 +292,9 @@
 
   ~AXPlatformNodeWin() override;
 
+  // Return the number of instances of AXPlatformNodeWin, for leak testing.
+  static size_t GetInstanceCountForTesting();
+
   // Represents a non-static text node in IAccessibleHypertext. This character
   // is embedded in the response to IAccessibleText::get_text, indicating the
   // position where a non-static text child object appears.
diff --git a/ui/accessibility/platform/ax_platform_node_win_unittest.cc b/ui/accessibility/platform/ax_platform_node_win_unittest.cc
index eef013f..bbaf4a4 100644
--- a/ui/accessibility/platform/ax_platform_node_win_unittest.cc
+++ b/ui/accessibility/platform/ax_platform_node_win_unittest.cc
@@ -44,6 +44,12 @@
     win::CreateATLModuleIfNeeded();
   }
 
+  void TearDown() override {
+    // Destroy the tree and make sure we're not leaking any objects.
+    tree_.reset(nullptr);
+    ASSERT_EQ(0U, AXPlatformNodeWin::GetInstanceCountForTesting());
+  }
+
  protected:
   void BuildRelationships(ComPtr<IAccessible2> accessible) {
     CHECK(accessible);
diff --git a/ui/events/blink/input_handler_proxy.cc b/ui/events/blink/input_handler_proxy.cc
index 19b91b38..74f8a70 100644
--- a/ui/events/blink/input_handler_proxy.cc
+++ b/ui/events/blink/input_handler_proxy.cc
@@ -660,7 +660,6 @@
     CancelCurrentFling();
 
 #ifndef NDEBUG
-  DCHECK(!expect_scroll_update_end_);
   expect_scroll_update_end_ = true;
 #endif
   cc::ScrollState scroll_state = CreateScrollStateForGesture(gesture_event);