Commit a0a73de162 for aom
commit a0a73de1624a62da00687826ad8744e37b746835
Author: Jerome Jiang <jianj@google.com>
Date: Thu Dec 3 11:10:17 2026 -0500
Use "hwy/..." paths for Highway includes
Allow embedders like Chromium to supply their own Highway headers
instead of mixing vendored headers with a shared Highway library:
- Change #include "third_party/highway/hwy/..." to "hwy/..." in
aom_dsp/ and av1/ (14 headers).
- Drop the redundant detect_targets.h include in
convolve_2d_sr_hwy_avx512.cc (matching sibling *_hwy*.cc files).
- Sort the Highway include in av1_fwd_txfm2d_hwy.h and add a
missing trailing newline in aom_dsp/convolve_hwy.h.
- Add third_party/highway to include_directories() in CMakeLists.txt
when CONFIG_HIGHWAY is enabled.
- Mark third_party/highway as "Shipped in Chromium: no" in
README.libaom.
Based on a patch from Wan-Teh Chang <wtc@google.com>.
Change-Id: I32605ce6afc947a929fbf0b2e04cc7d93554463b
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 26b4dd6f70..fc5061f7f7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -302,6 +302,7 @@ if(CONFIG_HIGHWAY)
"${AOM_ROOT}/third_party/highway/hwy/contrib/image/image.h"
"${AOM_ROOT}/third_party/highway/hwy/contrib/math/math-inl.h")
add_definitions(-DHWY_HEADER_ONLY -DHWY_DISABLE_PCLMUL_AES)
+ include_directories("${AOM_ROOT}/third_party/highway")
add_library(aom_hwy OBJECT ${AOM_HIGHWAY_SOURCES})
set_target_properties(aom_hwy PROPERTIES LINKER_LANGUAGE CXX)
set(AOM_LIB_TARGETS ${AOM_LIB_TARGETS} aom_hwy)
diff --git a/aom_dsp/avg_hwy.h b/aom_dsp/avg_hwy.h
index 19293f9d94..4b7821ed93 100644
--- a/aom_dsp/avg_hwy.h
+++ b/aom_dsp/avg_hwy.h
@@ -21,7 +21,7 @@
#include "config/aom_config.h"
#include "config/aom_dsp_rtcd.h"
#include "aom/aom_integer.h"
-#include "third_party/highway/hwy/highway.h"
+#include "hwy/highway.h"
HWY_BEFORE_NAMESPACE();
diff --git a/aom_dsp/convolve_hwy.h b/aom_dsp/convolve_hwy.h
index a93c65b186..e1c4192650 100644
--- a/aom_dsp/convolve_hwy.h
+++ b/aom_dsp/convolve_hwy.h
@@ -17,7 +17,7 @@
#include <cassert>
#include "aom_dsp/arm/aom_filter.h"
-#include "third_party/highway/hwy/highway.h"
+#include "hwy/highway.h"
#if HAVE_SSSE3
extern "C" void aom_convolve8_horiz_ssse3(
@@ -1482,4 +1482,4 @@ HWY_MAYBE_UNUSED void Convolve8Horiz(const uint8_t *src, ptrdiff_t src_stride,
HWY_AFTER_NAMESPACE();
-#endif // AOM_AOM_DSP_CONVOLVE_HWY_H_
\ No newline at end of file
+#endif // AOM_AOM_DSP_CONVOLVE_HWY_H_
diff --git a/aom_dsp/reduce_sum_hwy.h b/aom_dsp/reduce_sum_hwy.h
index 9f4c00545c..4d27298794 100644
--- a/aom_dsp/reduce_sum_hwy.h
+++ b/aom_dsp/reduce_sum_hwy.h
@@ -12,7 +12,7 @@
#define AOM_AOM_DSP_REDUCE_SUM_HWY_H_
#include <type_traits>
-#include "third_party/highway/hwy/highway.h"
+#include "hwy/highway.h"
HWY_BEFORE_NAMESPACE();
diff --git a/aom_dsp/sad_hwy.h b/aom_dsp/sad_hwy.h
index 23bb04a461..d7ef153880 100644
--- a/aom_dsp/sad_hwy.h
+++ b/aom_dsp/sad_hwy.h
@@ -18,7 +18,7 @@
#include "aom_dsp/blend.h"
#include "aom_dsp/reduce_sum_hwy.h"
-#include "third_party/highway/hwy/highway.h"
+#include "hwy/highway.h"
HWY_BEFORE_NAMESPACE();
diff --git a/aom_dsp/subtract_hwy.h b/aom_dsp/subtract_hwy.h
index 77995ba7fe..8f7dff357d 100644
--- a/aom_dsp/subtract_hwy.h
+++ b/aom_dsp/subtract_hwy.h
@@ -18,7 +18,7 @@
#include "config/aom_config.h"
#include "config/aom_dsp_rtcd.h"
-#include "third_party/highway/hwy/highway.h"
+#include "hwy/highway.h"
HWY_BEFORE_NAMESPACE();
diff --git a/aom_dsp/variance_hwy.h b/aom_dsp/variance_hwy.h
index 52a9b9a4f4..d988a38d90 100644
--- a/aom_dsp/variance_hwy.h
+++ b/aom_dsp/variance_hwy.h
@@ -22,7 +22,7 @@
#include "aom_dsp/aom_dsp_common.h"
#include "aom_dsp/blend.h"
#include "aom_dsp/reduce_sum_hwy.h"
-#include "third_party/highway/hwy/highway.h"
+#include "hwy/highway.h"
HWY_BEFORE_NAMESPACE();
diff --git a/av1/common/convolve_2d_sr_hwy.h b/av1/common/convolve_2d_sr_hwy.h
index 91bfa0789b..ee061fa962 100644
--- a/av1/common/convolve_2d_sr_hwy.h
+++ b/av1/common/convolve_2d_sr_hwy.h
@@ -16,7 +16,7 @@
#include "av1/common/filter.h"
#include "config/aom_config.h"
#include "config/av1_rtcd.h"
-#include "third_party/highway/hwy/highway.h"
+#include "hwy/highway.h"
HWY_BEFORE_NAMESPACE();
diff --git a/av1/common/selfguided_hwy.h b/av1/common/selfguided_hwy.h
index 22c3951d1d..2e7c4df32c 100644
--- a/av1/common/selfguided_hwy.h
+++ b/av1/common/selfguided_hwy.h
@@ -15,7 +15,7 @@
#include "av1/common/restoration.h"
#include "config/aom_config.h"
#include "config/av1_rtcd.h"
-#include "third_party/highway/hwy/highway.h"
+#include "hwy/highway.h"
HWY_BEFORE_NAMESPACE();
diff --git a/av1/common/warp_plane_hwy.h b/av1/common/warp_plane_hwy.h
index ce2afd46b9..9882af2e03 100644
--- a/av1/common/warp_plane_hwy.h
+++ b/av1/common/warp_plane_hwy.h
@@ -14,7 +14,7 @@
#include "av1/common/warped_motion.h"
#include "config/av1_rtcd.h"
-#include "third_party/highway/hwy/highway.h"
+#include "hwy/highway.h"
HWY_BEFORE_NAMESPACE();
diff --git a/av1/common/x86/convolve_2d_sr_hwy_avx512.cc b/av1/common/x86/convolve_2d_sr_hwy_avx512.cc
index eb60303d83..2553ba4534 100644
--- a/av1/common/x86/convolve_2d_sr_hwy_avx512.cc
+++ b/av1/common/x86/convolve_2d_sr_hwy_avx512.cc
@@ -12,8 +12,6 @@
#define HWY_BASELINE_TARGETS HWY_AVX3_DL
#define HWY_BROKEN_32BIT 0
-#include "third_party/highway/hwy/detect_targets.h"
-
#include "av1/common/convolve_2d_sr_hwy.h"
MAKE_CONVOLVE_2D_SR(avx512)
diff --git a/av1/encoder/av1_fwd_txfm2d_hwy.h b/av1/encoder/av1_fwd_txfm2d_hwy.h
index cbf46a7ca5..3aa3e8e599 100644
--- a/av1/encoder/av1_fwd_txfm2d_hwy.h
+++ b/av1/encoder/av1_fwd_txfm2d_hwy.h
@@ -18,12 +18,12 @@
#include "config/aom_config.h"
#include "config/av1_rtcd.h"
-#include "third_party/highway/hwy/highway.h"
#include "aom_dsp/txfm_common.h"
#include "av1/common/av1_txfm.h"
#include "av1/common/enums.h"
#include "av1/encoder/av1_fwd_txfm1d.h"
#include "av1/encoder/av1_fwd_txfm1d_cfg.h"
+#include "hwy/highway.h"
#define FOR_EACH_TXFM2D(X, suffix) \
X(4, 4, suffix) \
diff --git a/av1/encoder/av1_quantize_hwy.h b/av1/encoder/av1_quantize_hwy.h
index b987a4ee54..374e436756 100644
--- a/av1/encoder/av1_quantize_hwy.h
+++ b/av1/encoder/av1_quantize_hwy.h
@@ -22,7 +22,7 @@
#include "aom/aom_integer.h"
#include "aom_dsp/reduce_sum_hwy.h"
-#include "third_party/highway/hwy/highway.h"
+#include "hwy/highway.h"
HWY_BEFORE_NAMESPACE();
diff --git a/av1/encoder/encodetxb_hwy.h b/av1/encoder/encodetxb_hwy.h
index c7e412c724..205829f980 100644
--- a/av1/encoder/encodetxb_hwy.h
+++ b/av1/encoder/encodetxb_hwy.h
@@ -23,7 +23,7 @@
#include "aom/aom_integer.h"
#include "av1/common/av1_common_int.h"
#include "av1/common/txb_common.h"
-#include "third_party/highway/hwy/highway.h"
+#include "hwy/highway.h"
HWY_BEFORE_NAMESPACE();
diff --git a/av1/encoder/temporal_filter_hwy.h b/av1/encoder/temporal_filter_hwy.h
index cdf514c9f2..7e1d5c6c6b 100644
--- a/av1/encoder/temporal_filter_hwy.h
+++ b/av1/encoder/temporal_filter_hwy.h
@@ -24,7 +24,7 @@
#include "aom_ports/mem.h"
#include "av1/encoder/encoder.h"
#include "av1/encoder/temporal_filter.h"
-#include "third_party/highway/hwy/highway.h"
+#include "hwy/highway.h"
HWY_BEFORE_NAMESPACE();
diff --git a/av1/encoder/wedge_utils_hwy.h b/av1/encoder/wedge_utils_hwy.h
index 204562bd22..386ffde994 100644
--- a/av1/encoder/wedge_utils_hwy.h
+++ b/av1/encoder/wedge_utils_hwy.h
@@ -21,7 +21,7 @@
#include "aom/aom_integer.h"
#include "aom_dsp/aom_dsp_common.h"
#include "av1/common/reconinter.h"
-#include "third_party/highway/hwy/highway.h"
+#include "hwy/highway.h"
HWY_BEFORE_NAMESPACE();
diff --git a/third_party/highway/README.libaom b/third_party/highway/README.libaom
index 828a7c1c33..b19ee19117 100644
--- a/third_party/highway/README.libaom
+++ b/third_party/highway/README.libaom
@@ -6,7 +6,7 @@ Update Mechanism: Manual
Revision: adf91c746e70c58389e5793e658ba4d04051b138
License: BSD-3-Clause
License File: LICENSE-BSD3
-Shipped in Chromium: yes
+Shipped in Chromium: no
Security Critical: yes
Description: