<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/1976ac72981beeb2fb5cceeb7fa67047e86cce95">https://github.com/macports/macports-ports/commit/1976ac72981beeb2fb5cceeb7fa67047e86cce95</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 1976ac72981beeb2fb5cceeb7fa67047e86cce95
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Wed Aug 17 22:35:34 2022 +1000
<span style='display:block; white-space:pre;color:#404040;'> New port: libjxl
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Closes: https://trac.macports.org/ticket/65677
</span>---
graphics/libjxl/Portfile | 86 +++++++
graphics/libjxl/files/StoreFence.patch | 38 +++
graphics/libjxl/files/exclude-libs.patch | 59 +++++
graphics/libjxl/files/hwy-deprecated.patch | 362 ++++++++++++++++++++++++++++
graphics/libjxl/files/hwy-deprecated2.patch | 108 +++++++++
5 files changed, 653 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/libjxl/Portfile b/graphics/libjxl/Portfile
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..47717fd18cd
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/libjxl/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,86 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortSystem 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup github 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup cmake 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+github.setup libjxl libjxl 0.6.1 v
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+categories graphics
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers {jmr @jmroot}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+license BSD
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+description JPEG XL reference implementation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+long_description A reference implementation of JPEG XL.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+github.tarball_from archive
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# No option to use external lodepng or skcms
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set lodepng_commit 48e5364ef48ec2408f44c727657ac1b6703185f8
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set skcms_commit 64374756e03700d649f897dbd98c95e78c30c7da
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+master_sites-append https://github.com/lvandeve/lodepng/archive/${lodepng_commit}:lodepng \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ https://skia.googlesource.com/skcms/+archive/${skcms_commit}.tar.gz?dummy=:skcms
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+distfiles-append lodepng-${lodepng_commit}${extract.suffix}:lodepng \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ skcms-${skcms_commit}${extract.suffix}:skcms
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums ${name}-${version}${extract.suffix} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ rmd160 a99a40350b85a29e4e9f5d16ec45da2913187fd3 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 ccbd5a729d730152303be399f033b905e608309d5802d77a61a95faa092592c5 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lodepng-${lodepng_commit}${extract.suffix} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ rmd160 a9fef0a45ec23285f2b5475ec3612376e47f2779 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 c47c48c77a205f1af484b7b5a847290af65de3ea6f15817aa27c5ec7cc5208fd \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ skcms-${skcms_commit}${extract.suffix} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ rmd160 08c00c81c5e3b1422a879a9422ac2a9a0115855e \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 281f98e57b62e28e2dfa04b5d3e88efdd10e7bff000621ea620abea72cfcba0c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_build port:asciidoc \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:pkgconfig \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:python310
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_lib port:brotli \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:highway \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ path:include/turbojpeg.h:libjpeg-turbo \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:libpng \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:openexr
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# giflib5 currently has install_name issues
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# https://trac.macports.org/ticket/65679
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# port:giflib5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+extract.only ${name}-${version}${extract.suffix}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+post-extract {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system -W ${worksrcpath}/third_party/lodepng \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "tar --strip-components=1 -xzf ${distpath}/lodepng-${lodepng_commit}${extract.suffix}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system -W ${worksrcpath}/third_party/skcms \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "tar -xzf ${distpath}/skcms-${skcms_commit}${extract.suffix}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles StoreFence.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ hwy-deprecated.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ hwy-deprecated2.patch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ exclude-libs.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patch.pre_args -p1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+cmake.out_of_source yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+configure.args-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DBUILD_TESTING=NO \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DAVIF_FOUND=NO \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DDOXYGEN_FOUND=NO \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DWebP_FOUND=NO \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DJPEGXL_ENABLE_JNI=NO \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DJPEGXL_ENABLE_OPENEXR=YES \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DJPEGXL_ENABLE_SJPEG=NO \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DJPEGXL_ENABLE_SKCMS=YES \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DJPEGXL_FORCE_SYSTEM_BROTLI=YES \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DJPEGXL_FORCE_SYSTEM_HWY=YES \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DPython3_EXECUTABLE:FILEPATH=${prefix}/bin/python3.10
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -DGIF_INCLUDE_DIR:FILEPATH=${prefix}/include/giflib5
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -DGIF_LIBRARY:FILEPATH=${prefix}/lib/giflib5/lib/libgif.dylib
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+compiler.cxx_standard 2011
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+variant tests description {Enable building of test code} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ depends_build-append port:gtest
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-replace -DBUILD_TESTING=NO \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -DBUILD_TESTING=YES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ configure.args-append -DJPEGXL_FORCE_SYSTEM_GTEST=YES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ test.run yes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/libjxl/files/StoreFence.patch b/graphics/libjxl/files/StoreFence.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..94aa09f399f
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/libjxl/files/StoreFence.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,38 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 600b591538827247f1b2ad6ee6ae627a2173b7ec Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Jan Wassenberg <janwas@google.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Fri, 4 Feb 2022 11:37:43 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] Rename deprecated StoreFence to FlushStream
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lib/profiler/profiler.cc | 6 +++---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lib/profiler/tsc_timer.h | 1 -
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 2 files changed, 3 insertions(+), 4 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/lib/profiler/profiler.cc b/lib/profiler/profiler.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 63d8569df..c72656ee8 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/lib/profiler/profiler.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/lib/profiler/profiler.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -138,7 +138,7 @@ class Results {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void AnalyzePackets(const Packet* HWY_RESTRICT packets,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const size_t num_packets) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Ensures prior weakly-ordered streaming stores are globally visible.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- hwy::StoreFence();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ hwy::FlushStream();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const uint64_t t0 = TicksBefore();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -448,12 +448,12 @@ void ThreadSpecific::ComputeOverhead() {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const size_t kReps = 10000;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Analysis time should not be included => must fit within buffer.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ HWY_ASSERT(kReps * 2 < max_packets_);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- hwy::StoreFence();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ hwy::FlushStream();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const uint64_t t0 = TicksBefore();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (size_t i = 0; i < kReps; ++i) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PROFILER_ZONE("Dummy");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- hwy::StoreFence();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ hwy::FlushStream();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const uint64_t t1 = TicksAfter();
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ HWY_ASSERT(num_packets_ + buffer_size_ == kReps * 2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ buffer_size_ = 0;
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/libjxl/files/exclude-libs.patch b/graphics/libjxl/files/exclude-libs.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..62e8038bb42
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/libjxl/files/exclude-libs.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,59 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 88fe3fff3dc70c72405f57c69feffd9823930034 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Misaki Kasumi <misakikasumi@outlook.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Thu, 16 Sep 2021 18:13:28 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] Fix building with LLVM LLD (#582)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+In 63a481a, linker flag "-Wl,--exclude-libs=ALL" is added.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+However, LLVM LLD does not support it.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Building with LLVM toolchain would result in failure.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+This commit check whether the linker support this flag.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+If it does not, the flag will not be added.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+A not-so-pretty method with CheckCSourceCompiles is used,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+because CMake 3.10 does not support
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+CheckLinkerFlag or CMAKE_REQUIRED_LINK_OPTIONS.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ AUTHORS | 1 +
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lib/jxl.cmake | 13 +++++++++++--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 2 files changed, 12 insertions(+), 2 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/AUTHORS b/AUTHORS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index d929672d6..539eae3fc 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/AUTHORS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/AUTHORS
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -26,3 +26,4 @@ Pieter Wuille
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xiota
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Ziemowit Zabawa <ziemek.zabawa@outlook.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Andrius Lukas Narbutas <andrius4669@gmail.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++Misaki Kasumi <misakikasumi@outlook.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/lib/jxl.cmake b/lib/jxl.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 1f5e6b927..b8edf8a94 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/lib/jxl.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/lib/jxl.cmake
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -523,6 +523,13 @@ set_target_properties(jxl_dec PROPERTIES
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# Check whether the linker support excluding libs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++set(LINKER_EXCLUDE_LIBS_FLAG "-Wl,--exclude-libs=ALL")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++include(CheckCSourceCompiles)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++list(APPEND CMAKE_EXE_LINKER_FLAGS ${LINKER_EXCLUDE_LIBS_FLAG})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++check_c_source_compiles("int main(){return 0;}" LINKER_SUPPORT_EXCLUDE_LIBS)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++list(REMOVE_ITEM CMAKE_EXE_LINKER_FLAGS ${LINKER_EXCLUDE_LIBS_FLAG})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Add a jxl.version file as a version script to tag symbols with the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # appropriate version number. This script is also used to limit what's exposed
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # in the shared library from the static dependencies bundled here.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -541,8 +548,10 @@ foreach(target IN ITEMS jxl jxl_dec)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # This hides the default visibility symbols from static libraries bundled into
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # the shared library. In particular this prevents exposing symbols from hwy
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # and skcms in the shared library.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- set_property(TARGET ${target} APPEND_STRING PROPERTY
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- LINK_FLAGS " -Wl,--exclude-libs=ALL")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if(${LINKER_SUPPORT_EXCLUDE_LIBS})
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ set_property(TARGET ${target} APPEND_STRING PROPERTY
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ LINK_FLAGS " ${LINKER_EXCLUDE_LIBS_FLAG}")
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ endif()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ endforeach()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Only install libjxl shared library. The libjxl_dec is not installed since it
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/libjxl/files/hwy-deprecated.patch b/graphics/libjxl/files/hwy-deprecated.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..630f7572d38
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/libjxl/files/hwy-deprecated.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,362 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From e0107a6ca637eb3997131e966e19fcd6001b37ad Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Jan Wassenberg <janwas@google.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Fri, 12 Nov 2021 09:12:35 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] Avoid deprecated Highway functions
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Instead use the newer overloads with the extra d arg required to
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+support SVE/RISC-V.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lib/jxl/dec_reconstruct.cc | 4 +--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lib/jxl/dec_upsample.cc | 4 +--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lib/jxl/enc_ac_strategy.cc | 8 +++---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lib/jxl/enc_adaptive_quantization.cc | 8 +++---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lib/jxl/enc_ar_control_field.cc | 4 +--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lib/jxl/enc_butteraugli_pnorm.cc | 6 ++---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lib/jxl/enc_chroma_from_luma.cc | 10 +++----
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lib/jxl/enc_cluster.cc | 4 +--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lib/jxl/enc_entropy_coder.cc | 4 +--
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lib/jxl/enc_fast_heuristics.cc | 8 +++---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lib/jxl/gauss_blur.cc | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lib/jxl/modular/encoding/enc_ma.cc | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lib/jxl/rational_polynomial_test.cc | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lib/jxl/splines.cc | 2 +-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lib/jxl/transpose-inl.h | 39 ++++++++++++++--------------
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 15 files changed, 54 insertions(+), 53 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/lib/jxl/dec_reconstruct.cc b/lib/jxl/dec_reconstruct.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 9d1eb6102..69a436154 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/lib/jxl/dec_reconstruct.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/lib/jxl/dec_reconstruct.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -357,8 +357,8 @@ void DoYCbCrUpsampling(size_t hs, size_t vs, ImageF* plane_in, const Rect& rect,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Store(left, d, out + x);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Store(right, d, out + x + 1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- Store(InterleaveLower(left, right), d, out + x);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- Store(InterleaveUpper(left, right), d, out + x + Lanes(d));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Store(InterleaveLower(d, left, right), d, out + x);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Store(InterleaveUpper(d, left, right), d, out + x + Lanes(d));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/lib/jxl/dec_upsample.cc b/lib/jxl/dec_upsample.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 7277e4f11..3cb3f3646 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/lib/jxl/dec_upsample.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/lib/jxl/dec_upsample.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -176,8 +176,8 @@ void Upsample(const ImageF& src, const Rect& src_rect, ImageF* dst,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ min = Min(LoadU(df, raw_min_row + sx + fx), min);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ max = Max(LoadU(df, raw_max_row + sx + fx), max);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- min = MinOfLanes(min);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- max = MaxOfLanes(max);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ min = MinOfLanes(df, min);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ max = MaxOfLanes(df, max);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (size_t lx = 0; lx < N; lx += V) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ StoreU(min, df, min_row + N * sx + lx);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ StoreU(max, df, max_row + N * sx + lx);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/lib/jxl/enc_ac_strategy.cc b/lib/jxl/enc_ac_strategy.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index bc5046518..c0ed68fde 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/lib/jxl/enc_ac_strategy.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/lib/jxl/enc_ac_strategy.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -429,8 +429,8 @@ float EstimateEntropy(const AcStrategy& acs, size_t x, size_t y,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ entropy_v += nzeros_v * cost1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- entropy += GetLane(SumOfLanes(entropy_v));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- size_t num_nzeros = GetLane(SumOfLanes(nzeros_v));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ entropy += GetLane(SumOfLanes(df, entropy_v));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ size_t num_nzeros = GetLane(SumOfLanes(df, nzeros_v));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Add #bit of num_nonzeros, as an estimate of the cost for encoding the
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // number of non-zeros of the block.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size_t nbits = CeilLog2Nonzero(num_nzeros + 1) + 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -441,9 +441,9 @@ float EstimateEntropy(const AcStrategy& acs, size_t x, size_t y,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ float ret =
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ entropy +
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ masking *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- ((config.info_loss_multiplier * GetLane(SumOfLanes(info_loss))) +
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ ((config.info_loss_multiplier * GetLane(SumOfLanes(df, info_loss))) +
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (config.info_loss_multiplier2 *
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- sqrt(num_blocks * GetLane(SumOfLanes(info_loss2)))));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sqrt(num_blocks * GetLane(SumOfLanes(df, info_loss2)))));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ret;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/lib/jxl/enc_adaptive_quantization.cc b/lib/jxl/enc_adaptive_quantization.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 7a6c77204..51cea6565 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/lib/jxl/enc_adaptive_quantization.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/lib/jxl/enc_adaptive_quantization.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -189,7 +189,7 @@ V GammaModulation(const D d, const size_t x, const size_t y,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ overall_ratio += avg_ratio;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- overall_ratio = SumOfLanes(overall_ratio);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ overall_ratio = SumOfLanes(d, overall_ratio);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ overall_ratio *= Set(d, 1.0f / 64);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // ideally -1.0, but likely optimal correction adds some entropy, so slightly
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // less than that.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -246,12 +246,12 @@ V ColorModulation(const D d, const size_t x, const size_t y,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // blue we consider as if it was fully red or blue.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static const float ratio = 30.610615782142737f; // out of 64 pixels.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- auto overall_red_coverage = SumOfLanes(red_coverage);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ auto overall_red_coverage = SumOfLanes(d, red_coverage);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ overall_red_coverage =
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Min(overall_red_coverage, Set(d, ratio * kRedRampLength));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ overall_red_coverage *= Set(d, red_strength / ratio);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- auto overall_blue_coverage = SumOfLanes(blue_coverage);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ auto overall_blue_coverage = SumOfLanes(d, blue_coverage);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ overall_blue_coverage =
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Min(overall_blue_coverage, Set(d, ratio * kBlueRampLength));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ overall_blue_coverage *= Set(d, blue_strength / ratio);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -295,7 +295,7 @@ V HfModulation(const D d, const size_t x, const size_t y, const ImageF& xyb,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- sum = SumOfLanes(sum);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ sum = SumOfLanes(d, sum);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return MulAdd(sum, Set(d, -2.0052193233688884f / 112), out_val);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/lib/jxl/enc_ar_control_field.cc b/lib/jxl/enc_ar_control_field.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index f43340eda..f8025ac69 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/lib/jxl/enc_ar_control_field.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/lib/jxl/enc_ar_control_field.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -157,7 +157,7 @@ void ProcessTile(const Image3F& opsin, PassesEncoderState* enc_state,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sum += LoadU(df4, rows_in[iy] + x * 4 + ix + 2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- row_out[x] = GetLane(Sqrt(SumOfLanes(sum))) * (1.0f / 4.0f);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ row_out[x] = GetLane(Sqrt(SumOfLanes(df4, sum))) * (1.0f / 4.0f);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Indexing iy and ix is a bit tricky as we include a 2 pixel border
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -193,7 +193,7 @@ void ProcessTile(const Image3F& opsin, PassesEncoderState* enc_state,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sum += Load(df4, rows_in[iy] + sx + ix);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- row_out[x] = GetLane(Sqrt(SumOfLanes(sum))) * (1.0f / 4.0f);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ row_out[x] = GetLane(Sqrt(SumOfLanes(df4, sum))) * (1.0f / 4.0f);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ float sum = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (size_t iy = sy; iy < ey; iy++) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/lib/jxl/enc_butteraugli_pnorm.cc b/lib/jxl/enc_butteraugli_pnorm.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 32623b8ed..b7feac048 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/lib/jxl/enc_butteraugli_pnorm.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/lib/jxl/enc_butteraugli_pnorm.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -87,13 +87,13 @@ double ComputeDistanceP(const ImageF& distmap, const ButteraugliParams& params,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ double v = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ v += pow(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- onePerPixels * (sum1[0] + GetLane(SumOfLanes(Load(d, sum_totals0)))),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ onePerPixels * (sum1[0] + GetLane(SumOfLanes(d, Load(d, sum_totals0)))),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1.0 / (p * 1.0));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ v += pow(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- onePerPixels * (sum1[1] + GetLane(SumOfLanes(Load(d, sum_totals1)))),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ onePerPixels * (sum1[1] + GetLane(SumOfLanes(d, Load(d, sum_totals1)))),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1.0 / (p * 2.0));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ v += pow(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- onePerPixels * (sum1[2] + GetLane(SumOfLanes(Load(d, sum_totals2)))),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ onePerPixels * (sum1[2] + GetLane(SumOfLanes(d, Load(d, sum_totals2)))),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1.0 / (p * 4.0));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ v /= 3.0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return v;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/lib/jxl/enc_chroma_from_luma.cc b/lib/jxl/enc_chroma_from_luma.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index e5c3f3899..370595c5e 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/lib/jxl/enc_chroma_from_luma.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/lib/jxl/enc_chroma_from_luma.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -91,9 +91,9 @@ struct CFLFunction {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fdme_v += IfThenElse(av >= thres, zero, dme);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- *fpeps = first_derivative_peps + GetLane(SumOfLanes(fdpe_v));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- *fmeps = first_derivative_meps + GetLane(SumOfLanes(fdme_v));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return first_derivative + GetLane(SumOfLanes(fd_v));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *fpeps = first_derivative_peps + GetLane(SumOfLanes(df, fdpe_v));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ *fmeps = first_derivative_meps + GetLane(SumOfLanes(df, fdme_v));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return first_derivative + GetLane(SumOfLanes(df, fd_v));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const float* JXL_RESTRICT values_m;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -124,8 +124,8 @@ int32_t FindBestMultiplier(const float* values_m, const float* values_s,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cb = MulAdd(a, b, cb);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // + distance_mul * x^2 * num
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- x = -GetLane(SumOfLanes(cb)) /
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- (GetLane(SumOfLanes(ca)) + num * distance_mul * 0.5f);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ x = -GetLane(SumOfLanes(df, cb)) /
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (GetLane(SumOfLanes(df, ca)) + num * distance_mul * 0.5f);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ constexpr float eps = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ constexpr float kClamp = 20.0f;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/lib/jxl/enc_cluster.cc b/lib/jxl/enc_cluster.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 1f12a2988..8ae863c47 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/lib/jxl/enc_cluster.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/lib/jxl/enc_cluster.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -49,7 +49,7 @@ void HistogramEntropy(const Histogram& a) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const auto counts = LoadU(di, &a.data_[i]);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ entropy_lanes += Entropy(ConvertTo(df, counts), inv_tot, total);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- a.entropy_ += GetLane(SumOfLanes(entropy_lanes));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ a.entropy_ += GetLane(SumOfLanes(df, entropy_lanes));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ float HistogramDistance(const Histogram& a, const Histogram& b) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -71,7 +71,7 @@ float HistogramDistance(const Histogram& a, const Histogram& b) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const auto counts = ConvertTo(df, a_counts + b_counts);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ distance_lanes += Entropy(counts, inv_tot, total);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const float total_distance = GetLane(SumOfLanes(distance_lanes));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const float total_distance = GetLane(SumOfLanes(df, distance_lanes));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return total_distance - a.entropy_ - b.entropy_;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/lib/jxl/enc_entropy_coder.cc b/lib/jxl/enc_entropy_coder.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 094630097..07fe5a05b 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/lib/jxl/enc_entropy_coder.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/lib/jxl/enc_entropy_coder.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -86,7 +86,7 @@ int32_t NumNonZeroExceptLLF(const size_t cx, const size_t cy,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // We want area - sum_zero, add because neg_sum_zero is already negated.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const int32_t nzeros =
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int32_t(cx * cy * kDCTBlockSize) + GetLane(SumOfLanes(neg_sum_zero));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int32_t(cx * cy * kDCTBlockSize) + GetLane(SumOfLanes(di, neg_sum_zero));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const int32_t shifted_nzeros = static_cast<int32_t>(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ (nzeros + covered_blocks - 1) >> log2_covered_blocks);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -135,7 +135,7 @@ int32_t NumNonZero8x8ExceptDC(const int32_t* JXL_RESTRICT block,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // We want 64 - sum_zero, add because neg_sum_zero is already negated.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const int32_t nzeros =
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- int32_t(kDCTBlockSize) + GetLane(SumOfLanes(neg_sum_zero));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ int32_t(kDCTBlockSize) + GetLane(SumOfLanes(di, neg_sum_zero));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *nzeros_pos = nzeros;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/lib/jxl/enc_fast_heuristics.cc b/lib/jxl/enc_fast_heuristics.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 16f7670c1..055178238 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/lib/jxl/enc_fast_heuristics.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/lib/jxl/enc_fast_heuristics.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -94,8 +94,8 @@ Status Heuristics(PassesEncoderState* enc_state,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cb = MulAdd(a, b, cb);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- float best =
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- -GetLane(SumOfLanes(cb)) / (GetLane(SumOfLanes(ca)) + 1e-9f);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ float best = -GetLane(SumOfLanes(df, cb)) /
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ (GetLane(SumOfLanes(df, ca)) + 1e-9f);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int8_t& res = (c == 0 ? shared.cmap.ytox_map : shared.cmap.ytob_map)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ .Row(ty)[tx];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ res = std::max(-128.0f, std::min(127.0f, roundf(best)));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -124,8 +124,8 @@ Status Heuristics(PassesEncoderState* enc_state,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ max = IfThenElse(max > nn, max, nn);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- row_out_avg[x] = GetLane(SumOfLanes(sum));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- row_out[x] = GetLane(MaxOfLanes(max));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ row_out_avg[x] = GetLane(SumOfLanes(df4, sum));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ row_out[x] = GetLane(MaxOfLanes(df4, max));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ },
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/lib/jxl/gauss_blur.cc b/lib/jxl/gauss_blur.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index f9babe701..f24a74cb9 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/lib/jxl/gauss_blur.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/lib/jxl/gauss_blur.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -421,7 +421,7 @@ ImageF ConvolveXSampleAndTranspose(const ImageF& in,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (int i = -r; i <= r; i += Lanes(df)) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sum = MulAdd(LoadU(df, rowp + x + i), LoadU(df, kernelp + i), sum);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- out.Row(ox)[y] = GetLane(SumOfLanes(sum));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ out.Row(ox)[y] = GetLane(SumOfLanes(df, sum));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (; x < in.xsize(); x += res, ++ox) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ float sum = 0.0f;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/lib/jxl/modular/encoding/enc_ma.cc b/lib/jxl/modular/encoding/enc_ma.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index f847db620..7700ecc26 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/lib/jxl/modular/encoding/enc_ma.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/lib/jxl/modular/encoding/enc_ma.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -60,7 +60,7 @@ float EstimateBits(const int32_t *counts, int32_t *rounded_counts,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ bits_lanes -=
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ IfThenElse(counts_v == zero, zero, counts_v * BitCast(df, nbps));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return GetLane(SumOfLanes(bits_lanes));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return GetLane(SumOfLanes(df, bits_lanes));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ void MakeSplitNode(size_t pos, int property, int splitval, Predictor lpred,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/lib/jxl/rational_polynomial_test.cc b/lib/jxl/rational_polynomial_test.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index d0e628daa..e0d5a6ee2 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/lib/jxl/rational_polynomial_test.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/lib/jxl/rational_polynomial_test.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -50,7 +50,7 @@ struct EvalLog2 {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const HWY_FULL(int32_t) di;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const auto x_bits = BitCast(di, vx);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Cannot handle negative numbers / NaN.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- JXL_DASSERT(AllTrue(Abs(x_bits) == x_bits));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ JXL_DASSERT(AllTrue(di, Abs(x_bits) == x_bits));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Range reduction to [-1/3, 1/3] - 3 integer, 2 float ops
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ const auto exp_bits = x_bits - Set(di, 0x3f2aaaab); // = 2/3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/lib/jxl/splines.cc b/lib/jxl/splines.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 58ebfd681..0026fa9c6 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/lib/jxl/splines.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/lib/jxl/splines.cc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -53,7 +53,7 @@ float ContinuousIDCT(const float dct[32], float t) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ auto local_res = LoadU(df, dct + i) * cos;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ result = MulAdd(Set(df, square_root<2>::value), local_res, result);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return GetLane(SumOfLanes(result));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return GetLane(SumOfLanes(df, result));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ template <typename DF>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/lib/jxl/transpose-inl.h b/lib/jxl/transpose-inl.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index d12b1295e..e89e8af0a 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/lib/jxl/transpose-inl.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/lib/jxl/transpose-inl.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -137,25 +137,26 @@ JXL_INLINE_TRANSPOSE void GenericTransposeBlock(TransposeSimdTag<true>,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static_assert(COLS_or_0 % 4 == 0, "Invalid number of columns");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (size_t n = 0; n < ROWS; n += 4) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (size_t m = 0; m < COLS; m += 4) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto p0 = from.LoadPart(BlockDesc<4>(), n + 0, m + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto p1 = from.LoadPart(BlockDesc<4>(), n + 1, m + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto p2 = from.LoadPart(BlockDesc<4>(), n + 2, m + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto p3 = from.LoadPart(BlockDesc<4>(), n + 3, m + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto q0 = InterleaveLower(p0, p2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto q1 = InterleaveLower(p1, p3);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto q2 = InterleaveUpper(p0, p2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto q3 = InterleaveUpper(p1, p3);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto r0 = InterleaveLower(q0, q1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto r1 = InterleaveUpper(q0, q1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto r2 = InterleaveLower(q2, q3);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto r3 = InterleaveUpper(q2, q3);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- to.StorePart(BlockDesc<4>(), r0, m + 0, n + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- to.StorePart(BlockDesc<4>(), r1, m + 1, n + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- to.StorePart(BlockDesc<4>(), r2, m + 2, n + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- to.StorePart(BlockDesc<4>(), r3, m + 3, n + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const BlockDesc<4> d;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto p0 = from.LoadPart(d, n + 0, m + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto p1 = from.LoadPart(d, n + 1, m + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto p2 = from.LoadPart(d, n + 2, m + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto p3 = from.LoadPart(d, n + 3, m + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto q0 = InterleaveLower(d, p0, p2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto q1 = InterleaveLower(d, p1, p3);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto q2 = InterleaveUpper(d, p0, p2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto q3 = InterleaveUpper(d, p1, p3);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto r0 = InterleaveLower(d, q0, q1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto r1 = InterleaveUpper(d, q0, q1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto r2 = InterleaveLower(d, q2, q3);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto r3 = InterleaveUpper(d, q2, q3);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ to.StorePart(d, r0, m + 0, n + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ to.StorePart(d, r1, m + 1, n + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ to.StorePart(d, r2, m + 2, n + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ to.StorePart(d, r3, m + 3, n + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/graphics/libjxl/files/hwy-deprecated2.patch b/graphics/libjxl/files/hwy-deprecated2.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..53641be1edd
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/graphics/libjxl/files/hwy-deprecated2.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,108 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 0902f85ca6e9e305338baf7974192acab8c53ac5 Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: Jan Wassenberg <janwas@google.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Thu, 6 Jan 2022 09:36:20 +0100
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] Avoid deprecated Hwy functions - add d arg. Also remove
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unnecessary include
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ lib/jxl/transpose-inl.h | 85 ++++++++++---------
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 2 files changed, 43 insertions(+), 43 deletions(-)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git a/lib/jxl/transpose-inl.h b/lib/jxl/transpose-inl.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index e89e8af0a..467442073 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- a/lib/jxl/transpose-inl.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ b/lib/jxl/transpose-inl.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -74,50 +74,51 @@ JXL_INLINE_TRANSPOSE void GenericTransposeBlock(TransposeSimdTag<true>,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static_assert(COLS_or_0 % 8 == 0, "Invalid number of columns");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (size_t n = 0; n < ROWS; n += 8) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for (size_t m = 0; m < COLS; m += 8) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- auto i0 = from.LoadPart(BlockDesc<8>(), n + 0, m + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- auto i1 = from.LoadPart(BlockDesc<8>(), n + 1, m + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- auto i2 = from.LoadPart(BlockDesc<8>(), n + 2, m + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- auto i3 = from.LoadPart(BlockDesc<8>(), n + 3, m + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- auto i4 = from.LoadPart(BlockDesc<8>(), n + 4, m + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- auto i5 = from.LoadPart(BlockDesc<8>(), n + 5, m + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- auto i6 = from.LoadPart(BlockDesc<8>(), n + 6, m + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- auto i7 = from.LoadPart(BlockDesc<8>(), n + 7, m + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const BlockDesc<8> d;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ auto i0 = from.LoadPart(d, n + 0, m + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ auto i1 = from.LoadPart(d, n + 1, m + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ auto i2 = from.LoadPart(d, n + 2, m + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ auto i3 = from.LoadPart(d, n + 3, m + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ auto i4 = from.LoadPart(d, n + 4, m + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ auto i5 = from.LoadPart(d, n + 5, m + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ auto i6 = from.LoadPart(d, n + 6, m + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ auto i7 = from.LoadPart(d, n + 7, m + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // Surprisingly, this straightforward implementation (24 cycles on port5)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // is faster than load128+insert and LoadDup128+ConcatUpperLower+blend.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto q0 = InterleaveLower(i0, i2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto q1 = InterleaveLower(i1, i3);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto q2 = InterleaveUpper(i0, i2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto q3 = InterleaveUpper(i1, i3);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto q4 = InterleaveLower(i4, i6);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto q5 = InterleaveLower(i5, i7);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto q6 = InterleaveUpper(i4, i6);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto q7 = InterleaveUpper(i5, i7);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto r0 = InterleaveLower(q0, q1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto r1 = InterleaveUpper(q0, q1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto r2 = InterleaveLower(q2, q3);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto r3 = InterleaveUpper(q2, q3);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto r4 = InterleaveLower(q4, q5);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto r5 = InterleaveUpper(q4, q5);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto r6 = InterleaveLower(q6, q7);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- const auto r7 = InterleaveUpper(q6, q7);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- i0 = ConcatLowerLower(r4, r0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- i1 = ConcatLowerLower(r5, r1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- i2 = ConcatLowerLower(r6, r2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- i3 = ConcatLowerLower(r7, r3);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- i4 = ConcatUpperUpper(r4, r0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- i5 = ConcatUpperUpper(r5, r1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- i6 = ConcatUpperUpper(r6, r2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- i7 = ConcatUpperUpper(r7, r3);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- to.StorePart(BlockDesc<8>(), i0, m + 0, n + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- to.StorePart(BlockDesc<8>(), i1, m + 1, n + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- to.StorePart(BlockDesc<8>(), i2, m + 2, n + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- to.StorePart(BlockDesc<8>(), i3, m + 3, n + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- to.StorePart(BlockDesc<8>(), i4, m + 4, n + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- to.StorePart(BlockDesc<8>(), i5, m + 5, n + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- to.StorePart(BlockDesc<8>(), i6, m + 6, n + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- to.StorePart(BlockDesc<8>(), i7, m + 7, n + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto q0 = InterleaveLower(d, i0, i2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto q1 = InterleaveLower(d, i1, i3);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto q2 = InterleaveUpper(d, i0, i2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto q3 = InterleaveUpper(d, i1, i3);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto q4 = InterleaveLower(d, i4, i6);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto q5 = InterleaveLower(d, i5, i7);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto q6 = InterleaveUpper(d, i4, i6);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto q7 = InterleaveUpper(d, i5, i7);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto r0 = InterleaveLower(d, q0, q1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto r1 = InterleaveUpper(d, q0, q1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto r2 = InterleaveLower(d, q2, q3);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto r3 = InterleaveUpper(d, q2, q3);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto r4 = InterleaveLower(d, q4, q5);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto r5 = InterleaveUpper(d, q4, q5);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto r6 = InterleaveLower(d, q6, q7);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ const auto r7 = InterleaveUpper(d, q6, q7);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ i0 = ConcatLowerLower(d, r4, r0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ i1 = ConcatLowerLower(d, r5, r1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ i2 = ConcatLowerLower(d, r6, r2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ i3 = ConcatLowerLower(d, r7, r3);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ i4 = ConcatUpperUpper(d, r4, r0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ i5 = ConcatUpperUpper(d, r5, r1);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ i6 = ConcatUpperUpper(d, r6, r2);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ i7 = ConcatUpperUpper(d, r7, r3);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ to.StorePart(d, i0, m + 0, n + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ to.StorePart(d, i1, m + 1, n + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ to.StorePart(d, i2, m + 2, n + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ to.StorePart(d, i3, m + 3, n + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ to.StorePart(d, i4, m + 4, n + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ to.StorePart(d, i5, m + 5, n + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ to.StorePart(d, i6, m + 6, n + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ to.StorePart(d, i7, m + 7, n + 0);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span></pre><pre style='margin:0'>
</pre>